UNPKG

@rapidload/page-optimizer

Version:

Helps you get better page speed scores by analyzing and providing optimal actions (for Wordpress)

522 lines 1.34 MB
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.B4TrNB0E.js","assets/vendor.T3CYoFTJ.js","assets/core-vendor.V80Ff32-.js","assets/index.Be5yF97N.js","assets/animations.CVpoelRy.js","assets/InitTour.DtcCru1H.js"])))=>i.map(i=>d[i]);
var Qr=Object.defineProperty;var en=(s,a,i)=>a in s?Qr(s,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[a]=i;var St=(s,a,i)=>en(s,typeof a!="symbol"?a+"":a,i);import{j as jsxRuntimeExports,H as Highlight2,t as themes_exports,c as clsx$1,a as createContextScope$1,b as createPopperScope,u as useComposedRefs$1,A as Anchor,P as Primitive$1,d as composeEventHandlers$1,e as Presence$1,D as DismissableLayer,C as Content$2,S as Slottable$1,R as Root$6,f as Arrow,g as useId,h as useControllableState,i as Root2$4,k as ReactRemoveScroll,l as Slot$1,m as hideOthers,n as useFocusGuards,F as FocusScope,o as createContext2,p as Portal$1,V as Viewport,q as Root2$5,r as Action$1,s as Close$1,T as Title$1,v as Description$2,w as Provider$2,x as Trigger$4,I as Icon$1,y as Content2$5,z as Viewport$1,L as Label$3,B as Item$1,E as ItemIndicator$1,G as ItemText,J as Separator$1,K as Root2$6,M as Group$1,N as Value,O as useReactTable,Q as createColumnHelper,U as getCoreRowModel,W as getPaginationRowModel,X as flexRender,Y as usePrevious,Z as useSize,_ as createCollection,$ as useDirection,a0 as useCallbackRef,a1 as composeRefs$1,a2 as dispatchDiscreteCustomEvent,a3 as useLayoutEffect2}from"./vendor.T3CYoFTJ.js";import{r as reactExports,t as twMerge,a as reactDomExports,g as getDefaultExportFromCjs,c as React8,d as commonjsGlobal,b as ReactDOM}from"./core-vendor.V80Ff32-.js";import{A as AnimatePresence,m as m$3,u as useInView,a as motion,L as LazyMotion,d as domAnimation}from"./animations.CVpoelRy.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))o(E);new MutationObserver(E=>{for(const j of E)if(j.type==="childList")for(const R of j.addedNodes)R.tagName==="LINK"&&R.rel==="modulepreload"&&o(R)}).observe(document,{childList:!0,subtree:!0});function i(E){const j={};return E.integrity&&(j.integrity=E.integrity),E.referrerPolicy&&(j.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?j.credentials="include":E.crossOrigin==="anonymous"?j.credentials="omit":j.credentials="same-origin",j}function o(E){if(E.ep)return;E.ep=!0;const j=i(E);fetch(E.href,j)}})();const stylesUrl= window.rapidload_optimizer.page_optimizer_package_base+"/assets/index.BYYPrP4d.css",scriptRel="modulepreload",assetsURL=function(s){return window.rapidload_optimizer.page_optimizer_package_base+"/"+s},seen={},__vitePreload=function(a,i,o){let E=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const j=document.querySelector("meta[property=csp-nonce]"),R=(j==null?void 0:j.nonce)||(j==null?void 0:j.getAttribute("nonce"));E=Promise.all(i.map(C=>{if(C=assetsURL(C),C in seen)return;seen[C]=!0;const S=C.endsWith(".css"),_=S?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${C}"]${_}`))return;const T=document.createElement("link");if(T.rel=S?"stylesheet":scriptRel,S||(T.as="script",T.crossOrigin=""),T.href=C,R&&T.setAttribute("nonce",R),document.head.appendChild(T),S)return new Promise((P,N)=>{T.addEventListener("load",P),T.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${C}`)))})}))}return E.then(()=>a()).catch(j=>{const R=new Event("vite:preloadError",{cancelable:!0});if(R.payload=j,window.dispatchEvent(R),!R.defaultPrevented)throw j})},Pass=({cls:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("circle",{cx:"4.5",cy:"4.5",r:"4.5",fill:"#0c6"})}),Fail=({cls:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M9 9H0L4.5 0L9 9Z",fill:"#FF3333"})}),Average=({cls:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("rect",{width:"9",height:"9",fill:"#FFAA33"})}),AIStarIcon=({cls:s,isDark:a})=>jsxRuntimeExports.jsxs("svg",{className:`${s}`,width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M5.59267 3.98157C4.74999 7.02544 3.66593 8.06586 0.666748 8.90749C3.66593 9.74912 4.74999 10.7895 5.59267 13.8334C6.43536 10.7895 7.51942 9.74912 10.5186 8.90749C7.51942 8.06586 6.43536 7.02544 5.59267 3.98157Z",fill:a?"#DDDFE4":"black"}),jsxRuntimeExports.jsx("path",{d:"M7.70361 3.98156C9.41713 3.50058 10.0371 2.9063 10.5184 1.16675C10.9998 2.9063 11.6197 3.50058 13.3332 3.98156C11.6197 4.46254 10.9998 5.05682 10.5184 6.79638C10.0371 5.05682 9.41713 4.46254 7.70361 3.98156Z",fill:a?"#DDDFE4":"black"})]}),RootContext=reactExports.createContext(null),RootProvider=({children:s})=>{const[a,i]=reactExports.useState("light"),[o,E]=reactExports.useState(!1);reactExports.useEffect(()=>{const R=typeof window<"u"&&window.localStorage.getItem("rapidload-theme");R&&i(R)},[]),reactExports.useEffect(()=>{typeof window<"u"&&window.localStorage.setItem("rapidload-theme",a)},[a]);const j=()=>{i(a==="dark"?"light":"dark")};return jsxRuntimeExports.jsx(RootContext.Provider,{value:{theme:a,setTheme:i,isDark:o,setIsDark:E,changeTheme:j},children:s})},useRootContext=()=>{const s=reactExports.useContext(RootContext);if(s===null)throw new Error("useRootContext must be used within an useRootContext");return s},Code$1=({code:s,lang:a="html",className:i})=>{const{theme:o,isDark:E}=useRootContext();return jsxRuntimeExports.jsx(Highlight2,{theme:E?themes_exports.vsDark:themes_exports.github,language:a,code:s,children:({className:j,style:R,tokens:C,getLineProps:S,getTokenProps:_})=>jsxRuntimeExports.jsx("pre",{className:cn(j,i,"w-fit"),children:C.map((T,P)=>jsxRuntimeExports.jsx("div",{...S({line:T}),className:"text-xs w-full flex flex-row p-2 bg-brand-200/80 dark:bg-brand-800 overflow-hidden rounded-lg flex-wrap",children:T.map((N,I)=>jsxRuntimeExports.jsx("span",{..._({token:N})},I))},P))})})};function cn(...s){return twMerge(clsx$1(s))}function isImageAudit(s){return["offscreen-images","modern-image-formats","unsized-images","uses-responsive-images","uses-optimized-images"].includes(s)}function transformFileType(s,a){return s.id==="lcp-lazy-loaded"&&a==="unknown"&&(a="image"),a==="google_font"&&(a="font"),a==="data_image"&&(a="image"),a==="js"&&(a="javascript"),a}const isDev=!1,isAdminPage=window.location.href.includes("/wp-admin"),getOptimizeUrl=()=>{const s=window.location.search;return new URLSearchParams(s).get("optimize-url")},disableDebugReport=window.rapidload_optimizer&&window.rapidload_optimizer.uucss_disable_error_tracking=="1";function isUrl$1(s){try{return new URL(s),!0}catch{return!1}}function truncateMiddleOfURL(s,a,i=!0){try{if(s==="Unattributable")return s;const o=new URL(s),E=s.endsWith("/");if(o.pathname.split("/").pop()==="")return`${o.protocol}//${o.host}`;const R=o.pathname.split("/"),C=R[R.length-2],S=R[R.length-1];let _=i?`${o.protocol}//${o.host}/.../${C}/`:`.../${C}/`,T=S;if(_.length+S.length>a){const N=_.length+S.length-a;T=`...${S.slice(N+3)}`}return _+T+(E?"/":"")}catch{if(s)return jsxRuntimeExports.jsx(Code$1,{code:s})}}function formatNumberWithGranularity(s,a=1){return(Math.round(s/a)*a).toFixed(Math.max(0,Math.ceil(-Math.log10(a))))}function timeAgo(s){const a=new Date(s),o=Math.round((new Date-a)/1e3),E=Math.round(o/60),j=Math.round(E/60),R=Math.round(j/24),C=Math.round(R/30.44),S=Math.round(R/365.24);return o<60?"just now":o<60?`${o} seconds ago`:E<60?`${E} minutes ago`:j<24?`${j} hours ago`:R<30?`${R} days ago`:C<12?`${C} months ago`:`${S} years ago`}function toBoolean(s){return s===!0||s===1||s==="1"||s==="true"}function calculatePercentage(s,a){return s===0?0:s==null||a==null?"-":((a-s)/s*100).toFixed(2)}function hasQueryParam(s){return new URLSearchParams(window.location.search).has(s)}const PerformanceIcons=({icon:s,className:a})=>{let[i,o]=reactExports.useState(jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}));return reactExports.useEffect(()=>{s==="pass"||s==="FAST"||s==="passed_audit"?o(jsxRuntimeExports.jsx(Pass,{})):s==="average"||s==="AVERAGE"?o(jsxRuntimeExports.jsx(Average,{})):(s==="fail"||s==="SLOW")&&o(jsxRuntimeExports.jsx(Fail,{}))},[]),jsxRuntimeExports.jsx("span",{className:cn(a),children:i})};var shim$2={exports:{}},useSyncExternalStoreShim_production={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var React$1=reactExports;function is$2(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var objectIs$1=typeof Object.is=="function"?Object.is:is$2,useState=React$1.useState,useEffect$1=React$1.useEffect,useLayoutEffect=React$1.useLayoutEffect,useDebugValue$1=React$1.useDebugValue;function useSyncExternalStore$2(s,a){var i=a(),o=useState({inst:{value:i,getSnapshot:a}}),E=o[0].inst,j=o[1];return useLayoutEffect(function(){E.value=i,E.getSnapshot=a,checkIfSnapshotChanged(E)&&j({inst:E})},[s,i,a]),useEffect$1(function(){return checkIfSnapshotChanged(E)&&j({inst:E}),s(function(){checkIfSnapshotChanged(E)&&j({inst:E})})},[s]),useDebugValue$1(i),i}function checkIfSnapshotChanged(s){var a=s.getSnapshot;s=s.value;try{var i=a();return!objectIs$1(s,i)}catch{return!0}}function useSyncExternalStore$1(s,a){return a()}var shim$1=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?useSyncExternalStore$1:useSyncExternalStore$2;useSyncExternalStoreShim_production.useSyncExternalStore=React$1.useSyncExternalStore!==void 0?React$1.useSyncExternalStore:shim$1;shim$2.exports=useSyncExternalStoreShim_production;var shimExports=shim$2.exports,withSelector={exports:{}},withSelector_production={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var React=reactExports,shim=shimExports;function is$1(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var objectIs=typeof Object.is=="function"?Object.is:is$1,useSyncExternalStore=shim.useSyncExternalStore,useRef=React.useRef,useEffect=React.useEffect,useMemo=React.useMemo,useDebugValue=React.useDebugValue;withSelector_production.useSyncExternalStoreWithSelector=function(s,a,i,o,E){var j=useRef(null);if(j.current===null){var R={hasValue:!1,value:null};j.current=R}else R=j.current;j=useMemo(function(){function S(I){if(!_){if(_=!0,T=I,I=o(I),E!==void 0&&R.hasValue){var M=R.value;if(E(M,I))return P=M}return P=I}if(M=P,objectIs(T,I))return M;var D=o(I);return E!==void 0&&E(M,D)?(T=I,M):(T=I,P=D)}var _=!1,T,P,N=i===void 0?null:i;return[function(){return S(a())},N===null?void 0:function(){return S(N())}]},[a,i,o,E]);var C=useSyncExternalStore(s,j[0],j[1]);return useEffect(function(){R.hasValue=!0,R.value=C},[C]),useDebugValue(C),C};withSelector.exports=withSelector_production;var withSelectorExports=withSelector.exports;function defaultNoopBatch(s){s()}let batch=defaultNoopBatch;const setBatch=s=>batch=s,getBatch=()=>batch,ContextKey=Symbol.for("react-redux-context"),gT=typeof globalThis<"u"?globalThis:{};function getContext(){var s;if(!reactExports.createContext)return{};const a=(s=gT[ContextKey])!=null?s:gT[ContextKey]=new Map;let i=a.get(reactExports.createContext);return i||(i=reactExports.createContext(null),a.set(reactExports.createContext,i)),i}const ReactReduxContext=getContext();function createReduxContextHook(s=ReactReduxContext){return function(){return reactExports.useContext(s)}}const useReduxContext=createReduxContextHook(),notInitialized=()=>{throw new Error("uSES not initialized!")};let useSyncExternalStoreWithSelector=notInitialized;const initializeUseSelector=s=>{useSyncExternalStoreWithSelector=s},refEquality=(s,a)=>s===a;function createSelectorHook(s=ReactReduxContext){const a=s===ReactReduxContext?useReduxContext:createReduxContextHook(s);return function(o,E={}){const{equalityFn:j=refEquality,stabilityCheck:R=void 0,noopCheck:C=void 0}=typeof E=="function"?{equalityFn:E}:E,{store:S,subscription:_,getServerState:T,stabilityCheck:P,noopCheck:N}=a();reactExports.useRef(!0);const I=reactExports.useCallback({[o.name](D){return o(D)}}[o.name],[o,P,R]),M=useSyncExternalStoreWithSelector(_.addNestedSub,S.getState,T||S.getState,I,j);return reactExports.useDebugValue(M),M}}const useSelector=createSelectorHook();var reactIs$1={exports:{}},reactIs_production_min$1={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var b$1=typeof Symbol=="function"&&Symbol.for,c$1=b$1?Symbol.for("react.element"):60103,d$1=b$1?Symbol.for("react.portal"):60106,e$1=b$1?Symbol.for("react.fragment"):60107,f$1=b$1?Symbol.for("react.strict_mode"):60108,g$1=b$1?Symbol.for("react.profiler"):60114,h$2=b$1?Symbol.for("react.provider"):60109,k$1=b$1?Symbol.for("react.context"):60110,l$1=b$1?Symbol.for("react.async_mode"):60111,m$2=b$1?Symbol.for("react.concurrent_mode"):60111,n$1=b$1?Symbol.for("react.forward_ref"):60112,p$1=b$1?Symbol.for("react.suspense"):60113,q$1=b$1?Symbol.for("react.suspense_list"):60120,r$1=b$1?Symbol.for("react.memo"):60115,t$1=b$1?Symbol.for("react.lazy"):60116,v$2=b$1?Symbol.for("react.block"):60121,w$1=b$1?Symbol.for("react.fundamental"):60117,x=b$1?Symbol.for("react.responder"):60118,y=b$1?Symbol.for("react.scope"):60119;function z$1(s){if(typeof s=="object"&&s!==null){var a=s.$$typeof;switch(a){case c$1:switch(s=s.type,s){case l$1:case m$2:case e$1:case g$1:case f$1:case p$1:return s;default:switch(s=s&&s.$$typeof,s){case k$1:case n$1:case t$1:case r$1:case h$2:return s;default:return a}}case d$1:return a}}}function A(s){return z$1(s)===m$2}reactIs_production_min$1.AsyncMode=l$1;reactIs_production_min$1.ConcurrentMode=m$2;reactIs_production_min$1.ContextConsumer=k$1;reactIs_production_min$1.ContextProvider=h$2;reactIs_production_min$1.Element=c$1;reactIs_production_min$1.ForwardRef=n$1;reactIs_production_min$1.Fragment=e$1;reactIs_production_min$1.Lazy=t$1;reactIs_production_min$1.Memo=r$1;reactIs_production_min$1.Portal=d$1;reactIs_production_min$1.Profiler=g$1;reactIs_production_min$1.StrictMode=f$1;reactIs_production_min$1.Suspense=p$1;reactIs_production_min$1.isAsyncMode=function(s){return A(s)||z$1(s)===l$1};reactIs_production_min$1.isConcurrentMode=A;reactIs_production_min$1.isContextConsumer=function(s){return z$1(s)===k$1};reactIs_production_min$1.isContextProvider=function(s){return z$1(s)===h$2};reactIs_production_min$1.isElement=function(s){return typeof s=="object"&&s!==null&&s.$$typeof===c$1};reactIs_production_min$1.isForwardRef=function(s){return z$1(s)===n$1};reactIs_production_min$1.isFragment=function(s){return z$1(s)===e$1};reactIs_production_min$1.isLazy=function(s){return z$1(s)===t$1};reactIs_production_min$1.isMemo=function(s){return z$1(s)===r$1};reactIs_production_min$1.isPortal=function(s){return z$1(s)===d$1};reactIs_production_min$1.isProfiler=function(s){return z$1(s)===g$1};reactIs_production_min$1.isStrictMode=function(s){return z$1(s)===f$1};reactIs_production_min$1.isSuspense=function(s){return z$1(s)===p$1};reactIs_production_min$1.isValidElementType=function(s){return typeof s=="string"||typeof s=="function"||s===e$1||s===m$2||s===g$1||s===f$1||s===p$1||s===q$1||typeof s=="object"&&s!==null&&(s.$$typeof===t$1||s.$$typeof===r$1||s.$$typeof===h$2||s.$$typeof===k$1||s.$$typeof===n$1||s.$$typeof===w$1||s.$$typeof===x||s.$$typeof===y||s.$$typeof===v$2)};reactIs_production_min$1.typeOf=z$1;reactIs$1.exports=reactIs_production_min$1;var reactIsExports=reactIs$1.exports,reactIs=reactIsExports,FORWARD_REF_STATICS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};TYPE_STATICS[reactIs.ForwardRef]=FORWARD_REF_STATICS;TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;var reactIs_production_min={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h$1=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m$1=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");function v$1(s){if(typeof s=="object"&&s!==null){var a=s.$$typeof;switch(a){case b:switch(s=s.type,s){case d:case f:case e:case m$1:case n:return s;default:switch(s=s&&s.$$typeof,s){case k:case h$1:case l:case q:case p:case g:return s;default:return a}}case c:return a}}}reactIs_production_min.ContextConsumer=h$1;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m$1;reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return!1};reactIs_production_min.isConcurrentMode=function(){return!1};reactIs_production_min.isContextConsumer=function(s){return v$1(s)===h$1};reactIs_production_min.isContextProvider=function(s){return v$1(s)===g};reactIs_production_min.isElement=function(s){return typeof s=="object"&&s!==null&&s.$$typeof===b};reactIs_production_min.isForwardRef=function(s){return v$1(s)===l};reactIs_production_min.isFragment=function(s){return v$1(s)===d};reactIs_production_min.isLazy=function(s){return v$1(s)===q};reactIs_production_min.isMemo=function(s){return v$1(s)===p};reactIs_production_min.isPortal=function(s){return v$1(s)===c};reactIs_production_min.isProfiler=function(s){return v$1(s)===f};reactIs_production_min.isStrictMode=function(s){return v$1(s)===e};reactIs_production_min.isSuspense=function(s){return v$1(s)===m$1};reactIs_production_min.isSuspenseList=function(s){return v$1(s)===n};reactIs_production_min.isValidElementType=function(s){return typeof s=="string"||typeof s=="function"||s===d||s===f||s===e||s===m$1||s===n||s===t||typeof s=="object"&&s!==null&&(s.$$typeof===q||s.$$typeof===p||s.$$typeof===g||s.$$typeof===h$1||s.$$typeof===l||s.$$typeof===u||s.getModuleId!==void 0)};reactIs_production_min.typeOf=v$1;function createListenerCollection(){const s=getBatch();let a=null,i=null;return{clear(){a=null,i=null},notify(){s(()=>{let o=a;for(;o;)o.callback(),o=o.next})},get(){let o=[],E=a;for(;E;)o.push(E),E=E.next;return o},subscribe(o){let E=!0,j=i={callback:o,next:null,prev:i};return j.prev?j.prev.next=j:a=j,function(){!E||a===null||(E=!1,j.next?j.next.prev=j.prev:i=j.prev,j.prev?j.prev.next=j.next:a=j.next)}}}}const nullListeners={notify(){},get:()=>[]};function createSubscription(s,a){let i,o=nullListeners,E=0,j=!1;function R(D){T();const B=o.subscribe(D);let F=!1;return()=>{F||(F=!0,B(),P())}}function C(){o.notify()}function S(){M.onStateChange&&M.onStateChange()}function _(){return j}function T(){E++,i||(i=s.subscribe(S),o=createListenerCollection())}function P(){E--,i&&E===0&&(i(),i=void 0,o.clear(),o=nullListeners)}function N(){j||(j=!0,T())}function I(){j&&(j=!1,P())}const M={addNestedSub:R,notifyNestedSubs:C,handleChangeWrapper:S,isSubscribed:_,trySubscribe:N,tryUnsubscribe:I,getListeners:()=>o};return M}const canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",useIsomorphicLayoutEffect$1=canUseDOM?reactExports.useLayoutEffect:reactExports.useEffect;function Provider$1({store:s,context:a,children:i,serverState:o,stabilityCheck:E="once",noopCheck:j="once"}){const R=reactExports.useMemo(()=>{const _=createSubscription(s);return{store:s,subscription:_,getServerState:o?()=>o:void 0,stabilityCheck:E,noopCheck:j}},[s,o,E,j]),C=reactExports.useMemo(()=>s.getState(),[s]);useIsomorphicLayoutEffect$1(()=>{const{subscription:_}=R;return _.onStateChange=_.notifyNestedSubs,_.trySubscribe(),C!==s.getState()&&_.notifyNestedSubs(),()=>{_.tryUnsubscribe(),_.onStateChange=void 0}},[R,C]);const S=a||ReactReduxContext;return reactExports.createElement(S.Provider,{value:R},i)}function createStoreHook(s=ReactReduxContext){const a=s===ReactReduxContext?useReduxContext:createReduxContextHook(s);return function(){const{store:o}=a();return o}}const useStore=createStoreHook();function createDispatchHook(s=ReactReduxContext){const a=s===ReactReduxContext?useStore:createStoreHook(s);return function(){return a().dispatch}}const useDispatch=createDispatchHook();initializeUseSelector(withSelectorExports.useSyncExternalStoreWithSelector);setBatch(reactDomExports.unstable_batchedUpdates);function assertIsFunction(s,a=`expected a function, instead received ${typeof s}`){if(typeof s!="function")throw new TypeError(a)}function assertIsObject(s,a=`expected an object, instead received ${typeof s}`){if(typeof s!="object")throw new TypeError(a)}function assertIsArrayOfFunctions(s,a="expected all items to be functions, instead received the following types: "){if(!s.every(i=>typeof i=="function")){const i=s.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${a}[${i}]`)}}var ensureIsArray=s=>Array.isArray(s)?s:[s];function getDependencies(s){const a=Array.isArray(s[0])?s[0]:s;return assertIsArrayOfFunctions(a,"createSelector expects all input-selectors to be functions, but received the following types: "),a}function collectInputSelectorResults(s,a){const i=[],{length:o}=s;for(let E=0;E<o;E++)i.push(s[E].apply(null,a));return i}var StrongRef=class{constructor(s){this.value=s}deref(){return this.value}},Ref=typeof WeakRef<"u"?WeakRef:StrongRef,UNTERMINATED=0,TERMINATED=1;function createCacheNode(){return{s:UNTERMINATED,v:void 0,o:null,p:null}}function weakMapMemoize(s,a={}){let i=createCacheNode();const{resultEqualityCheck:o}=a;let E,j=0;function R(){var P;let C=i;const{length:S}=arguments;for(let N=0,I=S;N<I;N++){const M=arguments[N];if(typeof M=="function"||typeof M=="object"&&M!==null){let D=C.o;D===null&&(C.o=D=new WeakMap);const B=D.get(M);B===void 0?(C=createCacheNode(),D.set(M,C)):C=B}else{let D=C.p;D===null&&(C.p=D=new Map);const B=D.get(M);B===void 0?(C=createCacheNode(),D.set(M,C)):C=B}}const _=C;let T;if(C.s===TERMINATED)T=C.v;else if(T=s.apply(null,arguments),j++,o){const N=((P=E==null?void 0:E.deref)==null?void 0:P.call(E))??E;N!=null&&o(N,T)&&(T=N,j!==0&&j--),E=typeof T=="object"&&T!==null||typeof T=="function"?new Ref(T):T}return _.s=TERMINATED,_.v=T,T}return R.clearCache=()=>{i=createCacheNode(),R.resetResultsCount()},R.resultsCount=()=>j,R.resetResultsCount=()=>{j=0},R}function createSelectorCreator(s,...a){const i=typeof s=="function"?{memoize:s,memoizeOptions:a}:s,o=(...E)=>{let j=0,R=0,C,S={},_=E.pop();typeof _=="object"&&(S=_,_=E.pop()),assertIsFunction(_,`createSelector expects an output function after the inputs, but received: [${typeof _}]`);const T={...i,...S},{memoize:P,memoizeOptions:N=[],argsMemoize:I=weakMapMemoize,argsMemoizeOptions:M=[],devModeChecks:D={}}=T,B=ensureIsArray(N),F=ensureIsArray(M),O=getDependencies(E),L=P(function(){return j++,_.apply(null,arguments)},...B),$=I(function(){R++;const G=collectInputSelectorResults(O,arguments);return C=L.apply(null,G),C},...F);return Object.assign($,{resultFunc:_,memoizedResultFunc:L,dependencies:O,dependencyRecomputations:()=>R,resetDependencyRecomputations:()=>{R=0},lastResult:()=>C,recomputations:()=>j,resetRecomputations:()=>{j=0},memoize:P,argsMemoize:I})};return Object.assign(o,{withTypes:()=>o}),o}var createSelector=createSelectorCreator(weakMapMemoize),createStructuredSelector=Object.assign((s,a=createSelector)=>{assertIsObject(s,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof s}`);const i=Object.keys(s),o=i.map(j=>s[j]);return a(o,(...j)=>j.reduce((R,C,S)=>(R[i[S]]=C,R),{}))},{withTypes:()=>createStructuredSelector}),react=function s(a,i){if(a===i)return!0;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(a.constructor!==i.constructor)return!1;var o,E,j;if(Array.isArray(a)){if(o=a.length,o!=i.length)return!1;for(E=o;E--!==0;)if(!s(a[E],i[E]))return!1;return!0}if(a instanceof Map&&i instanceof Map){if(a.size!==i.size)return!1;for(E of a.entries())if(!i.has(E[0]))return!1;for(E of a.entries())if(!s(E[1],i.get(E[0])))return!1;return!0}if(a instanceof Set&&i instanceof Set){if(a.size!==i.size)return!1;for(E of a.entries())if(!i.has(E[0]))return!1;return!0}if(ArrayBuffer.isView(a)&&ArrayBuffer.isView(i)){if(o=a.length,o!=i.length)return!1;for(E=o;E--!==0;)if(a[E]!==i[E])return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===i.toString();if(j=Object.keys(a),o=j.length,o!==Object.keys(i).length)return!1;for(E=o;E--!==0;)if(!Object.prototype.hasOwnProperty.call(i,j[E]))return!1;for(E=o;E--!==0;){var R=j[E];if(!(R==="_owner"&&a.$$typeof)&&!s(a[R],i[R]))return!1}return!0}return a!==a&&i!==i};const equal=getDefaultExportFromCjs(react),state=s=>s.app;function optimizeChangesFiles(s){const a=[];if(!(s!=null&&s.files))return[];for(const i of s==null?void 0:s.files){let o=!1;for(let E=0;E<a.length;E++)if(a[E].audit===i.audit.id&&a[E].file===i.file){o=!0,a[E].changes.push(i.value),a[E].changed=a[E].changes[0]!==a[E].changes[a[E].changes.length-1];break}o||a.push({audit:i.audit.id,file:i.file,changes:[i.value],changed:!1})}return a}const optimizerData=createSelector(state,s=>{var M;const a=s.report[s.activeReport],i=s.settings.performance[s.activeReport],o=s.settings.general.performance_gear,E=s.settings.actions,j=s.settings.general.test_mode,R=s.cdnUsage,C=s.imageUsage,S=s.cacheUsage,_=s.license,T=s.homePerformance,P=s.cssStatus,N=s.diagnosticResults,I=s.diagnosticProgress;return{...a,activeReport:s.activeReport,settings:i.state,settingsOriginal:i.original,settingsLoading:i.loading,actions:E,activeGear:o,testMode:j,cdnUsage:R,imageUsage:C,cacheUsage:S,license:_,homePerformance:T,cssStatus:P,diagnosticResults:N,diagnosticProgress:I,touched:!equal(i.original,i.state)||!!optimizeChangesFiles(a.changes).find(D=>D==null?void 0:D.changed),fresh:(M=a==null?void 0:a.state)==null?void 0:M.fresh,reanalyze:a.data!==null&&a.loading}}),useCommonDispatch=()=>{const s=useDispatch(),a=useSelector(o=>o.common[o.app.activeReport]),i=useSelector(o=>o.common);return{dispatch:s,common:a,...a,...i}},SET_STATE="SET_STATE",SET_ROOT_STATE="SET_ROOT_STATE",setCommonState=(s,a)=>async(i,o)=>{const E=o().app.activeReport;i({type:SET_STATE,payload:{activeReport:E,key:s,value:a}})},setCommonRootState=(s,a)=>async(i,o)=>{i({type:SET_ROOT_STATE,payload:{key:s,value:a}})},AppContext=reactExports.createContext(null),AppProvider=({children:s,initShowOptimizerValue:a,global:i,mode:o,modeData:E})=>{document.getElementById("wpadminbar");const[j,R]=reactExports.useState(!1),[C,S]=reactExports.useState(!1),[_,T]=reactExports.useState(!1);reactExports.useState(!1);const[P,N]=reactExports.useState([]),[I,M]=reactExports.useState({optimizer_url:"https://rapidload.io/",ajax_url:"http://rapidload.local/wp-admin/admin-ajax.php",page_optimizer_base:"",page_optimizer_package_base:"",plugin_url:"",nonce:"",timezone:"UTC",actions:[],load_optimizer:!1,rapidload_version:"2.2.0",rest_url:"https://rapidload.local/wp-json/rapidload/v1",rapidload_titan_gear:"turboMax",db_to_be_updated:"",rapidload_license_data:"",...window.rapidload_optimizer?window.rapidload_optimizer:{}}),[D,B]=reactExports.useState({active_modules:{general:{options:{uucss_excluded_links:[],rapidload_minify_html:!1,uucss_query_string:!1,preload_internal_links:!1,uucss_enable_debug:!1,uucss_jobs_per_queue:0,uucss_queue_interval:0,uucss_disable_add_to_queue:!1,uucss_disable_add_to_re_queue:!1}}},...window.uucss_global?window.uucss_global:{}});reactExports.useState("desktop");const[F,O]=reactExports.useState(!1),[L,$]=reactExports.useState(!0),V=reactExports.useRef(null),[G,K]=reactExports.useState(!1),{dispatch:J}=useCommonDispatch();reactExports.useEffect(()=>{const le=ce=>{const{detail:pe}=ce;typeof(pe==null?void 0:pe.status)!==void 0&&R((pe==null?void 0:pe.status)||!1)};window.addEventListener("rapidLoad:set-optimizer",le),T(!0),o&&J(setCommonRootState("mode",o)),E&&J(setCommonRootState("modeData",E));const ue=new CustomEvent("rapidLoad:optimizer-mounted");return window.dispatchEvent(ue),()=>{window.removeEventListener("rapidLoad:set-optimizer",le)}},[]),reactExports.useEffect(()=>{j?document.documentElement.classList.add("rapidload-optimizer-open"):document.documentElement.classList.remove("rapidload-optimizer-open")},[j]);const ne=le=>{le?R(le):requestAnimationFrame(()=>{R(le)})};return jsxRuntimeExports.jsx(AppContext.Provider,{value:{showOptimizer:j,setShowOptimizer:ne,options:I,uucssGlobal:D,openAudits:P,setOpenAudits:N,version:"1.4.1",mode:o,modeData:E,manipulatingStyles:C,global:i,togglePerformance:L,setTogglePerformance:$,savingData:F,setSavingData:O,optimizerContainer:V,invalidatingCache:G,setInvalidatingCache:K},children:s})},useAppContext=()=>{const s=reactExports.useContext(AppContext);if(s===null)throw new Error("useAppContext must be used within an AppProvider");return s};function Skeleton({className:s,...a}){return jsxRuntimeExports.jsx("div",{className:cn("animate-pulse rounded-md bg-primary/10",s),...a})}const Card=reactExports.forwardRef(({children:s,className:a,spreader:i=!1,...o},E)=>jsxRuntimeExports.jsxs("div",{...o,ref:E,className:"w-full relative",children:[jsxRuntimeExports.jsx("div",{className:cn("w-full dark:bg-brand-800 bg-brand-0 rounded-3xl",i?"relative mb-0 z-10":"",a),children:s}),i&&jsxRuntimeExports.jsxs("div",{className:cn("absolute w-full -bottom-1 z-[1] transition-opacity duration-500 delay-500"),children:[jsxRuntimeExports.jsx("div",{className:"rounded-3xl h-10 dark:border-brand-700 mx-1.5 bg-brand-400 dark:bg-brand-900 opacity-50"}),jsxRuntimeExports.jsx("div",{className:"absolute w-full -bottom-1 z-[-1]",children:jsxRuntimeExports.jsx("div",{className:"rounded-3xl h-5 dark:border-brand-700 mx-5 bg-brand-400 dark:bg-brand-900 opacity-20"})})]})]}));/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var extendStatics=function(s,a){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,o){i.__proto__=o}||function(i,o){for(var E in o)o.hasOwnProperty(E)&&(i[E]=o[E])},extendStatics(s,a)};function __extends(s,a){extendStatics(s,a);function i(){this.constructor=s}s.prototype=a===null?Object.create(a):(i.prototype=a.prototype,new i)}var __assign=function(){return __assign=Object.assign||function(a){for(var i,o=1,E=arguments.length;o<E;o++){i=arguments[o];for(var j in i)Object.prototype.hasOwnProperty.call(i,j)&&(a[j]=i[j])}return a},__assign.apply(this,arguments)};function __rest(s,a){var i={};for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&a.indexOf(o)<0&&(i[o]=s[o]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var E=0,o=Object.getOwnPropertySymbols(s);E<o.length;E++)a.indexOf(o[E])<0&&(i[o[E]]=s[o[E]]);return i}var VIEWBOX_WIDTH=100,VIEWBOX_HEIGHT=100,VIEWBOX_HEIGHT_HALF=50,VIEWBOX_CENTER_X=50,VIEWBOX_CENTER_Y=50;function Path(s){var a=s.className,i=s.counterClockwise,o=s.dashRatio,E=s.pathRadius,j=s.strokeWidth,R=s.style;return reactExports.createElement("path",{className:a,style:Object.assign({},R,getDashStyle({pathRadius:E,dashRatio:o,counterClockwise:i})),d:getPathDescription({pathRadius:E,counterClockwise:i}),strokeWidth:j,fillOpacity:0})}function getPathDescription(s){var a=s.pathRadius,i=s.counterClockwise,o=a,E=i?1:0;return`
      M `+VIEWBOX_CENTER_X+","+VIEWBOX_CENTER_Y+`
      m 0,-`+o+`
      a `+o+","+o+" "+E+" 1 1 0,"+2*o+`
      a `+o+","+o+" "+E+" 1 1 0,-"+2*o+`
    `}function getDashStyle(s){var a=s.counterClockwise,i=s.dashRatio,o=s.pathRadius,E=Math.PI*2*o,j=(1-i)*E;return{strokeDasharray:E+"px "+E+"px",strokeDashoffset:(a?-j:j)+"px"}}var CircularProgressbar=function(s){__extends(a,s);function a(){return s!==null&&s.apply(this,arguments)||this}return a.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},a.prototype.getPathRadius=function(){return VIEWBOX_HEIGHT_HALF-this.props.strokeWidth/2-this.getBackgroundPadding()},a.prototype.getPathRatio=function(){var i=this.props,o=i.value,E=i.minValue,j=i.maxValue,R=Math.min(Math.max(o,E),j);return(R-E)/(j-E)},a.prototype.render=function(){var i=this.props,o=i.circleRatio,E=i.className,j=i.classes,R=i.counterClockwise,C=i.styles,S=i.strokeWidth,_=i.text,T=this.getPathRadius(),P=this.getPathRatio();return reactExports.createElement("svg",{className:j.root+" "+E,style:C.root,viewBox:"0 0 "+VIEWBOX_WIDTH+" "+VIEWBOX_HEIGHT,"data-test-id":"CircularProgressbar"},this.props.background?reactExports.createElement("circle",{className:j.background,style:C.background,cx:VIEWBOX_CENTER_X,cy:VIEWBOX_CENTER_Y,r:VIEWBOX_HEIGHT_HALF}):null,reactExports.createElement(Path,{className:j.trail,counterClockwise:R,dashRatio:o,pathRadius:T,strokeWidth:S,style:C.trail}),reactExports.createElement(Path,{className:j.path,counterClockwise:R,dashRatio:P*o,pathRadius:T,strokeWidth:S,style:C.path}),_?reactExports.createElement("text",{className:j.text,style:C.text,x:VIEWBOX_CENTER_X,y:VIEWBOX_CENTER_Y},_):null)},a.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},a}(reactExports.Component);function CircularProgressbarWithChildren(s){s.children;var a=__rest(s,["children"]);return reactExports.createElement("div",{"data-test-id":"CircularProgressbarWithChildren"},reactExports.createElement("div",{style:{position:"relative",width:"100%",height:"100%"}},reactExports.createElement(CircularProgressbar,__assign({},a)),s.children?reactExports.createElement("div",{"data-test-id":"CircularProgressbarWithChildren__children",style:{position:"absolute",width:"100%",height:"100%",marginTop:"-100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},s.children):null))}function buildStyles(s){var a=s.rotation,i=s.strokeLinecap,o=s.textColor,E=s.textSize,j=s.pathColor,R=s.pathTransition,C=s.pathTransitionDuration,S=s.trailColor,_=s.backgroundColor,T=a==null?void 0:"rotate("+a+"turn)",P=a==null?void 0:"center center";return{root:{},path:removeUndefinedValues({stroke:j,strokeLinecap:i,transform:T,transformOrigin:P,transition:R,transitionDuration:C==null?void 0:C+"s"}),trail:removeUndefinedValues({stroke:S,strokeLinecap:i,transform:T,transformOrigin:P}),text:removeUndefinedValues({fill:o,fontSize:E}),background:removeUndefinedValues({fill:_})}}function removeUndefinedValues(s){return Object.keys(s).forEach(function(a){s[a]==null&&delete s[a]}),s}const usePerformanceColors=s=>{const[a,i]=reactExports.useState("fail"),[o,E]=reactExports.useState("transparent"),[j,R]=reactExports.useState("transparent"),C=reactExports.useCallback((S=null)=>{const T=S||s;return!T||T<50?(E("#ff4e43"),R(`rgb(255, 51, 51, ${.08} )`),i("fail")):T<90?(E("#FFAA33"),R(`rgb(255, 170, 51, ${.08})`),i("average")):T<101?(E("#09B42F"),R(`rgb(9, 180, 4, ${.08})`),i("pass")):T<110&&(E("#c1c1c1"),R(`rgb(9, 180, 4, ${.08})`),i("pass")),[a,o,j]},[s]);return reactExports.useEffect(()=>{C()},[]),reactExports.useEffect(()=>{C()},[s]),[a,o,j,C]},messages=["Initiating analysis","Fetching assets","Running PageSpeed Insights","Analyzing performance","Evaluating metrics","Compiling results","Almost done"],PerformanceProgressBar=({performance:s,className:a,scoreClassName:i,background:o=!0,stroke:E=4,children:j,animate:R=!0,loading:C=!1})=>{const[S,_]=reactExports.useState(R?0:s||0),[T,P]=reactExports.useState(-1),[N,I,M]=usePerformanceColors(s),D=reactExports.useCallback(()=>{if(s&&R){let O=0;const L=setInterval(()=>{O+=1,O<=s?_(O):clearInterval(L)},10);return()=>clearInterval(L)}},[s,R]),B=reactExports.useCallback(()=>{if(C){P(0);const O=setInterval(()=>{P(L=>L>=messages.length-1?0:L+1)},7e3);return()=>clearInterval(O)}else P(-1)},[C]);reactExports.useEffect(D,[D]),reactExports.useEffect(B,[B]);const F=reactExports.useMemo(()=>buildStyles({pathColor:I,trailColor:o?"transparent":M,pathTransitionDuration:.5,strokeLinecap:"round",backgroundColor:M}),[I,o,M]);return jsxRuntimeExports.jsx(CircularProgressbarWithChildren,{strokeWidth:E,background:o,className:cn("max-h-[176px] relative w-full align-middle",a,C&&"animate-spin"),styles:F,value:C?85:S,children:jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,children:jsxRuntimeExports.jsxs("div",{style:{color:I},className:cn("w-full flex flex-col items-center text-center text-4xl transition-all ease-out duration-300 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 font-bold",i,j&&"gap-1",C&&"gap-2"),children:[!C&&jsxRuntimeExports.jsx("span",{children:S.toFixed(0)}),jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:C&&T!==-1&&jsxRuntimeExports.jsx(m$3.span,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3,ease:[.4,0,.2,1]},className:cn("text-xs font-normal px-6"),children:C&&messages[T]},T)}),j&&jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"h-0",children:j},"children")]})})})},PerformanceProgressBar$1=React8.memo(PerformanceProgressBar);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const toKebabCase=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mergeClasses=(...s)=>s.filter((a,i,o)=>!!a&&o.indexOf(a)===i).join(" ");/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var defaultAttributes={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"};/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Icon=reactExports.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:E="",children:j,iconNode:R,...C},S)=>reactExports.createElement("svg",{ref:S,...defaultAttributes,width:a,height:a,stroke:s,strokeWidth:o?Number(i)*24/Number(a):i,className:mergeClasses("lucide",E),...C},[...R.map(([_,T])=>reactExports.createElement(_,T)),...Array.isArray(j)?j:[j]]));/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const createLucideIcon=(s,a)=>{const i=reactExports.forwardRef(({className:o,...E},j)=>reactExports.createElement(Icon,{ref:j,iconNode:a,className:mergeClasses(`lucide-${toKebabCase(s)}`,o),...E}));return i.displayName=`${s}`,i};/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Annoyed=createLucideIcon("Annoyed",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 15h8",key:"45n4r"}],["path",{d:"M8 9h2",key:"1g203m"}],["path",{d:"M14 9h2",key:"116p9w"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Archive=createLucideIcon("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ArrowLeftToLine=createLucideIcon("ArrowLeftToLine",[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ArrowRightToLine=createLucideIcon("ArrowRightToLine",[["path",{d:"M17 12H3",key:"8awo09"}],["path",{d:"m11 18 6-6-6-6",key:"8c2y43"}],["path",{d:"M21 5v14",key:"nzette"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ArrowRight=createLucideIcon("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BookOpen=createLucideIcon("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Check=createLucideIcon("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ChevronDown=createLucideIcon("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ChevronLeft=createLucideIcon("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ChevronRight=createLucideIcon("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CircleCheckBig=createLucideIcon("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CircleDashed=createLucideIcon("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CircleGauge=createLucideIcon("CircleGauge",[["path",{d:"M15.6 2.7a10 10 0 1 0 5.7 5.7",key:"1e0p6d"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M13.4 10.6 19 5",key:"1kr7tw"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CircleUser=createLucideIcon("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CircleX=createLucideIcon("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Circle=createLucideIcon("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Clipboard=createLucideIcon("Clipboard",[["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"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Code=createLucideIcon("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cpu=createLucideIcon("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dot=createLucideIcon("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Download=createLucideIcon("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"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const EllipsisVertical=createLucideIcon("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eye=createLucideIcon("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FileCode2=createLucideIcon("FileCode2",[["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:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FileMinus2=createLucideIcon("FileMinus2",[["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 15h6",key:"4e2qda"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FileType=createLucideIcon("FileType",[["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:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FoldVertical=createLucideIcon("FoldVertical",[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3-3-3 3",key:"e37ymu"}],["path",{d:"m15 5-3 3-3-3",key:"19d6lf"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Frown=createLucideIcon("Frown",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 16s-1.5-2-4-2-4 2-4 2",key:"epbg0q"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hash=createLucideIcon("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Headset=createLucideIcon("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hourglass=createLucideIcon("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Info$1=createLucideIcon("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LayoutDashboard=createLucideIcon("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"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LoaderCircle=createLucideIcon("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Loader=createLucideIcon("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lock=createLucideIcon("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"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Meh=createLucideIcon("Meh",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"8",x2:"16",y1:"15",y2:"15",key:"1xb1d9"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MessagesSquare=createLucideIcon("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Microscope=createLucideIcon("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Monitor=createLucideIcon("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Moon=createLucideIcon("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MousePointerClick=createLucideIcon("MousePointerClick",[["path",{d:"m9 9 5 12 1.8-5.2L21 14Z",key:"1b76lo"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PaintRoller=createLucideIcon("PaintRoller",[["rect",{width:"16",height:"6",x:"2",y:"2",rx:"2",key:"jcyz7m"}],["path",{d:"M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2",key:"1b9h7c"}],["rect",{width:"4",height:"6",x:"8",y:"16",rx:"1",key:"d6e7yl"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PanelLeftClose=createLucideIcon("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PanelRightClose=createLucideIcon("PanelRightClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Plug=createLucideIcon("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RefreshCcw=createLucideIcon("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RefreshCw=createLucideIcon("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"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RemoveFormatting=createLucideIcon("RemoveFormatting",[["path",{d:"M4 7V4h16v3",key:"9msm58"}],["path",{d:"M5 20h6",key:"1h6pxn"}],["path",{d:"M13 4 8 20",key:"kqq6aj"}],["path",{d:"m15 15 5 5",key:"me55sn"}],["path",{d:"m20 15-5 5",key:"11p7ol"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RotateCw=createLucideIcon("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Save=createLucideIcon("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const SmilePlus=createLucideIcon("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Smile=createLucideIcon("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sparkles=createLucideIcon("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sun=createLucideIcon("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ThumbsDown=createLucideIcon("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ThumbsUp=createLucideIcon("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Timer=createLucideIcon("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Undo2=createLucideIcon("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
 * @license lucide-react v0.417.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X=createLucideIcon("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Metrics$1=({metrics:s=[],performance:a})=>{const i=["First Contentful Paint","Largest Contentful Paint","Total Blocking Time","Cumulative Layout Shift","Speed Index"],o=s.sort((S,_)=>i.indexOf(S.title)-i.indexOf(_.title)),{dispatch:E,activeMetric:j,hoveredMetric:R}=useCommonDispatch(),{optimizerContainer:C}=useAppContext();return reactExports.useEffect(()=>{var S;j&&((S=C.current)==null||S.scrollIntoView({behavior:"smooth"}))},[j]),jsxRuntimeExports.jsx("div",{className:"w-full lg:flex flex-col lg:grid-cols-none grid grid-cols-2 grid-rows-3",children:o.sort((S,_)=>_.potentialGain-S.potentialGain).map((S,_)=>jsxRuntimeExports.jsxs("div",{onClick:T=>{E(setCommonState("activeMetric",S))},onMouseEnter:()=>{const T=setTimeout(()=>{E(setCommonState("hoveredMetric",S))},100);return()=>clearTimeout(T)},onMouseLeave:()=>{const T=setTimeout(()=>{E(setCommonState("hoveredMetric",null))},100);return()=>clearTimeout(T)},className:cn("lg:last:rounded-b-3xl select-none cursor-pointer dark:hover:bg-brand-900/50 hover:bg-brand-100/50 group flex flex-row justify-between items-center last:border-b-0 border-b lg:border-b-0 lg:border-t lg:even:border-l-0 even:border-l px-3 lg:px-6 py-2.5",S.id===(j==null?void 0:j.id)&&"bg-brand-100/80 dark:bg-brand-900/80 "),children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col justify-between",children:[jsxRuntimeExports.jsx("div",{className:"flex items-center gap-1.5 flex-row text-sm font-medium",children:jsxRuntimeExports.jsxs("div",{className:"inline-flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:S.title}),jsxRuntimeExports.jsx("span",{className:"text-xs text-brand-500 font-normal",children:S.potentialGain>1?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Enhance this for ",jsxRuntimeExports.jsxs("span",{className:"group-hover:text-green-600",children:[S.potentialGain.toFixed(0)," point boost."]})," "]}):"Looks great, well done!"})]})}),jsxRuntimeExports.jsx("div",{style:{color:usePerformanceColors(S.score)[1]},className:"text-lg font-medium text-brand-500",children:S.displayValue})]}),jsxRuntimeExports.jsx("div",{className:"hidden xl:block",children:(R==null?void 0:R.id)===S.id?jsxRuntimeExports.jsx("div",{className:cn("flex items-center justify-center w-[36px] h-[36px] rounded-full bg-brand-200 dark:bg-brand-800"),children:jsxRuntimeExports.jsx(ArrowRight,{className:"w-4"})}):jsxRuntimeExports.jsx("div",{className:cn(""),children:jsxRuntimeExports.jsx(PerformanceProgressBar$1,{background:!1,stroke:10,scoreClassName:"text-[12px]",className:"h-9",performance:S.score})})})]},_))})};function r(s){var a,i,o="";if(typeof s=="string"||typeof s=="number")o+=s;else if(typeof s=="object")if(Array.isArray(s))for(a=0;a<s.length;a++)s[a]&&(i=r(s[a]))&&(o&&(o+=" "),o+=i);else for(a in s)s[a]&&(o&&(o+=" "),o+=a);return o}function clsx(){for(var s,a,i=0,o="";i<arguments.length;)(s=arguments[i++])&&(a=r(s))&&(o&&(o+=" "),o+=a);return o}const falsyToString=s=>typeof s=="boolean"?"".concat(s):s===0?"0":s,cx=clsx,cva=(s,a)=>i=>{var o;if((a==null?void 0:a.variants)==null)return cx(s,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:E,defaultVariants:j}=a,R=Object.keys(E).map(_=>{const T=i==null?void 0:i[_],P=j==null?void 0:j[_];if(T===null)return null;const N=falsyToString(T)||falsyToString(P);return E[_][N]}),C=i&&Object.entries(i).reduce((_,T)=>{let[P,N]=T;return N===void 0||(_[P]=N),_},{}),S=a==null||(o=a.compoundVariants)===null||o===void 0?void 0:o.reduce((_,T)=>{let{class:P,className:N,...I}=T;return Object.entries(I).every(M=>{let[D,B]=M;return Array.isArray(B)?B.includes({...j,...C}[D]):{...j,...C}[D]===B})?[..._,P,N]:_},[]);return cx(s,R,S,i==null?void 0:i.class,i==null?void 0:i.className)},SlideLeft=({children:s,uuid:a})=>jsxRuntimeExports.jsx(m$3.div,{className:"overflow-hidden",initial:{opacity:0,x:-10,width:0},animate:{opacity:1,x:0,width:"fit-content"},exit:{opacity:0,x:-10,width:0},transition:{duration:.05},children:s},a),buttonVariants=cva("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground dark:bg-accent dark:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=reactExports.forwardRef(({loading:s,children:a,className:i,variant:o,size:E,asChild:j=!1,...R},C)=>{const S=j?"div":"button";return jsxRuntimeExports.jsxs(S,{className:cn(buttonVariants({variant:o,size:E,className:i})),ref:C,...R,children:[jsxRuntimeExports.jsx(AnimatePresence,{children:s&&jsxRuntimeExports.jsx(SlideLeft,{uuid:JSON.stringify(R),children:jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin "})})}),a]})});Button.displayName="Button";const AppButton=({children:s,className:a,...i})=>jsxRuntimeExports.jsx(Button,{className:cn(a,"flex gap-2 cursor-pointer"),asChild:!0,...i,children:s}),TOAST_LIMIT=1,TOAST_REMOVE_DELAY=1e6;let count=0;function genId(){return count=(count+1)%Number.MAX_VALUE,count.toString()}const toastTimeouts=new Map,addToRemoveQueue=s=>{if(toastTimeouts.has(s))return;const a=setTimeout(()=>{toastTimeouts.delete(s),dispatch({type:"REMOVE_TOAST",toastId:s})},TOAST_REMOVE_DELAY);toastTimeouts.set(s,a)},reducer=(s,a)=>{switch(a.type){case"ADD_TOAST":return{...s,toasts:[a.toast,...s.toasts].slice(0,TOAST_LIMIT)};case"UPDATE_TOAST":return{...s,toasts:s.toasts.map(i=>i.id===a.toast.id?{...i,...a.toast}:i)};case"DISMISS_TOAST":{const{toastId:i}=a;return i?addToRemoveQueue(i):s.toasts.forEach(o=>{addToRemoveQueue(o.id)}),{...s,toasts:s.toasts.map(o=>o.id===i||i===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return a.toastId===void 0?{...s,toasts:[]}:{...s,toasts:s.toasts.filter(i=>i.id!==a.toastId)}}},listeners=[];let memoryState={toasts:[]};function dispatch(s){memoryState=reducer(memoryState,s),listeners.forEach(a=>{a(memoryState)})}function toast({...s},a=3e3){const i=genId(),o=j=>dispatch({type:"UPDATE_TOAST",toast:{...j,id:i}}),E=()=>dispatch({type:"DISMISS_TOAST",toastId:i});return dispatch({type:"ADD_TOAST",toast:{...s,id:i,open:!0,duration:a,onOpenChange:j=>{j||E()}}}),{id:i,dismiss:E,update:o}}function useToast(){const[s,a]=reactExports.useState(memoryState);return reactExports.useEffect(()=>(listeners.push(a),()=>{const i=listeners.indexOf(a);i>-1&&listeners.splice(i,1)}),[s]),{...s,toast,dismiss:i=>dispatch({type:"DISMISS_TOAST",toastId:i})}}let icons={clear_cache:jsxRuntimeExports.jsx(Archive,{className:"w-3.5"}),clear_page_cache:jsxRuntimeExports.jsx(FileMinus2,{className:"w-5"}),clear_all_optimizations:jsxRuntimeExports.jsx(FileCode2,{className:"w-3.5"}),clear_css_optimizations:jsxRuntimeExports.jsx(FileType,{className:"w-3.5"}),clear_js_optimizations:jsxRuntimeExports.jsx(Code,{className:"w-3.5"}),clear_font_optimizations:jsxRuntimeExports.jsx(RemoveFormatting,{className:"w-3.5"}),default:jsxRuntimeExports.jsx(RefreshCw,{className:"w-3.5"})};const RapidLoadActions=()=>{const{actions:s,settings:a}=useSelector(optimizerData);useAppContext();let[i,o]=reactExports.useState(s.map(j=>({...j,loading:!1})));reactExports.useEffect(()=>{o(s.map(j=>({...j,loading:!1})))},[s]);const E=async j=>{try{o(C=>C.map(S=>S.control_icon===j.control_icon?{...S,loading:!0}:S));let R=await fetch(j.action.replace(/&amp;/g,"&"));toast({duration:10,description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center items-center",children:["Successfully completed ",jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-5 text-green-600"})," "]})})}catch(R){toast({duration:10,description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center items-center",children:["An error occurred - ",R==null?void 0:R.message," ",jsxRuntimeExports.jsx(CircleX,{className:"w-5 text-red-600"})," "]})}),console.error(R)}o(R=>R.map(C=>C.control_icon===j.control_icon?{...C,loading:!1}:C))};return s?jsxRuntimeExports.jsx("div",{className:"items-center justify-center flex py-1",children:i.filter(j=>j.category==="general").map(j=>jsxRuntimeExports.jsx(AppButton,{disabled:j.loading,onClick:R=>E(j),className:"rounded-[15px] h-12 px-3 dark:bg-brand-800 dark:hover:bg-brand-950",variant:"ghost",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[j.loading?jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(Loader,{className:"motion-safe:animate-spin w-4"})}):icons[j.control_icon]||icons.default,jsxRuntimeExports.jsx("span",{className:"text-xxs font-normal text-brand-500",children:j.control_label})]})},j.control_icon))}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},tourPromptKey="titan-tour-prompt",SideBarActions=()=>{useRootContext();const[s,a]=reactExports.useState(()=>{const _=localStorage.getItem(tourPromptKey);return _?JSON.parse(_):!0}),{data:i,error:o,loading:E,revisions:j}=useSelector(optimizerData),{dispatch:R,hoveredMetric:C,activeMetric:S}=useCommonDispatch();return reactExports.useEffect(()=>{localStorage.setItem(tourPromptKey,JSON.stringify(s))},[s]),jsxRuntimeExports.jsxs(Card,{className:"flex items-center justify-center py-2 rounded-xl",children:[(i==null?void 0:i.loadingExperience)&&!S&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(AppButton,{"data-tour":"documentation",onClick:()=>{window.open("https://docs.rapidload.io/","_blank")},className:"transition-none h-12 px-3 rounded-2xl border-none dark:bg-brand-800 hover:dark:bg-brand-950",variant:"outline",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[jsxRuntimeExports.jsx(BookOpen,{className:cn("w-5")}),jsxRuntimeExports.jsx("span",{className:"text-xxs font-normal text-brand-500",children:"Documentation"})]})})}),jsxRuntimeExports.jsx(RapidLoadActions,{})]})};function formatProdErrorMessage$2(s){return"Minified Redux error #"+s+"; visit https://redux.js.org/Errors?code="+s+" for the full message or use the non-minified dev environment for full errors. "}var randomString$1=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes$1={INIT:"@@redux/INIT"+randomString$1(),REPLACE:"@@redux/REPLACE"+randomString$1(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString$1()}};function assertReducerShape$1(s){Object.keys(s).forEach(function(a){var i=s[a],o=i(void 0,{type:ActionTypes$1.INIT});if(typeof o>"u")throw new Error(formatProdErrorMessage$2(12));if(typeof i(void 0,{type:ActionTypes$1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(formatProdErrorMessage$2(13))})}function combineReducers$1(s){for(var a=Object.keys(s),i={},o=0;o<a.length;o++){var E=a[o];typeof s[E]=="function"&&(i[E]=s[E])}var j=Object.keys(i),R;try{assertReducerShape$1(i)}catch(C){R=C}return function(S,_){if(S===void 0&&(S={}),R)throw R;for(var T=!1,P={},N=0;N<j.length;N++){var I=j[N],M=i[I],D=S[I],B=M(D,_);if(typeof B>"u")throw _&&_.type,new Error(formatProdErrorMessage$2(14));P[I]=B,T=T||B!==D}return T=T||j.length!==Object.keys(S).length,T?P:S}}const FETCH_REPORT_REQUEST="FETCH_REPORT_REQUEST",FETCH_REPORT_SUCCESS="FETCH_REPORT_SUCCESS",FETCH_REPORT_FAILURE="FETCH_REPORT_FAILURE",FETCH_SETTING_REQUEST="FETCH_SETTING_REQUEST",FETCH_SETTING_SUCCESS="FETCH_SETTING_SUCCESS",FETCH_SETTING_FAILURE="FETCH_SETTING_FAILURE",UPDATE_SETTINGS="UPDATE_SETTINGS",CHANGE_GEAR="CHANGE_GEAR",CHANGE_REPORT_TYPE="CHANGE_REPORT_TYPE",UPDATE_FILE_ACTION="UPDATE_FILE_ACTION",GET_CSS_STATUS_SUCCESS="GET_CSS_STATUS_SUCCESS",UPDATE_TEST_MODE="UPDATE_TEST_MODE",UPDATE_OPTIMIZE_TABLE="UPDATE_OPTIMIZE_TABLE",FETCH_POSTS="FETCH_POSTS",GET_CDN_USAGE="GET_CDN_USAGE",GET_IMAGE_USAGE="GET_IMAGE_USAGE",GET_CACHE_USAGE="GET_CACHE_USAGE",LICENSE_INFORMATION="LICENSE_INFORMATION",HOME_PAGE_PERFORMANCE="HOME_PAGE_PERFORMANCE",SET_DIAGNOSTIC_RESULTS="SET_DIAGNOSTIC_RESULTS",SET_DIAGNOSTIC_PROGRESS="SET_DIAGNOSTIC_PROGRESS",blankReport={original:null,changes:{files:[]},data:null,error:null,loading:!1,settings:[],originalSettings:[],revisions:[],state:{}},initialState$2={activeReport:"desktop",cssStatus:null,testMode:null,optimizationData:[],allPosts:null,diagnosticResults:null,diagnosticProgress:{currentStep:0,isFlushingProgress:0,settingsProgress:0,serverInfoProgress:0,pageSpeedProgress:0,diagnosticsProgress:0},report:{mobile:blankReport,desktop:blankReport},settings:{performance:{mobile:{original:[],state:[],error:null,loading:!1},desktop:{original:[],state:[],error:null,loading:!1}},general:{test_mode:!1,performance_gear:null},actions:[]},cdnUsage:{additional_usage_gb:0,allowed_gb:0,used_gb:0,cdn_url:"",origin:"",zone_id:""},imageUsage:{additional_usage_gb:0,allowed_gb:0,used_gb:0,host:""},cacheUsage:null,license:null,homePerformance:{first_entry:0,last_entry:0,first_response_time:"0ms",last_response_time:"0ms"}},appReducer=(s=initialState$2,a)=>{switch(a.type){case SET_DIAGNOSTIC_PROGRESS:return{...s,diagnosticProgress:{...s.diagnosticProgress,...a.payload}};case SET_DIAGNOSTIC_RESULTS:return{...s,diagnosticResults:a.payload};case HOME_PAGE_PERFORMANCE:return{...s,homePerformance:a.payload};case LICENSE_INFORMATION:return{...s,license:a.payload};case GET_CDN_USAGE:return{...s,cdnUsage:a.payload};case GET_IMAGE_USAGE:return{...s,imageUsage:a.payload};case GET_CACHE_USAGE:return{...s,cacheUsage:a.payload};case FETCH_POSTS:return{...s,allPosts:a.payload};case UPDATE_OPTIMIZE_TABLE:return{...s,optimizationData:a.payload};case GET_CSS_STATUS_SUCCESS:return{...s,cssStatus:a.payload};case UPDATE_TEST_MODE:return{...s,testMode:a.payload,settings:{...s.settings,general:{...s.settings.general,test_mode:a.payload.status}}};case FETCH_REPORT_REQUEST:return{...s,report:{...s.report,[s.activeReport]:{...s.report[s.activeReport],loading:!0,error:null}}};case FETCH_REPORT_SUCCESS:return{...s,report:{...s.report,[a.payload.activeReport]:{...s.report[a.payload.activeReport],data:a.payload.data.data,error:null,loading:!1,revisions:a.payload.data.revisions}}};case FETCH_REPORT_FAILURE:return{...s,report:{...s.report,[s.activeReport]:{error:a.error,loading:!1}}};case FETCH_SETTING_REQUEST:return{...s,settings:{...s.settings,performance:{...s.settings.performance,[s.activeReport]:{...s.settings.performance[s.activeReport],loading:!0,error:null}}}};case FETCH_SETTING_SUCCESS:return{...s,settings:{...s.settings,general:a.payload.data.general,actions:a.payload.data.actions,performance:{...s.settings.performance,[a.payload.activeReport]:{...s.settings.performance[a.payload.activeReport],original:JSON.parse(JSON.stringify(a.payload.data.data)),state:a.payload.data.data,error:null,loading:!1}}}};case FETCH_SETTING_FAILURE:return{...s,settings:{...s.settings,performance:{...s.settings.performance,[s.activeReport]:{error:a.error,loading:!1}}}};case UPDATE_SETTINGS:return{...s,settings:{...s.settings,performance:{...s.settings.performance,[s.activeReport]:{...s.settings.performance[s.activeReport],state:a.payload.settings}}}};case CHANGE_GEAR:return{...s,settings:{...s.settings,general:{...s.settings.general,performance_gear:a.payload.mode},performance:{...s.settings.performance,[s.activeReport]:{...s.settings.performance[s.activeReport],state:a.payload.settings}}}};case CHANGE_REPORT_TYPE:return{...s,activeReport:a.reportType};case UPDATE_FILE_ACTION:const{payload:i}=a,o=s.report[s.activeReport];return o.changes.files.filter(j=>j.file===i.file).length==0&&o.changes.files.push({...i,value:i.prev}),o.changes.files.push(i),o.data&&(o.data.audits=o.data.audits.map(j=>{if(j.files&&j.files.items&&(j.files.type==="table"||j.files.type==="opportunity")){const R=C=>C.url&&typeof C.url=="object"&&C.action&&C.url.url===i.file?{...C,action:{...C.action,value:i.value}}:C;j.files.items=j.files.items.map(R),j.files.grouped_items&&(j.files.grouped_items=j.files.grouped_items.map(C=>({...C,items:C.items.map(R)})))}return j})),{...s,[s.activeReport]:{...o}};default:return s}},initialState$1={optimizerRoot:null,mode:"normal",isTourOpen:!1,onboardCompleted:!1,aiPredictionResult:null,mobile:{activeTab:"configurations",openAudits:[],hoveredMetric:null,activeMetric:null,settingsMode:null},desktop:{activeTab:"configurations",openAudits:[],hoveredMetric:null,activeMetric:null,settingsMode:null}},commonReducer=(s=initialState$1,a)=>{switch(a.type){case SET_STATE:return{...s,[a.payload.activeReport]:{...s[a.payload.activeReport],[a.payload.key]:a.payload.value}};case SET_ROOT_STATE:return{...s,[a.payload.key]:a.payload.value};default:return s}};function formatProdErrorMessage$1(s){return`Minified Redux error #${s}; visit https://redux.js.org/Errors?code=${s} for the full message or use the non-minified dev environment for full errors. `}var $$observable=typeof Symbol=="function"&&Symbol.observable||"@@observable",symbol_observable_default=$$observable,randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$3(s){if(typeof s!="object"||s===null)return!1;let a=s;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(s)===a||Object.getPrototypeOf(s)===null}function createStore(s,a,i){if(typeof s!="function")throw new Error(formatProdErrorMessage$1(2));if(typeof a=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(formatProdErrorMessage$1(0));if(typeof a=="function"&&typeof i>"u"&&(i=a,a=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(formatProdErrorMessage$1(1));return i(createStore)(s,a)}let o=s,E=a,j=new Map,R=j,C=0,S=!1;function _(){R===j&&(R=new Map,j.forEach((B,F)=>{R.set(F,B)}))}function T(){if(S)throw new Error(formatProdErrorMessage$1(3));return E}function P(B){if(typeof B!="function")throw new Error(formatProdErrorMessage$1(4));if(S)throw new Error(formatProdErrorMessage$1(5));let F=!0;_();const O=C++;return R.set(O,B),function(){if(F){if(S)throw new Error(formatProdErrorMessage$1(6));F=!1,_(),R.delete(O),j=null}}}function N(B){if(!isPlainObject$3(B))throw new Error(formatProdErrorMessage$1(7));if(typeof B.type>"u")throw new Error(formatProdErrorMessage$1(8));if(typeof B.type!="string")throw new Error(formatProdErrorMessage$1(17));if(S)throw new Error(formatProdErrorMessage$1(9));try{S=!0,E=o(E,B)}finally{S=!1}return(j=R).forEach(O=>{O()}),B}function I(B){if(typeof B!="function")throw new Error(formatProdErrorMessage$1(10));o=B,N({type:actionTypes_default.REPLACE})}function M(){const B=P;return{subscribe(F){if(typeof F!="object"||F===null)throw new Error(formatProdErrorMessage$1(11));function O(){const $=F;$.next&&$.next(T())}return O(),{unsubscribe:B(O)}},[symbol_observable_default](){return this}}}return N({type:actionTypes_default.INIT}),{dispatch:N,subscribe:P,getState:T,replaceReducer:I,[symbol_observable_default]:M}}function assertReducerShape(s){Object.keys(s).forEach(a=>{const i=s[a];if(typeof i(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(formatProdErrorMessage$1(12));if(typeof i(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(formatProdErrorMessage$1(13))})}function combineReducers(s){const a=Object.keys(s),i={};for(let j=0;j<a.length;j++){const R=a[j];typeof s[R]=="function"&&(i[R]=s[R])}const o=Object.keys(i);let E;try{assertReducerShape(i)}catch(j){E=j}return function(R={},C){if(E)throw E;let S=!1;const _={};for(let T=0;T<o.length;T++){const P=o[T],N=i[P],I=R[P],M=N(I,C);if(typeof M>"u")throw C&&C.type,new Error(formatProdErrorMessage$1(14));_[P]=M,S=S||M!==I}return S=S||o.length!==Object.keys(R).length,S?_:R}}function compose(...s){return s.length===0?a=>a:s.length===1?s[0]:s.reduce((a,i)=>(...o)=>a(i(...o)))}function applyMiddleware(...s){return a=>(i,o)=>{const E=a(i,o);let j=()=>{throw new Error(formatProdErrorMessage$1(15))};const R={getState:E.getState,dispatch:(S,..._)=>j(S,..._)},C=s.map(S=>S(R));return j=compose(...C)(E.dispatch),{...E,dispatch:j}}}function isAction(s){return isPlainObject$3(s)&&"type"in s&&typeof s.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(s,...a){throw new Error(`[Immer] minified error nr: ${s}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(s){return!!s&&!!s[DRAFT_STATE]}function isDraftable(s){var a;return s?isPlainObject$2(s)||Array.isArray(s)||!!s[DRAFTABLE]||!!((a=s.constructor)!=null&&a[DRAFTABLE])||isMap(s)||isSet(s):!1}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject$2(s){if(!s||typeof s!="object")return!1;const a=getPrototypeOf(s);if(a===null)return!0;const i=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===objectCtorString}function each(s,a){getArchtype(s)===0?Reflect.ownKeys(s).forEach(i=>{a(i,s[i],s)}):s.forEach((i,o)=>a(o,i,s))}function getArchtype(s){const a=s[DRAFT_STATE];return a?a.type_:Array.isArray(s)?1:isMap(s)?2:isSet(s)?3:0}function has$1(s,a){return getArchtype(s)===2?s.has(a):Object.prototype.hasOwnProperty.call(s,a)}function set(s,a,i){const o=getArchtype(s);o===2?s.set(a,i):o===3?s.add(i):s[a]=i}function is(s,a){return s===a?s!==0||1/s===1/a:s!==s&&a!==a}function isMap(s){return s instanceof Map}function isSet(s){return s instanceof Set}function latest(s){return s.copy_||s.base_}function shallowCopy(s,a){if(isMap(s))return new Map(s);if(isSet(s))return new Set(s);if(Array.isArray(s))return Array.prototype.slice.call(s);const i=isPlainObject$2(s);if(a===!0||a==="class_only"&&!i){const o=Object.getOwnPropertyDescriptors(s);delete o[DRAFT_STATE];let E=Reflect.ownKeys(o);for(let j=0;j<E.length;j++){const R=E[j],C=o[R];C.writable===!1&&(C.writable=!0,C.configurable=!0),(C.get||C.set)&&(o[R]={configurable:!0,writable:!0,enumerable:C.enumerable,value:s[R]})}return Object.create(getPrototypeOf(s),o)}else{const o=getPrototypeOf(s);if(o!==null&&i)return{...s};const E=Object.create(o);return Object.assign(E,s)}}function freeze(s,a=!1){return isFrozen(s)||isDraft(s)||!isDraftable(s)||(getArchtype(s)>1&&(s.set=s.add=s.clear=s.delete=dontMutateFrozenCollections),Object.freeze(s),a&&Object.entries(s).forEach(([i,o])=>freeze(o,!0))),s}function dontMutateFrozenCollections(){die(2)}function isFrozen(s){return Object.isFrozen(s)}var plugins={};function getPlugin(s){const a=plugins[s];return a||die(0,s),a}var currentScope;function getCurrentScope(){return currentScope}function createScope(s,a){return{drafts_:[],parent_:s,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(s,a){a&&(getPlugin("Patches"),s.patches_=[],s.inversePatches_=[],s.patchListener_=a)}function revokeScope(s){leaveScope(s),s.drafts_.forEach(revokeDraft),s.drafts_=null}function leaveScope(s){s===currentScope&&(currentScope=s.parent_)}function enterScope(s){return currentScope=createScope(currentScope,s)}function revokeDraft(s){const a=s[DRAFT_STATE];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function processResult(s,a){a.unfinalizedDrafts_=a.drafts_.length;const i=a.drafts_[0];return s!==void 0&&s!==i?(i[DRAFT_STATE].modified_&&(revokeScope(a),die(4)),isDraftable(s)&&(s=finalize(a,s),a.parent_||maybeFreeze(a,s)),a.patches_&&getPlugin("Patches").generateReplacementPatches_(i[DRAFT_STATE].base_,s,a.patches_,a.inversePatches_)):s=finalize(a,i,[]),revokeScope(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),s!==NOTHING?s:void 0}function finalize(s,a,i){if(isFrozen(a))return a;const o=a[DRAFT_STATE];if(!o)return each(a,(E,j)=>finalizeProperty(s,o,a,E,j,i)),a;if(o.scope_!==s)return a;if(!o.modified_)return maybeFreeze(s,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const E=o.copy_;let j=E,R=!1;o.type_===3&&(j=new Set(E),E.clear(),R=!0),each(j,(C,S)=>finalizeProperty(s,o,E,C,S,i,R)),maybeFreeze(s,E,!1),i&&s.patches_&&getPlugin("Patches").generatePatches_(o,i,s.patches_,s.inversePatches_)}return o.copy_}function finalizeProperty(s,a,i,o,E,j,R){if(isDraft(E)){const C=j&&a&&a.type_!==3&&!has$1(a.assigned_,o)?j.concat(o):void 0,S=finalize(s,E,C);if(set(i,o,S),isDraft(S))s.canAutoFreeze_=!1;else return}else R&&i.add(E);if(isDraftable(E)&&!isFrozen(E)){if(!s.immer_.autoFreeze_&&s.unfinalizedDrafts_<1)return;finalize(s,E),(!a||!a.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,o)&&maybeFreeze(s,E)}}function maybeFreeze(s,a,i=!1){!s.parent_&&s.immer_.autoFreeze_&&s.canAutoFreeze_&&freeze(a,i)}function createProxyProxy(s,a){const i=Array.isArray(s),o={type_:i?1:0,scope_:a?a.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:s,draft_:null,copy_:null,revoke_:null,isManual_:!1};let E=o,j=objectTraps;i&&(E=[o],j=arrayTraps);const{revoke:R,proxy:C}=Proxy.revocable(E,j);return o.draft_=C,o.revoke_=R,C}var objectTraps={get(s,a){if(a===DRAFT_STATE)return s;const i=latest(s);if(!has$1(i,a))return readPropFromProto(s,i,a);const o=i[a];return s.finalized_||!isDraftable(o)?o:o===peek(s.base_,a)?(prepareCopy(s),s.copy_[a]=createProxy(o,s)):o},has(s,a){return a in latest(s)},ownKeys(s){return Reflect.ownKeys(latest(s))},set(s,a,i){const o=getDescriptorFromProto(latest(s),a);if(o!=null&&o.set)return o.set.call(s.draft_,i),!0;if(!s.modified_){const E=peek(latest(s),a),j=E==null?void 0:E[DRAFT_STATE];if(j&&j.base_===i)return s.copy_[a]=i,s.assigned_[a]=!1,!0;if(is(i,E)&&(i!==void 0||has$1(s.base_,a)))return!0;prepareCopy(s),markChanged(s)}return s.copy_[a]===i&&(i!==void 0||a in s.copy_)||Number.isNaN(i)&&Number.isNaN(s.copy_[a])||(s.copy_[a]=i,s.assigned_[a]=!0),!0},deleteProperty(s,a){return peek(s.base_,a)!==void 0||a in s.base_?(s.assigned_[a]=!1,prepareCopy(s),markChanged(s)):delete s.assigned_[a],s.copy_&&delete s.copy_[a],!0},getOwnPropertyDescriptor(s,a){const i=latest(s),o=Reflect.getOwnPropertyDescriptor(i,a);return o&&{writable:!0,configurable:s.type_!==1||a!=="length",enumerable:o.enumerable,value:i[a]}},defineProperty(){die(11)},getPrototypeOf(s){return getPrototypeOf(s.base_)},setPrototypeOf(){die(12)}},arrayTraps={};each(objectTraps,(s,a)=>{arrayTraps[s]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});arrayTraps.deleteProperty=function(s,a){return arrayTraps.set.call(this,s,a,void 0)};arrayTraps.set=function(s,a,i){return objectTraps.set.call(this,s[0],a,i,s[0])};function peek(s,a){const i=s[DRAFT_STATE];return(i?latest(i):s)[a]}function readPropFromProto(s,a,i){var E;const o=getDescriptorFromProto(a,i);return o?"value"in o?o.value:(E=o.get)==null?void 0:E.call(s.draft_):void 0}function getDescriptorFromProto(s,a){if(!(a in s))return;let i=getPrototypeOf(s);for(;i;){const o=Object.getOwnPropertyDescriptor(i,a);if(o)return o;i=getPrototypeOf(i)}}function markChanged(s){s.modified_||(s.modified_=!0,s.parent_&&markChanged(s.parent_))}function prepareCopy(s){s.copy_||(s.copy_=shallowCopy(s.base_,s.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(s){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(a,i,o)=>{if(typeof a=="function"&&typeof i!="function"){const j=i;i=a;const R=this;return function(S=j,..._){return R.produce(S,T=>i.call(this,T,..._))}}typeof i!="function"&&die(6),o!==void 0&&typeof o!="function"&&die(7);let E;if(isDraftable(a)){const j=enterScope(this),R=createProxy(a,void 0);let C=!0;try{E=i(R),C=!1}finally{C?revokeScope(j):leaveScope(j)}return usePatchesInScope(j,o),processResult(E,j)}else if(!a||typeof a!="object"){if(E=i(a),E===void 0&&(E=a),E===NOTHING&&(E=void 0),this.autoFreeze_&&freeze(E,!0),o){const j=[],R=[];getPlugin("Patches").generateReplacementPatches_(a,E,j,R),o(j,R)}return E}else die(1,a)},this.produceWithPatches=(a,i)=>{if(typeof a=="function")return(R,...C)=>this.produceWithPatches(R,S=>a(S,...C));let o,E;return[this.produce(a,i,(R,C)=>{o=R,E=C}),o,E]},typeof(s==null?void 0:s.autoFreeze)=="boolean"&&this.setAutoFreeze(s.autoFreeze),typeof(s==null?void 0:s.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(s.useStrictShallowCopy)}createDraft(s){isDraftable(s)||die(8),isDraft(s)&&(s=current(s));const a=enterScope(this),i=createProxy(s,void 0);return i[DRAFT_STATE].isManual_=!0,leaveScope(a),i}finishDraft(s,a){const i=s&&s[DRAFT_STATE];(!i||!i.isManual_)&&die(9);const{scope_:o}=i;return usePatchesInScope(o,a),processResult(void 0,o)}setAutoFreeze(s){this.autoFreeze_=s}setUseStrictShallowCopy(s){this.useStrictShallowCopy_=s}applyPatches(s,a){let i;for(i=a.length-1;i>=0;i--){const E=a[i];if(E.path.length===0&&E.op==="replace"){s=E.value;break}}i>-1&&(a=a.slice(i+1));const o=getPlugin("Patches").applyPatches_;return isDraft(s)?o(s,a):this.produce(s,E=>o(E,a))}};function createProxy(s,a){const i=isMap(s)?getPlugin("MapSet").proxyMap_(s,a):isSet(s)?getPlugin("MapSet").proxySet_(s,a):createProxyProxy(s,a);return(a?a.scope_:getCurrentScope()).drafts_.push(i),i}function current(s){return isDraft(s)||die(10,s),currentImpl(s)}function currentImpl(s){if(!isDraftable(s)||isFrozen(s))return s;const a=s[DRAFT_STATE];let i;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,i=shallowCopy(s,a.scope_.immer_.useStrictShallowCopy_)}else i=shallowCopy(s,!0);return each(i,(o,E)=>{set(i,o,currentImpl(E))}),a&&(a.finalized_=!1),i}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);immer.setAutoFreeze.bind(immer);immer.setUseStrictShallowCopy.bind(immer);immer.applyPatches.bind(immer);immer.createDraft.bind(immer);immer.finishDraft.bind(immer);function createThunkMiddleware(s){return({dispatch:i,getState:o})=>E=>j=>typeof j=="function"?j(i,o,s):E(j)}var thunk=createThunkMiddleware(),withExtraArgument=createThunkMiddleware,composeWithDevTools=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?compose:compose.apply(null,arguments)};function createAction(s,a){function i(...o){if(a){let E=a(...o);if(!E)throw new Error(formatProdErrorMessage(0));return{type:s,payload:E.payload,..."meta"in E&&{meta:E.meta},..."error"in E&&{error:E.error}}}return{type:s,payload:o[0]}}return i.toString=()=>`${s}`,i.type=s,i.match=o=>isAction(o)&&o.type===s,i}var Tuple=class kt extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,kt.prototype)}static get[Symbol.species](){return kt}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new kt(...a[0].concat(this)):new kt(...a.concat(this))}};function freezeDraftable(s){return isDraftable(s)?produce(s,()=>{}):s}function emplace(s,a,i){if(s.has(a)){let E=s.get(a);return i.update&&(E=i.update(E,a,s),s.set(a,E)),E}if(!i.insert)throw new Error(formatProdErrorMessage(10));const o=i.insert(a,s);return s.set(a,o),o}function isBoolean(s){return typeof s=="boolean"}var buildGetDefaultMiddleware=()=>function(a){const{thunk:i=!0,immutableCheck:o=!0,serializableCheck:E=!0,actionCreatorCheck:j=!0}=a??{};let R=new Tuple;return i&&(isBoolean(i)?R.push(thunk):R.push(withExtraArgument(i.extraArgument))),R},SHOULD_AUTOBATCH="RTK_autoBatch",createQueueWithTimer=s=>a=>{setTimeout(a,s)},rAF$1=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:createQueueWithTimer(10),autoBatchEnhancer=(s={type:"raf"})=>a=>(...i)=>{const o=a(...i);let E=!0,j=!1,R=!1;const C=new Set,S=s.type==="tick"?queueMicrotask:s.type==="raf"?rAF$1:s.type==="callback"?s.queueNotification:createQueueWithTimer(s.timeout),_=()=>{R=!1,j&&(j=!1,C.forEach(T=>T()))};return Object.assign({},o,{subscribe(T){const P=()=>E&&T(),N=o.subscribe(P);return C.add(T),()=>{N(),C.delete(T)}},dispatch(T){var P;try{return E=!((P=T==null?void 0:T.meta)!=null&&P[SHOULD_AUTOBATCH]),j=!E,j&&(R||(R=!0,S(_))),o.dispatch(T)}finally{E=!0}}})},buildGetDefaultEnhancers=s=>function(i){const{autoBatch:o=!0}=i??{};let E=new Tuple(s);return o&&E.push(autoBatchEnhancer(typeof o=="object"?o:void 0)),E};function configureStore(s){const a=buildGetDefaultMiddleware(),{reducer:i=void 0,middleware:o,devTools:E=!0,preloadedState:j=void 0,enhancers:R=void 0}=s||{};let C;if(typeof i=="function")C=i;else if(isPlainObject$3(i))C=combineReducers(i);else throw new Error(formatProdErrorMessage(1));let S;typeof o=="function"?S=o(a):S=a();let _=compose;E&&(_=composeWithDevTools({trace:!1,...typeof E=="object"&&E}));const T=applyMiddleware(...S),P=buildGetDefaultEnhancers(T);let N=typeof R=="function"?R(P):P();const I=_(...N);return createStore(C,j,I)}function executeReducerBuilderCallback(s){const a={},i=[];let o;const E={addCase(j,R){const C=typeof j=="string"?j:j.type;if(!C)throw new Error(formatProdErrorMessage(28));if(C in a)throw new Error(formatProdErrorMessage(29));return a[C]=R,E},addMatcher(j,R){return i.push({matcher:j,reducer:R}),E},addDefaultCase(j){return o=j,E}};return s(E),[a,i,o]}function isStateFunction(s){return typeof s=="function"}function createReducer(s,a){let[i,o,E]=executeReducerBuilderCallback(a),j;if(isStateFunction(s))j=()=>freezeDraftable(s());else{const C=freezeDraftable(s);j=()=>C}function R(C=j(),S){let _=[i[S.type],...o.filter(({matcher:T})=>T(S)).map(({reducer:T})=>T)];return _.filter(T=>!!T).length===0&&(_=[E]),_.reduce((T,P)=>{if(P)if(isDraft(T)){const I=P(T,S);return I===void 0?T:I}else{if(isDraftable(T))return produce(T,N=>P(N,S));{const N=P(T,S);if(N===void 0){if(T===null)return T;throw new Error(formatProdErrorMessage(9))}return N}}return T},C)}return R.getInitialState=j,R}var asyncThunkSymbol=Symbol.for("rtk-slice-createasyncthunk");function getType(s,a){return`${s}/${a}`}function buildCreateSlice({creators:s}={}){var i;const a=(i=s==null?void 0:s.asyncThunk)==null?void 0:i[asyncThunkSymbol];return function(E){const{name:j,reducerPath:R=j}=E;if(!j)throw new Error(formatProdErrorMessage(11));typeof process<"u";const C=(typeof E.reducers=="function"?E.reducers(buildReducerCreators()):E.reducers)||{},S=Object.keys(C),_={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},T={addCase(L,$){const V=typeof L=="string"?L:L.type;if(!V)throw new Error(formatProdErrorMessage(12));if(V in _.sliceCaseReducersByType)throw new Error(formatProdErrorMessage(13));return _.sliceCaseReducersByType[V]=$,T},addMatcher(L,$){return _.sliceMatchers.push({matcher:L,reducer:$}),T},exposeAction(L,$){return _.actionCreators[L]=$,T},exposeCaseReducer(L,$){return _.sliceCaseReducersByName[L]=$,T}};S.forEach(L=>{const $=C[L],V={reducerName:L,type:getType(j,L),createNotation:typeof E.reducers=="function"};isAsyncThunkSliceReducerDefinition($)?handleThunkCaseReducerDefinition(V,$,T,a):handleNormalReducerDefinition(V,$,T)});function P(){const[L={},$=[],V=void 0]=typeof E.extraReducers=="function"?executeReducerBuilderCallback(E.extraReducers):[E.extraReducers],G={...L,..._.sliceCaseReducersByType};return createReducer(E.initialState,K=>{for(let J in G)K.addCase(J,G[J]);for(let J of _.sliceMatchers)K.addMatcher(J.matcher,J.reducer);for(let J of $)K.addMatcher(J.matcher,J.reducer);V&&K.addDefaultCase(V)})}const N=L=>L,I=new Map;let M;function D(L,$){return M||(M=P()),M(L,$)}function B(){return M||(M=P()),M.getInitialState()}function F(L,$=!1){function V(K){let J=K[L];return typeof J>"u"&&$&&(J=B()),J}function G(K=N){const J=emplace(I,$,{insert:()=>new WeakMap});return emplace(J,K,{insert:()=>{const ne={};for(const[le,ue]of Object.entries(E.selectors??{}))ne[le]=wrapSelector(ue,K,B,$);return ne}})}return{reducerPath:L,getSelectors:G,get selectors(){return G(V)},selectSlice:V}}const O={name:j,reducer:D,actions:_.actionCreators,caseReducers:_.sliceCaseReducersByName,getInitialState:B,...F(R),injectInto(L,{reducerPath:$,...V}={}){const G=$??R;return L.inject({reducerPath:G,reducer:D},V),{...O,...F(G,!0)}}};return O}}function wrapSelector(s,a,i,o){function E(j,...R){let C=a(j);return typeof C>"u"&&o&&(C=i()),s(C,...R)}return E.unwrapped=s,E}var createSlice=buildCreateSlice();function buildReducerCreators(){function s(a,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:a,...i}}return s.withTypes=()=>s,{reducer(a){return Object.assign({[a.name](...i){return a(...i)}}[a.name],{_reducerDefinitionType:"reducer"})},preparedReducer(a,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:a,reducer:i}},asyncThunk:s}}function handleNormalReducerDefinition({type:s,reducerName:a,createNotation:i},o,E){let j,R;if("reducer"in o){if(i&&!isCaseReducerWithPrepareDefinition(o))throw new Error(formatProdErrorMessage(17));j=o.reducer,R=o.prepare}else j=o;E.addCase(s,j).exposeCaseReducer(a,j).exposeAction(a,R?createAction(s,R):createAction(s))}function isAsyncThunkSliceReducerDefinition(s){return s._reducerDefinitionType==="asyncThunk"}function isCaseReducerWithPrepareDefinition(s){return s._reducerDefinitionType==="reducerWithPrepare"}function handleThunkCaseReducerDefinition({type:s,reducerName:a},i,o,E){if(!E)throw new Error(formatProdErrorMessage(18));const{payloadCreator:j,fulfilled:R,pending:C,rejected:S,settled:_,options:T}=i,P=E(s,j,T);o.exposeAction(a,P),R&&o.addCase(P.fulfilled,R),C&&o.addCase(P.pending,C),S&&o.addCase(P.rejected,S),_&&o.addMatcher(P.settled,_),o.exposeCaseReducer(a,{fulfilled:R||noop$1,pending:C||noop$1,rejected:S||noop$1,settled:_||noop$1})}function noop$1(){}function formatProdErrorMessage(s){return`Minified Redux Toolkit error #${s}; visit https://redux-toolkit.js.org/Errors?code=${s} for the full message or use the non-minified dev environment for full errors. `}const initialState={messages:[]},chatSlice=createSlice({name:"chat",initialState,reducers:{addMessage:(s,a)=>{s.messages.push(a.payload)}}});chatSlice.actions;const chatSlice$1=chatSlice.reducer,rootReducer=combineReducers$1({app:appReducer,common:commonReducer,chat:chatSlice$1}),store=configureStore({reducer:rootReducer});class ApiService{constructor(a,i,o){St(this,"baseURL");St(this,"options");St(this,"aiBaseURL");a||(a=window.rapidload_optimizer),this.options=a,this.aiBaseURL=new URL((a==null?void 0:a.ai_root)||"https://ai.rapidload.io/api");let E=a!=null&&a.ajax_url?a.ajax_url:"http://rapidload.local/wp-admin/admin-ajax.php";const j=new URLSearchParams(i);o&&j.append("action",o),a!=null&&a.nonce&&!j.has("nonce")&&j.append("nonce",a.nonce),this.baseURL=new URL(E+"?"+j.toString())}async throwIfError(a,i=null){if(!a.ok)throw new Error("Oops! The request failed");let o=await a.json();if(!o.success){if(o.data.reload)return o.data;throw Array.isArray(o==null?void 0:o.data)?new Error(`[Code:${o.data[0].code}] ${o.data[0].detail?o.data[0].detail:"Internal error occurred on our end :("}`):new Error("Problem Retrieving Data: Our Apologies. For Assistance, Please Reach Out to Customer Support.")}return{...o,state:i}}setSearchParams(a){this.baseURL.search="",Object.entries(a).forEach(([i,o])=>{this.baseURL.searchParams.append(i,o)})}async fetchPageSpeed(a,i,o,E){try{let j=o,R=null;if(o&&(R=await this.analyzeViaAPI(a,i,E),R!=null&&R.errors))throw Array.isArray(R==null?void 0:R.errors)?new Error(`[Code:${R.errors[0].code}] ${R.errors[0].detail}`):new Error("Oops! Something went wrong :(");const C=new URLSearchParams;this.baseURL.searchParams.delete("action"),this.baseURL.searchParams.delete("url"),this.baseURL.searchParams.delete("strategy"),this.baseURL.searchParams.delete("new"),this.baseURL.searchParams.delete("is_dev"),this.baseURL.searchParams.append("action","fetch_page_speed"),this.baseURL.searchParams.append("url",a),this.baseURL.searchParams.append("strategy",i),this.baseURL.searchParams.append("new",o),this.baseURL.searchParams.append("is_dev",isDev);const S=await fetch(this.baseURL,{method:R?"POST":"GET",headers:{"Content-Type":"application/json"},signal:E==null?void 0:E.signal,...R?{body:JSON.stringify({page_speed:R})}:{}});let _=await this.throwIfError(S,{fresh:o});return _!=null&&_.reload?await this.fetchPageSpeed(a,i,!0):_}catch(j){throw console.error(j),j}}async fetchSettings(a,i,o){try{let E=o,j=null;const R=new URLSearchParams;this.baseURL.searchParams.append("action","fetch_titan_settings"),this.baseURL.searchParams.append("url",a),this.baseURL.searchParams.append("strategy",i),this.baseURL.searchParams.append("new",o),this.baseURL.searchParams.append("is_dev",isDev);const C=await fetch(this.baseURL,{method:j?"POST":"GET",headers:{"Content-Type":"application/json"}});let S=await this.throwIfError(C,{fresh:o});return S!=null&&S.reload?await this.fetchPageSpeed(a,i,!0):S}catch(E){throw toast({description:"Failed to fetch RapidLoad settings!",variant:"destructive"}),E}}async analyzeViaAPI(a,i,o){var E,j,R;try{const C=store.getState(),S=C.app.report[C.app.activeReport],_=C.app.settings.performance[C.app.activeReport],P=((E=C.app.testMode)==null?void 0:E.status)??C.app.settings.general.test_mode??!1?"?rapidload_preview":"",N=((j=this.options)==null?void 0:j.api_root)||"https://api.rapidload.io/api/v1",I=new URL(`${N}/page-speed`);return I.searchParams.append("url",a+P),I.searchParams.append("strategy",C.app.activeReport),I.searchParams.append("plugin_version",this.options.rapidload_version),I.searchParams.append("titan_version","1.4.1"),this.options.license_key&&I.searchParams.append("api_key",this.options.license_key),await(await fetch(I,{method:"POST",headers:{"Content-Type":"application/json"},signal:o==null?void 0:o.signal,body:JSON.stringify({settings:((R=_.state)==null?void 0:R.flatMap(D=>D.inputs.filter(({value:B})=>B!=null).map(({key:B,value:F})=>({key:B,value:F,status:D.status}))))||[]})})).json()}catch(C){throw console.error(C),C}}async getAiPrediction(a,i,o,E){try{const j=new URL(`${this.aiBaseURL}/score`);j.searchParams.append("url",a),j.searchParams.append("score",i.toString());const R=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({audits:o,metrics:E})});if(!R.ok)throw new Error("AI prediction request failed");return{success:!0,data:await R.json()}}catch(j){throw console.error("AI Prediction Error:",j),j}}async getCSSJobStatus(a,i){try{this.baseURL.searchParams.append("action","rapidload_css_job_status"),this.baseURL.searchParams.append("url",a),this.baseURL.searchParams.append("types",i.join(","));const o=await fetch(this.baseURL,{method:"GET",headers:{"Content-Type":"application/json"}});return this.throwIfError(o)}catch(o){throw console.error(o),o}}async updateDiagnosticResults(a,i,o){try{this.baseURL.searchParams.append("action","rapidload_diagnose_data"),this.baseURL.searchParams.append("url",a),this.baseURL.searchParams.append("strategy",i);const E=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"},...o?{body:JSON.stringify({data:o})}:{}});return this.throwIfError(E)}catch(E){throw console.error(E),E}}async getTestMode(a,i){try{this.baseURL.searchParams.append("action","rapidload_switch_test_mode"),this.baseURL.searchParams.append("url",a),this.baseURL.searchParams.append("test_mode",i);const o=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(o)}catch(o){throw console.error(o),o}}async getSummary(a){try{this.baseURL.searchParams.append("action",a);const i=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(i)}catch(i){throw console.error(i),i}}async getOptimizationData(a,i){try{this.baseURL.searchParams.append("action","rapidload_titan_optimizations_data"),this.baseURL.searchParams.append("start_from",a),this.baseURL.searchParams.append("limit",i);const o=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(o)}catch(o){throw console.error(o),o}}async searchData(a,i,o){try{this.baseURL.searchParams.append("action",a),this.baseURL.searchParams.append("s",i),this.baseURL.searchParams.append("post_type",o);const E=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(E)}catch(E){throw console.error(E),E}}async deleteOptimizedData(a){try{this.baseURL.searchParams.append("action","rapidload_delete_titan_optimizations"),this.baseURL.searchParams.append("url",a);const i=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(i)}catch(i){throw console.error(i),i}}async saveGeneralSettings(a){try{const i=new FormData;this.baseURL.searchParams.append("action","update_rapidload_settings"),Object.keys(a).forEach(E=>{Array.isArray(a[E])?a[E].forEach((j,R)=>{i.append(`${E}[${R}]`,j)}):i.append(E,a[E])});const o=await fetch(this.baseURL,{method:"POST",body:i});return this.throwIfError(o)}catch(i){throw console.error(i),i}}async updateLicense(a){try{this.baseURL.searchParams.append("action",a?"uucss_connect":"uucss_license");const i=new FormData;return i.append("license_key",a),await(await fetch(this.baseURL,{method:"POST",body:i})).json()}catch(i){return console.error("Error in updateLicense:",i),{success:!1,data:"An unknown error occurred"}}}async fetchPosts(){try{this.baseURL.searchParams.append("action","rapidload_fetch_post_types_with_links");const a=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(a)}catch(a){throw console.error(a),a}}async homePagePerformance(){try{this.baseURL.searchParams.append("action","rapidload_titan_home_page_performance");const a=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(a)}catch(a){throw console.error(a),a}}async getLicense(){try{this.baseURL.searchParams.append("action","uucss_license");const a=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(a)}catch(a){throw console.error(a),a}}async updateSettings(a,i,o,E,j){try{const R=new URLSearchParams;this.baseURL.searchParams.get("action")&&this.baseURL.searchParams.delete("action"),this.baseURL.searchParams.append("action","update_titan_settings"),E&&this.baseURL.searchParams.append("global","true"),j&&this.baseURL.searchParams.append("analyze","true"),this.baseURL.searchParams.append("url",a),this.baseURL.searchParams.append("strategy",i);const C=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:{general:{performance_gear:o.activeGear},performance:o.settings}})});return this.throwIfError(C)}catch(R){throw console.error(R),R}}async post(a=null,i={}){try{a&&(this.baseURL.searchParams.get("action")&&this.baseURL.searchParams.delete("action"),this.baseURL.searchParams.append("action",a));for(let E of Object.keys(i))this.baseURL.searchParams.has(E)||this.baseURL.searchParams.append(E,i[E]);const o=await fetch(this.baseURL,{method:"GET",headers:{"Content-Type":"application/json"}});return this.throwIfError(o)}catch(o){throw console.error(o),o}}async request(a,i={},o="GET"){let E=new URL(this.options.rest_url);try{for(let R of Object.keys(i))E.searchParams.has(R)||E.searchParams.append(R,i[R]);E.pathname+=a;const j=await fetch(E,{method:o,headers:{"Content-Type":"application/json"}});return this.throwIfError(j)}catch(j){throw console.error(j),j}}async getActivePlugins(){try{this.baseURL.searchParams.append("action","rapidload_get_active_plugins");const a=await fetch(this.baseURL,{method:"POST",headers:{"Content-Type":"application/json"}});return this.throwIfError(a)}catch(a){throw console.error(a),a}}rest(){return this}}function ArrowLeftCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-4.28 9.22a.75.75 0 0 0 0 1.06l3 3a.75.75 0 1 0 1.06-1.06l-1.72-1.72h5.69a.75.75 0 0 0 0-1.5h-5.69l1.72-1.72a.75.75 0 0 0-1.06-1.06l-3 3Z",clipRule:"evenodd"}))}const ForwardRef$E=reactExports.forwardRef(ArrowLeftCircleIcon);function ArrowLongRightIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M16.72 7.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1 0 1.06l-3.75 3.75a.75.75 0 1 1-1.06-1.06l2.47-2.47H3a.75.75 0 0 1 0-1.5h16.19l-2.47-2.47a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ForwardRef$D=reactExports.forwardRef(ArrowLongRightIcon$1);function ArrowPathIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M4.755 10.059a7.5 7.5 0 0 1 12.548-3.364l1.903 1.903h-3.183a.75.75 0 1 0 0 1.5h4.992a.75.75 0 0 0 .75-.75V4.356a.75.75 0 0 0-1.5 0v3.18l-1.9-1.9A9 9 0 0 0 3.306 9.67a.75.75 0 1 0 1.45.388Zm15.408 3.352a.75.75 0 0 0-.919.53 7.5 7.5 0 0 1-12.548 3.364l-1.902-1.903h3.183a.75.75 0 0 0 0-1.5H2.984a.75.75 0 0 0-.75.75v4.992a.75.75 0 0 0 1.5 0v-3.18l1.9 1.9a9 9 0 0 0 15.059-4.035.75.75 0 0 0-.53-.918Z",clipRule:"evenodd"}))}const ForwardRef$C=reactExports.forwardRef(ArrowPathIcon);function ArrowUpCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm.53 5.47a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72v5.69a.75.75 0 0 0 1.5 0v-5.69l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z",clipRule:"evenodd"}))}const ForwardRef$B=reactExports.forwardRef(ArrowUpCircleIcon);function BoltIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M14.615 1.595a.75.75 0 0 1 .359.852L12.982 9.75h7.268a.75.75 0 0 1 .548 1.262l-10.5 11.25a.75.75 0 0 1-1.272-.71l1.992-7.302H3.75a.75.75 0 0 1-.548-1.262l10.5-11.25a.75.75 0 0 1 .913-.143Z",clipRule:"evenodd"}))}const ForwardRef$A=reactExports.forwardRef(BoltIcon);function CheckBadgeIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const ForwardRef$z=reactExports.forwardRef(CheckBadgeIcon);function CheckCircleIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const ForwardRef$y=reactExports.forwardRef(CheckCircleIcon$1);function CheckIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const ForwardRef$x=reactExports.forwardRef(CheckIcon$1);function ChevronDownIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const ForwardRef$w=reactExports.forwardRef(ChevronDownIcon);function ChevronLeftIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const ForwardRef$v=reactExports.forwardRef(ChevronLeftIcon);function ChevronRightIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const ForwardRef$u=reactExports.forwardRef(ChevronRightIcon);function ExclamationCircleIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const ForwardRef$t=reactExports.forwardRef(ExclamationCircleIcon$1);function ExclamationTriangleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const ForwardRef$s=reactExports.forwardRef(ExclamationTriangleIcon);function InformationCircleIcon$2({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const ForwardRef$r=reactExports.forwardRef(InformationCircleIcon$2);function MinusCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z",clipRule:"evenodd"}))}const ForwardRef$q=reactExports.forwardRef(MinusCircleIcon);function PlusCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V9Z",clipRule:"evenodd"}))}const ForwardRef$p=reactExports.forwardRef(PlusCircleIcon);function XCircleIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const ForwardRef$o=reactExports.forwardRef(XCircleIcon$1);function XMarkIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ForwardRef$n=reactExports.forwardRef(XMarkIcon$1),Feedback$1=()=>{const[s,a]=reactExports.useState(null),[i,o]=reactExports.useState(""),[E,j]=reactExports.useState(!1),[R,C]=reactExports.useState(!1),{toast:S}=useToast();reactExports.useMemo(()=>[{Component:Annoyed,value:"annoyed"},{Component:Frown,value:"frown"},{Component:Meh,value:"meh"},{Component:Smile,value:"smile"},{Component:SmilePlus,value:"smilePlus"}],[]);const _=async()=>{if(!s)return;const T=new ApiService;try{j(!0),await T.post("rapidload_titan_feedback",{smiley:s,detail:i}),S({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Thank you! Your feedback is sent. ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]})}),j(!1),a(""),o(""),C(!1)}catch(P){S({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[P.message," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]})}),j(!1)}};return reactExports.useEffect(()=>{s&&_()},[s]),reactExports.useEffect(()=>{setTimeout(()=>{C(!0)},30*1)},[]),R?jsxRuntimeExports.jsxs(Card,{className:cn("flex flex-col gap-4 px-6 py-5 bg-brand-0/70 rounded-xl"),children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5",children:[jsxRuntimeExports.jsx("div",{className:"text-sm font-medium",children:"How was the experience?"}),jsxRuntimeExports.jsx("div",{className:"text-xs text-brand-500",children:"Feedback helps us improve the product work better for you."})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsxs(AppButton,{onClick:T=>{a("good")},className:cn(s==="good"&&"bg-brand-300"),variant:"outline",children:[E&&s==="good"?jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin"}):jsxRuntimeExports.jsx(ThumbsUp,{className:"w-4"}),"Good"]}),jsxRuntimeExports.jsxs(AppButton,{onClick:T=>{a("bad")},className:cn(s==="bad"&&"bg-brand-300"),variant:"outline",children:[E&&s==="bad"?jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin"}):jsxRuntimeExports.jsx(ThumbsDown,{className:"w-4"}),"Bad"]})]})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},Feedback$2=Object.freeze(Object.defineProperty({__proto__:null,default:Feedback$1},Symbol.toStringTag,{value:"Module"}));var[createTooltipContext,createTooltipScope]=createContextScope$1("Tooltip",[createPopperScope]),usePopperScope$2=createPopperScope(),PROVIDER_NAME="TooltipProvider",DEFAULT_DELAY_DURATION=700,TOOLTIP_OPEN="tooltip.open",[TooltipProviderContextProvider,useTooltipProviderContext]=createTooltipContext(PROVIDER_NAME),TooltipProvider$1=s=>{const{__scopeTooltip:a,delayDuration:i=DEFAULT_DELAY_DURATION,skipDelayDuration:o=300,disableHoverableContent:E=!1,children:j}=s,[R,C]=reactExports.useState(!0),S=reactExports.useRef(!1),_=reactExports.useRef(0);return reactExports.useEffect(()=>{const T=_.current;return()=>window.clearTimeout(T)},[]),jsxRuntimeExports.jsx(TooltipProviderContextProvider,{scope:a,isOpenDelayed:R,delayDuration:i,onOpen:reactExports.useCallback(()=>{window.clearTimeout(_.current),C(!1)},[]),onClose:reactExports.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>C(!0),o)},[o]),isPointerInTransitRef:S,onPointerInTransitChange:reactExports.useCallback(T=>{S.current=T},[]),disableHoverableContent:E,children:j})};TooltipProvider$1.displayName=PROVIDER_NAME;var TOOLTIP_NAME="Tooltip",[TooltipContextProvider,useTooltipContext]=createTooltipContext(TOOLTIP_NAME),Tooltip$1=s=>{const{__scopeTooltip:a,children:i,open:o,defaultOpen:E=!1,onOpenChange:j,disableHoverableContent:R,delayDuration:C}=s,S=useTooltipProviderContext(TOOLTIP_NAME,s.__scopeTooltip),_=usePopperScope$2(a),[T,P]=reactExports.useState(null),N=useId(),I=reactExports.useRef(0),M=R??S.disableHoverableContent,D=C??S.delayDuration,B=reactExports.useRef(!1),[F=!1,O]=useControllableState({prop:o,defaultProp:E,onChange:K=>{K?(S.onOpen(),document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN))):S.onClose(),j==null||j(K)}}),L=reactExports.useMemo(()=>F?B.current?"delayed-open":"instant-open":"closed",[F]),$=reactExports.useCallback(()=>{window.clearTimeout(I.current),B.current=!1,O(!0)},[O]),V=reactExports.useCallback(()=>{window.clearTimeout(I.current),O(!1)},[O]),G=reactExports.useCallback(()=>{window.clearTimeout(I.current),I.current=window.setTimeout(()=>{B.current=!0,O(!0)},D)},[D,O]);return reactExports.useEffect(()=>()=>window.clearTimeout(I.current),[]),jsxRuntimeExports.jsx(Root2$4,{..._,children:jsxRuntimeExports.jsx(TooltipContextProvider,{scope:a,contentId:N,open:F,stateAttribute:L,trigger:T,onTriggerChange:P,onTriggerEnter:reactExports.useCallback(()=>{S.isOpenDelayed?G():$()},[S.isOpenDelayed,G,$]),onTriggerLeave:reactExports.useCallback(()=>{M?V():window.clearTimeout(I.current)},[V,M]),onOpen:$,onClose:V,disableHoverableContent:M,children:i})})};Tooltip$1.displayName=TOOLTIP_NAME;var TRIGGER_NAME$5="TooltipTrigger",TooltipTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeTooltip:i,...o}=s,E=useTooltipContext(TRIGGER_NAME$5,i),j=useTooltipProviderContext(TRIGGER_NAME$5,i),R=usePopperScope$2(i),C=reactExports.useRef(null),S=useComposedRefs$1(a,C,E.onTriggerChange),_=reactExports.useRef(!1),T=reactExports.useRef(!1),P=reactExports.useCallback(()=>_.current=!1,[]);return reactExports.useEffect(()=>()=>document.removeEventListener("pointerup",P),[P]),jsxRuntimeExports.jsx(Anchor,{asChild:!0,...R,children:jsxRuntimeExports.jsx(Primitive$1.button,{"aria-describedby":E.open?E.contentId:void 0,"data-state":E.stateAttribute,...o,ref:S,onPointerMove:composeEventHandlers$1(s.onPointerMove,N=>{N.pointerType!=="touch"&&!T.current&&!j.isPointerInTransitRef.current&&(E.onTriggerEnter(),T.current=!0)}),onPointerLeave:composeEventHandlers$1(s.onPointerLeave,()=>{E.onTriggerLeave(),T.current=!1}),onPointerDown:composeEventHandlers$1(s.onPointerDown,()=>{_.current=!0,document.addEventListener("pointerup",P,{once:!0})}),onFocus:composeEventHandlers$1(s.onFocus,()=>{_.current||E.onOpen()}),onBlur:composeEventHandlers$1(s.onBlur,E.onClose),onClick:composeEventHandlers$1(s.onClick,E.onClose)})})});TooltipTrigger$1.displayName=TRIGGER_NAME$5;var PORTAL_NAME$4="TooltipPortal",[PortalProvider$3,usePortalContext$3]=createTooltipContext(PORTAL_NAME$4,{forceMount:void 0}),CONTENT_NAME$6="TooltipContent",TooltipContent$1=reactExports.forwardRef((s,a)=>{const i=usePortalContext$3(CONTENT_NAME$6,s.__scopeTooltip),{forceMount:o=i.forceMount,side:E="top",...j}=s,R=useTooltipContext(CONTENT_NAME$6,s.__scopeTooltip);return jsxRuntimeExports.jsx(Presence$1,{present:o||R.open,children:R.disableHoverableContent?jsxRuntimeExports.jsx(TooltipContentImpl,{side:E,...j,ref:a}):jsxRuntimeExports.jsx(TooltipContentHoverable,{side:E,...j,ref:a})})}),TooltipContentHoverable=reactExports.forwardRef((s,a)=>{const i=useTooltipContext(CONTENT_NAME$6,s.__scopeTooltip),o=useTooltipProviderContext(CONTENT_NAME$6,s.__scopeTooltip),E=reactExports.useRef(null),j=useComposedRefs$1(a,E),[R,C]=reactExports.useState(null),{trigger:S,onClose:_}=i,T=E.current,{onPointerInTransitChange:P}=o,N=reactExports.useCallback(()=>{C(null),P(!1)},[P]),I=reactExports.useCallback((M,D)=>{const B=M.currentTarget,F={x:M.clientX,y:M.clientY},O=getExitSideFromRect(F,B.getBoundingClientRect()),L=getPaddedExitPoints(F,O),$=getPointsFromRect(D.getBoundingClientRect()),V=getHull([...L,...$]);C(V),P(!0)},[P]);return reactExports.useEffect(()=>()=>N(),[N]),reactExports.useEffect(()=>{if(S&&T){const M=B=>I(B,T),D=B=>I(B,S);return S.addEventListener("pointerleave",M),T.addEventListener("pointerleave",D),()=>{S.removeEventListener("pointerleave",M),T.removeEventListener("pointerleave",D)}}},[S,T,I,N]),reactExports.useEffect(()=>{if(R){const M=D=>{const B=D.target,F={x:D.clientX,y:D.clientY},O=(S==null?void 0:S.contains(B))||(T==null?void 0:T.contains(B)),L=!isPointInPolygon$1(F,R);O?N():L&&(N(),_())};return document.addEventListener("pointermove",M),()=>document.removeEventListener("pointermove",M)}},[S,T,R,_,N]),jsxRuntimeExports.jsx(TooltipContentImpl,{...s,ref:j})}),[VisuallyHiddenContentContextProvider,useVisuallyHiddenContentContext]=createTooltipContext(TOOLTIP_NAME,{isInside:!1}),TooltipContentImpl=reactExports.forwardRef((s,a)=>{const{__scopeTooltip:i,children:o,"aria-label":E,onEscapeKeyDown:j,onPointerDownOutside:R,...C}=s,S=useTooltipContext(CONTENT_NAME$6,i),_=usePopperScope$2(i),{onClose:T}=S;return reactExports.useEffect(()=>(document.addEventListener(TOOLTIP_OPEN,T),()=>document.removeEventListener(TOOLTIP_OPEN,T)),[T]),reactExports.useEffect(()=>{if(S.trigger){const P=N=>{const I=N.target;I!=null&&I.contains(S.trigger)&&T()};return window.addEventListener("scroll",P,{capture:!0}),()=>window.removeEventListener("scroll",P,{capture:!0})}},[S.trigger,T]),jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:j,onPointerDownOutside:R,onFocusOutside:P=>P.preventDefault(),onDismiss:T,children:jsxRuntimeExports.jsxs(Content$2,{"data-state":S.stateAttribute,..._,...C,ref:a,style:{...C.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[jsxRuntimeExports.jsx(Slottable$1,{children:o}),jsxRuntimeExports.jsx(VisuallyHiddenContentContextProvider,{scope:i,isInside:!0,children:jsxRuntimeExports.jsx(Root$6,{id:S.contentId,role:"tooltip",children:E||o})})]})})});TooltipContent$1.displayName=CONTENT_NAME$6;var ARROW_NAME$3="TooltipArrow",TooltipArrow=reactExports.forwardRef((s,a)=>{const{__scopeTooltip:i,...o}=s,E=usePopperScope$2(i);return useVisuallyHiddenContentContext(ARROW_NAME$3,i).isInside?null:jsxRuntimeExports.jsx(Arrow,{...E,...o,ref:a})});TooltipArrow.displayName=ARROW_NAME$3;function getExitSideFromRect(s,a){const i=Math.abs(a.top-s.y),o=Math.abs(a.bottom-s.y),E=Math.abs(a.right-s.x),j=Math.abs(a.left-s.x);switch(Math.min(i,o,E,j)){case j:return"left";case E:return"right";case i:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function getPaddedExitPoints(s,a,i=5){const o=[];switch(a){case"top":o.push({x:s.x-i,y:s.y+i},{x:s.x+i,y:s.y+i});break;case"bottom":o.push({x:s.x-i,y:s.y-i},{x:s.x+i,y:s.y-i});break;case"left":o.push({x:s.x+i,y:s.y-i},{x:s.x+i,y:s.y+i});break;case"right":o.push({x:s.x-i,y:s.y-i},{x:s.x-i,y:s.y+i});break}return o}function getPointsFromRect(s){const{top:a,right:i,bottom:o,left:E}=s;return[{x:E,y:a},{x:i,y:a},{x:i,y:o},{x:E,y:o}]}function isPointInPolygon$1(s,a){const{x:i,y:o}=s;let E=!1;for(let j=0,R=a.length-1;j<a.length;R=j++){const C=a[j].x,S=a[j].y,_=a[R].x,T=a[R].y;S>o!=T>o&&i<(_-C)*(o-S)/(T-S)+C&&(E=!E)}return E}function getHull(s){const a=s.slice();return a.sort((i,o)=>i.x<o.x?-1:i.x>o.x?1:i.y<o.y?-1:i.y>o.y?1:0),getHullPresorted(a)}function getHullPresorted(s){if(s.length<=1)return s.slice();const a=[];for(let o=0;o<s.length;o++){const E=s[o];for(;a.length>=2;){const j=a[a.length-1],R=a[a.length-2];if((j.x-R.x)*(E.y-R.y)>=(j.y-R.y)*(E.x-R.x))a.pop();else break}a.push(E)}a.pop();const i=[];for(let o=s.length-1;o>=0;o--){const E=s[o];for(;i.length>=2;){const j=i[i.length-1],R=i[i.length-2];if((j.x-R.x)*(E.y-R.y)>=(j.y-R.y)*(E.x-R.x))i.pop();else break}i.push(E)}return i.pop(),a.length===1&&i.length===1&&a[0].x===i[0].x&&a[0].y===i[0].y?a:a.concat(i)}var Provider=TooltipProvider$1,Root3$1=Tooltip$1,Trigger$3=TooltipTrigger$1,Content2$4=TooltipContent$1;const TooltipProvider=Provider,Tooltip=Root3$1,TooltipTrigger=Trigger$3,TooltipContent=reactExports.forwardRef(({className:s,sideOffset:a=4,...i},o)=>jsxRuntimeExports.jsx(Content2$4,{ref:o,sideOffset:a,className:cn("z-[110001] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...i}));TooltipContent.displayName=Content2$4.displayName;const TooltipText=reactExports.forwardRef(({text:s,children:a,onClick:i,className:o,asChild:E=!1,delay:j=500},R)=>s!=null?jsxRuntimeExports.jsx(TooltipProvider,{disableHoverableContent:!1,delayDuration:j,children:jsxRuntimeExports.jsxs(Tooltip,{children:[jsxRuntimeExports.jsx(TooltipTrigger,{ref:R,asChild:E,onClick:C=>i&&i(),className:cn("flex items-center"),children:a}),jsxRuntimeExports.jsx(TooltipContent,{className:o,children:s})]})}):a);TooltipText.displayName="TooltipText";const transformAudit=(s,a)=>{var i,o;return s.metrics=a.filter(E=>{var j,R;return(R=(j=E==null?void 0:E.refs)==null?void 0:j.relevantAudits)==null?void 0:R.includes(s.id)}),s.files&&(s.files.type==="opportunity"||s.files.type==="table")&&((o=(i=s==null?void 0:s.files)==null?void 0:i.items)==null?void 0:o.length)>0&&(s.files.grouped_items=s.files.items.reduce((E,j)=>{let R="unknown";if(j.url&&typeof j.url!="string"){const{url:S,file_type:_}=j.url;_.value&&(R=_.value)}const C=E.find(S=>S.type===R);return C?C.items.push(j):E.push({type:R,items:[j]}),E},[])),s},transformReport=s=>{var j,R,C,S;const a=(R=(j=s.data)==null?void 0:j.page_speed)==null?void 0:R.metrics.map(_=>{var T,P;return{..._,potentialGain:_.refs?((T=_.refs)==null?void 0:T.weight)-((P=_.refs)==null?void 0:P.weight)/100*_.score:0}}),i=s.data.page_speed.audits.sort((_,T)=>_.score-T.score).map(_=>transformAudit(_,a)),o=(_,T)=>{var F,O,L,$;const P=_.settings.filter(V=>V.inputs[0].value).length>0,N=T.settings.filter(V=>V.inputs[0].value).length>0;if(P&&!N)return-1;if(!P&&N)return 1;const I=_.settings.length>0,M=T.settings.length>0;if(I&&!M)return-1;if(!I&&M)return 1;const D=(((O=(F=_.files)==null?void 0:F.items)==null?void 0:O.length)||0)>0,B=((($=(L=T.files)==null?void 0:L.items)==null?void 0:$.length)||0)>0;return D&&!B?-1:!D&&B?1:0},E={data:{performance:s.data.page_speed.performance?parseFloat((S=(C=s.data)==null?void 0:C.page_speed)==null?void 0:S.performance.toFixed(0)):0,...s.data.page_speed,grouped:{passed_audits:i.filter(_=>_.type==="passed_audit").sort(o),opportunities:i.filter(_=>_.type==="opportunity"),diagnostics:i.filter(_=>_.type==="diagnostics").sort((_,T)=>_.scoreDisplayMode==="informative"?1:-1)},metrics:a},success:s.success,revisions:s.data.revisions.map(({created_at:_,timestamp:T,data:P,id:N})=>({id:N,created_at:_,timestamp:T,data:{performance:P.performance}})),individual_file_actions:s.data["individual-file-actions"],state:s.state};return delete E.data.audits,E},transformSettings=s=>{var i,o,E,j,R,C;if(!s.success)return s;const a=((i=s==null?void 0:s.data)==null?void 0:i.performance)||[];return{general:{performance_gear:(E=(o=s==null?void 0:s.data)==null?void 0:o.general)==null?void 0:E.performance_gear,test_mode:((R=(j=s==null?void 0:s.data)==null?void 0:j.general)==null?void 0:R.test_mode)==="1"},actions:(C=s==null?void 0:s.data)==null?void 0:C.actions,data:a.map(S=>({...S,inputs:S.inputs.map(_=>({..._,..._.control_type==="checkbox"&&{value:_.value==="1"||_.value===!0},..._.inputs&&{inputs:_.inputs.map(T=>({...T,value:T.control_type==="checkbox"?T.value==="1"||T.value===!0:T.value}))}}))}))}},getCSSStatus=(s,a,i)=>{const o=new ApiService(s);return async(E,j)=>{try{const R=await o.getCSSJobStatus(a,i);return E({type:GET_CSS_STATUS_SUCCESS,payload:R.data}),R==null?void 0:R.data}catch{}}},getTestModeStatus=(s,a,i)=>{const o=new ApiService(s);return async(E,j)=>{try{const R=await o.getTestMode(a,i||"");return E({type:UPDATE_TEST_MODE,payload:R==null?void 0:R.data}),{success:!0}}catch(R){let C;return R instanceof Error?C=R.message:typeof R=="string"?C=R:C="An unknown error occurred",{success:!1,error:C}}}},getSummary=(s,a)=>{const i=new ApiService(s);return async(o,E)=>{try{const j=await i.getSummary(a);return o({type:a==="get_rapidload_cdn_usage"?GET_CDN_USAGE:a==="get_rapidload_image_usage"?GET_IMAGE_USAGE:GET_CACHE_USAGE,payload:j==null?void 0:j.data}),{success:!0}}catch(j){let R;return j instanceof Error?R=j.message:typeof j=="string"?R=j:R="An unknown error occurred",{success:!1,error:R}}}},getTitanOptimizationData=(s,a,i)=>{const o=new ApiService(s);return async(E,j)=>{try{const R=await o.getOptimizationData(a,i);return E({type:UPDATE_OPTIMIZE_TABLE,payload:R==null?void 0:R.data}),{success:!0,hasMoreData:(R==null?void 0:R.data)&&R.data.length>0}}catch(R){let C;return R instanceof Error?C=R.message:typeof R=="string"?C=R:C="An unknown error occurred",{success:!1,error:C}}}},searchData=(s,a,i,o)=>{const E=new ApiService(s);return async(j,R)=>{try{return await E.searchData(a,i,o)}catch(C){let S;return C instanceof Error?S=C.message:typeof C=="string"?S=C:S="An unknown error occurred",{data:null,success:!1,error:S}}}},deleteOptimizedData=(s,a)=>{const i=new ApiService(s);return async(o,E)=>{try{return await i.deleteOptimizedData(a)}catch(j){let R;return j instanceof Error?R=j.message:typeof j=="string"?R=j:R="An unknown error occurred",{url:null,success:!1,error:R}}}},saveGeneralSettings=(s,a)=>{const i=new ApiService(s);return async(o,E)=>{try{const j=await i.saveGeneralSettings(a);return{success:!0}}catch(j){let R;return j instanceof Error?R=j.message:typeof j=="string"?R=j:R="An unknown error occurred",{success:!1,error:R}}}},updateLicense=(s,a)=>{const i=new ApiService(s);return async(o,E)=>{try{const j=await i.updateLicense(a);return j.success?(o({type:LICENSE_INFORMATION,payload:j.data}),{success:!0,data:j.data}):{success:!1,error:j.data||"License update failed"}}catch(j){return{success:!1,error:j instanceof Error?j.message:"An unknown error occurred"}}}},getHomePagePerformance=(s,a)=>{const i=new ApiService(s);return async(o,E)=>{try{const j=await i.homePagePerformance();return o({type:HOME_PAGE_PERFORMANCE,payload:j.data}),{success:!0}}catch(j){return{success:!1,error:j instanceof Error?j.message:"An unknown error occurred"}}}},getAiPrediction=(s,a,i,o,E)=>{const j=new ApiService(s);return async(R,C)=>{try{const S=await j.getAiPrediction(a,i,{opportunities:o.opportunities.map(_=>({name:_.name,score:_.score,metrics:_.metrics.map(T=>T.refs.acronym),settings:_.settings.map(T=>T.name)})),diagnostics:o.diagnostics.map(_=>({name:_.name,score:_.score,metrics:_.metrics.map(T=>T.refs.acronym)}))},E.map(_=>({metric:_.refs.acronym,potentialGain:_.potentialGain,score:_.score,weight:_.weight,displayValue:_.displayValue})));return{success:!0,data:S==null?void 0:S.data}}catch(S){let _;return S instanceof Error?_=S.message:typeof S=="string"?_=S:_="An unknown error occurred",{success:!1,error:_}}}},fetchPosts=s=>{const a=new ApiService(s);return async i=>{try{const o=await a.fetchPosts();i({type:FETCH_POSTS,payload:o==null?void 0:o.data})}catch(o){o instanceof Error&&o.message}}},fetchReport=(s,a,i=!1,o,E)=>{const j=new ApiService(s);return async(R,C)=>{try{const S=C(),_=o?["mobile","desktop"]:[S.app.activeReport];for(const T of _){const P=S.app.report[T];if(P.loading||P.data&&!i)return;R({type:FETCH_REPORT_REQUEST,activeReport:T});const N=await j.fetchPageSpeed(a,T,i,E);R({type:FETCH_REPORT_SUCCESS,payload:{activeReport:T,data:transformReport(N)}})}}catch(S){S instanceof Error?R({type:FETCH_REPORT_FAILURE,error:S.message}):R({type:FETCH_REPORT_FAILURE,error:"Unknown error occurred"})}}},fetchSettings=(s,a,i=!1,o=!1)=>{const E=new ApiService(s);return async(j,R)=>{var C;try{const S=R(),_=S.app.activeReport,T=S.app.settings.performance[_];if(T.loading||((C=T==null?void 0:T.state)==null?void 0:C.length)>0&&!i)return;j({type:FETCH_SETTING_REQUEST,activeReport:_});const P=await E.fetchSettings(a,_,i);j({type:FETCH_SETTING_SUCCESS,payload:{activeReport:_,data:transformSettings(P)}})}catch(S){S instanceof Error?j({type:FETCH_SETTING_FAILURE,error:S.message}):j({type:FETCH_SETTING_FAILURE,error:"Unknown error occurred"})}}},updateSettings=(s,a,i,o)=>async(E,j)=>{var _,T,P,N;const R=j(),C=(_=R==null?void 0:R.app)==null?void 0:_.activeReport,S=((N=(P=(T=R==null?void 0:R.app)==null?void 0:T.settings.performance[C])==null?void 0:P.state)==null?void 0:N.map(I=>{if(I.name!==a.name)return I;const M=i.split(".");return{...I,inputs:I.inputs.map(D=>M.length>1?D!=null&&D.inputs&&D.key===M[0]?{...D,inputs:D==null?void 0:D.inputs.map(B=>B.key===M[1]?{...B,value:o}:B)}:D:D.key===i?{...D,value:o}:D)}}))||[];E({type:UPDATE_SETTINGS,payload:{settings:S}})},changeGear=s=>{const a=["Remove Unused CSS","Minify CSS","Minify Javascript","Page Cache","Self Host Google Fonts"],i=[...a,"RapidLoad CDN","Serve next-gen Images","Lazy Load Iframes","Lazy Load Images","Exclude LCP image from Lazy Load","Add Width and Height Attributes","Defer Javascript"],o=[...i.filter(E=>E!=="Remove Unused CSS"),"Delay Javascript","Critical CSS","Serve next-gen Images (AVIF, WEBP)"];return async(E,j)=>{var I,M,D,B;const R=j(),C=(I=R==null?void 0:R.app)==null?void 0:I.activeReport,S=(D=(M=R==null?void 0:R.app)==null?void 0:M.settings.performance[C])==null?void 0:D.state;if(((B=S==null?void 0:S.find(F=>F.category==="gear"))==null?void 0:B.inputs[0].value)===s)return;const T={starter:a,accelerate:i,turboMax:o},P=(S==null?void 0:S.map(F=>({...F,inputs:F.inputs.map((O,L)=>{var $;return{...O,value:L===0?F.category==="gear"?s:s==="custom"?O.value:($=T[s])==null?void 0:$.includes(F.name):O.value}})})))||[],N=s in T?T[s]:void 0;return E({type:CHANGE_GEAR,payload:{settings:P,mode:s}}),Promise.resolve(N)}},changeReport=s=>async(a,i)=>{a({type:CHANGE_REPORT_TYPE,reportType:s})},updateFileAction=(s,a,i,o)=>async(E,j)=>{E({type:UPDATE_FILE_ACTION,payload:{audit:s,file:a,value:i,prev:o}})},updateDiagnosticResults=(s,a,i)=>{const o=new ApiService(s);return async(E,j)=>{var S;const R=j(),C=(S=R==null?void 0:R.app)==null?void 0:S.activeReport;try{const _=await o.updateDiagnosticResults(a,C,i),T=i||_.data.diagnose_data[C].data;return E({type:SET_DIAGNOSTIC_RESULTS,payload:T}),{success:!0}}catch(_){let T;return _ instanceof Error?T=_.message:typeof _=="string"?T=_:T="An unknown error occurred",{success:!1,error:T}}}};function ArrowLeftIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const ForwardRef$m=reactExports.forwardRef(ArrowLeftIcon);function ArrowLongRightIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 8.25 21 12m0 0-3.75 3.75M21 12H3"}))}const ForwardRef$l=reactExports.forwardRef(ArrowLongRightIcon);function ArrowRightIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const ForwardRef$k=reactExports.forwardRef(ArrowRightIcon);function ArrowTopRightOnSquareIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}const ForwardRef$j=reactExports.forwardRef(ArrowTopRightOnSquareIcon);function ArrowTrendingDownIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"}))}const ForwardRef$i=reactExports.forwardRef(ArrowTrendingDownIcon);function ArrowTrendingUpIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const ForwardRef$h=reactExports.forwardRef(ArrowTrendingUpIcon);function ArrowUpIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"}))}const ForwardRef$g=reactExports.forwardRef(ArrowUpIcon);function CalendarIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const ForwardRef$f=reactExports.forwardRef(CalendarIcon);function CheckCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ForwardRef$e=reactExports.forwardRef(CheckCircleIcon);function DevicePhoneMobileIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 1.5H8.25A2.25 2.25 0 0 0 6 3.75v16.5a2.25 2.25 0 0 0 2.25 2.25h7.5A2.25 2.25 0 0 0 18 20.25V3.75a2.25 2.25 0 0 0-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"}))}const ForwardRef$d=reactExports.forwardRef(DevicePhoneMobileIcon);function EllipsisHorizontalCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ForwardRef$c=reactExports.forwardRef(EllipsisHorizontalCircleIcon);function InboxIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 13.5h3.86a2.25 2.25 0 0 1 2.012 1.244l.256.512a2.25 2.25 0 0 0 2.013 1.244h3.218a2.25 2.25 0 0 0 2.013-1.244l.256-.512a2.25 2.25 0 0 1 2.013-1.244h3.859m-19.5.338V18a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18v-4.162c0-.224-.034-.447-.1-.661L19.24 5.338a2.25 2.25 0 0 0-2.15-1.588H6.911a2.25 2.25 0 0 0-2.15 1.588L2.35 13.177a2.25 2.25 0 0 0-.1.661Z"}))}const ForwardRef$b=reactExports.forwardRef(InboxIcon);function InformationCircleIcon$1({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const ForwardRef$a=reactExports.forwardRef(InformationCircleIcon$1);function LinkIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const ForwardRef$9=reactExports.forwardRef(LinkIcon);function MagnifyingGlassIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const ForwardRef$8=reactExports.forwardRef(MagnifyingGlassIcon);function PencilSquareIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const ForwardRef$7=reactExports.forwardRef(PencilSquareIcon);function PlusIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const ForwardRef$6=reactExports.forwardRef(PlusIcon);function TrashIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const ForwardRef$5=reactExports.forwardRef(TrashIcon);function XCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ForwardRef$4=reactExports.forwardRef(XCircleIcon);function XMarkIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const ForwardRef$3=reactExports.forwardRef(XMarkIcon),useTestModeUtils=()=>{const{options:s}=useAppContext(),{dispatch:a}=useCommonDispatch(),{toast:i}=useToast(),[o,E]=reactExports.useState(null);let j=s==null?void 0:s.optimizer_url;return{handleTestModeSwitchChange:C=>new Promise(async(S,_)=>{try{a(setCommonState("testModeStatus",C)),a(setCommonState("testModeLoading",!0)),o&&clearTimeout(o);const T=setTimeout(async()=>{const P=await a(getTestModeStatus(s,j,String(C)));P.success?(a(setCommonState("testModeLoading",!1)),i({description:jsxRuntimeExports.jsxs("div",{className:"flex gap-2 text-left items-center",children:[jsxRuntimeExports.jsx("div",{className:"h-12 w-12 flex bg-green-200 justify-center items-center rounded-lg",children:jsxRuntimeExports.jsx(ForwardRef$x,{className:"h-6 w-6 text-green-600"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsxs("span",{className:"font-semibold dark:text-brand-300",children:["Test Mode turned ",C?"on":"off"," successfully"]}),jsxRuntimeExports.jsx("span",{className:"font-normal text-xs text-zinc-600 dark:text-brand-400",children:C?"Changes will not affect the live site.":"All changes will be applied to the live site."})]})]}),className:"p-3"})):(i({description:jsxRuntimeExports.jsxs("div",{className:"flex gap-2 text-left items-center",children:[jsxRuntimeExports.jsx("div",{className:"h-12 w-12 flex bg-red-200 justify-center items-center rounded-lg",children:jsxRuntimeExports.jsx(ForwardRef$n,{className:"h-6 w-6 text-red-600"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"font-semibold dark:text-brand-300",children:"Failed to turn on Test Mode"}),jsxRuntimeExports.jsx("span",{className:"font-normal text-xs text-zinc-600 dark:text-brand-400",children:P.error})]})]}),className:"p-3"},5e5),a(setCommonState("testModeStatus",!1)),a(setCommonState("testModeLoading",!1))),S(P)},1e3);E(T)}catch(T){_(T)}})}};function Cog6ToothIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M7.84 1.804A1 1 0 0 1 8.82 1h2.36a1 1 0 0 1 .98.804l.331 1.652a6.993 6.993 0 0 1 1.929 1.115l1.598-.54a1 1 0 0 1 1.186.447l1.18 2.044a1 1 0 0 1-.205 1.251l-1.267 1.113a7.047 7.047 0 0 1 0 2.228l1.267 1.113a1 1 0 0 1 .206 1.25l-1.18 2.045a1 1 0 0 1-1.187.447l-1.598-.54a6.993 6.993 0 0 1-1.929 1.115l-.33 1.652a1 1 0 0 1-.98.804H8.82a1 1 0 0 1-.98-.804l-.331-1.652a6.993 6.993 0 0 1-1.929-1.115l-1.598.54a1 1 0 0 1-1.186-.447l-1.18-2.044a1 1 0 0 1 .205-1.251l1.267-1.114a7.05 7.05 0 0 1 0-2.227L1.821 7.773a1 1 0 0 1-.206-1.25l1.18-2.045a1 1 0 0 1 1.187-.447l1.598.54A6.992 6.992 0 0 1 7.51 3.456l.33-1.652ZM10 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"}))}const ForwardRef$2=reactExports.forwardRef(Cog6ToothIcon);function ExclamationCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const ForwardRef$1=reactExports.forwardRef(ExclamationCircleIcon);function InformationCircleIcon({title:s,titleId:a,...i},o){return reactExports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:o,"aria-labelledby":a},i),s?reactExports.createElement("title",{id:a},s):null,reactExports.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-7-4a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM9 9a.75.75 0 0 0 0 1.5h.253a.25.25 0 0 1 .244.304l-.459 2.066A1.75 1.75 0 0 0 10.747 15H11a.75.75 0 0 0 0-1.5h-.253a.25.25 0 0 1-.244-.304l.459-2.066A1.75 1.75 0 0 0 9.253 9H9Z",clipRule:"evenodd"}))}const ForwardRef=reactExports.forwardRef(InformationCircleIcon),TimeAgo=({timestamp:s})=>{const a=timeAgo(s),[i,o]=reactExports.useState(a);return reactExports.useEffect(()=>{const E=setInterval(()=>{o(timeAgo(s))},6e4);return()=>clearInterval(E)},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:timeAgo(s)})},UrlPreview=()=>{var M,D,B,F,O,L;reactExports.useState(!1);const{data:s,loading:a,error:i,activeReport:o}=useSelector(optimizerData),{report:E}=useSelector($=>$.app),{mobile:j,desktop:R}=E,{headerUrl:C}=useCommonDispatch(),{togglePerformance:S,options:_}=useAppContext(),T=_.optimizer_url,P=(M=s==null?void 0:s.loadingExperience)!=null&&M.initial_url?decodeURIComponent(s.loadingExperience.initial_url.replace("?rapidload_preview","")):null,N=P&&P===C?P:C||T,I=($,V=30)=>$.length>V?`${$.substring(0,V)}...`:$;return jsxRuntimeExports.jsx("div",{className:"flex flex-row flex-1 gap-3 items-center justify-center",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center",children:[jsxRuntimeExports.jsx("div",{className:"text-sm items-center cursor-default text-ellipsis truncate md:max-w-sm lg:max-w-xl ",children:jsxRuntimeExports.jsx(TooltipText,{text:N,children:I(N)})}),!i&&jsxRuntimeExports.jsx("div",{className:"flex h-4 items-center text-xxs leading-relaxed text-brand-500 cursor-default",children:s?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[((D=s==null?void 0:s.loadingExperience)==null?void 0:D.timestamp)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Last analyzed ",jsxRuntimeExports.jsx(TimeAgo,{timestamp:s.loadingExperience.timestamp})]}),o==="mobile"&&((B=j==null?void 0:j.data)==null?void 0:B.performance)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Dot,{className:"w-6 text-brand-400"}),jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center",children:[Number((F=j==null?void 0:j.data)==null?void 0:F.performance).toFixed(0)," Mobile"]})]}),o==="desktop"&&((O=j==null?void 0:j.data)==null?void 0:O.performance)&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Dot,{className:"w-6 text-brand-400"}),jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center",children:[Number((L=R==null?void 0:R.data)==null?void 0:L.performance).toFixed(0),"  Desktop"]})]})]}):jsxRuntimeExports.jsx("div",{className:"w-52 bg-brand-300 dark:bg-brand-600 animate-pulse h-2.5 rounded-sm mt-1"})})]})})},ErrorFetch=({error:s,className:a,icon:i=!0})=>jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col gap-2",a),children:[jsxRuntimeExports.jsx("div",{className:"w-fit",children:i&&jsxRuntimeExports.jsx(ForwardRef$1,{className:"w-8 fill-red-500"})}),jsxRuntimeExports.jsx("div",{className:"justify-start",children:i&&jsxRuntimeExports.jsx(UrlPreview,{})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-md ",children:"Oops! Something went wrong"}),jsxRuntimeExports.jsxs("span",{className:"text-sm text-brand-700 dark:text-brand-300",children:["Refresh the page, If the error persists",jsxRuntimeExports.jsx("br",{}),"please ",jsxRuntimeExports.jsx("a",{target:"_blank",className:"text-purple-750",href:"https://rapidload.zendesk.com/hc/en-us",children:"contact support"})]}),jsxRuntimeExports.jsxs("span",{className:cn("text-sm text-brand-500 dark:text-brand-200 border-t mt-2 pt-2 mb-6 max-w-[350px]",a),children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-brand-800 dark:text-brand-400",children:"Details:"})," ",s]})]})]});var DIALOG_NAME="Dialog",[createDialogContext,createDialogScope]=createContextScope$1(DIALOG_NAME),[DialogProvider,useDialogContext]=createDialogContext(DIALOG_NAME),Dialog$1=s=>{const{__scopeDialog:a,children:i,open:o,defaultOpen:E,onOpenChange:j,modal:R=!0}=s,C=reactExports.useRef(null),S=reactExports.useRef(null),[_=!1,T]=useControllableState({prop:o,defaultProp:E,onChange:j});return jsxRuntimeExports.jsx(DialogProvider,{scope:a,triggerRef:C,contentRef:S,contentId:useId(),titleId:useId(),descriptionId:useId(),open:_,onOpenChange:T,onOpenToggle:reactExports.useCallback(()=>T(P=>!P),[T]),modal:R,children:i})};Dialog$1.displayName=DIALOG_NAME;var TRIGGER_NAME$4="DialogTrigger",DialogTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeDialog:i,...o}=s,E=useDialogContext(TRIGGER_NAME$4,i),j=useComposedRefs$1(a,E.triggerRef);return jsxRuntimeExports.jsx(Primitive$1.button,{type:"button","aria-haspopup":"dialog","aria-expanded":E.open,"aria-controls":E.contentId,"data-state":getState$3(E.open),...o,ref:j,onClick:composeEventHandlers$1(s.onClick,E.onOpenToggle)})});DialogTrigger$1.displayName=TRIGGER_NAME$4;var PORTAL_NAME$3="DialogPortal",[PortalProvider$2,usePortalContext$2]=createDialogContext(PORTAL_NAME$3,{forceMount:void 0}),DialogPortal$1=s=>{const{__scopeDialog:a,forceMount:i,children:o,container:E}=s,j=useDialogContext(PORTAL_NAME$3,a);return jsxRuntimeExports.jsx(PortalProvider$2,{scope:a,forceMount:i,children:reactExports.Children.map(o,R=>jsxRuntimeExports.jsx(Presence$1,{present:i||j.open,children:jsxRuntimeExports.jsx(Portal$1,{asChild:!0,container:E,children:R})}))})};DialogPortal$1.displayName=PORTAL_NAME$3;var OVERLAY_NAME$1="DialogOverlay",DialogOverlay$1=reactExports.forwardRef((s,a)=>{const i=usePortalContext$2(OVERLAY_NAME$1,s.__scopeDialog),{forceMount:o=i.forceMount,...E}=s,j=useDialogContext(OVERLAY_NAME$1,s.__scopeDialog);return j.modal?jsxRuntimeExports.jsx(Presence$1,{present:o||j.open,children:jsxRuntimeExports.jsx(DialogOverlayImpl,{...E,ref:a})}):null});DialogOverlay$1.displayName=OVERLAY_NAME$1;var DialogOverlayImpl=reactExports.forwardRef((s,a)=>{const{__scopeDialog:i,...o}=s,E=useDialogContext(OVERLAY_NAME$1,i);return jsxRuntimeExports.jsx(ReactRemoveScroll,{as:Slot$1,allowPinchZoom:!0,shards:[E.contentRef],children:jsxRuntimeExports.jsx(Primitive$1.div,{"data-state":getState$3(E.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})}),CONTENT_NAME$5="DialogContent",DialogContent$1=reactExports.forwardRef((s,a)=>{const i=usePortalContext$2(CONTENT_NAME$5,s.__scopeDialog),{forceMount:o=i.forceMount,...E}=s,j=useDialogContext(CONTENT_NAME$5,s.__scopeDialog);return jsxRuntimeExports.jsx(Presence$1,{present:o||j.open,children:j.modal?jsxRuntimeExports.jsx(DialogContentModal,{...E,ref:a}):jsxRuntimeExports.jsx(DialogContentNonModal,{...E,ref:a})})});DialogContent$1.displayName=CONTENT_NAME$5;var DialogContentModal=reactExports.forwardRef((s,a)=>{const i=useDialogContext(CONTENT_NAME$5,s.__scopeDialog),o=reactExports.useRef(null),E=useComposedRefs$1(a,i.contentRef,o);return reactExports.useEffect(()=>{const j=o.current;if(j)return hideOthers(j)},[]),jsxRuntimeExports.jsx(DialogContentImpl,{...s,ref:E,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:composeEventHandlers$1(s.onCloseAutoFocus,j=>{var R;j.preventDefault(),(R=i.triggerRef.current)==null||R.focus()}),onPointerDownOutside:composeEventHandlers$1(s.onPointerDownOutside,j=>{const R=j.detail.originalEvent,C=R.button===0&&R.ctrlKey===!0;(R.button===2||C)&&j.preventDefault()}),onFocusOutside:composeEventHandlers$1(s.onFocusOutside,j=>j.preventDefault())})}),DialogContentNonModal=reactExports.forwardRef((s,a)=>{const i=useDialogContext(CONTENT_NAME$5,s.__scopeDialog),o=reactExports.useRef(!1),E=reactExports.useRef(!1);return jsxRuntimeExports.jsx(DialogContentImpl,{...s,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:j=>{var R,C;(R=s.onCloseAutoFocus)==null||R.call(s,j),j.defaultPrevented||(o.current||(C=i.triggerRef.current)==null||C.focus(),j.preventDefault()),o.current=!1,E.current=!1},onInteractOutside:j=>{var S,_;(S=s.onInteractOutside)==null||S.call(s,j),j.defaultPrevented||(o.current=!0,j.detail.originalEvent.type==="pointerdown"&&(E.current=!0));const R=j.target;((_=i.triggerRef.current)==null?void 0:_.contains(R))&&j.preventDefault(),j.detail.originalEvent.type==="focusin"&&E.current&&j.preventDefault()}})}),DialogContentImpl=reactExports.forwardRef((s,a)=>{const{__scopeDialog:i,trapFocus:o,onOpenAutoFocus:E,onCloseAutoFocus:j,...R}=s,C=useDialogContext(CONTENT_NAME$5,i),S=reactExports.useRef(null),_=useComposedRefs$1(a,S);return useFocusGuards(),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FocusScope,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:E,onUnmountAutoFocus:j,children:jsxRuntimeExports.jsx(DismissableLayer,{role:"dialog",id:C.contentId,"aria-describedby":C.descriptionId,"aria-labelledby":C.titleId,"data-state":getState$3(C.open),...R,ref:_,onDismiss:()=>C.onOpenChange(!1)})}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TitleWarning,{titleId:C.titleId}),jsxRuntimeExports.jsx(DescriptionWarning$1,{contentRef:S,descriptionId:C.descriptionId})]})]})}),TITLE_NAME$1="DialogTitle",DialogTitle$1=reactExports.forwardRef((s,a)=>{const{__scopeDialog:i,...o}=s,E=useDialogContext(TITLE_NAME$1,i);return jsxRuntimeExports.jsx(Primitive$1.h2,{id:E.titleId,...o,ref:a})});DialogTitle$1.displayName=TITLE_NAME$1;var DESCRIPTION_NAME$1="DialogDescription",DialogDescription$1=reactExports.forwardRef((s,a)=>{const{__scopeDialog:i,...o}=s,E=useDialogContext(DESCRIPTION_NAME$1,i);return jsxRuntimeExports.jsx(Primitive$1.p,{id:E.descriptionId,...o,ref:a})});DialogDescription$1.displayName=DESCRIPTION_NAME$1;var CLOSE_NAME="DialogClose",DialogClose=reactExports.forwardRef((s,a)=>{const{__scopeDialog:i,...o}=s,E=useDialogContext(CLOSE_NAME,i);return jsxRuntimeExports.jsx(Primitive$1.button,{type:"button",...o,ref:a,onClick:composeEventHandlers$1(s.onClick,()=>E.onOpenChange(!1))})});DialogClose.displayName=CLOSE_NAME;function getState$3(s){return s?"open":"closed"}var TITLE_WARNING_NAME="DialogTitleWarning",[WarningProvider,useWarningContext]=createContext2(TITLE_WARNING_NAME,{contentName:CONTENT_NAME$5,titleName:TITLE_NAME$1,docsSlug:"dialog"}),TitleWarning=({titleId:s})=>{const a=useWarningContext(TITLE_WARNING_NAME),i=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return reactExports.useEffect(()=>{s&&(document.getElementById(s)||console.error(i))},[i,s]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:s,descriptionId:a})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return reactExports.useEffect(()=>{var j;const E=(j=s.current)==null?void 0:j.getAttribute("aria-describedby");a&&E&&(document.getElementById(a)||console.warn(o))},[o,s,a]),null},Root$5=Dialog$1,Trigger$2=DialogTrigger$1,Portal=DialogPortal$1,Overlay=DialogOverlay$1,Content$1=DialogContent$1,Title=DialogTitle$1,Description$1=DialogDescription$1,Close=DialogClose,ROOT_NAME="AlertDialog",[createAlertDialogContext,createAlertDialogScope]=createContextScope$1(ROOT_NAME,[createDialogScope]),useDialogScope=createDialogScope(),AlertDialog$1=s=>{const{__scopeAlertDialog:a,...i}=s,o=useDialogScope(a);return jsxRuntimeExports.jsx(Root$5,{...o,...i,modal:!0})};AlertDialog$1.displayName=ROOT_NAME;var TRIGGER_NAME$3="AlertDialogTrigger",AlertDialogTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,...o}=s,E=useDialogScope(i);return jsxRuntimeExports.jsx(Trigger$2,{...E,...o,ref:a})});AlertDialogTrigger$1.displayName=TRIGGER_NAME$3;var PORTAL_NAME$2="AlertDialogPortal",AlertDialogPortal$1=s=>{const{__scopeAlertDialog:a,...i}=s,o=useDialogScope(a);return jsxRuntimeExports.jsx(Portal,{...o,...i})};AlertDialogPortal$1.displayName=PORTAL_NAME$2;var OVERLAY_NAME="AlertDialogOverlay",AlertDialogOverlay$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,...o}=s,E=useDialogScope(i);return jsxRuntimeExports.jsx(Overlay,{...E,...o,ref:a})});AlertDialogOverlay$1.displayName=OVERLAY_NAME;var CONTENT_NAME$4="AlertDialogContent",[AlertDialogContentProvider,useAlertDialogContentContext]=createAlertDialogContext(CONTENT_NAME$4),AlertDialogContent$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,children:o,...E}=s,j=useDialogScope(i),R=reactExports.useRef(null),C=useComposedRefs$1(a,R),S=reactExports.useRef(null);return jsxRuntimeExports.jsx(WarningProvider,{contentName:CONTENT_NAME$4,titleName:TITLE_NAME,docsSlug:"alert-dialog",children:jsxRuntimeExports.jsx(AlertDialogContentProvider,{scope:i,cancelRef:S,children:jsxRuntimeExports.jsxs(Content$1,{role:"alertdialog",...j,...E,ref:C,onOpenAutoFocus:composeEventHandlers$1(E.onOpenAutoFocus,_=>{var T;_.preventDefault(),(T=S.current)==null||T.focus({preventScroll:!0})}),onPointerDownOutside:_=>_.preventDefault(),onInteractOutside:_=>_.preventDefault(),children:[jsxRuntimeExports.jsx(Slottable$1,{children:o}),jsxRuntimeExports.jsx(DescriptionWarning,{contentRef:R})]})})})});AlertDialogContent$1.displayName=CONTENT_NAME$4;var TITLE_NAME="AlertDialogTitle",AlertDialogTitle$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,...o}=s,E=useDialogScope(i);return jsxRuntimeExports.jsx(Title,{...E,...o,ref:a})});AlertDialogTitle$1.displayName=TITLE_NAME;var DESCRIPTION_NAME="AlertDialogDescription",AlertDialogDescription$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,...o}=s,E=useDialogScope(i);return jsxRuntimeExports.jsx(Description$1,{...E,...o,ref:a})});AlertDialogDescription$1.displayName=DESCRIPTION_NAME;var ACTION_NAME="AlertDialogAction",AlertDialogAction$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,...o}=s,E=useDialogScope(i);return jsxRuntimeExports.jsx(Close,{...E,...o,ref:a})});AlertDialogAction$1.displayName=ACTION_NAME;var CANCEL_NAME="AlertDialogCancel",AlertDialogCancel$1=reactExports.forwardRef((s,a)=>{const{__scopeAlertDialog:i,...o}=s,{cancelRef:E}=useAlertDialogContentContext(CANCEL_NAME,i),j=useDialogScope(i),R=useComposedRefs$1(a,E);return jsxRuntimeExports.jsx(Close,{...j,...o,ref:R})});AlertDialogCancel$1.displayName=CANCEL_NAME;var DescriptionWarning=({contentRef:s})=>{const a=`\`${CONTENT_NAME$4}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${CONTENT_NAME$4}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, 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 \`${CONTENT_NAME$4}\`. 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.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return reactExports.useEffect(()=>{var o;document.getElementById((o=s.current)==null?void 0:o.getAttribute("aria-describedby"))||console.warn(a)},[a,s]),null},Root2$3=AlertDialog$1,Trigger2=AlertDialogTrigger$1,Portal2=AlertDialogPortal$1,Overlay2=AlertDialogOverlay$1,Content2$3=AlertDialogContent$1,Action=AlertDialogAction$1,Cancel=AlertDialogCancel$1,Title2=AlertDialogTitle$1,Description2=AlertDialogDescription$1;const AlertDialog=Root2$3,AlertDialogTrigger=Trigger2,AlertDialogPortal=({className:s,...a})=>jsxRuntimeExports.jsx(Portal2,{...a});AlertDialogPortal.displayName=Portal2.displayName;const AlertDialogOverlay=reactExports.forwardRef(({className:s,children:a,...i},o)=>jsxRuntimeExports.jsx(Overlay2,{className:cn("fixed inset-0 z-[120000] bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...i,ref:o}));AlertDialogOverlay.displayName=Overlay2.displayName;const AlertDialogContent=reactExports.forwardRef(({className:s,...a},i)=>{var o,E;return jsxRuntimeExports.jsxs(AlertDialogPortal,{container:((E=(o=document.getElementById("rapidload-optimizer-shadow-dom"))==null?void 0:o.shadowRoot)==null?void 0:E.getElementById("rapidload-page-optimizer-wrapper"))||document.body,children:[jsxRuntimeExports.jsx(AlertDialogOverlay,{}),jsxRuntimeExports.jsx(Content2$3,{asChild:!0,ref:i,className:cn("fixed left-[50%] top-[50%] z-[120000] 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 md:w-full",s),...a})]})});AlertDialogContent.displayName=Content2$3.displayName;const AlertDialogHeader=({className:s,...a})=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col space-y-2 text-center sm:text-left",s),...a});AlertDialogHeader.displayName="AlertDialogHeader";const AlertDialogFooter=({className:s,...a})=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...a});AlertDialogFooter.displayName="AlertDialogFooter";const AlertDialogTitle=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Title2,{ref:i,className:cn("text-lg font-semibold",s),...a}));AlertDialogTitle.displayName=Title2.displayName;const AlertDialogDescription=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Description2,{asChild:!0,ref:i,className:cn("text-sm text-muted-foreground",s),...a}));AlertDialogDescription.displayName=Description2.displayName;const AlertDialogAction=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Action,{ref:i,className:cn(buttonVariants(),s),...a}));AlertDialogAction.displayName=Action.displayName;const AlertDialogCancel=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Cancel,{ref:i,className:cn(buttonVariants({variant:"outline"}),"mt-2 sm:mt-0",s),...a}));AlertDialogCancel.displayName=Cancel.displayName;const semver=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,validateAndParse=s=>{if(typeof s!="string")throw new TypeError("Invalid argument expected string");const a=s.match(semver);if(!a)throw new Error(`Invalid argument not valid semver ('${s}' received)`);return a.shift(),a},isWildcard=s=>s==="*"||s==="x"||s==="X",tryParse=s=>{const a=parseInt(s,10);return isNaN(a)?s:a},forceType=(s,a)=>typeof s!=typeof a?[String(s),String(a)]:[s,a],compareStrings=(s,a)=>{if(isWildcard(s)||isWildcard(a))return 0;const[i,o]=forceType(tryParse(s),tryParse(a));return i>o?1:i<o?-1:0},compareSegments=(s,a)=>{for(let i=0;i<Math.max(s.length,a.length);i++){const o=compareStrings(s[i]||"0",a[i]||"0");if(o!==0)return o}return 0},compareVersions=(s,a)=>{const i=validateAndParse(s),o=validateAndParse(a),E=i.pop(),j=o.pop(),R=compareSegments(i,o);return R!==0?R:E&&j?compareSegments(E.split("."),j.split(".")):E||j?E?-1:1:0},useSubmitSettings=()=>{const{setShowOptimizer:s,options:a,modeData:i,savingData:o,setSavingData:E,invalidatingCache:j,setInvalidatingCache:R,global:C}=useAppContext(),S=useDispatch(),{settingsMode:_,headerUrl:T}=useCommonDispatch(),{fresh:P,touched:N,activeReport:I,data:M,settings:D,activeGear:B}=useSelector(optimizerData),{grouped:F,...O}=M||{};({...O});const L=T||(a==null?void 0:a.optimizer_url),{toast:$}=useToast();return{submitSettings:reactExports.useCallback(async(G=!1,K=!1)=>{if(o)return;const J=new ApiService(a);try{E(!0);const ne=await J.updateSettings(L,I,{settings:D,activeGear:B},K,G);if($({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Your settings have been saved successfully ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]})}),G){E(!1);const le={mobile:"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36",desktop:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"};try{R(!0),await J.post("clear_page_cache",{url:L});const ue=J.rest();compareVersions(a==null?void 0:a.rapidload_version,"2.2.11")>0?await J.post("preload_page",{url:a.optimizer_url,user_agent:I==="mobile"?le.mobile:le.desktop,nonce:a.nonce,job_id:M==null?void 0:M.job_id}):await ue.request("/ping",{url:a.optimizer_url,user_agent:I==="mobile"?le.mobile:le.desktop,nonce:a==null?void 0:a.nonce,job_id:M==null?void 0:M.job_id}),R(!1)}catch(ue){R(!1),$({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[ue.message," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]})})}S(fetchReport(a,L,!0))}S(fetchSettings(a,L,!0))}catch(ne){$({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[ne.message," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]})})}E(!1),R(!1)},[M,I,o,j,D,B])}},UnsavedChanges=({children:s,onClick:a,title:i,description:o,action:E="Save & Exit",onCancel:j,cancel:R,performanceGear:C})=>{const{touched:S,fresh:_,settings:T,settingsOriginal:P}=useSelector(optimizerData),{submitSettings:N}=useSubmitSettings();if(!C&&!(_||S))return jsxRuntimeExports.jsx("div",{onClick:M=>a(),children:s});const I=async()=>{C||await N(!1),a()};return jsxRuntimeExports.jsxs(AlertDialog,{children:[jsxRuntimeExports.jsx(AlertDialogTrigger,{asChild:!0,children:jsxRuntimeExports.jsx("div",{children:s})}),jsxRuntimeExports.jsx(AlertDialogContent,{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsxs(AlertDialogTitle,{className:"flex justify-between items-center",children:[i||"Continue without Saving?",jsxRuntimeExports.jsx(TooltipText,{text:"Close the Alert",children:jsxRuntimeExports.jsx(Cancel,{asChild:!0,children:jsxRuntimeExports.jsx(X,{className:"stroke-1"})})})]}),jsxRuntimeExports.jsx(AlertDialogDescription,{children:jsxRuntimeExports.jsx("div",{children:o||"You have changes that haven't been saved. If you are leave now, your edits will be lost."})})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogAction,{onClick:async M=>I(),children:E}),jsxRuntimeExports.jsx(AlertDialogCancel,{onClick:M=>j&&j(),children:R||"Discard"})]})]})})]})},MetricValue$1=({metric:s})=>{const[a,i,o,E]=usePerformanceColors(s.score);return jsxRuntimeExports.jsx("div",{style:{color:i||"#515151"},className:"text-md font-medium text-brand-500",children:s.displayValue})},PageSpeedScore=({pagespeed:s,priority:a=!0})=>{var ye;const[i,o]=reactExports.useState(!1),[E,j]=reactExports.useState(!1),{data:R,error:C,reanalyze:S,revisions:_,loading:T,activeReport:P}=useSelector(optimizerData);reactExports.useState(0);const[N,I]=reactExports.useState(!1),{dispatch:M,hoveredMetric:D,activeMetric:B,diagnosticLoading:F}=useCommonDispatch(),{dispatch:O}=useCommonDispatch(),{options:L,savingData:$,invalidatingCache:V}=useAppContext(),{settingsMode:G,testModeStatus:K,testModeLoading:J,inProgress:ne,headerUrl:le}=useCommonDispatch(),{testMode:ue}=useSelector(Ce=>Ce.app);reactExports.useState(null);const[ce,pe]=reactExports.useState((ue==null?void 0:ue.status)||!1),[xe,oe]=reactExports.useState(!1);useTestModeUtils();let Y=le||(L==null?void 0:L.optimizer_url);reactExports.useEffect(()=>{ue&&M(setCommonState("testModeStatus",ue.status||!1))},[ue]),reactExports.useEffect(()=>{pe(K),oe(J)},[K,J]),reactExports.useCallback(()=>{o(!i)},[i]);const ae={LARGEST_CONTENTFUL_PAINT_MS:"LCP",FIRST_INPUT_DELAY_MS:"FID",CUMULATIVE_LAYOUT_SHIFT_SCORE:"CLS",FIRST_CONTENTFUL_PAINT_MS:"FCP",INTERACTION_TO_NEXT_PAINT:"INP",EXPERIMENTAL_TIME_TO_FIRST_BYTE:"TTFB"},H=["LARGEST_CONTENTFUL_PAINT_MS","FIRST_INPUT_DELAY_MS","CUMULATIVE_LAYOUT_SHIFT_SCORE","FIRST_CONTENTFUL_PAINT_MS","INTERACTION_TO_NEXT_PAINT","EXPERIMENTAL_TIME_TO_FIRST_BYTE"],W=Ce=>ae[Ce]||Ce;H.map(Ce=>{var Ae,De;return{metricName:W(Ce),metric:(Ae=R==null?void 0:R.loadingExperience)!=null&&Ae.metrics?(De=R==null?void 0:R.loadingExperience)==null?void 0:De.metrics[Ce]:null}});let U=D,ie=Number((ye=U!=null&&U.potentialGain?U==null?void 0:U.potentialGain:0)==null?void 0:ye.toFixed(0));const[me,ee]=reactExports.useState(1);return reactExports.useEffect(()=>{ee(Ce=>Ce+1)},[]),reactExports.useEffect(()=>{E||M(setCommonState("activeMetric",null))},[E]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"w-full flex flex-col gap-4",children:[jsxRuntimeExports.jsxs(Card,{"data-tour":"speed-insights",className:cn("overflow-hidden border border-transparent flex flex-col sm:flex-row lg:flex-col justify-around dark:bg-brand-800",E&&"border-brand-200 dark:border-brand-800"),children:[jsxRuntimeExports.jsxs("div",{className:"flex px-2 py-2 justify-between ",children:[jsxRuntimeExports.jsxs("div",{"data-tour":"switch-report-strategy",className:"select-none relative flex dark:bg-brand-600/40 py-0.5 bg-[#E8E8E8] rounded-2xl cursor-pointer",children:[jsxRuntimeExports.jsx("div",{className:cn("absolute shadow-md translate-x-0 left-0.5 w-[48px] rounded-[15px] -z-1 duration-300 h-10 text-sm flex flex-column gap-2 px-4 py-3 font-medium dark:bg-brand-950 bg-brand-0",P==="desktop"&&"w-[51px] -translate-x-1 left-1/2")}),jsxRuntimeExports.jsx(TooltipText,{text:"Mobile",children:jsxRuntimeExports.jsx("div",{onClick:()=>M(changeReport("mobile")),className:`relative z-1 text-sm flex flex-column gap-2 pl-[18px] px-5 py-3 font-medium rounded-xl ${F&&"cursor-not-allowed opacity-90 pointer-events-none"}`,children:jsxRuntimeExports.jsx(ForwardRef$d,{className:"w-4 font-medium dark:text-brand-500"})})}),jsxRuntimeExports.jsx(TooltipText,{text:"Desktop",children:jsxRuntimeExports.jsx("div",{onClick:()=>M(changeReport("desktop")),className:`relative z-1 text-sm flex flex-column gap-2 pl-2 px-5 py-1 font-medium rounded-xl ${F&&"cursor-not-allowed opacity-90 pointer-events-none"}`,children:jsxRuntimeExports.jsx(Monitor,{className:"w-4 font-medium dark:text-brand-500 "})})})]}),jsxRuntimeExports.jsx("div",{className:"pl-2 pr-2 content-center",children:jsxRuntimeExports.jsxs("div",{className:"flex overflow-hidden ",children:[jsxRuntimeExports.jsx("div",{className:" rounded-xl transition-all delay-100","data-tour":"current-url",children:jsxRuntimeExports.jsx(UnsavedChanges,{title:"Analyze without applying optimization?",description:"Your changes are not saved yet. If you analyze now, your recent edits won't be included.",action:"Apply Optimization",cancel:"Discard & Analyze",onCancel:()=>{M(fetchReport(L,Y,!0)),O(setCommonState("openAudits",[]))},onClick:()=>{(!ne||!T)&&M(fetchReport(L,Y,!0)),O(setCommonState("openAudits",[]))},children:jsxRuntimeExports.jsx(TooltipText,{text:"Analyze the page",children:jsxRuntimeExports.jsx(AppButton,{asChild:!0,"data-tour":"analyze",className:cn("transition-none rounded-none h-8 px-3 pr-3 border-r-0 border-l-0 border-t-0 border-b-0 dark:border-r-0 dark:bg-brand-800 dark:hover:bg-brand-800 hover:bg-transparent"),variant:"outline",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-[1px] items-center dark:text-brand-300/90",children:jsxRuntimeExports.jsx(RefreshCw,{className:cn("w-4",T&&!F&&"animate-spin")})})})})})}),jsxRuntimeExports.jsx("div",{className:"rounded-xl transition-all delay-100","data-tour":"preview-button",children:jsxRuntimeExports.jsx(TooltipText,{text:"Preview",className:"dark:bg-brand-930/90 ",children:jsxRuntimeExports.jsx("div",{onClick:()=>{window.open(L.optimizer_url+"?rapidload_preview","_blank")},className:"flex items-center text-sm h-8 px-3",children:jsxRuntimeExports.jsx(ForwardRef$j,{className:"w-4"})})})})]})})]}),!C&&jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center text-center py-2",children:jsxRuntimeExports.jsx(UrlPreview,{})}),jsxRuntimeExports.jsx("div",{className:cn("content px-4 relative flex w-full sm:w-1/2 lg:w-full flex-col justify-center items-center gap-3  py-2.5",!C&&"px-4 lg:px-4 lg:pb-0 xl:px-8"),children:C?jsxRuntimeExports.jsx(ErrorFetch,{error:C}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"flex gap-6",children:jsxRuntimeExports.jsx("div",{className:"relative flex flex-col gap-3 px-4 items-center",children:jsxRuntimeExports.jsx("div",{className:"",children:!R||N?jsxRuntimeExports.jsx(Skeleton,{className:"w-44 h-44 rounded-full"}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{loading:S&&!F,performance:R!=null&&R.performance&&ie&&U?R.performance+ie>=99?99:R.performance+ie:R==null?void 0:R.performance,children:!!(U&&ie)&&jsxRuntimeExports.jsxs("div",{className:"flex gap-1 flex-col text-xxs font-normal",children:[jsxRuntimeExports.jsx("span",{children:U==null?void 0:U.title}),jsxRuntimeExports.jsxs("span",{className:"text-sm text-green-600 -ml-1",children:["+",ie]})]})})})})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center gap-1",children:[jsxRuntimeExports.jsxs("div",{children:[U?"Forecasted Score":"Performance"," "]}),jsxRuntimeExports.jsx("div",{className:"text-xs text-brand-500 dark:text-brand-300 font-light",children:"Values are estimated and may vary with Google Page Speed Insights."})]}),jsxRuntimeExports.jsxs("div",{className:"flex justify-around text-sm gap-4 font-normal w-full mb-5 text-brand-700 dark:text-brand-300",children:[jsxRuntimeExports.jsxs("div",{className:"flex lg:flex-col xl:flex-row items-center gap-1",children:[jsxRuntimeExports.jsx(PerformanceIcons,{icon:"fail"}),"0-49"]}),jsxRuntimeExports.jsxs("div",{className:"flex lg:flex-col xl:flex-row items-center gap-1",children:[jsxRuntimeExports.jsx(PerformanceIcons,{icon:"average"}),"50-89"]}),jsxRuntimeExports.jsxs("div",{className:"flex lg:flex-col xl:flex-row items-center gap-1",children:[jsxRuntimeExports.jsx(PerformanceIcons,{icon:"pass"}),"89-100"]})]})]})}),(R==null?void 0:R.metrics)&&jsxRuntimeExports.jsxs("div",{className:"border-t",children:[jsxRuntimeExports.jsxs(AppButton,{onClick:Ce=>!T&&j(Ae=>!Ae),variant:"outline",className:cn("select-none border-b border-l-0 border-t-0 border-r-0 rounded-none dark:bg-brand-800 text-center text-xs text-brand-600 py-2",E&&"border-b-0"),"data-tour":"expand-metrics",children:[E?"Collapse":"Expand"," Metrics"]}),!E&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{className:"flex justify-around my-2  px-2",onMouseLeave:()=>M(setCommonState("hoveredMetric",null)),children:R.metrics.map(Ce=>jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>M(setCommonState("hoveredMetric",Ce)),className:`text-xs text-center flex flex-col
                             gap-0.5 px-2 py-2 bg-brand-100/20 hover:bg-brand-100 cursor-default rounded-[14px] dark:bg-brand-800 dark:text-brand-300 dark:hover:bg-brand-950`,children:[jsxRuntimeExports.jsx("div",{className:"font-medium tracking-wider ",children:Ce.refs.acronym}),jsxRuntimeExports.jsx(MetricValue$1,{metric:Ce})]},Ce.id))})})]}),(R==null?void 0:R.metrics)&&E&&jsxRuntimeExports.jsxs("div",{className:cn("sticky top-0 w-full sm:w-1/2 lg:w-full border-l lg:border-l-0"),"data-tour":"metrics",children:[jsxRuntimeExports.jsxs("div",{onClick:Ce=>M(setCommonState("activeMetric",null)),className:cn("flex gap-3 items-center font-medium dark:hover:bg-brand-800/50  px-6 py-3 border-b lg:border-b-0 lg:border-t cursor-pointer text-sm",!B&&"bg-brand-100/80 dark:bg-brand-800/40 "),children:[jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(Hash,{className:"w-4 text-brand-400"})})," All Audits"]}),jsxRuntimeExports.jsx(Metrics$1,{performance:R==null?void 0:R.performance,metrics:R.metrics})]})]}),jsxRuntimeExports.jsx(SideBarActions,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{children:jsxRuntimeExports.jsx(Feedback$1,{},me)})]})})},PageSpeedScore$1=React8.memo(PageSpeedScore),ToastProvider=Provider$2,ToastViewport=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Viewport,{ref:i,className:cn("fixed top-0 z-[150000] flex max-h-screen w-fitt flex-col-reverse p-4 sm:bottom-0 sm:left-1/2 -translate-x-1/2 sm:top-auto sm:flex-col md:min-w-[400px]",s),...a}));ToastViewport.displayName=Viewport.displayName;const toastVariants=cva("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-bottom-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background",destructive:"destructive group border-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Toast=reactExports.forwardRef(({className:s,variant:a,...i},o)=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Root2$5,{ref:o,className:cn(toastVariants({variant:a}),s),...i})}));Toast.displayName=Root2$5.displayName;const ToastAction=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Action$1,{ref:i,className:cn("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",s),...a}));ToastAction.displayName=Action$1.displayName;const ToastClose=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Close$1,{ref:i,className:cn("absolute right-2 top-2 rounded-md p-1 text-foreground/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",s),"toast-close":"",...a,children:jsxRuntimeExports.jsx(X,{className:"h-4 w-4"})}));ToastClose.displayName=Close$1.displayName;const ToastTitle=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Title$1,{ref:i,className:cn("text-sm font-semibold",s),...a}));ToastTitle.displayName=Title$1.displayName;const ToastDescription=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Description$2,{ref:i,className:cn("text-sm opacity-90",s),...a}));ToastDescription.displayName=Description$2.displayName;function Toaster(){const{toasts:s}=useToast();return jsxRuntimeExports.jsxs(ToastProvider,{duration:3500,children:[s.map(function({id:a,title:i,description:o,action:E,...j}){return jsxRuntimeExports.jsxs(Toast,{className:"flex justify-center text-brand-800 dark:text-brand-200",...j,children:[jsxRuntimeExports.jsxs("div",{className:"grid gap-1",children:[i&&jsxRuntimeExports.jsx(ToastTitle,{children:i}),o&&jsxRuntimeExports.jsx(ToastDescription,{children:o})]}),E,jsxRuntimeExports.jsx(ToastClose,{})]},a)}),jsxRuntimeExports.jsx(ToastViewport,{})]})}const Description=({content:s,className:a})=>{const i=s==null?void 0:s.split(/\[(.*?)\]\((.*?)\)/);return jsxRuntimeExports.jsx("div",{className:cn("text-sm py-0 px-2",a),children:i==null?void 0:i.map((o,E)=>{if(E%3===1){const j=i[E+1];return jsxRuntimeExports.jsx("a",{className:"text-purple-750/80 dark:text-brand-500",href:j,target:"_blank",rel:"noopener noreferrer",children:o},E)}else return E%3===0?jsxRuntimeExports.jsx("span",{children:o},E):null})})},capitalizeCategory$1=s=>s==="css"||s==="cdn"?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1),Settings=({audit:s,max:a=2,type:i,auditSettings:o,className:E,hideActions:j,children:R})=>{const{settings:C}=useSelector(optimizerData),S=useDispatch(),{activeTab:_,openCategory:T,openAudits:P}=useCommonDispatch();return i=transformFileType(s,i),o||(o=s.settings),reactExports.useCallback((N,I,M)=>{S(updateSettings(s,N,M,I))},[C]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:o&&o.length>0&&jsxRuntimeExports.jsxs("div",{className:cn("flex flex-wrap gap-2 items-center",E),children:[R||"",o.filter(N=>i?N.category===i:!0).map((N,I)=>jsxRuntimeExports.jsxs("div",{className:cn("relative flex cursor-pointer gap-2 px-2 font-medium text-sm hover:bg-brand-100 dark:bg-brand-900 bg-brand-50 border w-fit rounded-xl items-center pr-2 py-1"),onClick:M=>{S(setCommonState("openCategory",N.category)),S(setCommonState("activeTab","configurations")),S(setCommonState("activeMetric",null)),S(setCommonState("auditsReturn",!0))},children:[jsxRuntimeExports.jsx(ForwardRef$E,{className:cn("h-6 w-6 text-gray-500")}),jsxRuntimeExports.jsxs("span",{className:"normal-case",children:["Go ",T===N.category?"Back":""," to ",capitalizeCategory$1(N.category)," Settings"]})]}))]},o.join(","))})};var semverCompare=function(a,i){for(var o=a.split("."),E=i.split("."),j=0;j<3;j++){var R=Number(o[j]),C=Number(E[j]);if(R>C)return 1;if(C>R)return-1;if(!isNaN(R)&&isNaN(C))return 1;if(isNaN(R)&&!isNaN(C))return-1}return 0};const version=getDefaultExportFromCjs(semverCompare),alertVariants=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Alert=reactExports.forwardRef(({className:s,variant:a,...i},o)=>jsxRuntimeExports.jsx("div",{ref:o,role:"alert",className:cn(alertVariants({variant:a}),s),...i}));Alert.displayName="Alert";const AlertTitle=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx("h5",{ref:i,className:cn("mb-1 font-medium leading-none tracking-tight",s),...a}));AlertTitle.displayName="AlertTitle";const AlertDescription=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx("div",{ref:i,className:cn("text-sm [&_p]:leading-relaxed",s),...a}));AlertDescription.displayName="AlertDescription";const FilesTableHeader=({audit:s,group:a,open:i,setOpen:o,index:E})=>{var T,P;const j=typeof a.items[0].url!="string"&&((P=(T=a.items[0].url)==null?void 0:T.file_type)==null?void 0:P.label)||a.type;let R=reactExports.useMemo(()=>{let N=j.toLowerCase();return N==="table"?"Additional Information":N==="unknown"?"Unattributable items":`${j} Files`},[a]);"grouped_items"in s.files&&s.files.grouped_items.length===1&&j.toLowerCase()==="unknown"&&(R="");let C=a.items;const S=C.filter(N=>!(N!=null&&N.passed))||[],_=C.filter(N=>N==null?void 0:N.passed)||[];return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{"data-tour":`${s.id}-file-group-${E}-header`,className:cn("flex flex-col xl:flex-row justify-between xl:items-center gap-3 xl:gap-2 font-medium text-sm capitalize px-4 py-3",i&&"border-b"),children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center px-2",children:[jsxRuntimeExports.jsx("div",{className:"flex gap-2",children:jsxRuntimeExports.jsx(TooltipText,{asChild:!0,text:`${i?"Hide":"Show"} ${R??R}`,children:jsxRuntimeExports.jsxs("button",{className:"flex gap-2",onClick:N=>o(I=>!I),children:[i?jsxRuntimeExports.jsx(ForwardRef$q,{className:"w-5 h-5 dark:text-brand-500 text-brand-900"}):jsxRuntimeExports.jsx(ForwardRef$p,{className:"w-5 h-5 dark:text-brand-500 text-brand-900"}),jsxRuntimeExports.jsx("span",{children:R||"Related Resources"})]})})}),jsxRuntimeExports.jsxs("div",{className:"opacity-50 text-xs",children:[S.length>0&&jsxRuntimeExports.jsxs("span",{children:[S.length," Resource",S.length>1?"s":""]}),S.length>0&&_.length>0&&", ",_.length>0&&jsxRuntimeExports.jsxs("span",{children:[_.length," Optimized Resource",_.length>1?"s":""]})]})]}),s.settings.length>0&&jsxRuntimeExports.jsx("div",{"data-tour":`${s.id}-group-${E}-settings`,className:"flex flex-col gap-3 xl:px-4",children:jsxRuntimeExports.jsx(Settings,{type:a.type,audit:s})})]})})},Accordion=({id:s="auditContent",isOpen:a,initialRender:i=!1,children:o,onAnimationComplete:E,onHeightChange:j,className:R,...C})=>{const[S,_]=reactExports.useState(!i),T=reactExports.useRef(null),P={open:{height:"auto",opacity:1,overflow:"visible"},closed:{height:0,opacity:0,overflow:"hidden"}};return reactExports.useEffect(()=>{_(!1)},[]),jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:a&&jsxRuntimeExports.jsx(m$3.div,{ref:T,className:cn("w-full",R),variants:P,transition:{duration:.1},initial:S?"open":"closed",animate:"open",exit:"closed",...C,children:o},s)})},Accordion$1=React8.memo(Accordion),BYTE_UNITS=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],BIBYTE_UNITS=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],BIT_UNITS=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],BIBIT_UNITS=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],toLocaleString=(s,a,i)=>{let o=s;return typeof a=="string"||Array.isArray(a)?o=s.toLocaleString(a,i):(a===!0||i!==void 0)&&(o=s.toLocaleString(void 0,i)),o};function prettyBytes(s,a){if(!Number.isFinite(s))throw new TypeError(`Expected a finite number, got ${typeof s}: ${s}`);a={bits:!1,binary:!1,space:!0,...a};const i=a.bits?a.binary?BIBIT_UNITS:BIT_UNITS:a.binary?BIBYTE_UNITS:BYTE_UNITS,o=a.space?" ":"";if(a.signed&&s===0)return` 0${o}${i[0]}`;const E=s<0,j=E?"-":a.signed?"+":"";E&&(s=-s);let R;if(a.minimumFractionDigits!==void 0&&(R={minimumFractionDigits:a.minimumFractionDigits}),a.maximumFractionDigits!==void 0&&(R={maximumFractionDigits:a.maximumFractionDigits,...R}),s<1){const T=toLocaleString(s,a.locale,R);return j+T+o+i[0]}const C=Math.min(Math.floor(a.binary?Math.log(s)/Math.log(1024):Math.log10(s)/3),i.length-1);s/=(a.binary?1024:1e3)**C,R||(s=s.toPrecision(3));const S=toLocaleString(Number(s),a.locale,R),_=i[C];return j+S+o+_}function parseMilliseconds(s){if(typeof s!="number")throw new TypeError("Expected a number");const a=s>0?Math.floor:Math.ceil;return{days:a(s/864e5),hours:a(s/36e5)%24,minutes:a(s/6e4)%60,seconds:a(s/1e3)%60,milliseconds:a(s)%1e3,microseconds:a(s*1e3)%1e3,nanoseconds:a(s*1e6)%1e3}}const pluralize=(s,a)=>a===1?s:`${s}s`,SECOND_ROUNDING_EPSILON=1e-7;function prettyMilliseconds(s,a={}){if(!Number.isFinite(s))throw new TypeError("Expected a finite number");a.colonNotation&&(a.compact=!1,a.formatSubMilliseconds=!1,a.separateMilliseconds=!1,a.verbose=!1),a.compact&&(a.secondsDecimalDigits=0,a.millisecondsDecimalDigits=0);const i=[],o=(R,C)=>{const S=Math.floor(R*10**C+SECOND_ROUNDING_EPSILON);return(Math.round(S)/10**C).toFixed(C)},E=(R,C,S,_)=>{if((i.length===0||!a.colonNotation)&&R===0&&!(a.colonNotation&&S==="m"))return;_=(_||R||"0").toString();let T,P;if(a.colonNotation){T=i.length>0?":":"",P="";const N=_.includes(".")?_.split(".")[0].length:_.length,I=i.length>0?2:1;_="0".repeat(Math.max(0,I-N))+_}else T="",P=a.verbose?" "+pluralize(C,R):S;i.push(T+_+P)},j=parseMilliseconds(s);if(E(Math.trunc(j.days/365),"year","y"),E(j.days%365,"day","d"),E(j.hours,"hour","h"),E(j.minutes,"minute","m"),a.separateMilliseconds||a.formatSubMilliseconds||!a.colonNotation&&s<1e3)if(E(j.seconds,"second","s"),a.formatSubMilliseconds)E(j.milliseconds,"millisecond","ms"),E(j.microseconds,"microsecond","µs"),E(j.nanoseconds,"nanosecond","ns");else{const R=j.milliseconds+j.microseconds/1e3+j.nanoseconds/1e6,C=typeof a.millisecondsDecimalDigits=="number"?a.millisecondsDecimalDigits:0,S=R>=1?Math.round(R):Math.ceil(R),_=C?R.toFixed(C):S;E(Number.parseFloat(_),"millisecond","ms",_)}else{const R=s/1e3%60,C=typeof a.secondsDecimalDigits=="number"?a.secondsDecimalDigits:1,S=o(R,C),_=a.keepDecimalsOnWholeSeconds?S:S.replace(/\.0+$/,"");E(Number.parseFloat(_),"second","s",_)}if(i.length===0)return"0"+(a.verbose?" milliseconds":"ms");if(a.compact)return i[0];if(typeof a.unitCount=="number"){const R=a.colonNotation?"":" ";return i.slice(0,Math.max(a.unitCount,1)).join(R)}return a.colonNotation?i.join(""):i.join(" ")}const Indicator$1=({className:s,children:a})=>jsxRuntimeExports.jsx(TooltipText,{delay:0,text:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:a}),children:jsxRuntimeExports.jsx(Circle,{className:cn("w-2.5 fill-blue-500 stroke-0",s)})}),InProgress=()=>jsxRuntimeExports.jsx(Indicator$1,{className:"animate-pulse fill-orange-500",children:jsxRuntimeExports.jsxs("span",{className:"flex gap-2 items-center",children:[" ",jsxRuntimeExports.jsx(RefreshCcw,{className:"w-4 animate-spin text-orange-500"}),"Optimization in progress"]})}),AuditColumnImage=({cell:s})=>{var T;let[a,i]=reactExports.useState(!1);const[o,E]=reactExports.useState(null),[j,R]=reactExports.useState(null);let C=s.getValue().url?s.getValue().url:s.getValue();if(!C)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const S=C.includes("images.rapidload-cdn.io");let _="";return((T=s.table.options.meta)==null?void 0:T.type)==="image"&&s.table.options.columns.find(P=>P.id==="node")&&(_=s.row.getValue("node")),reactExports.useEffect(()=>(C&&S&&(async()=>{try{const N=await fetch(C);if(!N.ok)throw new Error("Failed to fetch image");const I=await N.blob(),M=URL.createObjectURL(I);R({redirected:N.redirected,status:N.status,statusText:N.statusText}),E(M),i(!0)}catch{E(C),i(!0)}})(),()=>{o&&URL.revokeObjectURL(o)}),[C]),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[(j==null?void 0:j.redirected)&&((j==null?void 0:j.status)===302||(j==null?void 0:j.status)===307)&&S&&jsxRuntimeExports.jsx(InProgress,{}),jsxRuntimeExports.jsxs(Tooltip,{children:[jsxRuntimeExports.jsx(TooltipTrigger,{children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"w-6 h-6",children:jsxRuntimeExports.jsx("div",{style:{backgroundImage:`url(${o||C})`},className:"w-6 h-6 bg-cover bg-center border rounded-md overflow-hidden"})}),C&&jsxRuntimeExports.jsxs("a",{className:"text-left",target:"_blank",href:C,children:[jsxRuntimeExports.jsx("span",{children:truncateMiddleOfURL(C,40)}),jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(ForwardRef$j,{className:"ml-1.5 inline-block w-3.5"})})]})]})}),jsxRuntimeExports.jsx(TooltipContent,{className:"max-w-[768px] min-w-[32px] min-h-[32px]",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-row items-center gap-3 py-1",children:[jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx("img",{alt:C,onError:()=>i(!0),onLoadCapture:()=>i(!0),className:"max-w-[160px]",src:o||C}),!a&&jsxRuntimeExports.jsx("div",{className:"absolute left-1/2 -translate-y-1/2 top-1/2 -translate-x-1/2",children:jsxRuntimeExports.jsx(CircleDashed,{className:"animate-spin text-purple-750 w-6"})})]}),_&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsxs("div",{children:[(_==null?void 0:_.nodeLabel)!==(_==null?void 0:_.selector)&&jsxRuntimeExports.jsx("span",{className:"ml-2 mb-2",children:C==null?void 0:C.nodeLabel}),jsxRuntimeExports.jsx(Code$1,{lang:"jsx",code:_==null?void 0:_.selector})]}),jsxRuntimeExports.jsx(Code$1,{code:_==null?void 0:_.snippet})]})]})})]})]})},AuditColumnUrl=({audit:s,cell:a,heading:i})=>{var j;let o=a.getValue(),E=!1;return a.table.options.columns.find(R=>R.id==="passed")&&(E=a.row.getValue("passed")),!o.toString().startsWith("data:image")&&(isImageAudit(s.id)||((j=o==null?void 0:o.file_type)==null?void 0:j.value)==="image")?jsxRuntimeExports.jsx(AuditColumnImage,{cell:a}):isUrl$1(o)?jsxRuntimeExports.jsxs("a",{className:"text-left",target:"_blank",href:o,children:[jsxRuntimeExports.jsx("span",{children:truncateMiddleOfURL(o,60)}),jsxRuntimeExports.jsx(ForwardRef$j,{className:"w-4 inline-block ml-2"})]}):typeof o=="object"&&typeof(o==null?void 0:o.url)=="string"?jsxRuntimeExports.jsxs("a",{className:"text-left inline-flex items-center align-middle",target:"_blank",href:o.url,children:[E&&jsxRuntimeExports.jsx("span",{className:"inline-flex gap-1 mr-1",children:jsxRuntimeExports.jsx(TooltipText,{text:"Successfully Optimized file",children:jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 inline-block text-green-600"})})}),jsxRuntimeExports.jsxs("span",{className:"items-center gap-2",children:[truncateMiddleOfURL(o.url,60)," ",jsxRuntimeExports.jsx(ForwardRef$j,{className:"w-4 inline-block -mt-0.5"})]})]}):jsxRuntimeExports.jsx("span",{children:o})},Select=Root2$6,SelectGroup=Group$1,SelectValue=Value,SelectTrigger=reactExports.forwardRef(({className:s,children:a,...i},o)=>jsxRuntimeExports.jsxs(Trigger$4,{ref:o,className:cn("flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),...i,children:[a,jsxRuntimeExports.jsx(Icon$1,{asChild:!0,children:jsxRuntimeExports.jsx(ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));SelectTrigger.displayName=Trigger$4.displayName;const SelectContent=reactExports.forwardRef(({className:s,children:a,position:i="popper",...o},E)=>jsxRuntimeExports.jsx(Content2$5,{ref:E,className:cn("relative z-50 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",i==="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",s),position:i,...o,children:jsxRuntimeExports.jsx(Viewport$1,{className:cn("p-1",i==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a})}));SelectContent.displayName=Content2$5.displayName;const SelectLabel=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Label$3,{ref:i,className:cn("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...a}));SelectLabel.displayName=Label$3.displayName;const SelectItem=reactExports.forwardRef(({className:s,children:a,...i},o)=>jsxRuntimeExports.jsxs(Item$1,{ref:o,className:cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...i,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator$1,{children:jsxRuntimeExports.jsx(Check,{className:"h-4 w-4"})})}),jsxRuntimeExports.jsx(ItemText,{children:a})]}));SelectItem.displayName=Item$1.displayName;const SelectSeparator=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Separator$1,{ref:i,className:cn("-mx-1 my-1 h-px bg-muted",s),...a}));SelectSeparator.displayName=Separator$1.displayName;const AuditColumnDropdown=({audit:s,heading:a,cell:i})=>{var V;const{getValue:o,row:E}=i;let j=E.getValue("url"),R=o();const{data:C,settings:S,changes:_}=useSelector(optimizerData);let T=_?_.files.filter(G=>G.file===j.url).map(G=>G.value):[];const P=(V=j==null?void 0:j.file_type)==null?void 0:V.value,N=reactExports.useMemo(()=>{var G,K;return(K=(G=C==null?void 0:C.meta)==null?void 0:G.controls.dropdown_options.filter(J=>J.type==P)[0])==null?void 0:K.options},[C,P]);if((R==null?void 0:R.control_type)!=="dropdown"||!R)return jsxRuntimeExports.jsx("span",{});const I=useDispatch(),[M,D]=reactExports.useState(R.value||"none"),B=reactExports.useCallback(G=>{let K=M;D(G),I(updateFileAction(s,j.url?j.url:j,G,K))},[M,s,j,I]),F=G=>{switch(G){case"none":return"No Action";default:return G}},O=reactExports.useCallback((G,K)=>{if(["javascript","js"].includes(K)){let J=S==null?void 0:S.find(ne=>ne.name==="Defer Javascript");if(J!=null&&J.inputs[0].value)return M==="defer"&&B("none"),G.filter(ne=>ne!=="defer")}return G},[S,M,B]),L=reactExports.useMemo(()=>{const G=O(N,P);return G==null?void 0:G.map(K=>jsxRuntimeExports.jsx(SelectItem,{className:"capitalize cursor-pointer",value:K,children:F(K)},K))},[N,P,M,S]),$=reactExports.useCallback(()=>{T!=null&&T.length&&B(T[0])},[T,B]);return N?jsxRuntimeExports.jsxs("div",{"data-tour":`${s.id}-file-action-${E.index}`,className:"relative",children:[T&&T.length>0&&T[0]!==T[T.length-1]&&jsxRuntimeExports.jsx("span",{className:"absolute -left-4 top-2",children:jsxRuntimeExports.jsx(TooltipText,{delay:0,text:jsxRuntimeExports.jsxs("span",{className:"flex gap-2 items-center",children:["This action has been changed",jsxRuntimeExports.jsxs("button",{onClick:$,className:"flex gap-2 border px-2 hover:bg-brand-100 dark:hover:bg-brand-800 rounded-xl text-xs items-center",children:[jsxRuntimeExports.jsx(Undo2,{className:"w-4 text-blue-500"})," Reset"]})]}),children:jsxRuntimeExports.jsx(Circle,{className:"w-2 fill-blue-500 stroke-0"})})}),jsxRuntimeExports.jsxs(Select,{value:M,onValueChange:B,children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-[180px] capitalize",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"Select action"})}),jsxRuntimeExports.jsx(SelectContent,{"data-tour":`${s.id}-file-action-${E.index}-content`,className:"z-[100001]",children:jsxRuntimeExports.jsxs(SelectGroup,{children:[jsxRuntimeExports.jsx(SelectLabel,{children:"Actions"}),L]})})]})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},AuditNodeColumn=({cell:s,heading:a})=>{var j,R,C,S;let i=s.getValue(),o=((R=(j=s.row.original)==null?void 0:j.subItems)==null?void 0:R.items[0])||{};if(!i)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});let E=i.snippet;return jsxRuntimeExports.jsxs("div",{className:"text-xs p-3",children:[jsxRuntimeExports.jsxs(Tooltip,{children:[jsxRuntimeExports.jsx(TooltipTrigger,{className:"w-full",children:jsxRuntimeExports.jsx(Code$1,{code:E})}),jsxRuntimeExports.jsxs(TooltipContent,{className:"flex flex-col",children:[(i==null?void 0:i.nodeLabel)!==(i==null?void 0:i.selector)&&jsxRuntimeExports.jsx("span",{className:"ml-2 mb-2",children:i==null?void 0:i.nodeLabel}),jsxRuntimeExports.jsx(Code$1,{lang:"css",code:i==null?void 0:i.selector})]})]}),((C=a==null?void 0:a.subItemsHeading)==null?void 0:C.key)&&((S=a==null?void 0:a.subItemsHeading)==null?void 0:S.key)in o&&jsxRuntimeExports.jsx("div",{className:"px-2 pt-2  min-w-max",children:o[a.subItemsHeading.key]})]})},SourceColumn=({cell:s})=>{let a=s.getValue();return jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("a",{target:"_blank",className:"hover:text-purple-750",href:a.url,children:a.url}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[jsxRuntimeExports.jsx("span",{className:"opacity-90 text-blue-800 dark:text-brand-400 text-xs capitalize",children:a.urlProvider}),jsxRuntimeExports.jsx(Circle,{className:"w-1.5 fill-brand-600 stroke-none"}),jsxRuntimeExports.jsxs("span",{className:"opacity-90 text-xs",children:[jsxRuntimeExports.jsx("span",{className:"text-blue-800 dark:text-brand-400",children:"Code Location :"})," Line ",a.line,", Column ",a.column]})]})]})})},AuditColumns=({audit:s,heading:a,cell:i})=>{var j,R,C,S;let o=i.getValue(),E=((R=(j=i.row.original)==null?void 0:j.subItems)==null?void 0:R.items[0])||{};return!o&&E?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:((C=a==null?void 0:a.subItemsHeading)==null?void 0:C.key)&&((S=a==null?void 0:a.subItemsHeading)==null?void 0:S.key)in E&&jsxRuntimeExports.jsx("div",{className:"px-2 pt-2 text-brand-500 dark:text-brand-300 min-w-max",children:E[a.subItemsHeading.key]})}):o?a.valueType==="url"?jsxRuntimeExports.jsx(AuditColumnUrl,{heading:a,audit:s,cell:i}):a.valueType==="controls"?jsxRuntimeExports.jsx(AuditColumnDropdown,{cell:i,audit:s,heading:a}):a.valueType==="bytes"?jsxRuntimeExports.jsx("span",{children:prettyBytes(o)}):["ms","timespanMs"].includes(a.valueType)?jsxRuntimeExports.jsx("span",{children:prettyMilliseconds(i.getValue())}):a.valueType==="node"?jsxRuntimeExports.jsx(AuditNodeColumn,{heading:a,cell:i}):a.valueType==="numeric"&&typeof o=="number"?jsxRuntimeExports.jsx("span",{children:formatNumberWithGranularity(o,a.granularity)}):a.valueType==="numeric"&&typeof o=="object"?jsxRuntimeExports.jsx("span",{children:o.value}):a.valueType==="source-location"?jsxRuntimeExports.jsx(SourceColumn,{cell:i}):typeof o=="object"?jsxRuntimeExports.jsx("span",{children:JSON.stringify(o)}):a.valueType==="text"?jsxRuntimeExports.jsx("span",{children:o}):jsxRuntimeExports.jsx("span",{children:JSON.stringify(o)}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},useTable=(s,a,i,o)=>{const E=createColumnHelper(),j=`table_${s.id}`,R=reactExports.useMemo(()=>a.map(_=>(_.key=_.key?_.key:_.label?_.label.toLowerCase():"no-key",E.accessor(T=>T[_.key],{id:_.key,meta:_,cell:T=>jsxRuntimeExports.jsx(AuditColumns,{audit:s,heading:_,cell:T}),header:()=>jsxRuntimeExports.jsx("span",{children:_.label}),enableHiding:!0}))),[a,s,E]),C=reactExports.useMemo(()=>{let _={pattern:!1,file_type:!1,passed:!1};isImageAudit(s.id)&&(_.node=!1);const T=i.flatMap(N=>Object.entries(N).filter(([I,M])=>M===""||typeof M=="object"&&Object.keys(M).length===0).map(([I])=>I));let P=Object.keys(i[0]);return P.includes("subItems")||(R.filter(N=>!P.includes(N.id?N.id:"")).forEach(N=>{N.id&&(_[N.id]=!1)}),T.forEach(N=>_[N]=!1)),_},[s.id,R,i]);return[useReactTable({data:i,columns:R,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel(),meta:{tableId:j,type:o},initialState:{pagination:{pageSize:5},columnVisibility:C},autoResetPageIndex:!1})]},FileTable=({audit:s,group:a,index:i,aiTable:o})=>{var R,C;if(!((R=a==null?void 0:a.items)!=null&&R.length))return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const E=S=>{switch(S){case"timespanMs":case"ms":return"160px";case"bytes":return"140px";case"controls":return"200px";default:return"auto"}},[j]=useTable(s,(a.headings?a.headings:(C=s==null?void 0:s.files)==null?void 0:C.headings)||[],a.items,a.type);return jsxRuntimeExports.jsxs("div",{"data-tour":`${s.id}-group-${i}-table`,className:cn(o?"px-0 py-0":"px-4 py-3"),children:[jsxRuntimeExports.jsx("div",{className:"w-full border rounded-[20px] overflow-hidden",children:jsxRuntimeExports.jsxs("table",{className:"w-full dark:text-brand-300 text-brand-800",children:[jsxRuntimeExports.jsx("thead",{children:j==null?void 0:j.getHeaderGroups().map(S=>jsxRuntimeExports.jsx("tr",{children:S.headers.map(_=>jsxRuntimeExports.jsx("th",{className:"first:pl-6 px-2 py-3 dark:bg-brand-900 bg-brand-100 font-medium text-xs text-left",children:_.isPlaceholder?null:flexRender(_.column.columnDef.header,_.getContext())},_.id))},S.id))}),jsxRuntimeExports.jsx("tbody",{children:j==null?void 0:j.getRowModel().rows.map(S=>jsxRuntimeExports.jsx("tr",{className:cn(),children:S.getVisibleCells().map(_=>{var T;return jsxRuntimeExports.jsx("td",{style:{width:E((T=_.column.columnDef.meta)==null?void 0:T.valueType)},className:cn("first:pl-4 py-2 border-t px-2 text-sm h-[50px] items-center"),children:flexRender(_.column.columnDef.cell,_.getContext())},_.id)})},S.id))})]})}),j.getPageCount()>1&&jsxRuntimeExports.jsx("div",{className:"w-full flex justify-end pb-0 py-2",children:jsxRuntimeExports.jsxs("ul",{className:"flex gap-1 items-center",children:[jsxRuntimeExports.jsx("li",{onClick:S=>{j.previousPage()},className:cn("disabled:opacity-30 hover:bg-brand-100 px-3 py-1 cursor-pointer rounded text-xs",!j.getCanPreviousPage()&&"opacity-30 cursor-no-drop"),children:jsxRuntimeExports.jsx(ChevronLeft,{className:"w-4"})}),[...Array(j.getPageCount())].map((S,_)=>jsxRuntimeExports.jsx("li",{className:cn("dark:hover:bg-brand-700 hover:bg-brand-100 border px-3 py-1.5 cursor-pointer rounded text-xs",j.getState().pagination.pageIndex===_?"dark:bg-brand-600 bg-brand-200":""),onClick:()=>{j.setPageIndex(T=>_)},children:_+1},_)),jsxRuntimeExports.jsx("li",{onClick:S=>{j.getCanNextPage()&&j.nextPage()},className:cn("disabled:opacity-30 hover:bg-brand-100 px-3 py-1 cursor-pointer rounded text-xs",!j.getCanNextPage()&&"opacity-30 cursor-no-drop"),children:jsxRuntimeExports.jsx(ChevronRight,{className:"w-4"})})]})})]})},FileTable$1=React8.memo(FileTable),FilesGroup=({audit:s,index:a,group:i,type:o="table"})=>{const[E,j]=reactExports.useState(o==="table"&&a===0||o==="list");return jsxRuntimeExports.jsxs("div",{"data-tour":`${s.id}-group-${a}`,className:cn("flex flex-col",o=="table"&&"border-t"),children:[o=="table"&&jsxRuntimeExports.jsx("div",{className:cn("flex flex-col gap-3 justify-center "),children:jsxRuntimeExports.jsx(FilesTableHeader,{index:a,audit:s,open:E,setOpen:j,group:i})}),jsxRuntimeExports.jsx(Accordion$1,{isOpen:E,children:jsxRuntimeExports.jsx(FileTable$1,{index:a,group:i,audit:s})})]})},TreeNode=({node:s,isLastChild:a=!1,isRoot:i=!1})=>jsxRuntimeExports.jsxs("div",{className:"relative pl-6",children:[!i&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"absolute top-0 left-2 h-3 border-l border-gray-300"}),jsxRuntimeExports.jsx("div",{className:"absolute top-3 left-2 w-3 border-t border-gray-300"})]}),s.children&&!i&&jsxRuntimeExports.jsx("div",{className:"absolute top-2.5 left-2 h-full border-l border-gray-300"}),!a&&!i&&jsxRuntimeExports.jsx("div",{className:"absolute top-2.5 left-2 h-full border-l border-gray-300"}),jsxRuntimeExports.jsx("div",{className:" mb-1",children:jsxRuntimeExports.jsxs("a",{href:s.request.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex gap-1 text-xs text-brand-700 hover:text-purple-750",children:[jsxRuntimeExports.jsxs("span",{children:[" ",truncateMiddleOfURL(s.request.url,50,!1)]}),jsxRuntimeExports.jsx("span",{className:"text-brand-400",children:prettyBytes(s.request.transferSize)})]})}),s.children&&jsxRuntimeExports.jsx("div",{children:Object.entries(s.children).map(([o,E],j,R)=>jsxRuntimeExports.jsx(TreeNode,{node:E,isLastChild:j===R.length-1},E.request.url))})]}),Treeview=({data:s})=>jsxRuntimeExports.jsx("div",{className:"p-4",children:jsxRuntimeExports.jsx(TreeNode,{node:s,isRoot:!0})}),auditPoints={"server-response-time":[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Time spent should be less than ",jsxRuntimeExports.jsx("span",{className:"text-brand-700 dark:text-brand-200",children:"600ms"}),"."]})],"dom-size":[jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Keep the number of DOM elements in the body section under ",jsxRuntimeExports.jsx("span",{className:"text-brand-700 dark:text-brand-200",children:"800"}),"."]})]},SupportCard=({audit:s,setHelpOpen:a})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"absolute flex flex-col gap-3 bottom-0 w-full h-fit px-6 py-4 bg-brand-50 border z-50 rounded-3xl",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[jsxRuntimeExports.jsx("h2",{className:"font-normal",children:"Why this audit is still not being resolved?"}),jsxRuntimeExports.jsx("button",{onClick:i=>a(!1),children:jsxRuntimeExports.jsx(X,{className:"text-brand-500 w-5 h-5"})})]}),jsxRuntimeExports.jsxs("div",{className:"py-2 px-2 text-sm",children:["This could be due to one or more of the following reasons",jsxRuntimeExports.jsx("ul",{className:"list-disc pl-6 mt-1 text-brand-700/80",children:jsxRuntimeExports.jsx("li",{children:"You have server-side caching on your website. Clear the server-side cache."})})]})]})}),AuditContent=({audit:s,helpOpen:a,setHelpOpen:i})=>{var R,C,S,_,T,P,N,I;const{options:o}=useAppContext();let E=reactExports.useMemo(()=>s.settings.filter(M=>{var D,B;return!((B=(D=s.files)==null?void 0:D.grouped_items)!=null&&B.map(F=>transformFileType(s,F.type)).includes(M.category))}),[]),j=reactExports.useMemo(()=>auditPoints[s.id]||[],[]);return jsxRuntimeExports.jsxs("div",{className:"relative border-t w-full pt-4",children:[a&&jsxRuntimeExports.jsx(SupportCard,{setHelpOpen:i,audit:s}),jsxRuntimeExports.jsx("div",{className:"pb-4 text-brand-700 dark:text-brand-300",children:jsxRuntimeExports.jsxs("div",{className:"px-4 ml-2",children:[jsxRuntimeExports.jsx(Description,{content:s.description}),version(o.rapidload_version,"2.1.14")===1&&["bootup-time","unused-javascript"].includes(s.id)&&s.type==="passed_audit"&&jsxRuntimeExports.jsxs(Alert,{className:"mt-4 flex items-center gap-2",children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Info$1,{className:"h-5 w-5 text-blue-500"})}),jsxRuntimeExports.jsxs(AlertDescription,{className:"flex items-center gap-1",children:["You can exclude delayed javascript files using ",jsxRuntimeExports.jsxs("span",{className:"flex items-center text-brand-900 font-medium",children:["RapidLoad dashboard ",jsxRuntimeExports.jsx(ArrowRight,{className:"w-4"})," Javascript"]})]})]}),j.length>0&&jsxRuntimeExports.jsx("ul",{className:"px-3 mt-2 flex text-sm gap-3 text-brand-500 dark:text-brand-400",children:j.map((M,D)=>M&&jsxRuntimeExports.jsxs("li",{className:"flex gap-1.5 items-center",children:[jsxRuntimeExports.jsx(Circle,{className:"w-2 stroke-none mt-[1px] fill-brand-300 dark:fill-brand-700"})," ",jsxRuntimeExports.jsx("span",{children:M})]},D))})]})}),s.settings.length>0&&E.length>0&&jsxRuntimeExports.jsx("div",{className:"border-t py-4 px-4",children:jsxRuntimeExports.jsxs("div",{"data-tour":`${s.id}-recommended-settings`,className:"w-fit flex flex-col gap-3",children:[jsxRuntimeExports.jsx("div",{className:"font-medium text-sm ml-2",children:s.settings.length!==E.length?"Additional Settings":"Recommended Settings"}),jsxRuntimeExports.jsx(Settings,{audit:s,auditSettings:E})]})}),((R=s.files)==null?void 0:R.type)==="criticalrequestchain"&&jsxRuntimeExports.jsx("div",{className:"border-t",children:jsxRuntimeExports.jsx(Treeview,{data:(C=s.files)==null?void 0:C.chains[Object.keys(s.files.chains)[0]]})}),(((S=s.files)==null?void 0:S.type)==="opportunity"||((_=s.files)==null?void 0:_.type)==="table")&&((P=(T=s.files)==null?void 0:T.grouped_items)==null?void 0:P.map((M,D)=>jsxRuntimeExports.jsx(FilesGroup,{index:D,audit:s,group:M},D))),((N=s.files)==null?void 0:N.type)==="list"&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(I=s.files)==null?void 0:I.items.map((M,D)=>{var B;return(M==null?void 0:M.type)==="table"&&((B=M.items)==null?void 0:B.length)>0&&jsxRuntimeExports.jsx(FilesGroup,{index:D,audit:s,group:M,type:"list"},D)})})]})};AuditContent.displayName="AuditContent";const Audit=reactExports.forwardRef(({audit:s,index:a,actions:i=!0,metrics:o=!0},E)=>{var F,O,L,$,V,G;useSelector(optimizerData);const{dispatch:j,openAudits:R}=useCommonDispatch();reactExports.useState(!1),reactExports.useState(!1);const[C,S]=reactExports.useState(!1),_=((O=(F=s.files)==null?void 0:F.items)==null?void 0:O.length)>0||s.settings.length>0,T=reactExports.useRef(null),P=useInView(T,{once:!0});if(!(s!=null&&s.id))return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const N=reactExports.useMemo(()=>R.includes(s.id),[R]),I=reactExports.useCallback(()=>{const J=R.includes(s.id)?R.filter(ne=>ne!==s.id):[...R,s.id];j(setCommonState("openAudits",J))},[R]);let M=s.icon;s.type==="passed_audit"&&(M="pass");const D=()=>{var le,ue;const K=((ue=(le=s.files)==null?void 0:le.items)==null?void 0:ue.length)||0,J=s.settings.length||0;if(K===0&&J===0)return"";let ne="";return J>0&&(ne+=` ${J} ${J===1?"Action":"Actions"}`),K>0&&(J>0&&(ne+=", "),ne+=` ${K} ${K===1?"Resource":"Resources"}`),`${ne}`},B=reactExports.useMemo(()=>s.settings.filter(K=>K.inputs[0].value),[s.settings]);return reactExports.useMemo(()=>s.metrics.reduce((K,J)=>J.potentialGain+K,0),[s.metrics]),jsxRuntimeExports.jsx("div",{id:`audit-${s.id}`,className:"w-full scroll-m-28",ref:T,children:jsxRuntimeExports.jsx(AnimatePresence,{children:P&&jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:(a||1)*.005},className:"relative w-full",children:jsxRuntimeExports.jsxs(Card,{"data-tour":`audit-${s.id}`,spreader:!!(($=(L=s==null?void 0:s.files)==null?void 0:L.items)!=null&&$.length)&&!N,className:cn("overflow-hidden w-full flex justify-center flex-col items-center p-0 dark:bg-brand-950",N?"shadow-lg dark:shadow-brand-950/30":"dark:hover:border-brand-700/70 hover:border-brand-400/60"),children:[jsxRuntimeExports.jsxs("div",{className:cn("min-h-[56px] relative flex justify-between w-full py-2 px-4"),children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-3 font-normal  items-center text-base",children:[jsxRuntimeExports.jsx("div",{className:"inline-flex items-center justify-center w-7 h-7 rounded-full dark:bg-brand-700 bg-brand-200/50",children:s.scoreDisplayMode==="informative"?jsxRuntimeExports.jsx("span",{className:"w-3 h-3 border-2 border-brand-400/60 rounded-full"}):jsxRuntimeExports.jsx(PerformanceIcons,{icon:M})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col justify-around",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-1.5 items-center",children:[s.name,o&&s.metrics&&jsxRuntimeExports.jsx("div",{className:"flex gap-1.5 text-xxs",children:s.metrics.map((K,J)=>jsxRuntimeExports.jsx("div",{children:(s.type!=="passed_audit"||s.scoreDisplayMode!=="informative")&&K.potentialGain>0?jsxRuntimeExports.jsx(TooltipText,{asChild:!0,text:s.type!=="passed_audit"&&s.scoreDisplayMode!=="informative"&&K.potentialGain>0&&`Potential +${K.potentialGain.toFixed(0)} Score Boost`,children:jsxRuntimeExports.jsxs("div",{className:cn("transition-colors flex gap-1 cursor-default hover:bg-brand-100 dark:hover:bg-brand-800 border py-1 px-1.5 rounded-md"),children:[K.refs.acronym,s.type!=="passed_audit"&&s.scoreDisplayMode!=="informative"&&K.potentialGain>0&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:K.potentialGain>=.5&&jsxRuntimeExports.jsxs("span",{className:cn("text-green-800"),children:[" +",K.potentialGain.toFixed(0)]})})]},K.id)}):jsxRuntimeExports.jsxs("div",{className:cn("transition-colors flex gap-1 cursor-default hover:bg-brand-100 dark:hover:bg-brand-800 border py-1 px-1.5 rounded-md"),children:[K.refs.acronym,jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:K.potentialGain>=.5&&jsxRuntimeExports.jsxs("span",{className:cn("text-green-800"),children:[" +",K.potentialGain.toFixed(0)]})})]},K.id)},J))}),B.length>0&&!N&&jsxRuntimeExports.jsx(TooltipText,{delay:0,text:jsxRuntimeExports.jsxs("span",{className:"text-sm text-center",children:[B.length," Active Action",B.length>1?"s":""]}),className:"flex flex-col border gap-2 bg-white dark:bg-brand-950 rounded-lg py-2 px-2",children:jsxRuntimeExports.jsxs("div",{onClick:()=>I(),className:cn("cursor-pointer select-none text-xs text-brand-700 dark:text-brand-500 hover:bg-brand-100 dark:hover:bg-brand-800 transition-colors items-center flex gap-1.5 rounded-2xl",B.length>1&&"border py-0.5 px-2"),children:[B.length>1?B.length:"",jsxRuntimeExports.jsx("div",{className:"bg-blue-500 w-1.5 h-1.5 shadow-lg rounded-full -right-1 -top-1"})]})})]}),jsxRuntimeExports.jsxs("span",{className:"flex text-xxs leading-tight opacity-70",children:[s.displayValue&&jsxRuntimeExports.jsx("span",{children:s.displayValue}),isDev]})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-3 items-center",children:[!N&&(((G=(V=s.files)==null?void 0:V.items)==null?void 0:G.length)>0||s.settings.length>0)&&jsxRuntimeExports.jsx("div",{className:"text-xs opacity-50",children:D()}),i&&jsxRuntimeExports.jsx(TooltipText,{text:_?"Show resources and actions":"Learn more about this audit",children:jsxRuntimeExports.jsxs("div",{"data-tour":a===0?"audits-show-actions":void 0,onClick:()=>I(),className:`min-w-[125px] cursor-pointer flex items-center gap-2 pl-4 pr-2 py-1.5 text-sm rounded-2xl dark:hover:bg-brand-800 hover:bg-brand-100 transition-colors ${N?" dark:bg-brand-900 border ":"border "}`,children:[_?N?"Hide Actions":"Show Actions":"Learn More",_?N?jsxRuntimeExports.jsx(ForwardRef$q,{className:"w-6 h-6 dark:text-brand-500 text-brand-900"}):jsxRuntimeExports.jsx(ForwardRef$p,{className:"w-6 h-6 dark:text-brand-500 text-brand-900"}):N?jsxRuntimeExports.jsx(ForwardRef$q,{className:"w-6 h-6 dark:text-brand-500 text-brand-900"}):jsxRuntimeExports.jsx(ForwardRef,{className:"w-6 h-6 dark:text-brand-500 text-brand-900"})]})})]})]}),jsxRuntimeExports.jsx(Accordion$1,{id:s.id,className:"audit-content",initialRender:!0,isOpen:N,children:jsxRuntimeExports.jsx(AuditContent,{helpOpen:C,setHelpOpen:S,audit:s})})]})},s.id)})})}),Audit$1=React8.memo(Audit),AuditSkeleton=()=>jsxRuntimeExports.jsx(Card,{spreader:!1,children:jsxRuntimeExports.jsxs("div",{className:"w-full flex justify-between px-4 py-3 rounded-3xl text-center bg-white h-14",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-7 h-7 rounded-full animate-pulse"}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-1",children:[jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-64 h-6 rounded-lg animate-pulse"}),jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-12 h-6 rounded-2xl border border-brand-200/50 animate-pulse"})]}),jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-52 h-2 rounded-lg"})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-3 items-center",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-16 h-3 rounded-2xl"}),jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-16 h-3 rounded-2xl"})]}),jsxRuntimeExports.jsx("div",{className:"bg-brand-100 w-36 h-full rounded-2xl animate-pulse border"})]})]})}),AuditList=({activeTab:s})=>{const{data:a,loading:i,reanalyze:o,error:E}=useSelector(optimizerData),j=reactExports.useMemo(()=>a?(a==null?void 0:a.grouped)[s]||[]:[],[s,a]);return jsxRuntimeExports.jsx(AnimatePresence,{initial:!1,children:i&&!o?new Array(5).fill(null).map((R,C)=>jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.2,delay:C*.05},className:"relative py-2",children:jsxRuntimeExports.jsx(AuditSkeleton,{},C)},`${C}-${s}`)):j.map((R,C)=>jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0,y:-5},animate:{opacity:1,y:0},transition:{delay:C*.005},className:"relative py-2",children:jsxRuntimeExports.jsx(Audit$1,{index:C,audit:R})},C)},R.id))})},AuditList$1=React8.memo(AuditList),Starter=({cls:s,isDark:a})=>jsxRuntimeExports.jsxs("svg",{className:`${s}`,width:"84",height:"75",viewBox:"0 0 74 65",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.7568 64.6651C49.946 63.7025 63.2062 49.2644 62.224 32.4198C62.0603 29.6926 61.5691 27.1258 60.7506 24.559L60.2595 24.8799C61.078 27.4467 61.5691 30.1739 61.5691 32.9011C61.5691 47.6601 49.2912 59.5315 34.2302 59.5315C33.7391 59.5315 33.248 59.5315 32.7568 59.5315V64.6651Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.41602 51.3504C10.982 59.3716 20.1496 64.3448 29.972 64.6656V59.2112C22.2778 57.9278 15.7295 54.5589 11.4731 47.9815L5.41602 51.3504Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.63385 20.3886C-1.2951 29.6932 -0.803979 40.1208 3.9435 48.9441L10.1643 45.4148C7.05392 38.8374 7.21763 31.2974 10.6555 24.8805L2.63385 20.3886Z",fill:a?"#404045":"#DDDFE4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.9723 0.335922C18.8403 1.61932 9.0179 8.19671 3.7793 17.8222L11.9646 22.4745C16.0573 16.5388 22.6055 12.849 29.8086 12.3677V0.335922H29.9723Z",fill:a?"#404045":"#DDDFE4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M60.9117 13.1694C54.1998 4.66694 43.7226 -0.306215 32.918 0.0146335V12.2069C38.8114 12.5277 44.2137 14.7737 48.4701 18.7843L60.9117 13.1694Z",fill:a?"#404045":"#DDDFE4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.4475 29.3722C34.5579 29.3722 37.1772 31.7785 37.1772 34.987C37.1772 38.0351 34.7216 40.6019 31.4475 40.6019C28.3371 40.6019 25.7178 38.1955 25.7178 34.987C25.7178 31.9389 28.3371 29.3722 31.4475 29.3722Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.4615 14.7733L50.436 26.1635L33.4106 37.3931L31.9372 34.8264L30.4639 32.2596L48.9627 23.5967L67.4615 14.7733Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M73.1907 11.7255L68.4433 16.5382H68.2795L68.1158 16.3778C67.9521 15.7361 67.7884 15.0944 67.461 14.6131C67.1336 14.1319 66.8062 13.6506 66.3151 13.1693C66.1514 13.1693 66.1514 13.0089 66.1514 12.8485C66.1514 12.8485 66.1514 12.8485 66.3151 12.688L73.027 11.0838C73.1907 11.0838 73.1907 11.0838 73.1907 11.2442C73.3544 11.5651 73.3544 11.7255 73.1907 11.7255Z",fill:"#673B9B"})]}),Accelerate=({cls:s,isDark:a})=>jsxRuntimeExports.jsxs("svg",{className:`${s}`,width:"84",height:"75",viewBox:"0 0 74 65",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.7568 64.6651C49.946 63.7025 63.2062 49.2644 62.224 32.4198C62.0603 29.6926 61.5691 27.1258 60.7506 24.559L60.2595 24.8799C61.078 27.4467 61.5691 30.1739 61.5691 32.9011C61.5691 47.6601 49.2912 59.5315 34.2302 59.5315C33.7391 59.5315 33.248 59.5315 32.7568 59.5315V64.6651Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.41602 51.3504C10.982 59.3716 20.1496 64.3448 29.972 64.6656V59.2112C22.2778 57.9278 15.7295 54.5589 11.4731 47.9815L5.41602 51.3504Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.63385 20.3886C-1.2951 29.6932 -0.803979 40.1208 3.9435 48.9441L10.1643 45.4148C7.05392 38.8374 7.21763 31.2974 10.6555 24.8805L2.63385 20.3886Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.9723 0.335922C18.8403 1.61932 9.0179 8.19671 3.7793 17.8222L11.9646 22.4745C16.0573 16.5388 22.6055 12.849 29.8086 12.3677V0.335922H29.9723Z",fill:a?"#404045":"#DDDFE4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M60.9117 13.1694C54.1998 4.66694 43.7226 -0.306215 32.918 0.0146335V12.2069C38.8114 12.5277 44.2137 14.7737 48.4701 18.7843L60.9117 13.1694Z",fill:a?"#404045":"#DDDFE4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.4475 29.3722C34.5579 29.3722 37.1772 31.7785 37.1772 34.987C37.1772 38.0351 34.7216 40.6019 31.4475 40.6019C28.3371 40.6019 25.7178 38.1955 25.7178 34.987C25.7178 31.9389 28.3371 29.3722 31.4475 29.3722Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.4615 14.7733L50.436 26.1635L33.4106 37.3931L31.9372 34.8264L30.4639 32.2596L48.9627 23.5967L67.4615 14.7733Z",fill:"#673B9B"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M73.1907 11.7255L68.4433 16.5382H68.2795L68.1158 16.3778C67.9521 15.7361 67.7884 15.0944 67.461 14.6131C67.1336 14.1319 66.8062 13.6506 66.3151 13.1693C66.1514 13.1693 66.1514 13.0089 66.1514 12.8485C66.1514 12.8485 66.1514 12.8485 66.3151 12.688L73.027 11.0838C73.1907 11.0838 73.1907 11.0838 73.1907 11.2442C73.3544 11.5651 73.3544 11.7255 73.1907 11.7255Z",fill:"#673B9B"})]}),TurboMax=({cls:s,isDark:a})=>jsxRuntimeExports.jsxs("svg",{className:`${s}`,width:"84",height:"75",viewBox:"0 0 74 65",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.7568 64.6651C49.946 63.7025 63.2062 49.2644 62.224 32.4198C62.0603 29.6926 61.5691 27.1258 60.7506 24.559L60.2595 24.8799C61.078 27.4467 61.5691 30.1739 61.5691 32.9011C61.5691 47.6601 49.2912 59.5315 34.2302 59.5315C33.7391 59.5315 33.248 59.5315 32.7568 59.5315V64.6651Z",fill:"#5B3786"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.41602 51.3504C10.982 59.3716 20.1496 64.3448 29.972 64.6656V59.2112C22.2778 57.9278 15.7295 54.5589 11.4731 47.9815L5.41602 51.3504Z",fill:"#5B3786"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.63385 20.3886C-1.2951 29.6932 -0.803979 40.1208 3.9435 48.9441L10.1643 45.4148C7.05392 38.8374 7.21763 31.2974 10.6555 24.8805L2.63385 20.3886Z",fill:"#5B3786"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M29.9723 0.335922C18.8403 1.61932 9.0179 8.19671 3.7793 17.8222L11.9646 22.4745C16.0573 16.5388 22.6055 12.849 29.8086 12.3677V0.335922H29.9723Z",fill:"#5B3786"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M60.9117 13.1694C54.1998 4.66694 43.7226 -0.306215 32.918 0.0146335V12.2069C38.8114 12.5277 44.2137 14.7737 48.4701 18.7843L60.9117 13.1694Z",fill:a?"#404045":"#DDDFE4"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.4475 29.3722C34.5579 29.3722 37.1772 31.7785 37.1772 34.987C37.1772 38.0351 34.7216 40.6019 31.4475 40.6019C28.3371 40.6019 25.7178 38.1955 25.7178 34.987C25.7178 31.9389 28.3371 29.3722 31.4475 29.3722Z",fill:"#5B3786"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M67.4615 14.7733L50.436 26.1635L33.4106 37.3931L31.9372 34.8264L30.4639 32.2596L48.9627 23.5967L67.4615 14.7733Z",fill:"#5B3786"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M73.1907 11.7255L68.4433 16.5382H68.2795L68.1158 16.3778C67.9521 15.7361 67.7884 15.0944 67.461 14.6131C67.1336 14.1319 66.8062 13.6506 66.3151 13.1693C66.1514 13.1693 66.1514 13.0089 66.1514 12.8485C66.1514 12.8485 66.1514 12.8485 66.3151 12.688L73.027 11.0838C73.1907 11.0838 73.1907 11.0838 73.1907 11.2442C73.3544 11.5651 73.3544 11.7255 73.1907 11.7255Z",fill:"#5B3786"})]}),Custom=({cls:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M0.986553 23.5573C0.63316 21.4302 0.644825 19.2934 0.98828 17.2273C3.1257 17.2793 5.04798 16.2538 5.79508 14.4501C6.5422 12.6464 5.90805 10.5621 4.35994 9.08741C5.57808 7.38357 7.08078 5.86437 8.83476 4.61017C10.3095 6.15916 12.3945 6.79386 14.1987 6.04655C16.0028 5.29923 17.0284 3.37612 16.9758 1.23802C19.1029 0.884625 21.2397 0.89629 23.3059 1.23975C23.254 3.37715 24.2795 5.29943 26.0832 6.04655C27.8868 6.79367 29.9712 6.15949 31.4459 4.61141C33.1497 5.82955 34.6689 7.33223 35.9232 9.08623C34.3741 10.561 33.7394 12.646 34.4866 14.4501C35.2339 16.2543 37.157 17.2799 39.2952 17.2273C39.6487 19.3544 39.637 21.4912 39.2935 23.5573C37.1561 23.5055 35.2337 24.5309 34.4866 26.3345C33.7396 28.1382 34.3737 30.2227 35.9218 31.6972C34.7036 33.4012 33.2009 34.9204 31.4471 36.1744C29.9723 34.6256 27.8873 33.9909 26.0832 34.7381C24.2789 35.4854 23.2535 37.4085 23.3059 39.5467C21.1787 39.9002 19.0419 39.8885 16.976 39.545C17.0278 37.4076 16.0023 35.4852 14.1987 34.7381C12.395 33.9911 10.3106 34.6252 8.83595 36.1733C7.1321 34.9551 5.6129 33.4524 4.3587 31.6986C5.9077 30.2238 6.54239 28.1388 5.79508 26.3345C5.04777 24.5304 3.12467 23.5049 0.986553 23.5573ZM20.1409 26.2153C23.3567 26.2153 25.9638 23.6082 25.9638 20.3924C25.9638 17.1764 23.3567 14.5694 20.1409 14.5694C16.9249 14.5694 14.318 17.1764 14.318 20.3924C14.318 23.6082 16.9249 26.2153 20.1409 26.2153Z",fill:"black"})}),width$2=34,SettingsLine=({width:s=400,category:a,flip:i=!1})=>{const[o,E]=reactExports.useState(!0);reactExports.useEffect(()=>{E(!0);const C=setTimeout(()=>{E(!1)},80);return()=>clearTimeout(C)},[a,s]);const j=`M${Math.min(s-(s-66),s-9.5)} 1C${Math.min(s-(s-66),s-9.5)} 8.5 ${Math.min(s-(s-72),s-9.5)} 8 ${Math.min(s-(s-75.5),s-9.5)} 8C${Math.min(s-(s-89.7),s-9.5)} 8 ${Math.min(s-(s-130.5),s-9.5)} 8 ${s-9.5} 8C${s-5.5} 8 ${s-.5} 9.5 ${s-.5} 15.5`,R=2;return jsxRuntimeExports.jsxs("div",{className:"absolute -left-7 top-0.5",children:[!o&&jsxRuntimeExports.jsx("svg",{className:`absolute selectionBar  ${i?"reverse-draw":"draw"}`,width:s,height:"16",viewBox:`0 0 ${s} 16`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{className:"dark:stroke-brand-600 stroke-purple-800/10",d:j,strokeWidth:R})}),jsxRuntimeExports.jsx("svg",{width:s,height:"16",viewBox:`0 0 ${s} 16`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{className:"dark:stroke-brand-500 stroke-purple-600/10",d:j,strokeWidth:R})})]})},AuditsLine=({cls:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:width$2,height:"40",viewBox:"0 0 8 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{className:"dark:stroke-brand-600 stroke-brand-300",d:"M0.5 0.5V12.5C0.5 17.5 4.3 17.5 7.5 17.5",strokeLinecap:"round",strokeLinejoin:"round"})}),width$1=34,height$1=34,IconBuilder=({children:s,bg:a="transparent"})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:width$1,height:height$1,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:a}),s]}),CSSDeliveryDuotone=()=>jsxRuntimeExports.jsx(IconBuilder,{children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 7.00689H8.07C7.53 7.00689 7.25 7.00689 7.16 7.16689C7.02665 7.35185 6.96938 7.58094 7 7.80689C7.00646 8.36465 6.97975 8.9223 6.92 9.47689C6.88923 9.73554 6.81127 9.98636 6.69 10.2169C6.52022 10.4949 6.28285 10.7254 6 10.8869C6.28821 11.0502 6.52669 11.2887 6.69 11.5769C6.85676 11.9408 6.94208 12.3366 6.94 12.7369L7 14.2969C7.00825 14.3648 7.03221 14.4299 7.07 14.4869C7.10698 14.5458 7.15868 14.5941 7.22 14.6269C7.48081 14.7409 7.76757 14.7824 8.05 14.7469H9.5V7.00689ZM11.9 14.7469H13.31C13.89 14.7469 14.11 14.7469 14.22 14.5969C14.3518 14.4297 14.416 14.2192 14.4 14.0069C14.3984 13.4154 14.4318 12.8244 14.5 12.2369C14.5414 11.9829 14.6295 11.7387 14.76 11.5169C14.9196 11.2689 15.1399 11.0658 15.4 10.9269C15.1402 10.7799 14.9151 10.5786 14.74 10.3369C14.6214 10.1426 14.5369 9.92958 14.49 9.70689C14.4433 9.24022 14.4133 8.80689 14.4 8.40689C14.3969 8.05251 14.3736 7.6986 14.33 7.34689C14.2882 7.24858 14.2141 7.16746 14.12 7.11689C13.858 7.02075 13.5781 6.98321 13.3 7.00689H11.9V14.7469Z",fill:"#BBBBBB",stroke:"#333333"})}),JavascriptDeliveryDuotone=()=>jsxRuntimeExports.jsx(IconBuilder,{children:jsxRuntimeExports.jsx("path",{d:"M13.0614 8.4258L15.315 10.6924C15.4283 10.8063 15.4283 10.9909 15.315 11.1048L13.0614 13.3714M7.93851 13.3714L5.68491 11.1048C5.57166 10.9909 5.57166 10.8063 5.68491 10.6924L7.93851 8.4258M11.1662 6.70001L9.92659 15",stroke:"#333333",strokeLinecap:"round"})}),ImageDeliverySVGDuotone=()=>jsxRuntimeExports.jsxs(IconBuilder,{children:[jsxRuntimeExports.jsx("circle",{cx:"8.40002",cy:"12.6",r:"3",fill:"#BBBBBB",stroke:"#333333"}),jsxRuntimeExports.jsx("circle",{cx:"13.6501",cy:"7.35004",r:"1.95",fill:"#BBBBBB",stroke:"#333333"})]}),FontDeliveryDuotone=()=>jsxRuntimeExports.jsxs(IconBuilder,{children:[jsxRuntimeExports.jsx("path",{d:"M11.1095 12.9899C11.053 13.2628 10.9683 13.4416 10.8366 13.5357C10.7049 13.6298 10.4696 13.6674 10.1309 13.6674L10.0933 14.8153C10.7895 14.8153 11.3165 14.693 11.674 14.4296C12.0222 14.1661 12.2574 13.7239 12.3891 13.084L13.1042 9.405H13.904L14.1675 8.44526H13.2924L13.4053 7.89952C13.4618 7.5796 13.6688 7.41023 14.0263 7.41023C14.2522 7.41023 14.4498 7.44787 14.6003 7.50433L14.9955 6.48812C14.6944 6.3658 14.3463 6.29994 13.9511 6.29994C13.49 6.29994 13.0948 6.45049 12.7561 6.73277C12.4174 7.01504 12.2009 7.38201 12.1163 7.83365L11.9939 8.44526H11.2506L11.0624 9.405H11.8058L11.1095 12.9899Z",fill:"#333333"}),jsxRuntimeExports.jsx("path",{d:"M6.30005 12.9617H7.67381L8.16309 10.4494H10.2049L10.4213 9.31085H8.38891L8.64296 8.00296H10.9388L11.1647 6.84562H7.49503L6.30005 12.9617Z",fill:"#333333"})]}),CloudDeliveryDuotone=()=>jsxRuntimeExports.jsxs(IconBuilder,{children:[jsxRuntimeExports.jsx("path",{d:"M7.70002 14.7C6.9279 14.7 6.26812 14.4244 5.72068 13.8731C5.17324 13.3219 4.89969 12.6481 4.90002 11.8519C4.90002 11.1694 5.09942 10.5612 5.49821 10.0275C5.89699 9.49374 6.41881 9.15249 7.06366 9.00374C7.27578 8.19874 7.70002 7.54686 8.33639 7.04811C8.97275 6.54936 9.69396 6.29999 10.5 6.29999C11.4928 6.29999 12.335 6.65664 13.0266 7.36994C13.7183 8.08324 14.064 8.95159 14.0637 9.97499C14.6491 10.045 15.135 10.3054 15.5212 10.7562C15.9074 11.207 16.1004 11.7341 16.1 12.3375C16.1 12.9937 15.8772 13.5516 15.4316 14.0112C14.986 14.4707 14.4451 14.7003 13.8091 14.7H7.70002Z",fill:"#BBBBBB",stroke:"#333333"}),jsxRuntimeExports.jsx("path",{d:"M10.08 9.72018V13.3H9.36371V11.2299L9.38174 10.5172C9.26837 10.6369 9.18591 10.7194 9.13438 10.7647L8.7453 11.0939L8.40002 10.6396L10.08 9.09996V9.72018Z",fill:"#333333"}),jsxRuntimeExports.jsx("path",{d:"M10.92 12.6798L10.92 9.09999L11.6363 9.09999L11.6363 11.1701L11.6183 11.8828C11.7316 11.7631 11.8141 11.6806 11.8656 11.6352L12.2547 11.3061L12.6 11.7604L10.92 13.3L10.92 12.6798Z",fill:"#333333"})]}),PageCacheDuotone=()=>jsxRuntimeExports.jsxs(IconBuilder,{children:[jsxRuntimeExports.jsx("path",{d:"M16.1 8.89999H16.6V8.39999V8.29999C16.6 6.91928 15.4807 5.79999 14.1 5.79999H6.90002C5.51931 5.79999 4.40002 6.91928 4.40002 8.29999V8.39999V8.89999H4.90002H16.1Z",fill:"#BBBBBB",stroke:"#333333"}),jsxRuntimeExports.jsx("path",{d:"M4.90002 8.59991H4.40002V9.09991V12.6999C4.40002 14.0806 5.51931 15.1999 6.90002 15.1999H14.1C15.4807 15.1999 16.6 14.0806 16.6 12.6999V9.09991V8.59991H16.1H4.90002Z",fill:"#BBBBBB",stroke:"#333333"}),jsxRuntimeExports.jsx("path",{d:"M11.5 10L9.54585 11.3052L10.3377 11.7893L9.5 13L11.4542 11.7134L10.6633 11.2309L11.5 10Z",fill:"#333333"})]}),width=34,height=34,CSSDelivery=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width,height,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:"#7F54B3"}),jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.5 7.00689H8.07C7.53 7.00689 7.25 7.00689 7.16 7.16689C7.02665 7.35185 6.96938 7.58094 7 7.80689C7.00646 8.36465 6.97975 8.9223 6.92 9.47689C6.88923 9.73554 6.81127 9.98636 6.69 10.2169C6.52022 10.4949 6.28285 10.7254 6 10.8869C6.28821 11.0502 6.52669 11.2887 6.69 11.5769C6.85676 11.9408 6.94208 12.3366 6.94 12.7369L7 14.2969C7.00825 14.3648 7.03221 14.4299 7.07 14.4869C7.10698 14.5458 7.15868 14.5941 7.22 14.6269C7.48081 14.7409 7.76757 14.7824 8.05 14.7469H9.5V7.00689ZM11.9 14.7469H13.31C13.89 14.7469 14.11 14.7469 14.22 14.5969C14.3518 14.4297 14.416 14.2192 14.4 14.0069C14.3984 13.4154 14.4318 12.8244 14.5 12.2369C14.5414 11.9829 14.6295 11.7387 14.76 11.5169C14.9196 11.2689 15.1399 11.0658 15.4 10.9269C15.1402 10.7799 14.9151 10.5786 14.74 10.3369C14.6214 10.1426 14.5369 9.92958 14.49 9.70689C14.4433 9.24022 14.4133 8.80689 14.4 8.40689C14.3969 8.05251 14.3736 7.6986 14.33 7.34689C14.2882 7.24858 14.2141 7.16746 14.12 7.11689C13.858 7.02075 13.5781 6.98321 13.3 7.00689H11.9V14.7469Z",fill:"#7148A2",stroke:"#E7E7E7"})]}),JavascriptDelivery=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width,height,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:"#FDC20A"}),jsxRuntimeExports.jsx("path",{d:"M13.0614 8.4258L15.315 10.6924C15.4283 10.8063 15.4283 10.9909 15.315 11.1048L13.0614 13.3714M7.93851 13.3714L5.68491 11.1048C5.57166 10.9909 5.57166 10.8063 5.68491 10.6924L7.93851 8.4258M11.1662 6.70001L9.92659 15",stroke:"white",strokeLinecap:"round"})]}),ImageDeliverySVG=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width,height,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:"#11BFE6"}),jsxRuntimeExports.jsx("circle",{cx:"8.40002",cy:"12.6",r:"3",fill:"#0E9AB9",stroke:"white"}),jsxRuntimeExports.jsx("circle",{cx:"13.6501",cy:"7.35003",r:"1.95",fill:"#0E9AB9",stroke:"white"})]}),FontDelivery=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width,height,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:"#295ECF"}),jsxRuntimeExports.jsx("path",{d:"M11.1095 12.9899C11.053 13.2628 10.9683 13.4416 10.8366 13.5357C10.7049 13.6298 10.4696 13.6674 10.1309 13.6674L10.0933 14.8153C10.7895 14.8153 11.3165 14.693 11.674 14.4296C12.0222 14.1661 12.2574 13.7239 12.3891 13.084L13.1042 9.40501H13.904L14.1675 8.44526H13.2924L13.4053 7.89952C13.4618 7.57961 13.6688 7.41024 14.0263 7.41024C14.2522 7.41024 14.4498 7.44788 14.6003 7.50433L14.9955 6.48813C14.6944 6.36581 14.3463 6.29994 13.9511 6.29994C13.49 6.29994 13.0948 6.45049 12.7561 6.73277C12.4174 7.01505 12.2009 7.38201 12.1163 7.83366L11.9939 8.44526H11.2506L11.0624 9.40501H11.8058L11.1095 12.9899Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M6.30005 12.9617H7.67381L8.16309 10.4494H10.2049L10.4213 9.31085H8.38891L8.64296 8.00296H10.9388L11.1647 6.84562H7.49503L6.30005 12.9617Z",fill:"white"})]}),CloudDelivery=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width,height,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:"#1EB47D"}),jsxRuntimeExports.jsx("path",{d:"M7.70002 14.7C6.9279 14.7 6.26812 14.4244 5.72068 13.8731C5.17324 13.3219 4.89969 12.6481 4.90002 11.8519C4.90002 11.1694 5.09942 10.5612 5.49821 10.0275C5.89699 9.49374 6.41881 9.15249 7.06366 9.00374C7.27578 8.19874 7.70002 7.54686 8.33639 7.04811C8.97275 6.54936 9.69396 6.29999 10.5 6.29999C11.4928 6.29999 12.335 6.65664 13.0266 7.36994C13.7183 8.08324 14.064 8.95159 14.0637 9.97499C14.6491 10.045 15.135 10.3054 15.5212 10.7562C15.9074 11.207 16.1004 11.7341 16.1 12.3375C16.1 12.9937 15.8772 13.5516 15.4316 14.0112C14.986 14.4707 14.4451 14.7003 13.8091 14.7H7.70002Z",fill:"#157F58",stroke:"white"}),jsxRuntimeExports.jsx("path",{d:"M10.08 9.72018V13.3H9.36371V11.2299L9.38174 10.5172C9.26837 10.6369 9.18591 10.7194 9.13438 10.7647L8.7453 11.0939L8.40002 10.6396L10.08 9.09996V9.72018Z",fill:"white"}),jsxRuntimeExports.jsx("path",{d:"M10.92 12.6798L10.92 9.09999L11.6363 9.09999L11.6363 11.1701L11.6183 11.8828C11.7316 11.7631 11.8141 11.6806 11.8656 11.6352L12.2547 11.3061L12.6 11.7604L10.92 13.3L10.92 12.6798Z",fill:"white"})]}),PageCache=()=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width,height,viewBox:"0 0 21 21",fill:"none",children:[jsxRuntimeExports.jsx("path",{d:"M14.2056 0H6.79443C3.04197 0 0 3.04197 0 6.79443V14.2056C0 17.958 3.04197 21 6.79443 21H14.2056C17.958 21 21 17.958 21 14.2056V6.79443C21 3.04197 17.958 0 14.2056 0Z",fill:"#FF7D00"}),jsxRuntimeExports.jsx("path",{d:"M16.1 8.89999H16.6V8.39999V8.29999C16.6 6.91928 15.4807 5.79999 14.1 5.79999H6.90002C5.51931 5.79999 4.40002 6.91928 4.40002 8.29999V8.39999V8.89999H4.90002H16.1Z",fill:"#C76200",stroke:"white"}),jsxRuntimeExports.jsx("path",{d:"M4.90002 8.59991H4.40002V9.09991V12.6999C4.40002 14.0806 5.51931 15.1999 6.90002 15.1999H14.1C15.4807 15.1999 16.6 14.0806 16.6 12.6999V9.09991V8.59991H16.1H4.90002Z",fill:"#C76200",stroke:"white"}),jsxRuntimeExports.jsx("path",{d:"M11.5 10L9.54585 11.3052L10.3377 11.7893L9.5 13L11.4542 11.7134L10.6633 11.2309L11.5 10Z",fill:"white"})]});var CHECKBOX_NAME="Checkbox",[createCheckboxContext,createCheckboxScope]=createContextScope$1(CHECKBOX_NAME),[CheckboxProvider,useCheckboxContext]=createCheckboxContext(CHECKBOX_NAME),Checkbox$1=reactExports.forwardRef((s,a)=>{const{__scopeCheckbox:i,name:o,checked:E,defaultChecked:j,required:R,disabled:C,value:S="on",onCheckedChange:_,...T}=s,[P,N]=reactExports.useState(null),I=useComposedRefs$1(a,L=>N(L)),M=reactExports.useRef(!1),D=P?!!P.closest("form"):!0,[B=!1,F]=useControllableState({prop:E,defaultProp:j,onChange:_}),O=reactExports.useRef(B);return reactExports.useEffect(()=>{const L=P==null?void 0:P.form;if(L){const $=()=>F(O.current);return L.addEventListener("reset",$),()=>L.removeEventListener("reset",$)}},[P,F]),jsxRuntimeExports.jsxs(CheckboxProvider,{scope:i,state:B,disabled:C,children:[jsxRuntimeExports.jsx(Primitive$1.button,{type:"button",role:"checkbox","aria-checked":isIndeterminate$1(B)?"mixed":B,"aria-required":R,"data-state":getState$2(B),"data-disabled":C?"":void 0,disabled:C,value:S,...T,ref:I,onKeyDown:composeEventHandlers$1(s.onKeyDown,L=>{L.key==="Enter"&&L.preventDefault()}),onClick:composeEventHandlers$1(s.onClick,L=>{F($=>isIndeterminate$1($)?!0:!$),D&&(M.current=L.isPropagationStopped(),M.current||L.stopPropagation())})}),D&&jsxRuntimeExports.jsx(BubbleInput$1,{control:P,bubbles:!M.current,name:o,value:S,checked:B,required:R,disabled:C,style:{transform:"translateX(-100%)"}})]})});Checkbox$1.displayName=CHECKBOX_NAME;var INDICATOR_NAME$1="CheckboxIndicator",CheckboxIndicator=reactExports.forwardRef((s,a)=>{const{__scopeCheckbox:i,forceMount:o,...E}=s,j=useCheckboxContext(INDICATOR_NAME$1,i);return jsxRuntimeExports.jsx(Presence$1,{present:o||isIndeterminate$1(j.state)||j.state===!0,children:jsxRuntimeExports.jsx(Primitive$1.span,{"data-state":getState$2(j.state),"data-disabled":j.disabled?"":void 0,...E,ref:a,style:{pointerEvents:"none",...s.style}})})});CheckboxIndicator.displayName=INDICATOR_NAME$1;var BubbleInput$1=s=>{const{control:a,checked:i,bubbles:o=!0,...E}=s,j=reactExports.useRef(null),R=usePrevious(i),C=useSize(a);return reactExports.useEffect(()=>{const S=j.current,_=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(_,"checked").set;if(R!==i&&P){const N=new Event("click",{bubbles:o});S.indeterminate=isIndeterminate$1(i),P.call(S,isIndeterminate$1(i)?!1:i),S.dispatchEvent(N)}},[R,i,o]),jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:isIndeterminate$1(i)?!1:i,...E,tabIndex:-1,ref:j,style:{...s.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function isIndeterminate$1(s){return s==="indeterminate"}function getState$2(s){return isIndeterminate$1(s)?"indeterminate":s?"checked":"unchecked"}var Root$4=Checkbox$1,Indicator=CheckboxIndicator;function _objectWithoutPropertiesLoose$1(s,a){if(s==null)return{};var i={},o=Object.keys(s),E,j;for(j=0;j<o.length;j++)E=o[j],!(a.indexOf(E)>=0)&&(i[E]=s[E]);return i}var _excluded$T=["color"],CheckIcon=reactExports.forwardRef(function(s,a){var i=s.color,o=i===void 0?"currentColor":i,E=_objectWithoutPropertiesLoose$1(s,_excluded$T);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E,{ref:a}),reactExports.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))}),_excluded$2l=["color"],GearIcon=reactExports.forwardRef(function(s,a){var i=s.color,o=i===void 0?"currentColor":i,E=_objectWithoutPropertiesLoose$1(s,_excluded$2l);return reactExports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},E,{ref:a}),reactExports.createElement("path",{d:"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z",fill:o,fillRule:"evenodd",clipRule:"evenodd"}))});const Checkbox=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Root$4,{className:cn("peer inline-flex h-[20px] w-[20px] cursor-pointer items-center rounded-md border-2 border-gray-400 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 relative mr-1.5",s),...a,ref:i,children:jsxRuntimeExports.jsx(Indicator,{className:"absolute -left-0.5 transition ease-in-out delay-150",children:jsxRuntimeExports.jsx(CheckIcon,{className:"h-[20px] w-[20px] text-white bg-black rounded-md dark:bg-zinc-400 dark:text-black"})})}));Checkbox.displayName=Root$4.displayName;const Dialog=Root$5,DialogTrigger=Trigger$2,DialogPortal=Portal;DialogPortal.displayName=Portal.displayName;const DialogOverlay=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx("div",{ref:i,className:cn("fixed inset-0 z-[120000] bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...a}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=reactExports.forwardRef(({className:s,children:a,...i},o)=>{var E,j;return jsxRuntimeExports.jsx(DialogPortal,{container:((j=(E=document.getElementById("rapidload-optimizer-shadow-dom"))==null?void 0:E.shadowRoot)==null?void 0:j.getElementById("rapidload-page-optimizer-wrapper"))||document.body,children:jsxRuntimeExports.jsx(DialogOverlay,{className:"cursor-auto",children:jsxRuntimeExports.jsx(Content$1,{asChild:!0,ref:o,...i,children:jsxRuntimeExports.jsxs("div",{className:cn("overflow-y-auto max-h-screen outline-0 fixed left-[50%] top-[50%] z-[120000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background 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 md:w-full",s),children:[a,jsxRuntimeExports.jsxs(Close,{className:"absolute right-4 top-4 rounded-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:[jsxRuntimeExports.jsx(X,{className:"h-4 w-4 dark:text-brand-300"}),jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Close"})]})]})})})})});DialogContent.displayName=Content$1.displayName;const DialogHeader=({className:s,...a})=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",s),...a});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:s,...a})=>jsxRuntimeExports.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...a});DialogFooter.displayName="DialogFooter";const DialogTitle=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Title,{ref:i,className:cn("text-lg font-semibold leading-none tracking-tight dark:text-brand-300",s),...a}));DialogTitle.displayName=Title.displayName;const DialogDescription=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Description$1,{ref:i,className:cn("text-sm text-muted-foreground",s),...a}));DialogDescription.displayName=Description$1.displayName;var NAME$1="Label",Label$2=reactExports.forwardRef((s,a)=>jsxRuntimeExports.jsx(Primitive$1.label,{...s,ref:a,onMouseDown:i=>{var E;i.target.closest("button, input, select, textarea")||((E=s.onMouseDown)==null||E.call(s,i),!i.defaultPrevented&&i.detail>1&&i.preventDefault())}}));Label$2.displayName=NAME$1;var Root$3=Label$2;const labelVariants=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Label$1=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Root$3,{ref:i,className:cn(labelVariants(),s),...a}));Label$1.displayName=Root$3.displayName;var SWITCH_NAME="Switch",[createSwitchContext,createSwitchScope]=createContextScope$1(SWITCH_NAME),[SwitchProvider,useSwitchContext]=createSwitchContext(SWITCH_NAME),Switch$1=reactExports.forwardRef((s,a)=>{const{__scopeSwitch:i,name:o,checked:E,defaultChecked:j,required:R,disabled:C,value:S="on",onCheckedChange:_,...T}=s,[P,N]=reactExports.useState(null),I=useComposedRefs$1(a,O=>N(O)),M=reactExports.useRef(!1),D=P?!!P.closest("form"):!0,[B=!1,F]=useControllableState({prop:E,defaultProp:j,onChange:_});return jsxRuntimeExports.jsxs(SwitchProvider,{scope:i,checked:B,disabled:C,children:[jsxRuntimeExports.jsx(Primitive$1.button,{type:"button",role:"switch","aria-checked":B,"aria-required":R,"data-state":getState$1(B),"data-disabled":C?"":void 0,disabled:C,value:S,...T,ref:I,onClick:composeEventHandlers$1(s.onClick,O=>{F(L=>!L),D&&(M.current=O.isPropagationStopped(),M.current||O.stopPropagation())})}),D&&jsxRuntimeExports.jsx(BubbleInput,{control:P,bubbles:!M.current,name:o,value:S,checked:B,required:R,disabled:C,style:{transform:"translateX(-100%)"}})]})});Switch$1.displayName=SWITCH_NAME;var THUMB_NAME="SwitchThumb",SwitchThumb=reactExports.forwardRef((s,a)=>{const{__scopeSwitch:i,...o}=s,E=useSwitchContext(THUMB_NAME,i);return jsxRuntimeExports.jsx(Primitive$1.span,{"data-state":getState$1(E.checked),"data-disabled":E.disabled?"":void 0,...o,ref:a})});SwitchThumb.displayName=THUMB_NAME;var BubbleInput=s=>{const{control:a,checked:i,bubbles:o=!0,...E}=s,j=reactExports.useRef(null),R=usePrevious(i),C=useSize(a);return reactExports.useEffect(()=>{const S=j.current,_=window.HTMLInputElement.prototype,P=Object.getOwnPropertyDescriptor(_,"checked").set;if(R!==i&&P){const N=new Event("click",{bubbles:o});P.call(S,i),S.dispatchEvent(N)}},[R,i,o]),jsxRuntimeExports.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i,...E,tabIndex:-1,ref:j,style:{...s.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function getState$1(s){return s?"checked":"unchecked"}var Root$2=Switch$1,Thumb=SwitchThumb;const Switch=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Root$2,{className:cn("peer inline-flex h-[19px] w-[35px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-purple-750 data-[state=unchecked]:bg-brand-300",s),...a,ref:i,children:jsxRuntimeExports.jsx(Thumb,{className:cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Switch.displayName=Root$2.displayName;const Textarea=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx("textarea",{cols:500,rows:4,className:cn("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:i,...a}));Textarea.displayName="Textarea";var ENTRY_FOCUS="rovingFocusGroup.onEntryFocus",EVENT_OPTIONS={bubbles:!1,cancelable:!0},GROUP_NAME$2="RovingFocusGroup",[Collection$1,useCollection$1,createCollectionScope$1]=createCollection(GROUP_NAME$2),[createRovingFocusGroupContext,createRovingFocusGroupScope]=createContextScope$1(GROUP_NAME$2,[createCollectionScope$1]),[RovingFocusProvider,useRovingFocusContext]=createRovingFocusGroupContext(GROUP_NAME$2),RovingFocusGroup=reactExports.forwardRef((s,a)=>jsxRuntimeExports.jsx(Collection$1.Provider,{scope:s.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(Collection$1.Slot,{scope:s.__scopeRovingFocusGroup,children:jsxRuntimeExports.jsx(RovingFocusGroupImpl,{...s,ref:a})})}));RovingFocusGroup.displayName=GROUP_NAME$2;var RovingFocusGroupImpl=reactExports.forwardRef((s,a)=>{const{__scopeRovingFocusGroup:i,orientation:o,loop:E=!1,dir:j,currentTabStopId:R,defaultCurrentTabStopId:C,onCurrentTabStopIdChange:S,onEntryFocus:_,preventScrollOnEntryFocus:T=!1,...P}=s,N=reactExports.useRef(null),I=useComposedRefs$1(a,N),M=useDirection(j),[D=null,B]=useControllableState({prop:R,defaultProp:C,onChange:S}),[F,O]=reactExports.useState(!1),L=useCallbackRef(_),$=useCollection$1(i),V=reactExports.useRef(!1),[G,K]=reactExports.useState(0);return reactExports.useEffect(()=>{const J=N.current;if(J)return J.addEventListener(ENTRY_FOCUS,L),()=>J.removeEventListener(ENTRY_FOCUS,L)},[L]),jsxRuntimeExports.jsx(RovingFocusProvider,{scope:i,orientation:o,dir:M,loop:E,currentTabStopId:D,onItemFocus:reactExports.useCallback(J=>B(J),[B]),onItemShiftTab:reactExports.useCallback(()=>O(!0),[]),onFocusableItemAdd:reactExports.useCallback(()=>K(J=>J+1),[]),onFocusableItemRemove:reactExports.useCallback(()=>K(J=>J-1),[]),children:jsxRuntimeExports.jsx(Primitive$1.div,{tabIndex:F||G===0?-1:0,"data-orientation":o,...P,ref:I,style:{outline:"none",...s.style},onMouseDown:composeEventHandlers$1(s.onMouseDown,()=>{V.current=!0}),onFocus:composeEventHandlers$1(s.onFocus,J=>{const ne=!V.current;if(J.target===J.currentTarget&&ne&&!F){const le=new CustomEvent(ENTRY_FOCUS,EVENT_OPTIONS);if(J.currentTarget.dispatchEvent(le),!le.defaultPrevented){const ue=$().filter(Y=>Y.focusable),ce=ue.find(Y=>Y.active),pe=ue.find(Y=>Y.id===D),oe=[ce,pe,...ue].filter(Boolean).map(Y=>Y.ref.current);focusFirst$1(oe,T)}}V.current=!1}),onBlur:composeEventHandlers$1(s.onBlur,()=>O(!1))})})}),ITEM_NAME$3="RovingFocusGroupItem",RovingFocusGroupItem=reactExports.forwardRef((s,a)=>{const{__scopeRovingFocusGroup:i,focusable:o=!0,active:E=!1,tabStopId:j,...R}=s,C=useId(),S=j||C,_=useRovingFocusContext(ITEM_NAME$3,i),T=_.currentTabStopId===S,P=useCollection$1(i),{onFocusableItemAdd:N,onFocusableItemRemove:I}=_;return reactExports.useEffect(()=>{if(o)return N(),()=>I()},[o,N,I]),jsxRuntimeExports.jsx(Collection$1.ItemSlot,{scope:i,id:S,focusable:o,active:E,children:jsxRuntimeExports.jsx(Primitive$1.span,{tabIndex:T?0:-1,"data-orientation":_.orientation,...R,ref:a,onMouseDown:composeEventHandlers$1(s.onMouseDown,M=>{o?_.onItemFocus(S):M.preventDefault()}),onFocus:composeEventHandlers$1(s.onFocus,()=>_.onItemFocus(S)),onKeyDown:composeEventHandlers$1(s.onKeyDown,M=>{if(M.key==="Tab"&&M.shiftKey){_.onItemShiftTab();return}if(M.target!==M.currentTarget)return;const D=getFocusIntent(M,_.orientation,_.dir);if(D!==void 0){if(M.metaKey||M.ctrlKey||M.altKey||M.shiftKey)return;M.preventDefault();let F=P().filter(O=>O.focusable).map(O=>O.ref.current);if(D==="last")F.reverse();else if(D==="prev"||D==="next"){D==="prev"&&F.reverse();const O=F.indexOf(M.currentTarget);F=_.loop?wrapArray$1(F,O+1):F.slice(O+1)}setTimeout(()=>focusFirst$1(F))}})})})});RovingFocusGroupItem.displayName=ITEM_NAME$3;var MAP_KEY_TO_FOCUS_INTENT={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function getDirectionAwareKey(s,a){return a!=="rtl"?s:s==="ArrowLeft"?"ArrowRight":s==="ArrowRight"?"ArrowLeft":s}function getFocusIntent(s,a,i){const o=getDirectionAwareKey(s.key,i);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return MAP_KEY_TO_FOCUS_INTENT[o]}function focusFirst$1(s,a=!1){const i=document.activeElement;for(const o of s)if(o===i||(o.focus({preventScroll:a}),document.activeElement!==i))return}function wrapArray$1(s,a){return s.map((i,o)=>s[(a+o)%s.length])}var Root$1=RovingFocusGroup,Item=RovingFocusGroupItem,NAME="Toggle",Toggle=reactExports.forwardRef((s,a)=>{const{pressed:i,defaultPressed:o=!1,onPressedChange:E,...j}=s,[R=!1,C]=useControllableState({prop:i,onChange:E,defaultProp:o});return jsxRuntimeExports.jsx(Primitive$1.button,{type:"button","aria-pressed":R,"data-state":R?"on":"off","data-disabled":s.disabled?"":void 0,...j,ref:a,onClick:composeEventHandlers$1(s.onClick,()=>{s.disabled||C(!R)})})});Toggle.displayName=NAME;var TOGGLE_GROUP_NAME="ToggleGroup",[createToggleGroupContext,createToggleGroupScope]=createContextScope$1(TOGGLE_GROUP_NAME,[createRovingFocusGroupScope]),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),ToggleGroup$1=React8.forwardRef((s,a)=>{const{type:i,...o}=s;if(i==="single"){const E=o;return jsxRuntimeExports.jsx(ToggleGroupImplSingle,{...E,ref:a})}if(i==="multiple"){const E=o;return jsxRuntimeExports.jsx(ToggleGroupImplMultiple,{...E,ref:a})}throw new Error(`Missing prop \`type\` expected on \`${TOGGLE_GROUP_NAME}\``)});ToggleGroup$1.displayName=TOGGLE_GROUP_NAME;var[ToggleGroupValueProvider,useToggleGroupValueContext]=createToggleGroupContext(TOGGLE_GROUP_NAME),ToggleGroupImplSingle=React8.forwardRef((s,a)=>{const{value:i,defaultValue:o,onValueChange:E=()=>{},...j}=s,[R,C]=useControllableState({prop:i,defaultProp:o,onChange:E});return jsxRuntimeExports.jsx(ToggleGroupValueProvider,{scope:s.__scopeToggleGroup,type:"single",value:R?[R]:[],onItemActivate:C,onItemDeactivate:React8.useCallback(()=>C(""),[C]),children:jsxRuntimeExports.jsx(ToggleGroupImpl,{...j,ref:a})})}),ToggleGroupImplMultiple=React8.forwardRef((s,a)=>{const{value:i,defaultValue:o,onValueChange:E=()=>{},...j}=s,[R=[],C]=useControllableState({prop:i,defaultProp:o,onChange:E}),S=React8.useCallback(T=>C((P=[])=>[...P,T]),[C]),_=React8.useCallback(T=>C((P=[])=>P.filter(N=>N!==T)),[C]);return jsxRuntimeExports.jsx(ToggleGroupValueProvider,{scope:s.__scopeToggleGroup,type:"multiple",value:R,onItemActivate:S,onItemDeactivate:_,children:jsxRuntimeExports.jsx(ToggleGroupImpl,{...j,ref:a})})});ToggleGroup$1.displayName=TOGGLE_GROUP_NAME;var[ToggleGroupContext,useToggleGroupContext]=createToggleGroupContext(TOGGLE_GROUP_NAME),ToggleGroupImpl=React8.forwardRef((s,a)=>{const{__scopeToggleGroup:i,disabled:o=!1,rovingFocus:E=!0,orientation:j,dir:R,loop:C=!0,...S}=s,_=useRovingFocusGroupScope$1(i),T=useDirection(R),P={role:"group",dir:T,...S};return jsxRuntimeExports.jsx(ToggleGroupContext,{scope:i,rovingFocus:E,disabled:o,children:E?jsxRuntimeExports.jsx(Root$1,{asChild:!0,..._,orientation:j,dir:T,loop:C,children:jsxRuntimeExports.jsx(Primitive$1.div,{...P,ref:a})}):jsxRuntimeExports.jsx(Primitive$1.div,{...P,ref:a})})}),ITEM_NAME$2="ToggleGroupItem",ToggleGroupItem$1=React8.forwardRef((s,a)=>{const i=useToggleGroupValueContext(ITEM_NAME$2,s.__scopeToggleGroup),o=useToggleGroupContext(ITEM_NAME$2,s.__scopeToggleGroup),E=useRovingFocusGroupScope$1(s.__scopeToggleGroup),j=i.value.includes(s.value),R=o.disabled||s.disabled,C={...s,pressed:j,disabled:R},S=React8.useRef(null);return o.rovingFocus?jsxRuntimeExports.jsx(Item,{asChild:!0,...E,focusable:!R,active:j,ref:S,children:jsxRuntimeExports.jsx(ToggleGroupItemImpl,{...C,ref:a})}):jsxRuntimeExports.jsx(ToggleGroupItemImpl,{...C,ref:a})});ToggleGroupItem$1.displayName=ITEM_NAME$2;var ToggleGroupItemImpl=React8.forwardRef((s,a)=>{const{__scopeToggleGroup:i,value:o,...E}=s,j=useToggleGroupValueContext(ITEM_NAME$2,i),R={role:"radio","aria-checked":s.pressed,"aria-pressed":void 0},C=j.type==="single"?R:void 0;return jsxRuntimeExports.jsx(Toggle,{...C,...E,ref:a,onPressedChange:S=>{S?j.onItemActivate(o):j.onItemDeactivate(o)}})}),Root2$2=ToggleGroup$1,Item2$2=ToggleGroupItem$1;const ToggleGroup=Root2$2,ToggleGroupItem=reactExports.forwardRef(({className:s,children:a,...i},o)=>jsxRuntimeExports.jsx(Item2$2,{ref:o,className:cn("relative flex h-[35px] px-2 items-center dark:bg-brand-800/40 justify-center bg-white text-base leading-4 rounded focus:z-10 focus:outline-none hover:bg-purple-750/20 data-[state=on]:bg-purple-750 data-[state=on]:text-brand-100 dark:text-brand-300 dark:hover:bg-brand-600/40 dark:data-[state=on]:bg-brand-600/40",s),...i,children:a}));ToggleGroupItem.displayName=Item2$2.displayName;const Input=reactExports.forwardRef(({className:s,type:a,...i},o)=>jsxRuntimeExports.jsx("input",{type:a,className:cn("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",s),ref:o,...i}));Input.displayName="Input";const iconMap={"rotate-cw":RotateCw,"check-circle":CircleCheckBig,clipboard:Clipboard},Fields=({input:s,updates:a,update:i})=>{var G,K,J,ne,le,ue,ce,pe,xe;const[o,E]=reactExports.useState(!1),{options:j}=useAppContext();useSelector(optimizerData);const[R,C]=reactExports.useState("third_party"),[S,_]=reactExports.useState({}),T=["third_party","plugins","theme"],P=reactExports.useMemo(()=>{var oe;return s?(oe=a.find(Y=>Y.key===s.key))==null?void 0:oe.value:""},[s,a]),N=reactExports.useCallback(oe=>{var Y;return s?(Y=a.find(ae=>ae.key===`${s.key}.${oe}`))==null?void 0:Y.value:""},[s,a]);if(!s)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const I=async()=>{if(s.action){E(!0);try{await new ApiService(j,s.action).post(),toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Your action is successful ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]}),duration:0})}catch(oe){toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[oe.message," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]}),duration:0})}E(!1)}},M=async oe=>{_(Y=>({...Y,[oe.key]:!0}));try{if(oe.action==="clipboard")await navigator.clipboard.writeText(P),toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["CDN URL copied to clipboard ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]}),duration:0});else{const ae=await new ApiService(j,oe.action).post();ae!=null&&ae.data&&oe.action_response_mutates&&oe.action_response_mutates.forEach(H=>{i(ae.data[H],H,!0)}),toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[oe.control_label," action successful ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]}),duration:0})}}catch(Y){toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[Y.message," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]}),duration:0})}_(Y=>({...Y,[oe.key]:!1}))},D=reactExports.useMemo(()=>{var oe;return(oe=s==null?void 0:s.control_values)==null?void 0:oe.reduce((Y,ae)=>{Y[ae.type]||(Y[ae.type]=[]);const H=Array.isArray(P)?P.includes(ae.id):P===ae.id;return Y[ae.type].push({...ae,isSelected:H}),Y},{})},[s,a]),B=(oe,Y)=>{const ae=oe?[...P||[],Y]:(P||[]).filter(H=>H!==Y);i(ae,s.key)},F=oe=>{oe.preventDefault(),i(oe.target.value,s.key)},[O,L]=reactExports.useState(!1),$=()=>{L(oe=>!oe)};return reactExports.useMemo(()=>{if(!(s!=null&&s.control_visibility))return!0;const oe=new Map(a.map(({key:Y,value:ae})=>[Y,ae]));return s.control_visibility.some(Y=>oe.get(Y.key)===Y.value)},[s==null?void 0:s.control_visibility,a])?jsxRuntimeExports.jsxs("div",{className:"flex flex-col justify-start items-center gap-3 normal-case dark:text-brand-300",children:[(s==null?void 0:s.control_type)==="checkbox"&&jsxRuntimeExports.jsx(Label$1,{htmlFor:"name",className:"flex flex-col text-left w-full dark:text-brand-300 dark:bg-brand-800/40 dark:border-brand-800/80 bg-brand-100/30 rounded-xl py-4 px-4 border border-brand-200/60",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:s.control_label}),jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 sm:max-w-[335px] dark:text-brand-300 ",children:s.control_description})]}),jsxRuntimeExports.jsx(Switch,{checked:P,onCheckedChange:oe=>i(oe,s.key),className:"self-center"})]})}),s.control_type==="textarea"&&jsxRuntimeExports.jsxs(Label$1,{htmlFor:"name",className:"flex flex-col text-left w-full bg-brand-100/30 dark:text-brand-300 dark:bg-brand-800/40 dark:border-brand-800/80 rounded-xl py-4 px-4 border border-brand-200/60",children:[jsxRuntimeExports.jsx("span",{children:s.control_label}),jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 dark:text-brand-300",children:s.control_description}),jsxRuntimeExports.jsx(Textarea,{id:s.key,className:"focus:outline-none focus-visible:ring-0 dark:text-brand-300 focus-visible:ring-offset-0 mt-2",value:P,onChange:oe=>i(oe.target.value,s.key)})]}),s.control_type==="input"&&jsxRuntimeExports.jsxs(Label$1,{htmlFor:"name",className:"flex flex-col text-left w-full bg-brand-100/30 dark:text-brand-300 rounded-xl py-4 px-4 border border-brand-200/60",children:[jsxRuntimeExports.jsx("span",{children:s.control_label}),jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 dark:text-brand-300",children:s.control_description}),jsxRuntimeExports.jsxs("div",{className:"flex w-full items-center gap-2 mt-2",children:[jsxRuntimeExports.jsx(Input,{id:s.key,type:((G=s.control_props)==null?void 0:G.type)||"text",readOnly:((K=s.control_props)==null?void 0:K.readonly)||(s==null?void 0:s.readonly)||!1,placeholder:(s==null?void 0:s.placeholder)||"",className:"flex-grow focus:outline-none focus-visible:ring-0 dark:text-brand-300 focus-visible:ring-offset-0",value:P,onChange:(J=s.control_props)!=null&&J.readonly||s!=null&&s.readonly?void 0:F,...s.control_props}),jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 flex gap-2",children:(ne=s.actions)==null?void 0:ne.map(oe=>{const Y=oe.control_icon?iconMap[oe.control_icon]:null;return jsxRuntimeExports.jsx(TooltipProvider,{delayDuration:0,children:jsxRuntimeExports.jsxs(Tooltip,{children:[jsxRuntimeExports.jsx(TooltipTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs(Button,{disabled:S[oe.key],className:"flex-shrink-0 flex gap-2 whitespace-nowrap",onClick:()=>M(oe),variant:"outline",children:[S[oe.key]&&jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin -ml-1"}),Y&&jsxRuntimeExports.jsx(Y,{className:"w-4 h-4"}),!Y&&oe.control_label]})}),jsxRuntimeExports.jsx(TooltipContent,{className:"max-w-[200px] p-2 text-sm break-words",sideOffset:5,children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"font-semibold text-sm mb-1",children:oe.control_label}),jsxRuntimeExports.jsx("span",{className:"text-xs font-normal truncate",children:oe.control_description})]})})]})},oe.key)})})]})]}),s.control_type==="button"&&jsxRuntimeExports.jsx(Label$1,{htmlFor:"name",className:"flex ml-4 text-left w-full",children:jsxRuntimeExports.jsxs(Button,{disabled:o,className:"flex gap-2",onClick:oe=>I(),variant:"outline",children:[o&&jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin -ml-1"}),s.control_label]})}),s.control_type==="options"&&jsxRuntimeExports.jsx(Label$1,{htmlFor:"name",className:"flex flex-col text-left w-full dark:text-brand-300 dark:bg-brand-800/40 dark:border-brand-800/80 bg-brand-100/30 rounded-xl py-4 px-4 border border-brand-200/60",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:s.control_label}),jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 sm:max-w-[335px] dark:text-brand-300",children:s.control_description})]}),jsxRuntimeExports.jsxs(Select,{value:P,onValueChange:oe=>i(oe,s.key),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-[130px] capitalize bg-brand-0 dark:bg-brand-800/40",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"Select action"})}),jsxRuntimeExports.jsx(SelectContent,{className:"z-[100001]",children:jsxRuntimeExports.jsxs(SelectGroup,{children:[jsxRuntimeExports.jsx(SelectLabel,{children:"Actions"}),(le=s==null?void 0:s.control_values)==null?void 0:le.map((oe,Y)=>jsxRuntimeExports.jsx(SelectItem,{className:"capitalize cursor-pointer",value:oe,children:oe},Y))]})})]})]})}),s.control_type==="number-range"&&jsxRuntimeExports.jsx(Label$1,{htmlFor:"name",className:"flex flex-col gap-4 text-left w-full dark:text-brand-300 dark:bg-brand-800/40 dark:border-brand-800/80 bg-brand-100/30 rounded-xl py-4 px-4 border border-brand-200/60",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:s.control_label}),jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 sm:max-w-[335px] dark:text-brand-300",children:s.control_description})]}),jsxRuntimeExports.jsx(ToggleGroup,{className:"inline-flex bg-mauve6 rounded border border-1 space-x-px dark:bg-brand-800/40",type:"single",value:String(P),onValueChange:oe=>i(oe,s.key),"aria-label":"Select action",children:(ue=s==null?void 0:s.control_values)==null?void 0:ue.map((oe,Y)=>jsxRuntimeExports.jsxs(ToggleGroupItem,{value:String(oe),"aria-label":oe,children:[oe,s==null?void 0:s.control_values_suffix]},Y))})]})}),s.control_type==="accordion"&&jsxRuntimeExports.jsxs(Label$1,{htmlFor:"name",className:"flex flex-col text-left w-full dark:text-brand-300 dark:bg-brand-800/40 dark:border-brand-800/80 bg-brand-100/30 rounded-xl py-4 px-4 border border-brand-200/60",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between cursor-pointer ",onClick:$,children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:"Misc Options"}),jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 sm:max-w-[425px] dark:text-brand-300",children:"This base page optimization will be used on all the other pages in the selected group."})]}),jsxRuntimeExports.jsx(ForwardRef$u,{className:`h-5 transition-all ${O&&"rotate-[90deg]"}`})]}),jsxRuntimeExports.jsx(Accordion$1,{id:s.key,className:"flex flex-col text-left w-full gap-4 mt-6 ml-3",initialRender:!0,isOpen:O,children:(ce=s==null?void 0:s.inputs)==null?void 0:ce.map(oe=>jsxRuntimeExports.jsxs(Label$1,{className:"flex gap-1",children:[jsxRuntimeExports.jsx(Checkbox,{checked:N(oe.key),onCheckedChange:Y=>i(Y,`${s.key}.${oe.key}`)}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{className:"cursor-pointer",children:oe.control_label}),jsxRuntimeExports.jsx("span",{className:"text-sm font-normal text-gray-600 sm:max-w-[425px] dark:text-brand-300",children:oe.control_description})]})]},oe.key))})]}),(s==null?void 0:s.control_type)==="radio"&&jsxRuntimeExports.jsx(Label$1,{htmlFor:"name",className:"flex flex-col text-left w-full dark:text-brand-300 dark:bg-brand-800/40 dark:border-brand-800/80 bg-brand-100/30 rounded-xl py-4 px-4 border border-brand-200/60",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:s.control_label}),(pe=s==null?void 0:s.control_values_description)!=null&&pe.length?s.control_values_description.map(oe=>oe.value===P&&jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 sm:max-w-[335px] dark:text-brand-300",children:oe.description},oe.value)):jsxRuntimeExports.jsx("span",{className:"pt-2 text-sm font-normal text-gray-600 sm:max-w-[335px] dark:text-brand-300",children:s.control_description})]}),jsxRuntimeExports.jsx(ToggleGroup,{className:"inline-flex bg-mauve6 rounded border border-1 space-x-px dark:bg-brand-800/40",type:"single",value:String(P),onValueChange:oe=>i(oe,s.key),"aria-label":"Select action",children:(xe=s==null?void 0:s.control_values)==null?void 0:xe.map((oe,Y)=>jsxRuntimeExports.jsx(ToggleGroupItem,{className:"w-fit px-4",value:String(oe),"aria-label":oe,children:oe},Y))})]})}),s.control_type==="tab"&&jsxRuntimeExports.jsxs("div",{className:"w-full",children:[jsxRuntimeExports.jsx("div",{className:"flex bg-brand-100/60 w-fit rounded-t-lg",children:T.map((oe,Y)=>jsxRuntimeExports.jsx("button",{onClick:ae=>C(oe),className:`flex items-center border-b-white py-2 px-4 w-fit dark:text-brand-300 ${oe==="third_party"?"rounded-tl-lg":oe==="theme"?"rounded-tr-lg ":""} ${R===oe?"bg-white dark:bg-brand-900 rounded-t-lg":"dark:bg-brand-950 bg-brand-200/60 text-slate-500"} dark:hover:border-brand-700/70 `,children:oe.replace(/_/g," ").replace(/\b\w/g,ae=>ae.toUpperCase())},Y))}),jsxRuntimeExports.jsxs("div",{className:"flex flex-wrap gap-2 overflow-y-auto scrollbar-stable max-h-[300px] w-full bg-white dark:border-brand-900 rounded-md rounded-tl-none px-4 py-4 dark:bg-brand-900 ",children:[Array.isArray(D[R])&&D[R]&&R=="third_party"&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:D[R].map((oe,Y)=>jsxRuntimeExports.jsxs("div",{className:"flex gap-2 cursor-pointer font-medium text-sm bg-purple-50/60 dark:text-brand-300 dark:bg-brand-950 border border-brand-200/60 dark:border-brand-950 w-fit rounded-xl items-center py-1.5 px-2",children:[oe==null?void 0:oe.name,jsxRuntimeExports.jsx(Switch,{checked:oe==null?void 0:oe.isSelected,onCheckedChange:ae=>B(ae,oe.id)})]},Y))}),Array.isArray(D[R])&&D[R]&&R=="plugins"&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:D[R].map((oe,Y)=>jsxRuntimeExports.jsxs("div",{className:"flex gap-2 cursor-pointer font-medium text-sm bg-purple-50/60 dark:text-brand-300 dark:bg-brand-950 border border-brand-200/60 dark:border-brand-950 w-fit rounded-xl items-center py-1.5 px-2",children:[oe==null?void 0:oe.name,jsxRuntimeExports.jsx(Switch,{checked:oe==null?void 0:oe.isSelected,onCheckedChange:ae=>B(ae,oe.id)})]},Y))}),Array.isArray(D[R])&&D[R]&&R=="theme"&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:D[R].map((oe,Y)=>jsxRuntimeExports.jsxs("div",{className:" flex gap-2 cursor-pointer font-medium text-sm bg-purple-50/60 dark:text-brand-300 dark:bg-brand-950 border border-brand-200/60 dark:border-brand-950 w-fit rounded-xl items-center py-1.5 px-2",children:[oe==null?void 0:oe.name,jsxRuntimeExports.jsx(Switch,{checked:oe==null?void 0:oe.isSelected,onCheckedChange:ae=>B(ae,oe.id)})]},Y))})]})]})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},Fields$1=React8.memo(Fields),Mode=({children:s,mode:a="normal"})=>{const{mode:i}=useCommonDispatch();return a===i?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:s}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},Status=React8.memo(({status:s,mainInput:a,activeReport:i})=>{var o,E,j,R,C;return s?s.status==="failed"||s.status==="Miss"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center text-xs	border border-rose-600 w-fit rounded-lg px-1 py-py",children:[jsxRuntimeExports.jsx(Indicator$1,{className:"fill-rose-600",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5",children:[jsxRuntimeExports.jsxs("span",{className:"flex gap-2 items-center",children:[jsxRuntimeExports.jsx(Circle,{className:"w-2 fill-rose-500 stroke-0"}),"Error while optimizing ",((o=s.error)==null?void 0:o.code)&&`(Code: ${(E=s.error)==null?void 0:E.code})`]}),jsxRuntimeExports.jsx("span",{className:"text-brand-500 ml-4",children:(j=s.error)!=null&&j.message?(R=s.error)==null?void 0:R.message:"Failed to Optimize"})]})}),jsxRuntimeExports.jsx("span",{className:"capitalize",children:s.status})]})}):s.status==="queued"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center text-xs w-fit rounded-lg",children:[jsxRuntimeExports.jsx(Circle,{className:cn("animate-pulse w-2.5 fill-amber-500 stroke-0")}),"Waiting in the queue"]})}):s.status==="waiting"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center text-xs w-fit rounded-lg",children:[jsxRuntimeExports.jsx(Circle,{className:cn("animate-pulse w-2.5 fill-amber-500 stroke-0")}),"Waiting"]})}):s.status==="processing"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:" flex gap-2 items-center text-xs w-fit rounded-lg",children:[jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin "}),"Optimization in progress"]})}):s.status==="success"||s.status==="Hit"||a.key==="uucss_enable_cpcss"&&((C=s.meta)==null?void 0:C[i])===i?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:" flex gap-1.5 items-center text-xs w-fit rounded-lg",children:[jsxRuntimeExports.jsx(Circle,{className:cn("animate-pulse w-2.5 fill-green-600 stroke-0 -mt-[1px]")}),s!=null&&s.message||s.status==="Hit"?"Hit":"Optimized"]})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),Setting=({updateValue:s,settings:a,index:i,hideActions:o,showIcons:E=!0,actionRequired:j})=>{if(!a)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});const{dispatch:R,uucssError:C}=useCommonDispatch(),{mode:S,options:_}=useAppContext(),[T,P]=React8.useState(!1),[N,I]=reactExports.useState(!1),{activeReport:M}=useSelector(optimizerData),[D,...B]=reactExports.useMemo(()=>a.inputs,[a]),[F,O]=reactExports.useState(B.reduce((pe,xe,oe,Y)=>{const{key:ae,value:H,inputs:W}=xe;return W&&W.forEach((U,ie,me)=>{pe.push({key:`${ae}.${U.key}`,value:U.value})}),pe.push({key:ae,value:H}),pe},[])),L=reactExports.useCallback((pe,xe,oe=!1)=>{F.find(ae=>ae.key===xe)?(oe&&s(a,pe,xe),O(F.map(ae=>(ae.key===xe&&(ae.value=pe),ae)))):O([...F,{key:xe,value:pe}])},[F,a,B]);let $=reactExports.useMemo(()=>({cache:jsxRuntimeExports.jsx(PageCache,{}),cdn:jsxRuntimeExports.jsx(CloudDelivery,{}),image:jsxRuntimeExports.jsx(ImageDeliverySVG,{}),javascript:jsxRuntimeExports.jsx(JavascriptDelivery,{}),js:jsxRuntimeExports.jsx(JavascriptDelivery,{}),font:jsxRuntimeExports.jsx(FontDelivery,{}),css:jsxRuntimeExports.jsx(CSSDelivery,{})}),[]);const V=reactExports.useMemo(()=>B.length>0,[B]),G=reactExports.useCallback(()=>{F.forEach(({key:pe,value:xe})=>{s(a,xe,pe)}),P(!1)},[F,T]),K=async pe=>{I(!0);try{await new ApiService(_,void 0,pe.action||pe.value||void 0).post(),toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Your action is successful ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]})})}catch(xe){I(!1),toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[xe.message," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]})})}I(!1)};useCommonDispatch();const J=()=>{!j||["onboard","preview"].includes(S)||(s(a,!D.value,D.key),R(changeGear("custom")))},[ne,le]=reactExports.useState(!1);reactExports.useEffect(()=>{a.status&&a.name!=="Cache Policy"&&(D.value||D.control_type==="button"?le(!0):le(!1))},[a,N]);const[ue,ce]=reactExports.useState(a.status);return reactExports.useEffect(()=>{if(!a.status||!D.value)return;const pe=["processing","queued","success","waiting"].includes(a.status.status),xe={"Critical CSS":"cpcss","Remove Unused CSS":"uucss","Page Cache":"cache","Cache Policy":"cache_policy"}[a.name];if(!pe||!xe||xe==="uucss"&&C)return;const oe=async()=>{try{const H=(await R(getCSSStatus(_,_==null?void 0:_.optimizer_url,[xe])))[xe];ce(H),["success","failed","Miss"].includes(H.status)&&clearInterval(Y)}catch(ae){console.error("Error fetching status:",ae),clearInterval(Y)}};oe();const Y=setInterval(oe,5e3);return()=>clearInterval(Y)},[a,_,R,T,C]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:cn("relative flex  gap-2 font-medium text-base w-fit items-center pr-2 py-1",E?"px-0.5":"px-2"),children:[E&&$[a.category],!o&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:D&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:D.control_type==="checkbox"&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Checkbox,{disabled:["onboard","preview"].includes(S),className:j?"":"border-dashed",checked:D.value,onCheckedChange:pe=>{s(a,pe,D.key),R(changeGear("custom"))}})})})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsxs("div",{className:"relative flex gap-2 font-medium text-base w-fit items-center pr-2 py-0.5",children:[jsxRuntimeExports.jsx("div",{className:"select-none cursor-pointer",onClick:J,children:a.name}),!o&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[D&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:D.control_type==="button"&&jsxRuntimeExports.jsx(Button,{loading:N,disabled:N,onClick:async pe=>{await K(D),a.name==="Cache Policy"&&le(!0)},className:"flex -mr-0.5 gap-1 py-1 px-2.5 h-auto rounded-[8px]",children:jsxRuntimeExports.jsx("span",{className:"text-xs py-1 px-0.5",children:D.control_label})})}),jsxRuntimeExports.jsx(Mode,{children:V&&jsxRuntimeExports.jsxs(Dialog,{open:T,onOpenChange:P,children:[jsxRuntimeExports.jsx(DialogTrigger,{disabled:!0,asChild:!0,className:`${D.value?"":"cursor-not-allowed opacity-50 pointer-events-none"}`,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(TooltipText,{text:`${a.name} Settings`,children:jsxRuntimeExports.jsx(ForwardRef$2,{className:"w-5 text-brand-400"})})})}),jsxRuntimeExports.jsxs(DialogContent,{asChild:!0,className:`${a.name==="Delay Javascript"?"sm:max-w-[650px] bg-brand-100 dark:bg-brand-950":"sm:max-w-[600px]"} cursor-auto`,children:[jsxRuntimeExports.jsxs(DialogHeader,{className:"border-b px-6 py-8 mt-1",children:[jsxRuntimeExports.jsxs(DialogTitle,{children:[a.name," Settings"]}),jsxRuntimeExports.jsxs(DialogDescription,{children:["Make changes to your ",jsxRuntimeExports.jsx("span",{className:"lowercase",children:a.name})," settings here. Click save when you're done."]})]}),jsxRuntimeExports.jsx("div",{className:"grid gap-4 px-6 py-4",children:B.map((pe,xe)=>jsxRuntimeExports.jsx(Fields$1,{input:pe,updates:F,update:L},xe))}),jsxRuntimeExports.jsxs(DialogFooter,{className:"px-6 py-3 border-t",children:[jsxRuntimeExports.jsx(AppButton,{onClick:pe=>G(),className:"text-sm",children:"Save changes"}),jsxRuntimeExports.jsx(AppButton,{onClick:pe=>P(!1),variant:"outline",className:"text-sm",children:"Close"})]})]})]})}),ne&&jsxRuntimeExports.jsx("div",{className:"px-1",children:!(D.key==="uucss_enable_uucss"&&C)&&jsxRuntimeExports.jsx(Status,{status:ue,mainInput:D,activeReport:M})}),jsxRuntimeExports.jsx(Mode,{mode:"onboard",children:jsxRuntimeExports.jsx(TooltipText,{text:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{className:"text-purple-750 font-medium",children:"PRO"})," feature"]}),children:jsxRuntimeExports.jsx(Lock,{className:"w-4 text-brand-400"})})})]})]}),jsxRuntimeExports.jsx("p",{className:`text-sm font-normal select-none ${a.status?"":"-mt-1"}`,children:a.description?a.description:a.name})]})]},i)})},AuditSettingsItem=({item:s,itemIndex:a,updateValue:i,actionRequired:o})=>{const{dispatch:E,openCategory:j,uucssError:R}=useCommonDispatch(),C=S=>{E(setCommonState("openAudits",[S.id])),E(setCommonState("activeTab",S.type==="passed_audit"?"passed_audits":S.type==="opportunity"?"opportunities":S.type)),setTimeout(()=>{var _;(_=document.getElementById(`audit-${S.id}`))==null||_.scrollIntoView({behavior:"smooth"})},10)};return jsxRuntimeExports.jsxs("div",{className:"w-full mb-3.5 px-2.5 py-3 rounded-2xl dark:bg-brand-950 bg-brand-0 dark:hover:border-brand-700/70 hover:border-brand-400/60",children:[jsxRuntimeExports.jsx(Setting,{showIcons:!1,settings:s,updateValue:i,actionRequired:o,index:a}),s.audits.length>0&&jsxRuntimeExports.jsxs("ul",{className:"flex mt-2 justify-start ml-14",children:[jsxRuntimeExports.jsx(AuditsLine,{cls:"w-4 mr-2  -mt-2"}),s.audits.map((S,_)=>jsxRuntimeExports.jsxs("li",{onClick:()=>C(S),className:"relative flex cursor-pointer gap-2 font-medium text-sm hover:bg-brand-100 dark:bg-brand-900 bg-white border w-fit rounded-xl items-center py-1.5 px-1.5 mr-2",children:[jsxRuntimeExports.jsx("div",{className:"inline-flex items-center justify-center w-7 h-7 rounded-full dark:bg-brand-700 bg-brand-200/50",children:S.scoreDisplayMode==="informative"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("span",{className:"w-2 h-2 border-2 border-brand-400/60 rounded-full"})}):S.type==="passed_audit"?jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 fill-green-600"}):S.type==="opportunity"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 fill-orange-600 animate-ping absolute inline-flex opacity-75")}),jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 fill-orange-600 relative inline-flex")})]}):S.type==="diagnostics"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 fill-yellow-400 animate-ping absolute inline-flex opacity-75")}),jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 fill-yellow-400 relative inline-flex")})]}):null}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col ",children:[jsxRuntimeExports.jsx("span",{className:"select-none",children:S.name}),jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("div",{className:"dark:bg-brand-950 bg-white border w-fit rounded-lg items-center py-py px-1 mr-2 text-gray-400 block font-medium text-[10px] ",children:S.type.replace(/_/g," ").replace(/\b\w/g,T=>T.toUpperCase())}),jsxRuntimeExports.jsx("div",{className:" text-gray-500 text-xs block",children:S.displayValue?S.displayValue:""})]})]}),jsxRuntimeExports.jsx(ForwardRef$u,{className:"h-5"})]},_))]}),R&&s.inputs[0].key==="uucss_enable_uucss"&&jsxRuntimeExports.jsx("div",{className:"px-1.5 pt-3 ml-9",children:jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center text-xs	border border-amber-600 bg-amber-300/30 w-fit rounded-lg px-1 py-[2px] leading-3",children:[jsxRuntimeExports.jsx(ForwardRef$r,{className:"h-[18px] w-[18px] text-amber-600"}),"Unused CSS and Critical CSS optimization options cannot be enabled simultaneously."]})})]})};var SELECTION_KEYS=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,"ArrowRight"],rtl:[...SELECTION_KEYS,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection,useCollection,createCollectionScope]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$1(MENU_NAME,[createCollectionScope,createPopperScope,createRovingFocusGroupScope]),usePopperScope$1=createPopperScope(),useRovingFocusGroupScope=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=s=>{const{__scopeMenu:a,open:i=!1,children:o,dir:E,onOpenChange:j,modal:R=!0}=s,C=usePopperScope$1(a),[S,_]=reactExports.useState(null),T=reactExports.useRef(!1),P=useCallbackRef(j),N=useDirection(E);return reactExports.useEffect(()=>{const I=()=>{T.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>T.current=!1;return document.addEventListener("keydown",I,{capture:!0}),()=>{document.removeEventListener("keydown",I,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),jsxRuntimeExports.jsx(Root2$4,{...C,children:jsxRuntimeExports.jsx(MenuProvider,{scope:a,open:i,onOpenChange:P,content:S,onContentChange:_,children:jsxRuntimeExports.jsx(MenuRootProvider,{scope:a,onClose:reactExports.useCallback(()=>P(!1),[P]),isUsingKeyboardRef:T,dir:N,modal:R,children:o})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME="MenuAnchor",MenuAnchor=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,...o}=s,E=usePopperScope$1(i);return jsxRuntimeExports.jsx(Anchor,{...E,...o,ref:a})});MenuAnchor.displayName=ANCHOR_NAME;var PORTAL_NAME$1="MenuPortal",[PortalProvider$1,usePortalContext$1]=createMenuContext(PORTAL_NAME$1,{forceMount:void 0}),CONTENT_NAME$3="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$3),MenuContent=reactExports.forwardRef((s,a)=>{const i=usePortalContext$1(CONTENT_NAME$3,s.__scopeMenu),{forceMount:o=i.forceMount,...E}=s,j=useMenuContext(CONTENT_NAME$3,s.__scopeMenu),R=useMenuRootContext(CONTENT_NAME$3,s.__scopeMenu);return jsxRuntimeExports.jsx(Collection.Provider,{scope:s.__scopeMenu,children:jsxRuntimeExports.jsx(Presence$1,{present:o||j.open,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:s.__scopeMenu,children:R.modal?jsxRuntimeExports.jsx(MenuRootContentModal,{...E,ref:a}):jsxRuntimeExports.jsx(MenuRootContentNonModal,{...E,ref:a})})})})}),MenuRootContentModal=reactExports.forwardRef((s,a)=>{const i=useMenuContext(CONTENT_NAME$3,s.__scopeMenu),o=reactExports.useRef(null),E=useComposedRefs$1(a,o);return reactExports.useEffect(()=>{const j=o.current;if(j)return hideOthers(j)},[]),jsxRuntimeExports.jsx(MenuContentImpl,{...s,ref:E,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers$1(s.onFocusOutside,j=>j.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})}),MenuRootContentNonModal=reactExports.forwardRef((s,a)=>{const i=useMenuContext(CONTENT_NAME$3,s.__scopeMenu);return jsxRuntimeExports.jsx(MenuContentImpl,{...s,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})}),MenuContentImpl=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,loop:o=!1,trapFocus:E,onOpenAutoFocus:j,onCloseAutoFocus:R,disableOutsidePointerEvents:C,onEntryFocus:S,onEscapeKeyDown:_,onPointerDownOutside:T,onFocusOutside:P,onInteractOutside:N,onDismiss:I,disableOutsideScroll:M,...D}=s,B=useMenuContext(CONTENT_NAME$3,i),F=useMenuRootContext(CONTENT_NAME$3,i),O=usePopperScope$1(i),L=useRovingFocusGroupScope(i),$=useCollection(i),[V,G]=reactExports.useState(null),K=reactExports.useRef(null),J=useComposedRefs$1(a,K,B.onContentChange),ne=reactExports.useRef(0),le=reactExports.useRef(""),ue=reactExports.useRef(0),ce=reactExports.useRef(null),pe=reactExports.useRef("right"),xe=reactExports.useRef(0),oe=M?ReactRemoveScroll:reactExports.Fragment,Y=M?{as:Slot$1,allowPinchZoom:!0}:void 0,ae=W=>{var De,Ze;const U=le.current+W,ie=$().filter(Ue=>!Ue.disabled),me=document.activeElement,ee=(De=ie.find(Ue=>Ue.ref.current===me))==null?void 0:De.textValue,ye=ie.map(Ue=>Ue.textValue),Ce=getNextMatch(ye,U,ee),Ae=(Ze=ie.find(Ue=>Ue.textValue===Ce))==null?void 0:Ze.ref.current;(function Ue(Se){le.current=Se,window.clearTimeout(ne.current),Se!==""&&(ne.current=window.setTimeout(()=>Ue(""),1e3))})(U),Ae&&setTimeout(()=>Ae.focus())};reactExports.useEffect(()=>()=>window.clearTimeout(ne.current),[]),useFocusGuards();const H=reactExports.useCallback(W=>{var ie,me;return pe.current===((ie=ce.current)==null?void 0:ie.side)&&isPointerInGraceArea(W,(me=ce.current)==null?void 0:me.area)},[]);return jsxRuntimeExports.jsx(MenuContentProvider,{scope:i,searchRef:le,onItemEnter:reactExports.useCallback(W=>{H(W)&&W.preventDefault()},[H]),onItemLeave:reactExports.useCallback(W=>{var U;H(W)||((U=K.current)==null||U.focus(),G(null))},[H]),onTriggerLeave:reactExports.useCallback(W=>{H(W)&&W.preventDefault()},[H]),pointerGraceTimerRef:ue,onPointerGraceIntentChange:reactExports.useCallback(W=>{ce.current=W},[]),children:jsxRuntimeExports.jsx(oe,{...Y,children:jsxRuntimeExports.jsx(FocusScope,{asChild:!0,trapped:E,onMountAutoFocus:composeEventHandlers$1(j,W=>{var U;W.preventDefault(),(U=K.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:R,children:jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:C,onEscapeKeyDown:_,onPointerDownOutside:T,onFocusOutside:P,onInteractOutside:N,onDismiss:I,children:jsxRuntimeExports.jsx(Root$1,{asChild:!0,...L,dir:F.dir,orientation:"vertical",loop:o,currentTabStopId:V,onCurrentTabStopIdChange:G,onEntryFocus:composeEventHandlers$1(S,W=>{F.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntimeExports.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(B.open),"data-radix-menu-content":"",dir:F.dir,...O,...D,ref:J,style:{outline:"none",...D.style},onKeyDown:composeEventHandlers$1(D.onKeyDown,W=>{const ie=W.target.closest("[data-radix-menu-content]")===W.currentTarget,me=W.ctrlKey||W.altKey||W.metaKey,ee=W.key.length===1;ie&&(W.key==="Tab"&&W.preventDefault(),!me&&ee&&ae(W.key));const ye=K.current;if(W.target!==ye||!FIRST_LAST_KEYS.includes(W.key))return;W.preventDefault();const Ae=$().filter(De=>!De.disabled).map(De=>De.ref.current);LAST_KEYS.includes(W.key)&&Ae.reverse(),focusFirst(Ae)}),onBlur:composeEventHandlers$1(s.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(ne.current),le.current="")}),onPointerMove:composeEventHandlers$1(s.onPointerMove,whenMouse(W=>{const U=W.target,ie=xe.current!==W.clientX;if(W.currentTarget.contains(U)&&ie){const me=W.clientX>xe.current?"right":"left";pe.current=me,xe.current=W.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$3;var GROUP_NAME$1="MenuGroup",MenuGroup=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,...o}=s;return jsxRuntimeExports.jsx(Primitive$1.div,{role:"group",...o,ref:a})});MenuGroup.displayName=GROUP_NAME$1;var LABEL_NAME$1="MenuLabel",MenuLabel=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,...o}=s;return jsxRuntimeExports.jsx(Primitive$1.div,{...o,ref:a})});MenuLabel.displayName=LABEL_NAME$1;var ITEM_NAME$1="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=reactExports.forwardRef((s,a)=>{const{disabled:i=!1,onSelect:o,...E}=s,j=reactExports.useRef(null),R=useMenuRootContext(ITEM_NAME$1,s.__scopeMenu),C=useMenuContentContext(ITEM_NAME$1,s.__scopeMenu),S=useComposedRefs$1(a,j),_=reactExports.useRef(!1),T=()=>{const P=j.current;if(!i&&P){const N=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});P.addEventListener(ITEM_SELECT,I=>o==null?void 0:o(I),{once:!0}),dispatchDiscreteCustomEvent(P,N),N.defaultPrevented?_.current=!1:R.onClose()}};return jsxRuntimeExports.jsx(MenuItemImpl,{...E,ref:S,disabled:i,onClick:composeEventHandlers$1(s.onClick,T),onPointerDown:P=>{var N;(N=s.onPointerDown)==null||N.call(s,P),_.current=!0},onPointerUp:composeEventHandlers$1(s.onPointerUp,P=>{var N;_.current||(N=P.currentTarget)==null||N.click()}),onKeyDown:composeEventHandlers$1(s.onKeyDown,P=>{const N=C.searchRef.current!=="";i||N&&P.key===" "||SELECTION_KEYS.includes(P.key)&&(P.currentTarget.click(),P.preventDefault())})})});MenuItem.displayName=ITEM_NAME$1;var MenuItemImpl=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,disabled:o=!1,textValue:E,...j}=s,R=useMenuContentContext(ITEM_NAME$1,i),C=useRovingFocusGroupScope(i),S=reactExports.useRef(null),_=useComposedRefs$1(a,S),[T,P]=reactExports.useState(!1),[N,I]=reactExports.useState("");return reactExports.useEffect(()=>{const M=S.current;M&&I((M.textContent??"").trim())},[j.children]),jsxRuntimeExports.jsx(Collection.ItemSlot,{scope:i,disabled:o,textValue:E??N,children:jsxRuntimeExports.jsx(Item,{asChild:!0,...C,focusable:!o,children:jsxRuntimeExports.jsx(Primitive$1.div,{role:"menuitem","data-highlighted":T?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...j,ref:_,onPointerMove:composeEventHandlers$1(s.onPointerMove,whenMouse(M=>{o?R.onItemLeave(M):(R.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers$1(s.onPointerLeave,whenMouse(M=>R.onItemLeave(M))),onFocus:composeEventHandlers$1(s.onFocus,()=>P(!0)),onBlur:composeEventHandlers$1(s.onBlur,()=>P(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=reactExports.forwardRef((s,a)=>{const{checked:i=!1,onCheckedChange:o,...E}=s;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:s.__scopeMenu,checked:i,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate(i)?"mixed":i,...E,ref:a,"data-state":getCheckedState(i),onSelect:composeEventHandlers$1(E.onSelect,()=>o==null?void 0:o(isIndeterminate(i)?!0:!i),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=reactExports.forwardRef((s,a)=>{const{value:i,onValueChange:o,...E}=s,j=useCallbackRef(o);return jsxRuntimeExports.jsx(RadioGroupProvider,{scope:s.__scopeMenu,value:i,onValueChange:j,children:jsxRuntimeExports.jsx(MenuGroup,{...E,ref:a})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=reactExports.forwardRef((s,a)=>{const{value:i,...o}=s,E=useRadioGroupContext(RADIO_ITEM_NAME$1,s.__scopeMenu),j=i===E.value;return jsxRuntimeExports.jsx(ItemIndicatorProvider,{scope:s.__scopeMenu,checked:j,children:jsxRuntimeExports.jsx(MenuItem,{role:"menuitemradio","aria-checked":j,...o,ref:a,"data-state":getCheckedState(j),onSelect:composeEventHandlers$1(o.onSelect,()=>{var R;return(R=E.onValueChange)==null?void 0:R.call(E,i)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME,{checked:!1}),MenuItemIndicator=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,forceMount:o,...E}=s,j=useItemIndicatorContext(ITEM_INDICATOR_NAME,i);return jsxRuntimeExports.jsx(Presence$1,{present:o||isIndeterminate(j.checked)||j.checked===!0,children:jsxRuntimeExports.jsx(Primitive$1.span,{...E,ref:a,"data-state":getCheckedState(j.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME;var SEPARATOR_NAME$1="MenuSeparator",MenuSeparator=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,...o}=s;return jsxRuntimeExports.jsx(Primitive$1.div,{role:"separator","aria-orientation":"horizontal",...o,ref:a})});MenuSeparator.displayName=SEPARATOR_NAME$1;var ARROW_NAME$2="MenuArrow",MenuArrow=reactExports.forwardRef((s,a)=>{const{__scopeMenu:i,...o}=s,E=usePopperScope$1(i);return jsxRuntimeExports.jsx(Arrow,{...E,...o,ref:a})});MenuArrow.displayName=ARROW_NAME$2;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=reactExports.forwardRef((s,a)=>{const i=useMenuContext(SUB_TRIGGER_NAME$1,s.__scopeMenu),o=useMenuRootContext(SUB_TRIGGER_NAME$1,s.__scopeMenu),E=useMenuSubContext(SUB_TRIGGER_NAME$1,s.__scopeMenu),j=useMenuContentContext(SUB_TRIGGER_NAME$1,s.__scopeMenu),R=reactExports.useRef(null),{pointerGraceTimerRef:C,onPointerGraceIntentChange:S}=j,_={__scopeMenu:s.__scopeMenu},T=reactExports.useCallback(()=>{R.current&&window.clearTimeout(R.current),R.current=null},[]);return reactExports.useEffect(()=>T,[T]),reactExports.useEffect(()=>{const P=C.current;return()=>{window.clearTimeout(P),S(null)}},[C,S]),jsxRuntimeExports.jsx(MenuAnchor,{asChild:!0,..._,children:jsxRuntimeExports.jsx(MenuItemImpl,{id:E.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":E.contentId,"data-state":getOpenState(i.open),...s,ref:composeRefs$1(a,E.onTriggerChange),onClick:P=>{var N;(N=s.onClick)==null||N.call(s,P),!(s.disabled||P.defaultPrevented)&&(P.currentTarget.focus(),i.open||i.onOpenChange(!0))},onPointerMove:composeEventHandlers$1(s.onPointerMove,whenMouse(P=>{j.onItemEnter(P),!P.defaultPrevented&&!s.disabled&&!i.open&&!R.current&&(j.onPointerGraceIntentChange(null),R.current=window.setTimeout(()=>{i.onOpenChange(!0),T()},100))})),onPointerLeave:composeEventHandlers$1(s.onPointerLeave,whenMouse(P=>{var I,M;T();const N=(I=i.content)==null?void 0:I.getBoundingClientRect();if(N){const D=(M=i.content)==null?void 0:M.dataset.side,B=D==="right",F=B?-5:5,O=N[B?"left":"right"],L=N[B?"right":"left"];j.onPointerGraceIntentChange({area:[{x:P.clientX+F,y:P.clientY},{x:O,y:N.top},{x:L,y:N.top},{x:L,y:N.bottom},{x:O,y:N.bottom}],side:D}),window.clearTimeout(C.current),C.current=window.setTimeout(()=>j.onPointerGraceIntentChange(null),300)}else{if(j.onTriggerLeave(P),P.defaultPrevented)return;j.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers$1(s.onKeyDown,P=>{var I;const N=j.searchRef.current!=="";s.disabled||N&&P.key===" "||SUB_OPEN_KEYS[o.dir].includes(P.key)&&(i.onOpenChange(!0),(I=i.content)==null||I.focus(),P.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=reactExports.forwardRef((s,a)=>{const i=usePortalContext$1(CONTENT_NAME$3,s.__scopeMenu),{forceMount:o=i.forceMount,...E}=s,j=useMenuContext(CONTENT_NAME$3,s.__scopeMenu),R=useMenuRootContext(CONTENT_NAME$3,s.__scopeMenu),C=useMenuSubContext(SUB_CONTENT_NAME$1,s.__scopeMenu),S=reactExports.useRef(null),_=useComposedRefs$1(a,S);return jsxRuntimeExports.jsx(Collection.Provider,{scope:s.__scopeMenu,children:jsxRuntimeExports.jsx(Presence$1,{present:o||j.open,children:jsxRuntimeExports.jsx(Collection.Slot,{scope:s.__scopeMenu,children:jsxRuntimeExports.jsx(MenuContentImpl,{id:C.contentId,"aria-labelledby":C.triggerId,...E,ref:_,align:"start",side:R.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:T=>{var P;R.isUsingKeyboardRef.current&&((P=S.current)==null||P.focus()),T.preventDefault()},onCloseAutoFocus:T=>T.preventDefault(),onFocusOutside:composeEventHandlers$1(s.onFocusOutside,T=>{T.target!==C.trigger&&j.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers$1(s.onEscapeKeyDown,T=>{R.onClose(),T.preventDefault()}),onKeyDown:composeEventHandlers$1(s.onKeyDown,T=>{var I;const P=T.currentTarget.contains(T.target),N=SUB_CLOSE_KEYS[R.dir].includes(T.key);P&&N&&(j.onOpenChange(!1),(I=C.trigger)==null||I.focus(),T.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(s){return s?"open":"closed"}function isIndeterminate(s){return s==="indeterminate"}function getCheckedState(s){return isIndeterminate(s)?"indeterminate":s?"checked":"unchecked"}function focusFirst(s){const a=document.activeElement;for(const i of s)if(i===a||(i.focus(),document.activeElement!==a))return}function wrapArray(s,a){return s.map((i,o)=>s[(a+o)%s.length])}function getNextMatch(s,a,i){const E=a.length>1&&Array.from(a).every(_=>_===a[0])?a[0]:a,j=i?s.indexOf(i):-1;let R=wrapArray(s,Math.max(j,0));E.length===1&&(R=R.filter(_=>_!==i));const S=R.find(_=>_.toLowerCase().startsWith(E.toLowerCase()));return S!==i?S:void 0}function isPointInPolygon(s,a){const{x:i,y:o}=s;let E=!1;for(let j=0,R=a.length-1;j<a.length;R=j++){const C=a[j].x,S=a[j].y,_=a[R].x,T=a[R].y;S>o!=T>o&&i<(_-C)*(o-S)/(T-S)+C&&(E=!E)}return E}function isPointerInGraceArea(s,a){if(!a)return!1;const i={x:s.clientX,y:s.clientY};return isPointInPolygon(i,a)}function whenMouse(s){return a=>a.pointerType==="mouse"?s(a):void 0}var Root3=Menu,Anchor2=MenuAnchor,Content2$2=MenuContent,Group=MenuGroup,Label=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator=MenuItemIndicator,Separator=MenuSeparator,Arrow2=MenuArrow,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext,createDropdownMenuScope]=createContextScope$1(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=s=>{const{__scopeDropdownMenu:a,children:i,dir:o,open:E,defaultOpen:j,onOpenChange:R,modal:C=!0}=s,S=useMenuScope(a),_=reactExports.useRef(null),[T=!1,P]=useControllableState({prop:E,defaultProp:j,onChange:R});return jsxRuntimeExports.jsx(DropdownMenuProvider,{scope:a,triggerId:useId(),triggerRef:_,contentId:useId(),open:T,onOpenChange:P,onOpenToggle:reactExports.useCallback(()=>P(N=>!N),[P]),modal:C,children:jsxRuntimeExports.jsx(Root3,{...S,open:T,onOpenChange:P,dir:o,modal:C,children:i})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$2="DropdownMenuTrigger",DropdownMenuTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,disabled:o=!1,...E}=s,j=useDropdownMenuContext(TRIGGER_NAME$2,i),R=useMenuScope(i);return jsxRuntimeExports.jsx(Anchor2,{asChild:!0,...R,children:jsxRuntimeExports.jsx(Primitive$1.button,{type:"button",id:j.triggerId,"aria-haspopup":"menu","aria-expanded":j.open,"aria-controls":j.open?j.contentId:void 0,"data-state":j.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...E,ref:composeRefs$1(a,j.triggerRef),onPointerDown:composeEventHandlers$1(s.onPointerDown,C=>{!o&&C.button===0&&C.ctrlKey===!1&&(j.onOpenToggle(),j.open||C.preventDefault())}),onKeyDown:composeEventHandlers$1(s.onKeyDown,C=>{o||(["Enter"," "].includes(C.key)&&j.onOpenToggle(),C.key==="ArrowDown"&&j.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(C.key)&&C.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$2;var CONTENT_NAME$2="DropdownMenuContent",DropdownMenuContent$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useDropdownMenuContext(CONTENT_NAME$2,i),j=useMenuScope(i),R=reactExports.useRef(!1);return jsxRuntimeExports.jsx(Content2$2,{id:E.contentId,"aria-labelledby":E.triggerId,...j,...o,ref:a,onCloseAutoFocus:composeEventHandlers$1(s.onCloseAutoFocus,C=>{var S;R.current||(S=E.triggerRef.current)==null||S.focus(),R.current=!1,C.preventDefault()}),onInteractOutside:composeEventHandlers$1(s.onInteractOutside,C=>{const S=C.detail.originalEvent,_=S.button===0&&S.ctrlKey===!0,T=S.button===2||_;(!E.modal||T)&&(R.current=!0)}),style:{...s.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$2;var GROUP_NAME="DropdownMenuGroup",DropdownMenuGroup=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(Group,{...E,...o,ref:a})});DropdownMenuGroup.displayName=GROUP_NAME;var LABEL_NAME="DropdownMenuLabel",DropdownMenuLabel$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(Label,{...E,...o,ref:a})});DropdownMenuLabel$1.displayName=LABEL_NAME;var ITEM_NAME="DropdownMenuItem",DropdownMenuItem$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(Item2$1,{...E,...o,ref:a})});DropdownMenuItem$1.displayName=ITEM_NAME;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(CheckboxItem,{...E,...o,ref:a})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(RadioGroup,{...E,...o,ref:a})});DropdownMenuRadioGroup.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(RadioItem,{...E,...o,ref:a})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME="DropdownMenuItemIndicator",DropdownMenuItemIndicator=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(ItemIndicator,{...E,...o,ref:a})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME;var SEPARATOR_NAME="DropdownMenuSeparator",DropdownMenuSeparator$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(Separator,{...E,...o,ref:a})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME;var ARROW_NAME$1="DropdownMenuArrow",DropdownMenuArrow=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(Arrow2,{...E,...o,ref:a})});DropdownMenuArrow.displayName=ARROW_NAME$1;var SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(SubTrigger,{...E,...o,ref:a})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=reactExports.forwardRef((s,a)=>{const{__scopeDropdownMenu:i,...o}=s,E=useMenuScope(i);return jsxRuntimeExports.jsx(SubContent,{...E,...o,ref:a,style:{...s.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$1=DropdownMenu$1,Trigger$1=DropdownMenuTrigger$1,Content2$1=DropdownMenuContent$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$1,DropdownMenuTrigger=Trigger$1,DropdownMenuSubTrigger=reactExports.forwardRef(({className:s,inset:a,children:i,...o},E)=>jsxRuntimeExports.jsxs(SubTrigger2,{ref:E,className:cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",a&&"pl-8",s),...o,children:[i,jsxRuntimeExports.jsx(ChevronRight,{className:"ml-auto h-4 w-4"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(SubContent2,{ref:i,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",s),...a}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=reactExports.forwardRef(({className:s,sideOffset:a=4,...i},o)=>jsxRuntimeExports.jsx(Content2$1,{ref:o,sideOffset:a,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",s),...i}));DropdownMenuContent.displayName=Content2$1.displayName;const DropdownMenuItem=reactExports.forwardRef(({className:s,inset:a,...i},o)=>jsxRuntimeExports.jsx(Item2,{ref:o,className:cn("relative cursor-pointer flex select-none items-center rounded-sm px-3 py-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a&&"pl-8",s),...i}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=reactExports.forwardRef(({className:s,children:a,checked:i,...o},E)=>jsxRuntimeExports.jsxs(CheckboxItem2,{ref:E,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:i,...o,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(Check,{className:"h-4 w-4"})})}),a]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=reactExports.forwardRef(({className:s,children:a,...i},o)=>jsxRuntimeExports.jsxs(RadioItem2,{ref:o,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...i,children:[jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntimeExports.jsx(ItemIndicator2,{children:jsxRuntimeExports.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),a]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=reactExports.forwardRef(({className:s,inset:a,...i},o)=>jsxRuntimeExports.jsx(Label2,{ref:o,className:cn("px-2 py-1.5 text-sm font-semibold",a&&"pl-8",s),...i}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=reactExports.forwardRef(({className:s,...a},i)=>jsxRuntimeExports.jsx(Separator2,{ref:i,className:cn("-mx-1 my-1 h-px bg-muted",s),...a}));DropdownMenuSeparator.displayName=Separator2.displayName;const SaveChanges=()=>{var ue,ce;const{setShowOptimizer:s,options:a,modeData:i,savingData:o,setSavingData:E,invalidatingCache:j,setInvalidatingCache:R,global:C}=useAppContext();a==null||a.optimizer_url,useToast();const{submitSettings:S}=useSubmitSettings(),_=C?2:0,[T,P]=reactExports.useState(!1);reactExports.useState(!1);const N=reactExports.useRef(null),[I,M]=reactExports.useState(_),[D,B]=reactExports.useState(_);useDispatch();const{fresh:F,touched:O,activeReport:L,data:$,settings:V}=useSelector(optimizerData);reactExports.useEffect(()=>{M(O&&!C?1:C?2:0)},[O]);const G=reactExports.useMemo(()=>(V==null?void 0:V.filter(pe=>{var xe;return["Critical CSS","Remove Unused CSS"].includes(pe.name)&&((xe=pe.status)==null?void 0:xe.status)!=="success"}))||[],[V]),K=[{text:"Save Changes",title:"Save Changes?",description:"You have made changes to your settings. Click 'Save Changes' to apply your modifications or 'Discard' to revert to the previous state.",onClick:()=>S(!0)},{text:jsxRuntimeExports.jsx("div",{className:"flex w-full items-center justify-between",children:" Save Changes"}),title:"Do you want to Save?",description:jsxRuntimeExports.jsx("div",{className:"",children:G.length>0?jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-6",children:jsxRuntimeExports.jsx("div",{children:"You've made changes to your settings. For accurate results, wait for all tasks to complete before saving and re-analyzing."})}):jsxRuntimeExports.jsx("div",{children:"You have made changes to your settings. Click 'Apply Optimization' to apply your modifications and re-analyze the page or 'Discard' to revert to the previous state."})}),onClick:()=>{S(!0)},action_text:"Save Changes"},{text:"Apply for Entire Site",title:"Apply these settings as entire site?",description:"You have made changes to your settings. Click 'Save Changes' to override entire site settings or 'Discard' to revert to the previous state.",onClick:()=>{S(!1,!0)}}],J=reactExports.useCallback(pe=>{if(!pe)return null;const xe=5,oe=[...pe.grouped.opportunities,...pe.grouped.diagnostics].filter(H=>{var W,U;return((U=(W=H.files)==null?void 0:W.items)==null?void 0:U.length)>0||H.settings.length>0}),Y=oe.length,ae=Y-xe;return{show:xe,balance:ae,count:Y,audits:oe}},[$==null?void 0:$.audits]),ne=reactExports.useMemo(()=>J($),[$]),le=reactExports.useMemo(()=>F?!0:O,[F,O]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Mode,{children:jsxRuntimeExports.jsx("div",{className:"flex gap-2 items-center flex-none",children:jsxRuntimeExports.jsxs(AlertDialog,{open:T,onOpenChange:P,children:[jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(Button,{"data-tour":"save-changes",ref:N,asChild:!0,className:cn("flex overflow-hidden justify-between select-none relative text-sm gap-2 pl-1 pr-2 h-12 rounded-[14px]",!le&&"bg-brand-700 dark:bg-primary dark:hover:bg-primary/90"),children:jsxRuntimeExports.jsxs(AlertDialogTrigger,{onClick:pe=>B(I),className:cn("flex gap-2 items-center pl-3 pr-2 h-full"),children:[o||j?jsxRuntimeExports.jsx(Loader,{className:"w-5 mr-0.5 animate-spin"}):jsxRuntimeExports.jsx(Save,{className:"w-5 mr-0.5"}),K[I].text]})}),jsxRuntimeExports.jsx(UnsavedChanges,{onCancel:()=>{s(!1)},cancel:"Discard & Leave",onClick:()=>{s(!1)},children:jsxRuntimeExports.jsx(DropdownMenuTrigger,{className:"w-8 h-12 flex items-center justify-center",children:jsxRuntimeExports.jsx(TooltipText,{className:"flex items-center justify-center",asChild:!0,text:"Additional Settings",children:jsxRuntimeExports.jsx(EllipsisVertical,{className:cn("h-5 w-5 dark:text-brand-300 text-brand-600 transition-opacity")})})})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{style:{width:((ue=N.current)==null?void 0:ue.clientWidth)||200},align:"end",sideOffset:6,className:"z-[110000] relative min-w-[200px]",children:[jsxRuntimeExports.jsx(DropdownMenuLabel,{children:"Additional Options"}),K.filter((pe,xe)=>I!==xe).map((pe,xe)=>jsxRuntimeExports.jsxs("span",{children:[jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:oe=>{setTimeout(()=>{P(!0),B(K.indexOf(pe))},100)},children:pe.text})]},xe))]})]}),jsxRuntimeExports.jsx(AlertDialogContent,{asChild:!0,className:"w-full max-w-[520px]",children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(AlertDialogHeader,{children:[jsxRuntimeExports.jsx(AlertDialogTitle,{children:K[D].title}),jsxRuntimeExports.jsx(AlertDialogDescription,{children:jsxRuntimeExports.jsx("div",{children:K[D].description})})]}),jsxRuntimeExports.jsxs(AlertDialogFooter,{children:[jsxRuntimeExports.jsx(AlertDialogAction,{onClick:pe=>K[D].onClick(),children:(ce=K[D])!=null&&ce.action_text?K[D].action_text:"Save Changes"}),jsxRuntimeExports.jsx(AlertDialogCancel,{onClick:pe=>P(!1),children:"Discard"})]})]})})]})})}),jsxRuntimeExports.jsx(Mode,{mode:"onboard",children:jsxRuntimeExports.jsx(Dialog,{children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(DialogTrigger,{className:cn("pointer-events-none opacity-50 cursor-not-allowed ",ne&&ne.count>0&&"pointer-events-auto opacity-100 cursor-pointer"),children:jsxRuntimeExports.jsxs(AppButton,{className:"text-sm",children:[o?jsxRuntimeExports.jsx(ForwardRef$C,{className:"w-5 mr-0.5 animate-spin"}):jsxRuntimeExports.jsx(CircleUser,{className:"w-5 mr-0.5"}),"Connect your Account"]})}),jsxRuntimeExports.jsx(DialogContent,{className:"px-6 py-6",children:jsxRuntimeExports.jsx(DialogHeader,{children:ne&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(DialogTitle,{children:["RapidLoad can improve ",ne.count," Audits"]}),jsxRuntimeExports.jsx("div",{className:"py-4 text-sm",children:jsxRuntimeExports.jsxs("ul",{children:[$&&ne.audits.slice(0,ne.show).map(pe=>jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(Card,{className:"px-3 py-2 mb-1.5",children:jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[jsxRuntimeExports.jsx("div",{className:"inline-flex items-center justify-center w-7 h-7 rounded-full dark:bg-brand-700 bg-brand-100",children:pe.scoreDisplayMode==="informative"?jsxRuntimeExports.jsx("span",{className:"w-3 h-3 border-2 rounded-full"}):jsxRuntimeExports.jsx(PerformanceIcons,{icon:pe.icon})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[pe.name,pe.displayValue&&jsxRuntimeExports.jsx("span",{className:"text-xxs leading-tight text-muted-foreground",children:pe.displayValue})]})]})})},pe.id)),$&&!!ne.balance&&ne.balance>0&&jsxRuntimeExports.jsxs("li",{className:"text-center text-muted-foreground mt-3",children:["and ",ne.balance," more audit",ne.balance>1&&"s","..."]})]})}),jsxRuntimeExports.jsx("div",{className:"flex justify-center",children:(i==null?void 0:i.connect_url)&&jsxRuntimeExports.jsx("a",{href:i==null?void 0:i.connect_url,target:i==null?void 0:i.target,children:jsxRuntimeExports.jsx(Button,{className:"gap-2",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CircleUser,{className:"w-5 mr-0.5"}),"Connect RapidLoad Account"]})})})})]})})})]})})})]})},capitalizeCategory=s=>s==="css"||s==="cdn"?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1),getWidthForCategory=s=>{switch(s){case"cdn":return 625;case"font":return 515;case"css":return 130;case"javascript":return 255;case"image":return 395;case"cache":return 740;default:return 395}},SpeedSettings=({})=>{var Ke;const{settings:s,data:a,activeReport:i,settingsLoading:o,activeGear:E,revisions:j,loading:R}=useSelector(optimizerData),[C,S]=reactExports.useState("css"),[_,T]=reactExports.useState({}),{dispatch:P,openCategory:N,activeTab:I,auditsReturn:M,testModeStatus:D,settingsMode:B}=useCommonDispatch(),F=["css","javascript","image","font","cdn","cache"],[O,L]=reactExports.useState(!0),$=["starter","accelerate","turboMax"],V=reactExports.useRef(null),{options:G,savingData:K,invalidatingCache:J}=useAppContext(),[ne,le]=reactExports.useState(G.rapidload_titan_gear||"custom"),[ue,ce]=reactExports.useState(!1),[pe,xe]=reactExports.useState(G.rapidload_titan_gear||"custom"),[oe,Y]=reactExports.useState(""),{toast:ae}=useToast(),{testMode:H}=useSelector(optimizerData),{handleTestModeSwitchChange:W}=useTestModeUtils(),{isDark:U}=useRootContext(),ie=reactExports.useMemo(()=>({cache:jsxRuntimeExports.jsx(PageCache,{}),cdn:jsxRuntimeExports.jsx(CloudDelivery,{}),image:jsxRuntimeExports.jsx(ImageDeliverySVG,{}),javascript:jsxRuntimeExports.jsx(JavascriptDelivery,{}),js:jsxRuntimeExports.jsx(JavascriptDelivery,{}),font:jsxRuntimeExports.jsx(FontDelivery,{}),css:jsxRuntimeExports.jsx(CSSDelivery,{})}),[]),me=reactExports.useMemo(()=>({cache:jsxRuntimeExports.jsx(PageCacheDuotone,{}),cdn:jsxRuntimeExports.jsx(CloudDeliveryDuotone,{}),image:jsxRuntimeExports.jsx(ImageDeliverySVGDuotone,{}),javascript:jsxRuntimeExports.jsx(JavascriptDeliveryDuotone,{}),js:jsxRuntimeExports.jsx(JavascriptDeliveryDuotone,{}),font:jsxRuntimeExports.jsx(FontDeliveryDuotone,{}),css:jsxRuntimeExports.jsx(CSSDeliveryDuotone,{})}),[]),ee=reactExports.useCallback(Re=>{var _e,Ie,ke;const fe={},ve=[...((_e=a==null?void 0:a.grouped)==null?void 0:_e.passed_audits)||[],...((Ie=a==null?void 0:a.grouped)==null?void 0:Ie.diagnostics)||[],...((ke=a==null?void 0:a.grouped)==null?void 0:ke.opportunities)||[]];return Re.forEach(Le=>{fe[Le.category]||(fe[Le.category]=[]),fe[Le.category].push({...Le,audits:(ve||[]).filter(et=>et.settings.find(nt=>nt.name===Le.name))})}),fe},[s,a,i]);reactExports.useEffect(()=>{const Re=ee(s||[]),fe=Object.keys(Re).sort((_e,Ie)=>{const ke=F.indexOf(_e),Le=F.indexOf(Ie);return ke-Le}),ve={};fe.forEach(_e=>{ve[_e]=Re[_e]}),T(ve),N?S(N):P(setCommonState("openCategory","css"))},[s,a,i]);const ye=reactExports.useCallback((Re,fe,ve)=>{P(updateSettings(Re.audits[0],Re,ve,fe))},[]),[Ce,Ae]=reactExports.useState([]),[De,Ze]=reactExports.useState([]),Ue=reactExports.useRef(!0),{submitSettings:Se}=useSubmitSettings();reactExports.useEffect(()=>{if(Ue.current){Ue.current=!1;return}if(_&&O){const Re=[],fe=[];F.forEach(ve=>{if(_[ve]){const _e=_[ve].slice().sort((Le,et)=>{const nt=Le.audits.some(ct=>ct.type!=="passed_audit"),ft=et.audits.some(ct=>ct.type!=="passed_audit");if(nt&&!ft)return-1;if(!nt&&ft)return 1;const mt=Le.inputs[0].value,at=et.inputs[0].value;return mt&&!at?-1:!mt&&at?1:0}),Ie=_e.filter(Le=>!Ge(Le)),ke=_e.filter(Le=>Ge(Le));Re.push(...Ie),fe.push(...ke)}}),Ae(Re),Ze(fe),L(!1)}},[_]);const ze=(Re,fe)=>{var ve;if(Te(Re),le(Re),E==="custom"&&!fe)(ve=V.current)==null||ve.click();else if(P(changeGear(Re)),!De)return},Me=reactExports.useRef(!0);reactExports.useEffect(()=>{if(Me.current){Me.current=!1;return}console.log(E,pe),E!=="custom"&&E!==pe&&(xe(ne),Se(!0))},[E]);const Te=Re=>{let fe;Re==="turboMax"&&!H&&(fe=ae({description:jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"flex font-semibold w-full gap-2 text-center items-center",children:[jsxRuntimeExports.jsx(ForwardRef$a,{className:"w-5 text-orange-600"}),"Do you want to turn on test mode?",jsxRuntimeExports.jsxs(AppButton,{className:"px-2",onClick:async ve=>{fe&&fe.dismiss(),await W(!0)},variant:"outline",children:[jsxRuntimeExports.jsx(ForwardRef$x,{className:"h-5 w-5 text-gray-500"}),"Yes"]}),jsxRuntimeExports.jsxs(AppButton,{className:"px-2",onClick:ve=>{fe&&fe.dismiss()},variant:"outline",children:[jsxRuntimeExports.jsx(ForwardRef$n,{className:"h-5 w-5 text-gray-500"}),"No"]})]})})},99999999))};reactExports.useEffect(()=>{L(!0)},[i]),reactExports.useEffect(()=>{},[s]),reactExports.useEffect(()=>{},[s]);const be={starter:"Optimizes foundational aspects for faster load speeds by removing unused CSS, minifying CSS and JavaScript, caching pages, and self-hosting Google Fonts.",accelerate:"Starter mode + RapidLoad CDN, serving next-gen images, and enhancing image handling with lazy loading, while also deferring JavaScript and adding crucial image attributes.",turboMax:"Unlock peak performance potential including Accelerator mode + generating critical CSS, advanced JavaScript handling methods, such as delaying execution for improved speed and efficiency.",custom:"Tailor your optimization strategy to your needs, combining features like Accelerator mode and advanced JavaScript handling for personalized performance."},Oe=oe||E,Ge=Re=>{const fe=Re.inputs[0].value&&Re.audits.some(_e=>_e.type==="passed_audit"),ve=Re.audits.some(_e=>_e.type!=="passed_audit");return fe||ve},[We,$e]=reactExports.useState({}),[qe,Qe]=reactExports.useState(!1);reactExports.useEffect(()=>{if(qe){const Re={};Object.keys(_).forEach(fe=>{Re[fe]=!1}),$e(Re),Qe(!1)}},[_]),reactExports.useEffect(()=>{M&&(ce(!0),P(setCommonState("auditsReturn",!1)))},[M]),Ce.filter(Re=>Re.category===C);const[Je,st]=reactExports.useState({cpcss:!1,uucss:!1,cpcssuucss:!1}),rt=reactExports.useCallback(()=>{if(!s)return;const Re=s.some(_e=>{var Ie;return(Ie=_e.inputs.find(ke=>ke.key==="uucss_enable_cpcss"))==null?void 0:Ie.value}),fe=s.some(_e=>{var Ie;return(Ie=_e.inputs.find(ke=>ke.key==="uucss_enable_uucss"))==null?void 0:Ie.value}),ve=s.some(_e=>{var Ie;return(Ie=_e.inputs.find(ke=>ke.key==="enable_uucss_on_cpcss"))==null?void 0:Ie.value});st({cpcss:Re,uucss:fe,cpcssuucss:!ve})},[s]);return reactExports.useEffect(()=>{rt()},[s,rt]),reactExports.useEffect(()=>{P(setCommonState("uucssError",Je.cpcss&&Je.uucss&&Je.cpcssuucss))},[Je,P]),jsxRuntimeExports.jsx(AnimatePresence,{children:jsxRuntimeExports.jsxs(m$3.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.05},className:"",children:[jsxRuntimeExports.jsxs("div",{className:"border-b border-brand-300 px-11 py-4 dark:border-brand-600/40",children:[jsxRuntimeExports.jsxs("div",{className:"pb-4",children:[o&&jsxRuntimeExports.jsx("div",{children:"Loading..."}),jsxRuntimeExports.jsx("h3",{className:"font-semibold text-lg",children:"Performance Gears"}),jsxRuntimeExports.jsx("span",{className:"font-normal text-sm text-zinc-600 dark:text-brand-300",children:"Select your Performance Mode: Starter, Accelerate, TurboMax, or Customize, to fine-tune your site's speed."})]}),jsxRuntimeExports.jsx("div",{className:"flex gap-4 ","data-tour":"settings-gear",children:$.map((Re,fe)=>jsxRuntimeExports.jsx(TooltipText,{text:R?"Analyzing your site performance":K||J?"Please wait while applying optimizations":null,children:jsxRuntimeExports.jsx("div",{className:`${(K||J||R)&&"cursor-not-allowed opacity-90 pointer-events-none"} cursor-pointer transition-all flex px-4 py-4 min-w-[166px] min-h-[166px] items-center justify-center w-fit rounded-3xl dark:bg-brand-950 bg-brand-0 dark:hover:border-purple-700 dark:border-brand-700/70 hover:border-purple-700 border border-brand-200 border-[3px]  ${Re===(E||ne)?" border-purple-700 dark:border-purple-700":""}`,onClick:ve=>{ze(Re)},onMouseEnter:()=>Y(Re),onMouseLeave:()=>Y(""),children:jsxRuntimeExports.jsxs("div",{className:`flex flex-col gap-1 items-center text-center ${Re==="turboMax"?" pt-1.5":""}`,children:[["starter","accelerate","turboMax"].includes(Re)&&E===Re&&jsxRuntimeExports.jsx("div",{className:"absolute ml-28 -mt-4",children:K||J?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}):jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-6 h-6 text-purple-800"})}),E===Re&&(K||J)?jsxRuntimeExports.jsx("div",{className:"w-16 h-16 border-4 border-t-transparent border-[#7E22CE] rounded-full animate-spin"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[Re==="starter"&&jsxRuntimeExports.jsx(Starter,{cls:"px-2 py-2",isDark:U}),Re==="accelerate"&&jsxRuntimeExports.jsx(Accelerate,{cls:"px-2 py-2",isDark:U}),Re==="turboMax"&&jsxRuntimeExports.jsx(TurboMax,{cls:"px-2 py-2",isDark:U})]}),jsxRuntimeExports.jsx("div",{children:E===Re&&(K||J)?jsxRuntimeExports.jsx("p",{className:"font-semibold capitalize z-[110000] mt-2",children:"Applying..."}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("p",{className:"font-semibold capitalize",children:Re}),Re==="turboMax"&&jsxRuntimeExports.jsx("p",{className:"font-normal text-[10px] leading-none",children:"Test Mode Recommended"})]})})]})},fe)},`tooltip-${Re}`))}),jsxRuntimeExports.jsx(UnsavedChanges,{title:"Modified Customize Settings changes",description:"Switching to Performance Modes will result in the loss of any customized settings.",action:"Activate",performanceGear:!0,cancel:"Cancel",onClick:()=>{ze(ne,!0),ce(!1)},children:jsxRuntimeExports.jsx("div",{ref:V})}),jsxRuntimeExports.jsxs("div",{className:"py-4 ",children:[oe?jsxRuntimeExports.jsxs("h3",{className:"font-semibold dark:text-brand-300 capitalize",children:[oe," ",E===oe&&"Activated"]}):jsxRuntimeExports.jsxs("h3",{className:"font-semibold dark:text-brand-300 capitalize",children:[E," Activated"]}),jsxRuntimeExports.jsx("span",{className:"font-normal text-sm text-zinc-600 dark:text-brand-300",children:be[Oe]})]})]}),jsxRuntimeExports.jsxs("div",{className:"px-11 py-8",children:[jsxRuntimeExports.jsx("div",{children:o?jsxRuntimeExports.jsx("div",{className:`w-48 animate-pulse h-10 select-none transition-all rounded-2xl cursor-pointer
          flex items-center gap-2 px-4 py-2 -ml-1 text-sm font-medium dark:hover:border-purple-700 dark:border-brand-700/70 hover:border-purple-700 border border-brand-200 border-[3px] dark:hover:bg-brand-950 bg-brand-0 dark:bg-brand-950`}):jsxRuntimeExports.jsxs("div",{onClick:()=>{le("custom"),ce(Re=>!Re)},onMouseEnter:()=>Y("custom"),onMouseLeave:()=>Y(""),className:cn(`select-none w-fit transition-all rounded-2xl cursor-pointer  
          flex items-center gap-2 px-4 py-2 -ml-1 text-sm font-medium dark:hover:border-purple-700 dark:border-brand-700/70 hover:border-purple-700 border border-brand-200 border-[3px] dark:hover:bg-brand-950 bg-brand-0 dark:bg-brand-950 `,E==="custom"&&"border-purple-700",(K||J||R)&&"cursor-not-allowed opacity-90 pointer-events-none"),"data-tour":"customize-settings",children:[E==="custom"&&jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-6 h-6 text-purple-800"})}),"Customize Settings ",jsxRuntimeExports.jsx(ForwardRef$w,{className:cn("w-4 rounded-[15px] transition-transform",ue&&"-rotate-180")})]})}),ue&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"py-3 relative",children:jsxRuntimeExports.jsx(SettingsLine,{width:getWidthForCategory(C)||220,category:C})}),jsxRuntimeExports.jsx("ul",{className:"flex gap-3 ml-12",children:F.map((Re,fe)=>jsxRuntimeExports.jsx("li",{onClick:ve=>{S(Re),P(setCommonState("openCategory",Re))},children:jsxRuntimeExports.jsxs(m$3.div,{id:Re,transition:{duration:.5},className:cn("cursor-pointer select-none flex gap-2 transition-all items-center border border-transparent py-[6px] pr-3 pl-[7px] rounded-2xl w-fit mb-4 hover:bg-brand-50 dark:bg-brand-950/60 dark:hover:bg-brand-950 bg-brand-0 hover:shadow-md",C===Re&&"dark:bg-brand-950 shadow-md transition-all"),children:[jsxRuntimeExports.jsx("div",{children:C===Re?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ie[Re]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:me[Re]})}),jsxRuntimeExports.jsx("span",{className:"font-medium tracking-wide",children:capitalizeCategory(Re)})]})},fe))}),jsxRuntimeExports.jsx("div",{className:cn(""),children:jsxRuntimeExports.jsx("ul",{children:(Ke=_[C])==null?void 0:Ke.map((Re,fe)=>jsxRuntimeExports.jsx("li",{children:jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.3,delay:fe?.05*fe:0},children:jsxRuntimeExports.jsx(AuditSettingsItem,{item:Re,itemIndex:fe,updateValue:ye,actionRequired:!0},`${Re.category}-${fe}`)})},`${Re.category}-${fe}`))})}),jsxRuntimeExports.jsx("div",{className:"flex justify-end mt-6",children:jsxRuntimeExports.jsx(SaveChanges,{})})]})]})]})})};var marker$1="vercel.ai.error",symbol$1=Symbol.for(marker$1),_a$1,_AISDKError$1=class cr extends Error{constructor({name:a,message:i,cause:o}){super(i),this[_a$1]=!0,this.name=a,this.cause=o}static isInstance(a){return cr.hasMarker(a,marker$1)}static hasMarker(a,i){const o=Symbol.for(i);return a!=null&&typeof a=="object"&&o in a&&typeof a[o]=="boolean"&&a[o]===!0}};_a$1=symbol$1;var AISDKError$1=_AISDKError$1;function getErrorMessage$1(s){return s==null?"unknown error":typeof s=="string"?s:s instanceof Error?s.message:JSON.stringify(s)}var name3$1="AI_InvalidArgumentError",marker4$1=`vercel.ai.error.${name3$1}`,symbol4$1=Symbol.for(marker4$1),_a4$1,InvalidArgumentError$1=class extends AISDKError$1{constructor({message:a,cause:i,argument:o}){super({name:name3$1,message:a,cause:i}),this[_a4$1]=!0,this.argument=o}static isInstance(a){return AISDKError$1.hasMarker(a,marker4$1)}};_a4$1=symbol4$1;var name12$1="AI_TypeValidationError",marker13$1=`vercel.ai.error.${name12$1}`,symbol13$1=Symbol.for(marker13$1),_a13$1,_TypeValidationError$1=class Lt extends AISDKError$1{constructor({value:a,cause:i}){super({name:name12$1,message:`Type validation failed: Value: ${JSON.stringify(a)}.
Error message: ${getErrorMessage$1(i)}`,cause:i}),this[_a13$1]=!0,this.value=a}static isInstance(a){return AISDKError$1.hasMarker(a,marker13$1)}static wrap({value:a,cause:i}){return Lt.isInstance(i)&&i.value===a?i:new Lt({value:a,cause:i})}};_a13$1=symbol13$1;var TypeValidationError$1=_TypeValidationError$1;let customAlphabet=(s,a=21)=>(i=a)=>{let o="",E=i|0;for(;E--;)o+=s[Math.random()*s.length|0];return o};var secureJsonParse={exports:{}};const hasBuffer=typeof Buffer<"u",suspectProtoRx=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,suspectConstructorRx=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function _parse(s,a,i){i==null&&a!==null&&typeof a=="object"&&(i=a,a=void 0),hasBuffer&&Buffer.isBuffer(s)&&(s=s.toString()),s&&s.charCodeAt(0)===65279&&(s=s.slice(1));const o=JSON.parse(s,a);if(o===null||typeof o!="object")return o;const E=i&&i.protoAction||"error",j=i&&i.constructorAction||"error";if(E==="ignore"&&j==="ignore")return o;if(E!=="ignore"&&j!=="ignore"){if(suspectProtoRx.test(s)===!1&&suspectConstructorRx.test(s)===!1)return o}else if(E!=="ignore"&&j==="ignore"){if(suspectProtoRx.test(s)===!1)return o}else if(suspectConstructorRx.test(s)===!1)return o;return filter(o,{protoAction:E,constructorAction:j,safe:i&&i.safe})}function filter(s,{protoAction:a="error",constructorAction:i="error",safe:o}={}){let E=[s];for(;E.length;){const j=E;E=[];for(const R of j){if(a!=="ignore"&&Object.prototype.hasOwnProperty.call(R,"__proto__")){if(o===!0)return null;if(a==="error")throw new SyntaxError("Object contains forbidden prototype property");delete R.__proto__}if(i!=="ignore"&&Object.prototype.hasOwnProperty.call(R,"constructor")&&Object.prototype.hasOwnProperty.call(R.constructor,"prototype")){if(o===!0)return null;if(i==="error")throw new SyntaxError("Object contains forbidden prototype property");delete R.constructor}for(const C in R){const S=R[C];S&&typeof S=="object"&&E.push(S)}}}return s}function parse$1(s,a,i){const o=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return _parse(s,a,i)}finally{Error.stackTraceLimit=o}}function safeParse(s,a){const i=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return _parse(s,a,{safe:!0})}catch{return null}finally{Error.stackTraceLimit=i}}secureJsonParse.exports=parse$1;secureJsonParse.exports.default=parse$1;secureJsonParse.exports.parse=parse$1;secureJsonParse.exports.safeParse=safeParse;secureJsonParse.exports.scan=filter;var secureJsonParseExports=secureJsonParse.exports;const SecureJSON=getDefaultExportFromCjs(secureJsonParseExports);var createIdGenerator$1=({prefix:s,size:a=16,alphabet:i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:o="-"}={})=>{const E=customAlphabet(i,a);if(s==null)return E;if(i.includes(o))throw new InvalidArgumentError$1({argument:"separator",message:`The separator "${o}" must not be part of the alphabet "${i}".`});return j=>`${s}${o}${E(j)}`};createIdGenerator$1();function isAbortError(s){return s instanceof Error&&(s.name==="AbortError"||s.name==="TimeoutError")}var validatorSymbol$1=Symbol.for("vercel.ai.validator");function validator$1(s){return{[validatorSymbol$1]:!0,validate:s}}function isValidator$1(s){return typeof s=="object"&&s!==null&&validatorSymbol$1 in s&&s[validatorSymbol$1]===!0&&"validate"in s}function asValidator$1(s){return isValidator$1(s)?s:zodValidator$1(s)}function zodValidator$1(s){return validator$1(a=>{const i=s.safeParse(a);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}})}function safeValidateTypes$1({value:s,schema:a}){const i=asValidator$1(a);try{if(i.validate==null)return{success:!0,value:s};const o=i.validate(s);return o.success?o:{success:!1,error:TypeValidationError$1.wrap({value:s,cause:o.error})}}catch(o){return{success:!1,error:TypeValidationError$1.wrap({value:s,cause:o})}}}var marker="vercel.ai.error",symbol=Symbol.for(marker),_a,_AISDKError=class ur extends Error{constructor({name:a,message:i,cause:o}){super(i),this[_a]=!0,this.name=a,this.cause=o}static isInstance(a){return ur.hasMarker(a,marker)}static hasMarker(a,i){const o=Symbol.for(i);return a!=null&&typeof a=="object"&&o in a&&typeof a[o]=="boolean"&&a[o]===!0}};_a=symbol;var AISDKError=_AISDKError;function getErrorMessage(s){return s==null?"unknown error":typeof s=="string"?s:s instanceof Error?s.message:JSON.stringify(s)}var name3="AI_InvalidArgumentError",marker4=`vercel.ai.error.${name3}`,symbol4=Symbol.for(marker4),_a4,InvalidArgumentError=class extends AISDKError{constructor({message:s,cause:a,argument:i}){super({name:name3,message:s,cause:a}),this[_a4]=!0,this.argument=i}static isInstance(s){return AISDKError.hasMarker(s,marker4)}};_a4=symbol4;var name6="AI_JSONParseError",marker7=`vercel.ai.error.${name6}`,symbol7=Symbol.for(marker7),_a7,JSONParseError=class extends AISDKError{constructor({text:s,cause:a}){super({name:name6,message:`JSON parsing failed: Text: ${s}.
Error message: ${getErrorMessage(a)}`,cause:a}),this[_a7]=!0,this.text=s}static isInstance(s){return AISDKError.hasMarker(s,marker7)}};_a7=symbol7;var name12="AI_TypeValidationError",marker13=`vercel.ai.error.${name12}`,symbol13=Symbol.for(marker13),_a13,_TypeValidationError=class Ot extends AISDKError{constructor({value:a,cause:i}){super({name:name12,message:`Type validation failed: Value: ${JSON.stringify(a)}.
Error message: ${getErrorMessage(i)}`,cause:i}),this[_a13]=!0,this.value=a}static isInstance(a){return AISDKError.hasMarker(a,marker13)}static wrap({value:a,cause:i}){return Ot.isInstance(i)&&i.value===a?i:new Ot({value:a,cause:i})}};_a13=symbol13;var TypeValidationError=_TypeValidationError,createIdGenerator=({prefix:s,size:a=16,alphabet:i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:o="-"}={})=>{const E=customAlphabet(i,a);if(s==null)return E;if(i.includes(o))throw new InvalidArgumentError({argument:"separator",message:`The separator "${o}" must not be part of the alphabet "${i}".`});return j=>`${s}${o}${E(j)}`},generateId=createIdGenerator(),validatorSymbol=Symbol.for("vercel.ai.validator");function validator(s){return{[validatorSymbol]:!0,validate:s}}function isValidator(s){return typeof s=="object"&&s!==null&&validatorSymbol in s&&s[validatorSymbol]===!0&&"validate"in s}function asValidator(s){return isValidator(s)?s:zodValidator(s)}function zodValidator(s){return validator(a=>{const i=s.safeParse(a);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}})}function safeValidateTypes({value:s,schema:a}){const i=asValidator(a);try{if(i.validate==null)return{success:!0,value:s};const o=i.validate(s);return o.success?o:{success:!1,error:TypeValidationError.wrap({value:s,cause:o.error})}}catch(o){return{success:!1,error:TypeValidationError.wrap({value:s,cause:o})}}}function safeParseJSON({text:s,schema:a}){try{const i=SecureJSON.parse(s);if(a==null)return{success:!0,value:i,rawValue:i};const o=safeValidateTypes({value:i,schema:a});return o.success?{...o,rawValue:i}:o}catch(i){return{success:!1,error:JSONParseError.isInstance(i)?i:new JSONParseError({text:s,cause:i})}}}const ignoreOverride=Symbol("Let zodToJsonSchema decide on which parser to use"),defaultOptions={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},getDefaultOptions=s=>typeof s=="string"?{...defaultOptions,name:s}:{...defaultOptions,...s},getRefs=s=>{const a=getDefaultOptions(s),i=a.name!==void 0?[...a.basePath,a.definitionPath,a.name]:a.basePath;return{...a,currentPath:i,propertyPath:void 0,seen:new Map(Object.entries(a.definitions).map(([o,E])=>[E._def,{def:E._def,path:[...a.basePath,a.definitionPath,o],jsonSchema:void 0}]))}};function addErrorMessage(s,a,i,o){o!=null&&o.errorMessages&&i&&(s.errorMessage={...s.errorMessage,[a]:i})}function setResponseValueAndErrors(s,a,i,o,E){s[a]=i,addErrorMessage(s,a,o,E)}var util;(function(s){s.assertEqual=E=>E;function a(E){}s.assertIs=a;function i(E){throw new Error}s.assertNever=i,s.arrayToEnum=E=>{const j={};for(const R of E)j[R]=R;return j},s.getValidEnumValues=E=>{const j=s.objectKeys(E).filter(C=>typeof E[E[C]]!="number"),R={};for(const C of j)R[C]=E[C];return s.objectValues(R)},s.objectValues=E=>s.objectKeys(E).map(function(j){return E[j]}),s.objectKeys=typeof Object.keys=="function"?E=>Object.keys(E):E=>{const j=[];for(const R in E)Object.prototype.hasOwnProperty.call(E,R)&&j.push(R);return j},s.find=(E,j)=>{for(const R of E)if(j(R))return R},s.isInteger=typeof Number.isInteger=="function"?E=>Number.isInteger(E):E=>typeof E=="number"&&isFinite(E)&&Math.floor(E)===E;function o(E,j=" | "){return E.map(R=>typeof R=="string"?`'${R}'`:R).join(j)}s.joinValues=o,s.jsonStringifyReplacer=(E,j)=>typeof j=="bigint"?j.toString():j})(util||(util={}));var objectUtil;(function(s){s.mergeShapes=(a,i)=>({...a,...i})})(objectUtil||(objectUtil={}));const ZodParsedType=util.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=s=>{switch(typeof s){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(s)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(s)?ZodParsedType.array:s===null?ZodParsedType.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?ZodParsedType.promise:typeof Map<"u"&&s instanceof Map?ZodParsedType.map:typeof Set<"u"&&s instanceof Set?ZodParsedType.set:typeof Date<"u"&&s instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=s=>JSON.stringify(s,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(a){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=a}format(a){const i=a||function(j){return j.message},o={_errors:[]},E=j=>{for(const R of j.issues)if(R.code==="invalid_union")R.unionErrors.map(E);else if(R.code==="invalid_return_type")E(R.returnTypeError);else if(R.code==="invalid_arguments")E(R.argumentsError);else if(R.path.length===0)o._errors.push(i(R));else{let C=o,S=0;for(;S<R.path.length;){const _=R.path[S];S===R.path.length-1?(C[_]=C[_]||{_errors:[]},C[_]._errors.push(i(R))):C[_]=C[_]||{_errors:[]},C=C[_],S++}}};return E(this),o}static assert(a){if(!(a instanceof ZodError))throw new Error(`Not a ZodError: ${a}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(a=i=>i.message){const i={},o=[];for(const E of this.issues)E.path.length>0?(i[E.path[0]]=i[E.path[0]]||[],i[E.path[0]].push(a(E))):o.push(a(E));return{formErrors:o,fieldErrors:i}}get formErrors(){return this.flatten()}}ZodError.create=s=>new ZodError(s);const errorMap=(s,a)=>{let i;switch(s.code){case ZodIssueCode.invalid_type:s.received===ZodParsedType.undefined?i="Required":i=`Expected ${s.expected}, received ${s.received}`;break;case ZodIssueCode.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(s.expected,util.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:i=`Unrecognized key(s) in object: ${util.joinValues(s.keys,", ")}`;break;case ZodIssueCode.invalid_union:i="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${util.joinValues(s.options)}`;break;case ZodIssueCode.invalid_enum_value:i=`Invalid enum value. Expected ${util.joinValues(s.options)}, received '${s.received}'`;break;case ZodIssueCode.invalid_arguments:i="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:i="Invalid function return type";break;case ZodIssueCode.invalid_date:i="Invalid date";break;case ZodIssueCode.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(i=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?i=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?i=`Invalid input: must end with "${s.validation.endsWith}"`:util.assertNever(s.validation):s.validation!=="regex"?i=`Invalid ${s.validation}`:i="Invalid";break;case ZodIssueCode.too_small:s.type==="array"?i=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?i=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?i=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?i=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:i="Invalid input";break;case ZodIssueCode.too_big:s.type==="array"?i=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?i=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?i=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?i=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?i=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:i="Invalid input";break;case ZodIssueCode.custom:i="Invalid input";break;case ZodIssueCode.invalid_intersection_types:i="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:i=`Number must be a multiple of ${s.multipleOf}`;break;case ZodIssueCode.not_finite:i="Number must be finite";break;default:i=a.defaultError,util.assertNever(s)}return{message:i}};let overrideErrorMap=errorMap;function setErrorMap(s){overrideErrorMap=s}function getErrorMap(){return overrideErrorMap}const makeIssue=s=>{const{data:a,path:i,errorMaps:o,issueData:E}=s,j=[...i,...E.path||[]],R={...E,path:j};if(E.message!==void 0)return{...E,path:j,message:E.message};let C="";const S=o.filter(_=>!!_).slice().reverse();for(const _ of S)C=_(R,{data:a,defaultError:C}).message;return{...E,path:j,message:C}},EMPTY_PATH=[];function addIssueToContext(s,a){const i=getErrorMap(),o=makeIssue({issueData:a,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,i,i===errorMap?void 0:errorMap].filter(E=>!!E)});s.common.issues.push(o)}class ParseStatus{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(a,i){const o=[];for(const E of i){if(E.status==="aborted")return INVALID;E.status==="dirty"&&a.dirty(),o.push(E.value)}return{status:a.value,value:o}}static async mergeObjectAsync(a,i){const o=[];for(const E of i){const j=await E.key,R=await E.value;o.push({key:j,value:R})}return ParseStatus.mergeObjectSync(a,o)}static mergeObjectSync(a,i){const o={};for(const E of i){const{key:j,value:R}=E;if(j.status==="aborted"||R.status==="aborted")return INVALID;j.status==="dirty"&&a.dirty(),R.status==="dirty"&&a.dirty(),j.value!=="__proto__"&&(typeof R.value<"u"||E.alwaysSet)&&(o[j.value]=R.value)}return{status:a.value,value:o}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=s=>({status:"dirty",value:s}),OK=s=>({status:"valid",value:s}),isAborted=s=>s.status==="aborted",isDirty=s=>s.status==="dirty",isValid=s=>s.status==="valid",isAsync=s=>typeof Promise<"u"&&s instanceof Promise;function __classPrivateFieldGet(s,a,i,o){if(typeof a=="function"?s!==a||!o:!a.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a.get(s)}function __classPrivateFieldSet(s,a,i,o,E){if(typeof a=="function"?s!==a||!E:!a.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a.set(s,i),i}typeof SuppressedError=="function"&&SuppressedError;var errorUtil;(function(s){s.errToObj=a=>typeof a=="string"?{message:a}:a||{},s.toString=a=>typeof a=="string"?a:a==null?void 0:a.message})(errorUtil||(errorUtil={}));var _ZodEnum_cache,_ZodNativeEnum_cache;class ParseInputLazyPath{constructor(a,i,o,E){this._cachedPath=[],this.parent=a,this.data=i,this._path=o,this._key=E}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(s,a)=>{if(isValid(a))return{success:!0,data:a.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new ZodError(s.common.issues);return this._error=i,this._error}}};function processCreateParams(s){if(!s)return{};const{errorMap:a,invalid_type_error:i,required_error:o,description:E}=s;if(a&&(i||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return a?{errorMap:a,description:E}:{errorMap:(R,C)=>{var S,_;const{message:T}=s;return R.code==="invalid_enum_value"?{message:T??C.defaultError}:typeof C.data>"u"?{message:(S=T??o)!==null&&S!==void 0?S:C.defaultError}:R.code!=="invalid_type"?{message:C.defaultError}:{message:(_=T??i)!==null&&_!==void 0?_:C.defaultError}},description:E}}class ZodType{get description(){return this._def.description}_getType(a){return getParsedType(a.data)}_getOrReturnCtx(a,i){return i||{common:a.parent.common,data:a.data,parsedType:getParsedType(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}_processInputParams(a){return{status:new ParseStatus,ctx:{common:a.parent.common,data:a.data,parsedType:getParsedType(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}}_parseSync(a){const i=this._parse(a);if(isAsync(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(a){const i=this._parse(a);return Promise.resolve(i)}parse(a,i){const o=this.safeParse(a,i);if(o.success)return o.data;throw o.error}safeParse(a,i){var o;const E={common:{issues:[],async:(o=i==null?void 0:i.async)!==null&&o!==void 0?o:!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:getParsedType(a)},j=this._parseSync({data:a,path:E.path,parent:E});return handleResult(E,j)}"~validate"(a){var i,o;const E={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:getParsedType(a)};if(!this["~standard"].async)try{const j=this._parseSync({data:a,path:[],parent:E});return isValid(j)?{value:j.value}:{issues:E.common.issues}}catch(j){!((o=(i=j==null?void 0:j.message)===null||i===void 0?void 0:i.toLowerCase())===null||o===void 0)&&o.includes("encountered")&&(this["~standard"].async=!0),E.common={issues:[],async:!0}}return this._parseAsync({data:a,path:[],parent:E}).then(j=>isValid(j)?{value:j.value}:{issues:E.common.issues})}async parseAsync(a,i){const o=await this.safeParseAsync(a,i);if(o.success)return o.data;throw o.error}async safeParseAsync(a,i){const o={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:getParsedType(a)},E=this._parse({data:a,path:o.path,parent:o}),j=await(isAsync(E)?E:Promise.resolve(E));return handleResult(o,j)}refine(a,i){const o=E=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(E):i;return this._refinement((E,j)=>{const R=a(E),C=()=>j.addIssue({code:ZodIssueCode.custom,...o(E)});return typeof Promise<"u"&&R instanceof Promise?R.then(S=>S?!0:(C(),!1)):R?!0:(C(),!1)})}refinement(a,i){return this._refinement((o,E)=>a(o)?!0:(E.addIssue(typeof i=="function"?i(o,E):i),!1))}_refinement(a){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:a}})}superRefine(a){return this._refinement(a)}constructor(a){this.spa=this.safeParseAsync,this._def=a,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(a){return ZodUnion.create([this,a],this._def)}and(a){return ZodIntersection.create(this,a,this._def)}transform(a){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:a}})}default(a){const i=typeof a=="function"?a:()=>a;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:i,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(a){const i=typeof a=="function"?a:()=>a;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:i,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(a){const i=this.constructor;return new i({...this._def,description:a})}pipe(a){return ZodPipeline.create(this,a)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,jwtRegex=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex$1;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4CidrRegex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Regex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ipv6CidrRegex=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64urlRegex=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(s){let a="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return s.precision?a=`${a}\\.\\d{${s.precision}}`:s.precision==null&&(a=`${a}(\\.\\d+)?`),a}function timeRegex(s){return new RegExp(`^${timeRegexSource(s)}$`)}function datetimeRegex(s){let a=`${dateRegexSource}T${timeRegexSource(s)}`;const i=[];return i.push(s.local?"Z?":"Z"),s.offset&&i.push("([+-]\\d{2}:?\\d{2})"),a=`${a}(${i.join("|")})`,new RegExp(`^${a}$`)}function isValidIP(s,a){return!!((a==="v4"||!a)&&ipv4Regex.test(s)||(a==="v6"||!a)&&ipv6Regex.test(s))}function isValidJWT(s,a){if(!jwtRegex.test(s))return!1;try{const[i]=s.split("."),o=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),E=JSON.parse(atob(o));return!(typeof E!="object"||E===null||!E.typ||!E.alg||a&&E.alg!==a)}catch{return!1}}function isValidCidr(s,a){return!!((a==="v4"||!a)&&ipv4CidrRegex.test(s)||(a==="v6"||!a)&&ipv6CidrRegex.test(s))}class ZodString extends ZodType{_parse(a){if(this._def.coerce&&(a.data=String(a.data)),this._getType(a)!==ZodParsedType.string){const j=this._getOrReturnCtx(a);return addIssueToContext(j,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:j.parsedType}),INVALID}const o=new ParseStatus;let E;for(const j of this._def.checks)if(j.kind==="min")a.data.length<j.value&&(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.too_small,minimum:j.value,type:"string",inclusive:!0,exact:!1,message:j.message}),o.dirty());else if(j.kind==="max")a.data.length>j.value&&(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.too_big,maximum:j.value,type:"string",inclusive:!0,exact:!1,message:j.message}),o.dirty());else if(j.kind==="length"){const R=a.data.length>j.value,C=a.data.length<j.value;(R||C)&&(E=this._getOrReturnCtx(a,E),R?addIssueToContext(E,{code:ZodIssueCode.too_big,maximum:j.value,type:"string",inclusive:!0,exact:!0,message:j.message}):C&&addIssueToContext(E,{code:ZodIssueCode.too_small,minimum:j.value,type:"string",inclusive:!0,exact:!0,message:j.message}),o.dirty())}else if(j.kind==="email")emailRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"email",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="emoji")emojiRegex$1||(emojiRegex$1=new RegExp(_emojiRegex,"u")),emojiRegex$1.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"emoji",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="uuid")uuidRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"uuid",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="nanoid")nanoidRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="cuid")cuidRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"cuid",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="cuid2")cuid2Regex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="ulid")ulidRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"ulid",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty());else if(j.kind==="url")try{new URL(a.data)}catch{E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"url",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()}else j.kind==="regex"?(j.regex.lastIndex=0,j.regex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"regex",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty())):j.kind==="trim"?a.data=a.data.trim():j.kind==="includes"?a.data.includes(j.value,j.position)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.invalid_string,validation:{includes:j.value,position:j.position},message:j.message}),o.dirty()):j.kind==="toLowerCase"?a.data=a.data.toLowerCase():j.kind==="toUpperCase"?a.data=a.data.toUpperCase():j.kind==="startsWith"?a.data.startsWith(j.value)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.invalid_string,validation:{startsWith:j.value},message:j.message}),o.dirty()):j.kind==="endsWith"?a.data.endsWith(j.value)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.invalid_string,validation:{endsWith:j.value},message:j.message}),o.dirty()):j.kind==="datetime"?datetimeRegex(j).test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.invalid_string,validation:"datetime",message:j.message}),o.dirty()):j.kind==="date"?dateRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.invalid_string,validation:"date",message:j.message}),o.dirty()):j.kind==="time"?timeRegex(j).test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.invalid_string,validation:"time",message:j.message}),o.dirty()):j.kind==="duration"?durationRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"duration",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()):j.kind==="ip"?isValidIP(a.data,j.version)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"ip",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()):j.kind==="jwt"?isValidJWT(a.data,j.alg)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"jwt",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()):j.kind==="cidr"?isValidCidr(a.data,j.version)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"cidr",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()):j.kind==="base64"?base64Regex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"base64",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()):j.kind==="base64url"?base64urlRegex.test(a.data)||(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{validation:"base64url",code:ZodIssueCode.invalid_string,message:j.message}),o.dirty()):util.assertNever(j);return{status:o.value,value:a.data}}_regex(a,i,o){return this.refinement(E=>a.test(E),{validation:i,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(o)})}_addCheck(a){return new ZodString({...this._def,checks:[...this._def.checks,a]})}email(a){return this._addCheck({kind:"email",...errorUtil.errToObj(a)})}url(a){return this._addCheck({kind:"url",...errorUtil.errToObj(a)})}emoji(a){return this._addCheck({kind:"emoji",...errorUtil.errToObj(a)})}uuid(a){return this._addCheck({kind:"uuid",...errorUtil.errToObj(a)})}nanoid(a){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(a)})}cuid(a){return this._addCheck({kind:"cuid",...errorUtil.errToObj(a)})}cuid2(a){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(a)})}ulid(a){return this._addCheck({kind:"ulid",...errorUtil.errToObj(a)})}base64(a){return this._addCheck({kind:"base64",...errorUtil.errToObj(a)})}base64url(a){return this._addCheck({kind:"base64url",...errorUtil.errToObj(a)})}jwt(a){return this._addCheck({kind:"jwt",...errorUtil.errToObj(a)})}ip(a){return this._addCheck({kind:"ip",...errorUtil.errToObj(a)})}cidr(a){return this._addCheck({kind:"cidr",...errorUtil.errToObj(a)})}datetime(a){var i,o;return typeof a=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:a}):this._addCheck({kind:"datetime",precision:typeof(a==null?void 0:a.precision)>"u"?null:a==null?void 0:a.precision,offset:(i=a==null?void 0:a.offset)!==null&&i!==void 0?i:!1,local:(o=a==null?void 0:a.local)!==null&&o!==void 0?o:!1,...errorUtil.errToObj(a==null?void 0:a.message)})}date(a){return this._addCheck({kind:"date",message:a})}time(a){return typeof a=="string"?this._addCheck({kind:"time",precision:null,message:a}):this._addCheck({kind:"time",precision:typeof(a==null?void 0:a.precision)>"u"?null:a==null?void 0:a.precision,...errorUtil.errToObj(a==null?void 0:a.message)})}duration(a){return this._addCheck({kind:"duration",...errorUtil.errToObj(a)})}regex(a,i){return this._addCheck({kind:"regex",regex:a,...errorUtil.errToObj(i)})}includes(a,i){return this._addCheck({kind:"includes",value:a,position:i==null?void 0:i.position,...errorUtil.errToObj(i==null?void 0:i.message)})}startsWith(a,i){return this._addCheck({kind:"startsWith",value:a,...errorUtil.errToObj(i)})}endsWith(a,i){return this._addCheck({kind:"endsWith",value:a,...errorUtil.errToObj(i)})}min(a,i){return this._addCheck({kind:"min",value:a,...errorUtil.errToObj(i)})}max(a,i){return this._addCheck({kind:"max",value:a,...errorUtil.errToObj(i)})}length(a,i){return this._addCheck({kind:"length",value:a,...errorUtil.errToObj(i)})}nonempty(a){return this.min(1,errorUtil.errToObj(a))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(a=>a.kind==="datetime")}get isDate(){return!!this._def.checks.find(a=>a.kind==="date")}get isTime(){return!!this._def.checks.find(a=>a.kind==="time")}get isDuration(){return!!this._def.checks.find(a=>a.kind==="duration")}get isEmail(){return!!this._def.checks.find(a=>a.kind==="email")}get isURL(){return!!this._def.checks.find(a=>a.kind==="url")}get isEmoji(){return!!this._def.checks.find(a=>a.kind==="emoji")}get isUUID(){return!!this._def.checks.find(a=>a.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(a=>a.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(a=>a.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(a=>a.kind==="cuid2")}get isULID(){return!!this._def.checks.find(a=>a.kind==="ulid")}get isIP(){return!!this._def.checks.find(a=>a.kind==="ip")}get isCIDR(){return!!this._def.checks.find(a=>a.kind==="cidr")}get isBase64(){return!!this._def.checks.find(a=>a.kind==="base64")}get isBase64url(){return!!this._def.checks.find(a=>a.kind==="base64url")}get minLength(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxLength(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}}ZodString.create=s=>{var a;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:(a=s==null?void 0:s.coerce)!==null&&a!==void 0?a:!1,...processCreateParams(s)})};function floatSafeRemainder(s,a){const i=(s.toString().split(".")[1]||"").length,o=(a.toString().split(".")[1]||"").length,E=i>o?i:o,j=parseInt(s.toFixed(E).replace(".","")),R=parseInt(a.toFixed(E).replace(".",""));return j%R/Math.pow(10,E)}class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(a){if(this._def.coerce&&(a.data=Number(a.data)),this._getType(a)!==ZodParsedType.number){const j=this._getOrReturnCtx(a);return addIssueToContext(j,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:j.parsedType}),INVALID}let o;const E=new ParseStatus;for(const j of this._def.checks)j.kind==="int"?util.isInteger(a.data)||(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:j.message}),E.dirty()):j.kind==="min"?(j.inclusive?a.data<j.value:a.data<=j.value)&&(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.too_small,minimum:j.value,type:"number",inclusive:j.inclusive,exact:!1,message:j.message}),E.dirty()):j.kind==="max"?(j.inclusive?a.data>j.value:a.data>=j.value)&&(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.too_big,maximum:j.value,type:"number",inclusive:j.inclusive,exact:!1,message:j.message}),E.dirty()):j.kind==="multipleOf"?floatSafeRemainder(a.data,j.value)!==0&&(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.not_multiple_of,multipleOf:j.value,message:j.message}),E.dirty()):j.kind==="finite"?Number.isFinite(a.data)||(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.not_finite,message:j.message}),E.dirty()):util.assertNever(j);return{status:E.value,value:a.data}}gte(a,i){return this.setLimit("min",a,!0,errorUtil.toString(i))}gt(a,i){return this.setLimit("min",a,!1,errorUtil.toString(i))}lte(a,i){return this.setLimit("max",a,!0,errorUtil.toString(i))}lt(a,i){return this.setLimit("max",a,!1,errorUtil.toString(i))}setLimit(a,i,o,E){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:o,message:errorUtil.toString(E)}]})}_addCheck(a){return new ZodNumber({...this._def,checks:[...this._def.checks,a]})}int(a){return this._addCheck({kind:"int",message:errorUtil.toString(a)})}positive(a){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(a)})}negative(a){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:errorUtil.toString(i)})}finite(a){return this._addCheck({kind:"finite",message:errorUtil.toString(a)})}safe(a){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(a)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(a)})}get minValue(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxValue(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}get isInt(){return!!this._def.checks.find(a=>a.kind==="int"||a.kind==="multipleOf"&&util.isInteger(a.value))}get isFinite(){let a=null,i=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(i===null||o.value>i)&&(i=o.value):o.kind==="max"&&(a===null||o.value<a)&&(a=o.value)}return Number.isFinite(i)&&Number.isFinite(a)}}ZodNumber.create=s=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...processCreateParams(s)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(a){if(this._def.coerce)try{a.data=BigInt(a.data)}catch{return this._getInvalidInput(a)}if(this._getType(a)!==ZodParsedType.bigint)return this._getInvalidInput(a);let o;const E=new ParseStatus;for(const j of this._def.checks)j.kind==="min"?(j.inclusive?a.data<j.value:a.data<=j.value)&&(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.too_small,type:"bigint",minimum:j.value,inclusive:j.inclusive,message:j.message}),E.dirty()):j.kind==="max"?(j.inclusive?a.data>j.value:a.data>=j.value)&&(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.too_big,type:"bigint",maximum:j.value,inclusive:j.inclusive,message:j.message}),E.dirty()):j.kind==="multipleOf"?a.data%j.value!==BigInt(0)&&(o=this._getOrReturnCtx(a,o),addIssueToContext(o,{code:ZodIssueCode.not_multiple_of,multipleOf:j.value,message:j.message}),E.dirty()):util.assertNever(j);return{status:E.value,value:a.data}}_getInvalidInput(a){const i=this._getOrReturnCtx(a);return addIssueToContext(i,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:i.parsedType}),INVALID}gte(a,i){return this.setLimit("min",a,!0,errorUtil.toString(i))}gt(a,i){return this.setLimit("min",a,!1,errorUtil.toString(i))}lte(a,i){return this.setLimit("max",a,!0,errorUtil.toString(i))}lt(a,i){return this.setLimit("max",a,!1,errorUtil.toString(i))}setLimit(a,i,o,E){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:o,message:errorUtil.toString(E)}]})}_addCheck(a){return new ZodBigInt({...this._def,checks:[...this._def.checks,a]})}positive(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(a)})}negative(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:errorUtil.toString(i)})}get minValue(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxValue(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}}ZodBigInt.create=s=>{var a;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:(a=s==null?void 0:s.coerce)!==null&&a!==void 0?a:!1,...processCreateParams(s)})};class ZodBoolean extends ZodType{_parse(a){if(this._def.coerce&&(a.data=!!a.data),this._getType(a)!==ZodParsedType.boolean){const o=this._getOrReturnCtx(a);return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:o.parsedType}),INVALID}return OK(a.data)}}ZodBoolean.create=s=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...processCreateParams(s)});class ZodDate extends ZodType{_parse(a){if(this._def.coerce&&(a.data=new Date(a.data)),this._getType(a)!==ZodParsedType.date){const j=this._getOrReturnCtx(a);return addIssueToContext(j,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:j.parsedType}),INVALID}if(isNaN(a.data.getTime())){const j=this._getOrReturnCtx(a);return addIssueToContext(j,{code:ZodIssueCode.invalid_date}),INVALID}const o=new ParseStatus;let E;for(const j of this._def.checks)j.kind==="min"?a.data.getTime()<j.value&&(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.too_small,message:j.message,inclusive:!0,exact:!1,minimum:j.value,type:"date"}),o.dirty()):j.kind==="max"?a.data.getTime()>j.value&&(E=this._getOrReturnCtx(a,E),addIssueToContext(E,{code:ZodIssueCode.too_big,message:j.message,inclusive:!0,exact:!1,maximum:j.value,type:"date"}),o.dirty()):util.assertNever(j);return{status:o.value,value:new Date(a.data.getTime())}}_addCheck(a){return new ZodDate({...this._def,checks:[...this._def.checks,a]})}min(a,i){return this._addCheck({kind:"min",value:a.getTime(),message:errorUtil.toString(i)})}max(a,i){return this._addCheck({kind:"max",value:a.getTime(),message:errorUtil.toString(i)})}get minDate(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a!=null?new Date(a):null}get maxDate(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a!=null?new Date(a):null}}ZodDate.create=s=>new ZodDate({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(s)});class ZodSymbol extends ZodType{_parse(a){if(this._getType(a)!==ZodParsedType.symbol){const o=this._getOrReturnCtx(a);return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:o.parsedType}),INVALID}return OK(a.data)}}ZodSymbol.create=s=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(s)});class ZodUndefined extends ZodType{_parse(a){if(this._getType(a)!==ZodParsedType.undefined){const o=this._getOrReturnCtx(a);return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:o.parsedType}),INVALID}return OK(a.data)}}ZodUndefined.create=s=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(s)});class ZodNull extends ZodType{_parse(a){if(this._getType(a)!==ZodParsedType.null){const o=this._getOrReturnCtx(a);return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:o.parsedType}),INVALID}return OK(a.data)}}ZodNull.create=s=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(s)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(a){return OK(a.data)}}ZodAny.create=s=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(s)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(a){return OK(a.data)}}ZodUnknown.create=s=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(s)});class ZodNever extends ZodType{_parse(a){const i=this._getOrReturnCtx(a);return addIssueToContext(i,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:i.parsedType}),INVALID}}ZodNever.create=s=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(s)});class ZodVoid extends ZodType{_parse(a){if(this._getType(a)!==ZodParsedType.undefined){const o=this._getOrReturnCtx(a);return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:o.parsedType}),INVALID}return OK(a.data)}}ZodVoid.create=s=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(s)});class ZodArray extends ZodType{_parse(a){const{ctx:i,status:o}=this._processInputParams(a),E=this._def;if(i.parsedType!==ZodParsedType.array)return addIssueToContext(i,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:i.parsedType}),INVALID;if(E.exactLength!==null){const R=i.data.length>E.exactLength.value,C=i.data.length<E.exactLength.value;(R||C)&&(addIssueToContext(i,{code:R?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:C?E.exactLength.value:void 0,maximum:R?E.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:E.exactLength.message}),o.dirty())}if(E.minLength!==null&&i.data.length<E.minLength.value&&(addIssueToContext(i,{code:ZodIssueCode.too_small,minimum:E.minLength.value,type:"array",inclusive:!0,exact:!1,message:E.minLength.message}),o.dirty()),E.maxLength!==null&&i.data.length>E.maxLength.value&&(addIssueToContext(i,{code:ZodIssueCode.too_big,maximum:E.maxLength.value,type:"array",inclusive:!0,exact:!1,message:E.maxLength.message}),o.dirty()),i.common.async)return Promise.all([...i.data].map((R,C)=>E.type._parseAsync(new ParseInputLazyPath(i,R,i.path,C)))).then(R=>ParseStatus.mergeArray(o,R));const j=[...i.data].map((R,C)=>E.type._parseSync(new ParseInputLazyPath(i,R,i.path,C)));return ParseStatus.mergeArray(o,j)}get element(){return this._def.type}min(a,i){return new ZodArray({...this._def,minLength:{value:a,message:errorUtil.toString(i)}})}max(a,i){return new ZodArray({...this._def,maxLength:{value:a,message:errorUtil.toString(i)}})}length(a,i){return new ZodArray({...this._def,exactLength:{value:a,message:errorUtil.toString(i)}})}nonempty(a){return this.min(1,a)}}ZodArray.create=(s,a)=>new ZodArray({type:s,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(a)});function deepPartialify(s){if(s instanceof ZodObject){const a={};for(const i in s.shape){const o=s.shape[i];a[i]=ZodOptional.create(deepPartialify(o))}return new ZodObject({...s._def,shape:()=>a})}else return s instanceof ZodArray?new ZodArray({...s._def,type:deepPartialify(s.element)}):s instanceof ZodOptional?ZodOptional.create(deepPartialify(s.unwrap())):s instanceof ZodNullable?ZodNullable.create(deepPartialify(s.unwrap())):s instanceof ZodTuple?ZodTuple.create(s.items.map(a=>deepPartialify(a))):s}class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const a=this._def.shape(),i=util.objectKeys(a);return this._cached={shape:a,keys:i}}_parse(a){if(this._getType(a)!==ZodParsedType.object){const _=this._getOrReturnCtx(a);return addIssueToContext(_,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:_.parsedType}),INVALID}const{status:o,ctx:E}=this._processInputParams(a),{shape:j,keys:R}=this._getCached(),C=[];if(!(this._def.catchall instanceof ZodNever&&this._def.unknownKeys==="strip"))for(const _ in E.data)R.includes(_)||C.push(_);const S=[];for(const _ of R){const T=j[_],P=E.data[_];S.push({key:{status:"valid",value:_},value:T._parse(new ParseInputLazyPath(E,P,E.path,_)),alwaysSet:_ in E.data})}if(this._def.catchall instanceof ZodNever){const _=this._def.unknownKeys;if(_==="passthrough")for(const T of C)S.push({key:{status:"valid",value:T},value:{status:"valid",value:E.data[T]}});else if(_==="strict")C.length>0&&(addIssueToContext(E,{code:ZodIssueCode.unrecognized_keys,keys:C}),o.dirty());else if(_!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const _=this._def.catchall;for(const T of C){const P=E.data[T];S.push({key:{status:"valid",value:T},value:_._parse(new ParseInputLazyPath(E,P,E.path,T)),alwaysSet:T in E.data})}}return E.common.async?Promise.resolve().then(async()=>{const _=[];for(const T of S){const P=await T.key,N=await T.value;_.push({key:P,value:N,alwaysSet:T.alwaysSet})}return _}).then(_=>ParseStatus.mergeObjectSync(o,_)):ParseStatus.mergeObjectSync(o,S)}get shape(){return this._def.shape()}strict(a){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...a!==void 0?{errorMap:(i,o)=>{var E,j,R,C;const S=(R=(j=(E=this._def).errorMap)===null||j===void 0?void 0:j.call(E,i,o).message)!==null&&R!==void 0?R:o.defaultError;return i.code==="unrecognized_keys"?{message:(C=errorUtil.errToObj(a).message)!==null&&C!==void 0?C:S}:{message:S}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(a){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...a})})}merge(a){return new ZodObject({unknownKeys:a._def.unknownKeys,catchall:a._def.catchall,shape:()=>({...this._def.shape(),...a._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(a,i){return this.augment({[a]:i})}catchall(a){return new ZodObject({...this._def,catchall:a})}pick(a){const i={};return util.objectKeys(a).forEach(o=>{a[o]&&this.shape[o]&&(i[o]=this.shape[o])}),new ZodObject({...this._def,shape:()=>i})}omit(a){const i={};return util.objectKeys(this.shape).forEach(o=>{a[o]||(i[o]=this.shape[o])}),new ZodObject({...this._def,shape:()=>i})}deepPartial(){return deepPartialify(this)}partial(a){const i={};return util.objectKeys(this.shape).forEach(o=>{const E=this.shape[o];a&&!a[o]?i[o]=E:i[o]=E.optional()}),new ZodObject({...this._def,shape:()=>i})}required(a){const i={};return util.objectKeys(this.shape).forEach(o=>{if(a&&!a[o])i[o]=this.shape[o];else{let j=this.shape[o];for(;j instanceof ZodOptional;)j=j._def.innerType;i[o]=j}}),new ZodObject({...this._def,shape:()=>i})}keyof(){return createZodEnum(util.objectKeys(this.shape))}}ZodObject.create=(s,a)=>new ZodObject({shape:()=>s,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(a)});ZodObject.strictCreate=(s,a)=>new ZodObject({shape:()=>s,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(a)});ZodObject.lazycreate=(s,a)=>new ZodObject({shape:s,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(a)});class ZodUnion extends ZodType{_parse(a){const{ctx:i}=this._processInputParams(a),o=this._def.options;function E(j){for(const C of j)if(C.result.status==="valid")return C.result;for(const C of j)if(C.result.status==="dirty")return i.common.issues.push(...C.ctx.common.issues),C.result;const R=j.map(C=>new ZodError(C.ctx.common.issues));return addIssueToContext(i,{code:ZodIssueCode.invalid_union,unionErrors:R}),INVALID}if(i.common.async)return Promise.all(o.map(async j=>{const R={...i,common:{...i.common,issues:[]},parent:null};return{result:await j._parseAsync({data:i.data,path:i.path,parent:R}),ctx:R}})).then(E);{let j;const R=[];for(const S of o){const _={...i,common:{...i.common,issues:[]},parent:null},T=S._parseSync({data:i.data,path:i.path,parent:_});if(T.status==="valid")return T;T.status==="dirty"&&!j&&(j={result:T,ctx:_}),_.common.issues.length&&R.push(_.common.issues)}if(j)return i.common.issues.push(...j.ctx.common.issues),j.result;const C=R.map(S=>new ZodError(S));return addIssueToContext(i,{code:ZodIssueCode.invalid_union,unionErrors:C}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(s,a)=>new ZodUnion({options:s,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(a)});const getDiscriminator=s=>s instanceof ZodLazy?getDiscriminator(s.schema):s instanceof ZodEffects?getDiscriminator(s.innerType()):s instanceof ZodLiteral?[s.value]:s instanceof ZodEnum?s.options:s instanceof ZodNativeEnum?util.objectValues(s.enum):s instanceof ZodDefault?getDiscriminator(s._def.innerType):s instanceof ZodUndefined?[void 0]:s instanceof ZodNull?[null]:s instanceof ZodOptional?[void 0,...getDiscriminator(s.unwrap())]:s instanceof ZodNullable?[null,...getDiscriminator(s.unwrap())]:s instanceof ZodBranded||s instanceof ZodReadonly?getDiscriminator(s.unwrap()):s instanceof ZodCatch?getDiscriminator(s._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==ZodParsedType.object)return addIssueToContext(i,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:i.parsedType}),INVALID;const o=this.discriminator,E=i.data[o],j=this.optionsMap.get(E);return j?i.common.async?j._parseAsync({data:i.data,path:i.path,parent:i}):j._parseSync({data:i.data,path:i.path,parent:i}):(addIssueToContext(i,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(a,i,o){const E=new Map;for(const j of i){const R=getDiscriminator(j.shape[a]);if(!R.length)throw new Error(`A discriminator value for key \`${a}\` could not be extracted from all schema options`);for(const C of R){if(E.has(C))throw new Error(`Discriminator property ${String(a)} has duplicate value ${String(C)}`);E.set(C,j)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:a,options:i,optionsMap:E,...processCreateParams(o)})}}function mergeValues(s,a){const i=getParsedType(s),o=getParsedType(a);if(s===a)return{valid:!0,data:s};if(i===ZodParsedType.object&&o===ZodParsedType.object){const E=util.objectKeys(a),j=util.objectKeys(s).filter(C=>E.indexOf(C)!==-1),R={...s,...a};for(const C of j){const S=mergeValues(s[C],a[C]);if(!S.valid)return{valid:!1};R[C]=S.data}return{valid:!0,data:R}}else if(i===ZodParsedType.array&&o===ZodParsedType.array){if(s.length!==a.length)return{valid:!1};const E=[];for(let j=0;j<s.length;j++){const R=s[j],C=a[j],S=mergeValues(R,C);if(!S.valid)return{valid:!1};E.push(S.data)}return{valid:!0,data:E}}else return i===ZodParsedType.date&&o===ZodParsedType.date&&+s==+a?{valid:!0,data:s}:{valid:!1}}class ZodIntersection extends ZodType{_parse(a){const{status:i,ctx:o}=this._processInputParams(a),E=(j,R)=>{if(isAborted(j)||isAborted(R))return INVALID;const C=mergeValues(j.value,R.value);return C.valid?((isDirty(j)||isDirty(R))&&i.dirty(),{status:i.value,value:C.data}):(addIssueToContext(o,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([j,R])=>E(j,R)):E(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ZodIntersection.create=(s,a,i)=>new ZodIntersection({left:s,right:a,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(i)});class ZodTuple extends ZodType{_parse(a){const{status:i,ctx:o}=this._processInputParams(a);if(o.parsedType!==ZodParsedType.array)return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:o.parsedType}),INVALID;if(o.data.length<this._def.items.length)return addIssueToContext(o,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&o.data.length>this._def.items.length&&(addIssueToContext(o,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const j=[...o.data].map((R,C)=>{const S=this._def.items[C]||this._def.rest;return S?S._parse(new ParseInputLazyPath(o,R,o.path,C)):null}).filter(R=>!!R);return o.common.async?Promise.all(j).then(R=>ParseStatus.mergeArray(i,R)):ParseStatus.mergeArray(i,j)}get items(){return this._def.items}rest(a){return new ZodTuple({...this._def,rest:a})}}ZodTuple.create=(s,a)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:s,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(a)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:i,ctx:o}=this._processInputParams(a);if(o.parsedType!==ZodParsedType.object)return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:o.parsedType}),INVALID;const E=[],j=this._def.keyType,R=this._def.valueType;for(const C in o.data)E.push({key:j._parse(new ParseInputLazyPath(o,C,o.path,C)),value:R._parse(new ParseInputLazyPath(o,o.data[C],o.path,C)),alwaysSet:C in o.data});return o.common.async?ParseStatus.mergeObjectAsync(i,E):ParseStatus.mergeObjectSync(i,E)}get element(){return this._def.valueType}static create(a,i,o){return i instanceof ZodType?new ZodRecord({keyType:a,valueType:i,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(o)}):new ZodRecord({keyType:ZodString.create(),valueType:a,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(i)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:i,ctx:o}=this._processInputParams(a);if(o.parsedType!==ZodParsedType.map)return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:o.parsedType}),INVALID;const E=this._def.keyType,j=this._def.valueType,R=[...o.data.entries()].map(([C,S],_)=>({key:E._parse(new ParseInputLazyPath(o,C,o.path,[_,"key"])),value:j._parse(new ParseInputLazyPath(o,S,o.path,[_,"value"]))}));if(o.common.async){const C=new Map;return Promise.resolve().then(async()=>{for(const S of R){const _=await S.key,T=await S.value;if(_.status==="aborted"||T.status==="aborted")return INVALID;(_.status==="dirty"||T.status==="dirty")&&i.dirty(),C.set(_.value,T.value)}return{status:i.value,value:C}})}else{const C=new Map;for(const S of R){const _=S.key,T=S.value;if(_.status==="aborted"||T.status==="aborted")return INVALID;(_.status==="dirty"||T.status==="dirty")&&i.dirty(),C.set(_.value,T.value)}return{status:i.value,value:C}}}}ZodMap.create=(s,a,i)=>new ZodMap({valueType:a,keyType:s,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(i)});class ZodSet extends ZodType{_parse(a){const{status:i,ctx:o}=this._processInputParams(a);if(o.parsedType!==ZodParsedType.set)return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:o.parsedType}),INVALID;const E=this._def;E.minSize!==null&&o.data.size<E.minSize.value&&(addIssueToContext(o,{code:ZodIssueCode.too_small,minimum:E.minSize.value,type:"set",inclusive:!0,exact:!1,message:E.minSize.message}),i.dirty()),E.maxSize!==null&&o.data.size>E.maxSize.value&&(addIssueToContext(o,{code:ZodIssueCode.too_big,maximum:E.maxSize.value,type:"set",inclusive:!0,exact:!1,message:E.maxSize.message}),i.dirty());const j=this._def.valueType;function R(S){const _=new Set;for(const T of S){if(T.status==="aborted")return INVALID;T.status==="dirty"&&i.dirty(),_.add(T.value)}return{status:i.value,value:_}}const C=[...o.data.values()].map((S,_)=>j._parse(new ParseInputLazyPath(o,S,o.path,_)));return o.common.async?Promise.all(C).then(S=>R(S)):R(C)}min(a,i){return new ZodSet({...this._def,minSize:{value:a,message:errorUtil.toString(i)}})}max(a,i){return new ZodSet({...this._def,maxSize:{value:a,message:errorUtil.toString(i)}})}size(a,i){return this.min(a,i).max(a,i)}nonempty(a){return this.min(1,a)}}ZodSet.create=(s,a)=>new ZodSet({valueType:s,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(a)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==ZodParsedType.function)return addIssueToContext(i,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:i.parsedType}),INVALID;function o(C,S){return makeIssue({data:C,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,getErrorMap(),errorMap].filter(_=>!!_),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:S}})}function E(C,S){return makeIssue({data:C,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,getErrorMap(),errorMap].filter(_=>!!_),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:S}})}const j={errorMap:i.common.contextualErrorMap},R=i.data;if(this._def.returns instanceof ZodPromise){const C=this;return OK(async function(...S){const _=new ZodError([]),T=await C._def.args.parseAsync(S,j).catch(I=>{throw _.addIssue(o(S,I)),_}),P=await Reflect.apply(R,this,T);return await C._def.returns._def.type.parseAsync(P,j).catch(I=>{throw _.addIssue(E(P,I)),_})})}else{const C=this;return OK(function(...S){const _=C._def.args.safeParse(S,j);if(!_.success)throw new ZodError([o(S,_.error)]);const T=Reflect.apply(R,this,_.data),P=C._def.returns.safeParse(T,j);if(!P.success)throw new ZodError([E(T,P.error)]);return P.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...a){return new ZodFunction({...this._def,args:ZodTuple.create(a).rest(ZodUnknown.create())})}returns(a){return new ZodFunction({...this._def,returns:a})}implement(a){return this.parse(a)}strictImplement(a){return this.parse(a)}static create(a,i,o){return new ZodFunction({args:a||ZodTuple.create([]).rest(ZodUnknown.create()),returns:i||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(o)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(a){const{ctx:i}=this._processInputParams(a);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}ZodLazy.create=(s,a)=>new ZodLazy({getter:s,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(a)});class ZodLiteral extends ZodType{_parse(a){if(a.data!==this._def.value){const i=this._getOrReturnCtx(a);return addIssueToContext(i,{received:i.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:a.data}}get value(){return this._def.value}}ZodLiteral.create=(s,a)=>new ZodLiteral({value:s,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(a)});function createZodEnum(s,a){return new ZodEnum({values:s,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(a)})}class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(a){if(typeof a.data!="string"){const i=this._getOrReturnCtx(a),o=this._def.values;return addIssueToContext(i,{expected:util.joinValues(o),received:i.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(a.data)){const i=this._getOrReturnCtx(a),o=this._def.values;return addIssueToContext(i,{received:i.data,code:ZodIssueCode.invalid_enum_value,options:o}),INVALID}return OK(a.data)}get options(){return this._def.values}get enum(){const a={};for(const i of this._def.values)a[i]=i;return a}get Values(){const a={};for(const i of this._def.values)a[i]=i;return a}get Enum(){const a={};for(const i of this._def.values)a[i]=i;return a}extract(a,i=this._def){return ZodEnum.create(a,{...this._def,...i})}exclude(a,i=this._def){return ZodEnum.create(this.options.filter(o=>!a.includes(o)),{...this._def,...i})}}_ZodEnum_cache=new WeakMap;ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(a){const i=util.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(a);if(o.parsedType!==ZodParsedType.string&&o.parsedType!==ZodParsedType.number){const E=util.objectValues(i);return addIssueToContext(o,{expected:util.joinValues(E),received:o.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(a.data)){const E=util.objectValues(i);return addIssueToContext(o,{received:o.data,code:ZodIssueCode.invalid_enum_value,options:E}),INVALID}return OK(a.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap;ZodNativeEnum.create=(s,a)=>new ZodNativeEnum({values:s,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(a)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==ZodParsedType.promise&&i.common.async===!1)return addIssueToContext(i,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:i.parsedType}),INVALID;const o=i.parsedType===ZodParsedType.promise?i.data:Promise.resolve(i.data);return OK(o.then(E=>this._def.type.parseAsync(E,{path:i.path,errorMap:i.common.contextualErrorMap})))}}ZodPromise.create=(s,a)=>new ZodPromise({type:s,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(a)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(a){const{status:i,ctx:o}=this._processInputParams(a),E=this._def.effect||null,j={addIssue:R=>{addIssueToContext(o,R),R.fatal?i.abort():i.dirty()},get path(){return o.path}};if(j.addIssue=j.addIssue.bind(j),E.type==="preprocess"){const R=E.transform(o.data,j);if(o.common.async)return Promise.resolve(R).then(async C=>{if(i.value==="aborted")return INVALID;const S=await this._def.schema._parseAsync({data:C,path:o.path,parent:o});return S.status==="aborted"?INVALID:S.status==="dirty"||i.value==="dirty"?DIRTY(S.value):S});{if(i.value==="aborted")return INVALID;const C=this._def.schema._parseSync({data:R,path:o.path,parent:o});return C.status==="aborted"?INVALID:C.status==="dirty"||i.value==="dirty"?DIRTY(C.value):C}}if(E.type==="refinement"){const R=C=>{const S=E.refinement(C,j);if(o.common.async)return Promise.resolve(S);if(S instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return C};if(o.common.async===!1){const C=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return C.status==="aborted"?INVALID:(C.status==="dirty"&&i.dirty(),R(C.value),{status:i.value,value:C.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(C=>C.status==="aborted"?INVALID:(C.status==="dirty"&&i.dirty(),R(C.value).then(()=>({status:i.value,value:C.value}))))}if(E.type==="transform")if(o.common.async===!1){const R=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!isValid(R))return R;const C=E.transform(R.value,j);if(C instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:C}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(R=>isValid(R)?Promise.resolve(E.transform(R.value,j)).then(C=>({status:i.value,value:C})):R);util.assertNever(E)}}ZodEffects.create=(s,a,i)=>new ZodEffects({schema:s,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:a,...processCreateParams(i)});ZodEffects.createWithPreprocess=(s,a,i)=>new ZodEffects({schema:a,effect:{type:"preprocess",transform:s},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(i)});class ZodOptional extends ZodType{_parse(a){return this._getType(a)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}ZodOptional.create=(s,a)=>new ZodOptional({innerType:s,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(a)});class ZodNullable extends ZodType{_parse(a){return this._getType(a)===ZodParsedType.null?OK(null):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}ZodNullable.create=(s,a)=>new ZodNullable({innerType:s,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(a)});class ZodDefault extends ZodType{_parse(a){const{ctx:i}=this._processInputParams(a);let o=i.data;return i.parsedType===ZodParsedType.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}ZodDefault.create=(s,a)=>new ZodDefault({innerType:s,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof a.default=="function"?a.default:()=>a.default,...processCreateParams(a)});class ZodCatch extends ZodType{_parse(a){const{ctx:i}=this._processInputParams(a),o={...i,common:{...i.common,issues:[]}},E=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return isAsync(E)?E.then(j=>({status:"valid",value:j.status==="valid"?j.value:this._def.catchValue({get error(){return new ZodError(o.common.issues)},input:o.data})})):{status:"valid",value:E.status==="valid"?E.value:this._def.catchValue({get error(){return new ZodError(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(s,a)=>new ZodCatch({innerType:s,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof a.catch=="function"?a.catch:()=>a.catch,...processCreateParams(a)});class ZodNaN extends ZodType{_parse(a){if(this._getType(a)!==ZodParsedType.nan){const o=this._getOrReturnCtx(a);return addIssueToContext(o,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:o.parsedType}),INVALID}return{status:"valid",value:a.data}}}ZodNaN.create=s=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(s)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(a){const{ctx:i}=this._processInputParams(a),o=i.data;return this._def.type._parse({data:o,path:i.path,parent:i})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(a){const{status:i,ctx:o}=this._processInputParams(a);if(o.common.async)return(async()=>{const j=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return j.status==="aborted"?INVALID:j.status==="dirty"?(i.dirty(),DIRTY(j.value)):this._def.out._parseAsync({data:j.value,path:o.path,parent:o})})();{const E=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return E.status==="aborted"?INVALID:E.status==="dirty"?(i.dirty(),{status:"dirty",value:E.value}):this._def.out._parseSync({data:E.value,path:o.path,parent:o})}}static create(a,i){return new ZodPipeline({in:a,out:i,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(a){const i=this._def.innerType._parse(a),o=E=>(isValid(E)&&(E.value=Object.freeze(E.value)),E);return isAsync(i)?i.then(E=>o(E)):o(i)}unwrap(){return this._def.innerType}}ZodReadonly.create=(s,a)=>new ZodReadonly({innerType:s,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(a)});function custom(s,a={},i){return s?ZodAny.create().superRefine((o,E)=>{var j,R;if(!s(o)){const C=typeof a=="function"?a(o):typeof a=="string"?{message:a}:a,S=(R=(j=C.fatal)!==null&&j!==void 0?j:i)!==null&&R!==void 0?R:!0,_=typeof C=="string"?{message:C}:C;E.addIssue({code:"custom",..._,fatal:S})}}):ZodAny.create()}const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(s,a={message:`Input not instance of ${s.name}`})=>custom(i=>i instanceof s,a),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:s=>ZodString.create({...s,coerce:!0}),number:s=>ZodNumber.create({...s,coerce:!0}),boolean:s=>ZodBoolean.create({...s,coerce:!0}),bigint:s=>ZodBigInt.create({...s,coerce:!0}),date:s=>ZodDate.create({...s,coerce:!0})},NEVER=INVALID;var z=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError});function parseAnyDef(){return{}}function parseArrayDef(s,a){var o,E,j;const i={type:"array"};return(o=s.type)!=null&&o._def&&((j=(E=s.type)==null?void 0:E._def)==null?void 0:j.typeName)!==ZodFirstPartyTypeKind.ZodAny&&(i.items=parseDef(s.type._def,{...a,currentPath:[...a.currentPath,"items"]})),s.minLength&&setResponseValueAndErrors(i,"minItems",s.minLength.value,s.minLength.message,a),s.maxLength&&setResponseValueAndErrors(i,"maxItems",s.maxLength.value,s.maxLength.message,a),s.exactLength&&(setResponseValueAndErrors(i,"minItems",s.exactLength.value,s.exactLength.message,a),setResponseValueAndErrors(i,"maxItems",s.exactLength.value,s.exactLength.message,a)),i}function parseBigintDef(s,a){const i={type:"integer",format:"int64"};if(!s.checks)return i;for(const o of s.checks)switch(o.kind){case"min":a.target==="jsonSchema7"?o.inclusive?setResponseValueAndErrors(i,"minimum",o.value,o.message,a):setResponseValueAndErrors(i,"exclusiveMinimum",o.value,o.message,a):(o.inclusive||(i.exclusiveMinimum=!0),setResponseValueAndErrors(i,"minimum",o.value,o.message,a));break;case"max":a.target==="jsonSchema7"?o.inclusive?setResponseValueAndErrors(i,"maximum",o.value,o.message,a):setResponseValueAndErrors(i,"exclusiveMaximum",o.value,o.message,a):(o.inclusive||(i.exclusiveMaximum=!0),setResponseValueAndErrors(i,"maximum",o.value,o.message,a));break;case"multipleOf":setResponseValueAndErrors(i,"multipleOf",o.value,o.message,a);break}return i}function parseBooleanDef(){return{type:"boolean"}}function parseBrandedDef(s,a){return parseDef(s.type._def,a)}const parseCatchDef=(s,a)=>parseDef(s.innerType._def,a);function parseDateDef(s,a,i){const o=i??a.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((E,j)=>parseDateDef(s,a,E))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return integerDateParser(s,a)}}const integerDateParser=(s,a)=>{const i={type:"integer",format:"unix-time"};if(a.target==="openApi3")return i;for(const o of s.checks)switch(o.kind){case"min":setResponseValueAndErrors(i,"minimum",o.value,o.message,a);break;case"max":setResponseValueAndErrors(i,"maximum",o.value,o.message,a);break}return i};function parseDefaultDef(s,a){return{...parseDef(s.innerType._def,a),default:s.defaultValue()}}function parseEffectsDef(s,a){return a.effectStrategy==="input"?parseDef(s.schema._def,a):{}}function parseEnumDef(s){return{type:"string",enum:Array.from(s.values)}}const isJsonSchema7AllOfType=s=>"type"in s&&s.type==="string"?!1:"allOf"in s;function parseIntersectionDef(s,a){const i=[parseDef(s.left._def,{...a,currentPath:[...a.currentPath,"allOf","0"]}),parseDef(s.right._def,{...a,currentPath:[...a.currentPath,"allOf","1"]})].filter(j=>!!j);let o=a.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const E=[];return i.forEach(j=>{if(isJsonSchema7AllOfType(j))E.push(...j.allOf),j.unevaluatedProperties===void 0&&(o=void 0);else{let R=j;if("additionalProperties"in j&&j.additionalProperties===!1){const{additionalProperties:C,...S}=j;R=S}else o=void 0;E.push(R)}}),E.length?{allOf:E,...o}:void 0}function parseLiteralDef(s,a){const i=typeof s.value;return i!=="bigint"&&i!=="number"&&i!=="boolean"&&i!=="string"?{type:Array.isArray(s.value)?"array":"object"}:a.target==="openApi3"?{type:i==="bigint"?"integer":i,enum:[s.value]}:{type:i==="bigint"?"integer":i,const:s.value}}let emojiRegex;const zodPatterns={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(emojiRegex===void 0&&(emojiRegex=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),emojiRegex),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function parseStringDef(s,a){const i={type:"string"};if(s.checks)for(const o of s.checks)switch(o.kind){case"min":setResponseValueAndErrors(i,"minLength",typeof i.minLength=="number"?Math.max(i.minLength,o.value):o.value,o.message,a);break;case"max":setResponseValueAndErrors(i,"maxLength",typeof i.maxLength=="number"?Math.min(i.maxLength,o.value):o.value,o.message,a);break;case"email":switch(a.emailStrategy){case"format:email":addFormat(i,"email",o.message,a);break;case"format:idn-email":addFormat(i,"idn-email",o.message,a);break;case"pattern:zod":addPattern(i,zodPatterns.email,o.message,a);break}break;case"url":addFormat(i,"uri",o.message,a);break;case"uuid":addFormat(i,"uuid",o.message,a);break;case"regex":addPattern(i,o.regex,o.message,a);break;case"cuid":addPattern(i,zodPatterns.cuid,o.message,a);break;case"cuid2":addPattern(i,zodPatterns.cuid2,o.message,a);break;case"startsWith":addPattern(i,RegExp(`^${escapeLiteralCheckValue(o.value,a)}`),o.message,a);break;case"endsWith":addPattern(i,RegExp(`${escapeLiteralCheckValue(o.value,a)}$`),o.message,a);break;case"datetime":addFormat(i,"date-time",o.message,a);break;case"date":addFormat(i,"date",o.message,a);break;case"time":addFormat(i,"time",o.message,a);break;case"duration":addFormat(i,"duration",o.message,a);break;case"length":setResponseValueAndErrors(i,"minLength",typeof i.minLength=="number"?Math.max(i.minLength,o.value):o.value,o.message,a),setResponseValueAndErrors(i,"maxLength",typeof i.maxLength=="number"?Math.min(i.maxLength,o.value):o.value,o.message,a);break;case"includes":{addPattern(i,RegExp(escapeLiteralCheckValue(o.value,a)),o.message,a);break}case"ip":{o.version!=="v6"&&addFormat(i,"ipv4",o.message,a),o.version!=="v4"&&addFormat(i,"ipv6",o.message,a);break}case"base64url":addPattern(i,zodPatterns.base64url,o.message,a);break;case"jwt":addPattern(i,zodPatterns.jwt,o.message,a);break;case"cidr":{o.version!=="v6"&&addPattern(i,zodPatterns.ipv4Cidr,o.message,a),o.version!=="v4"&&addPattern(i,zodPatterns.ipv6Cidr,o.message,a);break}case"emoji":addPattern(i,zodPatterns.emoji(),o.message,a);break;case"ulid":{addPattern(i,zodPatterns.ulid,o.message,a);break}case"base64":{switch(a.base64Strategy){case"format:binary":{addFormat(i,"binary",o.message,a);break}case"contentEncoding:base64":{setResponseValueAndErrors(i,"contentEncoding","base64",o.message,a);break}case"pattern:zod":{addPattern(i,zodPatterns.base64,o.message,a);break}}break}case"nanoid":addPattern(i,zodPatterns.nanoid,o.message,a)}return i}function escapeLiteralCheckValue(s,a){return a.patternStrategy==="escape"?escapeNonAlphaNumeric(s):s}const ALPHA_NUMERIC=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function escapeNonAlphaNumeric(s){let a="";for(let i=0;i<s.length;i++)ALPHA_NUMERIC.has(s[i])||(a+="\\"),a+=s[i];return a}function addFormat(s,a,i,o){var E;s.format||(E=s.anyOf)!=null&&E.some(j=>j.format)?(s.anyOf||(s.anyOf=[]),s.format&&(s.anyOf.push({format:s.format,...s.errorMessage&&o.errorMessages&&{errorMessage:{format:s.errorMessage.format}}}),delete s.format,s.errorMessage&&(delete s.errorMessage.format,Object.keys(s.errorMessage).length===0&&delete s.errorMessage)),s.anyOf.push({format:a,...i&&o.errorMessages&&{errorMessage:{format:i}}})):setResponseValueAndErrors(s,"format",a,i,o)}function addPattern(s,a,i,o){var E;s.pattern||(E=s.allOf)!=null&&E.some(j=>j.pattern)?(s.allOf||(s.allOf=[]),s.pattern&&(s.allOf.push({pattern:s.pattern,...s.errorMessage&&o.errorMessages&&{errorMessage:{pattern:s.errorMessage.pattern}}}),delete s.pattern,s.errorMessage&&(delete s.errorMessage.pattern,Object.keys(s.errorMessage).length===0&&delete s.errorMessage)),s.allOf.push({pattern:stringifyRegExpWithFlags(a,o),...i&&o.errorMessages&&{errorMessage:{pattern:i}}})):setResponseValueAndErrors(s,"pattern",stringifyRegExpWithFlags(a,o),i,o)}function stringifyRegExpWithFlags(s,a){var S;if(!a.applyRegexFlags||!s.flags)return s.source;const i={i:s.flags.includes("i"),m:s.flags.includes("m"),s:s.flags.includes("s")},o=i.i?s.source.toLowerCase():s.source;let E="",j=!1,R=!1,C=!1;for(let _=0;_<o.length;_++){if(j){E+=o[_],j=!1;continue}if(i.i){if(R){if(o[_].match(/[a-z]/)){C?(E+=o[_],E+=`${o[_-2]}-${o[_]}`.toUpperCase(),C=!1):o[_+1]==="-"&&((S=o[_+2])!=null&&S.match(/[a-z]/))?(E+=o[_],C=!0):E+=`${o[_]}${o[_].toUpperCase()}`;continue}}else if(o[_].match(/[a-z]/)){E+=`[${o[_]}${o[_].toUpperCase()}]`;continue}}if(i.m){if(o[_]==="^"){E+=`(^|(?<=[\r
]))`;continue}else if(o[_]==="$"){E+=`($|(?=[\r
]))`;continue}}if(i.s&&o[_]==="."){E+=R?`${o[_]}\r
`:`[${o[_]}\r
]`;continue}E+=o[_],o[_]==="\\"?j=!0:R&&o[_]==="]"?R=!1:!R&&o[_]==="["&&(R=!0)}try{new RegExp(E)}catch{return console.warn(`Could not convert regex pattern at ${a.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),s.source}return E}function parseRecordDef(s,a){var o,E,j,R,C,S;if(a.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),a.target==="openApi3"&&((o=s.keyType)==null?void 0:o._def.typeName)===ZodFirstPartyTypeKind.ZodEnum)return{type:"object",required:s.keyType._def.values,properties:s.keyType._def.values.reduce((_,T)=>({..._,[T]:parseDef(s.valueType._def,{...a,currentPath:[...a.currentPath,"properties",T]})??{}}),{}),additionalProperties:!1};const i={type:"object",additionalProperties:parseDef(s.valueType._def,{...a,currentPath:[...a.currentPath,"additionalProperties"]})??{}};if(a.target==="openApi3")return i;if(((E=s.keyType)==null?void 0:E._def.typeName)===ZodFirstPartyTypeKind.ZodString&&((j=s.keyType._def.checks)!=null&&j.length)){const{type:_,...T}=parseStringDef(s.keyType._def,a);return{...i,propertyNames:T}}else{if(((R=s.keyType)==null?void 0:R._def.typeName)===ZodFirstPartyTypeKind.ZodEnum)return{...i,propertyNames:{enum:s.keyType._def.values}};if(((C=s.keyType)==null?void 0:C._def.typeName)===ZodFirstPartyTypeKind.ZodBranded&&s.keyType._def.type._def.typeName===ZodFirstPartyTypeKind.ZodString&&((S=s.keyType._def.type._def.checks)!=null&&S.length)){const{type:_,...T}=parseBrandedDef(s.keyType._def,a);return{...i,propertyNames:T}}}return i}function parseMapDef(s,a){if(a.mapStrategy==="record")return parseRecordDef(s,a);const i=parseDef(s.keyType._def,{...a,currentPath:[...a.currentPath,"items","items","0"]})||{},o=parseDef(s.valueType._def,{...a,currentPath:[...a.currentPath,"items","items","1"]})||{};return{type:"array",maxItems:125,items:{type:"array",items:[i,o],minItems:2,maxItems:2}}}function parseNativeEnumDef(s){const a=s.values,o=Object.keys(s.values).filter(j=>typeof a[a[j]]!="number").map(j=>a[j]),E=Array.from(new Set(o.map(j=>typeof j)));return{type:E.length===1?E[0]==="string"?"string":"number":["string","number"],enum:o}}function parseNeverDef(){return{not:{}}}function parseNullDef(s){return s.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const primitiveMappings={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function parseUnionDef(s,a){if(a.target==="openApi3")return asAnyOf(s,a);const i=s.options instanceof Map?Array.from(s.options.values()):s.options;if(i.every(o=>o._def.typeName in primitiveMappings&&(!o._def.checks||!o._def.checks.length))){const o=i.reduce((E,j)=>{const R=primitiveMappings[j._def.typeName];return R&&!E.includes(R)?[...E,R]:E},[]);return{type:o.length>1?o:o[0]}}else if(i.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){const o=i.reduce((E,j)=>{const R=typeof j._def.value;switch(R){case"string":case"number":case"boolean":return[...E,R];case"bigint":return[...E,"integer"];case"object":if(j._def.value===null)return[...E,"null"];case"symbol":case"undefined":case"function":default:return E}},[]);if(o.length===i.length){const E=o.filter((j,R,C)=>C.indexOf(j)===R);return{type:E.length>1?E:E[0],enum:i.reduce((j,R)=>j.includes(R._def.value)?j:[...j,R._def.value],[])}}}else if(i.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:i.reduce((o,E)=>[...o,...E._def.values.filter(j=>!o.includes(j))],[])};return asAnyOf(s,a)}const asAnyOf=(s,a)=>{const i=(s.options instanceof Map?Array.from(s.options.values()):s.options).map((o,E)=>parseDef(o._def,{...a,currentPath:[...a.currentPath,"anyOf",`${E}`]})).filter(o=>!!o&&(!a.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return i.length?{anyOf:i}:void 0};function parseNullableDef(s,a){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(s.innerType._def.typeName)&&(!s.innerType._def.checks||!s.innerType._def.checks.length))return a.target==="openApi3"?{type:primitiveMappings[s.innerType._def.typeName],nullable:!0}:{type:[primitiveMappings[s.innerType._def.typeName],"null"]};if(a.target==="openApi3"){const o=parseDef(s.innerType._def,{...a,currentPath:[...a.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}const i=parseDef(s.innerType._def,{...a,currentPath:[...a.currentPath,"anyOf","0"]});return i&&{anyOf:[i,{type:"null"}]}}function parseNumberDef(s,a){const i={type:"number"};if(!s.checks)return i;for(const o of s.checks)switch(o.kind){case"int":i.type="integer",addErrorMessage(i,"type",o.message,a);break;case"min":a.target==="jsonSchema7"?o.inclusive?setResponseValueAndErrors(i,"minimum",o.value,o.message,a):setResponseValueAndErrors(i,"exclusiveMinimum",o.value,o.message,a):(o.inclusive||(i.exclusiveMinimum=!0),setResponseValueAndErrors(i,"minimum",o.value,o.message,a));break;case"max":a.target==="jsonSchema7"?o.inclusive?setResponseValueAndErrors(i,"maximum",o.value,o.message,a):setResponseValueAndErrors(i,"exclusiveMaximum",o.value,o.message,a):(o.inclusive||(i.exclusiveMaximum=!0),setResponseValueAndErrors(i,"maximum",o.value,o.message,a));break;case"multipleOf":setResponseValueAndErrors(i,"multipleOf",o.value,o.message,a);break}return i}function decideAdditionalProperties(s,a){return a.removeAdditionalStrategy==="strict"?s.catchall._def.typeName==="ZodNever"?s.unknownKeys!=="strict":parseDef(s.catchall._def,{...a,currentPath:[...a.currentPath,"additionalProperties"]})??!0:s.catchall._def.typeName==="ZodNever"?s.unknownKeys==="passthrough":parseDef(s.catchall._def,{...a,currentPath:[...a.currentPath,"additionalProperties"]})??!0}function parseObjectDef(s,a){const i=a.target==="openAi",o={type:"object",...Object.entries(s.shape()).reduce((E,[j,R])=>{if(R===void 0||R._def===void 0)return E;let C=R.isOptional();C&&i&&(R instanceof ZodOptional&&(R=R._def.innerType),R.isNullable()||(R=R.nullable()),C=!1);const S=parseDef(R._def,{...a,currentPath:[...a.currentPath,"properties",j],propertyPath:[...a.currentPath,"properties",j]});return S===void 0?E:{properties:{...E.properties,[j]:S},required:C?E.required:[...E.required,j]}},{properties:{},required:[]}),additionalProperties:decideAdditionalProperties(s,a)};return o.required.length||delete o.required,o}const parseOptionalDef=(s,a)=>{var o;if(a.currentPath.toString()===((o=a.propertyPath)==null?void 0:o.toString()))return parseDef(s.innerType._def,a);const i=parseDef(s.innerType._def,{...a,currentPath:[...a.currentPath,"anyOf","1"]});return i?{anyOf:[{not:{}},i]}:{}},parsePipelineDef=(s,a)=>{if(a.pipeStrategy==="input")return parseDef(s.in._def,a);if(a.pipeStrategy==="output")return parseDef(s.out._def,a);const i=parseDef(s.in._def,{...a,currentPath:[...a.currentPath,"allOf","0"]}),o=parseDef(s.out._def,{...a,currentPath:[...a.currentPath,"allOf",i?"1":"0"]});return{allOf:[i,o].filter(E=>E!==void 0)}};function parsePromiseDef(s,a){return parseDef(s.type._def,a)}function parseSetDef(s,a){const o={type:"array",uniqueItems:!0,items:parseDef(s.valueType._def,{...a,currentPath:[...a.currentPath,"items"]})};return s.minSize&&setResponseValueAndErrors(o,"minItems",s.minSize.value,s.minSize.message,a),s.maxSize&&setResponseValueAndErrors(o,"maxItems",s.maxSize.value,s.maxSize.message,a),o}function parseTupleDef(s,a){return s.rest?{type:"array",minItems:s.items.length,items:s.items.map((i,o)=>parseDef(i._def,{...a,currentPath:[...a.currentPath,"items",`${o}`]})).reduce((i,o)=>o===void 0?i:[...i,o],[]),additionalItems:parseDef(s.rest._def,{...a,currentPath:[...a.currentPath,"additionalItems"]})}:{type:"array",minItems:s.items.length,maxItems:s.items.length,items:s.items.map((i,o)=>parseDef(i._def,{...a,currentPath:[...a.currentPath,"items",`${o}`]})).reduce((i,o)=>o===void 0?i:[...i,o],[])}}function parseUndefinedDef(){return{not:{}}}function parseUnknownDef(){return{}}const parseReadonlyDef=(s,a)=>parseDef(s.innerType._def,a);function parseDef(s,a,i=!1){var R;const o=a.seen.get(s);if(a.override){const C=(R=a.override)==null?void 0:R.call(a,s,a,o,i);if(C!==ignoreOverride)return C}if(o&&!i){const C=get$ref(o,a);if(C!==void 0)return C}const E={def:s,path:a.currentPath,jsonSchema:void 0};a.seen.set(s,E);const j=selectParser(s,s.typeName,a);return j&&addMeta(s,a,j),E.jsonSchema=j,j}const get$ref=(s,a)=>{switch(a.$refStrategy){case"root":return{$ref:s.path.join("/")};case"relative":return{$ref:getRelativePath(a.currentPath,s.path)};case"none":case"seen":return s.path.length<a.currentPath.length&&s.path.every((i,o)=>a.currentPath[o]===i)?(console.warn(`Recursive reference detected at ${a.currentPath.join("/")}! Defaulting to any`),{}):a.$refStrategy==="seen"?{}:void 0}},getRelativePath=(s,a)=>{let i=0;for(;i<s.length&&i<a.length&&s[i]===a[i];i++);return[(s.length-i).toString(),...a.slice(i)].join("/")},selectParser=(s,a,i)=>{switch(a){case ZodFirstPartyTypeKind.ZodString:return parseStringDef(s,i);case ZodFirstPartyTypeKind.ZodNumber:return parseNumberDef(s,i);case ZodFirstPartyTypeKind.ZodObject:return parseObjectDef(s,i);case ZodFirstPartyTypeKind.ZodBigInt:return parseBigintDef(s,i);case ZodFirstPartyTypeKind.ZodBoolean:return parseBooleanDef();case ZodFirstPartyTypeKind.ZodDate:return parseDateDef(s,i);case ZodFirstPartyTypeKind.ZodUndefined:return parseUndefinedDef();case ZodFirstPartyTypeKind.ZodNull:return parseNullDef(i);case ZodFirstPartyTypeKind.ZodArray:return parseArrayDef(s,i);case ZodFirstPartyTypeKind.ZodUnion:case ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return parseUnionDef(s,i);case ZodFirstPartyTypeKind.ZodIntersection:return parseIntersectionDef(s,i);case ZodFirstPartyTypeKind.ZodTuple:return parseTupleDef(s,i);case ZodFirstPartyTypeKind.ZodRecord:return parseRecordDef(s,i);case ZodFirstPartyTypeKind.ZodLiteral:return parseLiteralDef(s,i);case ZodFirstPartyTypeKind.ZodEnum:return parseEnumDef(s);case ZodFirstPartyTypeKind.ZodNativeEnum:return parseNativeEnumDef(s);case ZodFirstPartyTypeKind.ZodNullable:return parseNullableDef(s,i);case ZodFirstPartyTypeKind.ZodOptional:return parseOptionalDef(s,i);case ZodFirstPartyTypeKind.ZodMap:return parseMapDef(s,i);case ZodFirstPartyTypeKind.ZodSet:return parseSetDef(s,i);case ZodFirstPartyTypeKind.ZodLazy:return parseDef(s.getter()._def,i);case ZodFirstPartyTypeKind.ZodPromise:return parsePromiseDef(s,i);case ZodFirstPartyTypeKind.ZodNaN:case ZodFirstPartyTypeKind.ZodNever:return parseNeverDef();case ZodFirstPartyTypeKind.ZodEffects:return parseEffectsDef(s,i);case ZodFirstPartyTypeKind.ZodAny:return parseAnyDef();case ZodFirstPartyTypeKind.ZodUnknown:return parseUnknownDef();case ZodFirstPartyTypeKind.ZodDefault:return parseDefaultDef(s,i);case ZodFirstPartyTypeKind.ZodBranded:return parseBrandedDef(s,i);case ZodFirstPartyTypeKind.ZodReadonly:return parseReadonlyDef(s,i);case ZodFirstPartyTypeKind.ZodCatch:return parseCatchDef(s,i);case ZodFirstPartyTypeKind.ZodPipeline:return parsePipelineDef(s,i);case ZodFirstPartyTypeKind.ZodFunction:case ZodFirstPartyTypeKind.ZodVoid:case ZodFirstPartyTypeKind.ZodSymbol:return;default:return(o=>{})()}},addMeta=(s,a,i)=>(s.description&&(i.description=s.description,a.markdownDescription&&(i.markdownDescription=s.description)),i),zodToJsonSchema=(s,a)=>{const i=getRefs(a),o=typeof a=="object"&&a.definitions?Object.entries(a.definitions).reduce((S,[_,T])=>({...S,[_]:parseDef(T._def,{...i,currentPath:[...i.basePath,i.definitionPath,_]},!0)??{}}),{}):void 0,E=typeof a=="string"?a:(a==null?void 0:a.nameStrategy)==="title"||a==null?void 0:a.name,j=parseDef(s._def,E===void 0?i:{...i,currentPath:[...i.basePath,i.definitionPath,E]},!1)??{},R=typeof a=="object"&&a.name!==void 0&&a.nameStrategy==="title"?a.name:void 0;R!==void 0&&(j.title=R);const C=E===void 0?o?{...j,[i.definitionPath]:o}:j:{$ref:[...i.$refStrategy==="relative"?[]:i.basePath,i.definitionPath,E].join("/"),[i.definitionPath]:{...o,[E]:j}};return i.target==="jsonSchema7"?C.$schema="http://json-schema.org/draft-07/schema#":(i.target==="jsonSchema2019-09"||i.target==="openAi")&&(C.$schema="https://json-schema.org/draft/2019-09/schema#"),i.target==="openAi"&&("anyOf"in C||"oneOf"in C||"allOf"in C||"type"in C&&Array.isArray(C.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),C};var textStreamPart={code:"0",name:"text",parse:s=>{if(typeof s!="string")throw new Error('"text" parts expect a string value.');return{type:"text",value:s}}},errorStreamPart={code:"3",name:"error",parse:s=>{if(typeof s!="string")throw new Error('"error" parts expect a string value.');return{type:"error",value:s}}},assistantMessageStreamPart={code:"4",name:"assistant_message",parse:s=>{if(s==null||typeof s!="object"||!("id"in s)||!("role"in s)||!("content"in s)||typeof s.id!="string"||typeof s.role!="string"||s.role!=="assistant"||!Array.isArray(s.content)||!s.content.every(a=>a!=null&&typeof a=="object"&&"type"in a&&a.type==="text"&&"text"in a&&a.text!=null&&typeof a.text=="object"&&"value"in a.text&&typeof a.text.value=="string"))throw new Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:s}}},assistantControlDataStreamPart={code:"5",name:"assistant_control_data",parse:s=>{if(s==null||typeof s!="object"||!("threadId"in s)||!("messageId"in s)||typeof s.threadId!="string"||typeof s.messageId!="string")throw new Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:s.threadId,messageId:s.messageId}}}},dataMessageStreamPart={code:"6",name:"data_message",parse:s=>{if(s==null||typeof s!="object"||!("role"in s)||!("data"in s)||typeof s.role!="string"||s.role!=="data")throw new Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:s}}},assistantStreamParts=[textStreamPart,errorStreamPart,assistantMessageStreamPart,assistantControlDataStreamPart,dataMessageStreamPart];textStreamPart.code+"",errorStreamPart.code+"",assistantMessageStreamPart.code+"",assistantControlDataStreamPart.code+"",dataMessageStreamPart.code+"";textStreamPart.name+"",textStreamPart.code,errorStreamPart.name+"",errorStreamPart.code,assistantMessageStreamPart.name+"",assistantMessageStreamPart.code,assistantControlDataStreamPart.name+"",assistantControlDataStreamPart.code,dataMessageStreamPart.name+"",dataMessageStreamPart.code;assistantStreamParts.map(s=>s.code);function fixJson(s){const a=["ROOT"];let i=-1,o=null;function E(S,_,T){switch(S){case'"':{i=_,a.pop(),a.push(T),a.push("INSIDE_STRING");break}case"f":case"t":case"n":{i=_,o=_,a.pop(),a.push(T),a.push("INSIDE_LITERAL");break}case"-":{a.pop(),a.push(T),a.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{i=_,a.pop(),a.push(T),a.push("INSIDE_NUMBER");break}case"{":{i=_,a.pop(),a.push(T),a.push("INSIDE_OBJECT_START");break}case"[":{i=_,a.pop(),a.push(T),a.push("INSIDE_ARRAY_START");break}}}function j(S,_){switch(S){case",":{a.pop(),a.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{i=_,a.pop();break}}}function R(S,_){switch(S){case",":{a.pop(),a.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{i=_,a.pop();break}}}for(let S=0;S<s.length;S++){const _=s[S];switch(a[a.length-1]){case"ROOT":E(_,S,"FINISH");break;case"INSIDE_OBJECT_START":{switch(_){case'"':{a.pop(),a.push("INSIDE_OBJECT_KEY");break}case"}":{i=S,a.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(_){case'"':{a.pop(),a.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(_){case'"':{a.pop(),a.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(_){case":":{a.pop(),a.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{E(_,S,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{j(_,S);break}case"INSIDE_STRING":{switch(_){case'"':{a.pop(),i=S;break}case"\\":{a.push("INSIDE_STRING_ESCAPE");break}default:i=S}break}case"INSIDE_ARRAY_START":{switch(_){case"]":{i=S,a.pop();break}default:{i=S,E(_,S,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(_){case",":{a.pop(),a.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{i=S,a.pop();break}default:{i=S;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{E(_,S,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{a.pop(),i=S;break}case"INSIDE_NUMBER":{switch(_){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{i=S;break}case"e":case"E":case"-":case".":break;case",":{a.pop(),a[a.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&R(_,S),a[a.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&j(_,S);break}case"}":{a.pop(),a[a.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&j(_,S);break}case"]":{a.pop(),a[a.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&R(_,S);break}default:{a.pop();break}}break}case"INSIDE_LITERAL":{const P=s.substring(o,S+1);!"false".startsWith(P)&&!"true".startsWith(P)&&!"null".startsWith(P)?(a.pop(),a[a.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?j(_,S):a[a.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&R(_,S)):i=S;break}}}let C=s.slice(0,i+1);for(let S=a.length-1;S>=0;S--)switch(a[S]){case"INSIDE_STRING":{C+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{C+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{C+="]";break}case"INSIDE_LITERAL":{const T=s.substring(o,s.length);"true".startsWith(T)?C+="true".slice(T.length):"false".startsWith(T)?C+="false".slice(T.length):"null".startsWith(T)&&(C+="null".slice(T.length))}}return C}function parsePartialJson(s){if(s===void 0)return{value:void 0,state:"undefined-input"};let a=safeParseJSON({text:s});return a.success?{value:a.value,state:"successful-parse"}:(a=safeParseJSON({text:fixJson(s)}),a.success?{value:a.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var textStreamPart2={code:"0",name:"text",parse:s=>{if(typeof s!="string")throw new Error('"text" parts expect a string value.');return{type:"text",value:s}}},dataStreamPart={code:"2",name:"data",parse:s=>{if(!Array.isArray(s))throw new Error('"data" parts expect an array value.');return{type:"data",value:s}}},errorStreamPart2={code:"3",name:"error",parse:s=>{if(typeof s!="string")throw new Error('"error" parts expect a string value.');return{type:"error",value:s}}},messageAnnotationsStreamPart={code:"8",name:"message_annotations",parse:s=>{if(!Array.isArray(s))throw new Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:s}}},toolCallStreamPart={code:"9",name:"tool_call",parse:s=>{if(s==null||typeof s!="object"||!("toolCallId"in s)||typeof s.toolCallId!="string"||!("toolName"in s)||typeof s.toolName!="string"||!("args"in s)||typeof s.args!="object")throw new Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:s}}},toolResultStreamPart={code:"a",name:"tool_result",parse:s=>{if(s==null||typeof s!="object"||!("toolCallId"in s)||typeof s.toolCallId!="string"||!("result"in s))throw new Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:s}}},toolCallStreamingStartStreamPart={code:"b",name:"tool_call_streaming_start",parse:s=>{if(s==null||typeof s!="object"||!("toolCallId"in s)||typeof s.toolCallId!="string"||!("toolName"in s)||typeof s.toolName!="string")throw new Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:s}}},toolCallDeltaStreamPart={code:"c",name:"tool_call_delta",parse:s=>{if(s==null||typeof s!="object"||!("toolCallId"in s)||typeof s.toolCallId!="string"||!("argsTextDelta"in s)||typeof s.argsTextDelta!="string")throw new Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:s}}},finishMessageStreamPart={code:"d",name:"finish_message",parse:s=>{if(s==null||typeof s!="object"||!("finishReason"in s)||typeof s.finishReason!="string")throw new Error('"finish_message" parts expect an object with a "finishReason" property.');const a={finishReason:s.finishReason};return"usage"in s&&s.usage!=null&&typeof s.usage=="object"&&"promptTokens"in s.usage&&"completionTokens"in s.usage&&(a.usage={promptTokens:typeof s.usage.promptTokens=="number"?s.usage.promptTokens:Number.NaN,completionTokens:typeof s.usage.completionTokens=="number"?s.usage.completionTokens:Number.NaN}),{type:"finish_message",value:a}}},finishStepStreamPart={code:"e",name:"finish_step",parse:s=>{if(s==null||typeof s!="object"||!("finishReason"in s)||typeof s.finishReason!="string")throw new Error('"finish_step" parts expect an object with a "finishReason" property.');const a={finishReason:s.finishReason,isContinued:!1};return"usage"in s&&s.usage!=null&&typeof s.usage=="object"&&"promptTokens"in s.usage&&"completionTokens"in s.usage&&(a.usage={promptTokens:typeof s.usage.promptTokens=="number"?s.usage.promptTokens:Number.NaN,completionTokens:typeof s.usage.completionTokens=="number"?s.usage.completionTokens:Number.NaN}),"isContinued"in s&&typeof s.isContinued=="boolean"&&(a.isContinued=s.isContinued),{type:"finish_step",value:a}}},startStepStreamPart={code:"f",name:"start_step",parse:s=>{if(s==null||typeof s!="object"||!("messageId"in s)||typeof s.messageId!="string")throw new Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:s.messageId}}}},reasoningStreamPart={code:"g",name:"reasoning",parse:s=>{if(typeof s!="string")throw new Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:s}}},dataStreamParts=[textStreamPart2,dataStreamPart,errorStreamPart2,messageAnnotationsStreamPart,toolCallStreamPart,toolResultStreamPart,toolCallStreamingStartStreamPart,toolCallDeltaStreamPart,finishMessageStreamPart,finishStepStreamPart,startStepStreamPart,reasoningStreamPart],dataStreamPartsByCode={[textStreamPart2.code]:textStreamPart2,[dataStreamPart.code]:dataStreamPart,[errorStreamPart2.code]:errorStreamPart2,[messageAnnotationsStreamPart.code]:messageAnnotationsStreamPart,[toolCallStreamPart.code]:toolCallStreamPart,[toolResultStreamPart.code]:toolResultStreamPart,[toolCallStreamingStartStreamPart.code]:toolCallStreamingStartStreamPart,[toolCallDeltaStreamPart.code]:toolCallDeltaStreamPart,[finishMessageStreamPart.code]:finishMessageStreamPart,[finishStepStreamPart.code]:finishStepStreamPart,[startStepStreamPart.code]:startStepStreamPart,[reasoningStreamPart.code]:reasoningStreamPart};textStreamPart2.name+"",textStreamPart2.code,dataStreamPart.name+"",dataStreamPart.code,errorStreamPart2.name+"",errorStreamPart2.code,messageAnnotationsStreamPart.name+"",messageAnnotationsStreamPart.code,toolCallStreamPart.name+"",toolCallStreamPart.code,toolResultStreamPart.name+"",toolResultStreamPart.code,toolCallStreamingStartStreamPart.name+"",toolCallStreamingStartStreamPart.code,toolCallDeltaStreamPart.name+"",toolCallDeltaStreamPart.code,finishMessageStreamPart.name+"",finishMessageStreamPart.code,finishStepStreamPart.name+"",finishStepStreamPart.code,startStepStreamPart.name+"",startStepStreamPart.code,reasoningStreamPart.name+"",reasoningStreamPart.code;var validCodes2=dataStreamParts.map(s=>s.code),parseDataStreamPart=s=>{const a=s.indexOf(":");if(a===-1)throw new Error("Failed to parse stream string. No separator found.");const i=s.slice(0,a);if(!validCodes2.includes(i))throw new Error(`Failed to parse stream string. Invalid code ${i}.`);const o=i,E=s.slice(a+1),j=JSON.parse(E);return dataStreamPartsByCode[o].parse(j)},NEWLINE$1=10;function concatChunks(s,a){const i=new Uint8Array(a);let o=0;for(const E of s)i.set(E,o),o+=E.length;return s.length=0,i}async function processDataStream({stream:s,onTextPart:a,onReasoningPart:i,onDataPart:o,onErrorPart:E,onToolCallStreamingStartPart:j,onToolCallDeltaPart:R,onToolCallPart:C,onToolResultPart:S,onMessageAnnotationsPart:_,onFinishMessagePart:T,onFinishStepPart:P,onStartStepPart:N}){const I=s.getReader(),M=new TextDecoder,D=[];let B=0;for(;;){const{value:F}=await I.read();if(F&&(D.push(F),B+=F.length,F[F.length-1]!==NEWLINE$1))continue;if(D.length===0)break;const O=concatChunks(D,B);B=0;const L=M.decode(O,{stream:!0}).split(`
`).filter($=>$!=="").map(parseDataStreamPart);for(const{type:$,value:V}of L)switch($){case"text":await(a==null?void 0:a(V));break;case"reasoning":await(i==null?void 0:i(V));break;case"data":await(o==null?void 0:o(V));break;case"error":await(E==null?void 0:E(V));break;case"message_annotations":await(_==null?void 0:_(V));break;case"tool_call_streaming_start":await(j==null?void 0:j(V));break;case"tool_call_delta":await(R==null?void 0:R(V));break;case"tool_call":await(C==null?void 0:C(V));break;case"tool_result":await(S==null?void 0:S(V));break;case"finish_message":await(T==null?void 0:T(V));break;case"finish_step":await(P==null?void 0:P(V));break;case"start_step":await(N==null?void 0:N(V));break;default:{const G=$;throw new Error(`Unknown stream part type: ${G}`)}}}}function calculateLanguageModelUsage({promptTokens:s,completionTokens:a}){return{promptTokens:s,completionTokens:a,totalTokens:s+a}}async function processChatResponse({stream:s,update:a,onToolCall:i,onFinish:o,generateId:E=generateId,getCurrentDate:j=()=>new Date,lastMessage:R}){var C,S;const _=(R==null?void 0:R.role)==="assistant";let T=_?1+((S=(C=R.toolInvocations)==null?void 0:C.reduce((O,L)=>{var $;return Math.max(O,($=L.step)!=null?$:0)},0))!=null?S:0):0;const P=_?structuredClone(R):{id:E(),createdAt:j(),role:"assistant",content:""},N=[];let I=_?R==null?void 0:R.annotations:void 0;const M={};let D={completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},B="unknown";function F(){const O=[...N];I!=null&&I.length&&(P.annotations=I);const L={...structuredClone(P),revisionId:E()};a({message:L,data:O,replaceLastMessage:_})}await processDataStream({stream:s,onTextPart(O){P.content+=O,F()},onReasoningPart(O){var L;P.reasoning=((L=P.reasoning)!=null?L:"")+O,F()},onToolCallStreamingStartPart(O){P.toolInvocations==null&&(P.toolInvocations=[]),M[O.toolCallId]={text:"",step:T,toolName:O.toolName,index:P.toolInvocations.length},P.toolInvocations.push({state:"partial-call",step:T,toolCallId:O.toolCallId,toolName:O.toolName,args:void 0}),F()},onToolCallDeltaPart(O){const L=M[O.toolCallId];L.text+=O.argsTextDelta;const{value:$}=parsePartialJson(L.text);P.toolInvocations[L.index]={state:"partial-call",step:L.step,toolCallId:O.toolCallId,toolName:L.toolName,args:$},F()},async onToolCallPart(O){if(M[O.toolCallId]!=null?P.toolInvocations[M[O.toolCallId].index]={state:"call",step:T,...O}:(P.toolInvocations==null&&(P.toolInvocations=[]),P.toolInvocations.push({state:"call",step:T,...O})),i){const L=await i({toolCall:O});L!=null&&(P.toolInvocations[P.toolInvocations.length-1]={state:"result",step:T,...O,result:L})}F()},onToolResultPart(O){const L=P.toolInvocations;if(L==null)throw new Error("tool_result must be preceded by a tool_call");const $=L.findIndex(V=>V.toolCallId===O.toolCallId);if($===-1)throw new Error("tool_result must be preceded by a tool_call with the same toolCallId");L[$]={...L[$],state:"result",...O},F()},onDataPart(O){N.push(...O),F()},onMessageAnnotationsPart(O){I==null?I=[...O]:I.push(...O),F()},onFinishStepPart(O){T+=1},onStartStepPart(O){_||(P.id=O.messageId)},onFinishMessagePart(O){B=O.finishReason,O.usage!=null&&(D=calculateLanguageModelUsage(O.usage))},onErrorPart(O){throw new Error(O)}}),o==null||o({message:P,finishReason:B,usage:D})}async function processTextStream({stream:s,onTextPart:a}){const i=s.pipeThrough(new TextDecoderStream).getReader();for(;;){const{done:o,value:E}=await i.read();if(o)break;await a(E)}}var getOriginalFetch=()=>fetch;async function callChatApi({api:s,body:a,streamProtocol:i="data",credentials:o,headers:E,abortController:j,restoreMessagesOnFailure:R,onResponse:C,onUpdate:S,onFinish:_,onToolCall:T,generateId:P,fetch:N=getOriginalFetch(),lastMessage:I}){var M,D;const B=await N(s,{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"application/json",...E},signal:(M=j==null?void 0:j())==null?void 0:M.signal,credentials:o}).catch(F=>{throw R(),F});if(C)try{await C(B)}catch(F){throw F}if(!B.ok)throw R(),new Error((D=await B.text())!=null?D:"Failed to fetch the chat response.");if(!B.body)throw new Error("The response body is empty.");switch(i){case"text":{const F={id:P(),createdAt:new Date,role:"assistant",content:""};await processTextStream({stream:B.body,onTextPart:O=>{F.content+=O,S({message:{...F},data:[],replaceLastMessage:!1})}}),_==null||_(F,{usage:{completionTokens:NaN,promptTokens:NaN,totalTokens:NaN},finishReason:"unknown"});return}case"data":{await processChatResponse({stream:B.body,update:S,lastMessage:I,onToolCall:T,onFinish({message:F,finishReason:O,usage:L}){_&&F!=null&&_(F,{usage:L,finishReason:O})},generateId:P});return}default:{const F=i;throw new Error(`Unknown stream protocol: ${F}`)}}}function extractMaxToolInvocationStep(s){return s==null?void 0:s.reduce((a,i)=>{var o;return Math.max(a,(o=i.step)!=null?o:0)},0)}function isDeepEqualData(s,a){if(s===a)return!0;if(s==null||a==null)return!1;if(typeof s!="object"&&typeof a!="object")return s===a;if(s.constructor!==a.constructor)return!1;if(s instanceof Date&&a instanceof Date)return s.getTime()===a.getTime();if(Array.isArray(s)){if(s.length!==a.length)return!1;for(let E=0;E<s.length;E++)if(!isDeepEqualData(s[E],a[E]))return!1;return!0}const i=Object.keys(s),o=Object.keys(a);if(i.length!==o.length)return!1;for(const E of i)if(!o.includes(E)||!isDeepEqualData(s[E],a[E]))return!1;return!0}async function prepareAttachmentsForRequest(s){if(!s)return[];if(s instanceof FileList)return Promise.all(Array.from(s).map(async a=>{const{name:i,type:o}=a,E=await new Promise((j,R)=>{const C=new FileReader;C.onload=S=>{var _;j((_=S.target)==null?void 0:_.result)},C.onerror=S=>R(S),C.readAsDataURL(a)});return{name:i,contentType:o,url:E}}));if(Array.isArray(s))return s;throw new Error("Invalid attachments type")}function zodSchema(s){return jsonSchema(zodToJsonSchema(s,{$refStrategy:"none",target:"jsonSchema7"}),{validate:a=>{const i=s.safeParse(a);return i.success?{success:!0,value:i.data}:{success:!1,error:i.error}}})}var schemaSymbol=Symbol.for("vercel.ai.schema");function jsonSchema(s,{validate:a}={}){return{[schemaSymbol]:!0,_type:void 0,[validatorSymbol]:!0,jsonSchema:s,validate:a}}function isSchema(s){return typeof s=="object"&&s!==null&&schemaSymbol in s&&s[schemaSymbol]===!0&&"jsonSchema"in s&&"validate"in s}function asSchema(s){return isSchema(s)?s:zodSchema(s)}var has=Object.prototype.hasOwnProperty;function dequal(s,a){var i,o;if(s===a)return!0;if(s&&a&&(i=s.constructor)===a.constructor){if(i===Date)return s.getTime()===a.getTime();if(i===RegExp)return s.toString()===a.toString();if(i===Array){if((o=s.length)===a.length)for(;o--&&dequal(s[o],a[o]););return o===-1}if(!i||typeof s=="object"){o=0;for(i in s)if(has.call(s,i)&&++o&&!has.call(a,i)||!(i in a)||!dequal(s[i],a[i]))return!1;return Object.keys(a).length===o}}return s!==s&&a!==a}const SWRGlobalState=new WeakMap,noop=()=>{},UNDEFINED=noop(),OBJECT$1=Object,isUndefined=s=>s===UNDEFINED,isFunction=s=>typeof s=="function",mergeObjects=(s,a)=>({...s,...a}),isPromiseLike=s=>isFunction(s.then),EMPTY_CACHE={},INITIAL_CACHE={},STR_UNDEFINED="undefined",isWindowDefined=typeof window!=STR_UNDEFINED,isDocumentDefined=typeof document!=STR_UNDEFINED,hasRequestAnimationFrame=()=>isWindowDefined&&typeof window.requestAnimationFrame!=STR_UNDEFINED,createCacheHelper=(s,a)=>{const i=SWRGlobalState.get(s);return[()=>!isUndefined(a)&&s.get(a)||EMPTY_CACHE,o=>{if(!isUndefined(a)){const E=s.get(a);a in INITIAL_CACHE||(INITIAL_CACHE[a]=E),i[5](a,mergeObjects(E,o),E||EMPTY_CACHE)}},i[6],()=>!isUndefined(a)&&a in INITIAL_CACHE?INITIAL_CACHE[a]:!isUndefined(a)&&s.get(a)||EMPTY_CACHE]};let online=!0;const isOnline=()=>online,[onWindowEvent,offWindowEvent]=isWindowDefined&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[noop,noop],isVisible=()=>{const s=isDocumentDefined&&document.visibilityState;return isUndefined(s)||s!=="hidden"},initFocus=s=>(isDocumentDefined&&document.addEventListener("visibilitychange",s),onWindowEvent("focus",s),()=>{isDocumentDefined&&document.removeEventListener("visibilitychange",s),offWindowEvent("focus",s)}),initReconnect=s=>{const a=()=>{online=!0,s()},i=()=>{online=!1};return onWindowEvent("online",a),onWindowEvent("offline",i),()=>{offWindowEvent("online",a),offWindowEvent("offline",i)}},preset={isOnline,isVisible},defaultConfigOptions={initFocus,initReconnect},IS_REACT_LEGACY=!React8.useId,IS_SERVER=!isWindowDefined||"Deno"in globalThis,rAF=s=>hasRequestAnimationFrame()?window.requestAnimationFrame(s):setTimeout(s,1),useIsomorphicLayoutEffect=IS_SERVER?reactExports.useEffect:reactExports.useLayoutEffect,navigatorConnection=typeof navigator<"u"&&navigator.connection,slowConnection=!IS_SERVER&&navigatorConnection&&(["slow-2g","2g"].includes(navigatorConnection.effectiveType)||navigatorConnection.saveData),table$1=new WeakMap,isObjectType=(s,a)=>OBJECT$1.prototype.toString.call(s)===`[object ${a}]`;let counter=0;const stableHash=s=>{const a=typeof s,i=isObjectType(s,"Date"),o=isObjectType(s,"RegExp"),E=isObjectType(s,"Object");let j,R;if(OBJECT$1(s)===s&&!i&&!o){if(j=table$1.get(s),j)return j;if(j=++counter+"~",table$1.set(s,j),Array.isArray(s)){for(j="@",R=0;R<s.length;R++)j+=stableHash(s[R])+",";table$1.set(s,j)}if(E){j="#";const C=OBJECT$1.keys(s).sort();for(;!isUndefined(R=C.pop());)isUndefined(s[R])||(j+=R+":"+stableHash(s[R])+",");table$1.set(s,j)}}else j=i?s.toJSON():a=="symbol"?s.toString():a=="string"?JSON.stringify(s):""+s;return j},serialize$1=s=>{if(isFunction(s))try{s=s()}catch{s=""}const a=s;return s=typeof s=="string"?s:(Array.isArray(s)?s.length:s)?stableHash(s):"",[s,a]};let __timestamp=0;const getTimestamp=()=>++__timestamp,FOCUS_EVENT=0,RECONNECT_EVENT=1,MUTATE_EVENT=2,ERROR_REVALIDATE_EVENT=3;var events={__proto__:null,ERROR_REVALIDATE_EVENT,FOCUS_EVENT,MUTATE_EVENT,RECONNECT_EVENT};async function internalMutate(...s){const[a,i,o,E]=s,j=mergeObjects({populateCache:!0,throwOnError:!0},typeof E=="boolean"?{revalidate:E}:E||{});let R=j.populateCache;const C=j.rollbackOnError;let S=j.optimisticData;const _=N=>typeof C=="function"?C(N):C!==!1,T=j.throwOnError;if(isFunction(i)){const N=i,I=[],M=a.keys();for(const D of M)!/^\$(inf|sub)\$/.test(D)&&N(a.get(D)._k)&&I.push(D);return Promise.all(I.map(P))}return P(i);async function P(N){const[I]=serialize$1(N);if(!I)return;const[M,D]=createCacheHelper(a,I),[B,F,O,L]=SWRGlobalState.get(a),$=()=>{const pe=B[I];return(isFunction(j.revalidate)?j.revalidate(M().data,N):j.revalidate!==!1)&&(delete O[I],delete L[I],pe&&pe[0])?pe[0](MUTATE_EVENT).then(()=>M().data):M().data};if(s.length<3)return $();let V=o,G;const K=getTimestamp();F[I]=[K,0];const J=!isUndefined(S),ne=M(),le=ne.data,ue=ne._c,ce=isUndefined(ue)?le:ue;if(J&&(S=isFunction(S)?S(ce,le):S,D({data:S,_c:ce})),isFunction(V))try{V=V(ce)}catch(pe){G=pe}if(V&&isPromiseLike(V))if(V=await V.catch(pe=>{G=pe}),K!==F[I][0]){if(G)throw G;return V}else G&&J&&_(G)&&(R=!0,D({data:ce,_c:UNDEFINED}));if(R&&!G)if(isFunction(R)){const pe=R(V,ce);D({data:pe,error:UNDEFINED,_c:UNDEFINED})}else D({data:V,error:UNDEFINED,_c:UNDEFINED});if(F[I][1]=getTimestamp(),Promise.resolve($()).then(()=>{D({_c:UNDEFINED})}),G){if(T)throw G;return}return V}}const revalidateAllKeys=(s,a)=>{for(const i in s)s[i][0]&&s[i][0](a)},initCache=(s,a)=>{if(!SWRGlobalState.has(s)){const i=mergeObjects(defaultConfigOptions,a),o={},E=internalMutate.bind(UNDEFINED,s);let j=noop;const R={},C=(T,P)=>{const N=R[T]||[];return R[T]=N,N.push(P),()=>N.splice(N.indexOf(P),1)},S=(T,P,N)=>{s.set(T,P);const I=R[T];if(I)for(const M of I)M(P,N)},_=()=>{if(!SWRGlobalState.has(s)&&(SWRGlobalState.set(s,[o,{},{},{},E,S,C]),!IS_SERVER)){const T=i.initFocus(setTimeout.bind(UNDEFINED,revalidateAllKeys.bind(UNDEFINED,o,FOCUS_EVENT))),P=i.initReconnect(setTimeout.bind(UNDEFINED,revalidateAllKeys.bind(UNDEFINED,o,RECONNECT_EVENT)));j=()=>{T&&T(),P&&P(),SWRGlobalState.delete(s)}}};return _(),[s,E,_,j]}return[s,SWRGlobalState.get(s)[4]]},onErrorRetry=(s,a,i,o,E)=>{const j=i.errorRetryCount,R=E.retryCount,C=~~((Math.random()+.5)*(1<<(R<8?R:8)))*i.errorRetryInterval;!isUndefined(j)&&R>j||setTimeout(o,C,E)},compare=dequal,[cache,mutate]=initCache(new Map),defaultConfig=mergeObjects({onLoadingSlow:noop,onSuccess:noop,onError:noop,onErrorRetry,onDiscarded:noop,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:slowConnection?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:slowConnection?5e3:3e3,compare,isPaused:()=>!1,cache,mutate,fallback:{}},preset),mergeConfigs=(s,a)=>{const i=mergeObjects(s,a);if(a){const{use:o,fallback:E}=s,{use:j,fallback:R}=a;o&&j&&(i.use=o.concat(j)),E&&R&&(i.fallback=mergeObjects(E,R))}return i},SWRConfigContext=reactExports.createContext({}),INFINITE_PREFIX="$inf$",enableDevtools=isWindowDefined&&window.__SWR_DEVTOOLS_USE__,use$1=enableDevtools?window.__SWR_DEVTOOLS_USE__:[],setupDevTools=()=>{enableDevtools&&(window.__SWR_DEVTOOLS_REACT__=React8)},normalize$2=s=>isFunction(s[1])?[s[0],s[1],s[2]||{}]:[s[0],null,(s[1]===null?s[2]:s[1])||{}],useSWRConfig=()=>mergeObjects(defaultConfig,reactExports.useContext(SWRConfigContext)),middleware=s=>(a,i,o)=>s(a,i&&((...j)=>{const[R]=serialize$1(a),[,,,C]=SWRGlobalState.get(cache);if(R.startsWith(INFINITE_PREFIX))return i(...j);const S=C[R];return isUndefined(S)?i(...j):(delete C[R],S)}),o),BUILT_IN_MIDDLEWARE=use$1.concat(middleware),withArgs=s=>function(...i){const o=useSWRConfig(),[E,j,R]=normalize$2(i),C=mergeConfigs(o,R);let S=s;const{use:_}=C,T=(_||[]).concat(BUILT_IN_MIDDLEWARE);for(let P=T.length;P--;)S=T[P](S);return S(E,j||C.fetcher||null,C)},subscribeCallback=(s,a,i)=>{const o=a[s]||(a[s]=[]);return o.push(i),()=>{const E=o.indexOf(i);E>=0&&(o[E]=o[o.length-1],o.pop())}};setupDevTools();const use=React8.use||(s=>{switch(s.status){case"pending":throw s;case"fulfilled":return s.value;case"rejected":throw s.reason;default:throw s.status="pending",s.then(a=>{s.status="fulfilled",s.value=a},a=>{s.status="rejected",s.reason=a}),s}}),WITH_DEDUPE={dedupe:!0},useSWRHandler=(s,a,i)=>{const{cache:o,compare:E,suspense:j,fallbackData:R,revalidateOnMount:C,revalidateIfStale:S,refreshInterval:_,refreshWhenHidden:T,refreshWhenOffline:P,keepPreviousData:N}=i,[I,M,D,B]=SWRGlobalState.get(o),[F,O]=serialize$1(s),L=reactExports.useRef(!1),$=reactExports.useRef(!1),V=reactExports.useRef(F),G=reactExports.useRef(a),K=reactExports.useRef(i),J=()=>K.current,ne=()=>J().isVisible()&&J().isOnline(),[le,ue,ce,pe]=createCacheHelper(o,F),xe=reactExports.useRef({}).current,oe=isUndefined(R)?isUndefined(i.fallback)?UNDEFINED:i.fallback[F]:R,Y=(Me,Te)=>{for(const be in xe){const Oe=be;if(Oe==="data"){if(!E(Me[Oe],Te[Oe])&&(!isUndefined(Me[Oe])||!E(Ce,Te[Oe])))return!1}else if(Te[Oe]!==Me[Oe])return!1}return!0},ae=reactExports.useMemo(()=>{const Me=!F||!a?!1:isUndefined(C)?J().isPaused()||j?!1:S!==!1:C,Te=qe=>{const Qe=mergeObjects(qe);return delete Qe._k,Me?{isValidating:!0,isLoading:!0,...Qe}:Qe},be=le(),Oe=pe(),Ge=Te(be),We=be===Oe?Ge:Te(Oe);let $e=Ge;return[()=>{const qe=Te(le());return Y(qe,$e)?($e.data=qe.data,$e.isLoading=qe.isLoading,$e.isValidating=qe.isValidating,$e.error=qe.error,$e):($e=qe,qe)},()=>We]},[o,F]),H=shimExports.useSyncExternalStore(reactExports.useCallback(Me=>ce(F,(Te,be)=>{Y(be,Te)||Me()}),[o,F]),ae[0],ae[1]),W=!L.current,U=I[F]&&I[F].length>0,ie=H.data,me=isUndefined(ie)?oe&&isPromiseLike(oe)?use(oe):oe:ie,ee=H.error,ye=reactExports.useRef(me),Ce=N?isUndefined(ie)?ye.current:ie:me,Ae=U&&!isUndefined(ee)?!1:W&&!isUndefined(C)?C:J().isPaused()?!1:j?isUndefined(me)?!1:S:isUndefined(me)||S,De=!!(F&&a&&W&&Ae),Ze=isUndefined(H.isValidating)?De:H.isValidating,Ue=isUndefined(H.isLoading)?De:H.isLoading,Se=reactExports.useCallback(async Me=>{const Te=G.current;if(!F||!Te||$.current||J().isPaused())return!1;let be,Oe,Ge=!0;const We=Me||{},$e=!D[F]||!We.dedupe,qe=()=>IS_REACT_LEGACY?!$.current&&F===V.current&&L.current:F===V.current,Qe={isValidating:!1,isLoading:!1},Je=()=>{ue(Qe)},st=()=>{const Ke=D[F];Ke&&Ke[1]===Oe&&delete D[F]},rt={isValidating:!0};isUndefined(le().data)&&(rt.isLoading=!0);try{if($e&&(ue(rt),i.loadingTimeout&&isUndefined(le().data)&&setTimeout(()=>{Ge&&qe()&&J().onLoadingSlow(F,i)},i.loadingTimeout),D[F]=[Te(O),getTimestamp()]),[be,Oe]=D[F],be=await be,$e&&setTimeout(st,i.dedupingInterval),!D[F]||D[F][1]!==Oe)return $e&&qe()&&J().onDiscarded(F),!1;Qe.error=UNDEFINED;const Ke=M[F];if(!isUndefined(Ke)&&(Oe<=Ke[0]||Oe<=Ke[1]||Ke[1]===0))return Je(),$e&&qe()&&J().onDiscarded(F),!1;const Re=le().data;Qe.data=E(Re,be)?Re:be,$e&&qe()&&J().onSuccess(be,F,i)}catch(Ke){st();const Re=J(),{shouldRetryOnError:fe}=Re;Re.isPaused()||(Qe.error=Ke,$e&&qe()&&(Re.onError(Ke,F,Re),(fe===!0||isFunction(fe)&&fe(Ke))&&(!J().revalidateOnFocus||!J().revalidateOnReconnect||ne())&&Re.onErrorRetry(Ke,F,Re,ve=>{const _e=I[F];_e&&_e[0]&&_e[0](events.ERROR_REVALIDATE_EVENT,ve)},{retryCount:(We.retryCount||0)+1,dedupe:!0})))}return Ge=!1,Je(),!0},[F,o]),ze=reactExports.useCallback((...Me)=>internalMutate(o,V.current,...Me),[]);if(useIsomorphicLayoutEffect(()=>{G.current=a,K.current=i,isUndefined(ie)||(ye.current=ie)}),useIsomorphicLayoutEffect(()=>{if(!F)return;const Me=Se.bind(UNDEFINED,WITH_DEDUPE);let Te=0;const Oe=subscribeCallback(F,I,(Ge,We={})=>{if(Ge==events.FOCUS_EVENT){const $e=Date.now();J().revalidateOnFocus&&$e>Te&&ne()&&(Te=$e+J().focusThrottleInterval,Me())}else if(Ge==events.RECONNECT_EVENT)J().revalidateOnReconnect&&ne()&&Me();else{if(Ge==events.MUTATE_EVENT)return Se();if(Ge==events.ERROR_REVALIDATE_EVENT)return Se(We)}});return $.current=!1,V.current=F,L.current=!0,ue({_k:O}),Ae&&(isUndefined(me)||IS_SERVER?Me():rAF(Me)),()=>{$.current=!0,Oe()}},[F]),useIsomorphicLayoutEffect(()=>{let Me;function Te(){const Oe=isFunction(_)?_(le().data):_;Oe&&Me!==-1&&(Me=setTimeout(be,Oe))}function be(){!le().error&&(T||J().isVisible())&&(P||J().isOnline())?Se(WITH_DEDUPE).then(Te):Te()}return Te(),()=>{Me&&(clearTimeout(Me),Me=-1)}},[_,T,P,F]),reactExports.useDebugValue(Ce),j&&isUndefined(me)&&F){if(!IS_REACT_LEGACY&&IS_SERVER)throw new Error("Fallback data is required when using Suspense in SSR.");G.current=a,K.current=i,$.current=!1;const Me=B[F];if(!isUndefined(Me)){const Te=ze(Me);use(Te)}if(isUndefined(ee)){const Te=Se(WITH_DEDUPE);isUndefined(Ce)||(Te.status="fulfilled",Te.value=!0),use(Te)}else throw ee}return{mutate:ze,get data(){return xe.data=!0,Ce},get error(){return xe.error=!0,ee},get isValidating(){return xe.isValidating=!0,Ze},get isLoading(){return xe.isLoading=!0,Ue}}},useSWR=withArgs(useSWRHandler);function throttle$1(s,a){if(typeof s!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof s}\`.`);let i,o=0;return function(...j){clearTimeout(i);const R=Date.now(),C=R-o,S=a-C;S<=0?(o=R,s.apply(this,j)):i=setTimeout(()=>{o=Date.now(),s.apply(this,j)},S)}}var throttleit=throttle$1;const throttleFunction=getDefaultExportFromCjs(throttleit);function throttle(s,a){return a!=null?throttleFunction(s,a):s}function useChat$1({api:s="/api/chat",id:a,initialMessages:i,initialInput:o="",sendExtraMessageFields:E,onToolCall:j,experimental_prepareRequestBody:R,maxSteps:C=1,streamProtocol:S="data",onResponse:_,onFinish:T,onError:P,credentials:N,headers:I,body:M,generateId:D=generateId,fetch:B,keepLastMessageOnError:F=!0,experimental_throttle:O}={}){const[L]=reactExports.useState(D),$=a??L,V=typeof s=="string"?[s,$]:$,[G]=reactExports.useState([]),{data:K,mutate:J}=useSWR([V,"messages"],null,{fallbackData:i??G}),ne=reactExports.useRef(K||[]);reactExports.useEffect(()=>{ne.current=K||[]},[K]);const{data:le,mutate:ue}=useSWR([V,"streamData"],null),ce=reactExports.useRef(le);reactExports.useEffect(()=>{ce.current=le},[le]);const{data:pe=!1,mutate:xe}=useSWR([V,"loading"],null),{data:oe=void 0,mutate:Y}=useSWR([V,"error"],null),ae=reactExports.useRef(null),H=reactExports.useRef({credentials:N,headers:I,body:M});reactExports.useEffect(()=>{H.current={credentials:N,headers:I,body:M}},[N,I,M]);const W=reactExports.useCallback(async Se=>{var ze,Me,Te;const be=Se.messages.length,Oe=extractMaxToolInvocationStep((ze=Se.messages[Se.messages.length-1])==null?void 0:ze.toolInvocations);try{xe(!0),Y(void 0);const $e=new AbortController;ae.current=$e;const qe=throttle(J,O),Qe=throttle(ue,O),Je=ne.current;qe(Se.messages,!1);const st=E?Se.messages:Se.messages.map(({role:Ke,content:Re,experimental_attachments:fe,data:ve,annotations:_e,toolInvocations:Ie})=>({role:Ke,content:Re,...fe!==void 0&&{experimental_attachments:fe},...ve!==void 0&&{data:ve},..._e!==void 0&&{annotations:_e},...Ie!==void 0&&{toolInvocations:Ie}})),rt=ce.current;await callChatApi({api:s,body:(Me=R==null?void 0:R({id:$,messages:Se.messages,requestData:Se.data,requestBody:Se.body}))!=null?Me:{id:$,messages:st,data:Se.data,...H.current.body,...Se.body},streamProtocol:S,credentials:H.current.credentials,headers:{...H.current.headers,...Se.headers},abortController:()=>ae.current,restoreMessagesOnFailure(){F||qe(Je,!1)},onResponse:_,onUpdate({message:Ke,data:Re,replaceLastMessage:fe}){qe([...fe?Se.messages.slice(0,Se.messages.length-1):Se.messages,Ke],!1),Re!=null&&Re.length&&Qe([...rt??[],...Re],!1)},onToolCall:j,onFinish:T,generateId:D,fetch:B,lastMessage:Se.messages[Se.messages.length-1]}),ae.current=null}catch($e){if($e.name==="AbortError")return ae.current=null,null;P&&$e instanceof Error&&P($e),Y($e)}finally{xe(!1)}const Ge=ne.current,We=Ge[Ge.length-1];We!=null&&(Ge.length>be||extractMaxToolInvocationStep(We.toolInvocations)!==Oe)&&C>1&&isAssistantMessageWithCompletedToolCalls(We)&&!We.content&&((Te=extractMaxToolInvocationStep(We.toolInvocations))!=null?Te:0)<C&&await W({messages:Ge})},[J,xe,s,H,_,T,P,Y,ue,ce,S,E,R,j,C,ne,ae,D,B,F,O,$]),U=reactExports.useCallback(async(Se,{data:ze,headers:Me,body:Te,experimental_attachments:be}={})=>{var Oe,Ge;const We=await prepareAttachmentsForRequest(be),$e=ne.current.concat({...Se,id:(Oe=Se.id)!=null?Oe:D(),createdAt:(Ge=Se.createdAt)!=null?Ge:new Date,experimental_attachments:We.length>0?We:void 0});return W({messages:$e,headers:Me,body:Te,data:ze})},[W,D]),ie=reactExports.useCallback(async({data:Se,headers:ze,body:Me}={})=>{const Te=ne.current;if(Te.length===0)return null;const be=Te[Te.length-1];return W({messages:be.role==="assistant"?Te.slice(0,-1):Te,headers:ze,body:Me,data:Se})},[W]),me=reactExports.useCallback(()=>{ae.current&&(ae.current.abort(),ae.current=null)},[]),ee=reactExports.useCallback(Se=>{typeof Se=="function"&&(Se=Se(ne.current)),J(Se,!1),ne.current=Se},[J]),ye=reactExports.useCallback(Se=>{typeof Se=="function"&&(Se=Se(ce.current)),ue(Se,!1),ce.current=Se},[ue]),[Ce,Ae]=reactExports.useState(o),De=reactExports.useCallback(async(Se,ze={},Me)=>{var Te;if((Te=Se==null?void 0:Se.preventDefault)==null||Te.call(Se),!Ce&&!ze.allowEmptySubmit)return;Me&&(H.current={...H.current,...Me});const be=await prepareAttachmentsForRequest(ze.experimental_attachments),Ge={messages:ne.current.concat({id:D(),createdAt:new Date,role:"user",content:Ce,experimental_attachments:be.length>0?be:void 0}),headers:ze.headers,body:ze.body,data:ze.data};W(Ge),Ae("")},[Ce,D,W]),Ze=Se=>{Ae(Se.target.value)},Ue=reactExports.useCallback(({toolCallId:Se,result:ze})=>{const Me=ne.current.map((be,Oe,Ge)=>Oe===Ge.length-1&&be.role==="assistant"&&be.toolInvocations?{...be,toolInvocations:be.toolInvocations.map(We=>We.toolCallId===Se?{...We,result:ze,state:"result"}:We)}:be);J(Me,!1);const Te=Me[Me.length-1];isAssistantMessageWithCompletedToolCalls(Te)&&W({messages:Me})},[J,W]);return{messages:K||[],id:$,setMessages:ee,data:le,setData:ye,error:oe,append:U,reload:ie,stop:me,input:Ce,setInput:Ae,handleInputChange:Ze,handleSubmit:De,isLoading:pe,addToolResult:Ue}}function isAssistantMessageWithCompletedToolCalls(s){return s.role==="assistant"&&s.toolInvocations!=null&&s.toolInvocations.length>0&&s.toolInvocations.every(a=>"result"in a)}var getOriginalFetch2=()=>fetch;function useObject({api:s,id:a,schema:i,initialValue:o,fetch:E,onError:j,onFinish:R,headers:C}){const S=reactExports.useId(),_=a??S,{data:T,mutate:P}=useSWR([s,_],null,{fallbackData:o}),[N,I]=reactExports.useState(void 0),[M,D]=reactExports.useState(!1),B=reactExports.useRef(null),F=reactExports.useCallback(()=>{var L;try{(L=B.current)==null||L.abort()}catch{}finally{D(!1),B.current=null}},[]);return{submit:async L=>{var $;try{P(void 0),D(!0),I(void 0);const V=new AbortController;B.current=V;const K=await(E??getOriginalFetch2())(s,{method:"POST",headers:{"Content-Type":"application/json",...C},signal:V.signal,body:JSON.stringify(L)});if(!K.ok)throw new Error(($=await K.text())!=null?$:"Failed to fetch the response.");if(K.body==null)throw new Error("The response body is empty.");let J="",ne;await K.body.pipeThrough(new TextDecoderStream).pipeTo(new WritableStream({write(le){J+=le;const{value:ue}=parsePartialJson(J),ce=ue;isDeepEqualData(ne,ce)||(ne=ce,P(ce))},close(){if(D(!1),B.current=null,R!=null){const le=safeValidateTypes$1({value:ne,schema:asSchema(i)});R(le.success?{object:le.value,error:void 0}:{object:void 0,error:le.error})}}}))}catch(V){if(isAbortError(V))return;j&&V instanceof Error&&j(V),D(!1),I(V instanceof Error?V:new Error(String(V)))}},object:T,error:N,isLoading:M,stop:F}}var experimental_useObject$1=useObject,useChat=useChat$1,experimental_useObject=experimental_useObject$1;function composeEventHandlers(s,a,{checkForDefaultPrevented:i=!0}={}){return function(E){if(s==null||s(E),i===!1||!E.defaultPrevented)return a==null?void 0:a(E)}}function createContextScope(s,a=[]){let i=[];function o(j,R){const C=reactExports.createContext(R),S=i.length;i=[...i,R];const _=P=>{var F;const{scope:N,children:I,...M}=P,D=((F=N==null?void 0:N[s])==null?void 0:F[S])||C,B=reactExports.useMemo(()=>M,Object.values(M));return jsxRuntimeExports.jsx(D.Provider,{value:B,children:I})};_.displayName=j+"Provider";function T(P,N){var D;const I=((D=N==null?void 0:N[s])==null?void 0:D[S])||C,M=reactExports.useContext(I);if(M)return M;if(R!==void 0)return R;throw new Error(`\`${P}\` must be used within \`${j}\``)}return[_,T]}const E=()=>{const j=i.map(R=>reactExports.createContext(R));return function(C){const S=(C==null?void 0:C[s])||j;return reactExports.useMemo(()=>({[`__scope${s}`]:{...C,[s]:S}}),[C,S])}};return E.scopeName=s,[o,composeContextScopes(E,...a)]}function composeContextScopes(...s){const a=s[0];if(s.length===1)return a;const i=()=>{const o=s.map(E=>({useScope:E(),scopeName:E.scopeName}));return function(j){const R=o.reduce((C,{useScope:S,scopeName:_})=>{const P=S(j)[`__scope${_}`];return{...C,...P}},{});return reactExports.useMemo(()=>({[`__scope${a.scopeName}`]:R}),[R])}};return i.scopeName=a.scopeName,i}function setRef(s,a){if(typeof s=="function")return s(a);s!=null&&(s.current=a)}function composeRefs(...s){return a=>{let i=!1;const o=s.map(E=>{const j=setRef(E,a);return!i&&typeof j=="function"&&(i=!0),j});if(i)return()=>{for(let E=0;E<o.length;E++){const j=o[E];typeof j=="function"?j():setRef(s[E],null)}}}}function useComposedRefs(...s){return reactExports.useCallback(composeRefs(...s),s)}var Slot=reactExports.forwardRef((s,a)=>{const{children:i,...o}=s,E=reactExports.Children.toArray(i),j=E.find(isSlottable);if(j){const R=j.props.children,C=E.map(S=>S===j?reactExports.Children.count(R)>1?reactExports.Children.only(null):reactExports.isValidElement(R)?R.props.children:null:S);return jsxRuntimeExports.jsx(SlotClone,{...o,ref:a,children:reactExports.isValidElement(R)?reactExports.cloneElement(R,void 0,C):null})}return jsxRuntimeExports.jsx(SlotClone,{...o,ref:a,children:i})});Slot.displayName="Slot";var SlotClone=reactExports.forwardRef((s,a)=>{const{children:i,...o}=s;if(reactExports.isValidElement(i)){const E=getElementRef$1(i);return reactExports.cloneElement(i,{...mergeProps(o,i.props),ref:a?composeRefs(a,E):E})}return reactExports.Children.count(i)>1?reactExports.Children.only(null):null});SlotClone.displayName="SlotClone";var Slottable=({children:s})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:s});function isSlottable(s){return reactExports.isValidElement(s)&&s.type===Slottable}function mergeProps(s,a){const i={...a};for(const o in a){const E=s[o],j=a[o];/^on[A-Z]/.test(o)?E&&j?i[o]=(...C)=>{j(...C),E(...C)}:E&&(i[o]=E):o==="style"?i[o]={...E,...j}:o==="className"&&(i[o]=[E,j].filter(Boolean).join(" "))}return{...s,...i}}function getElementRef$1(s){var o,E;let a=(o=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:o.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?s.ref:(a=(E=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:E.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?s.props.ref:s.props.ref||s.ref)}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Primitive=NODES.reduce((s,a)=>{const i=reactExports.forwardRef((o,E)=>{const{asChild:j,...R}=o,C=j?Slot:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntimeExports.jsx(C,{...R,ref:E})});return i.displayName=`Primitive.${a}`,{...s,[a]:i}},{});function useStateMachine(s,a){return reactExports.useReducer((i,o)=>a[i][o]??i,s)}var Presence=s=>{const{present:a,children:i}=s,o=usePresence(a),E=typeof i=="function"?i({present:o.isPresent}):reactExports.Children.only(i),j=useComposedRefs(o.ref,getElementRef(E));return typeof i=="function"||o.isPresent?reactExports.cloneElement(E,{ref:j}):null};Presence.displayName="Presence";function usePresence(s){const[a,i]=reactExports.useState(),o=reactExports.useRef({}),E=reactExports.useRef(s),j=reactExports.useRef("none"),R=s?"mounted":"unmounted",[C,S]=useStateMachine(R,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const _=getAnimationName(o.current);j.current=C==="mounted"?_:"none"},[C]),useLayoutEffect2(()=>{const _=o.current,T=E.current;if(T!==s){const N=j.current,I=getAnimationName(_);s?S("MOUNT"):I==="none"||(_==null?void 0:_.display)==="none"?S("UNMOUNT"):S(T&&N!==I?"ANIMATION_OUT":"UNMOUNT"),E.current=s}},[s,S]),useLayoutEffect2(()=>{if(a){let _;const T=a.ownerDocument.defaultView??window,P=I=>{const D=getAnimationName(o.current).includes(I.animationName);if(I.target===a&&D&&(S("ANIMATION_END"),!E.current)){const B=a.style.animationFillMode;a.style.animationFillMode="forwards",_=T.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=B)})}},N=I=>{I.target===a&&(j.current=getAnimationName(o.current))};return a.addEventListener("animationstart",N),a.addEventListener("animationcancel",P),a.addEventListener("animationend",P),()=>{T.clearTimeout(_),a.removeEventListener("animationstart",N),a.removeEventListener("animationcancel",P),a.removeEventListener("animationend",P)}}else S("ANIMATION_END")},[a,S]),{isPresent:["mounted","unmountSuspended"].includes(C),ref:reactExports.useCallback(_=>{_&&(o.current=getComputedStyle(_)),i(_)},[])}}function getAnimationName(s){return(s==null?void 0:s.animationName)||"none"}function getElementRef(s){var o,E;let a=(o=Object.getOwnPropertyDescriptor(s.props,"ref"))==null?void 0:o.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?s.ref:(a=(E=Object.getOwnPropertyDescriptor(s,"ref"))==null?void 0:E.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?s.props.ref:s.props.ref||s.ref)}var COLLAPSIBLE_NAME="Collapsible",[createCollapsibleContext,createCollapsibleScope]=createContextScope(COLLAPSIBLE_NAME),[CollapsibleProvider,useCollapsibleContext]=createCollapsibleContext(COLLAPSIBLE_NAME),Collapsible$1=reactExports.forwardRef((s,a)=>{const{__scopeCollapsible:i,open:o,defaultOpen:E,disabled:j,onOpenChange:R,...C}=s,[S=!1,_]=useControllableState({prop:o,defaultProp:E,onChange:R});return jsxRuntimeExports.jsx(CollapsibleProvider,{scope:i,disabled:j,contentId:useId(),open:S,onOpenToggle:reactExports.useCallback(()=>_(T=>!T),[_]),children:jsxRuntimeExports.jsx(Primitive.div,{"data-state":getState(S),"data-disabled":j?"":void 0,...C,ref:a})})});Collapsible$1.displayName=COLLAPSIBLE_NAME;var TRIGGER_NAME$1="CollapsibleTrigger",CollapsibleTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeCollapsible:i,...o}=s,E=useCollapsibleContext(TRIGGER_NAME$1,i);return jsxRuntimeExports.jsx(Primitive.button,{type:"button","aria-controls":E.contentId,"aria-expanded":E.open||!1,"data-state":getState(E.open),"data-disabled":E.disabled?"":void 0,disabled:E.disabled,...o,ref:a,onClick:composeEventHandlers(s.onClick,E.onOpenToggle)})});CollapsibleTrigger$1.displayName=TRIGGER_NAME$1;var CONTENT_NAME$1="CollapsibleContent",CollapsibleContent$1=reactExports.forwardRef((s,a)=>{const{forceMount:i,...o}=s,E=useCollapsibleContext(CONTENT_NAME$1,s.__scopeCollapsible);return jsxRuntimeExports.jsx(Presence,{present:i||E.open,children:({present:j})=>jsxRuntimeExports.jsx(CollapsibleContentImpl,{...o,ref:a,present:j})})});CollapsibleContent$1.displayName=CONTENT_NAME$1;var CollapsibleContentImpl=reactExports.forwardRef((s,a)=>{const{__scopeCollapsible:i,present:o,children:E,...j}=s,R=useCollapsibleContext(CONTENT_NAME$1,i),[C,S]=reactExports.useState(o),_=reactExports.useRef(null),T=useComposedRefs(a,_),P=reactExports.useRef(0),N=P.current,I=reactExports.useRef(0),M=I.current,D=R.open||C,B=reactExports.useRef(D),F=reactExports.useRef(void 0);return reactExports.useEffect(()=>{const O=requestAnimationFrame(()=>B.current=!1);return()=>cancelAnimationFrame(O)},[]),useLayoutEffect2(()=>{const O=_.current;if(O){F.current=F.current||{transitionDuration:O.style.transitionDuration,animationName:O.style.animationName},O.style.transitionDuration="0s",O.style.animationName="none";const L=O.getBoundingClientRect();P.current=L.height,I.current=L.width,B.current||(O.style.transitionDuration=F.current.transitionDuration,O.style.animationName=F.current.animationName),S(o)}},[R.open,o]),jsxRuntimeExports.jsx(Primitive.div,{"data-state":getState(R.open),"data-disabled":R.disabled?"":void 0,id:R.contentId,hidden:!D,...j,ref:T,style:{"--radix-collapsible-content-height":N?`${N}px`:void 0,"--radix-collapsible-content-width":M?`${M}px`:void 0,...s.style},children:D&&E})});function getState(s){return s?"open":"closed"}var Root=Collapsible$1;const Collapsible=Root,CollapsibleTrigger=CollapsibleTrigger$1,CollapsibleContent=CollapsibleContent$1,sizes={sm:{width:21,height:22},md:{width:32,height:33},lg:{width:42,height:44},xl:{width:50,height:50}},CirclePath=({variants:s,animate:a,d:i,delay:o})=>jsxRuntimeExports.jsx(motion.path,{variants:s,animate:a,fillRule:"evenodd",clipRule:"evenodd",d:i,fill:"#7F54B3"}),MovingSparkle=({isPlaying:s})=>jsxRuntimeExports.jsx(motion.path,{d:"M7.53472 3.89354C6.24574 8.54946 4.58757 10.1409 0 11.4283C4.58757 12.7156 6.24574 14.3071 7.53472 18.963C8.82369 14.3071 10.4819 12.7156 15.0694 11.4283C10.4819 10.1409 8.82369 8.54946 7.53472 3.89354Z",fill:"#7F54B3",className:"mt-4",initial:"initial",variants:{initial:{scale:0,x:0,y:1,rotate:50,opacity:.6},animate:{scale:[0,1,1,0,0],x:[0,8.5,8.5,23,0],y:[10,6,6,-2,1],rotate:[50,0,0,50,50],opacity:[.6,1,1,0,.6],transition:{duration:1.5,repeat:s?1/0:0,ease:[[.455,.03,.515,.955],[.645,.045,.355,1],[.455,.03,.515,.955],[.645,.045,.355,1]]}},paused:{scale:1,x:8.5,y:6,rotate:0,opacity:.8,transition:{duration:.3,ease:"easeInOut"}}},animate:s?"animate":"paused",style:{originX:.5,originY:.5}}),SparklePath=({isPlaying:s})=>{const a="M16.0505 14.6078C15.4258 16.8094 14.6075 17.5746 12.5602 18.1981C14.6075 18.8216 15.4258 19.5868 16.0505 21.7884C16.6753 19.5868 17.4936 18.8216 19.5408 18.1981C17.4936 17.5746 16.6753 16.8094 16.0505 14.6078Z";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(motion.path,{d:a,stroke:"#7F54B3",strokeWidth:"0.7",strokeLinecap:"round",strokeLinejoin:"round",fill:"none",variants:{initial:{pathLength:0,scale:1.6},animate:{pathLength:[0,1,1,1,0],opacity:[.3,1,1,1,.3],scale:1.6,transition:{duration:2,ease:"easeInOut",repeat:s?1/0:0,times:[0,.3,.5,.7,1]}},paused:{pathLength:1,opacity:.7,scale:1.6,transition:{duration:.3,ease:"easeInOut"}}},initial:"initial",animate:s?"animate":"paused",style:{originX:.5,originY:.5}}),jsxRuntimeExports.jsx(motion.path,{d:a,fill:"#7F54B3",variants:{initial:{fillOpacity:0,scale:1.6},animate:{fillOpacity:[0,0,1,1,0],scale:1.6,transition:{duration:2,ease:"easeInOut",repeat:s?1/0:0,times:[0,.3,.5,.7,1]}},paused:{fillOpacity:.5,scale:1.6,transition:{duration:.3,ease:"easeInOut"}}},initial:"initial",animate:s?"animate":"paused",style:{originX:.5,originY:.5}})]})},AnimatedLogo=({className:s,size:a="lg",isPlaying:i=!0,animationType:o="moving"})=>{const{width:E,height:j}=sizes[a],R=S=>({initial:{opacity:0,scale:.98},animate:{opacity:[.7,1,.7],scale:[.98,1,.98],transition:{duration:.8,ease:"easeInOut",repeat:i?1/0:0,repeatType:"loop",delay:S,repeatDelay:.2}},paused:{opacity:.85,scale:.99,transition:{duration:.3,ease:"easeInOut"}}}),C=[{d:"M16.5961 32.763C25.3053 32.2753 32.0237 24.9601 31.5261 16.4257C31.4431 15.0439 31.1943 13.7435 30.7796 12.443L30.5307 12.6056C30.9455 13.906 31.1943 15.2878 31.1943 16.6695C31.1943 24.1473 24.9735 30.162 17.3426 30.162C17.0938 30.162 16.845 30.162 16.5961 30.162V32.763V32.763Z",delay:0},{d:"M2.74469 26.0168C5.56479 30.0808 10.2097 32.6005 15.1863 32.763V29.9995C11.2879 29.3493 7.97017 27.6424 5.81362 24.3099L2.74469 26.0168Z",delay:.2},{d:"M1.33448 10.3298C-0.65618 15.0441 -0.407347 20.3273 1.99803 24.7977L5.14991 23.0095C3.57397 19.677 3.65691 15.8569 5.39874 12.6057L1.33448 10.3298Z",delay:.4},{d:"M15.186 0.169922C9.54583 0.820161 4.56919 4.15264 1.91498 9.02943L6.06218 11.3865C8.13579 8.37919 11.4535 6.50975 15.1031 6.26591V0.169922H15.186Z",delay:.6},{d:"M30.8626 6.67237C27.4619 2.36453 22.1534 -0.155146 16.6791 0.00741415V6.18469C19.6651 6.34725 22.4023 7.48516 24.5588 9.51716L30.8626 6.67237Z",delay:.8}];return jsxRuntimeExports.jsxs(motion.svg,{width:E,height:j,viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s,initial:{opacity:.9},animate:i?{opacity:[.9,1,.9]}:{opacity:.95},transition:{duration:2,ease:"linear",repeat:i?1/0:0},children:[C.map((S,_)=>jsxRuntimeExports.jsx(CirclePath,{variants:R(S.delay),animate:i?"animate":"paused",d:S.d,delay:S.delay},_)),o==="moving"?jsxRuntimeExports.jsx(MovingSparkle,{isPlaying:i}):jsxRuntimeExports.jsx(SparklePath,{isPlaying:i})]})},durationToSeconds=s=>{const a=s.match(/(\d+)s/);return a?parseInt(a[1],10):0},LoadingGradient=()=>jsxRuntimeExports.jsx(AnimatePresence,{children:jsxRuntimeExports.jsx(motion.div,{className:"absolute inset-0 rounded-[10px]",style:{background:"linear-gradient(90deg, transparent 0%, transparent 25%, #6c21a8 50%, transparent 75%, transparent 100%)",backgroundSize:"200% 100%"},animate:{backgroundPosition:["200% 0","-200% 0"],opacity:[1,.5,1]},transition:{duration:4,ease:"linear",repeat:1/0}})}),ProgressTracker=({steps:s,currentStep:a=0,onTimeUpdate:i})=>{const[o,E]=reactExports.useState(s.reduce((C,S)=>C+durationToSeconds(S.duration),0));reactExports.useEffect(()=>{const C=()=>{const S=document.querySelectorAll("[data-countdown]"),_=Array.from(S).reduce((T,P)=>{var N;return T+Number(((N=P.textContent)==null?void 0:N.replace("s",""))||0)},0);E(_),i==null||i(_)};return document.addEventListener("countdownupdate",C),C(),()=>{document.removeEventListener("countdownupdate",C)}},[s,i]);const j=s[0],R=s.slice(1);return jsxRuntimeExports.jsxs("div",{className:"grid grid-cols-5 gap-4 w-full dark:text-brand-300",children:[jsxRuntimeExports.jsxs("div",{className:"col-span-1",children:[jsxRuntimeExports.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2 dark:text-brand-300",children:"1. Preparing"}),jsxRuntimeExports.jsxs("div",{className:"relative p-0.5",children:[a===0&&jsxRuntimeExports.jsx(LoadingGradient,{}),jsxRuntimeExports.jsx("div",{className:"border relative rounded-[10px] bg-white dark:bg-brand-900",children:jsxRuntimeExports.jsx(ProgressItem,{duration:j.duration,label:j.label,progress:j.progress,isActive:a===0,rounded:!0,currentStep:a})})]})]}),jsxRuntimeExports.jsxs("div",{className:"col-span-4",children:[jsxRuntimeExports.jsx("h3",{className:cn("text-sm font-medium text-gray-700 mb-2 dark:text-brand-300",a>0?"opacity-100":"opacity-40"),children:"2. Collecting required data to diagnose"}),jsxRuntimeExports.jsxs("div",{className:"relative p-0.5",children:[a>0&&jsxRuntimeExports.jsx(LoadingGradient,{}),jsxRuntimeExports.jsx("div",{className:"border rounded-[10px] relative bg-white dark:bg-brand-900",children:jsxRuntimeExports.jsx("div",{className:"grid grid-cols-4 [&>div:first-child>div]:rounded-l-xl [&>div:last-child>div]:rounded-r-xl",children:R.map((C,S)=>jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsx(ProgressItem,{duration:C.duration,label:C.label,progress:C.progress,isActive:C.progress>0,rounded:!1,currentStep:a,isLast:S===R.length-1})},S))})})]})]})]})},ProgressItem=({duration:s,label:a,progress:i,isActive:o,rounded:E,currentStep:j=0,isLast:R})=>{const[C,S]=reactExports.useState(durationToSeconds(s)),[_,T]=reactExports.useState(!1);return reactExports.useEffect(()=>{let P;if(o&&C>0){P=setInterval(()=>{S(I=>I<=1?(clearInterval(P),T(!0),0):I-1)},1e3);const N=setTimeout(()=>{const I=new Event("countdownupdate");document.dispatchEvent(I)},0);return()=>{P&&clearInterval(P),clearTimeout(N)}}},[o,C]),jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col relative bg-white p-4 dark:bg-brand-800/40",E?"rounded-xl ":R?"":"border-r",i>0||j>0?"opacity-100":"opacity-40"),children:[jsxRuntimeExports.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2 relative dark:bg-brand-600/40",children:jsxRuntimeExports.jsx("div",{className:`absolute left-0 top-0 h-2 rounded-full transition-all duration-300 ${i===100||o?"bg-black":"bg-gray-300"}`,style:{width:`${i}%`}})}),jsxRuntimeExports.jsx("div",{className:cn("text-xs text-gray-600 mt-2 flex gap-1 items-center dark:text-brand-300"),children:i===100?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Completed ",jsxRuntimeExports.jsx(Check,{className:"h-4 w-4 text-brand-950 dark:text-brand-300"})]}):_?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Hang tight... ",o&&jsxRuntimeExports.jsx(Loader,{className:"h-4 w-4 animate-spin dark:text-brand-300"})]}):jsxRuntimeExports.jsxs("span",{className:"flex gap-1","data-countdown":!0,children:[C,"s ",o&&jsxRuntimeExports.jsx(Loader,{className:"h-4 w-4 animate-spin dark:text-brand-300"})]})}),jsxRuntimeExports.jsx("span",{className:"text-xs text-gray-600 border-b border-gray-200 my-2 -mx-4 dark:border-brand-600/40"}),jsxRuntimeExports.jsx("span",{className:"text-sm font-semibold text-gray-800 dark:text-brand-300",children:a})]})};var lr;const AIBaseURL$1=((lr=window.rapidload_optimizer)==null?void 0:lr.ai_root)||"https://ai.rapidload.io/api",SolutionSchema=z.object({solutions_reasoning:z.array(z.object({block_type:z.enum(["observation","analysis","hypothesis","validation","conclusion"]),thought:z.string(),reasoning:z.string(),confidence_level:z.number().min(0).max(100),supporting_evidence:z.array(z.string()),related_blocks:z.array(z.string()).optional()})),solutions_list:z.array(z.object({type:z.enum(["rapidload_fix","wordpress_fix","theme_fix","another_plugin_fix","code_fix","server_config_fix","server_upgrade_fix"]),title:z.string(),description:z.string(),steps:z.array(z.object({step:z.number(),action:z.string(),details:z.string(),verification:z.string().optional()}))}))}),AiAudit=({issue:s,index:a,openItems:i,toggleAccordion:o,input:E,loading:j,isLatestAudit:R})=>{var O,L,$,V,G,K,J,ne;reactExports.useState(null);const[C,S]=reactExports.useState(!1),[_,T]=reactExports.useState(0),[P,N]=reactExports.useState(a===0),[I,M]=reactExports.useState(!1),[D,B]=reactExports.useState({});experimental_useObject({api:`${AIBaseURL$1}/solution`,schema:SolutionSchema,onFinish:()=>{S(!1),M(!0)}}),reactExports.useEffect(()=>{let le;if(C){const ue=Date.now();le=setInterval(()=>{const ce=Math.floor((Date.now()-ue)/1e3);T(ce)},1e3)}return()=>clearInterval(le)},[C]),reactExports.useEffect(()=>{T(0),S(!0)},[]),reactExports.useEffect(()=>{var le,ue;((ue=(le=s==null?void 0:s.solutions)==null?void 0:le.solutions_list)==null?void 0:ue.length)>0&&(S(!1),M(!0))},[s]);const F=le=>{B(ue=>({...ue,[le]:!ue[le]}))};return jsxRuntimeExports.jsxs(Card,{spreader:!i.includes(a.toString()),className:cn("overflow-hidden w-full flex justify-center flex-col items-center p-0 rounded-3xl dark:bg-brand-950",i.includes(a.toString())?"shadow-lg dark:shadow-brand-800/30":"dark:hover:border-brand-700/70 hover:border-brand-400/60"),children:[jsxRuntimeExports.jsxs("div",{className:"min-h-[56px] relative flex justify-between w-full py-2 px-4",children:[jsxRuntimeExports.jsx("div",{className:"flex gap-3 font-normal items-center text-base",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-around",children:jsxRuntimeExports.jsxs("div",{className:"flex gap-3.5 items-center text-zinc-800 dark:text-zinc-200",children:[jsxRuntimeExports.jsx("div",{className:"inline-flex items-center justify-center w-7 h-7 rounded-full dark:bg-brand-700 bg-brand-200/50",children:j&&a===(R??0)-1?jsxRuntimeExports.jsx(Loader,{className:"w-4 h-4 animate-spin opacity-50"}):jsxRuntimeExports.jsx(Fail,{})}),s==null?void 0:s.issue,(O=s==null?void 0:s.pagespeed_insight_metrics)==null?void 0:O.map(le=>jsxRuntimeExports.jsx("div",{className:cn("flex text-xxs items-center transition-colors flex gap-1 cursor-default hover:bg-brand-100 dark:hover:bg-brand-800 border py-1 px-1.5 rounded-md"),children:le},le))]})})}),jsxRuntimeExports.jsx(TooltipText,{text:i.includes(a.toString())?"Hide AI Details":"Show AI Details",children:jsxRuntimeExports.jsxs("div",{"data-tour":a===0?"show-ai-actions":void 0,onClick:()=>o(a.toString()),className:cn("min-w-[125px] cursor-pointer flex items-center gap-2 pl-4 pr-2 py-1.5 text-sm rounded-2xl","dark:hover:bg-brand-800 hover:bg-brand-100 transition-colors border",i.includes(a.toString())&&"dark:bg-brand-900"),children:[i.includes(a.toString())?"Hide Issue":"Show Issue",i.includes(a.toString())?jsxRuntimeExports.jsx(ForwardRef$q,{className:"w-6 h-6 dark:text-brand-500 text-brand-900"}):jsxRuntimeExports.jsx(ForwardRef$p,{className:"w-6 h-6 dark:text-brand-500 text-brand-900"})]})})]}),jsxRuntimeExports.jsx(Accordion$1,{id:a.toString(),className:"audit-content",initialRender:!0,isOpen:i.includes(a.toString()),children:jsxRuntimeExports.jsx("div",{className:"border-t",children:jsxRuntimeExports.jsxs("div",{className:"",children:[jsxRuntimeExports.jsxs("div",{className:"px-6 py-6 border-zinc-200 dark:border-zinc-800 flex flex-col gap-2",children:[jsxRuntimeExports.jsxs("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200 flex gap-2 items-center",children:[jsxRuntimeExports.jsx(Microscope,{className:"w-5 h-5"}),"Core Issue"]}),jsxRuntimeExports.jsx("p",{className:"text-sm text-left text-brand-700 dark:text-brand-300",children:s==null?void 0:s.description})]}),jsxRuntimeExports.jsx("div",{className:"border-t px-6 pb-6 pt-4",children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("div",{className:"flex gap-2 mb-4 w-full justify-between",children:jsxRuntimeExports.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200 flex gap-2 items-center",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center relative gap-2 pl-7 justify-center",children:[jsxRuntimeExports.jsx(Sparkles,{className:"absolute w-5 h-5 top-2.5 left-0"}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col ",children:[jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:"Solutions"}),((L=s==null?void 0:s.solutions)==null?void 0:L.solutions_reasoning)&&jsxRuntimeExports.jsxs(Collapsible,{open:P,onOpenChange:N,children:[jsxRuntimeExports.jsx(CollapsibleTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:opacity-80",children:[jsxRuntimeExports.jsx("span",{className:"text-xs font-normal text-zinc-600 dark:text-zinc-400",children:((V=($=s==null?void 0:s.solutions)==null?void 0:$.solutions_list)==null?void 0:V.length)>0?_>0?`Thought for ${_}s...`:"Thoughts...":jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Thinking",jsxRuntimeExports.jsxs("span",{className:"inline-flex w-8",children:[jsxRuntimeExports.jsx("span",{className:"animate-[loading_1.4s_ease-in-out_infinite] mr-0.5",children:"."}),jsxRuntimeExports.jsx("span",{className:"animate-[loading_1.4s_ease-in-out_0.2s_infinite] mr-0.5",children:"."}),jsxRuntimeExports.jsx("span",{className:"animate-[loading_1.4s_ease-in-out_0.4s_infinite]",children:"."})]})]})}),jsxRuntimeExports.jsx(ChevronDown,{className:cn("w-4 h-4 transition-transform duration-200",P?"transform rotate-180":"")})]})}),jsxRuntimeExports.jsx(CollapsibleContent,{children:((G=s==null?void 0:s.solutions)==null?void 0:G.solutions_reasoning)&&jsxRuntimeExports.jsx("div",{className:"mb-2 shadow-sm mt-2 border border-zinc-200 dark:border-zinc-800 rounded-xl",children:(K=s==null?void 0:s.solutions)==null?void 0:K.solutions_reasoning.map((le,ue)=>jsxRuntimeExports.jsx("div",{className:"px-4 last:border-0 border-b py-3 border-brand-200 dark:border-brand-800",children:jsxRuntimeExports.jsxs("div",{className:"space-y-1",children:[jsxRuntimeExports.jsxs("div",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200 flex gap-2 items-center",children:[le==null?void 0:le.thought,jsxRuntimeExports.jsx("span",{className:"text-xs font-normal bg-brand-200/50 dark:bg-brand-800 rounded-md px-2 py-1",children:le==null?void 0:le.block_type})]}),jsxRuntimeExports.jsx("div",{className:"text-xs text-zinc-500 dark:text-zinc-400",children:le==null?void 0:le.reasoning})]})},ue))})})]})]})]})})}),(ne=(s==null?void 0:s.solutions)&&((J=s==null?void 0:s.solutions)==null?void 0:J.solutions_list))==null?void 0:ne.map(le=>{if(!le)return null;const ue=le.steps||[];return jsxRuntimeExports.jsx("div",{className:"border shadow-md border-zinc-200 dark:border-zinc-800 rounded-xl p-4 mb-4 last:mb-0 bg-brand-100/30 dark:bg-brand-800",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:le.title}),jsxRuntimeExports.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-brand-200/50 dark:bg-brand-700 text-zinc-700 dark:text-zinc-300",children:le.type})]}),jsxRuntimeExports.jsx("p",{className:"text-sm text-zinc-600 dark:text-zinc-300",children:le.description})]}),ue.length>0&&jsxRuntimeExports.jsxs(Collapsible,{open:D[le.title],onOpenChange:()=>F(le.title),children:[jsxRuntimeExports.jsx(CollapsibleTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 cursor-pointer hover:opacity-80",children:[jsxRuntimeExports.jsx("p",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:"Implementation Steps"}),jsxRuntimeExports.jsx(ChevronDown,{className:cn("w-4 h-4 transition-transform duration-200",D[le.title]?"transform rotate-180":"")})]})}),jsxRuntimeExports.jsx(CollapsibleContent,{children:jsxRuntimeExports.jsx("ul",{className:"list-none space-y-4 mt-3",children:ue.map(ce=>ce?jsxRuntimeExports.jsx("li",{className:cn("text-sm text-zinc-600 dark:text-zinc-300",ce.step!==ue.length&&"border-b border-zinc-200 dark:border-zinc-800 pb-4"),children:jsxRuntimeExports.jsxs("div",{className:"flex items-start gap-3",children:[jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-brand-200/50 dark:bg-brand-700 flex items-center justify-center text-sm font-medium text-zinc-800 dark:text-zinc-200",children:ce.step}),jsxRuntimeExports.jsxs("div",{className:"flex-1 space-y-1",children:[jsxRuntimeExports.jsx("p",{className:"font-medium text-zinc-800 dark:text-zinc-200",children:ce.action}),jsxRuntimeExports.jsx("p",{className:"text-zinc-600 dark:text-zinc-300",children:ce.details}),ce.verification&&jsxRuntimeExports.jsxs("p",{className:"text-zinc-500 dark:text-zinc-400 text-xs italic mt-1",children:["Verification: ",ce.verification]})]})]})},ce.step):null)})})]})]})},le.title)})]},a)})]})})})]},a)},AnalysisResults=({object:s,relatedAudits:a,input:i,loading:o})=>{var C,S;const[E,j]=reactExports.useState(["0"]),R=_=>{j(T=>T.includes(_)?T.filter(P=>P!==_):[...T,_])};return jsxRuntimeExports.jsx("div",{className:"grid grid-cols-5 gap-4 mb-6",children:jsxRuntimeExports.jsx("div",{className:cn("relative col-span-5 flex flex-col gap-4",!((C=s==null?void 0:s.CriticalIssues)!=null&&C.length)&&"items-center justify-center"),children:jsxRuntimeExports.jsx("div",{className:"w-full",children:jsxRuntimeExports.jsx("div",{className:"w-full mt-4",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-4",children:[(S=s==null?void 0:s.CriticalIssues)==null?void 0:S.map((_,T)=>{var P;return jsxRuntimeExports.jsx(AiAudit,{issue:_,index:T,openItems:E,toggleAccordion:R,input:i,loading:o,isLatestAudit:(P=s==null?void 0:s.CriticalIssues)==null?void 0:P.length},T)}),(s==null?void 0:s.PluginConflicts)&&(s==null?void 0:s.PluginConflicts.length)>0&&jsxRuntimeExports.jsxs(Card,{className:"overflow-hidden w-full flex justify-center flex-col items-center p-0 rounded-3xl",children:[jsxRuntimeExports.jsx("div",{className:"min-h-[56px] relative flex justify-between w-full py-2 px-4",children:jsxRuntimeExports.jsx("div",{className:"flex gap-3 font-normal items-center text-base",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col justify-around",children:jsxRuntimeExports.jsxs("div",{className:"flex gap-3.5 items-center text-zinc-800 dark:text-zinc-200",children:[jsxRuntimeExports.jsx("div",{className:"inline-flex items-center justify-center w-7 h-7 rounded-full dark:bg-brand-700 bg-brand-200/50",children:jsxRuntimeExports.jsx(ForwardRef$a,{className:"w-5 h-5"})}),"Potential Plugin Conflicts"]})})})}),jsxRuntimeExports.jsx("div",{className:"border-t w-full",children:jsxRuntimeExports.jsx("div",{className:"p-4",children:jsxRuntimeExports.jsx("div",{className:"space-y-2",children:s==null?void 0:s.PluginConflicts.map((_,T)=>jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-xl border border-zinc-200 dark:border-zinc-800 bg-brand-100/30 dark:bg-brand-800",children:[jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full bg-red-500"}),jsxRuntimeExports.jsx("span",{className:"text-sm font-medium text-zinc-800 dark:text-zinc-200",children:_.plugin})]},T))})})})]}),jsxRuntimeExports.jsxs("div",{className:"overflow-hidden w-full flex justify-center flex-col items-center p-6 rounded-3xl",children:[jsxRuntimeExports.jsx("div",{className:"text-center text-zinc-600 dark:text-zinc-400",children:jsxRuntimeExports.jsx("p",{className:"text-sm",children:"RapidLoad AI can make mistakes"})}),jsxRuntimeExports.jsx("hr",{className:"w-full border-zinc-300 dark:border-zinc-800 my-4"}),jsxRuntimeExports.jsxs("div",{className:"flex gap-4",children:[jsxRuntimeExports.jsx("div",{className:"text-left mb-6",children:jsxRuntimeExports.jsx("p",{className:"text-base text-zinc-700 dark:text-zinc-300",children:"Having trouble implementing these changes? Our support team is here to help guide you through the optimization process."})}),jsxRuntimeExports.jsxs(AppButton,{onClick:()=>{window.open("https://rapidload.zendesk.com/hc/en-us/requests/new","_blank")},rel:"noopener noreferrer",className:"flex items-center gap-2 bg-brand-600 hover:bg-brand-700 text-white whitespace-nowrap dark:bg-brand-800",children:[jsxRuntimeExports.jsx(Headset,{className:"w-4 h-4"}),"Contact Support"]})]})]})]})})})})})};var define_import_meta_env_default$1={BASE_URL: window.rapidload_optimizer.page_optimizer_package_base+"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const DiagnosticSchema=z.object({AnalysisTitle:z.string().optional(),AnalysisSummary:z.string(),CriticalIssues:z.array(z.object({issue:z.string(),description:z.string(),solutions:z.object({solutions_reasoning:z.array(z.object({block_type:z.enum(["observation","analysis","hypothesis","validation","conclusion"]),thought:z.string(),reasoning:z.string(),confidence_level:z.number().min(0).max(100),supporting_evidence:z.array(z.string()),related_blocks:z.array(z.string()).optional()})),solutions_list:z.array(z.object({type:z.enum(["rapidload_fix","wordpress_fix","theme_fix","another_plugin_fix","code_fix","server_config_fix","server_upgrade_fix"]),title:z.string(),description:z.string(),steps:z.array(z.object({step:z.number(),action:z.string(),details:z.string(),verification:z.string().optional()}))}))}),resources:z.array(z.object({name:z.string(),url:z.string(),type:z.enum(["javascript","css","image","html","other"]),relatedAudit:z.string().optional().describe("Related audit from PageSpeed Insights."),reason:z.string().optional().describe("Reason why this resource is related to the issue.")})).optional(),pagespeed_insight_audits:z.array(z.string()),pagespeed_insight_metrics:z.array(z.string()),anyAdditionalTips:z.array(z.string()).optional().describe("Any additional tips to fix the issue.")}))}),AIBaseURL=window.rapidload_optimizer.ai_root||"https://ai.rapidload.io/api",Optimizations=({})=>{var Re,fe,ve,_e,Ie;const{settings:s,data:a,activeReport:i,diagnosticResults:o,diagnosticProgress:E,loading:j,error:R}=useSelector(optimizerData),[C,S]=reactExports.useState(!1),[_,T]=reactExports.useState(null),[P,N]=reactExports.useState(!1),[I,M]=reactExports.useState(0),[D,B]=reactExports.useState(!1),[F,O]=reactExports.useState({isFlushingProgress:0,settingsProgress:0,pageSpeedProgress:0,serverInfoProgress:0,diagnosticsProgress:0,currentStep:0}),{headerUrl:L,diagnosticLoading:$}=useCommonDispatch(),[V,G]=reactExports.useState(0),[K,J]=reactExports.useState(null),[ne,le]=reactExports.useState(null),[ue,ce]=reactExports.useState(null),[pe,xe]=reactExports.useState(!1);reactExports.useRef(null);const[oe,Y]=reactExports.useState(!1),[ae,H]=reactExports.useState(null),[W,U]=reactExports.useState(null),{options:ie}=useAppContext();reactExports.useEffect(()=>{localStorage.getItem("rapidload_privacy_policy")==="true"&&Y(!0)},[oe]);const me=ke=>{O(Le=>({...Le,...ke}))},ee=reactExports.useMemo(()=>a!=null&&a.grouped?[...a.grouped.opportunities||[],...a.grouped.diagnostics||[]]:[],[a==null?void 0:a.grouped]),{object:ye,submit:Ce,isLoading:Ae}=experimental_useObject({api:`${AIBaseURL}/diagnosis`,schema:DiagnosticSchema,headers:{Authorization:`Bearer ${isDev?define_import_meta_env_default$1.VITE_KEY:ie.license_key}`},onFinish:ke=>{Te(),toast({title:"AI Diagnostic Complete",description:"AI analysis of your page has been completed successfully."})}}),{dispatch:De}=useCommonDispatch(),Ze=ie==null?void 0:ie.optimizer_url,[Ue,Se]=reactExports.useState(!1),ze=[{duration:"15s",label:"Flush Cache",progress:F.isFlushingProgress},{duration:"5s",label:"Optimizations",progress:F.settingsProgress},{duration:"10s",label:"Server Info",progress:F.serverInfoProgress},{duration:"40s",label:"New Page Speed",progress:F.pageSpeedProgress},{duration:"10s",label:"Page Diagnostics",progress:F.diagnosticsProgress}],Me=ke=>{G(ke)};reactExports.useEffect(()=>{ye!=null&&ye.AnalysisSummary&&ye.AnalysisSummary.length&&H(ye)},[ye]),reactExports.useEffect(()=>{U(o)},[o]);const Te=()=>{S(!0),me({diagnosticsProgress:100}),be(),N(!1),xe(!1)},be=()=>{M(0),me({settingsProgress:0}),me({serverInfoProgress:0}),me({pageSpeedProgress:0}),me({diagnosticsProgress:0}),me({isFlushingProgress:0}),N(!1),xe(!1),T(null),De(setCommonState("diagnosticLoading",!1))};reactExports.useEffect(()=>{Oe()},[C]);const Oe=()=>{if(!ae||!C)return;const ke={...ae,timeStamp:Date.now()};try{De(updateDiagnosticResults(ie,L||Ze,ke))}catch(Le){console.error("Error on updating Diagnostic Results:",Le)}},Ge=ke=>jsxRuntimeExports.jsx("div",{className:"flex gap-8 items-center mt-8",children:jsxRuntimeExports.jsxs("div",{className:"border-2 border-red-500 rounded-xl flex items-start gap-4 p-4",children:[jsxRuntimeExports.jsx("div",{className:"p-2 bg-red-200/30 rounded-lg",children:jsxRuntimeExports.jsx(ForwardRef$s,{className:"w-10 h-10 text-red-500"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-1",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-md ",children:"Oops! Something went wrong"}),jsxRuntimeExports.jsx("span",{className:"text-sm text-brand-700 dark:text-brand-300",children:"Run Diagnostics Test Again"}),jsxRuntimeExports.jsxs("div",{className:"text-sm text-brand-500 dark:text-brand-200 border-t mt-2 pt-2 max-w-[350px]",children:[jsxRuntimeExports.jsx("span",{className:"font-medium text-brand-800 dark:text-brand-400",children:"Details:"})," ",ke]})]})]})}),We=reactExports.useCallback(async ke=>{var at,ct;T("Collecting active plugins...");const Le=new ApiService(ie);let et,nt;try{et=await Le.getActivePlugins(),nt=await Le.post("rapidload_server_info")}catch(Be){ce((Be==null?void 0:Be.message)||"Failed to fetch plugins or server info");return}const ft=Object.entries(ke).map(([Be,tt])=>tt),mt={settings:s.map(({status:Be,...tt})=>{var ht;return{...tt,enabled:((ht=tt.inputs[0])==null?void 0:ht.value)||!1}}),plugins:et.data,report:{url:ie==null?void 0:ie.optimizer_url,performance:a==null?void 0:a.performance,metrics:a==null?void 0:a.metrics.map(Be=>({metric:Be.refs.acronym,displayValue:Be.displayValue,score:Be.score})),opportunities:(at=a==null?void 0:a.grouped)==null?void 0:at.opportunities.map(Be=>({name:Be.name,score:Be.score,metrics:Be.metrics.map(tt=>tt.refs.acronym),settings:Be.settings.map(tt=>tt.name),files:Be.files.items.map(tt=>tt==null?void 0:tt.url)})),diagnostics:(ct=a==null?void 0:a.grouped)==null?void 0:ct.diagnostics.map(Be=>({name:Be.name,score:Be.score,metrics:Be.metrics.map(tt=>tt.refs.acronym),settings:Be.settings.map(tt=>tt.name)}))},plugin_diagnostics:s.map(Be=>{var tt;return{name:Be.name,settings_diagnostics:Be.status,real_user_diagnostics:ft.find(ht=>ht.name===Be.name),value:Be.name==="Cache Policy"?"one_time_action":((tt=Be.inputs[0])==null?void 0:tt.value)||!1}}).filter(Be=>Be.settings_diagnostics||Be.real_user_diagnostics),server_details:nt.data?{...nt.data,headers:{...nt.data.headers,"x-cache-handler":void 0,"x-cache-status":void 0,server:void 0}}:null};T("Rapidload AI is analyzing your page..."),xe(!0);try{Ce(mt),me({diagnosticsProgress:95})}catch(Be){De(setCommonState("diagnosticLoading",!1)),N(!1),T(null),ce((Be==null?void 0:Be.message)||"Failed to complete AI analysis. Please try again."),toast({title:"AI Diagnostic Failed",description:(Be==null?void 0:Be.message)||"Failed to complete AI analysis. Please try again."}),T(`❌ ${(Be==null?void 0:Be.message)||"Failed to complete AI analysis. Please try again."}`)}},[_,K,s]);reactExports.useEffect(()=>{const ke=Le=>{Le.data.type==="RAPIDLOAD_CHECK_RESULTS"?(T("Collected data from your page..."),We(Le.data.data)):Le.data.type==="RAPIDLOAD_DIAGNOSTIC_PAGE_LOAD_ERROR"&&ce(Le.data.data)};return window.addEventListener("message",ke),()=>{window.removeEventListener("message",ke)}},[s]);const $e=async()=>{try{me({diagnosticsProgress:25}),C?(S(!1),Se(!1),T("Refreshing diagnostics..."),await new Promise(ke=>setTimeout(ke,200)),Se(!0)):(T("Collecting Diagnostics from your page..."),Se(!0)),me({diagnosticsProgress:50})}catch(ke){me({diagnosticsProgress:0}),ce((ke==null?void 0:ke.message)||"Failed to run diagnostics")}},qe=async ke=>{const Le={mobile:"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36",desktop:"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"},et=new ApiService(ie);compareVersions(ie==null?void 0:ie.rapidload_version,"2.2.11")>0?await et.post("preload_page",{url:ke,user_agent:i==="mobile"?Le.mobile:Le.desktop,nonce:ie.nonce,job_id:a==null?void 0:a.job_id}):await et.rest().request("/ping",{url:ke,user_agent:i==="mobile"?Le.mobile:Le.desktop,nonce:ie==null?void 0:ie.nonce,job_id:a==null?void 0:a.job_id})},Qe=async()=>{const ke=new ApiService(ie),Le=Ze+"?rapidload_preview";try{me({isFlushingProgress:10}),await ke.post("clear_page_cache",{url:Ze}),me({isFlushingProgress:60}),await qe(Le),me({isFlushingProgress:100}),M(1),st()}catch(et){me({isFlushingProgress:0}),ce(et.message||"Failed to clear page cache")}},Je=(ke,Le,et)=>{Le>=et||setTimeout(()=>{me({[ke]:Le+5}),Je(ke,Le+5,et)},100)},st=async()=>{try{await Promise.all([(async()=>{try{Je("settingsProgress",25,90),await De(fetchSettings(ie,L||ie.optimizer_url,!0)),me({settingsProgress:100})}catch(ke){throw ce((ke==null?void 0:ke.message)||"Failed to run settings"),ke}})(),(async()=>{try{Je("serverInfoProgress",25,90);const Le=await new ApiService(ie).post("rapidload_server_info");J(Le),me({serverInfoProgress:100})}catch(ke){throw ce((ke==null?void 0:ke.message)||"Failed to run server info"),ke}})(),(async()=>{try{Je("pageSpeedProgress",25,90),await De(fetchReport(ie,L||ie.optimizer_url,!0)),me({pageSpeedProgress:100})}catch(ke){throw me({pageSpeedProgress:0}),ce((ke==null?void 0:ke.message)||"Failed to run page speed"),ke}})()]),setTimeout(async()=>{M(4),$e()},1e3)}catch(ke){ce((ke==null?void 0:ke.message)||"One or more steps failed to complete")}};reactExports.useEffect(()=>{R&&ce(R)},[R]);const rt=ke=>{ce("Failed to load preview page. Please check if the page is accessible.")},Ke=()=>{};return reactExports.useEffect(()=>{ue!=null&&ue.length&&(F.pageSpeedProgress===100||F.pageSpeedProgress===0||F.isFlushingProgress===0)&&be()},[ue,F.pageSpeedProgress,F.isFlushingProgress]),jsxRuntimeExports.jsx(AnimatePresence,{children:jsxRuntimeExports.jsxs(m$3.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.05},className:"dark:bg-brand-900 bg-[#F0F0F1]",children:[jsxRuntimeExports.jsxs("div",{className:cn("px-6 py-6 bg-white z-50 relative",P&&!pe?"rounded-t-3xl dark:bg-brand-800":"rounded-3xl dark:bg-brand-800"),children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-4 w-full items-start",children:[jsxRuntimeExports.jsx("div",{className:"flex justify-start items-center gap-2 w-10",children:jsxRuntimeExports.jsx(AnimatedLogo,{size:"lg",isPlaying:P,animationType:pe?"path":"moving"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-1 flex-grow",children:[jsxRuntimeExports.jsx("span",{className:"text-base font-normal text-zinc-900 dark:text-zinc-100",children:P?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[I===0&&"Clearing all cached data to ensure fresh analysis...",I===1&&"Gathering current optimization settings...",I===2&&"Analyzing server configuration and performance...",I===3&&"Running comprehensive PageSpeed diagnostics...",I===4&&(_||"Processing data through AI for insights...")]}):"Do you need any AI assistance?"}),jsxRuntimeExports.jsx("span",{className:"font-normal text-sm text-zinc-600 dark:text-brand-300 max-w-[600px]",children:P&&!((Re=ye==null?void 0:ye.AnalysisSummary)!=null&&Re.length)?V===0?"It's taking a bit longer than expected, hang tight...":`Looks like I'll need to wait ${V}s more...`:ye!=null&&ye.AnalysisSummary?ye.AnalysisSummary:"Let's check if your optimizations are working properly. Things might not update right away due to caching or conflicts. We should test everything to make sure it's running well."})]}),!P&&jsxRuntimeExports.jsxs(Dialog,{open:D,onOpenChange:B,children:[jsxRuntimeExports.jsx(DialogTrigger,{asChild:!0,children:jsxRuntimeExports.jsx(TooltipText,{text:j?"Please wait while applying optimizations":null,children:jsxRuntimeExports.jsx("div",{className:cn("flex justify-end items-center mt-2"),children:jsxRuntimeExports.jsx(AppButton,{disabled:P,className:cn("rounded-xl px-8 py-6 whitespace-nowrap dark:bg-brand-950 dark:hover:bg-brand-900 dark:text-brand-300",j&&"cursor-not-allowed opacity-60 pointer-events-none"),onClick:()=>{if(!oe){B(!0);return}ce(null),De(setCommonState("diagnosticLoading",!0)),N(!0),Qe(),H(null)},children:(fe=ae==null?void 0:ae.AnalysisSummary)!=null&&fe.length?"Run Diagnostics Test Again":"Run Diagnostics Test "})})})}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[650px]",children:[jsxRuntimeExports.jsx(DialogHeader,{className:"border-b px-6 py-4 mt-1",children:jsxRuntimeExports.jsx(DialogTitle,{children:"To Work Best, RapidLoad Needs These Insights"})}),jsxRuntimeExports.jsxs("div",{className:"py-2 px-6",children:[jsxRuntimeExports.jsx("div",{className:"flex text-sm",children:jsxRuntimeExports.jsx("span",{children:"To provide the best AI-driven performance optimization, RapidLoad requires certain website details. By sharing this data, our AI can analyze and enhance your page speed more effectively."})}),jsxRuntimeExports.jsxs(Collapsible,{className:"w-full mt-2",children:[jsxRuntimeExports.jsxs(CollapsibleTrigger,{className:"flex text-sm w-full items-center justify-between py-2 font-medium hover:underline",children:[jsxRuntimeExports.jsx("span",{children:"What data do we collect and send?"}),jsxRuntimeExports.jsx(ChevronDown,{className:"h-4 w-4 transition-transform duration-200"})]}),jsxRuntimeExports.jsx(CollapsibleContent,{className:"text-sm text-muted-foreground",children:jsxRuntimeExports.jsxs("ul",{className:"list-disc pl-4 space-y-2 py-2",children:[jsxRuntimeExports.jsx("li",{children:"Active plugin list"}),jsxRuntimeExports.jsx("li",{children:"Page Speed Report"}),jsxRuntimeExports.jsx("li",{children:"Server type details"}),jsxRuntimeExports.jsx("li",{children:"RapidLoad Settings information"})]})})]}),jsxRuntimeExports.jsx("div",{className:"mt-2 text-sm",children:jsxRuntimeExports.jsxs("p",{className:"mt-2",children:[jsxRuntimeExports.jsx(Lock,{className:"w-4 h-4 inline-block text-green-700 mr-0.5 -mt-0.5"})," ",jsxRuntimeExports.jsx("span",{className:"font-medium",children:"Privacy First:"}),"  We never collect or store personal data, credentials, or sensitive information. Your privacy remains our top priority."]})}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 font-medium text-base w-full justify-between mt-6 items-center",children:[jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2",children:[jsxRuntimeExports.jsx(Button,{onClick:()=>{oe||(localStorage.setItem("rapidload_privacy_policy","true"),B(!1),ce(null),De(setCommonState("diagnosticLoading",!0)),N(!0),Qe())},children:"Opt-in & Improve"}),jsxRuntimeExports.jsx(Button,{variant:"outline",onClick:()=>{oe&&(localStorage.setItem("rapidload_privacy_policy","false"),B(!1))},children:"Cancel"})]})]})]}),jsxRuntimeExports.jsx(DialogDescription,{})]})]})]}),(ue==null?void 0:ue.length)&&(F.pageSpeedProgress===100||F.pageSpeedProgress===0||F.isFlushingProgress===0)&&Ge(ue),Ue&&jsxRuntimeExports.jsx("div",{className:"h-0 overflow-hidden",children:jsxRuntimeExports.jsxs("div",{className:"relative w-full rounded-xl overflow-hidden bg-white shadow-lg",children:[jsxRuntimeExports.jsx("div",{className:"absolute top-4 right-4 z-10",children:jsxRuntimeExports.jsx("button",{onClick:()=>Se(!1),className:"p-2 bg-white rounded-full shadow-md hover:bg-gray-100 transition-colors",children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})}),jsxRuntimeExports.jsx("iframe",{src:Ue?`${Ze}/?rapidload_preview`:"",className:"w-full h-[600px] border-0",title:"Optimization Test",onError:rt,onLoad:Ke})]})})]}),jsxRuntimeExports.jsx(m$3.div,{initial:{y:-50,opacity:0,height:0},animate:{y:P&&!pe?0:-50,opacity:P&&!pe?1:0,height:P&&!pe?"auto":0},transition:{type:"spring",duration:.5,bounce:.2},className:"bg-white rounded-b-3xl border-t border-zinc-200 dark:border-zinc-800 overflow-hidden",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-4 p-6 dark:bg-brand-950 dark:text-brand-300",children:jsxRuntimeExports.jsx(ProgressTracker,{steps:ze,currentStep:I,onTimeUpdate:Me})})}),((ve=ae==null?void 0:ae.AnalysisSummary)==null?void 0:ve.length)&&jsxRuntimeExports.jsx(AnalysisResults,{object:ae,relatedAudits:ee,input:ne,loading:!C&&pe}),((_e=W==null?void 0:W.AnalysisSummary)==null?void 0:_e.length)&&!((Ie=ae==null?void 0:ae.AnalysisSummary)!=null&&Ie.length)&&jsxRuntimeExports.jsxs("div",{className:W.timeStamp?"mt-6":"mt-0",children:[W.timeStamp&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"border-t border-zinc-300 dark:border-zinc-800"}),jsxRuntimeExports.jsxs("div",{className:"text-xs font-normal text-brand-450 dark:text-brand-300 mt-4",children:["Last Diagnostics ",jsxRuntimeExports.jsx(TimeAgo,{timestamp:W.timeStamp})]})]}),jsxRuntimeExports.jsx(AnalysisResults,{object:W,relatedAudits:ee,input:ne})]})]})})},ScaleUp=({children:s,uuid:a="random",className:i})=>{const o={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1}};return jsxRuntimeExports.jsx(m$3.div,{initial:"hidden",animate:"visible",exit:"hidden",variants:o,className:i,children:s},a)},tabs=[{key:"opportunities",name:"Opportunities",color:"border-orange-400",activeColor:"bg-orange-400"},{key:"diagnostics",name:"Diagnostics",color:"border-yellow-400 ",activeColor:"bg-yellow-400 "},{key:"passed_audits",name:"Passed Audits",color:"border-green-600",activeColor:"bg-green-600"}],PageSpeedInsights=({})=>{const{data:s,loading:a,reanalyze:i,settings:o,error:E}=useSelector(optimizerData),{dispatch:j,activeTab:R,openAudits:C,storePassedAudits:S,settingsMode:_}=useCommonDispatch(),[T,P]=reactExports.useState(!1);return reactExports.useEffect(()=>{j(setCommonState("activeTab","opportunities"))},[]),jsxRuntimeExports.jsx("div",{className:cn("tabs flex sticky -top-1 dark:bg-brand-800/40 bg-brand-200 px-4 py-4 pb-4 rounded-t-3xl border-b-2 border-brand-300 dark:border-brand-600/40"),children:jsxRuntimeExports.jsxs("div",{"data-tour":"audit-groups",className:cn("flex justify-between items-center select-none rounded-[20px] w-full",T&&"rounded-b-xl rounded-t-none shadow-lg"),children:[jsxRuntimeExports.jsx("div",{className:"flex",children:tabs.map(N=>jsxRuntimeExports.jsxs("div",{onClick:()=>j(setCommonState("activeTab",N.key)),className:cn("cursor-pointer flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-2xl",T&&"py-3",R===N.key?"font-medium bg-brand-0 dark:bg-brand-950":"dark:hover:text-brand-300"),children:[N.name,N.key!=="configurations"&&jsxRuntimeExports.jsx("div",{className:cn("flex  text-xxs items-center justify-center rounded-full w-6 h-6 border-2",T&&"w-5 h-5 border",a&&!i?"bg-zinc-200 border-zinc-300/30 text-zinc-300/30":cn(N.color,R===N.key&&N.activeColor)),children:jsxRuntimeExports.jsx("div",{className:cn(R===N.key&&" text-white dark:text-brand-900"),children:(s==null?void 0:s.grouped[`${N.key}`].length)||"-"})})]},N.key))}),jsxRuntimeExports.jsx("div",{className:"flex items-center",children:jsxRuntimeExports.jsx(AnimatePresence,{children:C.length>1&&jsxRuntimeExports.jsx(ScaleUp,{children:jsxRuntimeExports.jsx("div",{onClick:N=>j(setCommonState("openAudits",[])),className:"dark:hover:bg-brand-700 hover:bg-brand-100 w-9 h-9 rounded-full flex items-center justify-center",children:jsxRuntimeExports.jsx(TooltipText,{text:"Collpase all Audits",children:jsxRuntimeExports.jsx(FoldVertical,{className:"w-5 text-brand-500 dark:text-brand-200"})})})})})})]})})},welcomePopupKey="new-titan-prompt",Performance=()=>{const{data:s,loading:a,reanalyze:i,settings:o,error:E}=useSelector(optimizerData),{isDark:j}=useRootContext(),{dispatch:R,activeTab:C,openAudits:S,storePassedAudits:_,settingsMode:T,diagnosticLoading:P}=useCommonDispatch();reactExports.useState(!1);const N=reactExports.useRef(null),[I,M]=React8.useState(!1),[D,B]=reactExports.useState(!!localStorage.getItem(welcomePopupKey)),{options:F,setOpenAudits:O,mode:L,manipulatingStyles:$,savingData:V,togglePerformance:G,setTogglePerformance:K,version:J}=useAppContext(),ne=!["onboard","preview"].includes(L);reactExports.useEffect(()=>{setTimeout(()=>{ne&&!D&&(B(!0),M(!0))},1e3)},[]),reactExports.useState(!1);const le=ue=>{switch(ue){case"configurations":return 100;case"optimizations":return 480;case"opportunities":return 285;case"diagnostics":return 285;case"passed_audits":return 285;default:return 285}};return jsxRuntimeExports.jsxs("div",{"data-tour":"nav-bar",children:[jsxRuntimeExports.jsx("div",{ref:N,style:{height:"1px"}}),jsxRuntimeExports.jsxs("div",{className:cn("tabs flex sticky -top-1 dark:bg-brand-800 bg-brand-200 px-2 py-2 rounded-3xl gap-2 w-fit"),children:[jsxRuntimeExports.jsxs("div",{onClick:()=>R(setCommonState("activeTab","configurations")),className:cn("whitespace-nowrap border-r rounded-[20px] cursor-pointer w-[170px]  flex items-center gap-2 px-5 py-3 text-sm font-medium",C==="configurations"?"font-medium bg-brand-0 dark:bg-brand-950":"dark:hover:text-brand-300",P&&"cursor-not-allowed opacity-90 pointer-events-none"),"data-tour":"speed-settings",children:[" ",jsxRuntimeExports.jsx(ForwardRef$A,{className:"w-4 rounded-[15px]"}),"  Speed Settings"]}),jsxRuntimeExports.jsxs("div",{onClick:()=>R(setCommonState("activeTab","insights")),className:cn("whitespace-nowrap border-r rounded-[20px] cursor-pointer w-[200px]  flex items-center gap-2 px-5 py-3 text-sm font-medium",P&&"cursor-not-allowed opacity-90 pointer-events-none",C==="insights"||C==="opportunities"||C==="diagnostics"||C==="passed_audits"?"font-medium bg-brand-0 dark:bg-brand-950":"dark:hover:text-brand-300"),"data-tour":"page-speed-insights",children:[" ",jsxRuntimeExports.jsx(CircleGauge,{className:"w-4"}),"  Page Speed Insights "]}),jsxRuntimeExports.jsxs("div",{onClick:()=>R(setCommonState("activeTab","optimizations")),className:cn("whitespace-nowrap border-r rounded-[20px] cursor-pointer w-[160px]  flex items-center gap-2 px-5 py-3 text-sm font-medium",P&&"cursor-not-allowed opacity-90 pointer-events-none",C==="optimizations"?"font-medium bg-brand-0 dark:bg-brand-950":"dark:hover:text-brand-300"),"data-tour":"optimizations",children:[" ",jsxRuntimeExports.jsx(AIStarIcon,{cls:"w-4 dark:text-brand-300",isDark:j}),"  AI Diagnostic "]})]}),jsxRuntimeExports.jsx("div",{className:cn("flex"),children:jsxRuntimeExports.jsxs("div",{className:cn("py-3 relative scale-y-[-1] ml-6"),children:["      ",jsxRuntimeExports.jsx(SettingsLine,{width:le(C)||220,flip:!0})]})}),jsxRuntimeExports.jsx("div",{className:"audits flex mb-24 dark:bg-brand-800 bg-brand-200 rounded-3xl",children:jsxRuntimeExports.jsx("div",{className:"w-full flex flex-col",children:jsxRuntimeExports.jsxs(AnimatePresence,{initial:!1,children:[jsxRuntimeExports.jsx("div",{className:"grid grid-cols-12 gap-6 w-full relative ",children:jsxRuntimeExports.jsx("div",{className:"col-span-12 flex flex-col gap-2",children:C==="configurations"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(SpeedSettings,{})}):C==="optimizations"?jsxRuntimeExports.jsx(Optimizations,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(PageSpeedInsights,{}),jsxRuntimeExports.jsx("div",{className:" px-4 py-4 pt-0",children:jsxRuntimeExports.jsx(AuditList$1,{activeTab:C})})]})})},"performance"),jsxRuntimeExports.jsx("div",{children:C!=="configurations"&&C!=="optimizations"&&C!=="insights"&&(!(s!=null&&s.grouped[C])||(s==null?void 0:s.grouped[C].length)<=0)&&jsxRuntimeExports.jsxs(m$3.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"flex flex-col gap-8 items-center px-8 pt-40 w-full",children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("img",{alt:"Good Job!",className:"w-64",src:F!=null&&F.page_optimizer_base?(F==null?void 0:F.page_optimizer_base)+"/success.svg":"/success.svg"})}),jsxRuntimeExports.jsx("span",{className:"flex gap-2",children:"Brilliantly done! It's clear you've mastered this."})]})},"audit-blank"),jsxRuntimeExports.jsx("div",{})]})})})]})},TogglePerformance=()=>{const{togglePerformance:s,setTogglePerformance:a}=useAppContext();return jsxRuntimeExports.jsx(TooltipText,{text:"Toggle Sidebar",children:jsxRuntimeExports.jsx("span",{className:"cursor-pointer",onClick:()=>{a(i=>!i)},children:s?jsxRuntimeExports.jsx(ArrowLeftToLine,{className:"rotate-90 xl:rotate-0 h-4 w-4 text-gray-500"}):jsxRuntimeExports.jsx(ArrowRightToLine,{className:"rotate-90 xl:rotate-0 h-4 w-4 text-gray-500"})})})},SlideUp=({children:s,uuid:a})=>jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},children:s},a),Metrics=()=>{const{data:s,loading:a,error:i,activeReport:o}=useSelector(optimizerData),{activeMetric:E}=useCommonDispatch();usePerformanceColors(E==null?void 0:E.score);const{togglePerformance:j,options:R}=useAppContext(),C=reactExports.useMemo(()=>{var N,I;let P=[...((N=s==null?void 0:s.grouped)==null?void 0:N.opportunities)||[],...((I=s==null?void 0:s.grouped)==null?void 0:I.diagnostics)||[]];return(E==null?void 0:E.refs.acronym)==="SI"?P.filter(M=>M.scoreDisplayMode!=="informative"):P.filter(M=>M.metrics.find(D=>D.id===(E==null?void 0:E.id)))},[s,E]),S=reactExports.useMemo(()=>(E==null||E.refs.acronym,[E!=null&&E.potentialGain?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Potential gain ",jsxRuntimeExports.jsxs("span",{className:"text-brand-800 dark:text-brand-500 font-medium",children:[E==null?void 0:E.potentialGain.toFixed(0)," points"]})," "]}):null,jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Weighs ",jsxRuntimeExports.jsxs("span",{className:"text-brand-800 dark:text-brand-500 font-medium",children:[E==null?void 0:E.refs.weight,"%"]})," of your page speed score"]})]),[E,o]),_={TBT:{description:"Imagine you're reading a storybook and there's a sticker covering some words. TBT, or Total Blocking Time, is like the time you wait for someone to remove that sticker. In websites, it's the time you wait before you can play or interact with the site. The shorter the wait, the better! ",learn_more:"https://web.dev/tbt/"},LCP:{description:"Imagine you're waiting for a picture in your storybook to appear. LCP, or Largest Contentful Paint, is like the time it takes for the biggest and most important picture in the story to fully show up. On websites, it's how long you wait to see the main part of the page. The faster it appears, the better the website is at showing you its main content quickly!",learn_more:"https://web.dev/lcp/"},FCP:{description:"Imagine opening a storybook, eager for the first picture. FCP, or First Contentful Paint, is the time it takes for that first image or word to appear. On websites, it's about how swiftly the starting content loads. The faster it appears, the sooner the website's story begins for you!",learn_more:"https://web.dev/fcp/"},SI:{description:"Imagine cookies baking. SI, or Speed Index, measures how fast most cookies are ready. On websites, it's how quickly main content appears. Faster cookies (or content) mean a better experience!",learn_more:"https://web.dev/si/"},CLS:{description:"While building a puzzle, imagine pieces suddenly shifting on their own. Confusing, right? CLS, or Cumulative Layout Shift, is like that for websites. It's when page elements move unexpectedly. The less they shift, the better the experience!",learn_more:"https://web.dev/cls/"}},T={mobile:{LCP:{good:2500,poor:4e3},FID:{good:100,poor:300},CLS:{good:.1,poor:.25},FCP:{good:1800,poor:3e3},SI:{good:3400,poor:5800},TBT:{good:300,poor:600}},desktop:{LCP:{good:2e3,poor:4e3},FID:{good:100,poor:300},CLS:{good:.1,poor:.25},FCP:{good:1e3,poor:3e3},SI:{good:1300,poor:2500},TBT:{good:200,poor:600}}};return E?jsxRuntimeExports.jsxs(SlideUp,{uuid:E!=null&&E.id?E.id:"no-key",children:[jsxRuntimeExports.jsx("div",{className:"ml-6",children:!j&&jsxRuntimeExports.jsx(TogglePerformance,{})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 lg:mt-16 ml-6",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3 border-b pb-6",children:[jsxRuntimeExports.jsxs("div",{className:"text-4xl font-medium",children:[" ",E==null?void 0:E.title]}),jsxRuntimeExports.jsxs("div",{className:"dark:text-brand-300 text-brand-600 text-md ",children:[jsxRuntimeExports.jsx("span",{children:_[E.refs.acronym].description})," ",jsxRuntimeExports.jsx("a",{target:"_blank",className:"text-purple-750",href:_[E==null?void 0:E.refs.acronym].learn_more,children:"Learn more"})]}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("ul",{className:"flex ml-2 items-center text-sm gap-3 text-brand-500 dark:text-brand-400",children:[jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx(Circle,{style:{fill:usePerformanceColors(E==null?void 0:E.score)[1]},className:"w-3 stroke-none mt-[1px] dark:fill-brand-700"})," ",jsxRuntimeExports.jsxs("span",{children:[(E==null?void 0:E.icon)==="pass"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Great! You kept it below ",jsxRuntimeExports.jsxs("span",{className:"text-brand-800 dark:text-brand-500 font-medium",children:[T[o][E==null?void 0:E.refs.acronym].good,E.refs.acronym!=="CLS"&&"ms"]})]}),((E==null?void 0:E.icon)==="fail"||(E==null?void 0:E.icon)==="average")&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:["Should be below ",jsxRuntimeExports.jsxs("span",{className:"text-brand-800 dark:text-brand-500 font-medium",children:[T[o][E==null?void 0:E.refs.acronym].good,E.refs.acronym!=="CLS"&&"ms"]})]})]})]}),S.map((P,N)=>P&&jsxRuntimeExports.jsxs("li",{className:"group flex gap-1.5 items-center",children:[jsxRuntimeExports.jsx(Circle,{className:"w-3 stroke-none mt-[1px] group-last:fill-brand-300 fill-green-600 :fill-brand-300 dark:fill-green-700"})," ",jsxRuntimeExports.jsx("span",{children:P})]},N))]})})]}),C.length>0?jsxRuntimeExports.jsxs("div",{className:"flex gap-4 flex-col w-full",children:[jsxRuntimeExports.jsx("div",{className:"borderx-b px-4 w-full font-medium text-lg",children:"Related Audits"}),jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-4",children:C.map((P,N)=>jsxRuntimeExports.jsx("div",{className:"relative",children:jsxRuntimeExports.jsx(Audit$1,{metrics:!1,index:N,audit:P})},N))})]}):jsxRuntimeExports.jsxs(m$3.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},className:"flex flex-col gap-8 items-center px-8 pt-40 w-full",children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx("img",{alt:"Good Job!",className:"w-64",src:R!=null&&R.page_optimizer_base?(R==null?void 0:R.page_optimizer_base)+"/success.svg":"/success.svg"})}),jsxRuntimeExports.jsx("span",{className:"flex gap-2",children:"Brilliantly done! It's clear you've mastered this."})]})]})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},SpeedIndex=React8.memo(Metrics);function PageOptimizer(){const{data:s,loading:a,error:i,testMode:o}=useSelector(optimizerData);usePerformanceColors(s==null?void 0:s.performance);const{dispatch:E,activeMetric:j,testModeStatus:R}=useCommonDispatch(),{options:C,savingData:S,togglePerformance:_,optimizerContainer:T,invalidatingCache:P}=useAppContext();return C==null||C.optimizer_url,reactExports.useEffect(()=>{if(S){const N=document.getElementById("rapidload-page-optimizer-content");N==null||N.scrollTo(0,0)}},[S]),jsxRuntimeExports.jsxs(m$3.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"linear",duration:.04},id:"rapidload-page-optimizer-wrapper",translate:"no",className:cn("font-sans flex min-h-screen flex-col text-base items-center ","dark:text-brand-300 text-brand-800","notranslate"),children:[jsxRuntimeExports.jsx("div",{id:"rapidload-page-optimizer-content",className:cn("overflow-y-auto w-full h-fit pb-20 ","min-h-screen",S&&"relative overflow-hidden"),children:jsxRuntimeExports.jsxs("section",{ref:T,className:cn("relative container grid grid-cols-none lg:grid-cols-12 lg:grid-rows-none  gap-5 pt-[10px] mt-2"),children:[(S||P)&&jsxRuntimeExports.jsx("div",{className:"fixed inset-0 flex justify-center items-center z-[110000] bg-brand-50/80 dark:bg-brand-950/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",children:jsxRuntimeExports.jsxs("div",{className:"fixed top-1/2 flex gap-2 items-center justify-center",children:[jsxRuntimeExports.jsx(Loader,{className:"w-5 animate-spin"}),S&&"Saving Changes...",P&&"Flushing Cache..."]})}),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[_&&jsxRuntimeExports.jsx("aside",{className:"col-span-12 lg:col-span-3",children:jsxRuntimeExports.jsx("div",{className:"widgets pt-0.5 flex",children:jsxRuntimeExports.jsx(PageSpeedScore$1,{})})}),jsxRuntimeExports.jsx("article",{className:cn(_?"col-span-12 lg:col-span-9":"col-span-12"),children:jsxRuntimeExports.jsx(AnimatePresence,{initial:!0,mode:"wait",children:j?jsxRuntimeExports.jsx(SpeedIndex,{}):jsxRuntimeExports.jsx(SlideUp,{uuid:"perf",children:jsxRuntimeExports.jsx(Performance,{})})})})]})]})}),jsxRuntimeExports.jsx(Toaster,{})]})}var bugsnag={exports:{}};(function(s,a){(function(i){s.exports=i()})(function(){var i=["navigation","request","process","log","user","state","error","manual"],o=function(Z,Q,se){for(var te=se,de=0,he=Z.length;de<he;de++)te=Q(te,Z[de],de,Z);return te},E=function(Z,Q){return o(Z,function(se,te,de,he){return Q(te,de,he)?se.concat(te):se},[])},j=function(Z,Q){return o(Z,function(se,te,de,he){return se===!0||te===Q},!1)},R=function(Z){return Object.prototype.toString.call(Z)==="[object Array]"},C=!{toString:null}.propertyIsEnumerable("toString"),S=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=function(Z){var Q=[],se;for(se in Z)Object.prototype.hasOwnProperty.call(Z,se)&&Q.push(se);if(!C)return Q;for(var te=0,de=S.length;te<de;te++)Object.prototype.hasOwnProperty.call(Z,S[te])&&Q.push(S[te]);return Q},T=function(Z,Q){return Z===void 0&&(Z=1),function(se){return typeof se=="number"&&parseInt(""+se,10)===se&&se>=Z&&se<=Q}},P=function(Z){return typeof Z=="function"||R(Z)&&E(Z,function(Q){return typeof Q=="function"}).length===Z.length},N=function(Z){return typeof Z=="string"&&!!Z.length},I={},M=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};I.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:N},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(Z){return Z===void 0||N(Z)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(Z){return Z===void 0||N(Z)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(Z){return Z===!0||Z===!1}},enabledErrorTypes:{defaultValue:function(){return M()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(Z){if(typeof Z!="object"||!Z)return!1;var Q=_(Z),se=_(M());return!(E(Q,function(te){return j(se,te)}).length<Q.length||E(_(Z),function(te){return typeof Z[te]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:P},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:P},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:P},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(Z){return Z&&typeof Z=="object"&&N(Z.notify)&&N(Z.sessions)&&E(_(Z),function(Q){return!j(["notify","sessions"],Q)}).length===0}},autoTrackSessions:{defaultValue:function(Z){return!0},message:"should be true|false",validate:function(Z){return Z===!0||Z===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(Z){return Z===null||R(Z)&&E(Z,function(Q){return typeof Q=="string"}).length===Z.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(Z){return typeof Z=="string"&&Z.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(Z){return T(0,100)(Z)}},enabledBreadcrumbTypes:{defaultValue:function(){return i},message:"should be null or a list of available breadcrumb types ("+i.join(",")+")",validate:function(Z){return Z===null||R(Z)&&o(Z,function(Q,se){return Q===!1?Q:j(i,se)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(Z){return Z===void 0||typeof Z=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(Z){return Z===null||Z&&o(_(Z),function(Q,se){return Q&&j(["id","email","name"],se)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(Z){return typeof Z=="object"&&Z!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(Z){return!Z||Z&&o(["debug","info","warn","error"],function(Q,se){return Q&&typeof Z[se]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(Z){return R(Z)&&Z.length===E(Z,function(Q){return typeof Q=="string"||Q&&typeof Q.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(Z){return R(Z)&&Z.length===E(Z,function(Q){return Q&&typeof Q=="object"&&typeof Q.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(Z){return R(Z)&&Z.length===E(Z,function(Q){return Q&&typeof Q=="object"&&typeof Q.name=="string"}).length}}};var D=function(Z){for(var Q=1;Q<arguments.length;Q++){var se=arguments[Q];for(var te in se)Object.prototype.hasOwnProperty.call(se,te)&&(Z[te]=se[te])}return Z},B=function(Z,Q){return o(Z,function(se,te,de,he){return se.concat(Q(te,de,he))},[])};function F(){return F=Object.assign?Object.assign.bind():function(Z){for(var Q=1;Q<arguments.length;Q++){var se=arguments[Q];for(var te in se)Object.prototype.hasOwnProperty.call(se,te)&&(Z[te]=se[te])}return Z},F.apply(this,arguments)}var O=I.schema,L={releaseStage:D({},O.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:F({},O.appType,{defaultValue:function(){return"browser"}}),logger:D({},O.logger,{defaultValue:function(){return typeof console<"u"&&typeof console.debug=="function"?$():void 0}})},$=function(){var Z={},Q=console.log;return B(["debug","info","warn","error"],function(se){var te=console[se];Z[se]=typeof te=="function"?te.bind(console,"[bugsnag]"):Q.bind(console,"[bugsnag]")}),Z},V=function(){function Z(se,te,de,he){he===void 0&&(he=new Date),this.type=de,this.message=se,this.metadata=te,this.timestamp=he}var Q=Z.prototype;return Q.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},Z}(),G=V,K={};(function(Z,Q){typeof K=="object"?K=Q():Z.StackFrame=Q()})(this,function(){function Z(we){return!isNaN(parseFloat(we))&&isFinite(we)}function Q(we){return we.charAt(0).toUpperCase()+we.substring(1)}function se(we){return function(){return this[we]}}var te=["isConstructor","isEval","isNative","isToplevel"],de=["columnNumber","lineNumber"],he=["fileName","functionName","source"],ge=["args"],je=te.concat(de,he,ge);function Ee(we){if(we instanceof Object)for(var He=0;He<je.length;He++)we.hasOwnProperty(je[He])&&we[je[He]]!==void 0&&this["set"+Q(je[He])](we[je[He]])}Ee.prototype={getArgs:function(){return this.args},setArgs:function(we){if(Object.prototype.toString.call(we)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=we},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(we){if(we instanceof Ee)this.evalOrigin=we;else if(we instanceof Object)this.evalOrigin=new Ee(we);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var we=this.getFunctionName()||"{anonymous}",He="("+(this.getArgs()||[]).join(",")+")",Xe=this.getFileName()?"@"+this.getFileName():"",it=Z(this.getLineNumber())?":"+this.getLineNumber():"",Ve=Z(this.getColumnNumber())?":"+this.getColumnNumber():"";return we+He+Xe+it+Ve}};for(var Ne=0;Ne<te.length;Ne++)Ee.prototype["get"+Q(te[Ne])]=se(te[Ne]),Ee.prototype["set"+Q(te[Ne])]=function(we){return function(He){this[we]=!!He}}(te[Ne]);for(var Pe=0;Pe<de.length;Pe++)Ee.prototype["get"+Q(de[Pe])]=se(de[Pe]),Ee.prototype["set"+Q(de[Pe])]=function(we){return function(He){if(!Z(He))throw new TypeError(we+" must be a Number");this[we]=Number(He)}}(de[Pe]);for(var Fe=0;Fe<he.length;Fe++)Ee.prototype["get"+Q(he[Fe])]=se(he[Fe]),Ee.prototype["set"+Q(he[Fe])]=function(we){return function(He){this[we]=String(He)}}(he[Fe]);return Ee});var J={};(function(Z,Q){typeof J=="object"?J=Q(K):Z.ErrorStackParser=Q(Z.StackFrame)})(this,function(Q){var se=/(^|@)\S+\:\d+/,te=/^\s*at .*(\S+\:\d+|\(native\))/m,de=/^(eval@)?(\[native code\])?$/;return{parse:function(ge){if(typeof ge.stacktrace<"u"||typeof ge["opera#sourceloc"]<"u")return this.parseOpera(ge);if(ge.stack&&ge.stack.match(te))return this.parseV8OrIE(ge);if(ge.stack)return this.parseFFOrSafari(ge);throw new Error("Cannot parse given Error object")},extractLocation:function(ge){if(ge.indexOf(":")===-1)return[ge];var je=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/,Ee=je.exec(ge.replace(/[\(\)]/g,""));return[Ee[1],Ee[2]||void 0,Ee[3]||void 0]},parseV8OrIE:function(ge){var je=ge.stack.split(`
`).filter(function(Ee){return!!Ee.match(te)},this);return je.map(function(Ee){Ee.indexOf("(eval ")>-1&&(Ee=Ee.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var Ne=Ee.replace(/^\s+/,"").replace(/\(eval code/g,"("),Pe=Ne.match(/ (\((.+):(\d+):(\d+)\)$)/);Ne=Pe?Ne.replace(Pe[0],""):Ne;var Fe=Ne.split(/\s+/).slice(1),we=this.extractLocation(Pe?Pe[1]:Fe.pop()),He=Fe.join(" ")||void 0,Xe=["eval","<anonymous>"].indexOf(we[0])>-1?void 0:we[0];return new Q({functionName:He,fileName:Xe,lineNumber:we[1],columnNumber:we[2],source:Ee})},this)},parseFFOrSafari:function(ge){var je=ge.stack.split(`
`).filter(function(Ee){return!Ee.match(de)},this);return je.map(function(Ee){if(Ee.indexOf(" > eval")>-1&&(Ee=Ee.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),Ee.indexOf("@")===-1&&Ee.indexOf(":")===-1)return new Q({functionName:Ee});var Ne=/((.*".+"[^@]*)?[^@]*)(?:@)/,Pe=Ee.match(Ne),Fe=Pe&&Pe[1]?Pe[1]:void 0,we=this.extractLocation(Ee.replace(Ne,""));return new Q({functionName:Fe,fileName:we[0],lineNumber:we[1],columnNumber:we[2],source:Ee})},this)},parseOpera:function(ge){return!ge.stacktrace||ge.message.indexOf(`
`)>-1&&ge.message.split(`
`).length>ge.stacktrace.split(`
`).length?this.parseOpera9(ge):ge.stack?this.parseOpera11(ge):this.parseOpera10(ge)},parseOpera9:function(ge){for(var je=/Line (\d+).*script (?:in )?(\S+)/i,Ee=ge.message.split(`
`),Ne=[],Pe=2,Fe=Ee.length;Pe<Fe;Pe+=2){var we=je.exec(Ee[Pe]);we&&Ne.push(new Q({fileName:we[2],lineNumber:we[1],source:Ee[Pe]}))}return Ne},parseOpera10:function(ge){for(var je=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,Ee=ge.stacktrace.split(`
`),Ne=[],Pe=0,Fe=Ee.length;Pe<Fe;Pe+=2){var we=je.exec(Ee[Pe]);we&&Ne.push(new Q({functionName:we[3]||void 0,fileName:we[2],lineNumber:we[1],source:Ee[Pe]}))}return Ne},parseOpera11:function(ge){var je=ge.stack.split(`
`).filter(function(Ee){return!!Ee.match(se)&&!Ee.match(/^Error created at/)},this);return je.map(function(Ee){var Ne=Ee.split("@"),Pe=this.extractLocation(Ne.pop()),Fe=Ne.shift()||"",we=Fe.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0,He;Fe.match(/\(([^\)]*)\)/)&&(He=Fe.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var Xe=He===void 0||He==="[arguments not available]"?void 0:He.split(",");return new Q({functionName:we,args:Xe,fileName:Pe[0],lineNumber:Pe[1],columnNumber:Pe[2],source:Ee})},this)}}});var ne=J,le=function(Z,Q,se,te){var de=te&&te.redactedKeys?te.redactedKeys:[],he=te&&te.redactedPaths?te.redactedPaths:[];return JSON.stringify(me(Z,de,he),Q,se)},ue=20,ce=25e3,pe=8,xe="...";function oe(Z){return Z instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(Z))}function Y(Z){return"[Throws: "+(Z?Z.message:"?")+"]"}function ae(Z,Q){for(var se=0,te=Z.length;se<te;se++)if(Z[se]===Q)return!0;return!1}function H(Z,Q){for(var se=0,te=Z.length;se<te;se++)if(Q.indexOf(Z[se])===0)return!0;return!1}function W(Z,Q){for(var se=0,te=Z.length;se<te;se++)if(typeof Z[se]=="string"&&Z[se].toLowerCase()===Q.toLowerCase()||Z[se]&&typeof Z[se].test=="function"&&Z[se].test(Q))return!0;return!1}function U(Z){return Object.prototype.toString.call(Z)==="[object Array]"}function ie(Z,Q){try{return Z[Q]}catch(se){return Y(se)}}function me(Z,Q,se){var te=[],de=0;function he(ge,je){function Ee(){return je.length>pe&&de>ce}if(de++,je.length>ue||Ee())return xe;if(ge===null||typeof ge!="object")return ge;if(ae(te,ge))return"[Circular]";if(te.push(ge),typeof ge.toJSON=="function")try{de--;var Ne=he(ge.toJSON(),je);return te.pop(),Ne}catch(Ye){return Y(Ye)}var Pe=oe(ge);if(Pe){de--;var Fe=he({name:ge.name,message:ge.message},je);return te.pop(),Fe}if(U(ge)){for(var we=[],He=0,Xe=ge.length;He<Xe;He++){if(Ee()){we.push(xe);break}we.push(he(ge[He],je.concat("[]")))}return te.pop(),we}var it={};try{for(var Ve in ge)if(Object.prototype.hasOwnProperty.call(ge,Ve)){if(H(se,je.join("."))&&W(Q,Ve)){it[Ve]="[REDACTED]";continue}if(Ee()){it[Ve]=xe;break}it[Ve]=he(ie(ge,Ve),je.concat(Ve))}}catch{}return te.pop(),it}return he(Z,[])}function ee(Z,Q,se,te){if(typeof se=="string"){te===void 0?te=null:te!==null&&typeof te!="string"&&(te=le(te));var de=Q[se];if(typeof de=="number"){Z[de]={name:se,variant:te};return}Z.push({name:se,variant:te}),Q[se]=Z.length-1}}function ye(Z,Q,se){if(R(Q)){for(var te=0;te<Q.length;++te){var de=Q[te];de===null||typeof de!="object"||ee(Z,se,de.name,de.variant)}return Z}}function Ce(Z){return B(E(Z,Boolean),function(Q){var se=Q.name,te=Q.variant,de={featureFlag:se};return typeof te=="string"&&(de.variant=te),de})}function Ae(Z,Q,se){var te=Q[se];typeof te=="number"&&(Z[te]=null,delete Q[se])}var De={add:ee,clear:Ae,merge:ye,toEventApi:Ce},Ze=function(Z){return!!Z&&(!!Z.stack||!!Z.stacktrace||!!Z["opera#sourceloc"])&&typeof(Z.stack||Z.stacktrace||Z["opera#sourceloc"])=="string"&&Z.stack!==Z.name+": "+Z.message},Ue=Se;function Se(Z){switch(Object.prototype.toString.call(Z)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return Z instanceof Error}}var ze=Ue,Me=function(Z,Q,se,te){var de;if(Q){var he;if(se===null)return be(Z,Q);typeof se=="object"&&(he=se),typeof se=="string"&&(he=(de={},de[se]=te,de)),he&&(Q==="__proto__"||Q==="constructor"||Q==="prototype"||(Z[Q]||(Z[Q]={}),Z[Q]=D({},Z[Q],he)))}},Te=function(Z,Q,se){if(typeof Q=="string"){if(!se)return Z[Q];if(Z[Q])return Z[Q][se]}},be=function(Z,Q,se){if(typeof Q=="string"){if(!se){delete Z[Q];return}Q==="__proto__"||Q==="constructor"||Q==="prototype"||Z[Q]&&delete Z[Q][se]}},Oe={add:Me,get:Te,clear:be},Ge={};(function(Z,Q){typeof Ge=="object"?Ge=Q(K):Z.StackGenerator=Q(Z.StackFrame)})(this,function(Z){return{backtrace:function(se){var te=[],de=10;typeof se=="object"&&typeof se.maxStackSize=="number"&&(de=se.maxStackSize);for(var he=arguments.callee;he&&te.length<de&&he.arguments;){for(var ge=new Array(he.arguments.length),je=0;je<ge.length;++je)ge[je]=he.arguments[je];/function(?:\s+([\w$]+))+\s*\(/.test(he.toString())?te.push(new Z({functionName:RegExp.$1||void 0,args:ge})):te.push(new Z({args:ge}));try{he=he.caller}catch{break}}return te}}});function We(){return We=Object.assign?Object.assign.bind():function(Z){for(var Q=1;Q<arguments.length;Q++){var se=arguments[Q];for(var te in se)Object.prototype.hasOwnProperty.call(se,te)&&(Z[te]=se[te])}return Z},We.apply(this,arguments)}var $e=function(){function Z(se,te,de,he,ge){de===void 0&&(de=[]),he===void 0&&(he=Je()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=ge,this._handledState=he,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this.errors=[rt(se,te,Z.__type,de)]}var Q=Z.prototype;return Q.addMetadata=function(te,de,he){return Oe.add(this._metadata,te,de,he)},Q.setTraceCorrelation=function(te,de){typeof te=="string"&&(this._correlation=We({traceId:te},typeof de=="string"?{spanId:de}:{}))},Q.getMetadata=function(te,de){return Oe.get(this._metadata,te,de)},Q.clearMetadata=function(te,de){return Oe.clear(this._metadata,te,de)},Q.addFeatureFlag=function(te,de){de===void 0&&(de=null),De.add(this._features,this._featuresIndex,te,de)},Q.addFeatureFlags=function(te){De.merge(this._features,te,this._featuresIndex)},Q.getFeatureFlags=function(){return De.toEventApi(this._features)},Q.clearFeatureFlag=function(te){De.clear(this._features,this._featuresIndex,te)},Q.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},Q.getUser=function(){return this._user},Q.setUser=function(te,de,he){this._user={id:te,email:de,name:he}},Q.toJSON=function(){return{payloadVersion:"4",exceptions:B(this.errors,function(te){return D({},te,{message:te.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},Z}(),qe=function(Z){var Q={file:Z.fileName,method:Qe(Z.functionName),lineNumber:Z.lineNumber,columnNumber:Z.columnNumber,code:void 0,inProject:void 0};return Q.lineNumber>-1&&!Q.file&&!Q.method&&(Q.file="global code"),Q},Qe=function(Z){return/^global code$/i.test(Z)?"global code":Z},Je=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},st=function(Z){return typeof Z=="string"?Z:""};function rt(Z,Q,se,te){return{errorClass:st(Z),errorMessage:st(Q),type:se,stacktrace:o(te,function(de,he){var ge=qe(he);try{return JSON.stringify(ge)==="{}"?de:de.concat(ge)}catch{return de}},[])}}function Ke(Z){return Z.cause?[Z].concat(Ke(Z.cause)):[Z]}$e.getStacktrace=function(Z,Q,se){if(Ze(Z))return ne.parse(Z).slice(Q);try{return E(Ge.backtrace(),function(te){return(te.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+se)}catch{return[]}},$e.create=function(Z,Q,se,te,de,he){de===void 0&&(de=0);var ge=fe(Z,Q,te,he),je=ge[0],Ee=ge[1],Ne;try{var Pe=$e.getStacktrace(je,Ee>0?1+Ee+de:0,1+de);Ne=new $e(je.name,je.message,Pe,se,Z)}catch{Ne=new $e(je.name,je.message,[],se,Z)}if(je.name==="InvalidError"&&Ne.addMetadata(""+te,"non-error parameter",Re(Z)),je.cause){var Fe,we=Ke(je).slice(1),He=B(we,function(Xe){var it=ze(Xe)&&Ze(Xe)?ne.parse(Xe):[],Ve=fe(Xe,!0,"error cause"),Ye=Ve[0];return Ye.name==="InvalidError"&&Ne.addMetadata("error cause",Re(Xe)),rt(Ye.name,Ye.message,$e.__type,it)});(Fe=Ne.errors).push.apply(Fe,He)}return Ne};var Re=function(Z){return Z===null?"null":Z===void 0?"undefined":Z},fe=function(Z,Q,se,te){var de,he=0,ge=function(je){var Ee=se==="error cause"?"was":"received";te&&te.warn(se+" "+Ee+' a non-error: "'+je+'"');var Ne=new Error(se+" "+Ee+' a non-error. See "'+se+'" tab for more detail.');return Ne.name="InvalidError",Ne};if(!Q)ze(Z)?de=Z:(de=ge(typeof Z),he+=2);else switch(typeof Z){case"string":case"number":case"boolean":de=new Error(String(Z)),he+=1;break;case"function":de=ge("function"),he+=2;break;case"object":Z!==null&&ze(Z)?de=Z:Z!==null&&ve(Z)?(de=new Error(Z.message||Z.errorMessage),de.name=Z.name||Z.errorClass,he+=1):(de=ge(Z===null?"null":"unsupported object"),he+=2);break;default:de=ge("nothing"),he+=2}if(!Ze(de))try{throw de}catch(je){Ze(je)&&(de=je,he=1)}return[de,he]};$e.__type="browserjs";var ve=function(Z){return(typeof Z.name=="string"||typeof Z.errorClass=="string")&&(typeof Z.message=="string"||typeof Z.errorMessage=="string")},_e=$e,Ie=function(Z,Q,se){var te=0,de=function(){if(te>=Z.length)return se(null,!0);Q(Z[te],function(he,ge){if(he)return se(he);if(ge===!1)return se(null,!1);te++,de()})};de()},ke=function(Z,Q,se,te){var de=function(he,ge){if(typeof he!="function")return ge(null);try{if(he.length!==2){var je=he(Q);return je&&typeof je.then=="function"?je.then(function(Ee){return setTimeout(function(){return ge(null,Ee)})},function(Ee){setTimeout(function(){return se(Ee),ge(null,!0)})}):ge(null,je)}he(Q,function(Ee,Ne){if(Ee)return se(Ee),ge(null);ge(null,Ne)})}catch(Ee){se(Ee),ge(null)}};Ie(Z,de,te)},Le=function(Z,Q,se,te){for(var de=!1,he=Z.slice();!de&&he.length;)try{de=he.pop()(Q)===!1}catch(ge){te.error("Error occurred in "+se+" callback, continuing anyway…"),te.error(ge)}return de},et=function(Q,se){var te="000000000"+Q;return te.substr(te.length-se)},nt=typeof window=="object"?window:self,ft=0;for(var mt in nt)Object.hasOwnProperty.call(nt,mt)&&ft++;var at=navigator.mimeTypes?navigator.mimeTypes.length:0,ct=et((at+navigator.userAgent.length).toString(36)+ft.toString(36),4),Be=function(){return ct},tt=0,ht=4,jt=36,$t=Math.pow(jt,ht);function Bt(){return et((Math.random()*$t<<0).toString(jt),ht)}function dr(){return tt=tt<$t?tt:0,tt++,tt-1}function Vt(){var Z="c",Q=new Date().getTime().toString(jt),se=et(dr().toString(jt),ht),te=Be(),de=Bt()+Bt();return Z+Q+se+te+de}Vt.fingerprint=Be;var pr=Vt,mr=function(){function Z(){this.id=pr(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var Q=Z.prototype;return Q.getUser=function(){return this._user},Q.setUser=function(te,de,he){this._user={id:te,email:de,name:he}},Q.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},Q._track=function(te){this[te._handledState.unhandled?"_unhandled":"_handled"]+=1},Z}(),_t=mr,hr=De.add,xr=De.clear,wt=De.merge,xt=function(){},gr=function(){function Z(se,te,de,he){var ge=this;te===void 0&&(te=I.schema),de===void 0&&(de=[]),this._notifier=he,this._config={},this._schema=te,this._delivery={sendSession:xt,sendEvent:xt},this._logger={debug:xt,info:xt,warn:xt,error:xt},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=Z,this.Event=_e,this.Breadcrumb=G,this.Session=_t,this._config=this._configure(se,de),B(de.concat(this._config.plugins),function(Ne){Ne&&ge._loadPlugin(Ne)}),this._depth=1;var je=this,Ee=this.notify;this.notify=function(){return Ee.apply(je,arguments)}}var Q=Z.prototype;return Q.addMetadata=function(te,de,he){return Oe.add(this._metadata,te,de,he)},Q.getMetadata=function(te,de){return Oe.get(this._metadata,te,de)},Q.clearMetadata=function(te,de){return Oe.clear(this._metadata,te,de)},Q.addFeatureFlag=function(te,de){de===void 0&&(de=null),hr(this._features,this._featuresIndex,te,de)},Q.addFeatureFlags=function(te){wt(this._features,te,this._featuresIndex)},Q.clearFeatureFlag=function(te){xr(this._features,this._featuresIndex,te)},Q.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},Q.getContext=function(){return this._context},Q.setContext=function(te){this._context=te},Q._configure=function(te,de){var he=o(de,function(Ne,Pe){return Pe&&Pe.configSchema?D({},Ne,Pe.configSchema):Ne},this._schema),ge=o(_(he),function(Ne,Pe){var Fe=he[Pe].defaultValue(te[Pe]);if(te[Pe]!==void 0){var we=he[Pe].validate(te[Pe]);we?he[Pe].allowPartialObject?Ne.config[Pe]=D(Fe,te[Pe]):Ne.config[Pe]=te[Pe]:(Ne.errors[Pe]=he[Pe].message,Ne.config[Pe]=Fe)}else Ne.config[Pe]=Fe;return Ne},{errors:{},config:{}}),je=ge.errors,Ee=ge.config;if(he.apiKey){if(!Ee.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(Ee.apiKey)||(je.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=D({},Ee.metadata),wt(this._features,Ee.featureFlags,this._featuresIndex),this._user=D({},Ee.user),this._context=Ee.context,Ee.logger&&(this._logger=Ee.logger),Ee.onError&&(this._cbs.e=this._cbs.e.concat(Ee.onError)),Ee.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(Ee.onBreadcrumb)),Ee.onSession&&(this._cbs.s=this._cbs.s.concat(Ee.onSession)),_(je).length&&this._logger.warn(yr(je,te)),Ee},Q.getUser=function(){return this._user},Q.setUser=function(te,de,he){this._user={id:te,email:de,name:he}},Q._loadPlugin=function(te){var de=te.load(this);return te.name&&(this._plugins["~"+te.name+"~"]=de),this},Q.getPlugin=function(te){return this._plugins["~"+te+"~"]},Q._setDelivery=function(te){this._delivery=te(this)},Q.startSession=function(){var te=new _t;te.app.releaseStage=this._config.releaseStage,te.app.version=this._config.appVersion,te.app.type=this._config.appType,te._user=D({},this._user);var de=Le(this._cbs.s,te,"onSession",this._logger);return de?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,te)},Q.addOnError=function(te,de){de===void 0&&(de=!1),this._cbs.e[de?"unshift":"push"](te)},Q.removeOnError=function(te){this._cbs.e=E(this._cbs.e,function(de){return de!==te})},Q._addOnSessionPayload=function(te){this._cbs.sp.push(te)},Q.addOnSession=function(te){this._cbs.s.push(te)},Q.removeOnSession=function(te){this._cbs.s=E(this._cbs.s,function(de){return de!==te})},Q.addOnBreadcrumb=function(te,de){de===void 0&&(de=!1),this._cbs.b[de?"unshift":"push"](te)},Q.removeOnBreadcrumb=function(te){this._cbs.b=E(this._cbs.b,function(de){return de!==te})},Q.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},Q.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},Q.leaveBreadcrumb=function(te,de,he){if(te=typeof te=="string"?te:"",he=typeof he=="string"&&j(i,he)?he:"manual",de=typeof de=="object"&&de!==null?de:{},!!te){var ge=new G(te,de,he),je=Le(this._cbs.b,ge,"onBreadcrumb",this._logger);if(je){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(ge),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},Q._isBreadcrumbTypeEnabled=function(te){var de=this._config.enabledBreadcrumbTypes;return de===null||j(de,te)},Q.notify=function(te,de,he){he===void 0&&(he=xt);var ge=_e.create(te,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(ge,de,he)},Q._notify=function(te,de,he){var ge=this;if(he===void 0&&(he=xt),te.app=D({},te.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),te.context=te.context||this._context,te._metadata=D({},te._metadata,this._metadata),te._user=D({},te._user,this._user),te.breadcrumbs=this._breadcrumbs.slice(),wt(te._features,this._features,te._featuresIndex),this._config.enabledReleaseStages!==null&&!j(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),he(null,te);var je=te.severity,Ee=function(Pe){ge._logger.error("Error occurred in onError callback, continuing anyway…"),ge._logger.error(Pe)},Ne=[].concat(this._cbs.e).concat(de);ke(Ne,te,Ee,function(Pe,Fe){if(Pe&&Ee(Pe),!Fe)return ge._logger.debug("Event not sent due to onError callback"),he(null,te);ge._isBreadcrumbTypeEnabled("error")&&Z.prototype.leaveBreadcrumb.call(ge,te.errors[0].errorClass,{errorClass:te.errors[0].errorClass,errorMessage:te.errors[0].errorMessage,severity:te.severity},"error"),je!==te.severity&&(te._handledState.severityReason={type:"userCallbackSetSeverity"}),te.unhandled!==te._handledState.unhandled&&(te._handledState.severityReason.unhandledOverridden=!0,te._handledState.unhandled=te.unhandled),ge._session&&(ge._session._track(te),te._session=ge._session),ge._delivery.sendEvent({apiKey:te.apiKey||ge._config.apiKey,notifier:ge._notifier,events:[te]},function(we){return he(we,te)})})},Z}(),yr=function(Z,Q){var se=new Error(`Invalid configuration
`+B(_(Z),function(te){return"  - "+te+" "+Z[te]+", got "+vr(Q[te])}).join(`

`));return se},vr=function(Z){switch(typeof Z){case"string":case"number":case"object":return JSON.stringify(Z);default:return String(Z)}},Tt=gr,yt={},zt=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];yt.event=function(Z,Q){var se=le(Z,null,null,{redactedPaths:zt,redactedKeys:Q});return se.length>1e6&&(Z.events[0]._metadata={notifier:`WARNING!
Serialized payload was `+se.length/1e6+`MB (limit = 1MB)
metadata was removed`},se=le(Z,null,null,{redactedPaths:zt,redactedKeys:Q})),se},yt.session=function(Z,Q){var se=le(Z,null,null);return se};var At={};At=function(Z,Q){return Q===void 0&&(Q=window),{sendEvent:function(se,te){te===void 0&&(te=function(){});var de=Gt(Z._config,"notify","4",Q),he=yt.event(se,Z._config.redactedKeys),ge=new Q.XDomainRequest;ge.onload=function(){te(null)},ge.onerror=function(){var je=new Error("Event failed to send");Z._logger.error("Event failed to send…",je),he.length>1e6&&Z._logger.warn("Event oversized ("+(he.length/1e6).toFixed(2)+" MB)"),te(je)},ge.open("POST",de),setTimeout(function(){try{ge.send(he)}catch(je){Z._logger.error(je),te(je)}},0)},sendSession:function(se,te){te===void 0&&(te=function(){});var de=Gt(Z._config,"sessions","1",Q),he=new Q.XDomainRequest;he.onload=function(){te(null)},he.open("POST",de),setTimeout(function(){try{he.send(yt.session(se,Z._config.redactedKeys))}catch(ge){Z._logger.error(ge),te(ge)}},0)}}};var Gt=function(Z,Q,se,te){var de=JSON.parse(JSON.stringify(new Date)),he=Er(Z.endpoints[Q],te.location.protocol);return he+"?apiKey="+encodeURIComponent(Z.apiKey)+"&payloadVersion="+se+"&sentAt="+encodeURIComponent(de)},Er=At._matchPageProtocol=function(Z,Q){return Q==="http:"?Z.replace(/^https:/,"http:"):Z},br=function(Z,Q){return Q===void 0&&(Q=window),{sendEvent:function(se,te){te===void 0&&(te=function(){});try{var de=Z._config.endpoints.notify,he=new Q.XMLHttpRequest,ge=yt.event(se,Z._config.redactedKeys);he.onreadystatechange=function(){if(he.readyState===Q.XMLHttpRequest.DONE){var je=he.status;if(je===0||je>=400){var Ee=new Error("Request failed with status "+je);Z._logger.error("Event failed to send…",Ee),ge.length>1e6&&Z._logger.warn("Event oversized ("+(ge.length/1e6).toFixed(2)+" MB)"),te(Ee)}else te(null)}},he.open("POST",de),he.setRequestHeader("Content-Type","application/json"),he.setRequestHeader("Bugsnag-Api-Key",se.apiKey||Z._config.apiKey),he.setRequestHeader("Bugsnag-Payload-Version","4"),he.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),he.send(ge)}catch(je){Z._logger.error(je)}},sendSession:function(se,te){te===void 0&&(te=function(){});try{var de=Z._config.endpoints.sessions,he=new Q.XMLHttpRequest;he.onreadystatechange=function(){if(he.readyState===Q.XMLHttpRequest.DONE){var ge=he.status;if(ge===0||ge>=400){var je=new Error("Request failed with status "+ge);Z._logger.error("Session failed to send…",je),te(je)}else te(null)}},he.open("POST",de),he.setRequestHeader("Content-Type","application/json"),he.setRequestHeader("Bugsnag-Api-Key",Z._config.apiKey),he.setRequestHeader("Bugsnag-Payload-Version","1"),he.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),he.send(yt.session(se,Z._config.redactedKeys))}catch(ge){Z._logger.error(ge)}}}},Zt=new Date,kr=function(){Zt=new Date},jr={name:"appDuration",load:function(Z){return Z.addOnError(function(Q){var se=new Date;Q.app.duration=se-Zt},!0),{reset:kr}}},Rr=function(Z){return Z===void 0&&(Z=window),{load:function(Q){Q.addOnError(function(se){se.context===void 0&&(se.context=Z.location.pathname)},!0)}}},Pt=function(Q,se){var te="000000000"+Q;return te.substr(te.length-se)},Ht=typeof window=="object"?window:self,Ut=0;for(var Cr in Ht)Object.hasOwnProperty.call(Ht,Cr)&&Ut++;var Sr=navigator.mimeTypes?navigator.mimeTypes.length:0,_r=Pt((Sr+navigator.userAgent.length).toString(36)+Ut.toString(36),4),Wt=function(){return _r},Et=0,Nt=4,Rt=36,qt=Math.pow(Rt,Nt);function Kt(){return Pt((Math.random()*qt<<0).toString(Rt),Nt)}function wr(){return Et=Et<qt?Et:0,Et++,Et-1}function Yt(){var Z="c",Q=new Date().getTime().toString(Rt),se=Pt(wr().toString(Rt),Nt),te=Wt(),de=Kt()+Kt();return Z+Q+se+te+de}Yt.fingerprint=Wt;var Tr=Yt,Jt="bugsnag-anonymous-id",Ar=function(Z){try{var Q=Z.localStorage,se=Q.getItem(Jt);return se&&/^c[a-z0-9]{20,32}$/.test(se)||(se=Tr(),Q.setItem(Jt,se)),se}catch{}},Pr=function(Z,Q){return Z===void 0&&(Z=navigator),Q===void 0&&(Q=window),{load:function(se){var te={locale:Z.browserLanguage||Z.systemLanguage||Z.userLanguage||Z.language,userAgent:Z.userAgent};Q&&Q.screen&&Q.screen.orientation&&Q.screen.orientation.type?te.orientation=Q.screen.orientation.type:Q&&Q.document&&(te.orientation=Q.document.documentElement.clientWidth>Q.document.documentElement.clientHeight?"landscape":"portrait"),se._config.generateAnonymousId&&(te.id=Ar(Q)),se.addOnSession(function(de){de.device=D({},de.device,te),se._config.collectUserIp||Xt(de)}),se.addOnError(function(de){de.device=D({},de.device,te,{time:new Date}),se._config.collectUserIp||Xt(de)},!0)},configSchema:{generateAnonymousId:{validate:function(se){return se===!0||se===!1},defaultValue:function(){return!0},message:"should be true|false"}}}},Xt=function(Z){var Q=Z.getUser();(!Q||!Q.id)&&Z.setUser(Z.device.id)},Nr=function(Z){return Z===void 0&&(Z=window),{load:function(Q){Q.addOnError(function(se){se.request&&se.request.url||(se.request=D({},se.request,{url:Z.location.href}))},!0)}}},Ir={load:function(Z){Z._sessionDelegate=Mr}},Mr={startSession:function(Z,Q){var se=Z;return se._session=Q,se._pausedSession=null,se._config.enabledReleaseStages!==null&&!j(se._config.enabledReleaseStages,se._config.releaseStage)?(se._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),se):(se._delivery.sendSession({notifier:se._notifier,device:Q.device,app:Q.app,sessions:[{id:Q.id,startedAt:Q.startedAt,user:Q._user}]}),se)},resumeSession:function(Z){return Z._session?Z:Z._pausedSession?(Z._session=Z._pausedSession,Z._pausedSession=null,Z):Z.startSession()},pauseSession:function(Z){Z._pausedSession=Z._session,Z._session=null}},Dr={load:function(Z){Z._config.collectUserIp||Z.addOnError(function(Q){Q._user&&typeof Q._user.id>"u"&&delete Q._user.id,Q._user=D({id:"[REDACTED]"},Q._user),Q.request=D({clientIp:"[REDACTED]"},Q.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(Z){return Z===!0||Z===!1}}}},Qt={};Qt.load=function(Z){var Q=/^(local-)?dev(elopment)?$/.test(Z._config.releaseStage);Q||!Z._isBreadcrumbTypeEnabled("log")||B(Fr,function(se){var te=console[se];console[se]=function(){for(var de=arguments.length,he=new Array(de),ge=0;ge<de;ge++)he[ge]=arguments[ge];Z.leaveBreadcrumb("Console output",o(he,function(je,Ee,Ne){var Pe="[Unknown value]";try{Pe=String(Ee)}catch{}if(Pe==="[object Object]")try{Pe=JSON.stringify(Ee)}catch{}return je["["+Ne+"]"]=Pe,je},{severity:se.indexOf("group")===0?"log":se}),"log"),te.apply(console,he)},console[se]._restore=function(){console[se]=te}})};var Fr=E(["log","debug","info","warn","error"],function(Z){return typeof console<"u"&&typeof console[Z]=="function"}),er=200,tr=5e5,Lr=function(Z,Q){return Z===void 0&&(Z=document),Q===void 0&&(Q=window),{load:function(se){if(!se._config.trackInlineScripts)return;var te=Q.location.href,de="",he=!!Z.attachEvent,ge=he?Z.readyState==="complete":Z.readyState!=="loading",je=function(){return Z.documentElement.outerHTML};de=je();var Ee=Z.onreadystatechange;Z.onreadystatechange=function(){Z.readyState==="interactive"&&(de=je(),ge=!0);try{Ee.apply(this,arguments)}catch{}};var Ne=null,Pe=function(Ve){Ne=Ve},Fe=function(){var Ve=Z.currentScript||Ne;if(!Ve&&!ge){var Ye=Z.scripts||Z.getElementsByTagName("script");Ve=Ye[Ye.length-1]}return Ve},we=function(Ve){(!ge||!de)&&(de=je());var Ye=["<!-- DOC START -->"].concat(de.split(`
`)),lt=Ve-1,ot=Math.max(lt-3,0),pt=Math.min(lt+3,Ye.length);return o(Ye.slice(ot,pt),function(dt,bt,Ft){return dt[ot+1+Ft]=bt.length<=er?bt:bt.substr(0,er),dt},{})};se.addOnError(function(Ve){Ve.errors[0].stacktrace=E(Ve.errors[0].stacktrace,function(dt){return!/__trace__$/.test(dt.method)});var Ye=Ve.errors[0].stacktrace[0],lt=function(dt){return dt.replace(/#.*$/,"").replace(/\?.*$/,"")};if(!(Ye&&Ye.file&&lt(Ye.file)!==lt(te))){var ot=Fe();if(ot){var pt=ot.innerHTML;Ve.addMetadata("script","content",pt.length<=tr?pt:pt.substr(0,tr)),Ye&&Ye.lineNumber&&(Ye.code=we(Ye.lineNumber))}}},!0);var He=B(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(Ve){return It(Q,Ve,function(Ye){return it(Ye,function(lt){return{get:function(){return lt[0]},replace:function(ot){lt[0]=ot}}})})}),Xe=He[0];B(["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],function(Ve){!Q[Ve]||!Q[Ve].prototype||!Object.prototype.hasOwnProperty.call(Q[Ve].prototype,"addEventListener")||(It(Q[Ve].prototype,"addEventListener",function(Ye){return it(Ye,rr)}),It(Q[Ve].prototype,"removeEventListener",function(Ye){return it(Ye,rr,!0)}))});function it(Ve,Ye,lt){return lt===void 0&&(lt=!1),function(){var ot=[].slice.call(arguments);try{var pt=Ye(ot),dt=pt.get();if(lt&&Ve.apply(this,ot),typeof dt!="function")return Ve.apply(this,ot);if(dt.__trace__)pt.replace(dt.__trace__);else{var bt=Fe();dt.__trace__=function(){Pe(bt),Xe(function(){Pe(null)},0);var Xr=dt.apply(this,arguments);return Pe(null),Xr},dt.__trace__.__trace__=dt.__trace__,pt.replace(dt.__trace__)}}catch{}if(Ve.apply)return Ve.apply(this,ot);switch(ot.length){case 1:return Ve(ot[0]);case 2:return Ve(ot[0],ot[1]);default:return Ve()}}}},configSchema:{trackInlineScripts:{validate:function(se){return se===!0||se===!1},defaultValue:function(){return!0},message:"should be true|false"}}}};function It(Z,Q,se){var te=Z[Q];if(!te)return te;var de=se(te);return Z[Q]=de,te}function rr(Z){var Q=!!Z[1]&&typeof Z[1].handleEvent=="function";return{get:function(){return Q?Z[1].handleEvent:Z[1]},replace:function(se){Q?Z[1].handleEvent=se:Z[1]=se}}}var Or=function(Z){return Z===void 0&&(Z=window),{load:function(Q){"addEventListener"in Z&&Q._isBreadcrumbTypeEnabled("user")&&Z.addEventListener("click",function(se){var te,de;try{te=Br(se.target),de=nr(se.target,Z)}catch{te="[hidden]",de="[hidden]",Q._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}Q.leaveBreadcrumb("UI click",{targetText:te,targetSelector:de},"user")},!0)}}},$r=/^\s*([^\s][\s\S]{0,139}[^\s])?\s*/;function Br(Z){var Q=Z.textContent||Z.innerText||"";return!Q&&(Z.type==="submit"||Z.type==="button")&&(Q=Z.value),Q=Q.replace($r,"$1"),Q.length>140?Q.slice(0,135)+"(...)":Q}function nr(Z,Q){var se=[Z.tagName];if(Z.id&&se.push("#"+Z.id),Z.className&&Z.className.length&&se.push("."+Z.className.split(" ").join(".")),!Q.document.querySelectorAll||!Array.prototype.indexOf)return se.join("");try{if(Q.document.querySelectorAll(se.join("")).length===1)return se.join("")}catch{return se.join("")}if(Z.parentNode.childNodes.length>1){var te=Array.prototype.indexOf.call(Z.parentNode.childNodes,Z)+1;se.push(":nth-child("+te+")")}return Q.document.querySelectorAll(se.join("")).length===1?se.join(""):Z.parentNode?nr(Z.parentNode,Q)+" > "+se.join(""):se.join("")}var sr={};sr=function(Z){Z===void 0&&(Z=window);var Q={load:function(se){if("addEventListener"in Z&&se._isBreadcrumbTypeEnabled("navigation")){var te=function(de){return function(){return se.leaveBreadcrumb(de,{},"navigation")}};Z.addEventListener("pagehide",te("Page hidden"),!0),Z.addEventListener("pageshow",te("Page shown"),!0),Z.addEventListener("load",te("Page loaded"),!0),Z.document.addEventListener("DOMContentLoaded",te("DOMContentLoaded"),!0),Z.addEventListener("load",function(){return Z.addEventListener("popstate",te("Navigated back"),!0)}),Z.addEventListener("hashchange",function(de){var he=de.oldURL?{from:Ct(de.oldURL,Z),to:Ct(de.newURL,Z),state:ir(Z)}:{to:Ct(Z.location.href,Z)};se.leaveBreadcrumb("Hash changed",he,"navigation")},!0),Z.history.replaceState&&ar(se,Z.history,"replaceState",Z),Z.history.pushState&&ar(se,Z.history,"pushState",Z)}}};return Q};var Ct=function(Z,Q){var se=Q.document.createElement("A");return se.href=Z,""+se.pathname+se.search+se.hash},Vr=function(Z,Q,se,te){var de=Ct(Z.location.href,Z);return{title:se,state:Q,prevState:ir(Z),to:te||de,from:de}},ar=function(Z,Q,se,te){var de=Q[se];Q[se]=function(he,ge,je){Z.leaveBreadcrumb("History "+se,Vr(te,he,ge,je),"navigation"),typeof Z.resetEventCount=="function"&&Z.resetEventCount(),Z._config.autoTrackSessions&&Z.startSession(),de.apply(Q,[he,ge].concat(je!==void 0?je:[]))}},ir=function(Z){try{return Z.history.state}catch{}},vt="request",zr=function(Z,Q){Z===void 0&&(Z=[]),Q===void 0&&(Q=window);var se={load:function(te){if(!te._isBreadcrumbTypeEnabled("request"))return;var de=[te._config.endpoints.notify,te._config.endpoints.sessions].concat(Z);he(),Ee();function he(){if("addEventListener"in Q.XMLHttpRequest.prototype){var Fe=Q.XMLHttpRequest.prototype.open;Q.XMLHttpRequest.prototype.open=function(He,Xe){var it=this,Ve=!1,Ye=function(){return je(He,Xe)},lt=function(){return ge(He,Xe,it.status)};Ve&&(this.removeEventListener("load",lt),this.removeEventListener("error",Ye)),this.addEventListener("load",lt),this.addEventListener("error",Ye),Ve=!0,Fe.apply(this,arguments)}}}function ge(Fe,we,He){if(we===void 0){te._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}if(!(typeof we=="string"&&j(de,we.replace(/\?.*$/,"")))){var Xe={status:He,request:Fe+" "+we};He>=400?te.leaveBreadcrumb("XMLHttpRequest failed",Xe,vt):te.leaveBreadcrumb("XMLHttpRequest succeeded",Xe,vt)}}function je(Fe,we){if(we===void 0){te._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}typeof we=="string"&&j(de,we.replace(/\?.*$/,""))||te.leaveBreadcrumb("XMLHttpRequest error",{request:Fe+" "+we},vt)}function Ee(){if(!(!("fetch"in Q)||Q.fetch.polyfill)){var Fe=Q.fetch;Q.fetch=function(){var He=arguments,Xe=arguments[0],it=arguments[1],Ve,Ye=null;return Xe&&typeof Xe=="object"?(Ye=Xe.url,it&&"method"in it?Ve=it.method:Xe&&"method"in Xe&&(Ve=Xe.method)):(Ye=Xe,it&&"method"in it&&(Ve=it.method)),Ve===void 0&&(Ve="GET"),new Promise(function(lt,ot){Fe.apply(void 0,He).then(function(pt){Ne(pt,Ve,Ye),lt(pt)}).catch(function(pt){Pe(Ve,Ye),ot(pt)})})}}}var Ne=function(Fe,we,He){var Xe={status:Fe.status,request:we+" "+He};Fe.status>=400?te.leaveBreadcrumb("fetch() failed",Xe,vt):te.leaveBreadcrumb("fetch() succeeded",Xe,vt)},Pe=function(Fe,we){te.leaveBreadcrumb("fetch() error",{request:Fe+" "+we},vt)}}};return se},Gr={load:function(Z){var Q=0;Z.addOnError(function(se){if(Q>=Z._config.maxEvents)return Z._logger.warn("Cancelling event send due to maxEvents per session limit of "+Z._config.maxEvents+" being reached"),!1;Q++}),Z.resetEventCount=function(){Q=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(Z){return T(1,100)(Z)}}}},Mt={};Mt={load:function(Z){Z.addOnError(function(Q){var se=o(Q.errors,function(te,de){return te.concat(de.stacktrace)},[]);B(se,function(te){te.file=Zr(te.file)})})}};var Zr=Mt._strip=function(Z){return typeof Z=="string"?Z.replace(/\?.*$/,"").replace(/#.*$/,""):Z},Hr=function(Z,Q){return Z===void 0&&(Z=window),Q===void 0&&(Q="window onerror"),{load:function(se){if(!se._config.autoDetectErrors||!se._config.enabledErrorTypes.unhandledExceptions)return;function te(he,ge,je,Ee,Ne){if(je===0&&/Script error\.?/.test(he))se._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var Pe={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},Fe;if(Ne)Fe=se.Event.create(Ne,!0,Pe,Q,1),or(Fe.errors[0].stacktrace,ge,je,Ee);else if(typeof he=="object"&&he!==null&&(!ge||typeof ge!="string")&&!je&&!Ee&&!Ne){var we=he.type?"Event: "+he.type:"Error",He=he.message||he.detail||"";Fe=se.Event.create({name:we,message:He},!0,Pe,Q,1),Fe.originalError=he,Fe.addMetadata(Q,{event:he,extraParameters:ge})}else Fe=se.Event.create(he,!0,Pe,Q,1),or(Fe.errors[0].stacktrace,ge,je,Ee);se._notify(Fe)}typeof de=="function"&&de.apply(this,arguments)}var de=Z.onerror;Z.onerror=te}}},or=function(Z,Q,se,te){Z[0]||Z.push({});var de=Z[0];!de.file&&typeof Q=="string"&&(de.file=Q),!de.lineNumber&&Dt(se)&&(de.lineNumber=se),de.columnNumber||(Dt(te)?de.columnNumber=te:window.event&&Dt(window.event.errorCharacter)&&(de.columnNumber=window.event.errorCharacter))},Dt=function(Z){return typeof Z=="number"&&String.call(Z)!=="NaN"},Ur=function(Z){Z===void 0&&(Z=window);var Q={load:function(se){if(!(!se._config.autoDetectErrors||!se._config.enabledErrorTypes.unhandledRejections)){var te=function(de){var he=de.reason,ge=!1;try{de.detail&&de.detail.reason&&(he=de.detail.reason,ge=!0)}catch{}var je=se.Event.create(he,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,se._logger);ge&&B(je.errors[0].stacktrace,Wr(he)),se._notify(je,function(Ee){if(ze(Ee.originalError)&&!Ee.originalError.stack){var Ne;Ee.addMetadata("unhandledRejection handler",(Ne={},Ne[Object.prototype.toString.call(Ee.originalError)]={name:Ee.originalError.name,message:Ee.originalError.message,code:Ee.originalError.code},Ne))}})};"addEventListener"in Z?Z.addEventListener("unhandledrejection",te):Z.onunhandledrejection=function(de,he){te({detail:{reason:de,promise:he}})}}}};return Q},Wr=function(Z){return function(Q){Q.file!==Z.toString()&&Q.method&&(Q.method=Q.method.replace(/^\s+/,""))}},gt={},qr="Bugsnag JavaScript",Kr="7.25.0",Yr="https://github.com/bugsnag/bugsnag-js",Jr=D({},I.schema,L),ut={_client:null,createClient:function(Z){typeof Z=="string"&&(Z={apiKey:Z}),Z||(Z={});var Q=[jr,Pr(),Rr(),Nr(),Gr,Ir,Dr,Mt,Hr(),Ur(),sr(),Or(),zr(),Qt,Lr()],se=new Tt(Z,Jr,Q,{name:qr,version:Kr,url:Yr});return se._setDelivery(window.XDomainRequest?At:br),se._logger.debug("Loaded!"),se.leaveBreadcrumb("Bugsnag loaded",{},"state"),se._config.autoTrackSessions?se.startSession():se},start:function(Z){return ut._client?(ut._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),ut._client):(ut._client=ut.createClient(Z),ut._client)},isStarted:function(){return ut._client!=null}};return B(["resetEventCount"].concat(_(Tt.prototype)),function(Z){/^_/.test(Z)||(ut[Z]=function(){if(!ut._client)return console.log("Bugsnag."+Z+"() was called before Bugsnag.start()");ut._client._depth+=1;var Q=ut._client[Z].apply(ut._client,arguments);return ut._client._depth-=1,Q})}),gt=ut,gt.Client=Tt,gt.Event=_e,gt.Session=_t,gt.Breadcrumb=G,gt.default=ut,gt})})(bugsnag);var bugsnagExports=bugsnag.exports,notifier=bugsnagExports;const Bugsnag=getDefaultExportFromCjs(notifier),LicenseWidget=()=>{const[s,a]=reactExports.useState(!0),[i,o]=reactExports.useState(""),{license:E}=useSelector(optimizerData),{options:j,uucssGlobal:R}=useAppContext(),[C,S]=reactExports.useState(()=>j.rapidload_license_data||null),[_,T]=reactExports.useState(""),[P,N]=reactExports.useState(!1),[I,M]=reactExports.useState(!1),{dispatch:D}=useCommonDispatch();reactExports.useEffect(()=>o(""),[_]);const B=async()=>{M(!0);const $=await D(updateLicense(j,_));M(!1),$.success?(D(updateLicense(j)),setTimeout(()=>window.location.hash="#/",300)):o($.error||"")};reactExports.useEffect(()=>{E&&!C&&S(E)},[E]);const F=()=>{const $=!!C,V=$?ForwardRef$z:ForwardRef$o,G=$?"text-purple-900/90  dark:text-brand-300":"text-purple-600  dark:text-brand-300",K=$?"text-purple-900/80 dark:text-brand-300":"text-purple-600  dark:text-brand-300",J=$?"Rapidload Activated":"You are using RapidLoad AI FREE";return jsxRuntimeExports.jsxs("div",{className:"flex gap-1 items-center",children:[jsxRuntimeExports.jsx(V,{className:`h-4 w-4 ${K}`}),jsxRuntimeExports.jsx("span",{className:`text-xs ${G}`,children:J})]})},O=[{label:"Email",value:C==null?void 0:C.email},{label:"Next Billing",value:C!=null&&C.next_billing?new Date(C.next_billing*1e3).toLocaleDateString():""},{label:"Plan",value:C==null?void 0:C.plan},{label:"Active Domain",value:C!=null&&C.licensedDomain?C==null?void 0:C.licensedDomain:j.optimizer_url}],L=()=>jsxRuntimeExports.jsx("div",{className:"relative space-y-3",children:O.map(({label:$,value:V},G)=>jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center text-sm",children:[jsxRuntimeExports.jsxs("span",{className:"font-medium text-brand-950 dark:text-brand-300/80",children:[$,":"]}),jsxRuntimeExports.jsx("span",{className:"text-brand-850 dark:text-brand-300",children:s?V:"•".repeat((V||"").toString().length)})]},$))});return jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:jsxRuntimeExports.jsx("div",{className:"w-full flex flex-col gap-4",children:jsxRuntimeExports.jsxs(Card,{"data-tour":"license-widget",className:"border flex flex-col gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col p-6 pb-0 gap-2",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-bold",children:C?jsxRuntimeExports.jsxs("span",{className:"text-brand-400/50 dark:text-brand-300/80",children:["Welcome back, ",jsxRuntimeExports.jsx("span",{className:"text-brand-950 dark:text-brand-300",children:C==null?void 0:C.name})]}):jsxRuntimeExports.jsx("span",{className:"text-base font-semibold dark:text-brand-300",children:"Connect your license"})}),jsxRuntimeExports.jsx("div",{className:"bg-purple-800/10 px-2.5 py-1.5 rounded-xl w-fit dark:bg-brand-800 dark:border-brand-600 dark:border",children:F()})]}),jsxRuntimeExports.jsx("div",{className:"grid gap-4 px-8 text-sm relative",children:C?L():jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("span",{children:"You're currently using just 30% of RapidLoad AI’s potential. While the free version speeds up your site, the real power unlocks at 100%—with advanced optimizations like CriticalCSS injection, real-time image compression, and a high-speed global CDN."})})}),jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2",children:jsxRuntimeExports.jsx("div",{className:"flex gap-6 justify-end p-6 text-sm font-semibold relative before:absolute before:left-0 before:right-0 before:top-0 before:h-[2px] before:bg-gradient-to-r before:from-white before:via-brand-200 before:to-white dark:before:bg-gradient-to-r dark:before:from-brand-800 dark:before:via-brand-900 dark:before:to-brand-800",children:C?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("button",{className:"cursor-pointer text-brand-500 py-1.5",onClick:()=>window.open("https://app.rapidload.io/","blank"),children:"View My Account"}),jsxRuntimeExports.jsx("button",{className:"cursor-pointer bg-brand-100/90 text-brand-950 py-1.5 px-4 rounded-lg dark:text-brand-300 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 transition-all",onClick:()=>window.open("https://app.rapidload.io/subscription","blank"),children:"Upgrade"})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(AppButton,{className:"bg-[#09090b] w-full flex gap-2 items-center cursor-pointer px-4 rounded-lg",onClick:()=>P?B():window.open("https://rapidload.ai/","_blank"),children:[jsxRuntimeExports.jsx(Plug,{className:"w-4 h-4"}),I&&jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin"})," Connect to Boost"]})})})})]})})})},SkeletonList=({count:s=4,className:a})=>jsxRuntimeExports.jsx("div",{className:`flex flex-col gap-4 ${a}`,children:Array.from({length:s}).map((i,o)=>jsxRuntimeExports.jsx(Skeleton,{className:"w-full h-[22px] rounded-[18px]"},o))}),CacheSummary=({className:s})=>{const{dispatch:a}=useCommonDispatch(),{options:i}=useAppContext(),[o,E]=reactExports.useState("0 MB"),{cacheUsage:j,actions:R}=useSelector(optimizerData);reactExports.useState(!1);const[C,S]=reactExports.useState(!1),[_,T]=reactExports.useState(null);reactExports.useEffect(()=>{},[R]);const P=()=>{a(getSummary(i,"get_cache_file_size"))};reactExports.useEffect(()=>{P()},[a]);const N=async F=>{const O=F===D();O?S(!0):T(F||null);try{if(F){const L=await fetch(F.replace(/&amp;/g,"&"));L.status==200?toast({duration:10,description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center items-center",children:["Successfully Cleared ",jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-5 text-green-600"})]})}):toast({duration:10,description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center items-center",children:["Error Occurred ",L.statusText,jsxRuntimeExports.jsx(CircleX,{className:"w-5 text-red-600"})]})})}}finally{O?S(!1):T(null),P()}};reactExports.useEffect(()=>{if(j){const O=(j.reduce((L,$)=>{const V=$.size.size.toLowerCase();let G=0;return V.endsWith("kb")?G=parseFloat(V)*1024:V.endsWith("mb")?G=parseFloat(V)*1024*1024:V.endsWith("gb")&&(G=parseFloat(V)*1024*1024*1024),L+G},0)/(1024*1024)).toFixed(2);E(`${O} MB`)}},[j]);const I=({label:F,size:O,action:L})=>jsxRuntimeExports.jsxs("div",{className:"flex justify-between items-center py-1.5 font-medium",children:[jsxRuntimeExports.jsx("div",{className:"text-sm dark:text-brand-300/80 text-brand-500",children:F}),jsxRuntimeExports.jsxs("div",{className:"flex gap-1",children:[jsxRuntimeExports.jsx("div",{className:"text-sm dark:text-brand-300",children:O.size}),L?jsxRuntimeExports.jsx(TooltipText,{className:"flex items-center justify-center",text:L.label,children:_===L.href?jsxRuntimeExports.jsx(Loader,{className:"h-5 w-5 animate-spin text-gray-500"}):jsxRuntimeExports.jsx(ForwardRef$5,{onClick:()=>N(L.href),className:"cursor-pointer h-5 w-5 text-gray-500"})}):jsxRuntimeExports.jsx(ForwardRef$5,{className:"h-5 w-5 text-gray-500"})]})]}),M=({title:F,tooltip:O})=>jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[jsxRuntimeExports.jsx("div",{className:"text-base font-semibold dark:text-brand-300",children:F}),jsxRuntimeExports.jsx(TooltipText,{className:"max-w-sm",text:O,children:jsxRuntimeExports.jsx(ForwardRef$a,{className:"h-[18px] w-[18px]"})})]}),D=()=>{var F;return(F=R==null?void 0:R.find(O=>O.control_label==="Flush Cache"&&O.control_description==="Clear Page Cache"))==null?void 0:F.action},B=()=>{const F=D();F&&N(F)};return jsxRuntimeExports.jsx(Card,{"data-tour":"license-widget",className:cn("border flex flex-col",s),children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col px-6 py-6 gap-4",children:[jsxRuntimeExports.jsx(M,{title:"Cache summary",tooltip:"Detailed overview of the total files cached and served by RapidLoad."}),jsxRuntimeExports.jsxs("div",{className:"p-6 py-14 border dark:border-brand-600 rounded-3xl text-center",children:[jsxRuntimeExports.jsx("div",{className:"text-sm dark:text-brand-300/80 text-brand-400",children:"Total cache size"}),jsxRuntimeExports.jsx("div",{className:"text-[27px] font-bold",children:o})]}),jsxRuntimeExports.jsx("div",{children:j===null?jsxRuntimeExports.jsx(SkeletonList,{count:4}):j.map(({label:F,size:O,action:L})=>jsxRuntimeExports.jsx(I,{label:F,size:O,action:L},F))}),jsxRuntimeExports.jsx("div",{className:"flex justify-end text-sm font-semibold",children:jsxRuntimeExports.jsxs("button",{onClick:B,className:"h-8 bg-brand-100/90 text-brand-950 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300 py-1.5 px-4 rounded-lg flex items-center gap-1",children:[C?jsxRuntimeExports.jsx(Loader,{className:"w-4 h-4 animate-spin"}):null,jsxRuntimeExports.jsx("span",{children:"Clear Cache"})]})})]})})},CDNSummary=({className:s})=>{const{dispatch:a}=useCommonDispatch(),{options:i}=useAppContext(),{cdnUsage:o,imageUsage:E,cacheUsage:j,license:R}=useSelector(optimizerData),[C,S]=reactExports.useState(null),[_,T]=reactExports.useState("");reactExports.useEffect(()=>{const I=localStorage.getItem("rapidLoadLicense");if(I)try{S(JSON.parse(I))}catch(B){console.error("Error parsing license data",B)}else R&&S(R);const M=new Date,D=new Date(M);if(D.setMonth(M.getMonth()+1),C!=null&&C.next_billing){const B=new Date(C.next_billing*1e3);T(D.toLocaleDateString("en-US",{month:"short"})+" "+B.getDate())}},[R,C==null?void 0:C.next_billing]);const P=({title:I,tooltip:M})=>jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center pb-2",children:[jsxRuntimeExports.jsx("div",{className:"text-base font-semibold dark:text-brand-300",children:I}),jsxRuntimeExports.jsx(TooltipText,{className:"max-w-sm",text:M,children:jsxRuntimeExports.jsx(ForwardRef$a,{className:"h-[18px] w-[18px]"})})]}),N=({label:I,usage:M=0,allowedUsage:D=0,note:B,used_gb_formatted:F})=>{const O=D?`${M/D*100}`:"0";return jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col gap-2.5 py-2",s),children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center text-sm dark:text-brand-300 justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-baseline",children:[jsxRuntimeExports.jsx("span",{className:`font-semibold ${I==="Additional Usage"&&"text-brand-400"}`,children:I}),jsxRuntimeExports.jsxs("span",{className:"text-brand-400 text-xs",children:[M?M<1?M.toFixed(2):M:"0"," GB / ",D||30," GB"]})]}),jsxRuntimeExports.jsx("div",{className:"text-[10px] font-normal dark:text-brand-300 text-brand-400",children:B})]}),jsxRuntimeExports.jsx("div",{className:"relative w-full h-2.5 bg-brand-100 overflow-hidden rounded outline outline-1 outline-brand-200 dark:bg-brand-600/40 dark:outline-brand-600/40",children:jsxRuntimeExports.jsx("div",{className:"absolute h-2.5 bg-brand-950 rounded dark:bg-brand-300",style:{width:`${Number(O)}%`}})})]})};return reactExports.useEffect(()=>{a(getSummary(i,"get_rapidload_cdn_usage")),a(getSummary(i,"get_rapidload_image_usage"))},[a]),jsxRuntimeExports.jsxs(Card,{"data-tour":"license-widget",className:"border flex flex-col",children:[jsxRuntimeExports.jsxs("div",{className:"p-6",children:[jsxRuntimeExports.jsx(P,{title:"CDN and Image Summary",tooltip:"Comprehensive breakdown of CDN and Image CDN usage allocated through RapidLoad."}),jsxRuntimeExports.jsx(N,{label:"CDN",usage:o.used_gb,allowedUsage:o.allowed_gb,note:`Renews on ${_}`,used_gb_formatted:o.used_gb_formatted}),o.additional_usage_gb>0&&jsxRuntimeExports.jsx(N,{label:"Additional Usage",usage:o.additional_usage_gb})]}),jsxRuntimeExports.jsx("div",{className:"relative mt-4 mb-2 before:absolute before:left-0 before:right-0 before:top-0 before:h-[2px] before:bg-gradient-to-r before:from-white before:via-brand-200 before:to-white dark:before:bg-gradient-to-r dark:before:from-brand-800 dark:before:via-brand-900 dark:before:to-brand-800"}),jsxRuntimeExports.jsxs("div",{className:"p-6 ",children:[jsxRuntimeExports.jsx(N,{label:"Images",usage:E.used_gb,allowedUsage:E.allowed_gb,note:`Renews on ${_}`,used_gb_formatted:E.used_gb_formatted}),E.additional_usage_gb>0&&jsxRuntimeExports.jsx(N,{label:"Additional Usage",usage:E.additional_usage_gb})]}),jsxRuntimeExports.jsx("div",{className:"flex justify-end p-6 pt-0 text-sm font-semibold"})]})},ScoreIcon=({className:s})=>jsxRuntimeExports.jsxs("svg",{className:`${s}`,width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M12.8645 3.77819L12.0021 5.0753C12.418 5.90481 12.6216 6.82453 12.5947 7.75207C12.5678 8.67961 12.3112 9.58598 11.8479 10.39H2.13003C1.52787 9.34533 1.27835 8.13447 1.41847 6.93688C1.55859 5.73929 2.08089 4.61874 2.90794 3.74133C3.73498 2.86392 4.82275 2.27637 6.00997 2.06579C7.1972 1.8552 8.42068 2.03279 9.49904 2.57222L10.7962 1.70982C9.47554 0.86299 7.90908 0.483523 6.34733 0.632117C4.78558 0.780712 3.31878 1.44878 2.18156 2.52946C1.04434 3.61014 0.302408 5.041 0.0744355 6.59315C-0.153537 8.1453 0.145625 9.72906 0.924068 11.0911C1.04642 11.303 1.22212 11.4793 1.43368 11.6023C1.64524 11.7253 1.88532 11.7908 2.13003 11.7922H11.8409C12.088 11.7932 12.3309 11.7289 12.5452 11.6058C12.7594 11.4826 12.9373 11.3051 13.0608 11.0911C13.7069 9.97203 14.0311 8.69619 13.9977 7.40447C13.9642 6.11274 13.5745 4.85537 12.8715 3.77118L12.8645 3.77819Z",fill:"currentColor",fillOpacity:"0.7"}),jsxRuntimeExports.jsx("path",{d:"M6.00014 8.57379C6.13037 8.70417 6.28503 8.8076 6.45526 8.87817C6.6255 8.94874 6.80797 8.98507 6.99226 8.98507C7.17654 8.98507 7.35901 8.94874 7.52925 8.87817C7.69948 8.8076 7.85414 8.70417 7.98437 8.57379L11.9528 2.62109L6.00014 6.58956C5.86976 6.7198 5.76633 6.87445 5.69576 7.04469C5.62519 7.21492 5.58887 7.3974 5.58887 7.58168C5.58887 7.76596 5.62519 7.94843 5.69576 8.11867C5.76633 8.2889 5.86976 8.44356 6.00014 8.57379Z",fill:"currentColor",fillOpacity:"0.7"})]}),CustomCheckIcon=({className:s,isDark:a})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 1.57895L3.83716 9.5L0 5.55449L1.20657 4.33219L3.69573 6.89165L8.66867 0.5L10 1.57895Z",fill:a?"white":"black",fillOpacity:"0.6"})}),ComparisonTable=()=>{const{isDark:s}=useRootContext(),a=[{feature:"Unused CSS generation",starter:!0,accelerate:!0,turboMax:!0},{feature:"Minifying CSS",starter:!0,accelerate:!0,turboMax:!0},{feature:"Minifying JavaScript",starter:!0,accelerate:!0,turboMax:!0},{feature:"Page Cache Generated",starter:!0,accelerate:!0,turboMax:!0},{feature:"Google Fonts self-hosted",starter:!0,accelerate:!0,turboMax:!0},{feature:"Files served through CDN",starter:!1,accelerate:!0,turboMax:!0},{feature:"Images served in Next-Gen format",starter:!1,accelerate:!0,turboMax:!0},{feature:"Images Lazy-loaded",starter:!1,accelerate:!0,turboMax:!0},{feature:"JavaScript files Deferred",starter:!1,accelerate:!0,turboMax:!0},{feature:"Critical CSS files generated",starter:!1,accelerate:!1,turboMax:!0},{feature:"JavaScript files delayed",starter:!1,accelerate:!1,turboMax:!0}];return jsxRuntimeExports.jsx("div",{className:"overflow-x-auto px-10 dark:text-brand-300",children:jsxRuntimeExports.jsxs("table",{className:"min-w-full ",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{className:"text-sm font-semibold dark:text-brand-300",children:[jsxRuntimeExports.jsx("th",{className:"p-2 pb-4"}),jsxRuntimeExports.jsx("th",{className:"p-2 pb-4",children:"Starter"}),jsxRuntimeExports.jsx("th",{className:"p-2 pb-4",children:"Accelerate"}),jsxRuntimeExports.jsx("th",{className:"p-2 pb-4",children:"TurboMax"})]})}),jsxRuntimeExports.jsx("tbody",{children:a.map((i,o)=>jsxRuntimeExports.jsxs("tr",{className:"text-center text-sm item-center",children:[jsxRuntimeExports.jsx("td",{className:"p-2 pl-6 border-b border-t border-gray-200 text-left dark:border-brand-600",children:i.feature}),jsxRuntimeExports.jsx("td",{className:"p-2 border-b border-t border-gray-200 dark:border-brand-600",children:jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center h-full",children:i.starter&&jsxRuntimeExports.jsx(CustomCheckIcon,{isDark:s,className:"h-3 w-3 text-brand-600"})})}),jsxRuntimeExports.jsx("td",{className:"p-2 border-b border-t border-gray-200 dark:border-brand-600",children:jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center h-full",children:i.accelerate&&jsxRuntimeExports.jsx(CustomCheckIcon,{isDark:s,className:"h-3 w-3 text-brand-600"})})}),jsxRuntimeExports.jsx("td",{className:"p-2 border-b border-t border-gray-200 dark:border-brand-600",children:jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center h-full",children:i.turboMax&&jsxRuntimeExports.jsx(CustomCheckIcon,{isDark:s,className:"h-3 w-3 text-brand-600"})})})]},o))})]})})},ComparisonDialog=({open:s,setOpen:a})=>jsxRuntimeExports.jsxs(Dialog,{open:s,onOpenChange:a,children:[jsxRuntimeExports.jsx(DialogTitle,{}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[650px] sm:rounded-3xl gap-0",children:[jsxRuntimeExports.jsxs(DialogHeader,{className:"px-10 pt-6",children:[jsxRuntimeExports.jsx(DialogTitle,{children:"Compare Performance Gears"}),jsxRuntimeExports.jsx(DialogDescription,{children:"Here is our Gear Mode Comparison Table, providing a clear and concise overview at a glance."})]}),jsxRuntimeExports.jsx("div",{className:"pt-2",children:jsxRuntimeExports.jsx(ComparisonTable,{})}),jsxRuntimeExports.jsx(DialogFooter,{className:"p-6",children:jsxRuntimeExports.jsx(AppButton,{onClick:()=>a(!1),variant:"outline",className:"text-sm",children:"Close"})})]})]}),boosterLevels$1=["starter","accelerate","turboMax"],Steps=["Analyze with Google PageSpeed","Change performance gear to TurboMax","Apply DOM optimizations","Generate Critical CSS","Generate Unused CSS","Optimize Images","All Optimizations are completed"],GEAR_FEATURES={turboMax:["Starter + Accelerator Optimizations","Files served through CDN","Images served in Next-Gen format","Images Lazy-loaded","JavaScript files Deferred","Critical CSS files generated","JavaScript files delayed"],accelerate:["Starter Optimizations","Files served through CDN","Images served in Next-Gen format","Images Lazy-loaded","JavaScript files Deferred"],starter:["Unused CSS generation","Minifying CSS","Minifying JavaScript","Page Cache Generated","Google Fonts self-hosted"],custom:[]},PerformanceGears=({className:s})=>{const{activeGear:a,settings:i}=useSelector(optimizerData);reactExports.useState(a||"accelerate"),reactExports.useState(!0),reactExports.useState(-1),reactExports.useState(!1),reactExports.useState(Steps),useCommonDispatch();const[o,E]=reactExports.useState(!1),{isDark:j}=useRootContext();reactExports.useEffect(()=>{},[a]);const R=reactExports.useMemo(()=>T=>{const P={cls:`w-12 h-12 ${a===T?"text-purple-600":"text-gray-400"}`};switch(T){case"starter":return jsxRuntimeExports.jsx(Starter,{...P,isDark:j});case"accelerate":return jsxRuntimeExports.jsx(Accelerate,{...P,isDark:j});case"turboMax":return jsxRuntimeExports.jsx(TurboMax,{...P,isDark:j});case"custom":return jsxRuntimeExports.jsx(Custom,{...P,isDark:j})}},[a,j]),C=reactExports.useCallback((T,P)=>jsxRuntimeExports.jsx("div",{className:cn("relative flex flex-col gap-3 font-normal cursor-pointer w-[135px] h-[135px] rounded-3xl items-center justify-center","hover:bg-brand-100/50 bg-brand-0 dark:bg-brand-950 dark:hover:bg-brand-800/50 dark:text-brand-300",a===T?"text-brand-600 border-[3px] border-[#592d8d]":"border border-brand-200 dark:border-brand-950"),children:jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col items-center justify-center",a===T?"opacity-100":"opacity-20"),children:[jsxRuntimeExports.jsxs("div",{children:[R(T),a===T&&jsxRuntimeExports.jsx("div",{className:"absolute top-2.5 right-2.5",children:jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-6 h-6 text-purple-800"})})]}),jsxRuntimeExports.jsx("span",{className:"capitalize",children:T})]})},T),[a,R]),S=({gearName:T,features:P})=>{const[N,I]=reactExports.useState(!1),M=T==="custom"?i.filter(O=>{var L;return(L=O.inputs[0])==null?void 0:L.value}).map(O=>O.name):P,D=6,B=M.length>D,F=()=>{I(!N)};return jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsxs("h4",{className:"text-base font-semibold capitalize",children:[T," Features"]}),jsxRuntimeExports.jsx("ul",{className:"space-y-1 py-2 text-sm font-medium",children:M.slice(0,N?M.length:D).map((O,L)=>jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(CustomCheckIcon,{className:"h-3 w-3 text-brand-600",isDark:j}),O]},L))}),B&&jsxRuntimeExports.jsx("div",{className:cn("w-full ",N?"py-1":"py-4 absolute bg-gradient-to-b from-transparent to-brand-0 -mt-10 dark:bg-gradient-to-b dark:from-transparent dark:to-brand-800"),children:jsxRuntimeExports.jsx("button",{onClick:F,className:"text-brand-950 text-sm mx-auto block underline dark:text-white pl-10",children:jsxRuntimeExports.jsx(ChevronDown,{className:cn("w-4 h-4 transition-transform",N?"rotate-180":"")})})})]})},_=({activeGear:T})=>{const P=GEAR_FEATURES[T]||[];return jsxRuntimeExports.jsx(S,{gearName:T,features:P})};return jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col items-center justify-between",s),children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col p-6 pb-0 text-md gap-4 bg-white dark:bg-brand-800 border-b-0 border-t-0 border w-full overflow-hidden relative before:absolute before:left-0 before:right-0 before:top-0 before:h-[2px] before:bg-gradient-to-r before:from-white before:via-brand-200 before:to-white dark:before:bg-gradient-to-r dark:before:from-brand-800 dark:before:via-brand-900 dark:before:to-brand-800",children:[jsxRuntimeExports.jsxs("h4",{className:cn("text-base font-semibold flex gap-1 dark:text-brand-300",a==="custom"?"text-purple-900":"text-brand-400"),children:["You’ve activated ",jsxRuntimeExports.jsxs("span",{className:"capitalize text-brand-950 dark:text-brand-300",children:[a," ",a==="custom"?"Settings":"Gear"]})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col w-full",children:jsxRuntimeExports.jsx("div",{className:"flex gap-3 w-full pointer-events-none	",children:boosterLevels$1.map(C)})}),jsxRuntimeExports.jsx("div",{className:"px-2",children:jsxRuntimeExports.jsx(_,{activeGear:a})})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col p-6 text-md gap-4 bg-white dark:bg-brand-800 rounded-b-3xl border border-t-0 w-full overflow-hidden relative before:absolute before:left-0 before:right-0 before:top-0 before:h-[2px] before:bg-gradient-to-r before:from-white before:via-brand-200 before:to-white dark:before:bg-gradient-to-r dark:before:from-brand-800 dark:before:via-brand-900 dark:before:to-brand-800",children:jsxRuntimeExports.jsxs("div",{className:"flex gap-6 justify-end",children:[jsxRuntimeExports.jsx("button",{className:"cursor-pointer transition duration-300 text-sm font-semibold text-brand-500 py-1.5",onClick:()=>E(!0),children:"Compare performance gears"}),jsxRuntimeExports.jsx(ComparisonDialog,{open:o,setOpen:E}),jsxRuntimeExports.jsx("button",{onClick:()=>window.location.hash="#/optimize",className:"cursor-pointer transition duration-300 bg-brand-100/90 text-sm font-semibold py-1.5 px-4 rounded-lg text-brand-950 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300",children:"Change Gear"})]})})]})},PerformanceGears$1=React8.memo(PerformanceGears);function _typeof(s){"@babel/helpers - typeof";return _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},_typeof(s)}var trimLeft=/^\s+/,trimRight=/\s+$/;function tinycolor(s,a){if(s=s||"",a=a||{},s instanceof tinycolor)return s;if(!(this instanceof tinycolor))return new tinycolor(s,a);var i=inputToRGB(s);this._originalInput=s,this._r=i.r,this._g=i.g,this._b=i.b,this._a=i.a,this._roundA=Math.round(100*this._a)/100,this._format=a.format||i.format,this._gradientType=a.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=i.ok}tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var a=this.toRgb();return(a.r*299+a.g*587+a.b*114)/1e3},getLuminance:function(){var a=this.toRgb(),i,o,E,j,R,C;return i=a.r/255,o=a.g/255,E=a.b/255,i<=.03928?j=i/12.92:j=Math.pow((i+.055)/1.055,2.4),o<=.03928?R=o/12.92:R=Math.pow((o+.055)/1.055,2.4),E<=.03928?C=E/12.92:C=Math.pow((E+.055)/1.055,2.4),.2126*j+.7152*R+.0722*C},setAlpha:function(a){return this._a=boundAlpha(a),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var a=rgbToHsv(this._r,this._g,this._b);return{h:a.h*360,s:a.s,v:a.v,a:this._a}},toHsvString:function(){var a=rgbToHsv(this._r,this._g,this._b),i=Math.round(a.h*360),o=Math.round(a.s*100),E=Math.round(a.v*100);return this._a==1?"hsv("+i+", "+o+"%, "+E+"%)":"hsva("+i+", "+o+"%, "+E+"%, "+this._roundA+")"},toHsl:function(){var a=rgbToHsl(this._r,this._g,this._b);return{h:a.h*360,s:a.s,l:a.l,a:this._a}},toHslString:function(){var a=rgbToHsl(this._r,this._g,this._b),i=Math.round(a.h*360),o=Math.round(a.s*100),E=Math.round(a.l*100);return this._a==1?"hsl("+i+", "+o+"%, "+E+"%)":"hsla("+i+", "+o+"%, "+E+"%, "+this._roundA+")"},toHex:function(a){return rgbToHex(this._r,this._g,this._b,a)},toHexString:function(a){return"#"+this.toHex(a)},toHex8:function(a){return rgbaToHex(this._r,this._g,this._b,this._a,a)},toHex8String:function(a){return"#"+this.toHex8(a)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(bound01(this._r,255)*100)+"%",g:Math.round(bound01(this._g,255)*100)+"%",b:Math.round(bound01(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(bound01(this._r,255)*100)+"%, "+Math.round(bound01(this._g,255)*100)+"%, "+Math.round(bound01(this._b,255)*100)+"%)":"rgba("+Math.round(bound01(this._r,255)*100)+"%, "+Math.round(bound01(this._g,255)*100)+"%, "+Math.round(bound01(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1},toFilter:function(a){var i="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),o=i,E=this._gradientType?"GradientType = 1, ":"";if(a){var j=tinycolor(a);o="#"+rgbaToArgbHex(j._r,j._g,j._b,j._a)}return"progid:DXImageTransform.Microsoft.gradient("+E+"startColorstr="+i+",endColorstr="+o+")"},toString:function(a){var i=!!a;a=a||this._format;var o=!1,E=this._a<1&&this._a>=0,j=!i&&E&&(a==="hex"||a==="hex6"||a==="hex3"||a==="hex4"||a==="hex8"||a==="name");return j?a==="name"&&this._a===0?this.toName():this.toRgbString():(a==="rgb"&&(o=this.toRgbString()),a==="prgb"&&(o=this.toPercentageRgbString()),(a==="hex"||a==="hex6")&&(o=this.toHexString()),a==="hex3"&&(o=this.toHexString(!0)),a==="hex4"&&(o=this.toHex8String(!0)),a==="hex8"&&(o=this.toHex8String()),a==="name"&&(o=this.toName()),a==="hsl"&&(o=this.toHslString()),a==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},clone:function(){return tinycolor(this.toString())},_applyModification:function(a,i){var o=a.apply(null,[this].concat([].slice.call(i)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(a,i){return a.apply(null,[this].concat([].slice.call(i)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}};tinycolor.fromRatio=function(s,a){if(_typeof(s)=="object"){var i={};for(var o in s)s.hasOwnProperty(o)&&(o==="a"?i[o]=s[o]:i[o]=convertToPercentage(s[o]));s=i}return tinycolor(s,a)};function inputToRGB(s){var a={r:0,g:0,b:0},i=1,o=null,E=null,j=null,R=!1,C=!1;return typeof s=="string"&&(s=stringInputToObject(s)),_typeof(s)=="object"&&(isValidCSSUnit(s.r)&&isValidCSSUnit(s.g)&&isValidCSSUnit(s.b)?(a=rgbToRgb(s.r,s.g,s.b),R=!0,C=String(s.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(s.h)&&isValidCSSUnit(s.s)&&isValidCSSUnit(s.v)?(o=convertToPercentage(s.s),E=convertToPercentage(s.v),a=hsvToRgb(s.h,o,E),R=!0,C="hsv"):isValidCSSUnit(s.h)&&isValidCSSUnit(s.s)&&isValidCSSUnit(s.l)&&(o=convertToPercentage(s.s),j=convertToPercentage(s.l),a=hslToRgb(s.h,o,j),R=!0,C="hsl"),s.hasOwnProperty("a")&&(i=s.a)),i=boundAlpha(i),{ok:R,format:s.format||C,r:Math.min(255,Math.max(a.r,0)),g:Math.min(255,Math.max(a.g,0)),b:Math.min(255,Math.max(a.b,0)),a:i}}function rgbToRgb(s,a,i){return{r:bound01(s,255)*255,g:bound01(a,255)*255,b:bound01(i,255)*255}}function rgbToHsl(s,a,i){s=bound01(s,255),a=bound01(a,255),i=bound01(i,255);var o=Math.max(s,a,i),E=Math.min(s,a,i),j,R,C=(o+E)/2;if(o==E)j=R=0;else{var S=o-E;switch(R=C>.5?S/(2-o-E):S/(o+E),o){case s:j=(a-i)/S+(a<i?6:0);break;case a:j=(i-s)/S+2;break;case i:j=(s-a)/S+4;break}j/=6}return{h:j,s:R,l:C}}function hslToRgb(s,a,i){var o,E,j;s=bound01(s,360),a=bound01(a,100),i=bound01(i,100);function R(_,T,P){return P<0&&(P+=1),P>1&&(P-=1),P<1/6?_+(T-_)*6*P:P<1/2?T:P<2/3?_+(T-_)*(2/3-P)*6:_}if(a===0)o=E=j=i;else{var C=i<.5?i*(1+a):i+a-i*a,S=2*i-C;o=R(S,C,s+1/3),E=R(S,C,s),j=R(S,C,s-1/3)}return{r:o*255,g:E*255,b:j*255}}function rgbToHsv(s,a,i){s=bound01(s,255),a=bound01(a,255),i=bound01(i,255);var o=Math.max(s,a,i),E=Math.min(s,a,i),j,R,C=o,S=o-E;if(R=o===0?0:S/o,o==E)j=0;else{switch(o){case s:j=(a-i)/S+(a<i?6:0);break;case a:j=(i-s)/S+2;break;case i:j=(s-a)/S+4;break}j/=6}return{h:j,s:R,v:C}}function hsvToRgb(s,a,i){s=bound01(s,360)*6,a=bound01(a,100),i=bound01(i,100);var o=Math.floor(s),E=s-o,j=i*(1-a),R=i*(1-E*a),C=i*(1-(1-E)*a),S=o%6,_=[i,R,j,j,C,i][S],T=[C,i,i,R,j,j][S],P=[j,j,C,i,i,R][S];return{r:_*255,g:T*255,b:P*255}}function rgbToHex(s,a,i,o){var E=[pad2(Math.round(s).toString(16)),pad2(Math.round(a).toString(16)),pad2(Math.round(i).toString(16))];return o&&E[0].charAt(0)==E[0].charAt(1)&&E[1].charAt(0)==E[1].charAt(1)&&E[2].charAt(0)==E[2].charAt(1)?E[0].charAt(0)+E[1].charAt(0)+E[2].charAt(0):E.join("")}function rgbaToHex(s,a,i,o,E){var j=[pad2(Math.round(s).toString(16)),pad2(Math.round(a).toString(16)),pad2(Math.round(i).toString(16)),pad2(convertDecimalToHex(o))];return E&&j[0].charAt(0)==j[0].charAt(1)&&j[1].charAt(0)==j[1].charAt(1)&&j[2].charAt(0)==j[2].charAt(1)&&j[3].charAt(0)==j[3].charAt(1)?j[0].charAt(0)+j[1].charAt(0)+j[2].charAt(0)+j[3].charAt(0):j.join("")}function rgbaToArgbHex(s,a,i,o){var E=[pad2(convertDecimalToHex(o)),pad2(Math.round(s).toString(16)),pad2(Math.round(a).toString(16)),pad2(Math.round(i).toString(16))];return E.join("")}tinycolor.equals=function(s,a){return!s||!a?!1:tinycolor(s).toRgbString()==tinycolor(a).toRgbString()};tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function _desaturate(s,a){a=a===0?0:a||10;var i=tinycolor(s).toHsl();return i.s-=a/100,i.s=clamp01(i.s),tinycolor(i)}function _saturate(s,a){a=a===0?0:a||10;var i=tinycolor(s).toHsl();return i.s+=a/100,i.s=clamp01(i.s),tinycolor(i)}function _greyscale(s){return tinycolor(s).desaturate(100)}function _lighten(s,a){a=a===0?0:a||10;var i=tinycolor(s).toHsl();return i.l+=a/100,i.l=clamp01(i.l),tinycolor(i)}function _brighten(s,a){a=a===0?0:a||10;var i=tinycolor(s).toRgb();return i.r=Math.max(0,Math.min(255,i.r-Math.round(255*-(a/100)))),i.g=Math.max(0,Math.min(255,i.g-Math.round(255*-(a/100)))),i.b=Math.max(0,Math.min(255,i.b-Math.round(255*-(a/100)))),tinycolor(i)}function _darken(s,a){a=a===0?0:a||10;var i=tinycolor(s).toHsl();return i.l-=a/100,i.l=clamp01(i.l),tinycolor(i)}function _spin(s,a){var i=tinycolor(s).toHsl(),o=(i.h+a)%360;return i.h=o<0?360+o:o,tinycolor(i)}function _complement(s){var a=tinycolor(s).toHsl();return a.h=(a.h+180)%360,tinycolor(a)}function polyad(s,a){if(isNaN(a)||a<=0)throw new Error("Argument to polyad must be a positive number");for(var i=tinycolor(s).toHsl(),o=[tinycolor(s)],E=360/a,j=1;j<a;j++)o.push(tinycolor({h:(i.h+j*E)%360,s:i.s,l:i.l}));return o}function _splitcomplement(s){var a=tinycolor(s).toHsl(),i=a.h;return[tinycolor(s),tinycolor({h:(i+72)%360,s:a.s,l:a.l}),tinycolor({h:(i+216)%360,s:a.s,l:a.l})]}function _analogous(s,a,i){a=a||6,i=i||30;var o=tinycolor(s).toHsl(),E=360/i,j=[tinycolor(s)];for(o.h=(o.h-(E*a>>1)+720)%360;--a;)o.h=(o.h+E)%360,j.push(tinycolor(o));return j}function _monochromatic(s,a){a=a||6;for(var i=tinycolor(s).toHsv(),o=i.h,E=i.s,j=i.v,R=[],C=1/a;a--;)R.push(tinycolor({h:o,s:E,v:j})),j=(j+C)%1;return R}tinycolor.mix=function(s,a,i){i=i===0?0:i||50;var o=tinycolor(s).toRgb(),E=tinycolor(a).toRgb(),j=i/100,R={r:(E.r-o.r)*j+o.r,g:(E.g-o.g)*j+o.g,b:(E.b-o.b)*j+o.b,a:(E.a-o.a)*j+o.a};return tinycolor(R)};tinycolor.readability=function(s,a){var i=tinycolor(s),o=tinycolor(a);return(Math.max(i.getLuminance(),o.getLuminance())+.05)/(Math.min(i.getLuminance(),o.getLuminance())+.05)};tinycolor.isReadable=function(s,a,i){var o=tinycolor.readability(s,a),E,j;switch(j=!1,E=validateWCAG2Parms(i),E.level+E.size){case"AAsmall":case"AAAlarge":j=o>=4.5;break;case"AAlarge":j=o>=3;break;case"AAAsmall":j=o>=7;break}return j};tinycolor.mostReadable=function(s,a,i){var o=null,E=0,j,R,C,S;i=i||{},R=i.includeFallbackColors,C=i.level,S=i.size;for(var _=0;_<a.length;_++)j=tinycolor.readability(s,a[_]),j>E&&(E=j,o=tinycolor(a[_]));return tinycolor.isReadable(s,o,{level:C,size:S})||!R?o:(i.includeFallbackColors=!1,tinycolor.mostReadable(s,["#fff","#000"],i))};var names=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",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",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",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:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hexNames=tinycolor.hexNames=flip(names);function flip(s){var a={};for(var i in s)s.hasOwnProperty(i)&&(a[s[i]]=i);return a}function boundAlpha(s){return s=parseFloat(s),(isNaN(s)||s<0||s>1)&&(s=1),s}function bound01(s,a){isOnePointZero(s)&&(s="100%");var i=isPercentage(s);return s=Math.min(a,Math.max(0,parseFloat(s))),i&&(s=parseInt(s*a,10)/100),Math.abs(s-a)<1e-6?1:s%a/parseFloat(a)}function clamp01(s){return Math.min(1,Math.max(0,s))}function parseIntFromHex(s){return parseInt(s,16)}function isOnePointZero(s){return typeof s=="string"&&s.indexOf(".")!=-1&&parseFloat(s)===1}function isPercentage(s){return typeof s=="string"&&s.indexOf("%")!=-1}function pad2(s){return s.length==1?"0"+s:""+s}function convertToPercentage(s){return s<=1&&(s=s*100+"%"),s}function convertDecimalToHex(s){return Math.round(parseFloat(s)*255).toString(16)}function convertHexToDecimal(s){return parseIntFromHex(s)/255}var matchers=function(){var s="[-\\+]?\\d+%?",a="[-\\+]?\\d*\\.\\d+%?",i="(?:"+a+")|(?:"+s+")",o="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?",E="[\\s|\\(]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")[,|\\s]+("+i+")\\s*\\)?";return{CSS_UNIT:new RegExp(i),rgb:new RegExp("rgb"+o),rgba:new RegExp("rgba"+E),hsl:new RegExp("hsl"+o),hsla:new RegExp("hsla"+E),hsv:new RegExp("hsv"+o),hsva:new RegExp("hsva"+E),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function isValidCSSUnit(s){return!!matchers.CSS_UNIT.exec(s)}function stringInputToObject(s){s=s.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var a=!1;if(names[s])s=names[s],a=!0;else if(s=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var i;return(i=matchers.rgb.exec(s))?{r:i[1],g:i[2],b:i[3]}:(i=matchers.rgba.exec(s))?{r:i[1],g:i[2],b:i[3],a:i[4]}:(i=matchers.hsl.exec(s))?{h:i[1],s:i[2],l:i[3]}:(i=matchers.hsla.exec(s))?{h:i[1],s:i[2],l:i[3],a:i[4]}:(i=matchers.hsv.exec(s))?{h:i[1],s:i[2],v:i[3]}:(i=matchers.hsva.exec(s))?{h:i[1],s:i[2],v:i[3],a:i[4]}:(i=matchers.hex8.exec(s))?{r:parseIntFromHex(i[1]),g:parseIntFromHex(i[2]),b:parseIntFromHex(i[3]),a:convertHexToDecimal(i[4]),format:a?"name":"hex8"}:(i=matchers.hex6.exec(s))?{r:parseIntFromHex(i[1]),g:parseIntFromHex(i[2]),b:parseIntFromHex(i[3]),format:a?"name":"hex"}:(i=matchers.hex4.exec(s))?{r:parseIntFromHex(i[1]+""+i[1]),g:parseIntFromHex(i[2]+""+i[2]),b:parseIntFromHex(i[3]+""+i[3]),a:convertHexToDecimal(i[4]+""+i[4]),format:a?"name":"hex8"}:(i=matchers.hex3.exec(s))?{r:parseIntFromHex(i[1]+""+i[1]),g:parseIntFromHex(i[2]+""+i[2]),b:parseIntFromHex(i[3]+""+i[3]),format:a?"name":"hex"}:!1}function validateWCAG2Parms(s){var a,i;return s=s||{level:"AA",size:"small"},a=(s.level||"AA").toUpperCase(),i=(s.size||"small").toLowerCase(),a!=="AA"&&a!=="AAA"&&(a="AA"),i!=="small"&&i!=="large"&&(i="small"),{level:a,size:i}}const PerformanceWidget=({className:s})=>{const{homePerformance:a}=useSelector(optimizerData),i=a.last_entry,[o,E,j]=usePerformanceColors(i),R=tinycolor(j).lighten(10).toString(),{dispatch:C}=useCommonDispatch(),{options:S}=useAppContext();return reactExports.useEffect(()=>{C(getHomePagePerformance(S))},[C]),reactExports.useEffect(()=>{},[a]),jsxRuntimeExports.jsx("div",{className:cn("flex flex-col gap-2 ",s),children:jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center text-md gap-2 bg-white dark:bg-brand-800 rounded-t-3xl border border-b-0 w-full overflow-hidden relative",children:jsxRuntimeExports.jsxs("div",{className:"flex justify-center p-4 max-w-xl mx-auto w-full relative ",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2 px-10 py-4 rounded-2xl w-[230px]",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-semibold",children:"Before Results"}),jsxRuntimeExports.jsx("div",{className:"",children:a.first_entry<1?jsxRuntimeExports.jsx(Skeleton,{className:"w-[140px] h-[140px] rounded-full"}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:cn("max-h-[140px]"),background:!1,stroke:6,performance:a.first_entry})}),jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600",children:a.first_response_time=="0"?jsxRuntimeExports.jsx(Skeleton,{className:"w-[140px] h-[20px] rounded-lg"}):jsxRuntimeExports.jsxs("div",{children:["Loading time: ",a.first_response_time]})})]}),a.last_entry&&a.last_entry>a.first_entry?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 p-2 rounded-full text-white z-10",style:{background:`linear-gradient(to right, ${E}, ${R})`},children:jsxRuntimeExports.jsx(ForwardRef$A,{className:"h-6 w-6 text-white"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2 px-10 py-4 rounded-2xl w-[230px]",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-semibold",children:"Optimized Score"}),jsxRuntimeExports.jsx("div",{className:"",children:a.last_entry<1?jsxRuntimeExports.jsx(Skeleton,{className:"w-[140px] h-[140px] rounded-full"}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:cn("max-h-[140px]"),scoreClassName:"text-brand-950",background:!1,stroke:6,performance:a.last_entry})}),jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600",children:a.last_response_time=="0"?jsxRuntimeExports.jsx(Skeleton,{className:"w-[140px] h-[20px] rounded-lg"}):jsxRuntimeExports.jsxs("div",{children:["Loading time: ",a.last_response_time]})})]})]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})]})})})},PerformanceWidget$1=React8.memo(PerformanceWidget),AIBot=({className:s})=>{const[a,i]=reactExports.useState(!1),[o,E]=reactExports.useState(()=>{const R=localStorage.getItem("chat-conversations");return R?JSON.parse(R):[]}),j=R=>{window.location.hash=`#/rapidload-ai?conv=${R.id}`,i(!1)};return jsxRuntimeExports.jsx("div",{className:cn("w-full flex flex-col gap-4",s),children:jsxRuntimeExports.jsxs(Card,{"data-tour":"AIBot",className:"border flex flex-col gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center p-6 gap-2 relative",children:[jsxRuntimeExports.jsx("button",{onClick:()=>i(!0),className:"flex gap-1 m-6 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 my-0 right-0 absolute cursor-pointer border text-brand-950 py-1.5 px-2 rounded-lg text-xs font-medium hover:bg-gray-100",children:jsxRuntimeExports.jsx(ForwardRef$b,{className:"h-4 w-4 text-brand-950 dark:text-brand-300"})}),jsxRuntimeExports.jsx(Dialog,{open:a,onOpenChange:i,children:jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[425px] p-6",children:[jsxRuntimeExports.jsx(DialogHeader,{children:jsxRuntimeExports.jsx(DialogTitle,{children:"Chat History"})}),jsxRuntimeExports.jsx("div",{className:"space-y-2 max-h-[400px] overflow-y-auto",children:o.length===0?jsxRuntimeExports.jsx("div",{className:"text-center text-gray-500 py-4",children:"No chat history yet"}):o.map(R=>jsxRuntimeExports.jsxs("div",{onClick:()=>j(R),className:"flex items-center gap-2 p-3 border rounded-lg hover:bg-gray-100 cursor-pointer dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",children:[jsxRuntimeExports.jsx(MessagesSquare,{className:"h-4 w-4 text-brand-950 dark:text-brand-300"}),jsxRuntimeExports.jsx("span",{className:"text-sm truncate",children:R.title})]},R.id))})]})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-2 py-[83px]",children:[jsxRuntimeExports.jsx(AnimatedLogo,{className:"!opacity-100",size:"lg",isPlaying:!1}),jsxRuntimeExports.jsxs("div",{className:"dark:text-brand-300 text-center flex flex-col",children:[jsxRuntimeExports.jsx("h2",{className:"text-base font-semibold",children:"Chat with Rapidload AI"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-brand-500 dark:text-brand-300/80",children:"Understands your page speed and website issues to help you improve speed"})]})]})]}),jsxRuntimeExports.jsx("div",{className:"w-full max-w-md mx-auto p-6 pt-0",children:jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx("input",{type:"text",onClick:()=>window.location.hash="#/rapidload-ai",placeholder:"Ask about anything...",className:"w-full p-2 border border-brand-200 dark:bg-brand-600/40 dark:text-brand-300 dark:border-brand-700 rounded-full focus:outline-none focus:border-black bg-brand-100 pr-10 pl-4"}),jsxRuntimeExports.jsx(ForwardRef$B,{className:"cursor-pointer h-10 w-10 text-brand-950 absolute right-0 top-1/2 transform -translate-y-1/2 dark:text-brand-300"})]})})]})})},DbUpdate=({open:s,onOpenChange:a})=>{const[i,o]=reactExports.useState(!1),{options:E}=useAppContext(),j=E==null?void 0:E.optimizer_url,R=async()=>{o(!0);const C=new ApiService(E);let S;try{S=await C.post("rapidload_db_update",{url:j}),toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center items-center",children:[jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-5 text-green-600"})," Database has been updated successfully"]})}),a(!1)}catch{toast({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center items-center",children:[jsxRuntimeExports.jsx(CircleX,{className:"w-5 text-red-600"})," An error occurred while updating the database. ",S]})})}finally{o(!1)}};return jsxRuntimeExports.jsxs(Dialog,{open:s,onOpenChange:a,children:[jsxRuntimeExports.jsx(DialogTrigger,{asChild:!0}),jsxRuntimeExports.jsx(DialogTitle,{}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[450px]",children:[jsxRuntimeExports.jsx(DialogHeader,{className:"border-b px-6 py-4 mt-1",children:jsxRuntimeExports.jsx(DialogTitle,{children:"RapidLoad Database Update"})}),jsxRuntimeExports.jsx("div",{className:"px-6 py-2 text-sm font-normal select-none",children:"A new version has been released. To work without issues, please update your database by clicking the update button."}),jsxRuntimeExports.jsxs(DialogFooter,{className:"p-6 pt-0 flex gap-2",children:[jsxRuntimeExports.jsxs(AppButton,{onClick:R,className:"text-sm font-semibold text-white py-1.5 px-4 rounded-lg",children:[i&&jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin "})," Update"]}),jsxRuntimeExports.jsx(AppButton,{onClick:()=>a(!1),variant:"outline",className:"text-sm",children:"Close"})]})]})]})};function Dashboard(){useSelector(optimizerData);const{license:s}=useSelector(optimizerData),{options:a,savingData:i,togglePerformance:o,optimizerContainer:E,invalidatingCache:j}=useAppContext(),[R,C]=reactExports.useState({dbUpdate:(a==null?void 0:a.db_to_be_updated)==="1"});a==null||a.optimizer_url,useDispatch(),reactExports.useEffect(()=>{if(i){const _=document.getElementById("rapidload-page-optimizer-content");_==null||_.scrollTo(0,0)}},[i]);const S=(_,T)=>{C(P=>({...P,[_]:T}))};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(m$3.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"linear",duration:.04},id:"rapidload-page-optimizer-wrapper",className:cn("h-fit font-sans overflow-hidden flex flex-col text-base items-center "),children:[jsxRuntimeExports.jsx("div",{id:"rapidload-page-optimizer-content",className:cn("overflow-y-auto w-full pb-20 min-h-[780px] flex items-center",i&&"relative overflow-hidden"),children:jsxRuntimeExports.jsxs("section",{ref:E,className:cn("relative container flex flex-col mt-4 gap-4"),children:[jsxRuntimeExports.jsxs("div",{className:"flex justify-between gap-4 h-full",children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4",children:[jsxRuntimeExports.jsx("div",{className:s!=null&&s.licensedDomain?"":"pointer-events-auto z-50",children:jsxRuntimeExports.jsx(LicenseWidget,{})}),jsxRuntimeExports.jsx("div",{className:"flex-shrink-0",children:jsxRuntimeExports.jsx(AIBot,{className:"flex-grow"})})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col w-full gap-4",children:[jsxRuntimeExports.jsx(CacheSummary,{className:"flex-grow"}),jsxRuntimeExports.jsx(CDNSummary,{className:"flex-grow"})]}),jsxRuntimeExports.jsxs("div",{className:"",children:[jsxRuntimeExports.jsx(PerformanceWidget$1,{className:"flex-grow"}),jsxRuntimeExports.jsx(PerformanceGears$1,{className:"flex-grow"})]})]}),jsxRuntimeExports.jsx(DbUpdate,{open:R.dbUpdate,onOpenChange:_=>S("dbUpdate",_)})]})}),jsxRuntimeExports.jsx(Toaster,{})]})})}const StepOne=({onNext:s})=>{const{options:a}=useAppContext(),{dispatch:i}=useCommonDispatch(),{activeReport:o,data:E,error:j,loading:R}=useSelector(optimizerData),[C,S]=reactExports.useState(!0),[_,T]=reactExports.useState(null),[P,N]=reactExports.useState(null),[I,M]=reactExports.useState(95),[D,B]=reactExports.useState(null),[F,O]=reactExports.useState(5),[L,$]=reactExports.useState(!1),[V,G]=reactExports.useState("Rapidload AI"),[K,J]=reactExports.useState(!0);return reactExports.useEffect(()=>{if(C&&!j&&!R){const ne=setInterval(()=>{J(!1),setTimeout(()=>{G(le=>le==="Rapidload AI"?"Analyzing":"Rapidload AI"),J(!0)},30)},3e3);return()=>clearInterval(ne)}},[C,j,R]),reactExports.useEffect(()=>{!R&&E&&setTimeout(()=>{$(!0)},500)},[R,E]),reactExports.useEffect(()=>{if(j){const ne=setInterval(()=>{O(le=>le<=1?(clearInterval(ne),s(),0):le-1)},1e3);return()=>clearInterval(ne)}},[j,s]),reactExports.useEffect(()=>{E&&i(getAiPrediction(a,a.optimizer_url,E.performance,E.grouped,E.metrics)).then(ne=>{T(ne),N(ne.data),S(!1)}).catch(ne=>{B("Error in AI Prediction: "+ne),S(!1)})},[E]),reactExports.useEffect(()=>{_&&_.success&&(M(_.data.predictedScore.predictedPerformanceScore),i(setCommonRootState("aiPredictionResult",_.data)))},[_]),jsxRuntimeExports.jsx("div",{className:"w-full flex flex-col gap-4",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-8 p-16 items-center rounded-3xl",children:[jsxRuntimeExports.jsx("div",{className:"px-2",children:jsxRuntimeExports.jsx("img",{className:"w-22",src:a!=null&&a.page_optimizer_base?(a==null?void 0:a.page_optimizer_base)+"/rapidload-logo.svg":"/rapidload-logo.svg",alt:"RapidLoad - #1 to unlock breakneck page speed"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold",children:"Welcome to RapidLoad"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-base text-zinc-600 dark:text-brand-300",children:"We have analyzed your entire site and this is the current results."})]}),jsxRuntimeExports.jsxs("div",{className:"border rounded-xl p-2 flex items-center gap-4",children:[jsxRuntimeExports.jsx("div",{className:"p-2 bg-brand-200/60 rounded-lg dark:bg-brand-800",children:jsxRuntimeExports.jsx(ForwardRef$r,{className:"w-10 h-10 text-purple-700/90 dark:text-brand-300"})}),jsxRuntimeExports.jsxs("span",{className:"font-medium text-xs text-zinc-600 dark:text-brand-300",children:["Your website (",a==null?void 0:a.optimizer_url,") uses caching. We bypass it to ",jsxRuntimeExports.jsx("br",{})," reveal the unoptimized performance, showing RapidLoad's full ",jsxRuntimeExports.jsx("br",{})," impact."]})]}),j?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"border-2 border-red-500 rounded-xl flex items-start gap-4 p-4",children:[jsxRuntimeExports.jsx("div",{className:"p-2 bg-red-200/30 rounded-lg",children:jsxRuntimeExports.jsx(ForwardRef$s,{className:"w-10 h-10 text-red-500"})}),jsxRuntimeExports.jsx("span",{className:"font-medium text-zinc-600 dark:text-brand-300",children:jsxRuntimeExports.jsx(ErrorFetch,{className:"max-w-[420px] text-sm gap-0  mb-0",error:j,icon:!1})})]}),jsxRuntimeExports.jsxs("div",{children:["Redirecting in ",F," seconds..."]}),jsxRuntimeExports.jsx("div",{className:"flex gap-8 items-center",children:jsxRuntimeExports.jsxs("button",{className:"items-center flex gap-2 hover:bg-gradient-to-br hover:from-[rgba(94,92,92,0.55)]  hover:to-brand-900/90 bg-brand-900/90  text-white font-medium py-2 px-4 rounded-lg transition-all gap-2",onClick:()=>{i(fetchReport(a,a.optimizer_url,!0))},children:[jsxRuntimeExports.jsx(RefreshCw,{className:"w-4 text-brand-0"}),"Refresh to Retry"]})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"bg-brand-0 border rounded-3xl p-2 dark:bg-brand-800",children:jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center text-md gap-2 overflow-hidden relative",children:jsxRuntimeExports.jsxs("div",{className:cn("flex justify-center px-4 py-2 max-w-xl mx-auto w-full relative transition-all duration-500",!L&&"justify-center min-w-[450px]",L&&"justify-between"),children:[jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col items-center gap-4 px-6 rounded-2xl w-[230px] transition-all duration-500",L?"slide-out-from-center":""),children:[jsxRuntimeExports.jsx("div",{className:"",children:j?jsxRuntimeExports.jsx(Skeleton,{className:"w-44 h-44 rounded-full"}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:cn("max-h-44"),performance:E?E==null?void 0:E.performance:90,loading:R})}),jsxRuntimeExports.jsx("div",{className:"text-sm font-semibold border rounded-3xl p-2 py-1 dark:border-brand-600 dark:border",children:"Your Current Score"})]}),L&&jsxRuntimeExports.jsxs("div",{className:cn("flex flex-col items-center gap-4 px-6 rounded-2xl w-[230px] transition-all duration-500","slide-in-from-center"),children:[jsxRuntimeExports.jsx("div",{className:"",children:C||j||R?jsxRuntimeExports.jsx("div",{className:"bg-gradient-to-r from-purple-100 via-purple-60 to-purple-100/10 dark:bg-gradient-to-r dark:from-brand-900/90 dark:via-brand-900/90 dark:to-brand-900/90 relative flex items-center justify-center w-44 h-44 rounded-full",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center text-center text-brand-950 dark:text-brand-300",children:[jsxRuntimeExports.jsx(AnimatedLogo,{size:"xl",isPlaying:C}),jsxRuntimeExports.jsx("div",{className:"text-[10px] bg-[#7F54B3] px-1.5 py-[2px] rounded-[5px] mt-4 tracking-widest text-white uppercase",children:jsxRuntimeExports.jsx("p",{className:`typing-text ${K?"animate":""}`,children:V})})]})}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:cn("max-h-44"),scoreClassName:"text-brand-950",performance:I})}),jsxRuntimeExports.jsx("div",{className:"items-center gap-1 text-sm font-semibold bg-brand-200/60 rounded-3xl p-2 py-1 flex dark:bg-brand-800 dark:border-brand-600 dark:border",children:C||j||R?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin"})," Hold on tight"]}):D&&(D==null?void 0:D.length)>0?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(TooltipText,{text:D,children:[jsxRuntimeExports.jsx(ForwardRef$s,{className:"w-4 text-red-500 cursor-pointer"})," Error in AI Prediction"]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AnimatedLogo,{className:"!opacity-100",size:"sm",isPlaying:!1})," AI Predicted Score"]})})]})]})})}),jsxRuntimeExports.jsxs("button",{className:cn("flex items-center bg-gradient-to-r from-brand-900/90 to-brand-950 text-white font-medium py-2 px-4 rounded-lg hover:bg-gray-700 transition-all gap-2 hover:bg-gradient-to-br hover:from-[rgba(94,92,92,0.55)]  hover:to-brand-900/90 bg-brand-900/90 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300",C&&"pointer-events-none cursor-default opacity-30"),onClick:s,children:["Let’s improve this score",jsxRuntimeExports.jsx(ForwardRef$l,{className:"w-6 h-6"})]})]})]})})},AIButtonIcon=({className:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.97883 0.969238C4.52893 2.9573 5.23746 3.63648 7.19577 4.18617C5.23746 4.73586 4.52893 5.41504 3.97883 7.4031C3.42874 5.41504 2.72021 4.73586 0.761904 4.18617C2.72021 3.63648 3.42874 2.9573 3.97883 0.969238ZM9.60846 4.18617C10.5715 7.66488 11.8105 8.85394 15.2381 9.8158C11.8105 10.7777 10.5715 11.9667 9.60846 15.4454C8.6454 11.9667 7.40648 10.7777 3.97883 9.8158C7.40648 8.85394 8.6454 7.66488 9.60846 4.18617Z",fill:"#8138D9"})}),PerformanceArrowIcon=({className:s,fill:a})=>jsxRuntimeExports.jsxs("svg",{className:`${s}`,width:"110",height:"20",viewBox:"0 0 110 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("path",{d:"M86.5508 9.03908L79.0505 2.78881C78.7955 2.57791 78.4673 2.47663 78.1378 2.50717C77.8084 2.53771 77.5044 2.69757 77.2925 2.95175C77.0807 3.20592 76.9782 3.5337 77.0074 3.86329C77.0367 4.19289 77.1955 4.49745 77.4488 4.71027L83.7967 9.99986L77.4488 15.2894C77.1945 15.502 77.0349 15.8068 77.0051 16.1369C76.9753 16.467 77.0778 16.7954 77.2901 17.05C77.5023 17.3046 77.8069 17.4646 78.137 17.4948C78.467 17.5249 78.7956 17.4228 79.0505 17.2109L86.5508 10.9605C86.6914 10.843 86.8045 10.6961 86.8822 10.5301C86.9598 10.3641 87 10.1831 87 9.99981C87 9.81656 86.9598 9.63553 86.8822 9.46952C86.8045 9.30352 86.6914 9.15658 86.5508 9.03908Z",fill:`${a}`,fillOpacity:"0.9"}),jsxRuntimeExports.jsx("path",{d:"M14.5508 9.03908L7.05046 2.78881C6.79548 2.57791 6.46732 2.47663 6.13784 2.50717C5.80835 2.53771 5.5044 2.69757 5.29253 2.95175C5.08066 3.20592 4.97815 3.5337 5.00745 3.86329C5.03674 4.19289 5.19546 4.49745 5.44883 4.71027L11.7967 9.99986L5.44883 15.2894C5.19448 15.502 5.03489 15.8068 5.00512 16.1369C4.97535 16.467 5.07783 16.7954 5.29005 17.05C5.50228 17.3046 5.80688 17.4646 6.13696 17.4948C6.46704 17.5249 6.7956 17.4228 7.05046 17.2109L14.5508 10.9605C14.6914 10.843 14.8045 10.6961 14.8822 10.5301C14.9598 10.3641 15 10.1831 15 9.99981C15 9.81656 14.9598 9.63553 14.8822 9.46952C14.8045 9.30352 14.6914 9.15658 14.5508 9.03908Z",fill:`${a}`,fillOpacity:"0.5"}),jsxRuntimeExports.jsx("path",{d:"M104.551 9.03908L97.0505 2.78881C96.7955 2.57791 96.4673 2.47663 96.1378 2.50717C95.8084 2.53771 95.5044 2.69757 95.2925 2.95175C95.0807 3.20592 94.9782 3.5337 95.0074 3.86329C95.0367 4.19289 95.1955 4.49745 95.4488 4.71027L101.797 9.99986L95.4488 15.2894C95.1945 15.502 95.0349 15.8068 95.0051 16.1369C94.9753 16.467 95.0778 16.7954 95.2901 17.05C95.5023 17.3046 95.8069 17.4646 96.137 17.4948C96.467 17.5249 96.7956 17.4228 97.0505 17.2109L104.551 10.9605C104.691 10.843 104.805 10.6961 104.882 10.5301C104.96 10.3641 105 10.1831 105 9.99981C105 9.81656 104.96 9.63553 104.882 9.46952C104.805 9.30352 104.691 9.15658 104.551 9.03908Z",fill:`${a}`}),jsxRuntimeExports.jsx("path",{d:"M32.5508 9.03908L25.0505 2.78881C24.7955 2.57791 24.4673 2.47663 24.1378 2.50717C23.8084 2.53771 23.5044 2.69757 23.2925 2.95175C23.0807 3.20592 22.9782 3.5337 23.0074 3.86329C23.0367 4.19289 23.1955 4.49745 23.4488 4.71027L29.7967 9.99986L23.4488 15.2894C23.1945 15.502 23.0349 15.8068 23.0051 16.1369C22.9753 16.467 23.0778 16.7954 23.2901 17.05C23.5023 17.3046 23.8069 17.4646 24.137 17.4948C24.467 17.5249 24.7956 17.4228 25.0505 17.2109L32.5508 10.9605C32.6914 10.843 32.8045 10.6961 32.8822 10.5301C32.9598 10.3641 33 10.1831 33 9.99981C33 9.81656 32.9598 9.63553 32.8822 9.46952C32.8045 9.30352 32.6914 9.15658 32.5508 9.03908Z",fill:`${a}`,fillOpacity:"0.6"}),jsxRuntimeExports.jsx("path",{d:"M50.5508 9.03908L43.0505 2.78881C42.7955 2.57791 42.4673 2.47663 42.1378 2.50717C41.8084 2.53771 41.5044 2.69757 41.2925 2.95175C41.0807 3.20592 40.9782 3.5337 41.0074 3.86329C41.0367 4.19289 41.1955 4.49745 41.4488 4.71027L47.7967 9.99986L41.4488 15.2894C41.1945 15.502 41.0349 15.8068 41.0051 16.1369C40.9753 16.467 41.0778 16.7954 41.2901 17.05C41.5023 17.3046 41.8069 17.4646 42.137 17.4948C42.467 17.5249 42.7956 17.4228 43.0505 17.2109L50.5508 10.9605C50.6914 10.843 50.8045 10.6961 50.8822 10.5301C50.9598 10.3641 51 10.1831 51 9.99981C51 9.81656 50.9598 9.63553 50.8822 9.46952C50.8045 9.30352 50.6914 9.15658 50.5508 9.03908Z",fill:`${a}`,fillOpacity:"0.7"}),jsxRuntimeExports.jsx("path",{d:"M68.5508 9.03908L61.0505 2.78881C60.7955 2.57791 60.4673 2.47663 60.1378 2.50717C59.8084 2.53771 59.5044 2.69757 59.2925 2.95175C59.0807 3.20592 58.9782 3.5337 59.0074 3.86329C59.0367 4.19289 59.1955 4.49745 59.4488 4.71027L65.7967 9.99986L59.4488 15.2894C59.1945 15.502 59.0349 15.8068 59.0051 16.1369C58.9753 16.467 59.0778 16.7954 59.2901 17.05C59.5023 17.3046 59.8069 17.4646 60.137 17.4948C60.467 17.5249 60.7956 17.4228 61.0505 17.2109L68.5508 10.9605C68.6914 10.843 68.8045 10.6961 68.8822 10.5301C68.9598 10.3641 69 10.1831 69 9.99981C69 9.81656 68.9598 9.63553 68.8822 9.46952C68.8045 9.30352 68.6914 9.15658 68.5508 9.03908Z",fill:`${a}`,fillOpacity:"0.8"})]}),boosterLevels=["starter","accelerate","turboMax"],StepTwo=({reconnect:s,onNext:a})=>{const{options:i,uucssGlobal:o}=useAppContext(),{dispatch:E,headerUrl:j,settingsMode:R}=useCommonDispatch(),{activeGear:C,license:S,settings:_}=useSelector(optimizerData),[T,P]=reactExports.useState("turboMax"),[N,I]=reactExports.useState(""),[M,D]=reactExports.useState(!1),[B,F]=reactExports.useState(""),[O,L]=reactExports.useState(!1),[$,V]=reactExports.useState(!1),G=ue=>{I(ue.target.value)},K=async()=>{L(!0);const ue=await E(updateLicense(i,N));L(!1),ue.success?(E(updateLicense(i)),a&&a()):F((ue==null?void 0:ue.error)??"")};reactExports.useEffect(()=>{E(fetchSettings(i,j||i.optimizer_url,!1))},[E]),reactExports.useEffect(()=>{F("")},[N]),reactExports.useEffect(()=>{E(changeGear(T))},[T,C]);const J=ue=>{P(ue)};reactExports.useEffect(()=>{},[C]);const ne=reactExports.useMemo(()=>ue=>{const ce={cls:`w-16 h-16 mt-[16px] ${T===ue?"text-purple-600":"text-gray-400"}`};switch(ue){case"starter":return jsxRuntimeExports.jsx(Starter,{...ce});case"accelerate":return jsxRuntimeExports.jsx(Accelerate,{...ce});case"turboMax":return jsxRuntimeExports.jsx(TurboMax,{...ce})}},[T]),le=reactExports.useCallback(ue=>{const ce=T===ue,pe=ue==="turboMax";return jsxRuntimeExports.jsxs("div",{className:cn("relative bg-brand-0 flex flex-col gap-3.5 font-normal w-[166px] h-[166px] cursor-pointer rounded-3xl items-center justify-center dark:bg-brand-800 ",ce?"text-brand-600 border-[3px] border-[#592d8d] dark:border-purple-700":"border border-transparent border-[3px] outline outline-1 outline-brand-200 dark:outline-brand-700",pe&&"gap-1 pt-4"),onClick:()=>J(ue),children:[jsxRuntimeExports.jsxs("div",{children:[ne(ue),jsxRuntimeExports.jsxs("div",{className:cn("absolute w-7 h-7 justify-center dark:bg-brand-800 dark:text-brand-300",ue==="turboMax"?"top-1 right-1.5 gap-1 text-[10px] items-center font-semibold rounded-3xl p-1 flex bg-brand-0 border border-brand-200 min-w-[150px]	":"top-2.5 right-2.5",pe&&"dark:border-brand-600 dark:border"),children:[ue==="turboMax"&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AIButtonIcon,{}),"  AI Recommended "]}),ce&&jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-6 h-6 text-purple-800 "})]})]}),jsxRuntimeExports.jsx("div",{className:"items-center flex flex-col",children:jsxRuntimeExports.jsx("span",{className:"capitalize font-semibold dark:text-brand-300",children:ue})})]},ue)},[T,ne]);return jsxRuntimeExports.jsx("div",{className:"w-full flex flex-col gap-4 transition-all h-screen",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-8 p-16 items-center rounded-3xl",children:[jsxRuntimeExports.jsx("div",{className:"px-2",children:jsxRuntimeExports.jsx("img",{className:"w-22",src:i!=null&&i.page_optimizer_base?`${i.page_optimizer_base}/logo.svg`:"/logo.svg",alt:"RapidLoad - #1 to unlock breakneck page speed"})}),s?jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold",children:"Connect Your Account 2"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-base text-zinc-600 dark:text-brand-300",children:"Pick your Performance Mode: Starter, Accelerate or TurboMax to fine-tune your site's speed."})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold",children:"Select a Performance Gear"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-base text-zinc-600 dark:text-brand-300",children:"Pick your Performance Mode: Starter, Accelerate or TurboMax to fine-tune your site's speed."})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:jsxRuntimeExports.jsx("div",{className:"flex gap-3 w-full",children:boosterLevels.map(le)})}),jsxRuntimeExports.jsx("button",{className:"text-base font-semibold capitalize text-center underline text-brand-500",onClick:()=>V(!0),children:"Compare Performance Gears"}),jsxRuntimeExports.jsx(ComparisonDialog,{open:$,setOpen:V})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-6 items-center border-t-2 border-brand-200 pt-8 w-full max-w-[900px]",children:[jsxRuntimeExports.jsx("h6",{className:"text-base font-semibold capitalize text-center",children:"Connect Your Account to Optimize "}),jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:M?jsxRuntimeExports.jsxs(motion.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.2},className:"flex flex-col w-[500px] gap-4",children:[jsxRuntimeExports.jsx("div",{className:"border-2 rounded-2xl px-2 py-1",children:jsxRuntimeExports.jsx(Input,{id:"licenseKey",type:"text",placeholder:"Enter you license key",className:"text-sm flex-grow border-none focus:outline-none focus-visible:ring-0 dark:text-brand-300 focus-visible:ring-offset-0",value:N,onChange:G})}),jsxRuntimeExports.jsxs("div",{className:"flex justify-between items-center pl-1",children:[B.length>0?jsxRuntimeExports.jsx("h3",{className:"text-sm font-medium text-amber-700",children:B}):jsxRuntimeExports.jsx("h3",{className:"text-sm font-medium"}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 ",children:[jsxRuntimeExports.jsxs("button",{className:cn("flex items-center bg-brand-200 text-brand-950 hover:shadow-[inset_0_0_0_2px_rgba(0,0,0,1)] font-medium py-2 px-4 rounded-lg hover:bg-transparent transition-all gap-1 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300",O&&"pointer-events-none cursor-default opacity-30"),onClick:()=>D(!1),children:[jsxRuntimeExports.jsx(ForwardRef$v,{className:"h-4 w-4 text-brand-60"})," Back"]}),jsxRuntimeExports.jsx("button",{className:cn("flex items-center hover:bg-gradient-to-br hover:from-[rgba(94,92,92,0.55)]  hover:to-brand-900/90 bg-brand-900/90  text-white font-medium py-2 px-4 rounded-lg transition-all gap-1 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300",O&&"pointer-events-none cursor-default opacity-30"),onClick:K,children:O?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Loader,{className:"w-5 animate-spin"})," Connecting"]}):"Connect"})]})]})]},"inputDiv"):jsxRuntimeExports.jsxs(motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{duration:.2},className:"flex flex-col gap-4 items-center",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4",children:[jsxRuntimeExports.jsx("button",{className:"items-center bg-brand-200 text-brand-950 hover:shadow-[inset_0_0_0_2px_rgba(0,0,0,1)] font-medium py-2 px-4 rounded-lg hover:bg-transparent transition-all gap-2 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300",onClick:()=>{D(!0),localStorage.getItem("rapidLoadGear")&&localStorage.removeItem("rapidLoadGear")},children:"Connect with License key"}),jsxRuntimeExports.jsx("span",{className:"font-semibold",children:"or"}),jsxRuntimeExports.jsx("button",{className:"items-center hover:bg-gradient-to-br hover:from-[rgba(94,92,92,0.55)]  hover:to-brand-900/90 bg-brand-900/90  text-white font-medium py-2 px-4 rounded-lg transition-all gap-2 dark:bg-brand-800 dark:border-brand-600 dark:border dark:hover:bg-brand-600/40 dark:text-brand-300",onClick:()=>{localStorage.setItem("rapidLoadGear",T),o!=null&&o.activation_url&&(window.location.href=o==null?void 0:o.activation_url)},children:"Connect Account"})]}),jsxRuntimeExports.jsx("div",{onClick:a,className:"text-sm text-brand-500 mt-2 cursor-pointer hover:underline",children:"Skip without connecting to RapidLoad AI"})]},"connectDiv")})]})]})})};var lottie$1={exports:{}};(function(module,exports){typeof navigator<"u"&&function(s,a){module.exports=a()}(commonjsGlobal,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(a){_useWebWorker=!!a},getWebWorker=function(){return _useWebWorker},setLocationHref=function(a){locationHref=a},getLocationHref=function(){return locationHref};function createTag(s){return document.createElement(s)}function extendPrototype(s,a){var i,o=s.length,E;for(i=0;i<o;i+=1){E=s[i].prototype;for(var j in E)Object.prototype.hasOwnProperty.call(E,j)&&(a.prototype[j]=E[j])}}function getDescriptor(s,a){return Object.getOwnPropertyDescriptor(s,a)}function createProxyFunction(s){function a(){}return a.prototype=s,a}var audioControllerFactory=function(){function s(a){this.audios=[],this.audioFactory=a,this._volume=1,this._isMuted=!1}return s.prototype={addAudio:function(i){this.audios.push(i)},pause:function(){var i,o=this.audios.length;for(i=0;i<o;i+=1)this.audios[i].pause()},resume:function(){var i,o=this.audios.length;for(i=0;i<o;i+=1)this.audios[i].resume()},setRate:function(i){var o,E=this.audios.length;for(o=0;o<E;o+=1)this.audios[o].setRate(i)},createAudio:function(i){return this.audioFactory?this.audioFactory(i):window.Howl?new window.Howl({src:[i]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(i){this.audioFactory=i},setVolume:function(i){this._volume=i,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var i,o=this.audios.length;for(i=0;i<o;i+=1)this.audios[i].volume(this._volume*(this._isMuted?0:1))}},function(){return new s}}(),createTypedArray=function(){function s(i,o){var E=0,j=[],R;switch(i){case"int16":case"uint8c":R=1;break;default:R=1.1;break}for(E=0;E<o;E+=1)j.push(R);return j}function a(i,o){return i==="float32"?new Float32Array(o):i==="int16"?new Int16Array(o):i==="uint8c"?new Uint8ClampedArray(o):s(i,o)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?a:s}();function createSizedArray(s){return Array.apply(null,{length:s})}function _typeof$6(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(i){return typeof i}:_typeof$6=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$6(s)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var s=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],a,i=s.length;for(a=0;a<i;a+=1)BMMath[s[a]]=Math[s[a]]})(),BMMath.random=Math.random,BMMath.abs=function(s){var a=_typeof$6(s);if(a==="object"&&s.length){var i=createSizedArray(s.length),o,E=s.length;for(o=0;o<E;o+=1)i[o]=Math.abs(s[o]);return i}return Math.abs(s)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(s){s.style.position="absolute",s.style.top=0,s.style.left=0,s.style.display="block",s.style.transformOrigin="0 0",s.style.webkitTransformOrigin="0 0",s.style.backfaceVisibility="visible",s.style.webkitBackfaceVisibility="visible",s.style.transformStyle="preserve-3d",s.style.webkitTransformStyle="preserve-3d",s.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(s,a,i,o){this.type=s,this.currentTime=a,this.totalTime=i,this.direction=o<0?-1:1}function BMCompleteEvent(s,a){this.type=s,this.direction=a<0?-1:1}function BMCompleteLoopEvent(s,a,i,o){this.type=s,this.currentLoop=i,this.totalLoops=a,this.direction=o<0?-1:1}function BMSegmentStartEvent(s,a,i){this.type=s,this.firstFrame=a,this.totalFrames=i}function BMDestroyEvent(s,a){this.type=s,this.target=a}function BMRenderFrameErrorEvent(s,a){this.type="renderFrameError",this.nativeError=s,this.currentTime=a}function BMConfigErrorEvent(s){this.type="configError",this.nativeError=s}var createElementID=function(){var s=0;return function(){return s+=1,idPrefix$1+"__lottie_element_"+s}}();function HSVtoRGB(s,a,i){var o,E,j,R,C,S,_,T;switch(R=Math.floor(s*6),C=s*6-R,S=i*(1-a),_=i*(1-C*a),T=i*(1-(1-C)*a),R%6){case 0:o=i,E=T,j=S;break;case 1:o=_,E=i,j=S;break;case 2:o=S,E=i,j=T;break;case 3:o=S,E=_,j=i;break;case 4:o=T,E=S,j=i;break;case 5:o=i,E=S,j=_;break}return[o,E,j]}function RGBtoHSV(s,a,i){var o=Math.max(s,a,i),E=Math.min(s,a,i),j=o-E,R,C=o===0?0:j/o,S=o/255;switch(o){case E:R=0;break;case s:R=a-i+j*(a<i?6:0),R/=6*j;break;case a:R=i-s+j*2,R/=6*j;break;case i:R=s-a+j*4,R/=6*j;break}return[R,C,S]}function addSaturationToRGB(s,a){var i=RGBtoHSV(s[0]*255,s[1]*255,s[2]*255);return i[1]+=a,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(s,a){var i=RGBtoHSV(s[0]*255,s[1]*255,s[2]*255);return i[2]+=a,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(s,a){var i=RGBtoHSV(s[0]*255,s[1]*255,s[2]*255);return i[0]+=a/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var s=[],a,i;for(a=0;a<256;a+=1)i=a.toString(16),s[a]=i.length===1?"0"+i:i;return function(o,E,j){return o<0&&(o=0),E<0&&(E=0),j<0&&(j=0),"#"+s[o]+s[E]+s[j]}}(),setSubframeEnabled=function(a){subframeEnabled=!!a},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(a){expressionsPlugin=a},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(a){expressionsInterfaces=a},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(a){defaultCurveSegments=a},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(a){idPrefix$1=a};function createNS(s){return document.createElementNS(svgNS,s)}function _typeof$5(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(i){return typeof i}:_typeof$5=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$5(s)}var dataManager=function(){var s=1,a=[],i,o,E={onmessage:function(){},postMessage:function(I){i({data:I})}},j={postMessage:function(I){E.onmessage({data:I})}};function R(N){if(window.Worker&&window.Blob&&getWebWorker()){var I=new Blob(["var _workerSelf = self; self.onmessage = ",N.toString()],{type:"text/javascript"}),M=URL.createObjectURL(I);return new Worker(M)}return i=N,E}function C(){o||(o=R(function(I){function M(){function B(oe,Y){var ae,H,W=oe.length,U,ie,me,ee;for(H=0;H<W;H+=1)if(ae=oe[H],"ks"in ae&&!ae.completed){if(ae.completed=!0,ae.hasMask){var ye=ae.masksProperties;for(ie=ye.length,U=0;U<ie;U+=1)if(ye[U].pt.k.i)V(ye[U].pt.k);else for(ee=ye[U].pt.k.length,me=0;me<ee;me+=1)ye[U].pt.k[me].s&&V(ye[U].pt.k[me].s[0]),ye[U].pt.k[me].e&&V(ye[U].pt.k[me].e[0])}ae.ty===0?(ae.layers=L(ae.refId,Y),B(ae.layers,Y)):ae.ty===4?$(ae.shapes):ae.ty===5&&pe(ae)}}function F(oe,Y){if(oe){var ae=0,H=oe.length;for(ae=0;ae<H;ae+=1)oe[ae].t===1&&(oe[ae].data.layers=L(oe[ae].data.refId,Y),B(oe[ae].data.layers,Y))}}function O(oe,Y){for(var ae=0,H=Y.length;ae<H;){if(Y[ae].id===oe)return Y[ae];ae+=1}return null}function L(oe,Y){var ae=O(oe,Y);return ae?ae.layers.__used?JSON.parse(JSON.stringify(ae.layers)):(ae.layers.__used=!0,ae.layers):null}function $(oe){var Y,ae=oe.length,H,W;for(Y=ae-1;Y>=0;Y-=1)if(oe[Y].ty==="sh")if(oe[Y].ks.k.i)V(oe[Y].ks.k);else for(W=oe[Y].ks.k.length,H=0;H<W;H+=1)oe[Y].ks.k[H].s&&V(oe[Y].ks.k[H].s[0]),oe[Y].ks.k[H].e&&V(oe[Y].ks.k[H].e[0]);else oe[Y].ty==="gr"&&$(oe[Y].it)}function V(oe){var Y,ae=oe.i.length;for(Y=0;Y<ae;Y+=1)oe.i[Y][0]+=oe.v[Y][0],oe.i[Y][1]+=oe.v[Y][1],oe.o[Y][0]+=oe.v[Y][0],oe.o[Y][1]+=oe.v[Y][1]}function G(oe,Y){var ae=Y?Y.split("."):[100,100,100];return oe[0]>ae[0]?!0:ae[0]>oe[0]?!1:oe[1]>ae[1]?!0:ae[1]>oe[1]?!1:oe[2]>ae[2]?!0:ae[2]>oe[2]?!1:null}var K=function(){var oe=[4,4,14];function Y(H){var W=H.t.d;H.t.d={k:[{s:W,t:0}]}}function ae(H){var W,U=H.length;for(W=0;W<U;W+=1)H[W].ty===5&&Y(H[W])}return function(H){if(G(oe,H.v)&&(ae(H.layers),H.assets)){var W,U=H.assets.length;for(W=0;W<U;W+=1)H.assets[W].layers&&ae(H.assets[W].layers)}}}(),J=function(){var oe=[4,7,99];return function(Y){if(Y.chars&&!G(oe,Y.v)){var ae,H=Y.chars.length;for(ae=0;ae<H;ae+=1){var W=Y.chars[ae];W.data&&W.data.shapes&&($(W.data.shapes),W.data.ip=0,W.data.op=99999,W.data.st=0,W.data.sr=1,W.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},Y.chars[ae].t||(W.data.shapes.push({ty:"no"}),W.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),ne=function(){var oe=[5,7,15];function Y(H){var W=H.t.p;typeof W.a=="number"&&(W.a={a:0,k:W.a}),typeof W.p=="number"&&(W.p={a:0,k:W.p}),typeof W.r=="number"&&(W.r={a:0,k:W.r})}function ae(H){var W,U=H.length;for(W=0;W<U;W+=1)H[W].ty===5&&Y(H[W])}return function(H){if(G(oe,H.v)&&(ae(H.layers),H.assets)){var W,U=H.assets.length;for(W=0;W<U;W+=1)H.assets[W].layers&&ae(H.assets[W].layers)}}}(),le=function(){var oe=[4,1,9];function Y(H){var W,U=H.length,ie,me;for(W=0;W<U;W+=1)if(H[W].ty==="gr")Y(H[W].it);else if(H[W].ty==="fl"||H[W].ty==="st")if(H[W].c.k&&H[W].c.k[0].i)for(me=H[W].c.k.length,ie=0;ie<me;ie+=1)H[W].c.k[ie].s&&(H[W].c.k[ie].s[0]/=255,H[W].c.k[ie].s[1]/=255,H[W].c.k[ie].s[2]/=255,H[W].c.k[ie].s[3]/=255),H[W].c.k[ie].e&&(H[W].c.k[ie].e[0]/=255,H[W].c.k[ie].e[1]/=255,H[W].c.k[ie].e[2]/=255,H[W].c.k[ie].e[3]/=255);else H[W].c.k[0]/=255,H[W].c.k[1]/=255,H[W].c.k[2]/=255,H[W].c.k[3]/=255}function ae(H){var W,U=H.length;for(W=0;W<U;W+=1)H[W].ty===4&&Y(H[W].shapes)}return function(H){if(G(oe,H.v)&&(ae(H.layers),H.assets)){var W,U=H.assets.length;for(W=0;W<U;W+=1)H.assets[W].layers&&ae(H.assets[W].layers)}}}(),ue=function(){var oe=[4,4,18];function Y(H){var W,U=H.length,ie,me;for(W=U-1;W>=0;W-=1)if(H[W].ty==="sh")if(H[W].ks.k.i)H[W].ks.k.c=H[W].closed;else for(me=H[W].ks.k.length,ie=0;ie<me;ie+=1)H[W].ks.k[ie].s&&(H[W].ks.k[ie].s[0].c=H[W].closed),H[W].ks.k[ie].e&&(H[W].ks.k[ie].e[0].c=H[W].closed);else H[W].ty==="gr"&&Y(H[W].it)}function ae(H){var W,U,ie=H.length,me,ee,ye,Ce;for(U=0;U<ie;U+=1){if(W=H[U],W.hasMask){var Ae=W.masksProperties;for(ee=Ae.length,me=0;me<ee;me+=1)if(Ae[me].pt.k.i)Ae[me].pt.k.c=Ae[me].cl;else for(Ce=Ae[me].pt.k.length,ye=0;ye<Ce;ye+=1)Ae[me].pt.k[ye].s&&(Ae[me].pt.k[ye].s[0].c=Ae[me].cl),Ae[me].pt.k[ye].e&&(Ae[me].pt.k[ye].e[0].c=Ae[me].cl)}W.ty===4&&Y(W.shapes)}}return function(H){if(G(oe,H.v)&&(ae(H.layers),H.assets)){var W,U=H.assets.length;for(W=0;W<U;W+=1)H.assets[W].layers&&ae(H.assets[W].layers)}}}();function ce(oe){oe.__complete||(le(oe),K(oe),J(oe),ne(oe),ue(oe),B(oe.layers,oe.assets),F(oe.chars,oe.assets),oe.__complete=!0)}function pe(oe){oe.t.a.length===0&&"m"in oe.t.p}var xe={};return xe.completeData=ce,xe.checkColors=le,xe.checkChars=J,xe.checkPathProperties=ne,xe.checkShapes=ue,xe.completeLayers=B,xe}if(j.dataManager||(j.dataManager=M()),j.assetLoader||(j.assetLoader=function(){function B(O){var L=O.getResponseHeader("content-type");return L&&O.responseType==="json"&&L.indexOf("json")!==-1||O.response&&_typeof$5(O.response)==="object"?O.response:O.response&&typeof O.response=="string"?JSON.parse(O.response):O.responseText?JSON.parse(O.responseText):null}function F(O,L,$,V){var G,K=new XMLHttpRequest;try{K.responseType="json"}catch{}K.onreadystatechange=function(){if(K.readyState===4)if(K.status===200)G=B(K),$(G);else try{G=B(K),$(G)}catch(J){V&&V(J)}};try{K.open(["G","E","T"].join(""),O,!0)}catch{K.open(["G","E","T"].join(""),L+"/"+O,!0)}K.send()}return{load:F}}()),I.data.type==="loadAnimation")j.assetLoader.load(I.data.path,I.data.fullPath,function(B){j.dataManager.completeData(B),j.postMessage({id:I.data.id,payload:B,status:"success"})},function(){j.postMessage({id:I.data.id,status:"error"})});else if(I.data.type==="complete"){var D=I.data.animation;j.dataManager.completeData(D),j.postMessage({id:I.data.id,payload:D,status:"success"})}else I.data.type==="loadData"&&j.assetLoader.load(I.data.path,I.data.fullPath,function(B){j.postMessage({id:I.data.id,payload:B,status:"success"})},function(){j.postMessage({id:I.data.id,status:"error"})})}),o.onmessage=function(N){var I=N.data,M=I.id,D=a[M];a[M]=null,I.status==="success"?D.onComplete(I.payload):D.onError&&D.onError()})}function S(N,I){s+=1;var M="processId_"+s;return a[M]={onComplete:N,onError:I},M}function _(N,I,M){C();var D=S(I,M);o.postMessage({type:"loadAnimation",path:N,fullPath:window.location.origin+window.location.pathname,id:D})}function T(N,I,M){C();var D=S(I,M);o.postMessage({type:"loadData",path:N,fullPath:window.location.origin+window.location.pathname,id:D})}function P(N,I,M){C();var D=S(I,M);o.postMessage({type:"complete",animation:N,id:D})}return{loadAnimation:_,loadData:T,completeAnimation:P}}(),ImagePreloader=function(){var s=function(){var F=createTag("canvas");F.width=1,F.height=1;var O=F.getContext("2d");return O.fillStyle="rgba(0,0,0,0)",O.fillRect(0,0,1,1),F}();function a(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function o(F,O,L){var $="";if(F.e)$=F.p;else if(O){var V=F.p;V.indexOf("images/")!==-1&&(V=V.split("/")[1]),$=O+V}else $=L,$+=F.u?F.u:"",$+=F.p;return $}function E(F){var O=0,L=setInterval((function(){var $=F.getBBox();($.width||O>500)&&(this._imageLoaded(),clearInterval(L)),O+=1}).bind(this),50)}function j(F){var O=o(F,this.assetsPath,this.path),L=createNS("image");isSafari?this.testImageLoaded(L):L.addEventListener("load",this._imageLoaded,!1),L.addEventListener("error",(function(){$.img=s,this._imageLoaded()}).bind(this),!1),L.setAttributeNS("http://www.w3.org/1999/xlink","href",O),this._elementHelper.append?this._elementHelper.append(L):this._elementHelper.appendChild(L);var $={img:L,assetData:F};return $}function R(F){var O=o(F,this.assetsPath,this.path),L=createTag("img");L.crossOrigin="anonymous",L.addEventListener("load",this._imageLoaded,!1),L.addEventListener("error",(function(){$.img=s,this._imageLoaded()}).bind(this),!1),L.src=O;var $={img:L,assetData:F};return $}function C(F){var O={assetData:F},L=o(F,this.assetsPath,this.path);return dataManager.loadData(L,(function($){O.img=$,this._footageLoaded()}).bind(this),(function(){O.img={},this._footageLoaded()}).bind(this)),O}function S(F,O){this.imagesLoadedCb=O;var L,$=F.length;for(L=0;L<$;L+=1)F[L].layers||(!F[L].t||F[L].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(F[L]))):F[L].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(F[L]))))}function _(F){this.path=F||""}function T(F){this.assetsPath=F||""}function P(F){for(var O=0,L=this.images.length;O<L;){if(this.images[O].assetData===F)return this.images[O].img;O+=1}return null}function N(){this.imagesLoadedCb=null,this.images.length=0}function I(){return this.totalImages===this.loadedAssets}function M(){return this.totalFootages===this.loadedFootagesCount}function D(F,O){F==="svg"?(this._elementHelper=O,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function B(){this._imageLoaded=a.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=E.bind(this),this.createFootageData=C.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return B.prototype={loadAssets:S,setAssetsPath:T,setPath:_,loadedImages:I,loadedFootages:M,destroy:N,getAsset:P,createImgData:R,createImageData:j,imageLoaded:a,footageLoaded:i,setCacheType:D},B}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(a,i){if(this._cbs[a])for(var o=this._cbs[a],E=0;E<o.length;E+=1)o[E](i)},addEventListener:function(a,i){return this._cbs[a]||(this._cbs[a]=[]),this._cbs[a].push(i),(function(){this.removeEventListener(a,i)}).bind(this)},removeEventListener:function(a,i){if(!i)this._cbs[a]=null;else if(this._cbs[a]){for(var o=0,E=this._cbs[a].length;o<E;)this._cbs[a][o]===i&&(this._cbs[a].splice(o,1),o-=1,E-=1),o+=1;this._cbs[a].length||(this._cbs[a]=null)}}};var markerParser=function(){function s(a){for(var i=a.split(`\r
`),o={},E,j=0,R=0;R<i.length;R+=1)E=i[R].split(":"),E.length===2&&(o[E[0]]=E[1].trim(),j+=1);if(j===0)throw new Error;return o}return function(a){for(var i=[],o=0;o<a.length;o+=1){var E=a[o],j={time:E.tm,duration:E.dr};try{j.payload=JSON.parse(a[o].cm)}catch{try{j.payload=s(a[o].cm)}catch{j.payload={name:a[o].cm}}}i.push(j)}return i}}(),ProjectInterface=function(){function s(a){this.compositions.push(a)}return function(){function a(i){for(var o=0,E=this.compositions.length;o<E;){if(this.compositions[o].data&&this.compositions[o].data.nm===i)return this.compositions[o].prepareFrame&&this.compositions[o].data.xt&&this.compositions[o].prepareFrame(this.currentFrame),this.compositions[o].compInterface;o+=1}return null}return a.compositions=[],a.currentFrame=0,a.registerComposition=s,a}}(),renderers={},registerRenderer=function(a,i){renderers[a]=i};function getRenderer(s){return renderers[s]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var s in renderers)if(renderers[s])return s;return""}function _typeof$4(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(i){return typeof i}:_typeof$4=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$4(s)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(s){(s.wrapper||s.container)&&(this.wrapper=s.wrapper||s.container);var a="svg";s.animType?a=s.animType:s.renderer&&(a=s.renderer);var i=getRenderer(a);this.renderer=new i(this,s.rendererSettings),this.imagePreloader.setCacheType(a,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=a,s.loop===""||s.loop===null||s.loop===void 0||s.loop===!0?this.loop=!0:s.loop===!1?this.loop=!1:this.loop=parseInt(s.loop,10),this.autoplay="autoplay"in s?s.autoplay:!0,this.name=s.name?s.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(s,"autoloadSegments")?s.autoloadSegments:!0,this.assetsPath=s.assetsPath,this.initialSegment=s.initialSegment,s.audioFactory&&this.audioController.setAudioFactory(s.audioFactory),s.animationData?this.setupAnimation(s.animationData):s.path&&(s.path.lastIndexOf("\\")!==-1?this.path=s.path.substr(0,s.path.lastIndexOf("\\")+1):this.path=s.path.substr(0,s.path.lastIndexOf("/")+1),this.fileName=s.path.substr(s.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(s.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(s){dataManager.completeAnimation(s,this.configAnimation)},AnimationItem.prototype.setData=function(s,a){a&&_typeof$4(a)!=="object"&&(a=JSON.parse(a));var i={wrapper:s,animationData:a},o=s.attributes;i.path=o.getNamedItem("data-animation-path")?o.getNamedItem("data-animation-path").value:o.getNamedItem("data-bm-path")?o.getNamedItem("data-bm-path").value:o.getNamedItem("bm-path")?o.getNamedItem("bm-path").value:"",i.animType=o.getNamedItem("data-anim-type")?o.getNamedItem("data-anim-type").value:o.getNamedItem("data-bm-type")?o.getNamedItem("data-bm-type").value:o.getNamedItem("bm-type")?o.getNamedItem("bm-type").value:o.getNamedItem("data-bm-renderer")?o.getNamedItem("data-bm-renderer").value:o.getNamedItem("bm-renderer")?o.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var E=o.getNamedItem("data-anim-loop")?o.getNamedItem("data-anim-loop").value:o.getNamedItem("data-bm-loop")?o.getNamedItem("data-bm-loop").value:o.getNamedItem("bm-loop")?o.getNamedItem("bm-loop").value:"";E==="false"?i.loop=!1:E==="true"?i.loop=!0:E!==""&&(i.loop=parseInt(E,10));var j=o.getNamedItem("data-anim-autoplay")?o.getNamedItem("data-anim-autoplay").value:o.getNamedItem("data-bm-autoplay")?o.getNamedItem("data-bm-autoplay").value:o.getNamedItem("bm-autoplay")?o.getNamedItem("bm-autoplay").value:!0;i.autoplay=j!=="false",i.name=o.getNamedItem("data-name")?o.getNamedItem("data-name").value:o.getNamedItem("data-bm-name")?o.getNamedItem("data-bm-name").value:o.getNamedItem("bm-name")?o.getNamedItem("bm-name").value:"";var R=o.getNamedItem("data-anim-prerender")?o.getNamedItem("data-anim-prerender").value:o.getNamedItem("data-bm-prerender")?o.getNamedItem("data-bm-prerender").value:o.getNamedItem("bm-prerender")?o.getNamedItem("bm-prerender").value:"";R==="false"&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(s){s.op>this.animationData.op&&(this.animationData.op=s.op,this.totalFrames=Math.floor(s.op-this.animationData.ip));var a=this.animationData.layers,i,o=a.length,E=s.layers,j,R=E.length;for(j=0;j<R;j+=1)for(i=0;i<o;){if(a[i].id===E[j].id){a[i]=E[j];break}i+=1}if((s.chars||s.fonts)&&(this.renderer.globalData.fontManager.addChars(s.chars),this.renderer.globalData.fontManager.addFonts(s.fonts,this.renderer.globalData.defs)),s.assets)for(o=s.assets.length,i=0;i<o;i+=1)this.animationData.assets.push(s.assets[i]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(s){this.animationData=s;var a=getExpressionsPlugin();a&&a.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var s=this.animationData.segments;if(!s||s.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var a=s.shift();this.timeCompleted=a.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var s=this.animationData.segments;s||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(s){if(this.renderer)try{this.animationData=s,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(s),s.assets||(s.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(s.assets),this.markers=markerParser(s.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(a){this.triggerConfigError(a)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var s=getExpressionsPlugin();s&&s.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(s,a){var i=typeof s=="number"?s:void 0,o=typeof a=="number"?a:void 0;this.renderer.updateContainerSize(i,o)},AnimationItem.prototype.setSubframe=function(s){this.isSubframeEnabled=!!s},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(s){this.triggerRenderFrameError(s)}},AnimationItem.prototype.play=function(s){s&&this.name!==s||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(s){s&&this.name!==s||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(s){s&&this.name!==s||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(s){s&&this.name!==s||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(s){for(var a,i=0;i<this.markers.length;i+=1)if(a=this.markers[i],a.payload&&a.payload.name===s)return a;return null},AnimationItem.prototype.goToAndStop=function(s,a,i){if(!(i&&this.name!==i)){var o=Number(s);if(isNaN(o)){var E=this.getMarkerData(s);E&&this.goToAndStop(E.time,!0)}else a?this.setCurrentRawFrameValue(s):this.setCurrentRawFrameValue(s*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(s,a,i){if(!(i&&this.name!==i)){var o=Number(s);if(isNaN(o)){var E=this.getMarkerData(s);E&&(E.duration?this.playSegments([E.time,E.time+E.duration],!0):this.goToAndStop(E.time,!0))}else this.goToAndStop(o,a,i);this.play()}},AnimationItem.prototype.advanceTime=function(s){if(!(this.isPaused===!0||this.isLoaded===!1)){var a=this.currentRawFrame+s*this.frameModifier,i=!1;a>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(a>this.totalFrames?a%this.totalFrames:0)||(i=!0,a=this.totalFrames-1):a>=this.totalFrames?(this.playCount+=1,this.checkSegments(a%this.totalFrames)||(this.setCurrentRawFrameValue(a%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(a):a<0?this.checkSegments(a%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+a%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(i=!0,a=0)):this.setCurrentRawFrameValue(a),i&&(this.setCurrentRawFrameValue(a),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(s,a){this.playCount=0,s[1]<s[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=s[0]-s[1],this.timeCompleted=this.totalFrames,this.firstFrame=s[1],this.setCurrentRawFrameValue(this.totalFrames-.001-a)):s[1]>s[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=s[1]-s[0],this.timeCompleted=this.totalFrames,this.firstFrame=s[0],this.setCurrentRawFrameValue(.001+a)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(s,a){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<s?i=s:this.currentRawFrame+this.firstFrame>a&&(i=a-s)),this.firstFrame=s,this.totalFrames=a-s,this.timeCompleted=this.totalFrames,i!==-1&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(s,a){if(a&&(this.segments.length=0),_typeof$4(s[0])==="object"){var i,o=s.length;for(i=0;i<o;i+=1)this.segments.push(s[i])}else this.segments.push(s);this.segments.length&&a&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(s){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),s&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(s){return this.segments.length?(this.adjustSegment(this.segments.shift(),s),!0):!1},AnimationItem.prototype.destroy=function(s){s&&this.name!==s||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(s){this.currentRawFrame=s,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(s){this.playSpeed=s,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(s){this.playDirection=s<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(s){this.loop=s},AnimationItem.prototype.setVolume=function(s,a){a&&this.name!==a||this.audioController.setVolume(s)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(s){s&&this.name!==s||this.audioController.mute()},AnimationItem.prototype.unmute=function(s){s&&this.name!==s||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(s){var a="";if(s.e)a=s.p;else if(this.assetsPath){var i=s.p;i.indexOf("images/")!==-1&&(i=i.split("/")[1]),a=this.assetsPath+i}else a=this.path,a+=s.u?s.u:"",a+=s.p;return a},AnimationItem.prototype.getAssetData=function(s){for(var a=0,i=this.assets.length;a<i;){if(s===this.assets[a].id)return this.assets[a];a+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(s){return s?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(s,a,i){try{var o=this.renderer.getElementByPath(s);o.updateDocumentData(a,i)}catch{}},AnimationItem.prototype.trigger=function(s){if(this._cbs&&this._cbs[s])switch(s){case"enterFrame":this.triggerEvent(s,new BMEnterFrameEvent(s,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(s,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(s,new BMCompleteLoopEvent(s,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(s,new BMCompleteEvent(s,this.frameMult));break;case"segmentStart":this.triggerEvent(s,new BMSegmentStartEvent(s,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(s,new BMDestroyEvent(s,this));break;default:this.triggerEvent(s)}s==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(s,this.currentFrame,this.totalFrames,this.frameMult)),s==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(s,this.loop,this.playCount,this.frameMult)),s==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(s,this.frameMult)),s==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(s,this.firstFrame,this.totalFrames)),s==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(s,this))},AnimationItem.prototype.triggerRenderFrameError=function(s){var a=new BMRenderFrameErrorEvent(s,this.currentFrame);this.triggerEvent("error",a),this.onError&&this.onError.call(this,a)},AnimationItem.prototype.triggerConfigError=function(s){var a=new BMConfigErrorEvent(s,this.currentFrame);this.triggerEvent("error",a),this.onError&&this.onError.call(this,a)};var animationManager=function(){var s={},a=[],i=0,o=0,E=0,j=!0,R=!1;function C(Y){for(var ae=0,H=Y.target;ae<o;)a[ae].animation===H&&(a.splice(ae,1),ae-=1,o-=1,H.isPaused||P()),ae+=1}function S(Y,ae){if(!Y)return null;for(var H=0;H<o;){if(a[H].elem===Y&&a[H].elem!==null)return a[H].animation;H+=1}var W=new AnimationItem;return N(W,Y),W.setData(Y,ae),W}function _(){var Y,ae=a.length,H=[];for(Y=0;Y<ae;Y+=1)H.push(a[Y].animation);return H}function T(){E+=1,le()}function P(){E-=1}function N(Y,ae){Y.addEventListener("destroy",C),Y.addEventListener("_active",T),Y.addEventListener("_idle",P),a.push({elem:ae,animation:Y}),o+=1}function I(Y){var ae=new AnimationItem;return N(ae,null),ae.setParams(Y),ae}function M(Y,ae){var H;for(H=0;H<o;H+=1)a[H].animation.setSpeed(Y,ae)}function D(Y,ae){var H;for(H=0;H<o;H+=1)a[H].animation.setDirection(Y,ae)}function B(Y){var ae;for(ae=0;ae<o;ae+=1)a[ae].animation.play(Y)}function F(Y){var ae=Y-i,H;for(H=0;H<o;H+=1)a[H].animation.advanceTime(ae);i=Y,E&&!R?window.requestAnimationFrame(F):j=!0}function O(Y){i=Y,window.requestAnimationFrame(F)}function L(Y){var ae;for(ae=0;ae<o;ae+=1)a[ae].animation.pause(Y)}function $(Y,ae,H){var W;for(W=0;W<o;W+=1)a[W].animation.goToAndStop(Y,ae,H)}function V(Y){var ae;for(ae=0;ae<o;ae+=1)a[ae].animation.stop(Y)}function G(Y){var ae;for(ae=0;ae<o;ae+=1)a[ae].animation.togglePause(Y)}function K(Y){var ae;for(ae=o-1;ae>=0;ae-=1)a[ae].animation.destroy(Y)}function J(Y,ae,H){var W=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),U,ie=W.length;for(U=0;U<ie;U+=1)H&&W[U].setAttribute("data-bm-type",H),S(W[U],Y);if(ae&&ie===0){H||(H="svg");var me=document.getElementsByTagName("body")[0];me.innerText="";var ee=createTag("div");ee.style.width="100%",ee.style.height="100%",ee.setAttribute("data-bm-type",H),me.appendChild(ee),S(ee,Y)}}function ne(){var Y;for(Y=0;Y<o;Y+=1)a[Y].animation.resize()}function le(){!R&&E&&j&&(window.requestAnimationFrame(O),j=!1)}function ue(){R=!0}function ce(){R=!1,le()}function pe(Y,ae){var H;for(H=0;H<o;H+=1)a[H].animation.setVolume(Y,ae)}function xe(Y){var ae;for(ae=0;ae<o;ae+=1)a[ae].animation.mute(Y)}function oe(Y){var ae;for(ae=0;ae<o;ae+=1)a[ae].animation.unmute(Y)}return s.registerAnimation=S,s.loadAnimation=I,s.setSpeed=M,s.setDirection=D,s.play=B,s.pause=L,s.stop=V,s.togglePause=G,s.searchAnimations=J,s.resize=ne,s.goToAndStop=$,s.destroy=K,s.freeze=ue,s.unfreeze=ce,s.setVolume=pe,s.mute=xe,s.unmute=oe,s.getRegisteredAnimations=_,s}(),BezierFactory=function(){var s={};s.getBezierEasing=i;var a={};function i(O,L,$,V,G){var K=G||("bez_"+O+"_"+L+"_"+$+"_"+V).replace(/\./g,"p");if(a[K])return a[K];var J=new F([O,L,$,V]);return a[K]=J,J}var o=4,E=.001,j=1e-7,R=10,C=11,S=1/(C-1),_=typeof Float32Array=="function";function T(O,L){return 1-3*L+3*O}function P(O,L){return 3*L-6*O}function N(O){return 3*O}function I(O,L,$){return((T(L,$)*O+P(L,$))*O+N(L))*O}function M(O,L,$){return 3*T(L,$)*O*O+2*P(L,$)*O+N(L)}function D(O,L,$,V,G){var K,J,ne=0;do J=L+($-L)/2,K=I(J,V,G)-O,K>0?$=J:L=J;while(Math.abs(K)>j&&++ne<R);return J}function B(O,L,$,V){for(var G=0;G<o;++G){var K=M(L,$,V);if(K===0)return L;var J=I(L,$,V)-O;L-=J/K}return L}function F(O){this._p=O,this._mSampleValues=_?new Float32Array(C):new Array(C),this._precomputed=!1,this.get=this.get.bind(this)}return F.prototype={get:function(L){var $=this._p[0],V=this._p[1],G=this._p[2],K=this._p[3];return this._precomputed||this._precompute(),$===V&&G===K?L:L===0?0:L===1?1:I(this._getTForX(L),V,K)},_precompute:function(){var L=this._p[0],$=this._p[1],V=this._p[2],G=this._p[3];this._precomputed=!0,(L!==$||V!==G)&&this._calcSampleValues()},_calcSampleValues:function(){for(var L=this._p[0],$=this._p[2],V=0;V<C;++V)this._mSampleValues[V]=I(V*S,L,$)},_getTForX:function(L){for(var $=this._p[0],V=this._p[2],G=this._mSampleValues,K=0,J=1,ne=C-1;J!==ne&&G[J]<=L;++J)K+=S;--J;var le=(L-G[J])/(G[J+1]-G[J]),ue=K+le*S,ce=M(ue,$,V);return ce>=E?B(L,ue,$,V):ce===0?ue:D(L,K,K+S,$,V)}},s}(),pooling=function(){function s(a){return a.concat(createSizedArray(a.length))}return{double:s}}(),poolFactory=function(){return function(s,a,i){var o=0,E=s,j=createSizedArray(E),R={newElement:C,release:S};function C(){var _;return o?(o-=1,_=j[o]):_=a(),_}function S(_){o===E&&(j=pooling.double(j),E*=2),i&&i(_),j[o]=_,o+=1}return R}}(),bezierLengthPool=function(){function s(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,s)}(),segmentsLengthPool=function(){function s(){return{lengths:[],totalLength:0}}function a(i){var o,E=i.lengths.length;for(o=0;o<E;o+=1)bezierLengthPool.release(i.lengths[o]);i.lengths.length=0}return poolFactory(8,s,a)}();function bezFunction(){var s=Math;function a(N,I,M,D,B,F){var O=N*D+I*B+M*F-B*D-F*N-M*I;return O>-.001&&O<.001}function i(N,I,M,D,B,F,O,L,$){if(M===0&&F===0&&$===0)return a(N,I,D,B,O,L);var V=s.sqrt(s.pow(D-N,2)+s.pow(B-I,2)+s.pow(F-M,2)),G=s.sqrt(s.pow(O-N,2)+s.pow(L-I,2)+s.pow($-M,2)),K=s.sqrt(s.pow(O-D,2)+s.pow(L-B,2)+s.pow($-F,2)),J;return V>G?V>K?J=V-G-K:J=K-G-V:K>G?J=K-G-V:J=G-V-K,J>-1e-4&&J<1e-4}var o=function(){return function(N,I,M,D){var B=getDefaultCurveSegments(),F,O,L,$,V,G=0,K,J=[],ne=[],le=bezierLengthPool.newElement();for(L=M.length,F=0;F<B;F+=1){for(V=F/(B-1),K=0,O=0;O<L;O+=1)$=bmPow(1-V,3)*N[O]+3*bmPow(1-V,2)*V*M[O]+3*(1-V)*bmPow(V,2)*D[O]+bmPow(V,3)*I[O],J[O]=$,ne[O]!==null&&(K+=bmPow(J[O]-ne[O],2)),ne[O]=J[O];K&&(K=bmSqrt(K),G+=K),le.percents[F]=V,le.lengths[F]=G}return le.addedLength=G,le}}();function E(N){var I=segmentsLengthPool.newElement(),M=N.c,D=N.v,B=N.o,F=N.i,O,L=N._length,$=I.lengths,V=0;for(O=0;O<L-1;O+=1)$[O]=o(D[O],D[O+1],B[O],F[O+1]),V+=$[O].addedLength;return M&&L&&($[O]=o(D[O],D[0],B[O],F[0]),V+=$[O].addedLength),I.totalLength=V,I}function j(N){this.segmentLength=0,this.points=new Array(N)}function R(N,I){this.partialLength=N,this.point=I}var C=function(){var N={};return function(I,M,D,B){var F=(I[0]+"_"+I[1]+"_"+M[0]+"_"+M[1]+"_"+D[0]+"_"+D[1]+"_"+B[0]+"_"+B[1]).replace(/\./g,"p");if(!N[F]){var O=getDefaultCurveSegments(),L,$,V,G,K,J=0,ne,le,ue=null;I.length===2&&(I[0]!==M[0]||I[1]!==M[1])&&a(I[0],I[1],M[0],M[1],I[0]+D[0],I[1]+D[1])&&a(I[0],I[1],M[0],M[1],M[0]+B[0],M[1]+B[1])&&(O=2);var ce=new j(O);for(V=D.length,L=0;L<O;L+=1){for(le=createSizedArray(V),K=L/(O-1),ne=0,$=0;$<V;$+=1)G=bmPow(1-K,3)*I[$]+3*bmPow(1-K,2)*K*(I[$]+D[$])+3*(1-K)*bmPow(K,2)*(M[$]+B[$])+bmPow(K,3)*M[$],le[$]=G,ue!==null&&(ne+=bmPow(le[$]-ue[$],2));ne=bmSqrt(ne),J+=ne,ce.points[L]=new R(ne,le),ue=le}ce.segmentLength=J,N[F]=ce}return N[F]}}();function S(N,I){var M=I.percents,D=I.lengths,B=M.length,F=bmFloor((B-1)*N),O=N*I.addedLength,L=0;if(F===B-1||F===0||O===D[F])return M[F];for(var $=D[F]>O?-1:1,V=!0;V;)if(D[F]<=O&&D[F+1]>O?(L=(O-D[F])/(D[F+1]-D[F]),V=!1):F+=$,F<0||F>=B-1){if(F===B-1)return M[F];V=!1}return M[F]+(M[F+1]-M[F])*L}function _(N,I,M,D,B,F){var O=S(B,F),L=1-O,$=s.round((L*L*L*N[0]+(O*L*L+L*O*L+L*L*O)*M[0]+(O*O*L+L*O*O+O*L*O)*D[0]+O*O*O*I[0])*1e3)/1e3,V=s.round((L*L*L*N[1]+(O*L*L+L*O*L+L*L*O)*M[1]+(O*O*L+L*O*O+O*L*O)*D[1]+O*O*O*I[1])*1e3)/1e3;return[$,V]}var T=createTypedArray("float32",8);function P(N,I,M,D,B,F,O){B<0?B=0:B>1&&(B=1);var L=S(B,O);F=F>1?1:F;var $=S(F,O),V,G=N.length,K=1-L,J=1-$,ne=K*K*K,le=L*K*K*3,ue=L*L*K*3,ce=L*L*L,pe=K*K*J,xe=L*K*J+K*L*J+K*K*$,oe=L*L*J+K*L*$+L*K*$,Y=L*L*$,ae=K*J*J,H=L*J*J+K*$*J+K*J*$,W=L*$*J+K*$*$+L*J*$,U=L*$*$,ie=J*J*J,me=$*J*J+J*$*J+J*J*$,ee=$*$*J+J*$*$+$*J*$,ye=$*$*$;for(V=0;V<G;V+=1)T[V*4]=s.round((ne*N[V]+le*M[V]+ue*D[V]+ce*I[V])*1e3)/1e3,T[V*4+1]=s.round((pe*N[V]+xe*M[V]+oe*D[V]+Y*I[V])*1e3)/1e3,T[V*4+2]=s.round((ae*N[V]+H*M[V]+W*D[V]+U*I[V])*1e3)/1e3,T[V*4+3]=s.round((ie*N[V]+me*M[V]+ee*D[V]+ye*I[V])*1e3)/1e3;return T}return{getSegmentsLength:E,getNewSegment:P,getPointInSegment:_,buildBezierData:C,pointOnLine2D:a,pointOnLine3D:i}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(s,a){var i=this.offsetTime,o;this.propType==="multidimensional"&&(o=createTypedArray("float32",this.pv.length));for(var E=a.lastIndex,j=E,R=this.keyframes.length-1,C=!0,S,_,T;C;){if(S=this.keyframes[j],_=this.keyframes[j+1],j===R-1&&s>=_.t-i){S.h&&(S=_),E=0;break}if(_.t-i>s){E=j;break}j<R-1?j+=1:(E=0,C=!1)}T=this.keyframesMetadata[j]||{};var P,N,I,M,D,B,F=_.t-i,O=S.t-i,L;if(S.to){T.bezierData||(T.bezierData=bez.buildBezierData(S.s,_.s||S.e,S.to,S.ti));var $=T.bezierData;if(s>=F||s<O){var V=s>=F?$.points.length-1:0;for(N=$.points[V].point.length,P=0;P<N;P+=1)o[P]=$.points[V].point[P]}else{T.__fnct?B=T.__fnct:(B=BezierFactory.getBezierEasing(S.o.x,S.o.y,S.i.x,S.i.y,S.n).get,T.__fnct=B),I=B((s-O)/(F-O));var G=$.segmentLength*I,K,J=a.lastFrame<s&&a._lastKeyframeIndex===j?a._lastAddedLength:0;for(D=a.lastFrame<s&&a._lastKeyframeIndex===j?a._lastPoint:0,C=!0,M=$.points.length;C;){if(J+=$.points[D].partialLength,G===0||I===0||D===$.points.length-1){for(N=$.points[D].point.length,P=0;P<N;P+=1)o[P]=$.points[D].point[P];break}else if(G>=J&&G<J+$.points[D+1].partialLength){for(K=(G-J)/$.points[D+1].partialLength,N=$.points[D].point.length,P=0;P<N;P+=1)o[P]=$.points[D].point[P]+($.points[D+1].point[P]-$.points[D].point[P])*K;break}D<M-1?D+=1:C=!1}a._lastPoint=D,a._lastAddedLength=J-$.points[D].partialLength,a._lastKeyframeIndex=j}}else{var ne,le,ue,ce,pe;if(R=S.s.length,L=_.s||S.e,this.sh&&S.h!==1)if(s>=F)o[0]=L[0],o[1]=L[1],o[2]=L[2];else if(s<=O)o[0]=S.s[0],o[1]=S.s[1],o[2]=S.s[2];else{var xe=createQuaternion(S.s),oe=createQuaternion(L),Y=(s-O)/(F-O);quaternionToEuler(o,slerp(xe,oe,Y))}else for(j=0;j<R;j+=1)S.h!==1&&(s>=F?I=1:s<O?I=0:(S.o.x.constructor===Array?(T.__fnct||(T.__fnct=[]),T.__fnct[j]?B=T.__fnct[j]:(ne=S.o.x[j]===void 0?S.o.x[0]:S.o.x[j],le=S.o.y[j]===void 0?S.o.y[0]:S.o.y[j],ue=S.i.x[j]===void 0?S.i.x[0]:S.i.x[j],ce=S.i.y[j]===void 0?S.i.y[0]:S.i.y[j],B=BezierFactory.getBezierEasing(ne,le,ue,ce).get,T.__fnct[j]=B)):T.__fnct?B=T.__fnct:(ne=S.o.x,le=S.o.y,ue=S.i.x,ce=S.i.y,B=BezierFactory.getBezierEasing(ne,le,ue,ce).get,S.keyframeMetadata=B),I=B((s-O)/(F-O)))),L=_.s||S.e,pe=S.h===1?S.s[j]:S.s[j]+(L[j]-S.s[j])*I,this.propType==="multidimensional"?o[j]=pe:o=pe}return a.lastIndex=E,o}function slerp(s,a,i){var o=[],E=s[0],j=s[1],R=s[2],C=s[3],S=a[0],_=a[1],T=a[2],P=a[3],N,I,M,D,B;return I=E*S+j*_+R*T+C*P,I<0&&(I=-I,S=-S,_=-_,T=-T,P=-P),1-I>1e-6?(N=Math.acos(I),M=Math.sin(N),D=Math.sin((1-i)*N)/M,B=Math.sin(i*N)/M):(D=1-i,B=i),o[0]=D*E+B*S,o[1]=D*j+B*_,o[2]=D*R+B*T,o[3]=D*C+B*P,o}function quaternionToEuler(s,a){var i=a[0],o=a[1],E=a[2],j=a[3],R=Math.atan2(2*o*j-2*i*E,1-2*o*o-2*E*E),C=Math.asin(2*i*o+2*E*j),S=Math.atan2(2*i*j-2*o*E,1-2*i*i-2*E*E);s[0]=R/degToRads,s[1]=C/degToRads,s[2]=S/degToRads}function createQuaternion(s){var a=s[0]*degToRads,i=s[1]*degToRads,o=s[2]*degToRads,E=Math.cos(a/2),j=Math.cos(i/2),R=Math.cos(o/2),C=Math.sin(a/2),S=Math.sin(i/2),_=Math.sin(o/2),T=E*j*R-C*S*_,P=C*S*R+E*j*_,N=C*j*R+E*S*_,I=E*S*R-C*j*_;return[P,N,I,T]}function getValueAtCurrentTime(){var s=this.comp.renderedFrame-this.offsetTime,a=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(s===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&s>=i||this._caching.lastFrame<a&&s<a))){this._caching.lastFrame>=s&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var o=this.interpolateValue(s,this._caching);this.pv=o}return this._caching.lastFrame=s,this.pv}function setVValue(s){var a;if(this.propType==="unidimensional")a=s*this.mult,mathAbs(this.v-a)>1e-5&&(this.v=a,this._mdf=!0);else for(var i=0,o=this.v.length;i<o;)a=s[i]*this.mult,mathAbs(this.v[i]-a)>1e-5&&(this.v[i]=a,this._mdf=!0),i+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var s,a=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(s=0;s<a;s+=1)i=this.effectsSequence[s](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(s){this.effectsSequence.push(s),this.container.addDynamicProperty(this)}function ValueProperty(s,a,i,o){this.propType="unidimensional",this.mult=i||1,this.data=a,this.v=i?a.k*i:a.k,this.pv=a.k,this._mdf=!1,this.elem=s,this.container=o,this.comp=s.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(s,a,i,o){this.propType="multidimensional",this.mult=i||1,this.data=a,this._mdf=!1,this.elem=s,this.container=o,this.comp=s.comp,this.k=!1,this.kf=!1,this.frameId=-1;var E,j=a.k.length;for(this.v=createTypedArray("float32",j),this.pv=createTypedArray("float32",j),this.vel=createTypedArray("float32",j),E=0;E<j;E+=1)this.v[E]=a.k[E]*this.mult,this.pv[E]=a.k[E];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(s,a,i,o){this.propType="unidimensional",this.keyframes=a.k,this.keyframesMetadata=[],this.offsetTime=s.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=a,this.mult=i||1,this.elem=s,this.container=o,this.comp=s.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(s,a,i,o){this.propType="multidimensional";var E,j=a.k.length,R,C,S,_;for(E=0;E<j-1;E+=1)a.k[E].to&&a.k[E].s&&a.k[E+1]&&a.k[E+1].s&&(R=a.k[E].s,C=a.k[E+1].s,S=a.k[E].to,_=a.k[E].ti,(R.length===2&&!(R[0]===C[0]&&R[1]===C[1])&&bez.pointOnLine2D(R[0],R[1],C[0],C[1],R[0]+S[0],R[1]+S[1])&&bez.pointOnLine2D(R[0],R[1],C[0],C[1],C[0]+_[0],C[1]+_[1])||R.length===3&&!(R[0]===C[0]&&R[1]===C[1]&&R[2]===C[2])&&bez.pointOnLine3D(R[0],R[1],R[2],C[0],C[1],C[2],R[0]+S[0],R[1]+S[1],R[2]+S[2])&&bez.pointOnLine3D(R[0],R[1],R[2],C[0],C[1],C[2],C[0]+_[0],C[1]+_[1],C[2]+_[2]))&&(a.k[E].to=null,a.k[E].ti=null),R[0]===C[0]&&R[1]===C[1]&&S[0]===0&&S[1]===0&&_[0]===0&&_[1]===0&&(R.length===2||R[2]===C[2]&&S[2]===0&&_[2]===0)&&(a.k[E].to=null,a.k[E].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=a,this.keyframes=a.k,this.keyframesMetadata=[],this.offsetTime=s.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=s,this.container=o,this.comp=s.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var T=a.k[0].s.length;for(this.v=createTypedArray("float32",T),this.pv=createTypedArray("float32",T),E=0;E<T;E+=1)this.v[E]=initFrame,this.pv[E]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",T)},this.addEffect=addEffect}var PropertyFactory=function(){function s(i,o,E,j,R){o.sid&&(o=i.globalData.slotManager.getProp(o));var C;if(!o.k.length)C=new ValueProperty(i,o,j,R);else if(typeof o.k[0]=="number")C=new MultiDimensionalProperty(i,o,j,R);else switch(E){case 0:C=new KeyframedValueProperty(i,o,j,R);break;case 1:C=new KeyframedMultidimensionalProperty(i,o,j,R);break}return C.effectsSequence.length&&R.addDynamicProperty(C),C}var a={getProp:s};return a}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(a){this.dynamicProperties.indexOf(a)===-1&&(this.dynamicProperties.push(a),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var a,i=this.dynamicProperties.length;for(a=0;a<i;a+=1)this.dynamicProperties[a].getValue(),this.dynamicProperties[a]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(a){this.container=a,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function s(){return createTypedArray("float32",2)}return poolFactory(8,s)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(s,a){this.c=s,this.setLength(a);for(var i=0;i<a;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(s){for(;this._maxLength<s;)this.doubleArrayLength();this._length=s},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(s,a,i,o,E){var j;switch(this._length=Math.max(this._length,o+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":j=this.v;break;case"i":j=this.i;break;case"o":j=this.o;break;default:j=[];break}(!j[o]||j[o]&&!E)&&(j[o]=pointPool.newElement()),j[o][0]=s,j[o][1]=a},ShapePath.prototype.setTripleAt=function(s,a,i,o,E,j,R,C){this.setXYAt(s,a,"v",R,C),this.setXYAt(i,o,"o",R,C),this.setXYAt(E,j,"i",R,C)},ShapePath.prototype.reverse=function(){var s=new ShapePath;s.setPathData(this.c,this._length);var a=this.v,i=this.o,o=this.i,E=0;this.c&&(s.setTripleAt(a[0][0],a[0][1],o[0][0],o[0][1],i[0][0],i[0][1],0,!1),E=1);var j=this._length-1,R=this._length,C;for(C=E;C<R;C+=1)s.setTripleAt(a[j][0],a[j][1],o[j][0],o[j][1],i[j][0],i[j][1],C,!1),j-=1;return s},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function s(){return new ShapePath}function a(E){var j=E._length,R;for(R=0;R<j;R+=1)pointPool.release(E.v[R]),pointPool.release(E.i[R]),pointPool.release(E.o[R]),E.v[R]=null,E.i[R]=null,E.o[R]=null;E._length=0,E.c=!1}function i(E){var j=o.newElement(),R,C=E._length===void 0?E.v.length:E._length;for(j.setLength(C),j.c=E.c,R=0;R<C;R+=1)j.setTripleAt(E.v[R][0],E.v[R][1],E.o[R][0],E.o[R][1],E.i[R][0],E.i[R][1],R);return j}var o=poolFactory(4,s,a);return o.clone=i,o}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(s){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=s,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var s;for(s=0;s<this._length;s+=1)shapePool.release(this.shapes[s]);this._length=0};var shapeCollectionPool=function(){var s={newShapeCollection:E,release:j},a=0,i=4,o=createSizedArray(i);function E(){var R;return a?(a-=1,R=o[a]):R=new ShapeCollection,R}function j(R){var C,S=R._length;for(C=0;C<S;C+=1)shapePool.release(R.shapes[C]);R._length=0,a===i&&(o=pooling.double(o),i*=2),o[a]=R,a+=1}return s}(),ShapePropertyFactory=function(){var s=-999999;function a(F,O,L){var $=L.lastIndex,V,G,K,J,ne,le,ue,ce,pe,xe=this.keyframes;if(F<xe[0].t-this.offsetTime)V=xe[0].s[0],K=!0,$=0;else if(F>=xe[xe.length-1].t-this.offsetTime)V=xe[xe.length-1].s?xe[xe.length-1].s[0]:xe[xe.length-2].e[0],K=!0;else{for(var oe=$,Y=xe.length-1,ae=!0,H,W,U;ae&&(H=xe[oe],W=xe[oe+1],!(W.t-this.offsetTime>F));)oe<Y-1?oe+=1:ae=!1;if(U=this.keyframesMetadata[oe]||{},K=H.h===1,$=oe,!K){if(F>=W.t-this.offsetTime)ce=1;else if(F<H.t-this.offsetTime)ce=0;else{var ie;U.__fnct?ie=U.__fnct:(ie=BezierFactory.getBezierEasing(H.o.x,H.o.y,H.i.x,H.i.y).get,U.__fnct=ie),ce=ie((F-(H.t-this.offsetTime))/(W.t-this.offsetTime-(H.t-this.offsetTime)))}G=W.s?W.s[0]:H.e[0]}V=H.s[0]}for(le=O._length,ue=V.i[0].length,L.lastIndex=$,J=0;J<le;J+=1)for(ne=0;ne<ue;ne+=1)pe=K?V.i[J][ne]:V.i[J][ne]+(G.i[J][ne]-V.i[J][ne])*ce,O.i[J][ne]=pe,pe=K?V.o[J][ne]:V.o[J][ne]+(G.o[J][ne]-V.o[J][ne])*ce,O.o[J][ne]=pe,pe=K?V.v[J][ne]:V.v[J][ne]+(G.v[J][ne]-V.v[J][ne])*ce,O.v[J][ne]=pe}function i(){var F=this.comp.renderedFrame-this.offsetTime,O=this.keyframes[0].t-this.offsetTime,L=this.keyframes[this.keyframes.length-1].t-this.offsetTime,$=this._caching.lastFrame;return $!==s&&($<O&&F<O||$>L&&F>L)||(this._caching.lastIndex=$<F?this._caching.lastIndex:0,this.interpolateShape(F,this.pv,this._caching)),this._caching.lastFrame=F,this.pv}function o(){this.paths=this.localShapeCollection}function E(F,O){if(F._length!==O._length||F.c!==O.c)return!1;var L,$=F._length;for(L=0;L<$;L+=1)if(F.v[L][0]!==O.v[L][0]||F.v[L][1]!==O.v[L][1]||F.o[L][0]!==O.o[L][0]||F.o[L][1]!==O.o[L][1]||F.i[L][0]!==O.i[L][0]||F.i[L][1]!==O.i[L][1])return!1;return!0}function j(F){E(this.v,F)||(this.v=shapePool.clone(F),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function R(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var F;this.kf?F=this.pv:this.data.ks?F=this.data.ks.k:F=this.data.pt.k;var O,L=this.effectsSequence.length;for(O=0;O<L;O+=1)F=this.effectsSequence[O](F);this.setVValue(F),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function C(F,O,L){this.propType="shape",this.comp=F.comp,this.container=F,this.elem=F,this.data=O,this.k=!1,this.kf=!1,this._mdf=!1;var $=L===3?O.pt.k:O.ks.k;this.v=shapePool.clone($),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=o,this.effectsSequence=[]}function S(F){this.effectsSequence.push(F),this.container.addDynamicProperty(this)}C.prototype.interpolateShape=a,C.prototype.getValue=R,C.prototype.setVValue=j,C.prototype.addEffect=S;function _(F,O,L){this.propType="shape",this.comp=F.comp,this.elem=F,this.container=F,this.offsetTime=F.data.st,this.keyframes=L===3?O.pt.k:O.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var $=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,$),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=s,this.reset=o,this._caching={lastFrame:s,lastIndex:0},this.effectsSequence=[i.bind(this)]}_.prototype.getValue=R,_.prototype.interpolateShape=a,_.prototype.setVValue=j,_.prototype.addEffect=S;var T=function(){var F=roundCorner;function O(L,$){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=$.d,this.elem=L,this.comp=L.comp,this.frameId=-1,this.initDynamicPropertyContainer(L),this.p=PropertyFactory.getProp(L,$.p,1,0,this),this.s=PropertyFactory.getProp(L,$.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return O.prototype={reset:o,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var $=this.p.v[0],V=this.p.v[1],G=this.s.v[0]/2,K=this.s.v[1]/2,J=this.d!==3,ne=this.v;ne.v[0][0]=$,ne.v[0][1]=V-K,ne.v[1][0]=J?$+G:$-G,ne.v[1][1]=V,ne.v[2][0]=$,ne.v[2][1]=V+K,ne.v[3][0]=J?$-G:$+G,ne.v[3][1]=V,ne.i[0][0]=J?$-G*F:$+G*F,ne.i[0][1]=V-K,ne.i[1][0]=J?$+G:$-G,ne.i[1][1]=V-K*F,ne.i[2][0]=J?$+G*F:$-G*F,ne.i[2][1]=V+K,ne.i[3][0]=J?$-G:$+G,ne.i[3][1]=V+K*F,ne.o[0][0]=J?$+G*F:$-G*F,ne.o[0][1]=V-K,ne.o[1][0]=J?$+G:$-G,ne.o[1][1]=V+K*F,ne.o[2][0]=J?$-G*F:$+G*F,ne.o[2][1]=V+K,ne.o[3][0]=J?$-G:$+G,ne.o[3][1]=V-K*F}},extendPrototype([DynamicPropertyContainer],O),O}(),P=function(){function F(O,L){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=O,this.comp=O.comp,this.data=L,this.frameId=-1,this.d=L.d,this.initDynamicPropertyContainer(O),L.sy===1?(this.ir=PropertyFactory.getProp(O,L.ir,0,0,this),this.is=PropertyFactory.getProp(O,L.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(O,L.pt,0,0,this),this.p=PropertyFactory.getProp(O,L.p,1,0,this),this.r=PropertyFactory.getProp(O,L.r,0,degToRads,this),this.or=PropertyFactory.getProp(O,L.or,0,0,this),this.os=PropertyFactory.getProp(O,L.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return F.prototype={reset:o,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var L=Math.floor(this.pt.v)*2,$=Math.PI*2/L,V=!0,G=this.or.v,K=this.ir.v,J=this.os.v,ne=this.is.v,le=2*Math.PI*G/(L*2),ue=2*Math.PI*K/(L*2),ce,pe,xe,oe,Y=-Math.PI/2;Y+=this.r.v;var ae=this.data.d===3?-1:1;for(this.v._length=0,ce=0;ce<L;ce+=1){pe=V?G:K,xe=V?J:ne,oe=V?le:ue;var H=pe*Math.cos(Y),W=pe*Math.sin(Y),U=H===0&&W===0?0:W/Math.sqrt(H*H+W*W),ie=H===0&&W===0?0:-H/Math.sqrt(H*H+W*W);H+=+this.p.v[0],W+=+this.p.v[1],this.v.setTripleAt(H,W,H-U*oe*xe*ae,W-ie*oe*xe*ae,H+U*oe*xe*ae,W+ie*oe*xe*ae,ce,!0),V=!V,Y+=$*ae}},convertPolygonToPath:function(){var L=Math.floor(this.pt.v),$=Math.PI*2/L,V=this.or.v,G=this.os.v,K=2*Math.PI*V/(L*4),J,ne=-Math.PI*.5,le=this.data.d===3?-1:1;for(ne+=this.r.v,this.v._length=0,J=0;J<L;J+=1){var ue=V*Math.cos(ne),ce=V*Math.sin(ne),pe=ue===0&&ce===0?0:ce/Math.sqrt(ue*ue+ce*ce),xe=ue===0&&ce===0?0:-ue/Math.sqrt(ue*ue+ce*ce);ue+=+this.p.v[0],ce+=+this.p.v[1],this.v.setTripleAt(ue,ce,ue-pe*K*G*le,ce-xe*K*G*le,ue+pe*K*G*le,ce+xe*K*G*le,J,!0),ne+=$*le}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],F),F}(),N=function(){function F(O,L){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=O,this.comp=O.comp,this.frameId=-1,this.d=L.d,this.initDynamicPropertyContainer(O),this.p=PropertyFactory.getProp(O,L.p,1,0,this),this.s=PropertyFactory.getProp(O,L.s,1,0,this),this.r=PropertyFactory.getProp(O,L.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return F.prototype={convertRectToPath:function(){var L=this.p.v[0],$=this.p.v[1],V=this.s.v[0]/2,G=this.s.v[1]/2,K=bmMin(V,G,this.r.v),J=K*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(L+V,$-G+K,L+V,$-G+K,L+V,$-G+J,0,!0),this.v.setTripleAt(L+V,$+G-K,L+V,$+G-J,L+V,$+G-K,1,!0),K!==0?(this.v.setTripleAt(L+V-K,$+G,L+V-K,$+G,L+V-J,$+G,2,!0),this.v.setTripleAt(L-V+K,$+G,L-V+J,$+G,L-V+K,$+G,3,!0),this.v.setTripleAt(L-V,$+G-K,L-V,$+G-K,L-V,$+G-J,4,!0),this.v.setTripleAt(L-V,$-G+K,L-V,$-G+J,L-V,$-G+K,5,!0),this.v.setTripleAt(L-V+K,$-G,L-V+K,$-G,L-V+J,$-G,6,!0),this.v.setTripleAt(L+V-K,$-G,L+V-J,$-G,L+V-K,$-G,7,!0)):(this.v.setTripleAt(L-V,$+G,L-V+J,$+G,L-V,$+G,2),this.v.setTripleAt(L-V,$-G,L-V,$-G+J,L-V,$-G,3))):(this.v.setTripleAt(L+V,$-G+K,L+V,$-G+J,L+V,$-G+K,0,!0),K!==0?(this.v.setTripleAt(L+V-K,$-G,L+V-K,$-G,L+V-J,$-G,1,!0),this.v.setTripleAt(L-V+K,$-G,L-V+J,$-G,L-V+K,$-G,2,!0),this.v.setTripleAt(L-V,$-G+K,L-V,$-G+K,L-V,$-G+J,3,!0),this.v.setTripleAt(L-V,$+G-K,L-V,$+G-J,L-V,$+G-K,4,!0),this.v.setTripleAt(L-V+K,$+G,L-V+K,$+G,L-V+J,$+G,5,!0),this.v.setTripleAt(L+V-K,$+G,L+V-J,$+G,L+V-K,$+G,6,!0),this.v.setTripleAt(L+V,$+G-K,L+V,$+G-K,L+V,$+G-J,7,!0)):(this.v.setTripleAt(L-V,$-G,L-V+J,$-G,L-V,$-G,1,!0),this.v.setTripleAt(L-V,$+G,L-V,$+G-J,L-V,$+G,2,!0),this.v.setTripleAt(L+V,$+G,L+V-J,$+G,L+V,$+G,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:o},extendPrototype([DynamicPropertyContainer],F),F}();function I(F,O,L){var $;if(L===3||L===4){var V=L===3?O.pt:O.ks,G=V.k;G.length?$=new _(F,O,L):$=new C(F,O,L)}else L===5?$=new N(F,O):L===6?$=new T(F,O):L===7&&($=new P(F,O));return $.k&&F.addDynamicProperty($),$}function M(){return C}function D(){return _}var B={};return B.getShapeProp=I,B.getConstructorFunction=M,B.getKeyframedConstructorFunction=D,B}();/*!
 Transformation Matrix v2.0
 (c) Epistemex 2014-2015
 www.epistemex.com
 By Ken Fyrstenberg
 Contributions by leeoniya.
 License: MIT, header required.
 */var Matrix=function(){var s=Math.cos,a=Math.sin,i=Math.tan,o=Math.round;function E(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function j(H){if(H===0)return this;var W=s(H),U=a(H);return this._t(W,-U,0,0,U,W,0,0,0,0,1,0,0,0,0,1)}function R(H){if(H===0)return this;var W=s(H),U=a(H);return this._t(1,0,0,0,0,W,-U,0,0,U,W,0,0,0,0,1)}function C(H){if(H===0)return this;var W=s(H),U=a(H);return this._t(W,0,U,0,0,1,0,0,-U,0,W,0,0,0,0,1)}function S(H){if(H===0)return this;var W=s(H),U=a(H);return this._t(W,-U,0,0,U,W,0,0,0,0,1,0,0,0,0,1)}function _(H,W){return this._t(1,W,H,1,0,0)}function T(H,W){return this.shear(i(H),i(W))}function P(H,W){var U=s(W),ie=a(W);return this._t(U,ie,0,0,-ie,U,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(H),1,0,0,0,0,1,0,0,0,0,1)._t(U,-ie,0,0,ie,U,0,0,0,0,1,0,0,0,0,1)}function N(H,W,U){return!U&&U!==0&&(U=1),H===1&&W===1&&U===1?this:this._t(H,0,0,0,0,W,0,0,0,0,U,0,0,0,0,1)}function I(H,W,U,ie,me,ee,ye,Ce,Ae,De,Ze,Ue,Se,ze,Me,Te){return this.props[0]=H,this.props[1]=W,this.props[2]=U,this.props[3]=ie,this.props[4]=me,this.props[5]=ee,this.props[6]=ye,this.props[7]=Ce,this.props[8]=Ae,this.props[9]=De,this.props[10]=Ze,this.props[11]=Ue,this.props[12]=Se,this.props[13]=ze,this.props[14]=Me,this.props[15]=Te,this}function M(H,W,U){return U=U||0,H!==0||W!==0||U!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,H,W,U,1):this}function D(H,W,U,ie,me,ee,ye,Ce,Ae,De,Ze,Ue,Se,ze,Me,Te){var be=this.props;if(H===1&&W===0&&U===0&&ie===0&&me===0&&ee===1&&ye===0&&Ce===0&&Ae===0&&De===0&&Ze===1&&Ue===0)return be[12]=be[12]*H+be[15]*Se,be[13]=be[13]*ee+be[15]*ze,be[14]=be[14]*Ze+be[15]*Me,be[15]*=Te,this._identityCalculated=!1,this;var Oe=be[0],Ge=be[1],We=be[2],$e=be[3],qe=be[4],Qe=be[5],Je=be[6],st=be[7],rt=be[8],Ke=be[9],Re=be[10],fe=be[11],ve=be[12],_e=be[13],Ie=be[14],ke=be[15];return be[0]=Oe*H+Ge*me+We*Ae+$e*Se,be[1]=Oe*W+Ge*ee+We*De+$e*ze,be[2]=Oe*U+Ge*ye+We*Ze+$e*Me,be[3]=Oe*ie+Ge*Ce+We*Ue+$e*Te,be[4]=qe*H+Qe*me+Je*Ae+st*Se,be[5]=qe*W+Qe*ee+Je*De+st*ze,be[6]=qe*U+Qe*ye+Je*Ze+st*Me,be[7]=qe*ie+Qe*Ce+Je*Ue+st*Te,be[8]=rt*H+Ke*me+Re*Ae+fe*Se,be[9]=rt*W+Ke*ee+Re*De+fe*ze,be[10]=rt*U+Ke*ye+Re*Ze+fe*Me,be[11]=rt*ie+Ke*Ce+Re*Ue+fe*Te,be[12]=ve*H+_e*me+Ie*Ae+ke*Se,be[13]=ve*W+_e*ee+Ie*De+ke*ze,be[14]=ve*U+_e*ye+Ie*Ze+ke*Me,be[15]=ve*ie+_e*Ce+Ie*Ue+ke*Te,this._identityCalculated=!1,this}function B(H){var W=H.props;return this.transform(W[0],W[1],W[2],W[3],W[4],W[5],W[6],W[7],W[8],W[9],W[10],W[11],W[12],W[13],W[14],W[15])}function F(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function O(H){for(var W=0;W<16;){if(H.props[W]!==this.props[W])return!1;W+=1}return!0}function L(H){var W;for(W=0;W<16;W+=1)H.props[W]=this.props[W];return H}function $(H){var W;for(W=0;W<16;W+=1)this.props[W]=H[W]}function V(H,W,U){return{x:H*this.props[0]+W*this.props[4]+U*this.props[8]+this.props[12],y:H*this.props[1]+W*this.props[5]+U*this.props[9]+this.props[13],z:H*this.props[2]+W*this.props[6]+U*this.props[10]+this.props[14]}}function G(H,W,U){return H*this.props[0]+W*this.props[4]+U*this.props[8]+this.props[12]}function K(H,W,U){return H*this.props[1]+W*this.props[5]+U*this.props[9]+this.props[13]}function J(H,W,U){return H*this.props[2]+W*this.props[6]+U*this.props[10]+this.props[14]}function ne(){var H=this.props[0]*this.props[5]-this.props[1]*this.props[4],W=this.props[5]/H,U=-this.props[1]/H,ie=-this.props[4]/H,me=this.props[0]/H,ee=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/H,ye=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/H,Ce=new Matrix;return Ce.props[0]=W,Ce.props[1]=U,Ce.props[4]=ie,Ce.props[5]=me,Ce.props[12]=ee,Ce.props[13]=ye,Ce}function le(H){var W=this.getInverseMatrix();return W.applyToPointArray(H[0],H[1],H[2]||0)}function ue(H){var W,U=H.length,ie=[];for(W=0;W<U;W+=1)ie[W]=le(H[W]);return ie}function ce(H,W,U){var ie=createTypedArray("float32",6);if(this.isIdentity())ie[0]=H[0],ie[1]=H[1],ie[2]=W[0],ie[3]=W[1],ie[4]=U[0],ie[5]=U[1];else{var me=this.props[0],ee=this.props[1],ye=this.props[4],Ce=this.props[5],Ae=this.props[12],De=this.props[13];ie[0]=H[0]*me+H[1]*ye+Ae,ie[1]=H[0]*ee+H[1]*Ce+De,ie[2]=W[0]*me+W[1]*ye+Ae,ie[3]=W[0]*ee+W[1]*Ce+De,ie[4]=U[0]*me+U[1]*ye+Ae,ie[5]=U[0]*ee+U[1]*Ce+De}return ie}function pe(H,W,U){var ie;return this.isIdentity()?ie=[H,W,U]:ie=[H*this.props[0]+W*this.props[4]+U*this.props[8]+this.props[12],H*this.props[1]+W*this.props[5]+U*this.props[9]+this.props[13],H*this.props[2]+W*this.props[6]+U*this.props[10]+this.props[14]],ie}function xe(H,W){if(this.isIdentity())return H+","+W;var U=this.props;return Math.round((H*U[0]+W*U[4]+U[12])*100)/100+","+Math.round((H*U[1]+W*U[5]+U[13])*100)/100}function oe(){for(var H=0,W=this.props,U="matrix3d(",ie=1e4;H<16;)U+=o(W[H]*ie)/ie,U+=H===15?")":",",H+=1;return U}function Y(H){var W=1e4;return H<1e-6&&H>0||H>-1e-6&&H<0?o(H*W)/W:H}function ae(){var H=this.props,W=Y(H[0]),U=Y(H[1]),ie=Y(H[4]),me=Y(H[5]),ee=Y(H[12]),ye=Y(H[13]);return"matrix("+W+","+U+","+ie+","+me+","+ee+","+ye+")"}return function(){this.reset=E,this.rotate=j,this.rotateX=R,this.rotateY=C,this.rotateZ=S,this.skew=T,this.skewFromAxis=P,this.shear=_,this.scale=N,this.setTransform=I,this.translate=M,this.transform=D,this.multiply=B,this.applyToPoint=V,this.applyToX=G,this.applyToY=K,this.applyToZ=J,this.applyToPointArray=pe,this.applyToTriplePoints=ce,this.applyToPointStringified=xe,this.toCSS=oe,this.to2dCSS=ae,this.clone=L,this.cloneFromProps=$,this.equals=O,this.inversePoints=ue,this.inversePoint=le,this.getInverseMatrix=ne,this._t=this.transform,this.isIdentity=F,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(i){return typeof i}:_typeof$3=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$3(s)}var lottie={};function setLocation(s){setLocationHref(s)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(s){setSubframeEnabled(s)}function setPrefix(s){setIdPrefix(s)}function loadAnimation(s){return animationManager.loadAnimation(s)}function setQuality(s){if(typeof s=="string")switch(s){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(s)&&s>1&&setDefaultCurveSegments(s)}function inBrowser(){return typeof navigator<"u"}function installPlugin(s,a){s==="expressions"&&setExpressionsPlugin(a)}function getFactory(s){switch(s){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(s){for(var a=queryString.split("&"),i=0;i<a.length;i+=1){var o=a[i].split("=");if(decodeURIComponent(o[0])==s)return decodeURIComponent(o[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(s){}var ShapeModifiers=function(){var s={},a={};s.registerModifier=i,s.getModifier=o;function i(E,j){a[E]||(a[E]=j)}function o(E,j,R){return new a[E](j,R)}return s}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(s){if(!this.closed){s.sh.container.addDynamicProperty(s.sh);var a={shape:s.sh,data:s,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(a),this.addShapeToModifier(a),this._isAnimated&&s.setAsAnimated()}},ShapeModifier.prototype.init=function(s,a){this.shapes=[],this.elem=s,this.initDynamicPropertyContainer(s),this.initModifierProperties(s,a),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(s,a){this.s=PropertyFactory.getProp(s,a.s,0,.01,this),this.e=PropertyFactory.getProp(s,a.e,0,.01,this),this.o=PropertyFactory.getProp(s,a.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=a.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(s){s.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(s,a,i,o,E){var j=[];a<=1?j.push({s,e:a}):s>=1?j.push({s:s-1,e:a-1}):(j.push({s,e:1}),j.push({s:0,e:a-1}));var R=[],C,S=j.length,_;for(C=0;C<S;C+=1)if(_=j[C],!(_.e*E<o||_.s*E>o+i)){var T,P;_.s*E<=o?T=0:T=(_.s*E-o)/i,_.e*E>=o+i?P=1:P=(_.e*E-o)/i,R.push([T,P])}return R.length||R.push([0,0]),R},TrimModifier.prototype.releasePathsData=function(s){var a,i=s.length;for(a=0;a<i;a+=1)segmentsLengthPool.release(s[a]);return s.length=0,s},TrimModifier.prototype.processShapes=function(s){var a,i;if(this._mdf||s){var o=this.o.v%360/360;if(o<0&&(o+=1),this.s.v>1?a=1+o:this.s.v<0?a=0+o:a=this.s.v+o,this.e.v>1?i=1+o:this.e.v<0?i=0+o:i=this.e.v+o,a>i){var E=a;a=i,i=E}a=Math.round(a*1e4)*1e-4,i=Math.round(i*1e4)*1e-4,this.sValue=a,this.eValue=i}else a=this.sValue,i=this.eValue;var j,R,C=this.shapes.length,S,_,T,P,N,I=0;if(i===a)for(R=0;R<C;R+=1)this.shapes[R].localShapeCollection.releaseShapes(),this.shapes[R].shape._mdf=!0,this.shapes[R].shape.paths=this.shapes[R].localShapeCollection,this._mdf&&(this.shapes[R].pathsData.length=0);else if(i===1&&a===0||i===0&&a===1){if(this._mdf)for(R=0;R<C;R+=1)this.shapes[R].pathsData.length=0,this.shapes[R].shape._mdf=!0}else{var M=[],D,B;for(R=0;R<C;R+=1)if(D=this.shapes[R],!D.shape._mdf&&!this._mdf&&!s&&this.m!==2)D.shape.paths=D.localShapeCollection;else{if(j=D.shape.paths,_=j._length,N=0,!D.shape._mdf&&D.pathsData.length)N=D.totalShapeLength;else{for(T=this.releasePathsData(D.pathsData),S=0;S<_;S+=1)P=bez.getSegmentsLength(j.shapes[S]),T.push(P),N+=P.totalLength;D.totalShapeLength=N,D.pathsData=T}I+=N,D.shape._mdf=!0}var F=a,O=i,L=0,$;for(R=C-1;R>=0;R-=1)if(D=this.shapes[R],D.shape._mdf){for(B=D.localShapeCollection,B.releaseShapes(),this.m===2&&C>1?($=this.calculateShapeEdges(a,i,D.totalShapeLength,L,I),L+=D.totalShapeLength):$=[[F,O]],_=$.length,S=0;S<_;S+=1){F=$[S][0],O=$[S][1],M.length=0,O<=1?M.push({s:D.totalShapeLength*F,e:D.totalShapeLength*O}):F>=1?M.push({s:D.totalShapeLength*(F-1),e:D.totalShapeLength*(O-1)}):(M.push({s:D.totalShapeLength*F,e:D.totalShapeLength}),M.push({s:0,e:D.totalShapeLength*(O-1)}));var V=this.addShapes(D,M[0]);if(M[0].s!==M[0].e){if(M.length>1){var G=D.shape.paths.shapes[D.shape.paths._length-1];if(G.c){var K=V.pop();this.addPaths(V,B),V=this.addShapes(D,M[1],K)}else this.addPaths(V,B),V=this.addShapes(D,M[1])}this.addPaths(V,B)}}D.shape.paths=B}}},TrimModifier.prototype.addPaths=function(s,a){var i,o=s.length;for(i=0;i<o;i+=1)a.addShape(s[i])},TrimModifier.prototype.addSegment=function(s,a,i,o,E,j,R){E.setXYAt(a[0],a[1],"o",j),E.setXYAt(i[0],i[1],"i",j+1),R&&E.setXYAt(s[0],s[1],"v",j),E.setXYAt(o[0],o[1],"v",j+1)},TrimModifier.prototype.addSegmentFromArray=function(s,a,i,o){a.setXYAt(s[1],s[5],"o",i),a.setXYAt(s[2],s[6],"i",i+1),o&&a.setXYAt(s[0],s[4],"v",i),a.setXYAt(s[3],s[7],"v",i+1)},TrimModifier.prototype.addShapes=function(s,a,i){var o=s.pathsData,E=s.shape.paths.shapes,j,R=s.shape.paths._length,C,S,_=0,T,P,N,I,M=[],D,B=!0;for(i?(P=i._length,D=i._length):(i=shapePool.newElement(),P=0,D=0),M.push(i),j=0;j<R;j+=1){for(N=o[j].lengths,i.c=E[j].c,S=E[j].c?N.length:N.length+1,C=1;C<S;C+=1)if(T=N[C-1],_+T.addedLength<a.s)_+=T.addedLength,i.c=!1;else if(_>a.e){i.c=!1;break}else a.s<=_&&a.e>=_+T.addedLength?(this.addSegment(E[j].v[C-1],E[j].o[C-1],E[j].i[C],E[j].v[C],i,P,B),B=!1):(I=bez.getNewSegment(E[j].v[C-1],E[j].v[C],E[j].o[C-1],E[j].i[C],(a.s-_)/T.addedLength,(a.e-_)/T.addedLength,N[C-1]),this.addSegmentFromArray(I,i,P,B),B=!1,i.c=!1),_+=T.addedLength,P+=1;if(E[j].c&&N.length){if(T=N[C-1],_<=a.e){var F=N[C-1].addedLength;a.s<=_&&a.e>=_+F?(this.addSegment(E[j].v[C-1],E[j].o[C-1],E[j].i[0],E[j].v[0],i,P,B),B=!1):(I=bez.getNewSegment(E[j].v[C-1],E[j].v[0],E[j].o[C-1],E[j].i[0],(a.s-_)/F,(a.e-_)/F,N[C-1]),this.addSegmentFromArray(I,i,P,B),B=!1,i.c=!1)}else i.c=!1;_+=T.addedLength,P+=1}if(i._length&&(i.setXYAt(i.v[D][0],i.v[D][1],"i",D),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),_>a.e)break;j<R-1&&(i=shapePool.newElement(),B=!0,M.push(i),P=0)}return M};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(s,a){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(s,a.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(s,a){var i=a/100,o=[0,0],E=s._length,j=0;for(j=0;j<E;j+=1)o[0]+=s.v[j][0],o[1]+=s.v[j][1];o[0]/=E,o[1]/=E;var R=shapePool.newElement();R.c=s.c;var C,S,_,T,P,N;for(j=0;j<E;j+=1)C=s.v[j][0]+(o[0]-s.v[j][0])*i,S=s.v[j][1]+(o[1]-s.v[j][1])*i,_=s.o[j][0]+(o[0]-s.o[j][0])*-i,T=s.o[j][1]+(o[1]-s.o[j][1])*-i,P=s.i[j][0]+(o[0]-s.i[j][0])*-i,N=s.i[j][1]+(o[1]-s.i[j][1])*-i,R.setTripleAt(C,S,_,T,P,N,j);return R},PuckerAndBloatModifier.prototype.processShapes=function(s){var a,i,o=this.shapes.length,E,j,R=this.amount.v;if(R!==0){var C,S;for(i=0;i<o;i+=1){if(C=this.shapes[i],S=C.localShapeCollection,!(!C.shape._mdf&&!this._mdf&&!s))for(S.releaseShapes(),C.shape._mdf=!0,a=C.shape.paths.shapes,j=C.shape.paths._length,E=0;E<j;E+=1)S.addShape(this.processPath(a[E],R));C.shape.paths=C.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var s=[0,0];function a(S){var _=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||_,this.a&&S.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&S.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&S.skewFromAxis(-this.sk.v,this.sa.v),this.r?S.rotate(-this.r.v):S.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?S.translate(this.px.v,this.py.v,-this.pz.v):S.translate(this.px.v,this.py.v,0):S.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function i(S){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||S){var _;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var T,P;if(_=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(T=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/_,0),P=this.p.getValueAtTime(this.p.keyframes[0].t/_,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(T=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/_,0),P=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/_,0)):(T=this.p.pv,P=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/_,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){T=[],P=[];var N=this.px,I=this.py;N._caching.lastFrame+N.offsetTime<=N.keyframes[0].t?(T[0]=N.getValueAtTime((N.keyframes[0].t+.01)/_,0),T[1]=I.getValueAtTime((I.keyframes[0].t+.01)/_,0),P[0]=N.getValueAtTime(N.keyframes[0].t/_,0),P[1]=I.getValueAtTime(I.keyframes[0].t/_,0)):N._caching.lastFrame+N.offsetTime>=N.keyframes[N.keyframes.length-1].t?(T[0]=N.getValueAtTime(N.keyframes[N.keyframes.length-1].t/_,0),T[1]=I.getValueAtTime(I.keyframes[I.keyframes.length-1].t/_,0),P[0]=N.getValueAtTime((N.keyframes[N.keyframes.length-1].t-.01)/_,0),P[1]=I.getValueAtTime((I.keyframes[I.keyframes.length-1].t-.01)/_,0)):(T=[N.pv,I.pv],P[0]=N.getValueAtTime((N._caching.lastFrame+N.offsetTime-.01)/_,N.offsetTime),P[1]=I.getValueAtTime((I._caching.lastFrame+I.offsetTime-.01)/_,I.offsetTime))}else P=s,T=P;this.v.rotate(-Math.atan2(T[1]-P[1],T[0]-P[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function o(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function E(){}function j(S){this._addDynamicProperty(S),this.elem.addDynamicProperty(S),this._isDirty=!0}function R(S,_,T){if(this.elem=S,this.frameId=-1,this.propType="transform",this.data=_,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(T||S),_.p&&_.p.s?(this.px=PropertyFactory.getProp(S,_.p.x,0,0,this),this.py=PropertyFactory.getProp(S,_.p.y,0,0,this),_.p.z&&(this.pz=PropertyFactory.getProp(S,_.p.z,0,0,this))):this.p=PropertyFactory.getProp(S,_.p||{k:[0,0,0]},1,0,this),_.rx){if(this.rx=PropertyFactory.getProp(S,_.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(S,_.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(S,_.rz,0,degToRads,this),_.or.k[0].ti){var P,N=_.or.k.length;for(P=0;P<N;P+=1)_.or.k[P].to=null,_.or.k[P].ti=null}this.or=PropertyFactory.getProp(S,_.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(S,_.r||{k:0},0,degToRads,this);_.sk&&(this.sk=PropertyFactory.getProp(S,_.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(S,_.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(S,_.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(S,_.s||{k:[100,100,100]},1,.01,this),_.o?this.o=PropertyFactory.getProp(S,_.o,0,.01,S):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}R.prototype={applyToMatrix:a,getValue:i,precalculateMatrix:o,autoOrient:E},extendPrototype([DynamicPropertyContainer],R),R.prototype.addDynamicProperty=j,R.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function C(S,_,T){return new R(S,_,T)}return{getTransformProperty:C}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(s,a){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(s,a.c,0,null,this),this.o=PropertyFactory.getProp(s,a.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(s,a.tr,this),this.so=PropertyFactory.getProp(s,a.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(s,a.tr.eo,0,.01,this),this.data=a,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(s,a,i,o,E,j){var R=j?-1:1,C=o.s.v[0]+(1-o.s.v[0])*(1-E),S=o.s.v[1]+(1-o.s.v[1])*(1-E);s.translate(o.p.v[0]*R*E,o.p.v[1]*R*E,o.p.v[2]),a.translate(-o.a.v[0],-o.a.v[1],o.a.v[2]),a.rotate(-o.r.v*R*E),a.translate(o.a.v[0],o.a.v[1],o.a.v[2]),i.translate(-o.a.v[0],-o.a.v[1],o.a.v[2]),i.scale(j?1/C:C,j?1/S:S),i.translate(o.a.v[0],o.a.v[1],o.a.v[2])},RepeaterModifier.prototype.init=function(s,a,i,o){for(this.elem=s,this.arr=a,this.pos=i,this.elemsData=o,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(s),this.initModifierProperties(s,a[i]);i>0;)i-=1,this._elements.unshift(a[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(s){var a,i=s.length;for(a=0;a<i;a+=1)s[a]._processed=!1,s[a].ty==="gr"&&this.resetElements(s[a].it)},RepeaterModifier.prototype.cloneElements=function(s){var a=JSON.parse(JSON.stringify(s));return this.resetElements(a),a},RepeaterModifier.prototype.changeGroupRender=function(s,a){var i,o=s.length;for(i=0;i<o;i+=1)s[i]._render=a,s[i].ty==="gr"&&this.changeGroupRender(s[i].it,a)},RepeaterModifier.prototype.processShapes=function(s){var a,i,o,E,j,R=!1;if(this._mdf||s){var C=Math.ceil(this.c.v);if(this._groups.length<C){for(;this._groups.length<C;){var S={it:this.cloneElements(this._elements),ty:"gr"};S.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,S),this._groups.splice(0,0,S),this._currentCopies+=1}this.elem.reloadShapes(),R=!0}j=0;var _;for(o=0;o<=this._groups.length-1;o+=1){if(_=j<C,this._groups[o]._render=_,this.changeGroupRender(this._groups[o].it,_),!_){var T=this.elemsData[o].it,P=T[T.length-1];P.transform.op.v!==0?(P.transform.op._mdf=!0,P.transform.op.v=0):P.transform.op._mdf=!1}j+=1}this._currentCopies=C;var N=this.o.v,I=N%1,M=N>0?Math.floor(N):Math.ceil(N),D=this.pMatrix.props,B=this.rMatrix.props,F=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var O=0;if(N>0){for(;O<M;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),O+=1;I&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,I,!1),O+=I)}else if(N<0){for(;O>M;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),O-=1;I&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-I,!0),O-=I)}o=this.data.m===1?0:this._currentCopies-1,E=this.data.m===1?1:-1,j=this._currentCopies;for(var L,$;j;){if(a=this.elemsData[o].it,i=a[a.length-1].transform.mProps.v.props,$=i.length,a[a.length-1].transform.mProps._mdf=!0,a[a.length-1].transform.op._mdf=!0,a[a.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(o/(this._currentCopies-1)),O!==0){for((o!==0&&E===1||o!==this._currentCopies-1&&E===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(B[0],B[1],B[2],B[3],B[4],B[5],B[6],B[7],B[8],B[9],B[10],B[11],B[12],B[13],B[14],B[15]),this.matrix.transform(F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],F[8],F[9],F[10],F[11],F[12],F[13],F[14],F[15]),this.matrix.transform(D[0],D[1],D[2],D[3],D[4],D[5],D[6],D[7],D[8],D[9],D[10],D[11],D[12],D[13],D[14],D[15]),L=0;L<$;L+=1)i[L]=this.matrix.props[L];this.matrix.reset()}else for(this.matrix.reset(),L=0;L<$;L+=1)i[L]=this.matrix.props[L];O+=1,j-=1,o+=E}}else for(j=this._currentCopies,o=0,E=1;j;)a=this.elemsData[o].it,i=a[a.length-1].transform.mProps.v.props,a[a.length-1].transform.mProps._mdf=!1,a[a.length-1].transform.op._mdf=!1,j-=1,o+=E;return R},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(s,a){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(s,a.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(s,a){var i=shapePool.newElement();i.c=s.c;var o,E=s._length,j,R,C,S,_,T,P=0,N,I,M,D,B,F;for(o=0;o<E;o+=1)j=s.v[o],C=s.o[o],R=s.i[o],j[0]===C[0]&&j[1]===C[1]&&j[0]===R[0]&&j[1]===R[1]?(o===0||o===E-1)&&!s.c?(i.setTripleAt(j[0],j[1],C[0],C[1],R[0],R[1],P),P+=1):(o===0?S=s.v[E-1]:S=s.v[o-1],_=Math.sqrt(Math.pow(j[0]-S[0],2)+Math.pow(j[1]-S[1],2)),T=_?Math.min(_/2,a)/_:0,B=j[0]+(S[0]-j[0])*T,N=B,F=j[1]-(j[1]-S[1])*T,I=F,M=N-(N-j[0])*roundCorner,D=I-(I-j[1])*roundCorner,i.setTripleAt(N,I,M,D,B,F,P),P+=1,o===E-1?S=s.v[0]:S=s.v[o+1],_=Math.sqrt(Math.pow(j[0]-S[0],2)+Math.pow(j[1]-S[1],2)),T=_?Math.min(_/2,a)/_:0,M=j[0]+(S[0]-j[0])*T,N=M,D=j[1]+(S[1]-j[1])*T,I=D,B=N-(N-j[0])*roundCorner,F=I-(I-j[1])*roundCorner,i.setTripleAt(N,I,M,D,B,F,P),P+=1):(i.setTripleAt(s.v[o][0],s.v[o][1],s.o[o][0],s.o[o][1],s.i[o][0],s.i[o][1],P),P+=1);return i},RoundCornersModifier.prototype.processShapes=function(s){var a,i,o=this.shapes.length,E,j,R=this.rd.v;if(R!==0){var C,S;for(i=0;i<o;i+=1){if(C=this.shapes[i],S=C.localShapeCollection,!(!C.shape._mdf&&!this._mdf&&!s))for(S.releaseShapes(),C.shape._mdf=!0,a=C.shape.paths.shapes,j=C.shape.paths._length,E=0;E<j;E+=1)S.addShape(this.processPath(a[E],R));C.shape.paths=C.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(s,a){return Math.abs(s-a)*1e5<=Math.min(Math.abs(s),Math.abs(a))}function floatZero(s){return Math.abs(s)<=1e-5}function lerp(s,a,i){return s*(1-i)+a*i}function lerpPoint(s,a,i){return[lerp(s[0],a[0],i),lerp(s[1],a[1],i)]}function quadRoots(s,a,i){if(s===0)return[];var o=a*a-4*s*i;if(o<0)return[];var E=-a/(2*s);if(o===0)return[E];var j=Math.sqrt(o)/(2*s);return[E-j,E+j]}function polynomialCoefficients(s,a,i,o){return[-s+3*a-3*i+o,3*s-6*a+3*i,-3*s+3*a,s]}function singlePoint(s){return new PolynomialBezier(s,s,s,s,!1)}function PolynomialBezier(s,a,i,o,E){E&&pointEqual(s,a)&&(a=lerpPoint(s,o,1/3)),E&&pointEqual(i,o)&&(i=lerpPoint(s,o,2/3));var j=polynomialCoefficients(s[0],a[0],i[0],o[0]),R=polynomialCoefficients(s[1],a[1],i[1],o[1]);this.a=[j[0],R[0]],this.b=[j[1],R[1]],this.c=[j[2],R[2]],this.d=[j[3],R[3]],this.points=[s,a,i,o]}PolynomialBezier.prototype.point=function(s){return[((this.a[0]*s+this.b[0])*s+this.c[0])*s+this.d[0],((this.a[1]*s+this.b[1])*s+this.c[1])*s+this.d[1]]},PolynomialBezier.prototype.derivative=function(s){return[(3*s*this.a[0]+2*this.b[0])*s+this.c[0],(3*s*this.a[1]+2*this.b[1])*s+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(s){var a=this.derivative(s);return Math.atan2(a[1],a[0])},PolynomialBezier.prototype.normalAngle=function(s){var a=this.derivative(s);return Math.atan2(a[0],a[1])},PolynomialBezier.prototype.inflectionPoints=function(){var s=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(s))return[];var a=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/s,i=a*a-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/s;if(i<0)return[];var o=Math.sqrt(i);return floatZero(o)?o>0&&o<1?[a]:[]:[a-o,a+o].filter(function(E){return E>0&&E<1})},PolynomialBezier.prototype.split=function(s){if(s<=0)return[singlePoint(this.points[0]),this];if(s>=1)return[this,singlePoint(this.points[this.points.length-1])];var a=lerpPoint(this.points[0],this.points[1],s),i=lerpPoint(this.points[1],this.points[2],s),o=lerpPoint(this.points[2],this.points[3],s),E=lerpPoint(a,i,s),j=lerpPoint(i,o,s),R=lerpPoint(E,j,s);return[new PolynomialBezier(this.points[0],a,E,R,!0),new PolynomialBezier(R,j,o,this.points[3],!0)]};function extrema(s,a){var i=s.points[0][a],o=s.points[s.points.length-1][a];if(i>o){var E=o;o=i,i=E}for(var j=quadRoots(3*s.a[a],2*s.b[a],s.c[a]),R=0;R<j.length;R+=1)if(j[R]>0&&j[R]<1){var C=s.point(j[R])[a];C<i?i=C:C>o&&(o=C)}return{min:i,max:o}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var s=this.bounds();return{left:s.x.min,right:s.x.max,top:s.y.min,bottom:s.y.max,width:s.x.max-s.x.min,height:s.y.max-s.y.min,cx:(s.x.max+s.x.min)/2,cy:(s.y.max+s.y.min)/2}};function intersectData(s,a,i){var o=s.boundingBox();return{cx:o.cx,cy:o.cy,width:o.width,height:o.height,bez:s,t:(a+i)/2,t1:a,t2:i}}function splitData(s){var a=s.bez.split(.5);return[intersectData(a[0],s.t1,s.t),intersectData(a[1],s.t,s.t2)]}function boxIntersect(s,a){return Math.abs(s.cx-a.cx)*2<s.width+a.width&&Math.abs(s.cy-a.cy)*2<s.height+a.height}function intersectsImpl(s,a,i,o,E,j){if(boxIntersect(s,a)){if(i>=j||s.width<=o&&s.height<=o&&a.width<=o&&a.height<=o){E.push([s.t,a.t]);return}var R=splitData(s),C=splitData(a);intersectsImpl(R[0],C[0],i+1,o,E,j),intersectsImpl(R[0],C[1],i+1,o,E,j),intersectsImpl(R[1],C[0],i+1,o,E,j),intersectsImpl(R[1],C[1],i+1,o,E,j)}}PolynomialBezier.prototype.intersections=function(s,a,i){a===void 0&&(a=2),i===void 0&&(i=7);var o=[];return intersectsImpl(intersectData(this,0,1),intersectData(s,0,1),0,a,o,i),o},PolynomialBezier.shapeSegment=function(s,a){var i=(a+1)%s.length();return new PolynomialBezier(s.v[a],s.o[a],s.i[i],s.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(s,a){var i=(a+1)%s.length();return new PolynomialBezier(s.v[i],s.i[i],s.o[a],s.v[a],!0)};function crossProduct(s,a){return[s[1]*a[2]-s[2]*a[1],s[2]*a[0]-s[0]*a[2],s[0]*a[1]-s[1]*a[0]]}function lineIntersection(s,a,i,o){var E=[s[0],s[1],1],j=[a[0],a[1],1],R=[i[0],i[1],1],C=[o[0],o[1],1],S=crossProduct(crossProduct(E,j),crossProduct(R,C));return floatZero(S[2])?null:[S[0]/S[2],S[1]/S[2]]}function polarOffset(s,a,i){return[s[0]+Math.cos(a)*i,s[1]-Math.sin(a)*i]}function pointDistance(s,a){return Math.hypot(s[0]-a[0],s[1]-a[1])}function pointEqual(s,a){return floatEqual(s[0],a[0])&&floatEqual(s[1],a[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(s,a){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(s,a.s,0,null,this),this.frequency=PropertyFactory.getProp(s,a.r,0,null,this),this.pointsType=PropertyFactory.getProp(s,a.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(s,a,i,o,E,j,R){var C=i-Math.PI/2,S=i+Math.PI/2,_=a[0]+Math.cos(i)*o*E,T=a[1]-Math.sin(i)*o*E;s.setTripleAt(_,T,_+Math.cos(C)*j,T-Math.sin(C)*j,_+Math.cos(S)*R,T-Math.sin(S)*R,s.length())}function getPerpendicularVector(s,a){var i=[a[0]-s[0],a[1]-s[1]],o=-Math.PI*.5,E=[Math.cos(o)*i[0]-Math.sin(o)*i[1],Math.sin(o)*i[0]+Math.cos(o)*i[1]];return E}function getProjectingAngle(s,a){var i=a===0?s.length()-1:a-1,o=(a+1)%s.length(),E=s.v[i],j=s.v[o],R=getPerpendicularVector(E,j);return Math.atan2(0,1)-Math.atan2(R[1],R[0])}function zigZagCorner(s,a,i,o,E,j,R){var C=getProjectingAngle(a,i),S=a.v[i%a._length],_=a.v[i===0?a._length-1:i-1],T=a.v[(i+1)%a._length],P=j===2?Math.sqrt(Math.pow(S[0]-_[0],2)+Math.pow(S[1]-_[1],2)):0,N=j===2?Math.sqrt(Math.pow(S[0]-T[0],2)+Math.pow(S[1]-T[1],2)):0;setPoint(s,a.v[i%a._length],C,R,o,N/((E+1)*2),P/((E+1)*2))}function zigZagSegment(s,a,i,o,E,j){for(var R=0;R<o;R+=1){var C=(R+1)/(o+1),S=E===2?Math.sqrt(Math.pow(a.points[3][0]-a.points[0][0],2)+Math.pow(a.points[3][1]-a.points[0][1],2)):0,_=a.normalAngle(C),T=a.point(C);setPoint(s,T,_,j,i,S/((o+1)*2),S/((o+1)*2)),j=-j}return j}ZigZagModifier.prototype.processPath=function(s,a,i,o){var E=s._length,j=shapePool.newElement();if(j.c=s.c,s.c||(E-=1),E===0)return j;var R=-1,C=PolynomialBezier.shapeSegment(s,0);zigZagCorner(j,s,0,a,i,o,R);for(var S=0;S<E;S+=1)R=zigZagSegment(j,C,a,i,o,-R),S===E-1&&!s.c?C=null:C=PolynomialBezier.shapeSegment(s,(S+1)%E),zigZagCorner(j,s,S+1,a,i,o,R);return j},ZigZagModifier.prototype.processShapes=function(s){var a,i,o=this.shapes.length,E,j,R=this.amplitude.v,C=Math.max(0,Math.round(this.frequency.v)),S=this.pointsType.v;if(R!==0){var _,T;for(i=0;i<o;i+=1){if(_=this.shapes[i],T=_.localShapeCollection,!(!_.shape._mdf&&!this._mdf&&!s))for(T.releaseShapes(),_.shape._mdf=!0,a=_.shape.paths.shapes,j=_.shape.paths._length,E=0;E<j;E+=1)T.addShape(this.processPath(a[E],R,C,S));_.shape.paths=_.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(s,a,i){var o=Math.atan2(a[0]-s[0],a[1]-s[1]);return[polarOffset(s,o,i),polarOffset(a,o,i)]}function offsetSegment(s,a){var i,o,E,j,R,C,S;S=linearOffset(s.points[0],s.points[1],a),i=S[0],o=S[1],S=linearOffset(s.points[1],s.points[2],a),E=S[0],j=S[1],S=linearOffset(s.points[2],s.points[3],a),R=S[0],C=S[1];var _=lineIntersection(i,o,E,j);_===null&&(_=o);var T=lineIntersection(R,C,E,j);return T===null&&(T=R),new PolynomialBezier(i,_,T,C)}function joinLines(s,a,i,o,E){var j=a.points[3],R=i.points[0];if(o===3||pointEqual(j,R))return j;if(o===2){var C=-a.tangentAngle(1),S=-i.tangentAngle(0)+Math.PI,_=lineIntersection(j,polarOffset(j,C+Math.PI/2,100),R,polarOffset(R,C+Math.PI/2,100)),T=_?pointDistance(_,j):pointDistance(j,R)/2,P=polarOffset(j,C,2*T*roundCorner);return s.setXYAt(P[0],P[1],"o",s.length()-1),P=polarOffset(R,S,2*T*roundCorner),s.setTripleAt(R[0],R[1],R[0],R[1],P[0],P[1],s.length()),R}var N=pointEqual(j,a.points[2])?a.points[0]:a.points[2],I=pointEqual(R,i.points[1])?i.points[3]:i.points[1],M=lineIntersection(N,j,R,I);return M&&pointDistance(M,j)<E?(s.setTripleAt(M[0],M[1],M[0],M[1],M[0],M[1],s.length()),M):j}function getIntersection(s,a){var i=s.intersections(a);return i.length&&floatEqual(i[0][0],1)&&i.shift(),i.length?i[0]:null}function pruneSegmentIntersection(s,a){var i=s.slice(),o=a.slice(),E=getIntersection(s[s.length-1],a[0]);return E&&(i[s.length-1]=s[s.length-1].split(E[0])[0],o[0]=a[0].split(E[1])[1]),s.length>1&&a.length>1&&(E=getIntersection(s[0],a[a.length-1]),E)?[[s[0].split(E[0])[0]],[a[a.length-1].split(E[1])[1]]]:[i,o]}function pruneIntersections(s){for(var a,i=1;i<s.length;i+=1)a=pruneSegmentIntersection(s[i-1],s[i]),s[i-1]=a[0],s[i]=a[1];return s.length>1&&(a=pruneSegmentIntersection(s[s.length-1],s[0]),s[s.length-1]=a[0],s[0]=a[1]),s}function offsetSegmentSplit(s,a){var i=s.inflectionPoints(),o,E,j,R;if(i.length===0)return[offsetSegment(s,a)];if(i.length===1||floatEqual(i[1],1))return j=s.split(i[0]),o=j[0],E=j[1],[offsetSegment(o,a),offsetSegment(E,a)];j=s.split(i[0]),o=j[0];var C=(i[1]-i[0])/(1-i[0]);return j=j[1].split(C),R=j[0],E=j[1],[offsetSegment(o,a),offsetSegment(R,a),offsetSegment(E,a)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(s,a){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(s,a.a,0,null,this),this.miterLimit=PropertyFactory.getProp(s,a.ml,0,null,this),this.lineJoin=a.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(s,a,i,o){var E=shapePool.newElement();E.c=s.c;var j=s.length();s.c||(j-=1);var R,C,S,_=[];for(R=0;R<j;R+=1)S=PolynomialBezier.shapeSegment(s,R),_.push(offsetSegmentSplit(S,a));if(!s.c)for(R=j-1;R>=0;R-=1)S=PolynomialBezier.shapeSegmentInverted(s,R),_.push(offsetSegmentSplit(S,a));_=pruneIntersections(_);var T=null,P=null;for(R=0;R<_.length;R+=1){var N=_[R];for(P&&(T=joinLines(E,P,N[0],i,o)),P=N[N.length-1],C=0;C<N.length;C+=1)S=N[C],T&&pointEqual(S.points[0],T)?E.setXYAt(S.points[1][0],S.points[1][1],"o",E.length()-1):E.setTripleAt(S.points[0][0],S.points[0][1],S.points[1][0],S.points[1][1],S.points[0][0],S.points[0][1],E.length()),E.setTripleAt(S.points[3][0],S.points[3][1],S.points[3][0],S.points[3][1],S.points[2][0],S.points[2][1],E.length()),T=S.points[3]}return _.length&&joinLines(E,P,_[0][0],i,o),E},OffsetPathModifier.prototype.processShapes=function(s){var a,i,o=this.shapes.length,E,j,R=this.amount.v,C=this.miterLimit.v,S=this.lineJoin;if(R!==0){var _,T;for(i=0;i<o;i+=1){if(_=this.shapes[i],T=_.localShapeCollection,!(!_.shape._mdf&&!this._mdf&&!s))for(T.releaseShapes(),_.shape._mdf=!0,a=_.shape.paths.shapes,j=_.shape.paths._length,E=0;E<j;E+=1)T.addShape(this.processPath(a[E],R,S,C));_.shape.paths=_.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(s){for(var a=s.fStyle?s.fStyle.split(" "):[],i="normal",o="normal",E=a.length,j,R=0;R<E;R+=1)switch(j=a[R].toLowerCase(),j){case"italic":o="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200";break}return{style:o,weight:s.fWeight||i}}var FontManager=function(){var s=5e3,a={w:0,size:0,shapes:[],data:{shapes:[]}},i=[];i=i.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var o=127988,E=917631,j=917601,R=917626,C=65039,S=8205,_=127462,T=127487,P=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function N(Y){var ae=Y.split(","),H,W=ae.length,U=[];for(H=0;H<W;H+=1)ae[H]!=="sans-serif"&&ae[H]!=="monospace"&&U.push(ae[H]);return U.join(",")}function I(Y,ae){var H=createTag("span");H.setAttribute("aria-hidden",!0),H.style.fontFamily=ae;var W=createTag("span");W.innerText="giItT1WQy@!-/#",H.style.position="absolute",H.style.left="-10000px",H.style.top="-10000px",H.style.fontSize="300px",H.style.fontVariant="normal",H.style.fontStyle="normal",H.style.fontWeight="normal",H.style.letterSpacing="0",H.appendChild(W),document.body.appendChild(H);var U=W.offsetWidth;return W.style.fontFamily=N(Y)+", "+ae,{node:W,w:U,parent:H}}function M(){var Y,ae=this.fonts.length,H,W,U=ae;for(Y=0;Y<ae;Y+=1)this.fonts[Y].loaded?U-=1:this.fonts[Y].fOrigin==="n"||this.fonts[Y].origin===0?this.fonts[Y].loaded=!0:(H=this.fonts[Y].monoCase.node,W=this.fonts[Y].monoCase.w,H.offsetWidth!==W?(U-=1,this.fonts[Y].loaded=!0):(H=this.fonts[Y].sansCase.node,W=this.fonts[Y].sansCase.w,H.offsetWidth!==W&&(U-=1,this.fonts[Y].loaded=!0)),this.fonts[Y].loaded&&(this.fonts[Y].sansCase.parent.parentNode.removeChild(this.fonts[Y].sansCase.parent),this.fonts[Y].monoCase.parent.parentNode.removeChild(this.fonts[Y].monoCase.parent)));U!==0&&Date.now()-this.initTime<s?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function D(Y,ae){var H=document.body&&ae?"svg":"canvas",W,U=getFontProperties(Y);if(H==="svg"){var ie=createNS("text");ie.style.fontSize="100px",ie.setAttribute("font-family",Y.fFamily),ie.setAttribute("font-style",U.style),ie.setAttribute("font-weight",U.weight),ie.textContent="1",Y.fClass?(ie.style.fontFamily="inherit",ie.setAttribute("class",Y.fClass)):ie.style.fontFamily=Y.fFamily,ae.appendChild(ie),W=ie}else{var me=new OffscreenCanvas(500,500).getContext("2d");me.font=U.style+" "+U.weight+" 100px "+Y.fFamily,W=me}function ee(ye){return H==="svg"?(W.textContent=ye,W.getComputedTextLength()):W.measureText(ye).width}return{measureText:ee}}function B(Y,ae){if(!Y){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=Y.list;return}if(!document.body){this.isLoaded=!0,Y.list.forEach(function(Ze){Ze.helper=D(Ze),Ze.cache={}}),this.fonts=Y.list;return}var H=Y.list,W,U=H.length,ie=U;for(W=0;W<U;W+=1){var me=!0,ee,ye;if(H[W].loaded=!1,H[W].monoCase=I(H[W].fFamily,"monospace"),H[W].sansCase=I(H[W].fFamily,"sans-serif"),!H[W].fPath)H[W].loaded=!0,ie-=1;else if(H[W].fOrigin==="p"||H[W].origin===3){if(ee=document.querySelectorAll('style[f-forigin="p"][f-family="'+H[W].fFamily+'"], style[f-origin="3"][f-family="'+H[W].fFamily+'"]'),ee.length>0&&(me=!1),me){var Ce=createTag("style");Ce.setAttribute("f-forigin",H[W].fOrigin),Ce.setAttribute("f-origin",H[W].origin),Ce.setAttribute("f-family",H[W].fFamily),Ce.type="text/css",Ce.innerText="@font-face {font-family: "+H[W].fFamily+"; font-style: normal; src: url('"+H[W].fPath+"');}",ae.appendChild(Ce)}}else if(H[W].fOrigin==="g"||H[W].origin===1){for(ee=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),ye=0;ye<ee.length;ye+=1)ee[ye].href.indexOf(H[W].fPath)!==-1&&(me=!1);if(me){var Ae=createTag("link");Ae.setAttribute("f-forigin",H[W].fOrigin),Ae.setAttribute("f-origin",H[W].origin),Ae.type="text/css",Ae.rel="stylesheet",Ae.href=H[W].fPath,document.body.appendChild(Ae)}}else if(H[W].fOrigin==="t"||H[W].origin===2){for(ee=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),ye=0;ye<ee.length;ye+=1)H[W].fPath===ee[ye].src&&(me=!1);if(me){var De=createTag("link");De.setAttribute("f-forigin",H[W].fOrigin),De.setAttribute("f-origin",H[W].origin),De.setAttribute("rel","stylesheet"),De.setAttribute("href",H[W].fPath),ae.appendChild(De)}}H[W].helper=D(H[W],ae),H[W].cache={},this.fonts.push(H[W])}ie===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function F(Y){if(Y){this.chars||(this.chars=[]);var ae,H=Y.length,W,U=this.chars.length,ie;for(ae=0;ae<H;ae+=1){for(W=0,ie=!1;W<U;)this.chars[W].style===Y[ae].style&&this.chars[W].fFamily===Y[ae].fFamily&&this.chars[W].ch===Y[ae].ch&&(ie=!0),W+=1;ie||(this.chars.push(Y[ae]),U+=1)}}}function O(Y,ae,H){for(var W=0,U=this.chars.length;W<U;){if(this.chars[W].ch===Y&&this.chars[W].style===ae&&this.chars[W].fFamily===H)return this.chars[W];W+=1}return(typeof Y=="string"&&Y.charCodeAt(0)!==13||!Y)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",Y,ae,H)),a}function L(Y,ae,H){var W=this.getFontByName(ae),U=Y;if(!W.cache[U]){var ie=W.helper;if(Y===" "){var me=ie.measureText("|"+Y+"|"),ee=ie.measureText("||");W.cache[U]=(me-ee)/100}else W.cache[U]=ie.measureText(Y)/100}return W.cache[U]*H}function $(Y){for(var ae=0,H=this.fonts.length;ae<H;){if(this.fonts[ae].fName===Y)return this.fonts[ae];ae+=1}return this.fonts[0]}function V(Y){var ae=0,H=Y.charCodeAt(0);if(H>=55296&&H<=56319){var W=Y.charCodeAt(1);W>=56320&&W<=57343&&(ae=(H-55296)*1024+W-56320+65536)}return ae}function G(Y,ae){var H=Y.toString(16)+ae.toString(16);return P.indexOf(H)!==-1}function K(Y){return Y===S}function J(Y){return Y===C}function ne(Y){var ae=V(Y);return ae>=_&&ae<=T}function le(Y){return ne(Y.substr(0,2))&&ne(Y.substr(2,2))}function ue(Y){return i.indexOf(Y)!==-1}function ce(Y,ae){var H=V(Y.substr(ae,2));if(H!==o)return!1;var W=0;for(ae+=2;W<5;){if(H=V(Y.substr(ae,2)),H<j||H>R)return!1;W+=1,ae+=2}return V(Y.substr(ae,2))===E}function pe(){this.isLoaded=!0}var xe=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};xe.isModifier=G,xe.isZeroWidthJoiner=K,xe.isFlagEmoji=le,xe.isRegionalCode=ne,xe.isCombinedCharacter=ue,xe.isRegionalFlag=ce,xe.isVariationSelector=J,xe.BLACK_FLAG_CODE_POINT=o;var oe={addChars:F,addFonts:B,getCharData:O,getFontByName:$,measureText:L,checkLoadedFonts:M,setIsLoaded:pe};return xe.prototype=oe,xe}();function SlotManager(s){this.animationData=s}SlotManager.prototype.getProp=function(s){return this.animationData.slots&&this.animationData.slots[s.sid]?Object.assign(s,this.animationData.slots[s.sid].p):s};function slotFactory(s){return new SlotManager(s)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(a){this.renderableComponents.indexOf(a)===-1&&this.renderableComponents.push(a)},removeRenderableComponent:function(a){this.renderableComponents.indexOf(a)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(a),1)},prepareRenderableFrame:function(a){this.checkLayerLimits(a)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(a){this.data.ip-this.data.st<=a&&this.data.op-this.data.st>a?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var a,i=this.renderableComponents.length;for(a=0;a<i;a+=1)this.renderableComponents[a].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var s={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(a){return s[a]||""}}();function SliderEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,0,0,i)}function AngleEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,0,0,i)}function ColorEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,1,0,i)}function PointEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,1,0,i)}function LayerIndexEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,0,0,i)}function MaskIndexEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,0,0,i)}function CheckboxEffect(s,a,i){this.p=PropertyFactory.getProp(a,s.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(s,a){var i=s.ef||[];this.effectElements=[];var o,E=i.length,j;for(o=0;o<E;o+=1)j=new GroupEffect(i[o],a),this.effectElements.push(j)}function GroupEffect(s,a){this.init(s,a)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(s,a){this.data=s,this.effectElements=[],this.initDynamicPropertyContainer(a);var i,o=this.data.ef.length,E,j=this.data.ef;for(i=0;i<o;i+=1){switch(E=null,j[i].ty){case 0:E=new SliderEffect(j[i],a,this);break;case 1:E=new AngleEffect(j[i],a,this);break;case 2:E=new ColorEffect(j[i],a,this);break;case 3:E=new PointEffect(j[i],a,this);break;case 4:case 7:E=new CheckboxEffect(j[i],a,this);break;case 10:E=new LayerIndexEffect(j[i],a,this);break;case 11:E=new MaskIndexEffect(j[i],a,this);break;case 5:E=new EffectsManager(j[i],a);break;default:E=new NoValueEffect(j[i]);break}E&&this.effectElements.push(E)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var a=0,i=this.data.masksProperties.length;a<i;){if(this.data.masksProperties[a].mode!=="n"&&this.data.masksProperties[a].cl!==!1)return!0;a+=1}return!1},initExpressions:function(){var a=getExpressionInterfaces();if(a){var i=a("layer"),o=a("effects"),E=a("shape"),j=a("text"),R=a("comp");this.layerInterface=i(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var C=o.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(C),this.data.ty===0||this.data.xt?this.compInterface=R(this):this.data.ty===4?(this.layerInterface.shapeInterface=E(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=j(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var a=getBlendMode(this.data.bm),i=this.baseElement||this.layerElement;i.style["mix-blend-mode"]=a},initBaseData:function(a,i,o){this.globalData=i,this.comp=o,this.data=a,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(a,i){var o,E=this.dynamicProperties.length;for(o=0;o<E;o+=1)(i||this._isParent&&this.dynamicProperties[o].propType==="transform")&&(this.dynamicProperties[o].getValue(),this.dynamicProperties[o]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(a){this.dynamicProperties.indexOf(a)===-1&&this.dynamicProperties.push(a)}};function FootageElement(s,a,i){this.initFrame(),this.initRenderable(),this.assetData=a.getAssetData(s.refId),this.footageData=a.imageLoader.getAsset(this.assetData),this.initBaseData(s,a,i)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var s=getExpressionInterfaces();if(s){var a=s("footage");this.layerInterface=a(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(s,a,i){this.initFrame(),this.initRenderable(),this.assetData=a.getAssetData(s.refId),this.initBaseData(s,a,i),this._isPlaying=!1,this._canPlay=!1;var o=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(o),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=s.tm?PropertyFactory.getProp(this,s.tm,0,a.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,s.au&&s.au.lv?s.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(s){if(this.prepareRenderableFrame(s,!0),this.prepareProperties(s,!0),this.tm._placeholder)this._currentTime=s/this.data.sr;else{var a=this.tm.v;this._currentTime=a}this._volume=this.lv.v[0];var i=this._volume*this._volumeMultiplier;this._previousVolume!==i&&(this._previousVolume=i,this.audio.volume(i))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(s){this.audio.rate(s)},AudioElement.prototype.volume=function(s){this._volumeMultiplier=s,this._previousVolume=s*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(s){var a,i=this.layers.length,o;for(this.completeLayers=!0,a=i-1;a>=0;a-=1)this.elements[a]||(o=this.layers[a],o.ip-o.st<=s-this.layers[a].st&&o.op-o.st>s-this.layers[a].st&&this.buildItem(a)),this.completeLayers=this.elements[a]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(s){switch(s.ty){case 2:return this.createImage(s);case 0:return this.createComp(s);case 1:return this.createSolid(s);case 3:return this.createNull(s);case 4:return this.createShape(s);case 5:return this.createText(s);case 6:return this.createAudio(s);case 13:return this.createCamera(s);case 15:return this.createFootage(s);default:return this.createNull(s)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(s){return new AudioElement(s,this.globalData,this)},BaseRenderer.prototype.createFootage=function(s){return new FootageElement(s,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var s,a=this.layers.length;for(s=0;s<a;s+=1)this.buildItem(s);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(s){this.completeLayers=!1;var a,i=s.length,o,E=this.layers.length;for(a=0;a<i;a+=1)for(o=0;o<E;){if(this.layers[o].id===s[a].id){this.layers[o]=s[a];break}o+=1}},BaseRenderer.prototype.setProjectInterface=function(s){this.globalData.projectInterface=s},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(s,a,i){for(var o=this.elements,E=this.layers,j=0,R=E.length;j<R;)E[j].ind==a&&(!o[j]||o[j]===!0?(this.buildItem(j),this.addPendingElement(s)):(i.push(o[j]),o[j].setAsParent(),E[j].parent!==void 0?this.buildElementParenting(s,E[j].parent,i):s.setHierarchy(i))),j+=1},BaseRenderer.prototype.addPendingElement=function(s){this.pendingElements.push(s)},BaseRenderer.prototype.searchExtraCompositions=function(s){var a,i=s.length;for(a=0;a<i;a+=1)if(s[a].xt){var o=this.createComp(s[a]);o.initExpressions(),this.globalData.projectInterface.registerComposition(o)}},BaseRenderer.prototype.getElementById=function(s){var a,i=this.elements.length;for(a=0;a<i;a+=1)if(this.elements[a].data.ind===s)return this.elements[a];return null},BaseRenderer.prototype.getElementByPath=function(s){var a=s.shift(),i;if(typeof a=="number")i=this.elements[a];else{var o,E=this.elements.length;for(o=0;o<E;o+=1)if(this.elements[o].data.nm===a){i=this.elements[o];break}}return s.length===0?i:i.getElementByPath(s)},BaseRenderer.prototype.setupGlobalData=function(s,a){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(s),this.globalData.fontManager.addChars(s.chars),this.globalData.fontManager.addFonts(s.fonts,a),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=s.fr,this.globalData.nm=s.nm,this.globalData.compSize={w:s.w,h:s.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var a=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:a,localMat:a,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var a,i=this.finalTransform.mat,o=0,E=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;o<E;){if(this.hierarchy[o].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}o+=1}if(this.finalTransform._matMdf)for(a=this.finalTransform.mProp.v.props,i.cloneFromProps(a),o=0;o<E;o+=1)i.multiply(this.hierarchy[o].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var a=0,i=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;a<i;)this.localTransforms[a]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[a]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),a+=1;if(this.finalTransform._localMatMdf){var o=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(o),a=1;a<i;a+=1){var E=this.localTransforms[a].matrix;o.multiply(E)}o.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var j=this.finalTransform.localOpacity;for(a=0;a<i;a+=1)j*=this.localTransforms[a].opacity*.01;this.finalTransform.localOpacity=j}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var a=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(a.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var i=0,o=a.length;for(i=0;i<o;i+=1)this.localTransforms.push(a[i])}}},globalToLocal:function(a){var i=[];i.push(this.finalTransform);for(var o=!0,E=this.comp;o;)E.finalTransform?(E.data.hasMask&&i.splice(0,0,E.finalTransform),E=E.comp):o=!1;var j,R=i.length,C;for(j=0;j<R;j+=1)C=i[j].mat.applyToPointArray(0,0,0),a=[a[0]-C[0],a[1]-C[1],0];return a},mHelper:new Matrix};function MaskElement(s,a,i){this.data=s,this.element=a,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var o=this.globalData.defs,E,j=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(j),this.solidPath="";var R,C=this.masksProperties,S=0,_=[],T,P,N=createElementID(),I,M,D,B,F="clipPath",O="clip-path";for(E=0;E<j;E+=1)if((C[E].mode!=="a"&&C[E].mode!=="n"||C[E].inv||C[E].o.k!==100||C[E].o.x)&&(F="mask",O="mask"),(C[E].mode==="s"||C[E].mode==="i")&&S===0?(I=createNS("rect"),I.setAttribute("fill","#ffffff"),I.setAttribute("width",this.element.comp.data.w||0),I.setAttribute("height",this.element.comp.data.h||0),_.push(I)):I=null,R=createNS("path"),C[E].mode==="n")this.viewData[E]={op:PropertyFactory.getProp(this.element,C[E].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,C[E],3),elem:R,lastPath:""},o.appendChild(R);else{S+=1,R.setAttribute("fill",C[E].mode==="s"?"#000000":"#ffffff"),R.setAttribute("clip-rule","nonzero");var L;if(C[E].x.k!==0?(F="mask",O="mask",B=PropertyFactory.getProp(this.element,C[E].x,0,null,this.element),L=createElementID(),M=createNS("filter"),M.setAttribute("id",L),D=createNS("feMorphology"),D.setAttribute("operator","erode"),D.setAttribute("in","SourceGraphic"),D.setAttribute("radius","0"),M.appendChild(D),o.appendChild(M),R.setAttribute("stroke",C[E].mode==="s"?"#000000":"#ffffff")):(D=null,B=null),this.storedData[E]={elem:R,x:B,expan:D,lastPath:"",lastOperator:"",filterId:L,lastRadius:0},C[E].mode==="i"){P=_.length;var $=createNS("g");for(T=0;T<P;T+=1)$.appendChild(_[T]);var V=createNS("mask");V.setAttribute("mask-type","alpha"),V.setAttribute("id",N+"_"+S),V.appendChild(R),o.appendChild(V),$.setAttribute("mask","url("+getLocationHref()+"#"+N+"_"+S+")"),_.length=0,_.push($)}else _.push(R);C[E].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[E]={elem:R,lastPath:"",op:PropertyFactory.getProp(this.element,C[E].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,C[E],3),invRect:I},this.viewData[E].prop.k||this.drawPath(C[E],this.viewData[E].prop.v,this.viewData[E])}for(this.maskElement=createNS(F),j=_.length,E=0;E<j;E+=1)this.maskElement.appendChild(_[E]);S>0&&(this.maskElement.setAttribute("id",N),this.element.maskedElement.setAttribute(O,"url("+getLocationHref()+"#"+N+")"),o.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(s){return this.viewData[s].prop},MaskElement.prototype.renderFrame=function(s){var a=this.element.finalTransform.mat,i,o=this.masksProperties.length;for(i=0;i<o;i+=1)if((this.viewData[i].prop._mdf||s)&&this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]),(this.viewData[i].op._mdf||s)&&this.viewData[i].elem.setAttribute("fill-opacity",this.viewData[i].op.v),this.masksProperties[i].mode!=="n"&&(this.viewData[i].invRect&&(this.element.finalTransform.mProp._mdf||s)&&this.viewData[i].invRect.setAttribute("transform",a.getInverseMatrix().to2dCSS()),this.storedData[i].x&&(this.storedData[i].x._mdf||s))){var E=this.storedData[i].expan;this.storedData[i].x.v<0?(this.storedData[i].lastOperator!=="erode"&&(this.storedData[i].lastOperator="erode",this.storedData[i].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[i].filterId+")")),E.setAttribute("radius",-this.storedData[i].x.v)):(this.storedData[i].lastOperator!=="dilate"&&(this.storedData[i].lastOperator="dilate",this.storedData[i].elem.setAttribute("filter",null)),this.storedData[i].elem.setAttribute("stroke-width",this.storedData[i].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var s="M0,0 ";return s+=" h"+this.globalData.compSize.w,s+=" v"+this.globalData.compSize.h,s+=" h-"+this.globalData.compSize.w,s+=" v-"+this.globalData.compSize.h+" ",s},MaskElement.prototype.drawPath=function(s,a,i){var o=" M"+a.v[0][0]+","+a.v[0][1],E,j;for(j=a._length,E=1;E<j;E+=1)o+=" C"+a.o[E-1][0]+","+a.o[E-1][1]+" "+a.i[E][0]+","+a.i[E][1]+" "+a.v[E][0]+","+a.v[E][1];if(a.c&&j>1&&(o+=" C"+a.o[E-1][0]+","+a.o[E-1][1]+" "+a.i[0][0]+","+a.i[0][1]+" "+a.v[0][0]+","+a.v[0][1]),i.lastPath!==o){var R="";i.elem&&(a.c&&(R=s.inv?this.solidPath+o:o),i.elem.setAttribute("d",R)),i.lastPath=o}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var s={};s.createFilter=a,s.createAlphaToLuminanceFilter=i;function a(o,E){var j=createNS("filter");return j.setAttribute("id",o),E!==!0&&(j.setAttribute("filterUnits","objectBoundingBox"),j.setAttribute("x","0%"),j.setAttribute("y","0%"),j.setAttribute("width","100%"),j.setAttribute("height","100%")),j}function i(){var o=createNS("feColorMatrix");return o.setAttribute("type","matrix"),o.setAttribute("color-interpolation-filters","sRGB"),o.setAttribute("values","0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1"),o}return s}(),featureSupport=function(){var s={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(s.maskType=!1),/firefox/i.test(navigator.userAgent)&&(s.svgLumaHidden=!1),s}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(s){var a,i="SourceGraphic",o=s.data.ef?s.data.ef.length:0,E=createElementID(),j=filtersFactory.createFilter(E,!0),R=0;this.filters=[];var C;for(a=0;a<o;a+=1){C=null;var S=s.data.ef[a].ty;if(registeredEffects$1[S]){var _=registeredEffects$1[S].effect;C=new _(j,s.effectsManager.effectElements[a],s,idPrefix+R,i),i=idPrefix+R,registeredEffects$1[S].countsAsEffect&&(R+=1)}C&&this.filters.push(C)}R&&(s.globalData.defs.appendChild(j),s.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+E+")")),this.filters.length&&s.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(s){var a,i=this.filters.length;for(a=0;a<i;a+=1)this.filters[a].renderFrame(s)},SVGEffects.prototype.getEffects=function(s){var a,i=this.filters.length,o=[];for(a=0;a<i;a+=1)this.filters[a].type===s&&o.push(this.filters[a]);return o};function registerEffect$1(s,a,i){registeredEffects$1[s]={effect:a,countsAsEffect:i}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var a=null;if(this.data.td){this.matteMasks={};var i=createNS("g");i.setAttribute("id",this.layerId),i.appendChild(this.layerElement),a=i,this.globalData.defs.appendChild(i)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),a=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var o=createNS("clipPath"),E=createNS("path");E.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var j=createElementID();if(o.setAttribute("id",j),o.appendChild(E),this.globalData.defs.appendChild(o),this.checkMasks()){var R=createNS("g");R.setAttribute("clip-path","url("+getLocationHref()+"#"+j+")"),R.appendChild(this.layerElement),this.transformedElement=R,a?a.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+j+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(a){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[a]){var i=this.layerId+"_"+a,o,E,j,R;if(a===1||a===3){var C=createNS("mask");C.setAttribute("id",i),C.setAttribute("mask-type",a===3?"luminance":"alpha"),j=createNS("use"),j.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),C.appendChild(j),this.globalData.defs.appendChild(C),!featureSupport.maskType&&a===1&&(C.setAttribute("mask-type","luminance"),o=createElementID(),E=filtersFactory.createFilter(o),this.globalData.defs.appendChild(E),E.appendChild(filtersFactory.createAlphaToLuminanceFilter()),R=createNS("g"),R.appendChild(j),C.appendChild(R),R.setAttribute("filter","url("+getLocationHref()+"#"+o+")"))}else if(a===2){var S=createNS("mask");S.setAttribute("id",i),S.setAttribute("mask-type","alpha");var _=createNS("g");S.appendChild(_),o=createElementID(),E=filtersFactory.createFilter(o);var T=createNS("feComponentTransfer");T.setAttribute("in","SourceGraphic"),E.appendChild(T);var P=createNS("feFuncA");P.setAttribute("type","table"),P.setAttribute("tableValues","1.0 0.0"),T.appendChild(P),this.globalData.defs.appendChild(E);var N=createNS("rect");N.setAttribute("width",this.comp.data.w),N.setAttribute("height",this.comp.data.h),N.setAttribute("x","0"),N.setAttribute("y","0"),N.setAttribute("fill","#ffffff"),N.setAttribute("opacity","0"),_.setAttribute("filter","url("+getLocationHref()+"#"+o+")"),_.appendChild(N),j=createNS("use"),j.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),_.appendChild(j),featureSupport.maskType||(S.setAttribute("mask-type","luminance"),E.appendChild(filtersFactory.createAlphaToLuminanceFilter()),R=createNS("g"),_.appendChild(N),R.appendChild(this.layerElement),_.appendChild(R)),this.globalData.defs.appendChild(S)}this.matteMasks[a]=i}return this.matteMasks[a]},setMatte:function(a){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+a+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(a){this.hierarchy=a},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var s={initElement:function(i,o,E){this.initFrame(),this.initBaseData(i,o,E),this.initTransform(i,o,E),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var i=this.baseElement||this.layerElement;i.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var i=this.baseElement||this.layerElement;i.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(i){this._mdf=!1,this.prepareRenderableFrame(i),this.prepareProperties(i,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(s)],RenderableDOMElement)})();function IImageElement(s,a,i){this.assetData=a.getAssetData(s.refId),this.assetData&&this.assetData.sid&&(this.assetData=a.slotManager.getProp(this.assetData)),this.initElement(s,a,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var s=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",s),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(s,a){this.elem=s,this.pos=a}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(a){var i,o=this.shapeModifiers.length;for(i=0;i<o;i+=1)this.shapeModifiers[i].addShape(a)},isShapeInAnimatedModifiers:function(a){for(var i=0,o=this.shapeModifiers.length;i<o;)if(this.shapeModifiers[i].isAnimatedWithShape(a))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var a,i=this.shapes.length;for(a=0;a<i;a+=1)this.shapes[a].sh.reset();i=this.shapeModifiers.length;var o;for(a=i-1;a>=0&&(o=this.shapeModifiers[a].processShapes(this._isFirstFrame),!o);a-=1);}},searchProcessedElement:function(a){for(var i=this.processedElements,o=0,E=i.length;o<E;){if(i[o].elem===a)return i[o].pos;o+=1}return 0},addProcessedElement:function(a,i){for(var o=this.processedElements,E=o.length;E;)if(E-=1,o[E].elem===a){o[E].pos=i;return}o.push(new ProcessedElement(a,i))},prepareFrame:function(a){this.prepareRenderableFrame(a),this.prepareProperties(a,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(s,a,i){this.caches=[],this.styles=[],this.transformers=s,this.lStr="",this.sh=i,this.lvl=a,this._isAnimated=!!i.k;for(var o=0,E=s.length;o<E;){if(s[o].mProps.dynamicProperties.length){this._isAnimated=!0;break}o+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(s,a){this.data=s,this.type=s.ty,this.d="",this.lvl=a,this._mdf=!1,this.closed=s.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(s,a,i,o){this.elem=s,this.frameId=-1,this.dataProps=createSizedArray(a.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",a.length?a.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(o);var E,j=a.length||0,R;for(E=0;E<j;E+=1)R=PropertyFactory.getProp(s,a[E].v,0,0,this),this.k=R.k||this.k,this.dataProps[E]={n:a[E].n,p:R};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(s){if(!(this.elem.globalData.frameId===this.frameId&&!s)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||s,this._mdf)){var a=0,i=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),a=0;a<i;a+=1)this.dataProps[a].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[a].p.v:this.dashArray[a]=this.dataProps[a].p.v:this.dashoffset[0]=this.dataProps[a].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(s,a,i){this.initDynamicPropertyContainer(s),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(s,a.o,0,.01,this),this.w=PropertyFactory.getProp(s,a.w,0,null,this),this.d=new DashProperty(s,a.d||{},"svg",this),this.c=PropertyFactory.getProp(s,a.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(s,a,i){this.initDynamicPropertyContainer(s),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(s,a.o,0,.01,this),this.c=PropertyFactory.getProp(s,a.c,1,255,this),this.style=i}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(s,a,i){this.initDynamicPropertyContainer(s),this.getValue=this.iterateDynamicProperties,this.style=i}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(s,a,i){this.data=a,this.c=createTypedArray("uint8c",a.p*4);var o=a.k.k[0].s?a.k.k[0].s.length-a.p*4:a.k.k.length-a.p*4;this.o=createTypedArray("float32",o),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=o,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(s,a.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(s,a){for(var i=0,o=this.o.length/2,E;i<o;){if(E=Math.abs(s[i*4]-s[a*4+i*2]),E>.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var s=0,a=this.data.k.k.length;s<a;){if(!this.comparePoints(this.data.k.k[s].s,this.data.p))return!1;s+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(s){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||s){var a,i=this.data.p*4,o,E;for(a=0;a<i;a+=1)o=a%4===0?100:255,E=Math.round(this.prop.v[a]*o),this.c[a]!==E&&(this.c[a]=E,this._cmdf=!s);if(this.o.length)for(i=this.prop.v.length,a=this.data.p*4;a<i;a+=1)o=a%2===0?100:1,E=a%2===0?Math.round(this.prop.v[a]*100):this.prop.v[a],this.o[a-this.data.p*4]!==E&&(this.o[a-this.data.p*4]=E,this._omdf=!s);this._mdf=!s}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(s,a,i){this.initDynamicPropertyContainer(s),this.getValue=this.iterateDynamicProperties,this.initGradientData(s,a,i)}SVGGradientFillStyleData.prototype.initGradientData=function(s,a,i){this.o=PropertyFactory.getProp(s,a.o,0,.01,this),this.s=PropertyFactory.getProp(s,a.s,1,null,this),this.e=PropertyFactory.getProp(s,a.e,1,null,this),this.h=PropertyFactory.getProp(s,a.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(s,a.a||{k:0},0,degToRads,this),this.g=new GradientProperty(s,a.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,a),this.setGradientOpacity(a,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(s,a){var i=createElementID(),o=createNS(a.t===1?"linearGradient":"radialGradient");o.setAttribute("id",i),o.setAttribute("spreadMethod","pad"),o.setAttribute("gradientUnits","userSpaceOnUse");var E=[],j,R,C;for(C=a.g.p*4,R=0;R<C;R+=4)j=createNS("stop"),o.appendChild(j),E.push(j);s.setAttribute(a.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+i+")"),this.gf=o,this.cst=E},SVGGradientFillStyleData.prototype.setGradientOpacity=function(s,a){if(this.g._hasOpacity&&!this.g._collapsable){var i,o,E,j=createNS("mask"),R=createNS("path");j.appendChild(R);var C=createElementID(),S=createElementID();j.setAttribute("id",S);var _=createNS(s.t===1?"linearGradient":"radialGradient");_.setAttribute("id",C),_.setAttribute("spreadMethod","pad"),_.setAttribute("gradientUnits","userSpaceOnUse"),E=s.g.k.k[0].s?s.g.k.k[0].s.length:s.g.k.k.length;var T=this.stops;for(o=s.g.p*4;o<E;o+=2)i=createNS("stop"),i.setAttribute("stop-color","rgb(255,255,255)"),_.appendChild(i),T.push(i);R.setAttribute(s.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+C+")"),s.ty==="gs"&&(R.setAttribute("stroke-linecap",lineCapEnum[s.lc||2]),R.setAttribute("stroke-linejoin",lineJoinEnum[s.lj||2]),s.lj===1&&R.setAttribute("stroke-miterlimit",s.ml)),this.of=_,this.ms=j,this.ost=T,this.maskId=S,a.msElem=R}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(s,a,i){this.initDynamicPropertyContainer(s),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(s,a.w,0,null,this),this.d=new DashProperty(s,a.d||{},"svg",this),this.initGradientData(s,a,i),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(s,a,i){this.transform={mProps:s,op:a,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(a,i,o,E){if(i===0)return"";var j=a.o,R=a.i,C=a.v,S,_=" M"+E.applyToPointStringified(C[0][0],C[0][1]);for(S=1;S<i;S+=1)_+=" C"+E.applyToPointStringified(j[S-1][0],j[S-1][1])+" "+E.applyToPointStringified(R[S][0],R[S][1])+" "+E.applyToPointStringified(C[S][0],C[S][1]);return o&&i&&(_+=" C"+E.applyToPointStringified(j[S-1][0],j[S-1][1])+" "+E.applyToPointStringified(R[0][0],R[0][1])+" "+E.applyToPointStringified(C[0][0],C[0][1]),_+="z"),_},SVGElementsRenderer=function(){var s=new Matrix,a=new Matrix,i={createRenderFunction:o};function o(P){switch(P.ty){case"fl":return C;case"gf":return _;case"gs":return S;case"st":return T;case"sh":case"el":case"rc":case"sr":return R;case"tr":return E;case"no":return j;default:return null}}function E(P,N,I){(I||N.transform.op._mdf)&&N.transform.container.setAttribute("opacity",N.transform.op.v),(I||N.transform.mProps._mdf)&&N.transform.container.setAttribute("transform",N.transform.mProps.v.to2dCSS())}function j(){}function R(P,N,I){var M,D,B,F,O,L,$=N.styles.length,V=N.lvl,G,K,J,ne;for(L=0;L<$;L+=1){if(F=N.sh._mdf||I,N.styles[L].lvl<V){for(K=a.reset(),J=V-N.styles[L].lvl,ne=N.transformers.length-1;!F&&J>0;)F=N.transformers[ne].mProps._mdf||F,J-=1,ne-=1;if(F)for(J=V-N.styles[L].lvl,ne=N.transformers.length-1;J>0;)K.multiply(N.transformers[ne].mProps.v),J-=1,ne-=1}else K=s;if(G=N.sh.paths,D=G._length,F){for(B="",M=0;M<D;M+=1)O=G.shapes[M],O&&O._length&&(B+=buildShapeString(O,O._length,O.c,K));N.caches[L]=B}else B=N.caches[L];N.styles[L].d+=P.hd===!0?"":B,N.styles[L]._mdf=F||N.styles[L]._mdf}}function C(P,N,I){var M=N.style;(N.c._mdf||I)&&M.pElem.setAttribute("fill","rgb("+bmFloor(N.c.v[0])+","+bmFloor(N.c.v[1])+","+bmFloor(N.c.v[2])+")"),(N.o._mdf||I)&&M.pElem.setAttribute("fill-opacity",N.o.v)}function S(P,N,I){_(P,N,I),T(P,N,I)}function _(P,N,I){var M=N.gf,D=N.g._hasOpacity,B=N.s.v,F=N.e.v;if(N.o._mdf||I){var O=P.ty==="gf"?"fill-opacity":"stroke-opacity";N.style.pElem.setAttribute(O,N.o.v)}if(N.s._mdf||I){var L=P.t===1?"x1":"cx",$=L==="x1"?"y1":"cy";M.setAttribute(L,B[0]),M.setAttribute($,B[1]),D&&!N.g._collapsable&&(N.of.setAttribute(L,B[0]),N.of.setAttribute($,B[1]))}var V,G,K,J;if(N.g._cmdf||I){V=N.cst;var ne=N.g.c;for(K=V.length,G=0;G<K;G+=1)J=V[G],J.setAttribute("offset",ne[G*4]+"%"),J.setAttribute("stop-color","rgb("+ne[G*4+1]+","+ne[G*4+2]+","+ne[G*4+3]+")")}if(D&&(N.g._omdf||I)){var le=N.g.o;for(N.g._collapsable?V=N.cst:V=N.ost,K=V.length,G=0;G<K;G+=1)J=V[G],N.g._collapsable||J.setAttribute("offset",le[G*2]+"%"),J.setAttribute("stop-opacity",le[G*2+1])}if(P.t===1)(N.e._mdf||I)&&(M.setAttribute("x2",F[0]),M.setAttribute("y2",F[1]),D&&!N.g._collapsable&&(N.of.setAttribute("x2",F[0]),N.of.setAttribute("y2",F[1])));else{var ue;if((N.s._mdf||N.e._mdf||I)&&(ue=Math.sqrt(Math.pow(B[0]-F[0],2)+Math.pow(B[1]-F[1],2)),M.setAttribute("r",ue),D&&!N.g._collapsable&&N.of.setAttribute("r",ue)),N.e._mdf||N.h._mdf||N.a._mdf||I){ue||(ue=Math.sqrt(Math.pow(B[0]-F[0],2)+Math.pow(B[1]-F[1],2)));var ce=Math.atan2(F[1]-B[1],F[0]-B[0]),pe=N.h.v;pe>=1?pe=.99:pe<=-1&&(pe=-.99);var xe=ue*pe,oe=Math.cos(ce+N.a.v)*xe+B[0],Y=Math.sin(ce+N.a.v)*xe+B[1];M.setAttribute("fx",oe),M.setAttribute("fy",Y),D&&!N.g._collapsable&&(N.of.setAttribute("fx",oe),N.of.setAttribute("fy",Y))}}}function T(P,N,I){var M=N.style,D=N.d;D&&(D._mdf||I)&&D.dashStr&&(M.pElem.setAttribute("stroke-dasharray",D.dashStr),M.pElem.setAttribute("stroke-dashoffset",D.dashoffset[0])),N.c&&(N.c._mdf||I)&&M.pElem.setAttribute("stroke","rgb("+bmFloor(N.c.v[0])+","+bmFloor(N.c.v[1])+","+bmFloor(N.c.v[2])+")"),(N.o._mdf||I)&&M.pElem.setAttribute("stroke-opacity",N.o.v),(N.w._mdf||I)&&(M.pElem.setAttribute("stroke-width",N.w.v),M.msElem&&M.msElem.setAttribute("stroke-width",N.w.v))}return i}();function SVGShapeElement(s,a,i){this.shapes=[],this.shapesData=s.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(s,a,i),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var s,a=this.shapes.length,i,o,E=this.stylesList.length,j,R=[],C=!1;for(o=0;o<E;o+=1){for(j=this.stylesList[o],C=!1,R.length=0,s=0;s<a;s+=1)i=this.shapes[s],i.styles.indexOf(j)!==-1&&(R.push(i),C=i._isAnimated||C);R.length>1&&C&&this.setShapesAsAnimated(R)}},SVGShapeElement.prototype.setShapesAsAnimated=function(s){var a,i=s.length;for(a=0;a<i;a+=1)s[a].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(s,a){var i,o=new SVGStyleData(s,a),E=o.pElem;if(s.ty==="st")i=new SVGStrokeStyleData(this,s,o);else if(s.ty==="fl")i=new SVGFillStyleData(this,s,o);else if(s.ty==="gf"||s.ty==="gs"){var j=s.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;i=new j(this,s,o),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),E.setAttribute("mask","url("+getLocationHref()+"#"+i.maskId+")"))}else s.ty==="no"&&(i=new SVGNoStyleData(this,s,o));return(s.ty==="st"||s.ty==="gs")&&(E.setAttribute("stroke-linecap",lineCapEnum[s.lc||2]),E.setAttribute("stroke-linejoin",lineJoinEnum[s.lj||2]),E.setAttribute("fill-opacity","0"),s.lj===1&&E.setAttribute("stroke-miterlimit",s.ml)),s.r===2&&E.setAttribute("fill-rule","evenodd"),s.ln&&E.setAttribute("id",s.ln),s.cl&&E.setAttribute("class",s.cl),s.bm&&(E.style["mix-blend-mode"]=getBlendMode(s.bm)),this.stylesList.push(o),this.addToAnimatedContents(s,i),i},SVGShapeElement.prototype.createGroupElement=function(s){var a=new ShapeGroupData;return s.ln&&a.gr.setAttribute("id",s.ln),s.cl&&a.gr.setAttribute("class",s.cl),s.bm&&(a.gr.style["mix-blend-mode"]=getBlendMode(s.bm)),a},SVGShapeElement.prototype.createTransformElement=function(s,a){var i=TransformPropertyFactory.getTransformProperty(this,s,this),o=new SVGTransformData(i,i.o,a);return this.addToAnimatedContents(s,o),o},SVGShapeElement.prototype.createShapeElement=function(s,a,i){var o=4;s.ty==="rc"?o=5:s.ty==="el"?o=6:s.ty==="sr"&&(o=7);var E=ShapePropertyFactory.getShapeProp(this,s,o,this),j=new SVGShapeData(a,i,E);return this.shapes.push(j),this.addShapeToModifiers(j),this.addToAnimatedContents(s,j),j},SVGShapeElement.prototype.addToAnimatedContents=function(s,a){for(var i=0,o=this.animatedContents.length;i<o;){if(this.animatedContents[i].element===a)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(s),element:a,data:s})},SVGShapeElement.prototype.setElementStyles=function(s){var a=s.styles,i,o=this.stylesList.length;for(i=0;i<o;i+=1)this.stylesList[i].closed||a.push(this.stylesList[i])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var s,a=this.itemsData.length;for(s=0;s<a;s+=1)this.prevViewData[s]=this.itemsData[s];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),a=this.dynamicProperties.length,s=0;s<a;s+=1)this.dynamicProperties[s].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(s,a,i,o,E,j,R){var C=[].concat(j),S,_=s.length-1,T,P,N=[],I=[],M,D,B;for(S=_;S>=0;S-=1){if(B=this.searchProcessedElement(s[S]),B?a[S]=i[B-1]:s[S]._render=R,s[S].ty==="fl"||s[S].ty==="st"||s[S].ty==="gf"||s[S].ty==="gs"||s[S].ty==="no")B?a[S].style.closed=!1:a[S]=this.createStyleElement(s[S],E),s[S]._render&&a[S].style.pElem.parentNode!==o&&o.appendChild(a[S].style.pElem),N.push(a[S].style);else if(s[S].ty==="gr"){if(!B)a[S]=this.createGroupElement(s[S]);else for(P=a[S].it.length,T=0;T<P;T+=1)a[S].prevViewData[T]=a[S].it[T];this.searchShapes(s[S].it,a[S].it,a[S].prevViewData,a[S].gr,E+1,C,R),s[S]._render&&a[S].gr.parentNode!==o&&o.appendChild(a[S].gr)}else s[S].ty==="tr"?(B||(a[S]=this.createTransformElement(s[S],o)),M=a[S].transform,C.push(M)):s[S].ty==="sh"||s[S].ty==="rc"||s[S].ty==="el"||s[S].ty==="sr"?(B||(a[S]=this.createShapeElement(s[S],C,E)),this.setElementStyles(a[S])):s[S].ty==="tm"||s[S].ty==="rd"||s[S].ty==="ms"||s[S].ty==="pb"||s[S].ty==="zz"||s[S].ty==="op"?(B?(D=a[S],D.closed=!1):(D=ShapeModifiers.getModifier(s[S].ty),D.init(this,s[S]),a[S]=D,this.shapeModifiers.push(D)),I.push(D)):s[S].ty==="rp"&&(B?(D=a[S],D.closed=!0):(D=ShapeModifiers.getModifier(s[S].ty),a[S]=D,D.init(this,s,S,a),this.shapeModifiers.push(D),R=!1),I.push(D));this.addProcessedElement(s[S],S+1)}for(_=N.length,S=0;S<_;S+=1)N[S].closed=!0;for(_=I.length,S=0;S<_;S+=1)I[S].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var s,a=this.stylesList.length;for(s=0;s<a;s+=1)this.stylesList[s].reset();for(this.renderShape(),s=0;s<a;s+=1)(this.stylesList[s]._mdf||this._isFirstFrame)&&(this.stylesList[s].msElem&&(this.stylesList[s].msElem.setAttribute("d",this.stylesList[s].d),this.stylesList[s].d="M0 0"+this.stylesList[s].d),this.stylesList[s].pElem.setAttribute("d",this.stylesList[s].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var s,a=this.animatedContents.length,i;for(s=0;s<a;s+=1)i=this.animatedContents[s],(this._isFirstFrame||i.element._isAnimated)&&i.data!==!0&&i.fn(i.data,i.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(s,a,i,o,E,j){this.o=s,this.sw=a,this.sc=i,this.fc=o,this.m=E,this.p=j,this._mdf={o:!0,sw:!!a,sc:!!i,fc:!!o,m:!0,p:!0}}LetterProps.prototype.update=function(s,a,i,o,E,j){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var R=!1;return this.o!==s&&(this.o=s,this._mdf.o=!0,R=!0),this.sw!==a&&(this.sw=a,this._mdf.sw=!0,R=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,R=!0),this.fc!==o&&(this.fc=o,this._mdf.fc=!0,R=!0),this.m!==E&&(this.m=E,this._mdf.m=!0,R=!0),j.length&&(this.p[0]!==j[0]||this.p[1]!==j[1]||this.p[4]!==j[4]||this.p[5]!==j[5]||this.p[12]!==j[12]||this.p[13]!==j[13])&&(this.p=j,this._mdf.p=!0,R=!0),R};function TextProperty(s,a){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,a.d&&a.d.sid&&(a.d=s.globalData.slotManager.getProp(a.d)),this.data=a,this.elem=s,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(s,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(s[i]=a[i]);return s},TextProperty.prototype.setCurrentData=function(s){s.__complete||this.completeTextData(s),this.currentData=s,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(s){this.effectsSequence.push(s),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(s){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!s)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var a=this.currentData,i=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var o,E=this.effectsSequence.length,j=s||this.data.d.k[this.keysIndex].s;for(o=0;o<E;o+=1)i!==this.keysIndex?j=this.effectsSequence[o](j,j.t):j=this.effectsSequence[o](this.currentData,j.t);a!==j&&this.setCurrentData(j),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var s=this.data.d.k,a=this.elem.comp.renderedFrame,i=0,o=s.length;i<=o-1&&!(i===o-1||s[i+1].t>a);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(s){for(var a=[],i=0,o=s.length,E,j,R=!1,C=!1,S="";i<o;)R=C,C=!1,E=s.charCodeAt(i),S=s.charAt(i),FontManager.isCombinedCharacter(E)?R=!0:E>=55296&&E<=56319?FontManager.isRegionalFlag(s,i)?S=s.substr(i,14):(j=s.charCodeAt(i+1),j>=56320&&j<=57343&&(FontManager.isModifier(E,j)?(S=s.substr(i,2),R=!0):FontManager.isFlagEmoji(s.substr(i,4))?S=s.substr(i,4):S=s.substr(i,2))):E>56319?(j=s.charCodeAt(i+1),FontManager.isVariationSelector(E)&&(R=!0)):FontManager.isZeroWidthJoiner(E)&&(R=!0,C=!0),R?(a[a.length-1]+=S,R=!1):a.push(S),i+=S.length;return a},TextProperty.prototype.completeTextData=function(s){s.__complete=!0;var a=this.elem.globalData.fontManager,i=this.data,o=[],E,j,R,C=0,S,_=i.m.g,T=0,P=0,N=0,I=[],M=0,D=0,B,F,O=a.getFontByName(s.f),L,$=0,V=getFontProperties(O);s.fWeight=V.weight,s.fStyle=V.style,s.finalSize=s.s,s.finalText=this.buildFinalText(s.t),j=s.finalText.length,s.finalLineHeight=s.lh;var G=s.tr/1e3*s.finalSize,K;if(s.sz)for(var J=!0,ne=s.sz[0],le=s.sz[1],ue,ce;J;){ce=this.buildFinalText(s.t),ue=0,M=0,j=ce.length,G=s.tr/1e3*s.finalSize;var pe=-1;for(E=0;E<j;E+=1)K=ce[E].charCodeAt(0),R=!1,ce[E]===" "?pe=E:(K===13||K===3)&&(M=0,R=!0,ue+=s.finalLineHeight||s.finalSize*1.2),a.chars?(L=a.getCharData(ce[E],O.fStyle,O.fFamily),$=R?0:L.w*s.finalSize/100):$=a.measureText(ce[E],s.f,s.finalSize),M+$>ne&&ce[E]!==" "?(pe===-1?j+=1:E=pe,ue+=s.finalLineHeight||s.finalSize*1.2,ce.splice(E,pe===E?1:0,"\r"),pe=-1,M=0):(M+=$,M+=G);ue+=O.ascent*s.finalSize/100,this.canResize&&s.finalSize>this.minimumFontSize&&le<ue?(s.finalSize-=1,s.finalLineHeight=s.finalSize*s.lh/s.s):(s.finalText=ce,j=s.finalText.length,J=!1)}M=-G,$=0;var xe=0,oe;for(E=0;E<j;E+=1)if(R=!1,oe=s.finalText[E],K=oe.charCodeAt(0),K===13||K===3?(xe=0,I.push(M),D=M>D?M:D,M=-2*G,S="",R=!0,N+=1):S=oe,a.chars?(L=a.getCharData(oe,O.fStyle,a.getFontByName(s.f).fFamily),$=R?0:L.w*s.finalSize/100):$=a.measureText(S,s.f,s.finalSize),oe===" "?xe+=$+G:(M+=$+G+xe,xe=0),o.push({l:$,an:$,add:T,n:R,anIndexes:[],val:S,line:N,animatorJustifyOffset:0}),_==2){if(T+=$,S===""||S===" "||E===j-1){for((S===""||S===" ")&&(T-=$);P<=E;)o[P].an=T,o[P].ind=C,o[P].extra=$,P+=1;C+=1,T=0}}else if(_==3){if(T+=$,S===""||E===j-1){for(S===""&&(T-=$);P<=E;)o[P].an=T,o[P].ind=C,o[P].extra=$,P+=1;T=0,C+=1}}else o[C].ind=C,o[C].extra=0,C+=1;if(s.l=o,D=M>D?M:D,I.push(M),s.sz)s.boxWidth=s.sz[0],s.justifyOffset=0;else switch(s.boxWidth=D,s.j){case 1:s.justifyOffset=-s.boxWidth;break;case 2:s.justifyOffset=-s.boxWidth/2;break;default:s.justifyOffset=0}s.lineWidths=I;var Y=i.a,ae,H;F=Y.length;var W,U,ie=[];for(B=0;B<F;B+=1){for(ae=Y[B],ae.a.sc&&(s.strokeColorAnim=!0),ae.a.sw&&(s.strokeWidthAnim=!0),(ae.a.fc||ae.a.fh||ae.a.fs||ae.a.fb)&&(s.fillColorAnim=!0),U=0,W=ae.s.b,E=0;E<j;E+=1)H=o[E],H.anIndexes[B]=U,(W==1&&H.val!==""||W==2&&H.val!==""&&H.val!==" "||W==3&&(H.n||H.val==" "||E==j-1)||W==4&&(H.n||E==j-1))&&(ae.s.rn===1&&ie.push(U),U+=1);i.a[B].s.totalChars=U;var me=-1,ee;if(ae.s.rn===1)for(E=0;E<j;E+=1)H=o[E],me!=H.anIndexes[B]&&(me=H.anIndexes[B],ee=ie.splice(Math.floor(Math.random()*ie.length),1)[0]),H.anIndexes[B]=ee}s.yOffset=s.finalLineHeight||s.finalSize*1.2,s.ls=s.ls||0,s.ascent=O.ascent*s.finalSize/100},TextProperty.prototype.updateDocumentData=function(s,a){a=a===void 0?this.keysIndex:a;var i=this.copyData({},this.data.d.k[a].s);i=this.copyData(i,s),this.data.d.k[a].s=i,this.recalculate(a),this.setCurrentData(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(s){var a=this.data.d.k[s].s;a.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(a)},TextProperty.prototype.canResizeFont=function(s){this.canResize=s,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(s){this.minimumFontSize=Math.floor(s)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var s=Math.max,a=Math.min,i=Math.floor;function o(j,R){this._currentTextLength=-1,this.k=!1,this.data=R,this.elem=j,this.comp=j.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(j),this.s=PropertyFactory.getProp(j,R.s||{k:0},0,0,this),"e"in R?this.e=PropertyFactory.getProp(j,R.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(j,R.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(j,R.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(j,R.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(j,R.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(j,R.a,0,.01,this),this.dynamicProperties.length||this.getValue()}o.prototype={getMult:function(R){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var C=0,S=0,_=1,T=1;this.ne.v>0?C=this.ne.v/100:S=-this.ne.v/100,this.xe.v>0?_=1-this.xe.v/100:T=1+this.xe.v/100;var P=BezierFactory.getBezierEasing(C,S,_,T).get,N=0,I=this.finalS,M=this.finalE,D=this.data.sh;if(D===2)M===I?N=R>=M?1:0:N=s(0,a(.5/(M-I)+(R-I)/(M-I),1)),N=P(N);else if(D===3)M===I?N=R>=M?0:1:N=1-s(0,a(.5/(M-I)+(R-I)/(M-I),1)),N=P(N);else if(D===4)M===I?N=0:(N=s(0,a(.5/(M-I)+(R-I)/(M-I),1)),N<.5?N*=2:N=1-2*(N-.5)),N=P(N);else if(D===5){if(M===I)N=0;else{var B=M-I;R=a(s(0,R+.5-I),M-I);var F=-B/2+R,O=B/2;N=Math.sqrt(1-F*F/(O*O))}N=P(N)}else D===6?(M===I?N=0:(R=a(s(0,R+.5-I),M-I),N=(1+Math.cos(Math.PI+Math.PI*2*R/(M-I)))/2),N=P(N)):(R>=i(I)&&(R-I<0?N=s(0,a(a(M,1)-(I-R),1)):N=s(0,a(M-R,1))),N=P(N));if(this.sm.v!==100){var L=this.sm.v*.01;L===0&&(L=1e-8);var $=.5-L*.5;N<$?N=0:(N=(N-$)/L,N>1&&(N=1))}return N*this.a.v},getValue:function(R){this.iterateDynamicProperties(),this._mdf=R||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,R&&this.data.r===2&&(this.e.v=this._currentTextLength);var C=this.data.r===2?1:100/this.data.totalChars,S=this.o.v/C,_=this.s.v/C+S,T=this.e.v/C+S;if(_>T){var P=_;_=T,T=P}this.finalS=_,this.finalE=T}},extendPrototype([DynamicPropertyContainer],o);function E(j,R,C){return new o(j,R)}return{getTextSelectorProp:E}}();function TextAnimatorDataProperty(s,a,i){var o={propType:!1},E=PropertyFactory.getProp,j=a.a;this.a={r:j.r?E(s,j.r,0,degToRads,i):o,rx:j.rx?E(s,j.rx,0,degToRads,i):o,ry:j.ry?E(s,j.ry,0,degToRads,i):o,sk:j.sk?E(s,j.sk,0,degToRads,i):o,sa:j.sa?E(s,j.sa,0,degToRads,i):o,s:j.s?E(s,j.s,1,.01,i):o,a:j.a?E(s,j.a,1,0,i):o,o:j.o?E(s,j.o,0,.01,i):o,p:j.p?E(s,j.p,1,0,i):o,sw:j.sw?E(s,j.sw,0,0,i):o,sc:j.sc?E(s,j.sc,1,0,i):o,fc:j.fc?E(s,j.fc,1,0,i):o,fh:j.fh?E(s,j.fh,0,0,i):o,fs:j.fs?E(s,j.fs,0,.01,i):o,fb:j.fb?E(s,j.fb,0,.01,i):o,t:j.t?E(s,j.t,0,0,i):o},this.s=TextSelectorProp.getTextSelectorProp(s,a.s,i),this.s.t=a.s.t}function TextAnimatorProperty(s,a,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=s,this._renderType=a,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}TextAnimatorProperty.prototype.searchProperties=function(){var s,a=this._textData.a.length,i,o=PropertyFactory.getProp;for(s=0;s<a;s+=1)i=this._textData.a[s],this._animatorsData[s]=new TextAnimatorDataProperty(this._elem,i,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:o(this._elem,this._textData.p.a,0,0,this),f:o(this._elem,this._textData.p.f,0,0,this),l:o(this._elem,this._textData.p.l,0,0,this),r:o(this._elem,this._textData.p.r,0,0,this),p:o(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=o(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(s,a){if(this.lettersChangedFlag=a,!(!this._mdf&&!this._isFirstFrame&&!a&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var i=this._moreOptions.alignment.v,o=this._animatorsData,E=this._textData,j=this.mHelper,R=this._renderType,C=this.renderedLetters.length,S,_,T,P,N=s.l,I,M,D,B,F,O,L,$,V,G,K,J,ne,le,ue;if(this._hasMaskedPath){if(ue=this._pathData.m,!this._pathData.n||this._pathData._mdf){var ce=ue.v;this._pathData.r.v&&(ce=ce.reverse()),I={tLength:0,segments:[]},P=ce._length-1;var pe;for(J=0,T=0;T<P;T+=1)pe=bez.buildBezierData(ce.v[T],ce.v[T+1],[ce.o[T][0]-ce.v[T][0],ce.o[T][1]-ce.v[T][1]],[ce.i[T+1][0]-ce.v[T+1][0],ce.i[T+1][1]-ce.v[T+1][1]]),I.tLength+=pe.segmentLength,I.segments.push(pe),J+=pe.segmentLength;T=P,ue.v.c&&(pe=bez.buildBezierData(ce.v[T],ce.v[0],[ce.o[T][0]-ce.v[T][0],ce.o[T][1]-ce.v[T][1]],[ce.i[0][0]-ce.v[0][0],ce.i[0][1]-ce.v[0][1]]),I.tLength+=pe.segmentLength,I.segments.push(pe),J+=pe.segmentLength),this._pathData.pi=I}if(I=this._pathData.pi,M=this._pathData.f.v,L=0,O=1,B=0,F=!0,G=I.segments,M<0&&ue.v.c)for(I.tLength<Math.abs(M)&&(M=-Math.abs(M)%I.tLength),L=G.length-1,V=G[L].points,O=V.length-1;M<0;)M+=V[O].partialLength,O-=1,O<0&&(L-=1,V=G[L].points,O=V.length-1);V=G[L].points,$=V[O-1],D=V[O],K=D.partialLength}P=N.length,S=0,_=0;var xe=s.finalSize*1.2*.714,oe=!0,Y,ae,H,W,U;W=o.length;var ie,me=-1,ee,ye,Ce,Ae=M,De=L,Ze=O,Ue=-1,Se,ze,Me,Te,be,Oe,Ge,We,$e="",qe=this.defaultPropsArray,Qe;if(s.j===2||s.j===1){var Je=0,st=0,rt=s.j===2?-.5:-1,Ke=0,Re=!0;for(T=0;T<P;T+=1)if(N[T].n){for(Je&&(Je+=st);Ke<T;)N[Ke].animatorJustifyOffset=Je,Ke+=1;Je=0,Re=!0}else{for(H=0;H<W;H+=1)Y=o[H].a,Y.t.propType&&(Re&&s.j===2&&(st+=Y.t.v*rt),ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),ie.length?Je+=Y.t.v*ie[0]*rt:Je+=Y.t.v*ie*rt);Re=!1}for(Je&&(Je+=st);Ke<T;)N[Ke].animatorJustifyOffset=Je,Ke+=1}for(T=0;T<P;T+=1){if(j.reset(),Se=1,N[T].n)S=0,_+=s.yOffset,_+=oe?1:0,M=Ae,oe=!1,this._hasMaskedPath&&(L=De,O=Ze,V=G[L].points,$=V[O-1],D=V[O],K=D.partialLength,B=0),$e="",We="",Oe="",Qe="",qe=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Ue!==N[T].line){switch(s.j){case 1:M+=J-s.lineWidths[N[T].line];break;case 2:M+=(J-s.lineWidths[N[T].line])/2;break}Ue=N[T].line}me!==N[T].ind&&(N[me]&&(M+=N[me].extra),M+=N[T].an/2,me=N[T].ind),M+=i[0]*N[T].an*.005;var fe=0;for(H=0;H<W;H+=1)Y=o[H].a,Y.p.propType&&(ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),ie.length?fe+=Y.p.v[0]*ie[0]:fe+=Y.p.v[0]*ie),Y.a.propType&&(ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),ie.length?fe+=Y.a.v[0]*ie[0]:fe+=Y.a.v[0]*ie);for(F=!0,this._pathData.a.v&&(M=N[0].an*.5+(J-this._pathData.f.v-N[0].an*.5-N[N.length-1].an*.5)*me/(P-1),M+=this._pathData.f.v);F;)B+K>=M+fe||!V?(ne=(M+fe-B)/D.partialLength,ye=$.point[0]+(D.point[0]-$.point[0])*ne,Ce=$.point[1]+(D.point[1]-$.point[1])*ne,j.translate(-i[0]*N[T].an*.005,-(i[1]*xe)*.01),F=!1):V&&(B+=D.partialLength,O+=1,O>=V.length&&(O=0,L+=1,G[L]?V=G[L].points:ue.v.c?(O=0,L=0,V=G[L].points):(B-=D.partialLength,V=null)),V&&($=D,D=V[O],K=D.partialLength));ee=N[T].an/2-N[T].add,j.translate(-ee,0,0)}else ee=N[T].an/2-N[T].add,j.translate(-ee,0,0),j.translate(-i[0]*N[T].an*.005,-i[1]*xe*.01,0);for(H=0;H<W;H+=1)Y=o[H].a,Y.t.propType&&(ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),(S!==0||s.j!==0)&&(this._hasMaskedPath?ie.length?M+=Y.t.v*ie[0]:M+=Y.t.v*ie:ie.length?S+=Y.t.v*ie[0]:S+=Y.t.v*ie));for(s.strokeWidthAnim&&(Me=s.sw||0),s.strokeColorAnim&&(s.sc?ze=[s.sc[0],s.sc[1],s.sc[2]]:ze=[0,0,0]),s.fillColorAnim&&s.fc&&(Te=[s.fc[0],s.fc[1],s.fc[2]]),H=0;H<W;H+=1)Y=o[H].a,Y.a.propType&&(ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),ie.length?j.translate(-Y.a.v[0]*ie[0],-Y.a.v[1]*ie[1],Y.a.v[2]*ie[2]):j.translate(-Y.a.v[0]*ie,-Y.a.v[1]*ie,Y.a.v[2]*ie));for(H=0;H<W;H+=1)Y=o[H].a,Y.s.propType&&(ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),ie.length?j.scale(1+(Y.s.v[0]-1)*ie[0],1+(Y.s.v[1]-1)*ie[1],1):j.scale(1+(Y.s.v[0]-1)*ie,1+(Y.s.v[1]-1)*ie,1));for(H=0;H<W;H+=1){if(Y=o[H].a,ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),Y.sk.propType&&(ie.length?j.skewFromAxis(-Y.sk.v*ie[0],Y.sa.v*ie[1]):j.skewFromAxis(-Y.sk.v*ie,Y.sa.v*ie)),Y.r.propType&&(ie.length?j.rotateZ(-Y.r.v*ie[2]):j.rotateZ(-Y.r.v*ie)),Y.ry.propType&&(ie.length?j.rotateY(Y.ry.v*ie[1]):j.rotateY(Y.ry.v*ie)),Y.rx.propType&&(ie.length?j.rotateX(Y.rx.v*ie[0]):j.rotateX(Y.rx.v*ie)),Y.o.propType&&(ie.length?Se+=(Y.o.v*ie[0]-Se)*ie[0]:Se+=(Y.o.v*ie-Se)*ie),s.strokeWidthAnim&&Y.sw.propType&&(ie.length?Me+=Y.sw.v*ie[0]:Me+=Y.sw.v*ie),s.strokeColorAnim&&Y.sc.propType)for(be=0;be<3;be+=1)ie.length?ze[be]+=(Y.sc.v[be]-ze[be])*ie[0]:ze[be]+=(Y.sc.v[be]-ze[be])*ie;if(s.fillColorAnim&&s.fc){if(Y.fc.propType)for(be=0;be<3;be+=1)ie.length?Te[be]+=(Y.fc.v[be]-Te[be])*ie[0]:Te[be]+=(Y.fc.v[be]-Te[be])*ie;Y.fh.propType&&(ie.length?Te=addHueToRGB(Te,Y.fh.v*ie[0]):Te=addHueToRGB(Te,Y.fh.v*ie)),Y.fs.propType&&(ie.length?Te=addSaturationToRGB(Te,Y.fs.v*ie[0]):Te=addSaturationToRGB(Te,Y.fs.v*ie)),Y.fb.propType&&(ie.length?Te=addBrightnessToRGB(Te,Y.fb.v*ie[0]):Te=addBrightnessToRGB(Te,Y.fb.v*ie))}}for(H=0;H<W;H+=1)Y=o[H].a,Y.p.propType&&(ae=o[H].s,ie=ae.getMult(N[T].anIndexes[H],E.a[H].s.totalChars),this._hasMaskedPath?ie.length?j.translate(0,Y.p.v[1]*ie[0],-Y.p.v[2]*ie[1]):j.translate(0,Y.p.v[1]*ie,-Y.p.v[2]*ie):ie.length?j.translate(Y.p.v[0]*ie[0],Y.p.v[1]*ie[1],-Y.p.v[2]*ie[2]):j.translate(Y.p.v[0]*ie,Y.p.v[1]*ie,-Y.p.v[2]*ie));if(s.strokeWidthAnim&&(Oe=Me<0?0:Me),s.strokeColorAnim&&(Ge="rgb("+Math.round(ze[0]*255)+","+Math.round(ze[1]*255)+","+Math.round(ze[2]*255)+")"),s.fillColorAnim&&s.fc&&(We="rgb("+Math.round(Te[0]*255)+","+Math.round(Te[1]*255)+","+Math.round(Te[2]*255)+")"),this._hasMaskedPath){if(j.translate(0,-s.ls),j.translate(0,i[1]*xe*.01+_,0),this._pathData.p.v){le=(D.point[1]-$.point[1])/(D.point[0]-$.point[0]);var ve=Math.atan(le)*180/Math.PI;D.point[0]<$.point[0]&&(ve+=180),j.rotate(-ve*Math.PI/180)}j.translate(ye,Ce,0),M-=i[0]*N[T].an*.005,N[T+1]&&me!==N[T+1].ind&&(M+=N[T].an/2,M+=s.tr*.001*s.finalSize)}else{switch(j.translate(S,_,0),s.ps&&j.translate(s.ps[0],s.ps[1]+s.ascent,0),s.j){case 1:j.translate(N[T].animatorJustifyOffset+s.justifyOffset+(s.boxWidth-s.lineWidths[N[T].line]),0,0);break;case 2:j.translate(N[T].animatorJustifyOffset+s.justifyOffset+(s.boxWidth-s.lineWidths[N[T].line])/2,0,0);break}j.translate(0,-s.ls),j.translate(ee,0,0),j.translate(i[0]*N[T].an*.005,i[1]*xe*.01,0),S+=N[T].l+s.tr*.001*s.finalSize}R==="html"?$e=j.toCSS():R==="svg"?$e=j.to2dCSS():qe=[j.props[0],j.props[1],j.props[2],j.props[3],j.props[4],j.props[5],j.props[6],j.props[7],j.props[8],j.props[9],j.props[10],j.props[11],j.props[12],j.props[13],j.props[14],j.props[15]],Qe=Se}C<=T?(U=new LetterProps(Qe,Oe,Ge,We,$e,qe),this.renderedLetters.push(U),C+=1,this.lettersChangedFlag=!0):(U=this.renderedLetters[T],this.lettersChangedFlag=U.update(Qe,Oe,Ge,We,$e,qe)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(s,a,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(s,a,i),this.textProperty=new TextProperty(this,s.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(s.t,this.renderType,this),this.initTransform(s,a,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(s){this._mdf=!1,this.prepareRenderableFrame(s),this.prepareProperties(s,this.isInRange)},ITextElement.prototype.createPathShape=function(s,a){var i,o=a.length,E,j="";for(i=0;i<o;i+=1)a[i].ty==="sh"&&(E=a[i].ks.k,j+=buildShapeString(E,E.i.length,!0,s));return j},ITextElement.prototype.updateDocumentData=function(s,a){this.textProperty.updateDocumentData(s,a)},ITextElement.prototype.canResizeFont=function(s){this.textProperty.canResizeFont(s)},ITextElement.prototype.setMinimumFontSize=function(s){this.textProperty.setMinimumFontSize(s)},ITextElement.prototype.applyTextPropertiesToMatrix=function(s,a,i,o,E){switch(s.ps&&a.translate(s.ps[0],s.ps[1]+s.ascent,0),a.translate(0,-s.ls,0),s.j){case 1:a.translate(s.justifyOffset+(s.boxWidth-s.lineWidths[i]),0,0);break;case 2:a.translate(s.justifyOffset+(s.boxWidth-s.lineWidths[i])/2,0,0);break}a.translate(o,E,0)},ITextElement.prototype.buildColor=function(s){return"rgb("+Math.round(s[0]*255)+","+Math.round(s[1]*255)+","+Math.round(s[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(s,a,i){this.textSpans=[],this.renderType="svg",this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(s){for(var a=0,i=s.length,o=[],E="";a<i;)s[a]==="\r"||s[a]===""?(o.push(E),E=""):E+=s[a],a+=1;return o.push(E),o},SVGTextLottieElement.prototype.buildShapeData=function(s,a){if(s.shapes&&s.shapes.length){var i=s.shapes[0];if(i.it){var o=i.it[i.it.length-1];o.s&&(o.s.k[0]=a,o.s.k[1]=a)}}return s},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var s,a,i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var o=this.globalData.fontManager.getFontByName(i.f);if(o.fClass)this.layerElement.setAttribute("class",o.fClass);else{this.layerElement.setAttribute("font-family",o.fFamily);var E=i.fWeight,j=i.fStyle;this.layerElement.setAttribute("font-style",j),this.layerElement.setAttribute("font-weight",E)}this.layerElement.setAttribute("aria-label",i.t);var R=i.l||[],C=!!this.globalData.fontManager.chars;a=R.length;var S,_=this.mHelper,T="",P=this.data.singleShape,N=0,I=0,M=!0,D=i.tr*.001*i.finalSize;if(P&&!C&&!i.sz){var B=this.textContainer,F="start";switch(i.j){case 1:F="end";break;case 2:F="middle";break;default:F="start";break}B.setAttribute("text-anchor",F),B.setAttribute("letter-spacing",D);var O=this.buildTextContents(i.finalText);for(a=O.length,I=i.ps?i.ps[1]+i.ascent:0,s=0;s<a;s+=1)S=this.textSpans[s].span||createNS("tspan"),S.textContent=O[s],S.setAttribute("x",0),S.setAttribute("y",I),S.style.display="inherit",B.appendChild(S),this.textSpans[s]||(this.textSpans[s]={span:null,glyph:null}),this.textSpans[s].span=S,I+=i.finalLineHeight;this.layerElement.appendChild(B)}else{var L=this.textSpans.length,$;for(s=0;s<a;s+=1){if(this.textSpans[s]||(this.textSpans[s]={span:null,childSpan:null,glyph:null}),!C||!P||s===0){if(S=L>s?this.textSpans[s].span:createNS(C?"g":"text"),L<=s){if(S.setAttribute("stroke-linecap","butt"),S.setAttribute("stroke-linejoin","round"),S.setAttribute("stroke-miterlimit","4"),this.textSpans[s].span=S,C){var V=createNS("g");S.appendChild(V),this.textSpans[s].childSpan=V}this.textSpans[s].span=S,this.layerElement.appendChild(S)}S.style.display="inherit"}if(_.reset(),P&&(R[s].n&&(N=-D,I+=i.yOffset,I+=M?1:0,M=!1),this.applyTextPropertiesToMatrix(i,_,R[s].line,N,I),N+=R[s].l||0,N+=D),C){$=this.globalData.fontManager.getCharData(i.finalText[s],o.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily);var G;if($.t===1)G=new SVGCompElement($.data,this.globalData,this);else{var K=emptyShapeData;$.data&&$.data.shapes&&(K=this.buildShapeData($.data,i.finalSize)),G=new SVGShapeElement(K,this.globalData,this)}if(this.textSpans[s].glyph){var J=this.textSpans[s].glyph;this.textSpans[s].childSpan.removeChild(J.layerElement),J.destroy()}this.textSpans[s].glyph=G,G._debug=!0,G.prepareFrame(0),G.renderFrame(),this.textSpans[s].childSpan.appendChild(G.layerElement),$.t===1&&this.textSpans[s].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else P&&S.setAttribute("transform","translate("+_.props[12]+","+_.props[13]+")"),S.textContent=R[s].val,S.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}P&&S&&S.setAttribute("d",T)}for(;s<this.textSpans.length;)this.textSpans[s].span.style.display="none",s+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var s=this.layerElement.getBBox();this.bbox={top:s.y,left:s.x,width:s.width,height:s.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var s,a=this.textSpans.length,i;for(this.renderedFrame=this.comp.renderedFrame,s=0;s<a;s+=1)i=this.textSpans[s].glyph,i&&(i.prepareFrame(this.comp.renderedFrame-this.data.st),i._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var s,a,i=this.textAnimator.renderedLetters,o=this.textProperty.currentData.l;a=o.length;var E,j,R;for(s=0;s<a;s+=1)o[s].n||(E=i[s],j=this.textSpans[s].span,R=this.textSpans[s].glyph,R&&R.renderFrame(),E._mdf.m&&j.setAttribute("transform",E.m),E._mdf.o&&j.setAttribute("opacity",E.o),E._mdf.sw&&j.setAttribute("stroke-width",E.sw),E._mdf.sc&&j.setAttribute("stroke",E.sc),E._mdf.fc&&j.setAttribute("fill",E.fc))}};function ISolidElement(s,a,i){this.initElement(s,a,i)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var s=createNS("rect");s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),this.layerElement.appendChild(s)};function NullElement(s,a,i){this.initFrame(),this.initBaseData(s,a,i),this.initFrame(),this.initTransform(s,a,i),this.initHierarchy()}NullElement.prototype.prepareFrame=function(s){this.prepareProperties(s,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(s){return new NullElement(s,this.globalData,this)},SVGRendererBase.prototype.createShape=function(s){return new SVGShapeElement(s,this.globalData,this)},SVGRendererBase.prototype.createText=function(s){return new SVGTextLottieElement(s,this.globalData,this)},SVGRendererBase.prototype.createImage=function(s){return new IImageElement(s,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(s){return new ISolidElement(s,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(s){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+s.w+" "+s.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",s.w),this.svgElement.setAttribute("height",s.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var a=this.globalData.defs;this.setupGlobalData(s,a),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=s;var i=createNS("clipPath"),o=createNS("rect");o.setAttribute("width",s.w),o.setAttribute("height",s.h),o.setAttribute("x",0),o.setAttribute("y",0);var E=createElementID();i.setAttribute("id",E),i.appendChild(o),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+E+")"),a.appendChild(i),this.layers=s.layers,this.elements=createSizedArray(s.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var s,a=this.layers?this.layers.length:0;for(s=0;s<a;s+=1)this.elements[s]&&this.elements[s].destroy&&this.elements[s].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(s){var a=0,i=this.layers.length;for(a=0;a<i;a+=1)if(this.layers[a].ind===s)return a;return-1},SVGRendererBase.prototype.buildItem=function(s){var a=this.elements;if(!(a[s]||this.layers[s].ty===99)){a[s]=!0;var i=this.createItem(this.layers[s]);if(a[s]=i,getExpressionsPlugin()&&(this.layers[s].ty===0&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,s),this.layers[s].tt){var o="tp"in this.layers[s]?this.findIndexByInd(this.layers[s].tp):s-1;if(o===-1)return;if(!this.elements[o]||this.elements[o]===!0)this.buildItem(o),this.addPendingElement(i);else{var E=a[o],j=E.getMatte(this.layers[s].tt);i.setMatte(j)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var s=this.pendingElements.pop();if(s.checkParenting(),s.data.tt)for(var a=0,i=this.elements.length;a<i;){if(this.elements[a]===s){var o="tp"in s.data?this.findIndexByInd(s.data.tp):a-1,E=this.elements[o],j=E.getMatte(this.layers[a].tt);s.setMatte(j);break}a+=1}}},SVGRendererBase.prototype.renderFrame=function(s){if(!(this.renderedFrame===s||this.destroyed)){s===null?s=this.renderedFrame:this.renderedFrame=s,this.globalData.frameNum=s,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=s,this.globalData._mdf=!1;var a,i=this.layers.length;for(this.completeLayers||this.checkLayers(s),a=i-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].prepareFrame(s-this.layers[a].st);if(this.globalData._mdf)for(a=0;a<i;a+=1)(this.completeLayers||this.elements[a])&&this.elements[a].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(s,a){var i=s.getBaseElement();if(i){for(var o=0,E;o<a;)this.elements[o]&&this.elements[o]!==!0&&this.elements[o].getBaseElement()&&(E=this.elements[o].getBaseElement()),o+=1;E?this.layerElement.insertBefore(i,E):this.layerElement.appendChild(i)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(s,a,i){this.initFrame(),this.initBaseData(s,a,i),this.initTransform(s,a,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!a.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(s){if(this._mdf=!1,this.prepareRenderableFrame(s),this.prepareProperties(s,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=s/this.data.sr;else{var a=this.tm.v;a===this.data.op&&(a=this.data.op-1),this.renderedFrame=a}var i,o=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=o-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var s,a=this.layers.length;for(s=0;s<a;s+=1)(this.completeLayers||this.elements[s])&&this.elements[s].renderFrame()},ICompElement.prototype.setElements=function(s){this.elements=s},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var s,a=this.layers.length;for(s=0;s<a;s+=1)this.elements[s]&&this.elements[s].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(s,a,i){this.layers=s.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(s,a,i),this.tm=s.tm?PropertyFactory.getProp(this,s.tm,0,a.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(s){return new SVGCompElement(s,this.globalData,this)};function SVGRenderer(s,a){this.animationItem=s,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(a&&a.title){var o=createNS("title"),E=createElementID();o.setAttribute("id",E),o.textContent=a.title,this.svgElement.appendChild(o),i+=E}if(a&&a.description){var j=createNS("desc"),R=createElementID();j.setAttribute("id",R),j.textContent=a.description,this.svgElement.appendChild(j),i+=" "+R}i&&this.svgElement.setAttribute("aria-labelledby",i);var C=createNS("defs");this.svgElement.appendChild(C);var S=createNS("g");this.svgElement.appendChild(S),this.layerElement=S,this.renderConfig={preserveAspectRatio:a&&a.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:a&&a.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:a&&a.contentVisibility||"visible",progressiveLoad:a&&a.progressiveLoad||!1,hideOnTransparent:!(a&&a.hideOnTransparent===!1),viewBoxOnly:a&&a.viewBoxOnly||!1,viewBoxSize:a&&a.viewBoxSize||!1,className:a&&a.className||"",id:a&&a.id||"",focusable:a&&a.focusable,filterSize:{width:a&&a.filterSize&&a.filterSize.width||"100%",height:a&&a.filterSize&&a.filterSize.height||"100%",x:a&&a.filterSize&&a.filterSize.x||"0%",y:a&&a.filterSize&&a.filterSize.y||"0%"},width:a&&a.width,height:a&&a.height,runExpressions:!a||a.runExpressions===void 0||a.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:C,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(s){return new SVGCompElement(s,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(a){var i,o=a.length,E="_";for(i=0;i<o;i+=1)E+=a[i].transform.key+"_";var j=this.sequences[E];return j||(j={transforms:[].concat(a),finalTransform:new Matrix,_mdf:!1},this.sequences[E]=j,this.sequenceList.push(j)),j},processSequence:function(a,i){for(var o=0,E=a.transforms.length,j=i;o<E&&!i;){if(a.transforms[o].transform.mProps._mdf){j=!0;break}o+=1}if(j)for(a.finalTransform.reset(),o=E-1;o>=0;o-=1)a.finalTransform.multiply(a.transforms[o].transform.mProps.v);a._mdf=j},processSequences:function(a){var i,o=this.sequenceList.length;for(i=0;i<o;i+=1)this.processSequence(this.sequenceList[i],a)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var a="__lottie_element_luma_buffer",i=null,o=null,E=null;function j(){var S=createNS("svg"),_=createNS("filter"),T=createNS("feColorMatrix");return _.setAttribute("id",a),T.setAttribute("type","matrix"),T.setAttribute("color-interpolation-filters","sRGB"),T.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),_.appendChild(T),S.appendChild(_),S.setAttribute("id",a+"_svg"),featureSupport.svgLumaHidden&&(S.style.display="none"),S}function R(){i||(E=j(),document.body.appendChild(E),i=createTag("canvas"),o=i.getContext("2d"),o.filter="url(#"+a+")",o.fillStyle="rgba(0,0,0,0)",o.fillRect(0,0,1,1))}function C(S){return i||R(),i.width=S.width,i.height=S.height,o.filter="url(#"+a+")",i}return{load:R,get:C}};function createCanvas(s,a){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(s,a);var i=createTag("canvas");return i.width=s,i.height=a,i}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(s){var a,i=s.data.ef?s.data.ef.length:0;this.filters=[];var o;for(a=0;a<i;a+=1){o=null;var E=s.data.ef[a].ty;if(registeredEffects[E]){var j=registeredEffects[E].effect;o=new j(s.effectsManager.effectElements[a],s)}o&&this.filters.push(o)}this.filters.length&&s.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(s){var a,i=this.filters.length;for(a=0;a<i;a+=1)this.filters[a].renderFrame(s)},CVEffects.prototype.getEffects=function(s){var a,i=this.filters.length,o=[];for(a=0;a<i;a+=1)this.filters[a].type===s&&o.push(this.filters[a]);return o};function registerEffect(s,a){registeredEffects[s]={effect:a}}function CVMaskElement(s,a){this.data=s,this.element=a,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var i,o=this.masksProperties.length,E=!1;for(i=0;i<o;i+=1)this.masksProperties[i].mode!=="n"&&(E=!0),this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3);this.hasMasks=E,E&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var s=this.element.finalTransform.mat,a=this.element.canvasContext,i,o=this.masksProperties.length,E,j,R;for(a.beginPath(),i=0;i<o;i+=1)if(this.masksProperties[i].mode!=="n"){this.masksProperties[i].inv&&(a.moveTo(0,0),a.lineTo(this.element.globalData.compSize.w,0),a.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),a.lineTo(0,this.element.globalData.compSize.h),a.lineTo(0,0)),R=this.viewData[i].v,E=s.applyToPointArray(R.v[0][0],R.v[0][1],0),a.moveTo(E[0],E[1]);var C,S=R._length;for(C=1;C<S;C+=1)j=s.applyToTriplePoints(R.o[C-1],R.i[C],R.v[C]),a.bezierCurveTo(j[0],j[1],j[2],j[3],j[4],j[5]);j=s.applyToTriplePoints(R.o[C-1],R.i[0],R.v[0]),a.bezierCurveTo(j[0],j[1],j[2],j[3],j[4],j[5])}this.element.globalData.renderer.save(!0),a.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var a=this.globalData.canvasContext,i=assetLoader.createCanvas(a.canvas.width,a.canvas.height);this.buffers.push(i);var o=assetLoader.createCanvas(a.canvas.width,a.canvas.height);this.buffers.push(o),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var a=this.globalData;if(a.blendMode!==this.data.bm){a.blendMode=this.data.bm;var i=getBlendMode(this.data.bm);a.canvasContext.globalCompositeOperation=i}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(a){a.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var a=this.buffers[0],i=a.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var a=this.buffers[1],i=a.getContext("2d");this.clearCanvas(i),i.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var o=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(o.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var E=assetLoader.getLumaCanvas(this.canvasContext.canvas),j=E.getContext("2d");j.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(E,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(a,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(a){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!a)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var i=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(i),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(i),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(s,a,i,o){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var E=4;a.ty==="rc"?E=5:a.ty==="el"?E=6:a.ty==="sr"&&(E=7),this.sh=ShapePropertyFactory.getShapeProp(s,a,E,s);var j,R=i.length,C;for(j=0;j<R;j+=1)i[j].closed||(C={transforms:o.addTransformSequence(i[j].transforms),trNodes:[]},this.styledShapes.push(C),i[j].elements.push(C))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(s,a,i){this.shapes=[],this.shapesData=s.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(s,a){var i={data:s,type:s.ty,preTransforms:this.transformsManager.addTransformSequence(a),transforms:[],elements:[],closed:s.hd===!0},o={};if(s.ty==="fl"||s.ty==="st"?(o.c=PropertyFactory.getProp(this,s.c,1,255,this),o.c.k||(i.co="rgb("+bmFloor(o.c.v[0])+","+bmFloor(o.c.v[1])+","+bmFloor(o.c.v[2])+")")):(s.ty==="gf"||s.ty==="gs")&&(o.s=PropertyFactory.getProp(this,s.s,1,null,this),o.e=PropertyFactory.getProp(this,s.e,1,null,this),o.h=PropertyFactory.getProp(this,s.h||{k:0},0,.01,this),o.a=PropertyFactory.getProp(this,s.a||{k:0},0,degToRads,this),o.g=new GradientProperty(this,s.g,this)),o.o=PropertyFactory.getProp(this,s.o,0,.01,this),s.ty==="st"||s.ty==="gs"){if(i.lc=lineCapEnum[s.lc||2],i.lj=lineJoinEnum[s.lj||2],s.lj==1&&(i.ml=s.ml),o.w=PropertyFactory.getProp(this,s.w,0,null,this),o.w.k||(i.wi=o.w.v),s.d){var E=new DashProperty(this,s.d,"canvas",this);o.d=E,o.d.k||(i.da=o.d.dashArray,i.do=o.d.dashoffset[0])}}else i.r=s.r===2?"evenodd":"nonzero";return this.stylesList.push(i),o.style=i,o},CVShapeElement.prototype.createGroupElement=function(){var s={it:[],prevViewData:[]};return s},CVShapeElement.prototype.createTransformElement=function(s){var a={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,s.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,s,this)}};return a},CVShapeElement.prototype.createShapeElement=function(s){var a=new CVShapeData(this,s,this.stylesList,this.transformsManager);return this.shapes.push(a),this.addShapeToModifiers(a),a},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var s,a=this.itemsData.length;for(s=0;s<a;s+=1)this.prevViewData[s]=this.itemsData[s];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),a=this.dynamicProperties.length,s=0;s<a;s+=1)this.dynamicProperties[s].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(s){var a,i=this.stylesList.length;for(a=0;a<i;a+=1)this.stylesList[a].closed||this.stylesList[a].transforms.push(s)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var s,a=this.stylesList.length;for(s=0;s<a;s+=1)this.stylesList[s].closed||this.stylesList[s].transforms.pop()},CVShapeElement.prototype.closeStyles=function(s){var a,i=s.length;for(a=0;a<i;a+=1)s[a].closed=!0},CVShapeElement.prototype.searchShapes=function(s,a,i,o,E){var j,R=s.length-1,C,S,_=[],T=[],P,N,I,M=[].concat(E);for(j=R;j>=0;j-=1){if(P=this.searchProcessedElement(s[j]),P?a[j]=i[P-1]:s[j]._shouldRender=o,s[j].ty==="fl"||s[j].ty==="st"||s[j].ty==="gf"||s[j].ty==="gs")P?a[j].style.closed=!1:a[j]=this.createStyleElement(s[j],M),_.push(a[j].style);else if(s[j].ty==="gr"){if(!P)a[j]=this.createGroupElement(s[j]);else for(S=a[j].it.length,C=0;C<S;C+=1)a[j].prevViewData[C]=a[j].it[C];this.searchShapes(s[j].it,a[j].it,a[j].prevViewData,o,M)}else s[j].ty==="tr"?(P||(I=this.createTransformElement(s[j]),a[j]=I),M.push(a[j]),this.addTransformToStyleList(a[j])):s[j].ty==="sh"||s[j].ty==="rc"||s[j].ty==="el"||s[j].ty==="sr"?P||(a[j]=this.createShapeElement(s[j])):s[j].ty==="tm"||s[j].ty==="rd"||s[j].ty==="pb"||s[j].ty==="zz"||s[j].ty==="op"?(P?(N=a[j],N.closed=!1):(N=ShapeModifiers.getModifier(s[j].ty),N.init(this,s[j]),a[j]=N,this.shapeModifiers.push(N)),T.push(N)):s[j].ty==="rp"&&(P?(N=a[j],N.closed=!0):(N=ShapeModifiers.getModifier(s[j].ty),a[j]=N,N.init(this,s,j,a),this.shapeModifiers.push(N),o=!1),T.push(N));this.addProcessedElement(s[j],j+1)}for(this.removeTransformFromStyleList(),this.closeStyles(_),R=T.length,j=0;j<R;j+=1)T[j].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(s,a){(s._opMdf||a.op._mdf||this._isFirstFrame)&&(a.opacity=s.opacity,a.opacity*=a.op.v,a._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var s,a=this.stylesList.length,i,o,E,j,R,C,S=this.globalData.renderer,_=this.globalData.canvasContext,T,P;for(s=0;s<a;s+=1)if(P=this.stylesList[s],T=P.type,!((T==="st"||T==="gs")&&P.wi===0||!P.data._shouldRender||P.coOp===0||this.globalData.currentGlobalAlpha===0)){for(S.save(),R=P.elements,T==="st"||T==="gs"?(S.ctxStrokeStyle(T==="st"?P.co:P.grd),S.ctxLineWidth(P.wi),S.ctxLineCap(P.lc),S.ctxLineJoin(P.lj),S.ctxMiterLimit(P.ml||0)):S.ctxFillStyle(T==="fl"?P.co:P.grd),S.ctxOpacity(P.coOp),T!=="st"&&T!=="gs"&&_.beginPath(),S.ctxTransform(P.preTransforms.finalTransform.props),o=R.length,i=0;i<o;i+=1){for((T==="st"||T==="gs")&&(_.beginPath(),P.da&&(_.setLineDash(P.da),_.lineDashOffset=P.do)),C=R[i].trNodes,j=C.length,E=0;E<j;E+=1)C[E].t==="m"?_.moveTo(C[E].p[0],C[E].p[1]):C[E].t==="c"?_.bezierCurveTo(C[E].pts[0],C[E].pts[1],C[E].pts[2],C[E].pts[3],C[E].pts[4],C[E].pts[5]):_.closePath();(T==="st"||T==="gs")&&(S.ctxStroke(),P.da&&_.setLineDash(this.dashResetter))}T!=="st"&&T!=="gs"&&this.globalData.renderer.ctxFill(P.r),S.restore()}},CVShapeElement.prototype.renderShape=function(s,a,i,o){var E,j=a.length-1,R;for(R=s,E=j;E>=0;E-=1)a[E].ty==="tr"?(R=i[E].transform,this.renderShapeTransform(s,R)):a[E].ty==="sh"||a[E].ty==="el"||a[E].ty==="rc"||a[E].ty==="sr"?this.renderPath(a[E],i[E]):a[E].ty==="fl"?this.renderFill(a[E],i[E],R):a[E].ty==="st"?this.renderStroke(a[E],i[E],R):a[E].ty==="gf"||a[E].ty==="gs"?this.renderGradientFill(a[E],i[E],R):a[E].ty==="gr"?this.renderShape(R,a[E].it,i[E].it):a[E].ty;o&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(s,a){if(this._isFirstFrame||a._mdf||s.transforms._mdf){var i=s.trNodes,o=a.paths,E,j,R,C=o._length;i.length=0;var S=s.transforms.finalTransform;for(R=0;R<C;R+=1){var _=o.shapes[R];if(_&&_.v){for(j=_._length,E=1;E<j;E+=1)E===1&&i.push({t:"m",p:S.applyToPointArray(_.v[0][0],_.v[0][1],0)}),i.push({t:"c",pts:S.applyToTriplePoints(_.o[E-1],_.i[E],_.v[E])});j===1&&i.push({t:"m",p:S.applyToPointArray(_.v[0][0],_.v[0][1],0)}),_.c&&j&&(i.push({t:"c",pts:S.applyToTriplePoints(_.o[E-1],_.i[0],_.v[0])}),i.push({t:"z"}))}}s.trNodes=i}},CVShapeElement.prototype.renderPath=function(s,a){if(s.hd!==!0&&s._shouldRender){var i,o=a.styledShapes.length;for(i=0;i<o;i+=1)this.renderStyledShape(a.styledShapes[i],a.sh)}},CVShapeElement.prototype.renderFill=function(s,a,i){var o=a.style;(a.c._mdf||this._isFirstFrame)&&(o.co="rgb("+bmFloor(a.c.v[0])+","+bmFloor(a.c.v[1])+","+bmFloor(a.c.v[2])+")"),(a.o._mdf||i._opMdf||this._isFirstFrame)&&(o.coOp=a.o.v*i.opacity)},CVShapeElement.prototype.renderGradientFill=function(s,a,i){var o=a.style,E;if(!o.grd||a.g._mdf||a.s._mdf||a.e._mdf||s.t!==1&&(a.h._mdf||a.a._mdf)){var j=this.globalData.canvasContext,R=a.s.v,C=a.e.v;if(s.t===1)E=j.createLinearGradient(R[0],R[1],C[0],C[1]);else{var S=Math.sqrt(Math.pow(R[0]-C[0],2)+Math.pow(R[1]-C[1],2)),_=Math.atan2(C[1]-R[1],C[0]-R[0]),T=a.h.v;T>=1?T=.99:T<=-1&&(T=-.99);var P=S*T,N=Math.cos(_+a.a.v)*P+R[0],I=Math.sin(_+a.a.v)*P+R[1];E=j.createRadialGradient(N,I,0,R[0],R[1],S)}var M,D=s.g.p,B=a.g.c,F=1;for(M=0;M<D;M+=1)a.g._hasOpacity&&a.g._collapsable&&(F=a.g.o[M*2+1]),E.addColorStop(B[M*4]/100,"rgba("+B[M*4+1]+","+B[M*4+2]+","+B[M*4+3]+","+F+")");o.grd=E}o.coOp=a.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(s,a,i){var o=a.style,E=a.d;E&&(E._mdf||this._isFirstFrame)&&(o.da=E.dashArray,o.do=E.dashoffset[0]),(a.c._mdf||this._isFirstFrame)&&(o.co="rgb("+bmFloor(a.c.v[0])+","+bmFloor(a.c.v[1])+","+bmFloor(a.c.v[2])+")"),(a.o._mdf||i._opMdf||this._isFirstFrame)&&(o.coOp=a.o.v*i.opacity),(a.w._mdf||this._isFirstFrame)&&(o.wi=a.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(s,a,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var s=this.textProperty.currentData;this.renderedLetters=createSizedArray(s.l?s.l.length:0);var a=!1;s.fc?(a=!0,this.values.fill=this.buildColor(s.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=a;var i=!1;s.sc&&(i=!0,this.values.stroke=this.buildColor(s.sc),this.values.sWidth=s.sw);var o=this.globalData.fontManager.getFontByName(s.f),E,j,R=s.l,C=this.mHelper;this.stroke=i,this.values.fValue=s.finalSize+"px "+this.globalData.fontManager.getFontByName(s.f).fFamily,j=s.finalText.length;var S,_,T,P,N,I,M,D,B,F,O=this.data.singleShape,L=s.tr*.001*s.finalSize,$=0,V=0,G=!0,K=0;for(E=0;E<j;E+=1){S=this.globalData.fontManager.getCharData(s.finalText[E],o.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily),_=S&&S.data||{},C.reset(),O&&R[E].n&&($=-L,V+=s.yOffset,V+=G?1:0,G=!1),N=_.shapes?_.shapes[0].it:[],M=N.length,C.scale(s.finalSize/100,s.finalSize/100),O&&this.applyTextPropertiesToMatrix(s,C,R[E].line,$,V),B=createSizedArray(M-1);var J=0;for(I=0;I<M;I+=1)if(N[I].ty==="sh"){for(P=N[I].ks.k.i.length,D=N[I].ks.k,F=[],T=1;T<P;T+=1)T===1&&F.push(C.applyToX(D.v[0][0],D.v[0][1],0),C.applyToY(D.v[0][0],D.v[0][1],0)),F.push(C.applyToX(D.o[T-1][0],D.o[T-1][1],0),C.applyToY(D.o[T-1][0],D.o[T-1][1],0),C.applyToX(D.i[T][0],D.i[T][1],0),C.applyToY(D.i[T][0],D.i[T][1],0),C.applyToX(D.v[T][0],D.v[T][1],0),C.applyToY(D.v[T][0],D.v[T][1],0));F.push(C.applyToX(D.o[T-1][0],D.o[T-1][1],0),C.applyToY(D.o[T-1][0],D.o[T-1][1],0),C.applyToX(D.i[0][0],D.i[0][1],0),C.applyToY(D.i[0][0],D.i[0][1],0),C.applyToX(D.v[0][0],D.v[0][1],0),C.applyToY(D.v[0][0],D.v[0][1],0)),B[J]=F,J+=1}O&&($+=R[E].l,$+=L),this.textSpans[K]?this.textSpans[K].elem=B:this.textSpans[K]={elem:B},K+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var s=this.canvasContext;s.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var a,i,o,E,j,R,C=this.textAnimator.renderedLetters,S=this.textProperty.currentData.l;i=S.length;var _,T=null,P=null,N=null,I,M,D=this.globalData.renderer;for(a=0;a<i;a+=1)if(!S[a].n){if(_=C[a],_&&(D.save(),D.ctxTransform(_.p),D.ctxOpacity(_.o)),this.fill){for(_&&_.fc?T!==_.fc&&(D.ctxFillStyle(_.fc),T=_.fc):T!==this.values.fill&&(T=this.values.fill,D.ctxFillStyle(this.values.fill)),I=this.textSpans[a].elem,E=I.length,this.globalData.canvasContext.beginPath(),o=0;o<E;o+=1)for(M=I[o],R=M.length,this.globalData.canvasContext.moveTo(M[0],M[1]),j=2;j<R;j+=6)this.globalData.canvasContext.bezierCurveTo(M[j],M[j+1],M[j+2],M[j+3],M[j+4],M[j+5]);this.globalData.canvasContext.closePath(),D.ctxFill()}if(this.stroke){for(_&&_.sw?N!==_.sw&&(N=_.sw,D.ctxLineWidth(_.sw)):N!==this.values.sWidth&&(N=this.values.sWidth,D.ctxLineWidth(this.values.sWidth)),_&&_.sc?P!==_.sc&&(P=_.sc,D.ctxStrokeStyle(_.sc)):P!==this.values.stroke&&(P=this.values.stroke,D.ctxStrokeStyle(this.values.stroke)),I=this.textSpans[a].elem,E=I.length,this.globalData.canvasContext.beginPath(),o=0;o<E;o+=1)for(M=I[o],R=M.length,this.globalData.canvasContext.moveTo(M[0],M[1]),j=2;j<R;j+=6)this.globalData.canvasContext.bezierCurveTo(M[j],M[j+1],M[j+2],M[j+3],M[j+4],M[j+5]);this.globalData.canvasContext.closePath(),D.ctxStroke()}_&&this.globalData.renderer.restore()}};function CVImageElement(s,a,i){this.assetData=a.getAssetData(s.refId),this.img=a.imageLoader.getAsset(this.assetData),this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var s=createTag("canvas");s.width=this.assetData.w,s.height=this.assetData.h;var a=s.getContext("2d"),i=this.img.width,o=this.img.height,E=i/o,j=this.assetData.w/this.assetData.h,R,C,S=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;E>j&&S==="xMidYMid slice"||E<j&&S!=="xMidYMid slice"?(C=o,R=C*j):(R=i,C=R/j),a.drawImage(this.img,(i-R)/2,(o-C)/2,R,C,0,0,this.assetData.w,this.assetData.h),this.img=s}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(s,a,i){this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(s){return new CVShapeElement(s,this.globalData,this)},CanvasRendererBase.prototype.createText=function(s){return new CVTextElement(s,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(s){return new CVImageElement(s,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(s){return new CVSolidElement(s,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(s){s[0]===1&&s[1]===0&&s[4]===0&&s[5]===1&&s[12]===0&&s[13]===0||this.canvasContext.transform(s[0],s[1],s[4],s[5],s[12],s[13])},CanvasRendererBase.prototype.ctxOpacity=function(s){this.canvasContext.globalAlpha*=s<0?0:s},CanvasRendererBase.prototype.ctxFillStyle=function(s){this.canvasContext.fillStyle=s},CanvasRendererBase.prototype.ctxStrokeStyle=function(s){this.canvasContext.strokeStyle=s},CanvasRendererBase.prototype.ctxLineWidth=function(s){this.canvasContext.lineWidth=s},CanvasRendererBase.prototype.ctxLineCap=function(s){this.canvasContext.lineCap=s},CanvasRendererBase.prototype.ctxLineJoin=function(s){this.canvasContext.lineJoin=s},CanvasRendererBase.prototype.ctxMiterLimit=function(s){this.canvasContext.miterLimit=s},CanvasRendererBase.prototype.ctxFill=function(s){this.canvasContext.fill(s)},CanvasRendererBase.prototype.ctxFillRect=function(s,a,i,o){this.canvasContext.fillRect(s,a,i,o)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(s){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}s&&(this.globalData.blendMode="source-over"),this.contextData.restore(s)},CanvasRendererBase.prototype.configAnimation=function(s){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var a=this.animationItem.container.style;a.width="100%",a.height="100%";var i="0px 0px 0px";a.transformOrigin=i,a.mozTransformOrigin=i,a.webkitTransformOrigin=i,a["-webkit-transform"]=i,a.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=s,this.layers=s.layers,this.transformCanvas={w:s.w,h:s.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(s,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(s.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(s,a){this.reset();var i,o;s?(i=s,o=a,this.canvasContext.canvas.width=i,this.canvasContext.canvas.height=o):(this.animationItem.wrapper&&this.animationItem.container?(i=this.animationItem.wrapper.offsetWidth,o=this.animationItem.wrapper.offsetHeight):(i=this.canvasContext.canvas.width,o=this.canvasContext.canvas.height),this.canvasContext.canvas.width=i*this.renderConfig.dpr,this.canvasContext.canvas.height=o*this.renderConfig.dpr);var E,j;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var R=this.renderConfig.preserveAspectRatio.split(" "),C=R[1]||"meet",S=R[0]||"xMidYMid",_=S.substr(0,4),T=S.substr(4);E=i/o,j=this.transformCanvas.w/this.transformCanvas.h,j>E&&C==="meet"||j<E&&C==="slice"?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=o/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=o/(this.transformCanvas.h/this.renderConfig.dpr)),_==="xMid"&&(j<E&&C==="meet"||j>E&&C==="slice")?this.transformCanvas.tx=(i-this.transformCanvas.w*(o/this.transformCanvas.h))/2*this.renderConfig.dpr:_==="xMax"&&(j<E&&C==="meet"||j>E&&C==="slice")?this.transformCanvas.tx=(i-this.transformCanvas.w*(o/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,T==="YMid"&&(j>E&&C==="meet"||j<E&&C==="slice")?this.transformCanvas.ty=(o-this.transformCanvas.h*(i/this.transformCanvas.w))/2*this.renderConfig.dpr:T==="YMax"&&(j>E&&C==="meet"||j<E&&C==="slice")?this.transformCanvas.ty=(o-this.transformCanvas.h*(i/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=o/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var s,a=this.layers?this.layers.length:0;for(s=a-1;s>=0;s-=1)this.elements[s]&&this.elements[s].destroy&&this.elements[s].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(s,a){if(!(this.renderedFrame===s&&this.renderConfig.clearCanvas===!0&&!a||this.destroyed||s===-1)){this.renderedFrame=s,this.globalData.frameNum=s-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||a,this.globalData.projectInterface.currentFrame=s;var i,o=this.layers.length;for(this.completeLayers||this.checkLayers(s),i=o-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(s-this.layers[i].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=o-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(s){var a=this.elements;if(!(a[s]||this.layers[s].ty===99)){var i=this.createItem(this.layers[s],this,this.globalData);a[s]=i,i.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var s=this.pendingElements.pop();s.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var s,a=15;for(s=0;s<a;s+=1){var i=new CanvasContext;this.stack[s]=i}this._length=a,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var s=this._length*2,a=0;for(a=this._length;a<s;a+=1)this.stack[a]=new CanvasContext;this._length=s},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(s){this.cArrPos-=1;var a=this.stack[this.cArrPos],i=a.transform,o,E=this.cTr.props;for(o=0;o<16;o+=1)E[o]=i[o];if(s){this.nativeContext.restore();var j=this.stack[this.cArrPos+1];this.appliedFillStyle=j.fillStyle,this.appliedStrokeStyle=j.strokeStyle,this.appliedLineWidth=j.lineWidth,this.appliedLineCap=j.lineCap,this.appliedLineJoin=j.lineJoin,this.appliedMiterLimit=j.miterLimit}this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),(s||a.opacity!==-1&&this.currentOpacity!==a.opacity)&&(this.nativeContext.globalAlpha=a.opacity,this.currentOpacity=a.opacity),this.currentFillStyle=a.fillStyle,this.currentStrokeStyle=a.strokeStyle,this.currentLineWidth=a.lineWidth,this.currentLineCap=a.lineCap,this.currentLineJoin=a.lineJoin,this.currentMiterLimit=a.miterLimit},CVContextData.prototype.save=function(s){s&&this.nativeContext.save();var a=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var i=this.stack[this.cArrPos],o;for(o=0;o<16;o+=1)i.transform[o]=a[o];this.cArrPos+=1;var E=this.stack[this.cArrPos];E.opacity=i.opacity,E.fillStyle=i.fillStyle,E.strokeStyle=i.strokeStyle,E.lineWidth=i.lineWidth,E.lineCap=i.lineCap,E.lineJoin=i.lineJoin,E.miterLimit=i.miterLimit},CVContextData.prototype.setOpacity=function(s){this.stack[this.cArrPos].opacity=s},CVContextData.prototype.setContext=function(s){this.nativeContext=s},CVContextData.prototype.fillStyle=function(s){this.stack[this.cArrPos].fillStyle!==s&&(this.currentFillStyle=s,this.stack[this.cArrPos].fillStyle=s)},CVContextData.prototype.strokeStyle=function(s){this.stack[this.cArrPos].strokeStyle!==s&&(this.currentStrokeStyle=s,this.stack[this.cArrPos].strokeStyle=s)},CVContextData.prototype.lineWidth=function(s){this.stack[this.cArrPos].lineWidth!==s&&(this.currentLineWidth=s,this.stack[this.cArrPos].lineWidth=s)},CVContextData.prototype.lineCap=function(s){this.stack[this.cArrPos].lineCap!==s&&(this.currentLineCap=s,this.stack[this.cArrPos].lineCap=s)},CVContextData.prototype.lineJoin=function(s){this.stack[this.cArrPos].lineJoin!==s&&(this.currentLineJoin=s,this.stack[this.cArrPos].lineJoin=s)},CVContextData.prototype.miterLimit=function(s){this.stack[this.cArrPos].miterLimit!==s&&(this.currentMiterLimit=s,this.stack[this.cArrPos].miterLimit=s)},CVContextData.prototype.transform=function(s){this.transformMat.cloneFromProps(s);var a=this.cTr;this.transformMat.multiply(a),a.cloneFromProps(this.transformMat.props);var i=a.props;this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])},CVContextData.prototype.opacity=function(s){var a=this.stack[this.cArrPos].opacity;a*=s<0?0:s,this.stack[this.cArrPos].opacity!==a&&(this.currentOpacity!==s&&(this.nativeContext.globalAlpha=s,this.currentOpacity=s),this.stack[this.cArrPos].opacity=a)},CVContextData.prototype.fill=function(s){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(s)},CVContextData.prototype.fillRect=function(s,a,i,o){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(s,a,i,o)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(s,a,i){this.completeLayers=!1,this.layers=s.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(s,a,i),this.tm=s.tm?PropertyFactory.getProp(this,s.tm,0,a.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var s=this.canvasContext;s.beginPath(),s.moveTo(0,0),s.lineTo(this.data.w,0),s.lineTo(this.data.w,this.data.h),s.lineTo(0,this.data.h),s.lineTo(0,0),s.clip();var a,i=this.layers.length;for(a=i-1;a>=0;a-=1)(this.completeLayers||this.elements[a])&&this.elements[a].renderFrame()},CVCompElement.prototype.destroy=function(){var s,a=this.layers.length;for(s=a-1;s>=0;s-=1)this.elements[s]&&this.elements[s].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(s){return new CVCompElement(s,this.globalData,this)};function CanvasRenderer(s,a){this.animationItem=s,this.renderConfig={clearCanvas:a&&a.clearCanvas!==void 0?a.clearCanvas:!0,context:a&&a.context||null,progressiveLoad:a&&a.progressiveLoad||!1,preserveAspectRatio:a&&a.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:a&&a.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:a&&a.contentVisibility||"visible",className:a&&a.className||"",id:a&&a.id||"",runExpressions:!a||a.runExpressions===void 0||a.runExpressions},this.renderConfig.dpr=a&&a.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=a&&a.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(s){return new CVCompElement(s,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var a=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var i=this.finalTransform.mat.toCSS();a.transform=i,a.webkitTransform=i}this.finalTransform._opMdf&&(a.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(s,a,i){this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var s;this.data.hasMask?(s=createNS("rect"),s.setAttribute("width",this.data.sw),s.setAttribute("height",this.data.sh),s.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(s=createTag("div"),s.style.width=this.data.sw+"px",s.style.height=this.data.sh+"px",s.style.backgroundColor=this.data.sc),this.layerElement.appendChild(s)};function HShapeElement(s,a,i){this.shapes=[],this.shapesData=s.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(s,a,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var s;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),s=this.svgElement;else{s=createNS("svg");var a=this.comp.data?this.comp.data:this.globalData.compSize;s.setAttribute("width",a.w),s.setAttribute("height",a.h),s.appendChild(this.shapesContainer),this.layerElement.appendChild(s)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=s},HShapeElement.prototype.getTransformedPoint=function(s,a){var i,o=s.length;for(i=0;i<o;i+=1)a=s[i].mProps.v.applyToPointArray(a[0],a[1],0);return a},HShapeElement.prototype.calculateShapeBoundingBox=function(s,a){var i=s.sh.v,o=s.transformers,E,j=i._length,R,C,S,_;if(!(j<=1)){for(E=0;E<j-1;E+=1)R=this.getTransformedPoint(o,i.v[E]),C=this.getTransformedPoint(o,i.o[E]),S=this.getTransformedPoint(o,i.i[E+1]),_=this.getTransformedPoint(o,i.v[E+1]),this.checkBounds(R,C,S,_,a);i.c&&(R=this.getTransformedPoint(o,i.v[E]),C=this.getTransformedPoint(o,i.o[E]),S=this.getTransformedPoint(o,i.i[0]),_=this.getTransformedPoint(o,i.v[0]),this.checkBounds(R,C,S,_,a))}},HShapeElement.prototype.checkBounds=function(s,a,i,o,E){this.getBoundsOfCurve(s,a,i,o);var j=this.shapeBoundingBox;E.x=bmMin(j.left,E.x),E.xMax=bmMax(j.right,E.xMax),E.y=bmMin(j.top,E.y),E.yMax=bmMax(j.bottom,E.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(s,a,i,o){for(var E=[[s[0],o[0]],[s[1],o[1]]],j,R,C,S,_,T,P,N=0;N<2;++N)R=6*s[N]-12*a[N]+6*i[N],j=-3*s[N]+9*a[N]-9*i[N]+3*o[N],C=3*a[N]-3*s[N],R|=0,j|=0,C|=0,j===0&&R===0||(j===0?(S=-C/R,S>0&&S<1&&E[N].push(this.calculateF(S,s,a,i,o,N))):(_=R*R-4*C*j,_>=0&&(T=(-R+bmSqrt(_))/(2*j),T>0&&T<1&&E[N].push(this.calculateF(T,s,a,i,o,N)),P=(-R-bmSqrt(_))/(2*j),P>0&&P<1&&E[N].push(this.calculateF(P,s,a,i,o,N)))));this.shapeBoundingBox.left=bmMin.apply(null,E[0]),this.shapeBoundingBox.top=bmMin.apply(null,E[1]),this.shapeBoundingBox.right=bmMax.apply(null,E[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,E[1])},HShapeElement.prototype.calculateF=function(s,a,i,o,E,j){return bmPow(1-s,3)*a[j]+3*bmPow(1-s,2)*s*i[j]+3*(1-s)*bmPow(s,2)*o[j]+bmPow(s,3)*E[j]},HShapeElement.prototype.calculateBoundingBox=function(s,a){var i,o=s.length;for(i=0;i<o;i+=1)s[i]&&s[i].sh?this.calculateShapeBoundingBox(s[i],a):s[i]&&s[i].it?this.calculateBoundingBox(s[i].it,a):s[i]&&s[i].style&&s[i].w&&this.expandStrokeBoundingBox(s[i].w,a)},HShapeElement.prototype.expandStrokeBoundingBox=function(s,a){var i=0;if(s.keyframes){for(var o=0;o<s.keyframes.length;o+=1){var E=s.keyframes[o].s;E>i&&(i=E)}i*=s.mult}else i=s.v*s.mult;a.x-=i,a.xMax+=i,a.y-=i,a.yMax+=i},HShapeElement.prototype.currentBoxContains=function(s){return this.currentBBox.x<=s.x&&this.currentBBox.y<=s.y&&this.currentBBox.width+this.currentBBox.x>=s.x+s.width&&this.currentBBox.height+this.currentBBox.y>=s.y+s.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var s=this.tempBoundingBox,a=999999;if(s.x=a,s.xMax=-a,s.y=a,s.yMax=-a,this.calculateBoundingBox(this.itemsData,s),s.width=s.xMax<s.x?0:s.xMax-s.x,s.height=s.yMax<s.y?0:s.yMax-s.y,this.currentBoxContains(s))return;var i=!1;if(this.currentBBox.w!==s.width&&(this.currentBBox.w=s.width,this.shapeCont.setAttribute("width",s.width),i=!0),this.currentBBox.h!==s.height&&(this.currentBBox.h=s.height,this.shapeCont.setAttribute("height",s.height),i=!0),i||this.currentBBox.x!==s.x||this.currentBBox.y!==s.y){this.currentBBox.w=s.width,this.currentBBox.h=s.height,this.currentBBox.x=s.x,this.currentBBox.y=s.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var o=this.shapeCont.style,E="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";o.transform=E,o.webkitTransform=E}}};function HTextElement(s,a,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var s=createNS("g");this.maskedElement.appendChild(s),this.innerElem=s}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var s=this.textProperty.currentData;this.renderedLetters=createSizedArray(s.l?s.l.length:0);var a=this.innerElem.style,i=s.fc?this.buildColor(s.fc):"rgba(0,0,0,0)";a.fill=i,a.color=i,s.sc&&(a.stroke=this.buildColor(s.sc),a.strokeWidth=s.sw+"px");var o=this.globalData.fontManager.getFontByName(s.f);if(!this.globalData.fontManager.chars)if(a.fontSize=s.finalSize+"px",a.lineHeight=s.finalSize+"px",o.fClass)this.innerElem.className=o.fClass;else{a.fontFamily=o.fFamily;var E=s.fWeight,j=s.fStyle;a.fontStyle=j,a.fontWeight=E}var R,C,S=s.l;C=S.length;var _,T,P,N=this.mHelper,I,M="",D=0;for(R=0;R<C;R+=1){if(this.globalData.fontManager.chars?(this.textPaths[D]?_=this.textPaths[D]:(_=createNS("path"),_.setAttribute("stroke-linecap",lineCapEnum[1]),_.setAttribute("stroke-linejoin",lineJoinEnum[2]),_.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[D]?(T=this.textSpans[D],P=T.children[0]):(T=createTag("div"),T.style.lineHeight=0,P=createNS("svg"),P.appendChild(_),styleDiv(T)))):this.isMasked?_=this.textPaths[D]?this.textPaths[D]:createNS("text"):this.textSpans[D]?(T=this.textSpans[D],_=this.textPaths[D]):(T=createTag("span"),styleDiv(T),_=createTag("span"),styleDiv(_),T.appendChild(_)),this.globalData.fontManager.chars){var B=this.globalData.fontManager.getCharData(s.finalText[R],o.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily),F;if(B?F=B.data:F=null,N.reset(),F&&F.shapes&&F.shapes.length&&(I=F.shapes[0].it,N.scale(s.finalSize/100,s.finalSize/100),M=this.createPathShape(N,I),_.setAttribute("d",M)),this.isMasked)this.innerElem.appendChild(_);else{if(this.innerElem.appendChild(T),F&&F.shapes){document.body.appendChild(P);var O=P.getBBox();P.setAttribute("width",O.width+2),P.setAttribute("height",O.height+2),P.setAttribute("viewBox",O.x-1+" "+(O.y-1)+" "+(O.width+2)+" "+(O.height+2));var L=P.style,$="translate("+(O.x-1)+"px,"+(O.y-1)+"px)";L.transform=$,L.webkitTransform=$,S[R].yOffset=O.y-1}else P.setAttribute("width",1),P.setAttribute("height",1);T.appendChild(P)}}else if(_.textContent=S[R].val,_.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(_);else{this.innerElem.appendChild(T);var V=_.style,G="translate3d(0,"+-s.finalSize/1.2+"px,0)";V.transform=G,V.webkitTransform=G}this.isMasked?this.textSpans[D]=_:this.textSpans[D]=T,this.textSpans[D].style.display="block",this.textPaths[D]=_,D+=1}for(;D<this.textSpans.length;)this.textSpans[D].style.display="none",D+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var s;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),s=this.svgElement.style;var a="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";s.transform=a,s.webkitTransform=a}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var i,o,E=0,j=this.textAnimator.renderedLetters,R=this.textProperty.currentData.l;o=R.length;var C,S,_;for(i=0;i<o;i+=1)R[i].n?E+=1:(S=this.textSpans[i],_=this.textPaths[i],C=j[E],E+=1,C._mdf.m&&(this.isMasked?S.setAttribute("transform",C.m):(S.style.webkitTransform=C.m,S.style.transform=C.m)),S.style.opacity=C.o,C.sw&&C._mdf.sw&&_.setAttribute("stroke-width",C.sw),C.sc&&C._mdf.sc&&_.setAttribute("stroke",C.sc),C.fc&&C._mdf.fc&&(_.setAttribute("fill",C.fc),_.style.color=C.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var T=this.innerElem.getBBox();this.currentBBox.w!==T.width&&(this.currentBBox.w=T.width,this.svgElement.setAttribute("width",T.width)),this.currentBBox.h!==T.height&&(this.currentBBox.h=T.height,this.svgElement.setAttribute("height",T.height));var P=1;if(this.currentBBox.w!==T.width+P*2||this.currentBBox.h!==T.height+P*2||this.currentBBox.x!==T.x-P||this.currentBBox.y!==T.y-P){this.currentBBox.w=T.width+P*2,this.currentBBox.h=T.height+P*2,this.currentBBox.x=T.x-P,this.currentBBox.y=T.y-P,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),s=this.svgElement.style;var N="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";s.transform=N,s.webkitTransform=N}}}};function HCameraElement(s,a,i){this.initFrame(),this.initBaseData(s,a,i),this.initHierarchy();var o=PropertyFactory.getProp;if(this.pe=o(this,s.pe,0,0,this),s.ks.p.s?(this.px=o(this,s.ks.p.x,1,0,this),this.py=o(this,s.ks.p.y,1,0,this),this.pz=o(this,s.ks.p.z,1,0,this)):this.p=o(this,s.ks.p,1,0,this),s.ks.a&&(this.a=o(this,s.ks.a,1,0,this)),s.ks.or.k.length&&s.ks.or.k[0].to){var E,j=s.ks.or.k.length;for(E=0;E<j;E+=1)s.ks.or.k[E].to=null,s.ks.or.k[E].ti=null}this.or=o(this,s.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=o(this,s.ks.rx,0,degToRads,this),this.ry=o(this,s.ks.ry,0,degToRads,this),this.rz=o(this,s.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var s,a=this.comp.threeDElements.length,i,o,E;for(s=0;s<a;s+=1)if(i=this.comp.threeDElements[s],i.type==="3d"){o=i.perspectiveElem.style,E=i.container.style;var j=this.pe.v+"px",R="0px 0px 0px",C="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";o.perspective=j,o.webkitPerspective=j,E.transformOrigin=R,E.mozTransformOrigin=R,E.webkitTransformOrigin=R,o.transform=C,o.webkitTransform=C}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var s=this._isFirstFrame,a,i;if(this.hierarchy)for(i=this.hierarchy.length,a=0;a<i;a+=1)s=this.hierarchy[a].finalTransform.mProp._mdf||s;if(s||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(i=this.hierarchy.length-1,a=i;a>=0;a-=1){var o=this.hierarchy[a].finalTransform.mProp;this.mat.translate(-o.p.v[0],-o.p.v[1],o.p.v[2]),this.mat.rotateX(-o.or.v[0]).rotateY(-o.or.v[1]).rotateZ(o.or.v[2]),this.mat.rotateX(-o.rx.v).rotateY(-o.ry.v).rotateZ(o.rz.v),this.mat.scale(1/o.s.v[0],1/o.s.v[1],1/o.s.v[2]),this.mat.translate(o.a.v[0],o.a.v[1],o.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var E;this.p?E=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:E=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var j=Math.sqrt(Math.pow(E[0],2)+Math.pow(E[1],2)+Math.pow(E[2],2)),R=[E[0]/j,E[1]/j,E[2]/j],C=Math.sqrt(R[2]*R[2]+R[0]*R[0]),S=Math.atan2(R[1],C),_=Math.atan2(R[0],-R[2]);this.mat.rotateY(_).rotateX(-S)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var T=!this._prevMat.equals(this.mat);if((T||this.pe._mdf)&&this.comp.threeDElements){i=this.comp.threeDElements.length;var P,N,I;for(a=0;a<i;a+=1)if(P=this.comp.threeDElements[a],P.type==="3d"){if(T){var M=this.mat.toCSS();I=P.container.style,I.transform=M,I.webkitTransform=M}this.pe._mdf&&(N=P.perspectiveElem.style,N.perspective=this.pe.v+"px",N.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(s){this.prepareProperties(s,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(s,a,i){this.assetData=a.getAssetData(s.refId),this.initElement(s,a,i)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var s=this.globalData.getAssetsPath(this.assetData),a=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",s),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(a),a.crossOrigin="anonymous",a.src=s,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(s,a){this.animationItem=s,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:a&&a.className||"",imagePreserveAspectRatio:a&&a.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(a&&a.hideOnTransparent===!1),filterSize:{width:a&&a.filterSize&&a.filterSize.width||"400%",height:a&&a.filterSize&&a.filterSize.height||"400%",x:a&&a.filterSize&&a.filterSize.x||"-100%",y:a&&a.filterSize&&a.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var s=this.pendingElements.pop();s.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(s,a){var i=s.getBaseElement();if(i){var o=this.layers[a];if(!o.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(i,a);else{for(var E=0,j,R,C;E<a;)this.elements[E]&&this.elements[E]!==!0&&this.elements[E].getBaseElement&&(R=this.elements[E],C=this.layers[E].ddd?this.getThreeDContainerByPos(E):R.getBaseElement(),j=C||j),E+=1;j?(!o.ddd||!this.supports3d)&&this.layerElement.insertBefore(i,j):(!o.ddd||!this.supports3d)&&this.layerElement.appendChild(i)}else this.addTo3dContainer(i,a)}},HybridRendererBase.prototype.createShape=function(s){return this.supports3d?new HShapeElement(s,this.globalData,this):new SVGShapeElement(s,this.globalData,this)},HybridRendererBase.prototype.createText=function(s){return this.supports3d?new HTextElement(s,this.globalData,this):new SVGTextLottieElement(s,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(s){return this.camera=new HCameraElement(s,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(s){return this.supports3d?new HImageElement(s,this.globalData,this):new IImageElement(s,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(s){return this.supports3d?new HSolidElement(s,this.globalData,this):new ISolidElement(s,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(s){for(var a=0,i=this.threeDElements.length;a<i;){if(this.threeDElements[a].startPos<=s&&this.threeDElements[a].endPos>=s)return this.threeDElements[a].perspectiveElem;a+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(s,a){var i=createTag("div"),o,E;styleDiv(i);var j=createTag("div");if(styleDiv(j),a==="3d"){o=i.style,o.width=this.globalData.compSize.w+"px",o.height=this.globalData.compSize.h+"px";var R="50% 50%";o.webkitTransformOrigin=R,o.mozTransformOrigin=R,o.transformOrigin=R,E=j.style;var C="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";E.transform=C,E.webkitTransform=C}i.appendChild(j);var S={container:j,perspectiveElem:i,startPos:s,endPos:s,type:a};return this.threeDElements.push(S),S},HybridRendererBase.prototype.build3dContainers=function(){var s,a=this.layers.length,i,o="";for(s=0;s<a;s+=1)this.layers[s].ddd&&this.layers[s].ty!==3?(o!=="3d"&&(o="3d",i=this.createThreeDContainer(s,"3d")),i.endPos=Math.max(i.endPos,s)):(o!=="2d"&&(o="2d",i=this.createThreeDContainer(s,"2d")),i.endPos=Math.max(i.endPos,s));for(a=this.threeDElements.length,s=a-1;s>=0;s-=1)this.resizerElem.appendChild(this.threeDElements[s].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(s,a){for(var i=0,o=this.threeDElements.length;i<o;){if(a<=this.threeDElements[i].endPos){for(var E=this.threeDElements[i].startPos,j;E<a;)this.elements[E]&&this.elements[E].getBaseElement&&(j=this.elements[E].getBaseElement()),E+=1;j?this.threeDElements[i].container.insertBefore(s,j):this.threeDElements[i].container.appendChild(s);break}i+=1}},HybridRendererBase.prototype.configAnimation=function(s){var a=createTag("div"),i=this.animationItem.wrapper,o=a.style;o.width=s.w+"px",o.height=s.h+"px",this.resizerElem=a,styleDiv(a),o.transformStyle="flat",o.mozTransformStyle="flat",o.webkitTransformStyle="flat",this.renderConfig.className&&a.setAttribute("class",this.renderConfig.className),i.appendChild(a),o.overflow="hidden";var E=createNS("svg");E.setAttribute("width","1"),E.setAttribute("height","1"),styleDiv(E),this.resizerElem.appendChild(E);var j=createNS("defs");E.appendChild(j),this.data=s,this.setupGlobalData(s,E),this.globalData.defs=j,this.layers=s.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var s,a=this.layers?this.layers.length:0;for(s=0;s<a;s+=1)this.elements[s]&&this.elements[s].destroy&&this.elements[s].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var s=this.animationItem.wrapper.offsetWidth,a=this.animationItem.wrapper.offsetHeight,i=s/a,o=this.globalData.compSize.w/this.globalData.compSize.h,E,j,R,C;o>i?(E=s/this.globalData.compSize.w,j=s/this.globalData.compSize.w,R=0,C=(a-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(E=a/this.globalData.compSize.h,j=a/this.globalData.compSize.h,R=(s-this.globalData.compSize.w*(a/this.globalData.compSize.h))/2,C=0);var S=this.resizerElem.style;S.webkitTransform="matrix3d("+E+",0,0,0,0,"+j+",0,0,0,0,1,0,"+R+","+C+",0,1)",S.transform=S.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var s=this.globalData.compSize.w,a=this.globalData.compSize.h,i,o=this.threeDElements.length;for(i=0;i<o;i+=1){var E=this.threeDElements[i].perspectiveElem.style;E.webkitPerspective=Math.sqrt(Math.pow(s,2)+Math.pow(a,2))+"px",E.perspective=E.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(s){var a,i=s.length,o=createTag("div");for(a=0;a<i;a+=1)if(s[a].xt){var E=this.createComp(s[a],o,this.globalData.comp,null);E.initExpressions(),this.globalData.projectInterface.registerComposition(E)}};function HCompElement(s,a,i){this.layers=s.layers,this.supports3d=!s.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(s,a,i),this.tm=s.tm?PropertyFactory.getProp(this,s.tm,0,a.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(s,a){for(var i=0,o;i<a;)this.elements[i]&&this.elements[i].getBaseElement&&(o=this.elements[i].getBaseElement()),i+=1;o?this.layerElement.insertBefore(s,o):this.layerElement.appendChild(s)},HCompElement.prototype.createComp=function(s){return this.supports3d?new HCompElement(s,this.globalData,this):new SVGCompElement(s,this.globalData,this)};function HybridRenderer(s,a){this.animationItem=s,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:a&&a.className||"",imagePreserveAspectRatio:a&&a.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(a&&a.hideOnTransparent===!1),filterSize:{width:a&&a.filterSize&&a.filterSize.width||"400%",height:a&&a.filterSize&&a.filterSize.height||"400%",x:a&&a.filterSize&&a.filterSize.x||"-100%",y:a&&a.filterSize&&a.filterSize.y||"-100%"},runExpressions:!a||a.runExpressions===void 0||a.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(s){return this.supports3d?new HCompElement(s,this.globalData,this):new SVGCompElement(s,this.globalData,this)};var CompExpressionInterface=function(){return function(s){function a(i){for(var o=0,E=s.layers.length;o<E;){if(s.layers[o].nm===i||s.layers[o].ind===i)return s.elements[o].layerInterface;o+=1}return null}return Object.defineProperty(a,"_name",{value:s.data.nm}),a.layer=a,a.pixelAspect=1,a.height=s.data.h||s.globalData.compSize.h,a.width=s.data.w||s.globalData.compSize.w,a.pixelAspect=1,a.frameDuration=1/s.globalData.frameRate,a.displayStartTime=0,a.numLayers=s.layers.length,a}}();function _typeof$2(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(i){return typeof i}:_typeof$2=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$2(s)}function seedRandom(s,a){var i=this,o=256,E=6,j=52,R="random",C=a.pow(o,E),S=a.pow(2,j),_=S*2,T=o-1,P;function N(L,$,V){var G=[];$=$===!0?{entropy:!0}:$||{};var K=B(D($.entropy?[L,O(s)]:L===null?F():L,3),G),J=new I(G),ne=function(){for(var ue=J.g(E),ce=C,pe=0;ue<S;)ue=(ue+pe)*o,ce*=o,pe=J.g(1);for(;ue>=_;)ue/=2,ce/=2,pe>>>=1;return(ue+pe)/ce};return ne.int32=function(){return J.g(4)|0},ne.quick=function(){return J.g(4)/4294967296},ne.double=ne,B(O(J.S),s),($.pass||V||function(le,ue,ce,pe){return pe&&(pe.S&&M(pe,J),le.state=function(){return M(J,{})}),ce?(a[R]=le,ue):le})(ne,K,"global"in $?$.global:this==a,$.state)}a["seed"+R]=N;function I(L){var $,V=L.length,G=this,K=0,J=G.i=G.j=0,ne=G.S=[];for(V||(L=[V++]);K<o;)ne[K]=K++;for(K=0;K<o;K++)ne[K]=ne[J=T&J+L[K%V]+($=ne[K])],ne[J]=$;G.g=function(le){for(var ue,ce=0,pe=G.i,xe=G.j,oe=G.S;le--;)ue=oe[pe=T&pe+1],ce=ce*o+oe[T&(oe[pe]=oe[xe=T&xe+ue])+(oe[xe]=ue)];return G.i=pe,G.j=xe,ce}}function M(L,$){return $.i=L.i,$.j=L.j,$.S=L.S.slice(),$}function D(L,$){var V=[],G=_typeof$2(L),K;if($&&G=="object")for(K in L)try{V.push(D(L[K],$-1))}catch{}return V.length?V:G=="string"?L:L+"\0"}function B(L,$){for(var V=L+"",G,K=0;K<V.length;)$[T&K]=T&(G^=$[T&K]*19)+V.charCodeAt(K++);return O($)}function F(){try{var L=new Uint8Array(o);return(i.crypto||i.msCrypto).getRandomValues(L),O(L)}catch{var $=i.navigator,V=$&&$.plugins;return[+new Date,i,V,i.screen,O(s)]}}function O(L){return String.fromCharCode.apply(0,L)}B(a.random(),s)}function initialize$2(s){seedRandom([],s)}var propTypes={SHAPE:"shape"};function _typeof$1(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(i){return typeof i}:_typeof$1=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof$1(s)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(s){return s.constructor===Array||s.constructor===Float32Array}function isNumerable(s,a){return s==="number"||a instanceof Number||s==="boolean"||s==="string"}function $bm_neg(s){var a=_typeof$1(s);if(a==="number"||s instanceof Number||a==="boolean")return-s;if($bm_isInstanceOfArray(s)){var i,o=s.length,E=[];for(i=0;i<o;i+=1)E[i]=-s[i];return E}return s.propType?s.v:-s}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(s,a){var i=_typeof$1(s),o=_typeof$1(a);if(isNumerable(i,s)&&isNumerable(o,a)||i==="string"||o==="string")return s+a;if($bm_isInstanceOfArray(s)&&isNumerable(o,a))return s=s.slice(0),s[0]+=a,s;if(isNumerable(i,s)&&$bm_isInstanceOfArray(a))return a=a.slice(0),a[0]=s+a[0],a;if($bm_isInstanceOfArray(s)&&$bm_isInstanceOfArray(a)){for(var E=0,j=s.length,R=a.length,C=[];E<j||E<R;)(typeof s[E]=="number"||s[E]instanceof Number)&&(typeof a[E]=="number"||a[E]instanceof Number)?C[E]=s[E]+a[E]:C[E]=a[E]===void 0?s[E]:s[E]||a[E],E+=1;return C}return 0}var add=sum;function sub(s,a){var i=_typeof$1(s),o=_typeof$1(a);if(isNumerable(i,s)&&isNumerable(o,a))return i==="string"&&(s=parseInt(s,10)),o==="string"&&(a=parseInt(a,10)),s-a;if($bm_isInstanceOfArray(s)&&isNumerable(o,a))return s=s.slice(0),s[0]-=a,s;if(isNumerable(i,s)&&$bm_isInstanceOfArray(a))return a=a.slice(0),a[0]=s-a[0],a;if($bm_isInstanceOfArray(s)&&$bm_isInstanceOfArray(a)){for(var E=0,j=s.length,R=a.length,C=[];E<j||E<R;)(typeof s[E]=="number"||s[E]instanceof Number)&&(typeof a[E]=="number"||a[E]instanceof Number)?C[E]=s[E]-a[E]:C[E]=a[E]===void 0?s[E]:s[E]||a[E],E+=1;return C}return 0}function mul(s,a){var i=_typeof$1(s),o=_typeof$1(a),E;if(isNumerable(i,s)&&isNumerable(o,a))return s*a;var j,R;if($bm_isInstanceOfArray(s)&&isNumerable(o,a)){for(R=s.length,E=createTypedArray("float32",R),j=0;j<R;j+=1)E[j]=s[j]*a;return E}if(isNumerable(i,s)&&$bm_isInstanceOfArray(a)){for(R=a.length,E=createTypedArray("float32",R),j=0;j<R;j+=1)E[j]=s*a[j];return E}return 0}function div(s,a){var i=_typeof$1(s),o=_typeof$1(a),E;if(isNumerable(i,s)&&isNumerable(o,a))return s/a;var j,R;if($bm_isInstanceOfArray(s)&&isNumerable(o,a)){for(R=s.length,E=createTypedArray("float32",R),j=0;j<R;j+=1)E[j]=s[j]/a;return E}if(isNumerable(i,s)&&$bm_isInstanceOfArray(a)){for(R=a.length,E=createTypedArray("float32",R),j=0;j<R;j+=1)E[j]=s/a[j];return E}return 0}function mod(s,a){return typeof s=="string"&&(s=parseInt(s,10)),typeof a=="string"&&(a=parseInt(a,10)),s%a}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(s,a,i){if(a>i){var o=i;i=a,a=o}return Math.min(Math.max(s,a),i)}function radiansToDegrees(s){return s/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(s){return s*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(s,a){if(typeof s=="number"||s instanceof Number)return a=a||0,Math.abs(s-a);a||(a=helperLengthArray);var i,o=Math.min(s.length,a.length),E=0;for(i=0;i<o;i+=1)E+=Math.pow(a[i]-s[i],2);return Math.sqrt(E)}function normalize(s){return div(s,length(s))}function rgbToHsl(s){var a=s[0],i=s[1],o=s[2],E=Math.max(a,i,o),j=Math.min(a,i,o),R,C,S=(E+j)/2;if(E===j)R=0,C=0;else{var _=E-j;switch(C=S>.5?_/(2-E-j):_/(E+j),E){case a:R=(i-o)/_+(i<o?6:0);break;case i:R=(o-a)/_+2;break;case o:R=(a-i)/_+4;break}R/=6}return[R,C,S,s[3]]}function hue2rgb(s,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?s+(a-s)*6*i:i<1/2?a:i<2/3?s+(a-s)*(2/3-i)*6:s}function hslToRgb(s){var a=s[0],i=s[1],o=s[2],E,j,R;if(i===0)E=o,R=o,j=o;else{var C=o<.5?o*(1+i):o+i-o*i,S=2*o-C;E=hue2rgb(S,C,a+1/3),j=hue2rgb(S,C,a),R=hue2rgb(S,C,a-1/3)}return[E,j,R,s[3]]}function linear(s,a,i,o,E){if((o===void 0||E===void 0)&&(o=a,E=i,a=0,i=1),i<a){var j=i;i=a,a=j}if(s<=a)return o;if(s>=i)return E;var R=i===a?0:(s-a)/(i-a);if(!o.length)return o+(E-o)*R;var C,S=o.length,_=createTypedArray("float32",S);for(C=0;C<S;C+=1)_[C]=o[C]+(E[C]-o[C])*R;return _}function random(s,a){if(a===void 0&&(s===void 0?(s=0,a=1):(a=s,s=void 0)),a.length){var i,o=a.length;s||(s=createTypedArray("float32",o));var E=createTypedArray("float32",o),j=BMMath.random();for(i=0;i<o;i+=1)E[i]=s[i]+j*(a[i]-s[i]);return E}s===void 0&&(s=0);var R=BMMath.random();return s+R*(a-s)}function createPath(s,a,i,o){var E,j=s.length,R=shapePool.newElement();R.setPathData(!!o,j);var C=[0,0],S,_;for(E=0;E<j;E+=1)S=a&&a[E]?a[E]:C,_=i&&i[E]?i[E]:C,R.setTripleAt(s[E][0],s[E][1],_[0]+s[E][0],_[1]+s[E][1],S[0]+s[E][0],S[1]+s[E][1],E,!0);return R}function initiateExpression(elem,data,property){function noOp(s){return s}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function s(a,i){var o,E,j=this.pv.length?this.pv.length:1,R=createTypedArray("float32",j);a=5;var C=Math.floor(time*a);for(o=0,E=0;o<C;){for(E=0;E<j;E+=1)R[E]+=-i+i*2*BMMath.random();o+=1}var S=time*a,_=S-Math.floor(S),T=createTypedArray("float32",j);if(j>1){for(E=0;E<j;E+=1)T[E]=this.pv[E]+R[E]+(-i+i*2*BMMath.random())*_;return T}return this.pv+R[0]+(-i+i*2*BMMath.random())*_}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(s,a){return loopIn(s,a,!0)}function loopOutDuration(s,a){return loopOut(s,a,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(s,a){var i=[a[0]-s[0],a[1]-s[1],a[2]-s[2]],o=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads,E=-Math.atan2(i[1],i[2])/degToRads;return[E,o,0]}function easeOut(s,a,i,o,E){return applyEase(easeOutBez,s,a,i,o,E)}function easeIn(s,a,i,o,E){return applyEase(easeInBez,s,a,i,o,E)}function ease(s,a,i,o,E){return applyEase(easeInOutBez,s,a,i,o,E)}function applyEase(s,a,i,o,E,j){E===void 0?(E=i,j=o):a=(a-i)/(o-i),a>1?a=1:a<0&&(a=0);var R=s(a);if($bm_isInstanceOfArray(E)){var C,S=E.length,_=createTypedArray("float32",S);for(C=0;C<S;C+=1)_[C]=(j[C]-E[C])*R+E[C];return _}return(j-E)*R+E}function nearestKey(s){var a,i=data.k.length,o,E;if(!data.k.length||typeof data.k[0]=="number")o=0,E=0;else if(o=-1,s*=elem.comp.globalData.frameRate,s<data.k[0].t)o=1,E=data.k[0].t;else{for(a=0;a<i-1;a+=1)if(s===data.k[a].t){o=a+1,E=data.k[a].t;break}else if(s>data.k[a].t&&s<data.k[a+1].t){s-data.k[a].t>data.k[a+1].t-s?(o=a+2,E=data.k[a+1].t):(o=a+1,E=data.k[a].t);break}o===-1&&(o=a+1,E=data.k[a].t)}var j={};return j.index=o,j.time=E/elem.comp.globalData.frameRate,j}function key(s){var a,i,o;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+s);s-=1,a={time:data.k[s].t/elem.comp.globalData.frameRate,value:[]};var E=Object.prototype.hasOwnProperty.call(data.k[s],"s")?data.k[s].s:data.k[s-1].e;for(o=E.length,i=0;i<o;i+=1)a[i]=E[i],a.value[i]=E[i];return a}function framesToTime(s,a){return a||(a=elem.comp.globalData.frameRate),s/a}function timeToFrames(s,a){return!s&&s!==0&&(s=time),a||(a=elem.comp.globalData.frameRate),s*a}function seedRandom(s){BMMath.seedrandom(randSeed+s)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(s,a){return typeof value=="string"?a===void 0?value.substring(s):value.substring(s,a):""}function substr(s,a){return typeof value=="string"?a===void 0?value.substr(s):value.substr(s,a):""}function posterizeTime(s){time=s===0?0:Math.floor(time*s)/s,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(s){return value=s,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var s={};s.initExpressions=a,s.resetFrame=ExpressionManager.resetFrame;function a(i){var o=0,E=[];function j(){o+=1}function R(){o-=1,o===0&&S()}function C(_){E.indexOf(_)===-1&&E.push(_)}function S(){var _,T=E.length;for(_=0;_<T;_+=1)E[_].release();E.length=0}i.renderer.compInterface=CompExpressionInterface(i.renderer),i.renderer.globalData.projectInterface.registerComposition(i.renderer),i.renderer.globalData.pushExpression=j,i.renderer.globalData.popExpression=R,i.renderer.globalData.registerExpressionProperty=C}return s}(),MaskManagerInterface=function(){function s(i,o){this._mask=i,this._data=o}Object.defineProperty(s.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(s.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var a=function(o){var E=createSizedArray(o.viewData.length),j,R=o.viewData.length;for(j=0;j<R;j+=1)E[j]=new s(o.viewData[j],o.masksProperties[j]);var C=function(_){for(j=0;j<R;){if(o.masksProperties[j].nm===_)return E[j];j+=1}return null};return C};return a}(),ExpressionPropertyInterface=function(){var s={pv:0,v:0,mult:1},a={pv:[0,0,0],v:[0,0,0],mult:1};function i(R,C,S){Object.defineProperty(R,"velocity",{get:function(){return C.getVelocityAtTime(C.comp.currentFrame)}}),R.numKeys=C.keyframes?C.keyframes.length:0,R.key=function(_){if(!R.numKeys)return 0;var T="";"s"in C.keyframes[_-1]?T=C.keyframes[_-1].s:"e"in C.keyframes[_-2]?T=C.keyframes[_-2].e:T=C.keyframes[_-2].s;var P=S==="unidimensional"?new Number(T):Object.assign({},T);return P.time=C.keyframes[_-1].t/C.elem.comp.globalData.frameRate,P.value=S==="unidimensional"?T[0]:T,P},R.valueAtTime=C.getValueAtTime,R.speedAtTime=C.getSpeedAtTime,R.velocityAtTime=C.getVelocityAtTime,R.propertyGroup=C.propertyGroup}function o(R){(!R||!("pv"in R))&&(R=s);var C=1/R.mult,S=R.pv*C,_=new Number(S);return _.value=S,i(_,R,"unidimensional"),function(){return R.k&&R.getValue(),S=R.v*C,_.value!==S&&(_=new Number(S),_.value=S,i(_,R,"unidimensional")),_}}function E(R){(!R||!("pv"in R))&&(R=a);var C=1/R.mult,S=R.data&&R.data.l||R.pv.length,_=createTypedArray("float32",S),T=createTypedArray("float32",S);return _.value=T,i(_,R,"multidimensional"),function(){R.k&&R.getValue();for(var P=0;P<S;P+=1)T[P]=R.v[P]*C,_[P]=T[P];return _}}function j(){return s}return function(R){return R?R.propType==="unidimensional"?o(R):E(R):j}}(),TransformExpressionInterface=function(){return function(s){function a(R){switch(R){case"scale":case"Scale":case"ADBE Scale":case 6:return a.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return a.rotation;case"ADBE Rotate X":return a.xRotation;case"ADBE Rotate Y":return a.yRotation;case"position":case"Position":case"ADBE Position":case 2:return a.position;case"ADBE Position_0":return a.xPosition;case"ADBE Position_1":return a.yPosition;case"ADBE Position_2":return a.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return a.anchorPoint;case"opacity":case"Opacity":case 11:return a.opacity;default:return null}}Object.defineProperty(a,"rotation",{get:ExpressionPropertyInterface(s.r||s.rz)}),Object.defineProperty(a,"zRotation",{get:ExpressionPropertyInterface(s.rz||s.r)}),Object.defineProperty(a,"xRotation",{get:ExpressionPropertyInterface(s.rx)}),Object.defineProperty(a,"yRotation",{get:ExpressionPropertyInterface(s.ry)}),Object.defineProperty(a,"scale",{get:ExpressionPropertyInterface(s.s)});var i,o,E,j;return s.p?j=ExpressionPropertyInterface(s.p):(i=ExpressionPropertyInterface(s.px),o=ExpressionPropertyInterface(s.py),s.pz&&(E=ExpressionPropertyInterface(s.pz))),Object.defineProperty(a,"position",{get:function(){return s.p?j():[i(),o(),E?E():0]}}),Object.defineProperty(a,"xPosition",{get:ExpressionPropertyInterface(s.px)}),Object.defineProperty(a,"yPosition",{get:ExpressionPropertyInterface(s.py)}),Object.defineProperty(a,"zPosition",{get:ExpressionPropertyInterface(s.pz)}),Object.defineProperty(a,"anchorPoint",{get:ExpressionPropertyInterface(s.a)}),Object.defineProperty(a,"opacity",{get:ExpressionPropertyInterface(s.o)}),Object.defineProperty(a,"skew",{get:ExpressionPropertyInterface(s.sk)}),Object.defineProperty(a,"skewAxis",{get:ExpressionPropertyInterface(s.sa)}),Object.defineProperty(a,"orientation",{get:ExpressionPropertyInterface(s.or)}),a}}(),LayerExpressionInterface=function(){function s(_){var T=new Matrix;if(_!==void 0){var P=this._elem.finalTransform.mProp.getValueAtTime(_);P.clone(T)}else{var N=this._elem.finalTransform.mProp;N.applyToMatrix(T)}return T}function a(_,T){var P=this.getMatrix(T);return P.props[12]=0,P.props[13]=0,P.props[14]=0,this.applyPoint(P,_)}function i(_,T){var P=this.getMatrix(T);return this.applyPoint(P,_)}function o(_,T){var P=this.getMatrix(T);return P.props[12]=0,P.props[13]=0,P.props[14]=0,this.invertPoint(P,_)}function E(_,T){var P=this.getMatrix(T);return this.invertPoint(P,_)}function j(_,T){if(this._elem.hierarchy&&this._elem.hierarchy.length){var P,N=this._elem.hierarchy.length;for(P=0;P<N;P+=1)this._elem.hierarchy[P].finalTransform.mProp.applyToMatrix(_)}return _.applyToPointArray(T[0],T[1],T[2]||0)}function R(_,T){if(this._elem.hierarchy&&this._elem.hierarchy.length){var P,N=this._elem.hierarchy.length;for(P=0;P<N;P+=1)this._elem.hierarchy[P].finalTransform.mProp.applyToMatrix(_)}return _.inversePoint(T)}function C(_){var T=new Matrix;if(T.reset(),this._elem.finalTransform.mProp.applyToMatrix(T),this._elem.hierarchy&&this._elem.hierarchy.length){var P,N=this._elem.hierarchy.length;for(P=0;P<N;P+=1)this._elem.hierarchy[P].finalTransform.mProp.applyToMatrix(T);return T.inversePoint(_)}return T.inversePoint(_)}function S(){return[1,1,1,1]}return function(_){var T;function P(D){I.mask=new MaskManagerInterface(D,_)}function N(D){I.effect=D}function I(D){switch(D){case"ADBE Root Vectors Group":case"Contents":case 2:return I.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return T;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return I.effect;case"ADBE Text Properties":return I.textInterface;default:return null}}I.getMatrix=s,I.invertPoint=R,I.applyPoint=j,I.toWorld=i,I.toWorldVec=a,I.fromWorld=E,I.fromWorldVec=o,I.toComp=i,I.fromComp=C,I.sampleImage=S,I.sourceRectAtTime=_.sourceRectAtTime.bind(_),I._elem=_,T=TransformExpressionInterface(_.finalTransform.mProp);var M=getDescriptor(T,"anchorPoint");return Object.defineProperties(I,{hasParent:{get:function(){return _.hierarchy.length}},parent:{get:function(){return _.hierarchy[0].layerInterface}},rotation:getDescriptor(T,"rotation"),scale:getDescriptor(T,"scale"),position:getDescriptor(T,"position"),opacity:getDescriptor(T,"opacity"),anchorPoint:M,anchor_point:M,transform:{get:function(){return T}},active:{get:function(){return _.isInRange}}}),I.startTime=_.data.st,I.index=_.data.ind,I.source=_.data.refId,I.height=_.data.ty===0?_.data.h:100,I.width=_.data.ty===0?_.data.w:100,I.inPoint=_.data.ip/_.comp.globalData.frameRate,I.outPoint=_.data.op/_.comp.globalData.frameRate,I._name=_.data.nm,I.registerMaskInterface=P,I.registerEffectsInterface=N,I}}(),propertyGroupFactory=function(){return function(s,a){return function(i){return i=i===void 0?1:i,i<=0?s:a(i-1)}}}(),PropertyInterface=function(){return function(s,a){var i={_name:s};function o(E){return E=E===void 0?1:E,E<=0?i:a(E-1)}return o}}(),EffectsExpressionInterface=function(){var s={createEffectsInterface:a};function a(E,j){if(E.effectsManager){var R=[],C=E.data.ef,S,_=E.effectsManager.effectElements.length;for(S=0;S<_;S+=1)R.push(i(C[S],E.effectsManager.effectElements[S],j,E));var T=E.data.ef||[],P=function(I){for(S=0,_=T.length;S<_;){if(I===T[S].nm||I===T[S].mn||I===T[S].ix)return R[S];S+=1}return null};return Object.defineProperty(P,"numProperties",{get:function(){return T.length}}),P}return null}function i(E,j,R,C){function S(I){for(var M=E.ef,D=0,B=M.length;D<B;){if(I===M[D].nm||I===M[D].mn||I===M[D].ix)return M[D].ty===5?T[D]:T[D]();D+=1}throw new Error}var _=propertyGroupFactory(S,R),T=[],P,N=E.ef.length;for(P=0;P<N;P+=1)E.ef[P].ty===5?T.push(i(E.ef[P],j.effectElements[P],j.effectElements[P].propertyGroup,C)):T.push(o(j.effectElements[P],E.ef[P].ty,C,_));return E.mn==="ADBE Color Control"&&Object.defineProperty(S,"color",{get:function(){return T[0]()}}),Object.defineProperties(S,{numProperties:{get:function(){return E.np}},_name:{value:E.nm},propertyGroup:{value:_}}),S.enabled=E.en!==0,S.active=S.enabled,S}function o(E,j,R,C){var S=ExpressionPropertyInterface(E.p);function _(){return j===10?R.comp.compInterface(E.p.v):S()}return E.p.setGroupProperty&&E.p.setGroupProperty(PropertyInterface("",C)),_}return s}(),ShapePathInterface=function(){return function(a,i,o){var E=i.sh;function j(C){return C==="Shape"||C==="shape"||C==="Path"||C==="path"||C==="ADBE Vector Shape"||C===2?j.path:null}var R=propertyGroupFactory(j,o);return E.setGroupProperty(PropertyInterface("Path",R)),Object.defineProperties(j,{path:{get:function(){return E.k&&E.getValue(),E}},shape:{get:function(){return E.k&&E.getValue(),E}},_name:{value:a.nm},ix:{value:a.ix},propertyIndex:{value:a.ix},mn:{value:a.mn},propertyGroup:{value:o}}),j}}(),ShapeExpressionInterface=function(){function s(M,D,B){var F=[],O,L=M?M.length:0;for(O=0;O<L;O+=1)M[O].ty==="gr"?F.push(i(M[O],D[O],B)):M[O].ty==="fl"?F.push(o(M[O],D[O],B)):M[O].ty==="st"?F.push(R(M[O],D[O],B)):M[O].ty==="tm"?F.push(C(M[O],D[O],B)):M[O].ty==="tr"||(M[O].ty==="el"?F.push(_(M[O],D[O],B)):M[O].ty==="sr"?F.push(T(M[O],D[O],B)):M[O].ty==="sh"?F.push(ShapePathInterface(M[O],D[O],B)):M[O].ty==="rc"?F.push(P(M[O],D[O],B)):M[O].ty==="rd"?F.push(N(M[O],D[O],B)):M[O].ty==="rp"?F.push(I(M[O],D[O],B)):M[O].ty==="gf"?F.push(E(M[O],D[O],B)):F.push(j(M[O],D[O])));return F}function a(M,D,B){var F,O=function(V){for(var G=0,K=F.length;G<K;){if(F[G]._name===V||F[G].mn===V||F[G].propertyIndex===V||F[G].ix===V||F[G].ind===V)return F[G];G+=1}return typeof V=="number"?F[V-1]:null};O.propertyGroup=propertyGroupFactory(O,B),F=s(M.it,D.it,O.propertyGroup),O.numProperties=F.length;var L=S(M.it[M.it.length-1],D.it[D.it.length-1],O.propertyGroup);return O.transform=L,O.propertyIndex=M.cix,O._name=M.nm,O}function i(M,D,B){var F=function(V){switch(V){case"ADBE Vectors Group":case"Contents":case 2:return F.content;default:return F.transform}};F.propertyGroup=propertyGroupFactory(F,B);var O=a(M,D,F.propertyGroup),L=S(M.it[M.it.length-1],D.it[D.it.length-1],F.propertyGroup);return F.content=O,F.transform=L,Object.defineProperty(F,"_name",{get:function(){return M.nm}}),F.numProperties=M.np,F.propertyIndex=M.ix,F.nm=M.nm,F.mn=M.mn,F}function o(M,D,B){function F(O){return O==="Color"||O==="color"?F.color:O==="Opacity"||O==="opacity"?F.opacity:null}return Object.defineProperties(F,{color:{get:ExpressionPropertyInterface(D.c)},opacity:{get:ExpressionPropertyInterface(D.o)},_name:{value:M.nm},mn:{value:M.mn}}),D.c.setGroupProperty(PropertyInterface("Color",B)),D.o.setGroupProperty(PropertyInterface("Opacity",B)),F}function E(M,D,B){function F(O){return O==="Start Point"||O==="start point"?F.startPoint:O==="End Point"||O==="end point"?F.endPoint:O==="Opacity"||O==="opacity"?F.opacity:null}return Object.defineProperties(F,{startPoint:{get:ExpressionPropertyInterface(D.s)},endPoint:{get:ExpressionPropertyInterface(D.e)},opacity:{get:ExpressionPropertyInterface(D.o)},type:{get:function(){return"a"}},_name:{value:M.nm},mn:{value:M.mn}}),D.s.setGroupProperty(PropertyInterface("Start Point",B)),D.e.setGroupProperty(PropertyInterface("End Point",B)),D.o.setGroupProperty(PropertyInterface("Opacity",B)),F}function j(){function M(){return null}return M}function R(M,D,B){var F=propertyGroupFactory(K,B),O=propertyGroupFactory(G,F);function L(J){Object.defineProperty(G,M.d[J].nm,{get:ExpressionPropertyInterface(D.d.dataProps[J].p)})}var $,V=M.d?M.d.length:0,G={};for($=0;$<V;$+=1)L($),D.d.dataProps[$].p.setGroupProperty(O);function K(J){return J==="Color"||J==="color"?K.color:J==="Opacity"||J==="opacity"?K.opacity:J==="Stroke Width"||J==="stroke width"?K.strokeWidth:null}return Object.defineProperties(K,{color:{get:ExpressionPropertyInterface(D.c)},opacity:{get:ExpressionPropertyInterface(D.o)},strokeWidth:{get:ExpressionPropertyInterface(D.w)},dash:{get:function(){return G}},_name:{value:M.nm},mn:{value:M.mn}}),D.c.setGroupProperty(PropertyInterface("Color",F)),D.o.setGroupProperty(PropertyInterface("Opacity",F)),D.w.setGroupProperty(PropertyInterface("Stroke Width",F)),K}function C(M,D,B){function F(L){return L===M.e.ix||L==="End"||L==="end"?F.end:L===M.s.ix?F.start:L===M.o.ix?F.offset:null}var O=propertyGroupFactory(F,B);return F.propertyIndex=M.ix,D.s.setGroupProperty(PropertyInterface("Start",O)),D.e.setGroupProperty(PropertyInterface("End",O)),D.o.setGroupProperty(PropertyInterface("Offset",O)),F.propertyIndex=M.ix,F.propertyGroup=B,Object.defineProperties(F,{start:{get:ExpressionPropertyInterface(D.s)},end:{get:ExpressionPropertyInterface(D.e)},offset:{get:ExpressionPropertyInterface(D.o)},_name:{value:M.nm}}),F.mn=M.mn,F}function S(M,D,B){function F(L){return M.a.ix===L||L==="Anchor Point"?F.anchorPoint:M.o.ix===L||L==="Opacity"?F.opacity:M.p.ix===L||L==="Position"?F.position:M.r.ix===L||L==="Rotation"||L==="ADBE Vector Rotation"?F.rotation:M.s.ix===L||L==="Scale"?F.scale:M.sk&&M.sk.ix===L||L==="Skew"?F.skew:M.sa&&M.sa.ix===L||L==="Skew Axis"?F.skewAxis:null}var O=propertyGroupFactory(F,B);return D.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",O)),D.transform.mProps.p.setGroupProperty(PropertyInterface("Position",O)),D.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",O)),D.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",O)),D.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",O)),D.transform.mProps.sk&&(D.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",O)),D.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",O))),D.transform.op.setGroupProperty(PropertyInterface("Opacity",O)),Object.defineProperties(F,{opacity:{get:ExpressionPropertyInterface(D.transform.mProps.o)},position:{get:ExpressionPropertyInterface(D.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(D.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(D.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(D.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(D.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(D.transform.mProps.sa)},_name:{value:M.nm}}),F.ty="tr",F.mn=M.mn,F.propertyGroup=B,F}function _(M,D,B){function F($){return M.p.ix===$?F.position:M.s.ix===$?F.size:null}var O=propertyGroupFactory(F,B);F.propertyIndex=M.ix;var L=D.sh.ty==="tm"?D.sh.prop:D.sh;return L.s.setGroupProperty(PropertyInterface("Size",O)),L.p.setGroupProperty(PropertyInterface("Position",O)),Object.defineProperties(F,{size:{get:ExpressionPropertyInterface(L.s)},position:{get:ExpressionPropertyInterface(L.p)},_name:{value:M.nm}}),F.mn=M.mn,F}function T(M,D,B){function F($){return M.p.ix===$?F.position:M.r.ix===$?F.rotation:M.pt.ix===$?F.points:M.or.ix===$||$==="ADBE Vector Star Outer Radius"?F.outerRadius:M.os.ix===$?F.outerRoundness:M.ir&&(M.ir.ix===$||$==="ADBE Vector Star Inner Radius")?F.innerRadius:M.is&&M.is.ix===$?F.innerRoundness:null}var O=propertyGroupFactory(F,B),L=D.sh.ty==="tm"?D.sh.prop:D.sh;return F.propertyIndex=M.ix,L.or.setGroupProperty(PropertyInterface("Outer Radius",O)),L.os.setGroupProperty(PropertyInterface("Outer Roundness",O)),L.pt.setGroupProperty(PropertyInterface("Points",O)),L.p.setGroupProperty(PropertyInterface("Position",O)),L.r.setGroupProperty(PropertyInterface("Rotation",O)),M.ir&&(L.ir.setGroupProperty(PropertyInterface("Inner Radius",O)),L.is.setGroupProperty(PropertyInterface("Inner Roundness",O))),Object.defineProperties(F,{position:{get:ExpressionPropertyInterface(L.p)},rotation:{get:ExpressionPropertyInterface(L.r)},points:{get:ExpressionPropertyInterface(L.pt)},outerRadius:{get:ExpressionPropertyInterface(L.or)},outerRoundness:{get:ExpressionPropertyInterface(L.os)},innerRadius:{get:ExpressionPropertyInterface(L.ir)},innerRoundness:{get:ExpressionPropertyInterface(L.is)},_name:{value:M.nm}}),F.mn=M.mn,F}function P(M,D,B){function F($){return M.p.ix===$?F.position:M.r.ix===$?F.roundness:M.s.ix===$||$==="Size"||$==="ADBE Vector Rect Size"?F.size:null}var O=propertyGroupFactory(F,B),L=D.sh.ty==="tm"?D.sh.prop:D.sh;return F.propertyIndex=M.ix,L.p.setGroupProperty(PropertyInterface("Position",O)),L.s.setGroupProperty(PropertyInterface("Size",O)),L.r.setGroupProperty(PropertyInterface("Rotation",O)),Object.defineProperties(F,{position:{get:ExpressionPropertyInterface(L.p)},roundness:{get:ExpressionPropertyInterface(L.r)},size:{get:ExpressionPropertyInterface(L.s)},_name:{value:M.nm}}),F.mn=M.mn,F}function N(M,D,B){function F($){return M.r.ix===$||$==="Round Corners 1"?F.radius:null}var O=propertyGroupFactory(F,B),L=D;return F.propertyIndex=M.ix,L.rd.setGroupProperty(PropertyInterface("Radius",O)),Object.defineProperties(F,{radius:{get:ExpressionPropertyInterface(L.rd)},_name:{value:M.nm}}),F.mn=M.mn,F}function I(M,D,B){function F($){return M.c.ix===$||$==="Copies"?F.copies:M.o.ix===$||$==="Offset"?F.offset:null}var O=propertyGroupFactory(F,B),L=D;return F.propertyIndex=M.ix,L.c.setGroupProperty(PropertyInterface("Copies",O)),L.o.setGroupProperty(PropertyInterface("Offset",O)),Object.defineProperties(F,{copies:{get:ExpressionPropertyInterface(L.c)},offset:{get:ExpressionPropertyInterface(L.o)},_name:{value:M.nm}}),F.mn=M.mn,F}return function(M,D,B){var F;function O($){if(typeof $=="number")return $=$===void 0?1:$,$===0?B:F[$-1];for(var V=0,G=F.length;V<G;){if(F[V]._name===$)return F[V];V+=1}return null}function L(){return B}return O.propertyGroup=propertyGroupFactory(O,L),F=s(M,D,O.propertyGroup),O.numProperties=F.length,O._name="Contents",O}}(),TextExpressionInterface=function(){return function(s){var a;function i(o){switch(o){case"ADBE Text Document":return i.sourceText;default:return null}}return Object.defineProperty(i,"sourceText",{get:function(){s.textProperty.getValue();var E=s.textProperty.currentData.t;return(!a||E!==a.value)&&(a=new String(E),a.value=E||new String(E),Object.defineProperty(a,"style",{get:function(){return{fillColor:s.textProperty.currentData.fc}}})),a}}),i}}();function _typeof(s){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(i){return typeof i}:_typeof=function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},_typeof(s)}var FootageInterface=function(){var s=function(o){var E="",j=o.getFootageData();function R(){return E="",j=o.getFootageData(),C}function C(S){if(j[S])return E=S,j=j[S],_typeof(j)==="object"?C:j;var _=S.indexOf(E);if(_!==-1){var T=parseInt(S.substr(_+E.length),10);return j=j[T],_typeof(j)==="object"?C:j}return""}return R},a=function(o){function E(j){return j==="Outline"?E.outlineInterface():null}return E._name="Outline",E.outlineInterface=s(o),E};return function(i){function o(E){return E==="Data"?o.dataInterface:null}return o._name="Data",o.dataInterface=a(i),o}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(s){return interfaces[s]||null}var expressionHelpers=function(){function s(R,C,S){C.x&&(S.k=!0,S.x=!0,S.initiateExpression=ExpressionManager.initiateExpression,S.effectsSequence.push(S.initiateExpression(R,C,S).bind(S)))}function a(R){return R*=this.elem.globalData.frameRate,R-=this.offsetTime,R!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<R?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(R,this._cachingAtTime),this._cachingAtTime.lastFrame=R),this._cachingAtTime.value}function i(R){var C=-.01,S=this.getValueAtTime(R),_=this.getValueAtTime(R+C),T=0;if(S.length){var P;for(P=0;P<S.length;P+=1)T+=Math.pow(_[P]-S[P],2);T=Math.sqrt(T)*100}else T=0;return T}function o(R){if(this.vel!==void 0)return this.vel;var C=-.001,S=this.getValueAtTime(R),_=this.getValueAtTime(R+C),T;if(S.length){T=createTypedArray("float32",S.length);var P;for(P=0;P<S.length;P+=1)T[P]=(_[P]-S[P])/C}else T=(_-S)/C;return T}function E(){return this.pv}function j(R){this.propertyGroup=R}return{searchExpressions:s,getSpeedAtTime:i,getVelocityAtTime:o,getValueAtTime:a,getStaticValueAtTime:E,setGroupProperty:j}}();function addPropertyDecorator(){function s(N,I,M){if(!this.k||!this.keyframes)return this.pv;N=N?N.toLowerCase():"";var D=this.comp.renderedFrame,B=this.keyframes,F=B[B.length-1].t;if(D<=F)return this.pv;var O,L;M?(I?O=Math.abs(F-this.elem.comp.globalData.frameRate*I):O=Math.max(0,F-this.elem.data.ip),L=F-O):((!I||I>B.length-1)&&(I=B.length-1),L=B[B.length-1-I].t,O=F-L);var $,V,G;if(N==="pingpong"){var K=Math.floor((D-L)/O);if(K%2!==0)return this.getValueAtTime((O-(D-L)%O+L)/this.comp.globalData.frameRate,0)}else if(N==="offset"){var J=this.getValueAtTime(L/this.comp.globalData.frameRate,0),ne=this.getValueAtTime(F/this.comp.globalData.frameRate,0),le=this.getValueAtTime(((D-L)%O+L)/this.comp.globalData.frameRate,0),ue=Math.floor((D-L)/O);if(this.pv.length){for(G=new Array(J.length),V=G.length,$=0;$<V;$+=1)G[$]=(ne[$]-J[$])*ue+le[$];return G}return(ne-J)*ue+le}else if(N==="continue"){var ce=this.getValueAtTime(F/this.comp.globalData.frameRate,0),pe=this.getValueAtTime((F-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(G=new Array(ce.length),V=G.length,$=0;$<V;$+=1)G[$]=ce[$]+(ce[$]-pe[$])*((D-F)/this.comp.globalData.frameRate)/5e-4;return G}return ce+(ce-pe)*((D-F)/.001)}return this.getValueAtTime(((D-L)%O+L)/this.comp.globalData.frameRate,0)}function a(N,I,M){if(!this.k)return this.pv;N=N?N.toLowerCase():"";var D=this.comp.renderedFrame,B=this.keyframes,F=B[0].t;if(D>=F)return this.pv;var O,L;M?(I?O=Math.abs(this.elem.comp.globalData.frameRate*I):O=Math.max(0,this.elem.data.op-F),L=F+O):((!I||I>B.length-1)&&(I=B.length-1),L=B[I].t,O=L-F);var $,V,G;if(N==="pingpong"){var K=Math.floor((F-D)/O);if(K%2===0)return this.getValueAtTime(((F-D)%O+F)/this.comp.globalData.frameRate,0)}else if(N==="offset"){var J=this.getValueAtTime(F/this.comp.globalData.frameRate,0),ne=this.getValueAtTime(L/this.comp.globalData.frameRate,0),le=this.getValueAtTime((O-(F-D)%O+F)/this.comp.globalData.frameRate,0),ue=Math.floor((F-D)/O)+1;if(this.pv.length){for(G=new Array(J.length),V=G.length,$=0;$<V;$+=1)G[$]=le[$]-(ne[$]-J[$])*ue;return G}return le-(ne-J)*ue}else if(N==="continue"){var ce=this.getValueAtTime(F/this.comp.globalData.frameRate,0),pe=this.getValueAtTime((F+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(G=new Array(ce.length),V=G.length,$=0;$<V;$+=1)G[$]=ce[$]+(ce[$]-pe[$])*(F-D)/.001;return G}return ce+(ce-pe)*(F-D)/.001}return this.getValueAtTime((O-((F-D)%O+F))/this.comp.globalData.frameRate,0)}function i(N,I){if(!this.k)return this.pv;if(N=(N||.4)*.5,I=Math.floor(I||5),I<=1)return this.pv;var M=this.comp.renderedFrame/this.comp.globalData.frameRate,D=M-N,B=M+N,F=I>1?(B-D)/(I-1):1,O=0,L=0,$;this.pv.length?$=createTypedArray("float32",this.pv.length):$=0;for(var V;O<I;){if(V=this.getValueAtTime(D+O*F),this.pv.length)for(L=0;L<this.pv.length;L+=1)$[L]+=V[L];else $+=V;O+=1}if(this.pv.length)for(L=0;L<this.pv.length;L+=1)$[L]/=I;else $/=I;return $}function o(N){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var I=this._transformCachingAtTime.v;if(I.cloneFromProps(this.pre.props),this.appliedTransformations<1){var M=this.a.getValueAtTime(N);I.translate(-M[0]*this.a.mult,-M[1]*this.a.mult,M[2]*this.a.mult)}if(this.appliedTransformations<2){var D=this.s.getValueAtTime(N);I.scale(D[0]*this.s.mult,D[1]*this.s.mult,D[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var B=this.sk.getValueAtTime(N),F=this.sa.getValueAtTime(N);I.skewFromAxis(-B*this.sk.mult,F*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var O=this.r.getValueAtTime(N);I.rotate(-O*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var L=this.rz.getValueAtTime(N),$=this.ry.getValueAtTime(N),V=this.rx.getValueAtTime(N),G=this.or.getValueAtTime(N);I.rotateZ(-L*this.rz.mult).rotateY($*this.ry.mult).rotateX(V*this.rx.mult).rotateZ(-G[2]*this.or.mult).rotateY(G[1]*this.or.mult).rotateX(G[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var K=this.px.getValueAtTime(N),J=this.py.getValueAtTime(N);if(this.data.p.z){var ne=this.pz.getValueAtTime(N);I.translate(K*this.px.mult,J*this.py.mult,-ne*this.pz.mult)}else I.translate(K*this.px.mult,J*this.py.mult,0)}else{var le=this.p.getValueAtTime(N);I.translate(le[0]*this.p.mult,le[1]*this.p.mult,-le[2]*this.p.mult)}return I}function E(){return this.v.clone(new Matrix)}var j=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(N,I,M){var D=j(N,I,M);return D.dynamicProperties.length?D.getValueAtTime=o.bind(D):D.getValueAtTime=E.bind(D),D.setGroupProperty=expressionHelpers.setGroupProperty,D};var R=PropertyFactory.getProp;PropertyFactory.getProp=function(N,I,M,D,B){var F=R(N,I,M,D,B);F.kf?F.getValueAtTime=expressionHelpers.getValueAtTime.bind(F):F.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(F),F.setGroupProperty=expressionHelpers.setGroupProperty,F.loopOut=s,F.loopIn=a,F.smooth=i,F.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(F),F.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(F),F.numKeys=I.a===1?I.k.length:0,F.propertyIndex=I.ix;var O=0;return M!==0&&(O=createTypedArray("float32",I.a===1?I.k[0].s.length:I.k.length)),F._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:O},expressionHelpers.searchExpressions(N,I,F),F.k&&B.addDynamicProperty(F),F};function C(N){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),N*=this.elem.globalData.frameRate,N-=this.offsetTime,N!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<N?this._caching.lastIndex:0,this._cachingAtTime.lastTime=N,this.interpolateShape(N,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var S=ShapePropertyFactory.getConstructorFunction(),_=ShapePropertyFactory.getKeyframedConstructorFunction();function T(){}T.prototype={vertices:function(I,M){this.k&&this.getValue();var D=this.v;M!==void 0&&(D=this.getValueAtTime(M,0));var B,F=D._length,O=D[I],L=D.v,$=createSizedArray(F);for(B=0;B<F;B+=1)I==="i"||I==="o"?$[B]=[O[B][0]-L[B][0],O[B][1]-L[B][1]]:$[B]=[O[B][0],O[B][1]];return $},points:function(I){return this.vertices("v",I)},inTangents:function(I){return this.vertices("i",I)},outTangents:function(I){return this.vertices("o",I)},isClosed:function(){return this.v.c},pointOnPath:function(I,M){var D=this.v;M!==void 0&&(D=this.getValueAtTime(M,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(D));for(var B=this._segmentsLength,F=B.lengths,O=B.totalLength*I,L=0,$=F.length,V=0,G;L<$;){if(V+F[L].addedLength>O){var K=L,J=D.c&&L===$-1?0:L+1,ne=(O-V)/F[L].addedLength;G=bez.getPointInSegment(D.v[K],D.v[J],D.o[K],D.i[J],ne,F[L]);break}else V+=F[L].addedLength;L+=1}return G||(G=D.c?[D.v[0][0],D.v[0][1]]:[D.v[D._length-1][0],D.v[D._length-1][1]]),G},vectorOnPath:function(I,M,D){I==1?I=this.v.c:I==0&&(I=.999);var B=this.pointOnPath(I,M),F=this.pointOnPath(I+.001,M),O=F[0]-B[0],L=F[1]-B[1],$=Math.sqrt(Math.pow(O,2)+Math.pow(L,2));if($===0)return[0,0];var V=D==="tangent"?[O/$,L/$]:[-L/$,O/$];return V},tangentOnPath:function(I,M){return this.vectorOnPath(I,M,"tangent")},normalOnPath:function(I,M){return this.vectorOnPath(I,M,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([T],S),extendPrototype([T],_),_.prototype.getValueAtTime=C,_.prototype.initiateExpression=ExpressionManager.initiateExpression;var P=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(N,I,M,D,B){var F=P(N,I,M,D,B);return F.propertyIndex=I.ix,F.lock=!1,M===3?expressionHelpers.searchExpressions(N,I.pt,F):M===4&&expressionHelpers.searchExpressions(N,I.ks,F),F.k&&N.addDynamicProperty(F),F}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function s(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(a,i){var o=this.calculateExpression(i);if(a.t!==o){var E={};return this.copyData(E,a),E.t=o.toString(),E.__complete=!1,E}return a},TextProperty.prototype.searchProperty=function(){var a=this.searchKeyframes(),i=this.searchExpressions();return this.kf=a||i,this.kf},TextProperty.prototype.searchExpressions=s}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function s(a,i){var o=createNS("feMerge");o.setAttribute("result",a);var E,j;for(j=0;j<i.length;j+=1)E=createNS("feMergeNode"),E.setAttribute("in",i[j]),o.appendChild(E),o.appendChild(E);return o}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(s,a,i,o,E){this.filterManager=a;var j=createNS("feColorMatrix");j.setAttribute("type","matrix"),j.setAttribute("color-interpolation-filters","linearRGB"),j.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=j,j.setAttribute("result",o+"_tint_1"),s.appendChild(j),j=createNS("feColorMatrix"),j.setAttribute("type","matrix"),j.setAttribute("color-interpolation-filters","sRGB"),j.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),j.setAttribute("result",o+"_tint_2"),s.appendChild(j),this.matrixFilter=j;var R=this.createMergeNode(o,[E,o+"_tint_1",o+"_tint_2"]);s.appendChild(R)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(s){if(s||this.filterManager._mdf){var a=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,o=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+o+" 0"),this.matrixFilter.setAttribute("values",i[0]-a[0]+" 0 0 0 "+a[0]+" "+(i[1]-a[1])+" 0 0 0 "+a[1]+" "+(i[2]-a[2])+" 0 0 0 "+a[2]+" 0 0 0 1 0")}};function SVGFillFilter(s,a,i,o){this.filterManager=a;var E=createNS("feColorMatrix");E.setAttribute("type","matrix"),E.setAttribute("color-interpolation-filters","sRGB"),E.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),E.setAttribute("result",o),s.appendChild(E),this.matrixFilter=E}SVGFillFilter.prototype.renderFrame=function(s){if(s||this.filterManager._mdf){var a=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+a[0]+" 0 0 0 0 "+a[1]+" 0 0 0 0 "+a[2]+" 0 0 0 "+i+" 0")}};function SVGStrokeEffect(s,a,i){this.initialized=!1,this.filterManager=a,this.elem=i,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var s=this.elem.layerElement.children||this.elem.layerElement.childNodes,a,i,o,E;for(this.filterManager.effectElements[1].p.v===1?(E=this.elem.maskManager.masksProperties.length,o=0):(o=this.filterManager.effectElements[0].p.v-1,E=o+1),i=createNS("g"),i.setAttribute("fill","none"),i.setAttribute("stroke-linecap","round"),i.setAttribute("stroke-dashoffset",1),o;o<E;o+=1)a=createNS("path"),i.appendChild(a),this.paths.push({p:a,m:o});if(this.filterManager.effectElements[10].p.v===3){var j=createNS("mask"),R=createElementID();j.setAttribute("id",R),j.setAttribute("mask-type","alpha"),j.appendChild(i),this.elem.globalData.defs.appendChild(j);var C=createNS("g");for(C.setAttribute("mask","url("+getLocationHref()+"#"+R+")");s[0];)C.appendChild(s[0]);this.elem.layerElement.appendChild(C),this.masker=j,i.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(i),this.elem.layerElement.removeAttribute("mask"),i.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=i},SVGStrokeEffect.prototype.renderFrame=function(s){this.initialized||this.initialize();var a,i=this.paths.length,o,E;for(a=0;a<i;a+=1)if(this.paths[a].m!==-1&&(o=this.elem.maskManager.viewData[this.paths[a].m],E=this.paths[a].p,(s||this.filterManager._mdf||o.prop._mdf)&&E.setAttribute("d",o.lastPath),s||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||o.prop._mdf)){var j;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var R=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,C=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,S=E.getTotalLength();j="0 0 0 "+S*R+" ";var _=S*(C-R),T=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,P=Math.floor(_/T),N;for(N=0;N<P;N+=1)j+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";j+="0 "+S*10+" 0 0"}else j="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;E.setAttribute("stroke-dasharray",j)}if((s||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(s||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(s||this.filterManager.effectElements[3].p._mdf)){var I=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(I[0]*255)+","+bmFloor(I[1]*255)+","+bmFloor(I[2]*255)+")")}};function SVGTritoneFilter(s,a,i,o){this.filterManager=a;var E=createNS("feColorMatrix");E.setAttribute("type","matrix"),E.setAttribute("color-interpolation-filters","linearRGB"),E.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),s.appendChild(E);var j=createNS("feComponentTransfer");j.setAttribute("color-interpolation-filters","sRGB"),j.setAttribute("result",o),this.matrixFilter=j;var R=createNS("feFuncR");R.setAttribute("type","table"),j.appendChild(R),this.feFuncR=R;var C=createNS("feFuncG");C.setAttribute("type","table"),j.appendChild(C),this.feFuncG=C;var S=createNS("feFuncB");S.setAttribute("type","table"),j.appendChild(S),this.feFuncB=S,s.appendChild(j)}SVGTritoneFilter.prototype.renderFrame=function(s){if(s||this.filterManager._mdf){var a=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,o=this.filterManager.effectElements[2].p.v,E=o[0]+" "+i[0]+" "+a[0],j=o[1]+" "+i[1]+" "+a[1],R=o[2]+" "+i[2]+" "+a[2];this.feFuncR.setAttribute("tableValues",E),this.feFuncG.setAttribute("tableValues",j),this.feFuncB.setAttribute("tableValues",R)}};function SVGProLevelsFilter(s,a,i,o){this.filterManager=a;var E=this.filterManager.effectElements,j=createNS("feComponentTransfer");(E[10].p.k||E[10].p.v!==0||E[11].p.k||E[11].p.v!==1||E[12].p.k||E[12].p.v!==1||E[13].p.k||E[13].p.v!==0||E[14].p.k||E[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",j)),(E[17].p.k||E[17].p.v!==0||E[18].p.k||E[18].p.v!==1||E[19].p.k||E[19].p.v!==1||E[20].p.k||E[20].p.v!==0||E[21].p.k||E[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",j)),(E[24].p.k||E[24].p.v!==0||E[25].p.k||E[25].p.v!==1||E[26].p.k||E[26].p.v!==1||E[27].p.k||E[27].p.v!==0||E[28].p.k||E[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",j)),(E[31].p.k||E[31].p.v!==0||E[32].p.k||E[32].p.v!==1||E[33].p.k||E[33].p.v!==1||E[34].p.k||E[34].p.v!==0||E[35].p.k||E[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",j)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(j.setAttribute("color-interpolation-filters","sRGB"),s.appendChild(j)),(E[3].p.k||E[3].p.v!==0||E[4].p.k||E[4].p.v!==1||E[5].p.k||E[5].p.v!==1||E[6].p.k||E[6].p.v!==0||E[7].p.k||E[7].p.v!==1)&&(j=createNS("feComponentTransfer"),j.setAttribute("color-interpolation-filters","sRGB"),j.setAttribute("result",o),s.appendChild(j),this.feFuncRComposed=this.createFeFunc("feFuncR",j),this.feFuncGComposed=this.createFeFunc("feFuncG",j),this.feFuncBComposed=this.createFeFunc("feFuncB",j))}SVGProLevelsFilter.prototype.createFeFunc=function(s,a){var i=createNS(s);return i.setAttribute("type","table"),a.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(s,a,i,o,E){for(var j=0,R=256,C,S=Math.min(s,a),_=Math.max(s,a),T=Array.call(null,{length:R}),P,N=0,I=E-o,M=a-s;j<=256;)C=j/256,C<=S?P=M<0?E:o:C>=_?P=M<0?o:E:P=o+I*Math.pow((C-s)/M,1/i),T[N]=P,N+=1,j+=256/(R-1);return T.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(s){if(s||this.filterManager._mdf){var a,i=this.filterManager.effectElements;this.feFuncRComposed&&(s||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(a=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",a),this.feFuncGComposed.setAttribute("tableValues",a),this.feFuncBComposed.setAttribute("tableValues",a)),this.feFuncR&&(s||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(a=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",a)),this.feFuncG&&(s||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(a=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",a)),this.feFuncB&&(s||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(a=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",a)),this.feFuncA&&(s||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(a=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",a))}};function SVGDropShadowEffect(s,a,i,o,E){var j=a.container.globalData.renderConfig.filterSize,R=a.data.fs||j;s.setAttribute("x",R.x||j.x),s.setAttribute("y",R.y||j.y),s.setAttribute("width",R.width||j.width),s.setAttribute("height",R.height||j.height),this.filterManager=a;var C=createNS("feGaussianBlur");C.setAttribute("in","SourceAlpha"),C.setAttribute("result",o+"_drop_shadow_1"),C.setAttribute("stdDeviation","0"),this.feGaussianBlur=C,s.appendChild(C);var S=createNS("feOffset");S.setAttribute("dx","25"),S.setAttribute("dy","0"),S.setAttribute("in",o+"_drop_shadow_1"),S.setAttribute("result",o+"_drop_shadow_2"),this.feOffset=S,s.appendChild(S);var _=createNS("feFlood");_.setAttribute("flood-color","#00ff00"),_.setAttribute("flood-opacity","1"),_.setAttribute("result",o+"_drop_shadow_3"),this.feFlood=_,s.appendChild(_);var T=createNS("feComposite");T.setAttribute("in",o+"_drop_shadow_3"),T.setAttribute("in2",o+"_drop_shadow_2"),T.setAttribute("operator","in"),T.setAttribute("result",o+"_drop_shadow_4"),s.appendChild(T);var P=this.createMergeNode(o,[o+"_drop_shadow_4",E]);s.appendChild(P)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(s){if(s||this.filterManager._mdf){if((s||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),s||this.filterManager.effectElements[0].p._mdf){var a=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(a[0]*255),Math.round(a[1]*255),Math.round(a[2]*255)))}if((s||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),s||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,o=(this.filterManager.effectElements[2].p.v-90)*degToRads,E=i*Math.cos(o),j=i*Math.sin(o);this.feOffset.setAttribute("dx",E),this.feOffset.setAttribute("dy",j)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(s,a,i){this.initialized=!1,this.filterManager=a,this.filterElem=s,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}SVGMatte3Effect.prototype.findSymbol=function(s){for(var a=0,i=_svgMatteSymbols.length;a<i;){if(_svgMatteSymbols[a]===s)return _svgMatteSymbols[a];a+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(s,a){var i=s.layerElement.parentNode;if(i){for(var o=i.children,E=0,j=o.length;E<j&&o[E]!==s.layerElement;)E+=1;var R;E<=j-2&&(R=o[E+1]);var C=createNS("use");C.setAttribute("href","#"+a),R?i.insertBefore(C,R):i.appendChild(C)}},SVGMatte3Effect.prototype.setElementAsMask=function(s,a){if(!this.findSymbol(a)){var i=createElementID(),o=createNS("mask");o.setAttribute("id",a.layerId),o.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(a);var E=s.globalData.defs;E.appendChild(o);var j=createNS("symbol");j.setAttribute("id",i),this.replaceInParent(a,i),j.appendChild(a.layerElement),E.appendChild(j);var R=createNS("use");R.setAttribute("href","#"+i),o.appendChild(R),a.data.hd=!1,a.show()}s.setMatte(a.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var s=this.filterManager.effectElements[0].p.v,a=this.elem.comp.elements,i=0,o=a.length;i<o;)a[i]&&a[i].data.ind===s&&this.setElementAsMask(this.elem,a[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(s,a,i,o){s.setAttribute("x","-100%"),s.setAttribute("y","-100%"),s.setAttribute("width","300%"),s.setAttribute("height","300%"),this.filterManager=a;var E=createNS("feGaussianBlur");E.setAttribute("result",o),s.appendChild(E),this.feGaussianBlur=E}SVGGaussianBlurEffect.prototype.renderFrame=function(s){if(s||this.filterManager._mdf){var a=.3,i=this.filterManager.effectElements[0].p.v*a,o=this.filterManager.effectElements[1].p.v,E=o==3?0:i,j=o==2?0:i;this.feGaussianBlur.setAttribute("stdDeviation",E+" "+j);var R=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",R)}};function TransformEffect(){}TransformEffect.prototype.init=function(s){this.effectsManager=s,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(s){if(this._opMdf=!1,this._mdf=!1,s||this.effectsManager._mdf){var a=this.effectsManager.effectElements,i=a[0].p.v,o=a[1].p.v,E=a[2].p.v===1,j=a[3].p.v,R=E?j:a[4].p.v,C=a[5].p.v,S=a[6].p.v,_=a[7].p.v;this.matrix.reset(),this.matrix.translate(-i[0],-i[1],i[2]),this.matrix.scale(R*.01,j*.01,1),this.matrix.rotate(-_*degToRads),this.matrix.skewFromAxis(-C*degToRads,(S+90)*degToRads),this.matrix.translate(o[0],o[1],0),this._mdf=!0,this.opacity!==a[8].p.v&&(this.opacity=a[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(s,a){this.init(a)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(s){this.init(s)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})})(lottie$1,lottie$1.exports);var lottieExports=lottie$1.exports;const lottie=getDefaultExportFromCjs(lottieExports);function _iterableToArrayLimit(s,a){var i=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(i!=null){var o,E,j,R,C=[],S=!0,_=!1;try{if(j=(i=i.call(s)).next,a!==0)for(;!(S=(o=j.call(i)).done)&&(C.push(o.value),C.length!==a);S=!0);}catch(T){_=!0,E=T}finally{try{if(!S&&i.return!=null&&(R=i.return(),Object(R)!==R))return}finally{if(_)throw E}}return C}}function ownKeys(s,a){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(s);a&&(o=o.filter(function(E){return Object.getOwnPropertyDescriptor(s,E).enumerable})),i.push.apply(i,o)}return i}function _objectSpread2(s){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?ownKeys(Object(i),!0).forEach(function(o){_defineProperty(s,o,i[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))})}return s}function _defineProperty(s,a,i){return a=_toPropertyKey(a),a in s?Object.defineProperty(s,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[a]=i,s}function _objectWithoutPropertiesLoose(s,a){if(s==null)return{};var i={},o=Object.keys(s),E,j;for(j=0;j<o.length;j++)E=o[j],!(a.indexOf(E)>=0)&&(i[E]=s[E]);return i}function _objectWithoutProperties(s,a){if(s==null)return{};var i=_objectWithoutPropertiesLoose(s,a),o,E;if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(s);for(E=0;E<j.length;E++)o=j[E],!(a.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(s,o)&&(i[o]=s[o])}return i}function _slicedToArray(s,a){return _arrayWithHoles(s)||_iterableToArrayLimit(s,a)||_unsupportedIterableToArray(s,a)||_nonIterableRest()}function _arrayWithHoles(s){if(Array.isArray(s))return s}function _unsupportedIterableToArray(s,a){if(s){if(typeof s=="string")return _arrayLikeToArray(s,a);var i=Object.prototype.toString.call(s).slice(8,-1);if(i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set")return Array.from(s);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _arrayLikeToArray(s,a)}}function _arrayLikeToArray(s,a){(a==null||a>s.length)&&(a=s.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=s[i];return o}function _nonIterableRest(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toPrimitive(s,a){if(typeof s!="object"||s===null)return s;var i=s[Symbol.toPrimitive];if(i!==void 0){var o=i.call(s,a||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(s)}function _toPropertyKey(s){var a=_toPrimitive(s,"string");return typeof a=="symbol"?a:String(a)}var _excluded$1=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],useLottie=function s(a,i){var o=a.animationData,E=a.loop,j=a.autoplay,R=a.initialSegment,C=a.onComplete,S=a.onLoopComplete,_=a.onEnterFrame,T=a.onSegmentStart,P=a.onConfigReady,N=a.onDataReady,I=a.onDataFailed,M=a.onLoadedImages,D=a.onDOMLoaded,B=a.onDestroy;a.lottieRef,a.renderer,a.name,a.assetsPath,a.rendererSettings;var F=_objectWithoutProperties(a,_excluded$1),O=reactExports.useState(!1),L=_slicedToArray(O,2),$=L[0],V=L[1],G=reactExports.useRef(),K=reactExports.useRef(null),J=function(){var me;(me=G.current)===null||me===void 0||me.play()},ne=function(){var me;(me=G.current)===null||me===void 0||me.stop()},le=function(){var me;(me=G.current)===null||me===void 0||me.pause()},ue=function(me){var ee;(ee=G.current)===null||ee===void 0||ee.setSpeed(me)},ce=function(me,ee){var ye;(ye=G.current)===null||ye===void 0||ye.goToAndPlay(me,ee)},pe=function(me,ee){var ye;(ye=G.current)===null||ye===void 0||ye.goToAndStop(me,ee)},xe=function(me){var ee;(ee=G.current)===null||ee===void 0||ee.setDirection(me)},oe=function(me,ee){var ye;(ye=G.current)===null||ye===void 0||ye.playSegments(me,ee)},Y=function(me){var ee;(ee=G.current)===null||ee===void 0||ee.setSubframe(me)},ae=function(me){var ee;return(ee=G.current)===null||ee===void 0?void 0:ee.getDuration(me)},H=function(){var me;(me=G.current)===null||me===void 0||me.destroy(),G.current=void 0},W=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee;if(K.current){(ee=G.current)===null||ee===void 0||ee.destroy();var ye=_objectSpread2(_objectSpread2(_objectSpread2({},a),me),{},{container:K.current});return G.current=lottie.loadAnimation(ye),V(!!G.current),function(){var Ce;(Ce=G.current)===null||Ce===void 0||Ce.destroy(),G.current=void 0}}};reactExports.useEffect(function(){var ie=W();return function(){return ie==null?void 0:ie()}},[o,E]),reactExports.useEffect(function(){G.current&&(G.current.autoplay=!!j)},[j]),reactExports.useEffect(function(){if(G.current){if(!R){G.current.resetSegments(!0);return}!Array.isArray(R)||!R.length||((G.current.currentRawFrame<R[0]||G.current.currentRawFrame>R[1])&&(G.current.currentRawFrame=R[0]),G.current.setSegment(R[0],R[1]))}},[R]),reactExports.useEffect(function(){var ie=[{name:"complete",handler:C},{name:"loopComplete",handler:S},{name:"enterFrame",handler:_},{name:"segmentStart",handler:T},{name:"config_ready",handler:P},{name:"data_ready",handler:N},{name:"data_failed",handler:I},{name:"loaded_images",handler:M},{name:"DOMLoaded",handler:D},{name:"destroy",handler:B}],me=ie.filter(function(ye){return ye.handler!=null});if(me.length){var ee=me.map(function(ye){var Ce;return(Ce=G.current)===null||Ce===void 0||Ce.addEventListener(ye.name,ye.handler),function(){var Ae;(Ae=G.current)===null||Ae===void 0||Ae.removeEventListener(ye.name,ye.handler)}});return function(){ee.forEach(function(ye){return ye()})}}},[C,S,_,T,P,N,I,M,D,B]);var U=React8.createElement("div",_objectSpread2({style:i,ref:K},F));return{View:U,play:J,stop:ne,pause:le,setSpeed:ue,goToAndStop:pe,goToAndPlay:ce,setDirection:xe,playSegments:oe,setSubframe:Y,getDuration:ae,destroy:H,animationContainerRef:K,animationLoaded:$,animationItem:G.current}};function getContainerVisibility(s){var a=s.getBoundingClientRect(),i=a.top,o=a.height,E=window.innerHeight-i,j=window.innerHeight+o;return E/j}function getContainerCursorPosition(s,a,i){var o=s.getBoundingClientRect(),E=o.top,j=o.left,R=o.width,C=o.height,S=(a-j)/R,_=(i-E)/C;return{x:S,y:_}}var useInitInteractivity=function s(a){var i=a.wrapperRef,o=a.animationItem,E=a.mode,j=a.actions;reactExports.useEffect(function(){var R=i.current;if(!(!R||!o||!j.length)){o.stop();var C=function(){var T=null,P=function(){var I=getContainerVisibility(R),M=j.find(function(B){var F=B.visibility;return F&&I>=F[0]&&I<=F[1]});if(M){if(M.type==="seek"&&M.visibility&&M.frames.length===2){var D=M.frames[0]+Math.ceil((I-M.visibility[0])/(M.visibility[1]-M.visibility[0])*M.frames[1]);//! goToAndStop must be relative to the start of the current segment
o.goToAndStop(D-o.firstFrame-1,!0)}M.type==="loop"&&(T===null||T!==M.frames||o.isPaused)&&(o.playSegments(M.frames,!0),T=M.frames),M.type==="play"&&o.isPaused&&(o.resetSegments(!0),o.play()),M.type==="stop"&&o.goToAndStop(M.frames[0]-o.firstFrame-1,!0)}};return document.addEventListener("scroll",P),function(){document.removeEventListener("scroll",P)}},S=function(){var T=function(M,D){var B=M,F=D;if(B!==-1&&F!==-1){var O=getContainerCursorPosition(R,B,F);B=O.x,F=O.y}var L=j.find(function(G){var K=G.position;return K&&Array.isArray(K.x)&&Array.isArray(K.y)?B>=K.x[0]&&B<=K.x[1]&&F>=K.y[0]&&F<=K.y[1]:K&&!Number.isNaN(K.x)&&!Number.isNaN(K.y)?B===K.x&&F===K.y:!1});if(L){if(L.type==="seek"&&L.position&&Array.isArray(L.position.x)&&Array.isArray(L.position.y)&&L.frames.length===2){var $=(B-L.position.x[0])/(L.position.x[1]-L.position.x[0]),V=(F-L.position.y[0])/(L.position.y[1]-L.position.y[0]);o.playSegments(L.frames,!0),o.goToAndStop(Math.ceil(($+V)/2*(L.frames[1]-L.frames[0])),!0)}L.type==="loop"&&o.playSegments(L.frames,!0),L.type==="play"&&(o.isPaused&&o.resetSegments(!1),o.playSegments(L.frames)),L.type==="stop"&&o.goToAndStop(L.frames[0],!0)}},P=function(M){T(M.clientX,M.clientY)},N=function(){T(-1,-1)};return R.addEventListener("mousemove",P),R.addEventListener("mouseout",N),function(){R.removeEventListener("mousemove",P),R.removeEventListener("mouseout",N)}};switch(E){case"scroll":return C();case"cursor":return S()}}},[E,o])},useLottieInteractivity=function s(a){var i=a.actions,o=a.mode,E=a.lottieObj,j=E.animationItem,R=E.View,C=E.animationContainerRef;return useInitInteractivity({actions:i,animationItem:j,mode:o,wrapperRef:C}),R},_excluded=["style","interactivity"],Lottie=function s(a){var i,o,E,j=a.style,R=a.interactivity,C=_objectWithoutProperties(a,_excluded),S=useLottie(C,j),_=S.View,T=S.play,P=S.stop,N=S.pause,I=S.setSpeed,M=S.goToAndStop,D=S.goToAndPlay,B=S.setDirection,F=S.playSegments,O=S.setSubframe,L=S.getDuration,$=S.destroy,V=S.animationContainerRef,G=S.animationLoaded,K=S.animationItem;return reactExports.useEffect(function(){a.lottieRef&&(a.lottieRef.current={play:T,stop:P,pause:N,setSpeed:I,goToAndPlay:D,goToAndStop:M,setDirection:B,playSegments:F,setSubframe:O,getDuration:L,destroy:$,animationContainerRef:V,animationLoaded:G,animationItem:K})},[(i=a.lottieRef)===null||i===void 0?void 0:i.current]),useLottieInteractivity({lottieObj:{View:_,play:T,stop:P,pause:N,setSpeed:I,goToAndStop:M,goToAndPlay:D,setDirection:B,playSegments:F,setSubframe:O,getDuration:L,destroy:$,animationContainerRef:V,animationLoaded:G,animationItem:K},actions:(o=R==null?void 0:R.actions)!==null&&o!==void 0?o:[],mode:(E=R==null?void 0:R.mode)!==null&&E!==void 0?E:"scroll"})};const v="5.4.4",fr=30,ip=0,op=110,w=800,h=600,nm="Comp 1",ddd=0,assets=[{id:"comp_0",layers:[{ddd:0,ind:1,ty:4,nm:"Sub Rocket 01",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:15,st:0,bm:0},{ddd:0,ind:2,ty:4,nm:"Sub Rocket 09",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:90,op:105,st:0,bm:0},{ddd:0,ind:3,ty:4,nm:"Sub Rocket 07",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:60,op:75,st:0,bm:0},{ddd:0,ind:4,ty:4,nm:"Sub Rocket 05",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:30,op:45,st:0,bm:0},{ddd:0,ind:5,ty:4,nm:"Rocket Body 3",td:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[295.86,382.015,0],ix:2},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[67.225,67.225,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-9.073],[-.003,-23.534],[-27.243,-9.076],[-49.314,23.536],[-.003,23.536],[49.314,23.536]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.329,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-135.483],[49.318,-135.488],[0,-135.488],[-49.31,-135.488],[-76.639,-46.349],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-46.36]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.922000002394,.933000033509,.941000007181,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.326,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.013,0],[0,0],[0,2.013],[-2.013,0],[0,0],[0,-2.013]],o:[[0,0],[-2.013,0],[0,-2.013],[0,0],[2.013,0],[0,2.013]],v:[[55.229,3.66],[-55.228,3.66],[-58.888,0],[-55.228,-3.66],[55.229,-3.66],[58.888,0]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.338,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[43.435,-7.223],[41.232,-16.035],[-40.365,-16.035],[-42.805,-7.223],[-49.248,16.035],[49.249,16.035]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.339,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:132,st:0,bm:0},{ddd:0,ind:6,ty:4,nm:"new logo 3 Outlines",parent:7,tt:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[256.006,210.317,0],ix:2},a:{a:0,k:[500,500,0],ix:1},s:{a:0,k:[14.875,14.875,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[22.143,22.142],[0,0],[0,0],[72.106,0],[0,72.106],[-72.106,0],[-14.33,-5.407],[0,0],[0,0],[22.142,-22.142],[0,0],[-22.142,-22.142],[0,0],[-22.142,22.142],[0,0]],o:[[0,0],[0,0],[0,72.106],[-72.106,0],[0,-72.107],[16.223,0],[0,0],[0,0],[-22.142,-22.142],[0,0],[-22.142,22.142],[0,0],[22.142,22.142],[0,0],[22.143,-22.142]],v:[[295.292,-40.092],[130.56,-204.824],[130.56,0],[0,130.559],[-130.56,0],[0,-130.56],[46.079,-122.186],[46.079,-289.304],[40.092,-295.292],[-40.092,-295.292],[-295.292,-40.092],[-295.292,40.092],[-40.092,295.292],[40.092,295.292],[295.292,40.092]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[500,500],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 1",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[25.449,0],[0,-25.449],[-25.449,0],[0,25.449]],o:[[-25.449,0],[0,25.449],[25.449,0],[0,-25.449]],v:[[0,-46.08],[-46.08,0],[0,46.08],[46.08,0]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[500,500],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 2",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1}],ip:0,op:130,st:0,bm:0},{ddd:0,ind:7,ty:3,nm:"Window 2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:-22.5,s:[210.962,382.015,0],e:[380.962,382.015,0],to:[28.333,0,0],ti:[-28.333,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:-7.5,s:[380.962,382.015,0],e:[380.962,382.015,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:7,s:[380.962,382.015,0],e:[210.962,382.015,0],to:[-28.333,0,0],ti:[28.333,0,0]},{t:7.5}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[67.225,67.225,100],ix:6}},ao:0,ip:-15,op:117,st:-15,bm:0},{ddd:0,ind:8,ty:4,nm:"Rocket Body 2",td:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[295.86,382.015,0],ix:2},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[67.225,67.225,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-9.073],[-.003,-23.534],[-27.243,-9.076],[-49.314,23.536],[-.003,23.536],[49.314,23.536]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.329,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-135.483],[49.318,-135.488],[0,-135.488],[-49.31,-135.488],[-76.639,-46.349],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-46.36]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.922000002394,.933000033509,.941000007181,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.326,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.013,0],[0,0],[0,2.013],[-2.013,0],[0,0],[0,-2.013]],o:[[0,0],[-2.013,0],[0,-2.013],[0,0],[2.013,0],[0,2.013]],v:[[55.229,3.66],[-55.228,3.66],[-58.888,0],[-55.228,-3.66],[55.229,-3.66],[58.888,0]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.338,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[43.435,-7.223],[41.232,-16.035],[-40.365,-16.035],[-42.805,-7.223],[-49.248,16.035],[49.249,16.035]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.339,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:132,st:0,bm:0},{ddd:0,ind:9,ty:4,nm:"Window",tt:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:-7.5,s:[210.962,382.015,0],e:[380.962,382.015,0],to:[28.333,0,0],ti:[-28.333,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:7.5,s:[380.962,382.015,0],e:[380.962,382.015,0],to:[0,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:22,s:[380.962,382.015,0],e:[210.962,382.015,0],to:[-28.333,0,0],ti:[28.333,0,0]},{t:22.5}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[67.225,67.225,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,23.132],[.077,1.037],[2.632,0],[0,-20.98],[-.51,-2.481],[-1.056,0]],o:[[0,-1.057],[-2.481,-.51],[-20.98,0],[0,2.633],[1.038,.078],[23.133,0]],v:[[23.119,-18.672],[22.959,-22.059],[15.088,-22.901],[-22.9,15.087],[-21.997,23.083],[-18.641,23.151]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.501999978458,.866999966491,.913999968884,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[235.086,191.657],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 2",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,24.205],[.02,.75],[7.883,1.619],[0,-1.057],[23.132,0],[1.038,.077],[-18.347,0],[-.508,.02]],o:[[0,-.756],[-5.275,-5.679],[.077,1.037],[0,23.132],[-1.057,0],[3.554,17.297],[.513,0],[16.223,-15.495]],v:[[32.542,-23.968],[32.484,-26.219],[12.353,-37.599],[12.481,-34.461],[-29.402,7.424],[-32.542,7.294],[4.669,37.599],[6.197,37.56]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.301999978458,.811999990426,.882000014361,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[245.504,207.134],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 3",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,20.468],[6.3,6.78],[0,-.756],[16.223,-15.495]],o:[[0,-9.984],[.02,.751],[0,24.205],[20.271,-.803]],v:[[18.23,-6.059],[7.839,-32.078],[7.802,-29.543],[-18.917,31.984]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.144999994016,.773000021542,.851000019148,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[269.931,212.803],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 4",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,-26.102],[26.102,0],[0,26.102],[-26.102,0]],o:[[0,26.102],[-26.102,0],[0,-26.102],[26.102,0]],v:[[47.262,0],[.001,47.261],[-47.262,0],[.001,-47.261]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.173,206.744],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 5",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:132,st:0,bm:0},{ddd:0,ind:10,ty:4,nm:"Sub Rocket 16",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:105,op:120,st:0,bm:0},{ddd:0,ind:11,ty:4,nm:"Sub Rocket 14",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:75,op:90,st:0,bm:0},{ddd:0,ind:12,ty:4,nm:"Sub Rocket 12",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:45,op:60,st:0,bm:0},{ddd:0,ind:13,ty:4,nm:"Sub Rocket 04",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:15,op:30,st:0,bm:0},{ddd:0,ind:14,ty:4,nm:"Rocket Body",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[295.86,382.015,0],ix:2},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[67.225,67.225,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-9.073],[-.003,-23.534],[-27.243,-9.076],[-49.314,23.536],[-.003,23.536],[49.314,23.536]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.329,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-135.483],[49.318,-135.488],[0,-135.488],[-49.31,-135.488],[-76.639,-46.349],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-46.36]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.922000002394,.933000033509,.941000007181,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.326,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.013,0],[0,0],[0,2.013],[-2.013,0],[0,0],[0,-2.013]],o:[[0,0],[-2.013,0],[0,-2.013],[0,0],[2.013,0],[0,2.013]],v:[[55.229,3.66],[-55.228,3.66],[-58.888,0],[-55.228,-3.66],[55.229,-3.66],[58.888,0]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.338,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[43.435,-7.223],[41.232,-16.035],[-40.365,-16.035],[-42.805,-7.223],[-49.248,16.035],[49.249,16.035]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.339,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:132,st:0,bm:0},{ddd:0,ind:15,ty:4,nm:"Sub Rocket 02",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:15,st:0,bm:0},{ddd:0,ind:16,ty:4,nm:"Sub Rocket 15",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:90,op:105,st:0,bm:0},{ddd:0,ind:17,ty:4,nm:"Sub Rocket 13",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:60,op:75,st:0,bm:0},{ddd:0,ind:18,ty:4,nm:"Sub Rocket 11",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:30,op:45,st:0,bm:0},{ddd:0,ind:19,ty:4,nm:"Sub Rocket 10",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:105,op:120,st:0,bm:0},{ddd:0,ind:20,ty:4,nm:"Sub Rocket 08",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:75,op:90,st:0,bm:0},{ddd:0,ind:21,ty:4,nm:"Sub Rocket 06",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:45,op:60,st:0,bm:0},{ddd:0,ind:22,ty:4,nm:"Sub Rocket 03",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[10.363,-.002],[6.523,-9.638],[0,0],[0,0],[0,0]],o:[[-6.525,-9.644],[-10.359,.002],[0,0],[0,0],[0,0],[0,0]],v:[[27.251,-647.527],[-.003,-661.989],[-27.243,-647.53],[-49.314,-614.918],[-.003,-614.918],[49.314,-614.918]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.689,67.302],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 6",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[17.804,26.312],[0,0],[0,0],[0,0],[0,-31.776],[0,0],[-9.442,0],[0,0],[0,0],[0,9.441],[0,0]],o:[[0,0],[0,0],[0,0],[-17.81,26.316],[0,0],[0,9.441],[0,0],[0,0],[9.442,0],[0,0],[0,-31.769]],v:[[49.321,-774.672],[49.318,-774.677],[0,-774.677],[-49.31,-774.677],[-76.639,-685.538],[-76.639,118.392],[-59.543,135.488],[0,135.488],[59.543,135.488],[76.639,118.392],[76.639,-685.549]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.560553696576,.605397961186,.635294117647,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.685,226.327],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 7",np:2,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[2.731,0],[0,0],[0,2.731],[-2.731,0],[0,0],[0,-2.731]],o:[[0,0],[-2.731,0],[0,-2.731],[0,0],[2.731,0],[0,2.731]],v:[[74.921,16.932],[-74.92,16.932],[-79.885,11.967],[-74.92,7.002],[74.921,7.002],[79.885,11.967]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.270999983245,.352999997606,.39199999641,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.698,377.35],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 9",np:2,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[58.922,-4.853],[55.933,-16.807],[-54.757,-16.807],[-58.068,-4.853],[-66.808,26.697],[66.809,26.697]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.328999986836,.430999995213,.477999997606,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[307.699,357.655],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 10",np:2,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:15,op:30,st:0,bm:0},{ddd:0,ind:35,ty:4,nm:"Sub Rocket 02 Joint",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[373.02,362.805,0],e:[233.02,362.805,0],to:[-23.333,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[233.02,362.805,0],e:[373.02,362.805,0],to:[0,0,0],ti:[-23.333,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[-12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[520.1,-144.585],[290.744,84.771],[288.864,289.211],[520.1,57.975]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:0,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.274509803922,.356862745098,.396078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[57.36,0],e:[551.36,0],to:[82.333,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[551.36,0],e:[57.36,0],to:[0,0],ti:[82.333,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[0,0],ix:1},s:{a:1,k:[{i:{x:[.833,.833],y:[.833,.833]},o:{x:[.167,.167],y:[.167,.167]},t:0,s:[100,100],e:[-100,100]},{i:{x:[.833,.833],y:[.833,.833]},o:{x:[.167,.167],y:[.167,.167]},t:15,s:[-100,100],e:[100,100]},{t:30}],ix:3,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 11",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:132,st:0,bm:0},{ddd:0,ind:36,ty:4,nm:"Sub Rocket 01 Joint",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[219.02,362.805,0],e:[358.52,362.805,0],to:[23.25,0,0],ti:[0,0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[358.52,362.805,0],e:[219.02,362.805,0],to:[0,0,0],ti:[23.25,0,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[250,400,0],ix:1},s:{a:0,k:[12.773,12.773,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[520.1,-144.585],[290.744,84.771],[288.864,289.211],[520.1,57.975]],c:!0},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:0,ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:1,k:[{i:{x:.833,y:.833},o:{x:.167,y:.167},t:0,s:[57.36,0],e:[556.36,0],to:[83.167,0],ti:[0,0]},{i:{x:.833,y:.833},o:{x:.167,y:.167},t:15,s:[556.36,0],e:[57.36,0],to:[0,0],ti:[83.167,0]},{t:30}],ix:2,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},a:{a:0,k:[0,0],ix:1},s:{a:1,k:[{i:{x:[.833,.833],y:[.833,.833]},o:{x:[.167,.167],y:[.167,.167]},t:0,s:[100,100],e:[-100,100]},{i:{x:[.833,.833],y:[.833,.833]},o:{x:[.167,.167],y:[.167,.167]},t:15,s:[-100,100],e:[100,100]},{t:30}],ix:3,x:`var $bm_rt;
$bm_rt = loopOut('cycle', 0);`},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 11",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:132,st:0,bm:0}]}],layers=[{ddd:0,ind:1,ty:3,nm:"Position Control",sr:1,ks:{o:{a:0,k:0,ix:11},r:{a:0,k:0,ix:10},p:{s:!0,x:{a:0,k:400,ix:3},y:{a:1,k:[{i:{x:[.349],y:[1]},o:{x:[.039],y:[.602]},t:0,s:[840],e:[300]},{i:{x:[.65],y:[1]},o:{x:[.333],y:[0]},t:30,s:[300],e:[460]},{i:{x:[.818],y:[.968]},o:{x:[.023],y:[.564]},t:80,s:[460],e:[-420]},{t:96}],ix:4}},a:{a:0,k:[0,0,0],ix:1},s:{a:1,k:[{i:{x:[.49,.49,.49],y:[1,1,1]},o:{x:[.49,.49,.49],y:[0,0,0]},t:15,s:[70,70,100],e:[40,40,100]},{t:80}],ix:6}},ao:0,ef:[{ty:5,nm:"Wiggle Rate",np:3,mn:"ADBE Slider Control",ix:1,en:1,ef:[{ty:0,nm:"Slider",mn:"ADBE Slider Control-0001",ix:1,v:{a:0,k:0,ix:1}}]}],ip:0,op:100,st:0,bm:0},{ddd:0,ind:2,ty:0,nm:"Rocket",parent:1,refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[5.833,0,0],ix:2},a:{a:0,k:[300,300,0],ix:1},s:{a:0,k:[148.754,148.754,100],ix:6}},ao:0,tm:{a:1,k:[{i:{x:[.21],y:[.928]},o:{x:[.04],y:[.361]},t:0,s:[.667],e:[2]},{i:{x:[.38],y:[1]},o:{x:[.49],y:[0]},t:30.062,s:[2],e:[3.2]},{i:{x:[.82],y:[.986]},o:{x:[.49],y:[0]},t:80,s:[3.2],e:[4.333]},{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:96,s:[4.333],e:[4.333]},{t:130}],ix:2},w:600,h:600,ip:0,op:110,st:0,bm:0},{ddd:0,ind:3,ty:4,nm:"Fire 1",parent:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[-.118,101.791,0],ix:2},a:{a:0,k:[250,380.848,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:1,k:[{i:{x:.35,y:1},o:{x:.04,y:.6},t:9,s:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,191.098],[-24.746,185.22],[0,227.453],[24.746,185.22],[28.785,191.098]],c:!0}],e:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,5.384],[-24.745,-.494],[.001,41.739],[24.746,-.494],[28.785,5.384]],c:!0}]},{t:30}],ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.995999983245,.788000009574,.156999999402,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.338,422.749],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 11",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:30,st:0,bm:0},{ddd:0,ind:4,ty:4,nm:"Fire 2",parent:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[-.118,103.916,0],ix:2},a:{a:0,k:[250,385.497,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:1,k:[{i:{x:.35,y:1},o:{x:.04,y:.6},t:9,s:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.338,329.554],[-38.976,320.296],[.001,386.814],[38.976,320.296],[45.339,329.554]],c:!0}],e:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,8.48],[-38.977,-.778],[.001,65.74],[38.975,-.778],[45.339,8.48]],c:!0}]},{t:30}],ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.995999983245,.340999977261,.13300000359,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.339,446.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 12",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:30,st:0,bm:0},{ddd:0,ind:5,ty:4,nm:"Fire 1 Wiggle",parent:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[-.118,101.791,0],ix:2},a:{a:0,k:[250,380.848,0],ix:1},s:{a:1,k:[{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:30,s:[100,100,100],e:[100,136.488,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:50,s:[100,136.488,100],e:[100,101,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:71,s:[100,101,100],e:[100,124,100]},{t:80}],ix:6}},ao:0,ef:[{ty:5,nm:"Scale Wiggle",np:3,mn:"ADBE Slider Control",ix:1,en:1,ef:[{ty:0,nm:"Slider",mn:"ADBE Slider Control-0001",ix:1,v:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:29,s:[0],e:[1]},{t:30}],ix:1}}]}],shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:1,k:[{i:{x:.35,y:1},o:{x:.04,y:.6},t:9,s:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,191.098],[-24.746,185.22],[0,227.453],[24.746,185.22],[28.785,191.098]],c:!0}],e:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,5.384],[-24.745,-.494],[.001,41.739],[24.746,-.494],[28.785,5.384]],c:!0}]},{i:{x:.833,y:1},o:{x:.04,y:0},t:30,s:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,5.384],[-24.745,-.494],[.001,41.739],[24.746,-.494],[28.785,5.384]],c:!0}],e:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,5.384],[-24.745,-.494],[.001,41.739],[24.746,-.494],[28.785,5.384]],c:!0}]},{i:{x:.833,y:1},o:{x:.167,y:0},t:80,s:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,5.384],[-24.745,-.494],[.001,41.739],[24.746,-.494],[28.785,5.384]],c:!0}],e:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.785,534.199],[-24.745,528.322],[.001,570.555],[24.746,528.322],[28.785,534.199]],c:!0}]},{i:{x:.833,y:1},o:{x:.167,y:0},t:81,s:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.785,534.199],[-24.745,528.322],[.001,570.555],[24.746,528.322],[28.785,534.199]],c:!0}],e:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,534.199],[-24.745,528.322],[.001,570.555],[24.746,528.322],[28.785,534.199]],c:!0}]},{i:{x:.833,y:1},o:{x:.167,y:0},t:82,s:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,534.199],[-24.745,528.322],[.001,570.555],[24.746,528.322],[28.785,534.199]],c:!0}],e:[{i:[[7.185,19.04],[0,0],[0,0],[-4.257,-5.66],[0,0],[-10.521,-10.232],[0,11.755],[0,0]],o:[[0,0],[0,0],[-7.186,19.04],[0,0],[0,11.755],[10.52,-10.232],[0,0],[4.257,-5.66]],v:[[32.583,-41.739],[.001,-41.739],[-32.581,-41.739],[-28.786,107.501],[-24.746,101.624],[0,143.856],[24.746,101.624],[28.785,107.501]],c:!0}]},{t:83}],ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.995999983245,.788000009574,.156999999402,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.338,422.749],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 11",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:30,op:110,st:0,bm:0},{ddd:0,ind:6,ty:4,nm:"Fire 2 Wiggle",parent:1,sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[-.118,103.916,0],ix:2},a:{a:0,k:[250,385.497,0],ix:1},s:{a:1,k:[{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:30,s:[100,100,100],e:[100,144.049,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:50,s:[100,144.049,100],e:[100,96,100]},{i:{x:[.833,.833,.833],y:[.833,.833,.833]},o:{x:[.167,.167,.167],y:[.167,.167,.167]},t:71,s:[100,96,100],e:[100,124,100]},{t:80}],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:1,k:[{i:{x:.35,y:1},o:{x:.04,y:.6},t:9,s:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.338,169.194],[-38.976,159.936],[.001,226.454],[38.976,159.936],[45.339,169.194]],c:!0}],e:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,8.48],[-38.977,-.778],[.001,65.74],[38.975,-.778],[45.339,8.48]],c:!0}]},{i:{x:.833,y:1},o:{x:.04,y:0},t:30,s:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,8.48],[-38.977,-.778],[.001,65.74],[38.975,-.778],[45.339,8.48]],c:!0}],e:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,8.48],[-38.977,-.778],[.001,65.74],[38.975,-.778],[45.339,8.48]],c:!0}]},{i:{x:.833,y:1},o:{x:.167,y:0},t:80,s:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,8.48],[-38.977,-.778],[.001,65.74],[38.975,-.778],[45.339,8.48]],c:!0}],e:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,514.557],[-38.977,505.299],[0,571.817],[38.975,505.299],[45.338,514.557]],c:!0}]},{i:{x:.833,y:1},o:{x:.167,y:0},t:81,s:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.339,514.557],[-38.977,505.299],[0,571.817],[38.975,505.299],[45.338,514.557]],c:!0}],e:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.338,514.557],[-38.976,505.299],[.001,571.817],[38.976,505.299],[45.339,514.557]],c:!0}]},{i:{x:.833,y:1},o:{x:.167,y:0},t:82,s:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.338,514.557],[-38.976,505.299],[.001,571.817],[38.976,505.299],[45.339,514.557]],c:!0}],e:[{i:[[11.317,29.988],[0,0],[0,0],[-6.705,-8.915],[0,0],[-16.571,-16.115],[0,18.516],[0,0]],o:[[0,0],[0,0],[-11.316,29.988],[0,0],[0,18.516],[16.57,-16.115],[0,0],[6.706,-8.915]],v:[[51.318,-65.74],[.001,-65.74],[-51.318,-65.74],[-45.338,168.845],[-38.976,159.587],[.001,226.105],[38.976,159.587],[45.339,168.845]],c:!0}]},{t:83}],ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"fl",c:{a:0,k:[.995999983245,.340999977261,.13300000359,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[250.339,446.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Group 12",np:2,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:30,op:110,st:0,bm:0},{ddd:0,ind:7,ty:4,nm:"Line 11",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:-142,ix:10},p:{a:0,k:[401.5,412,0],ix:2},a:{a:0,k:[-2.5,200,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[390.439,-149.673],[-1.75,200.25]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:74,s:[0],e:[100]},{t:78}],ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:71,s:[6],e:[100]},{t:75}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:71,s:[5],e:[0]},{t:78}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:71,op:110,st:71,bm:0},{ddd:0,ind:8,ty:4,nm:"Line 10",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:-7,ix:10},p:{a:0,k:[405.5,406,0],ix:2},a:{a:0,k:[-2.5,200,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[390.439,-149.673],[-1.75,200.25]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:71,s:[0],e:[100]},{t:75}],ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:68,s:[6],e:[100]},{t:72}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:68,s:[5],e:[0]},{t:75}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:68,op:110,st:68,bm:0},{ddd:0,ind:9,ty:4,nm:"Line 9",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:-88,ix:10},p:{a:0,k:[399.5,400,0],ix:2},a:{a:0,k:[-2.5,200,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[390.439,-149.673],[-1.75,200.25]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:69,s:[0],e:[100]},{t:73}],ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:66,s:[6],e:[100]},{t:70}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:66,s:[5],e:[0]},{t:73}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:66,op:110,st:66,bm:0},{ddd:0,ind:10,ty:4,nm:"Line 4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:-197,ix:10},p:{a:0,k:[395.5,400,0],ix:2},a:{a:0,k:[-2.5,200,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[344,-100],[-1.75,200.25]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:66,s:[0],e:[100]},{t:70}],ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:63,s:[6],e:[100]},{t:67}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:63,s:[5],e:[0]},{t:70}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:63,op:110,st:63,bm:0},{ddd:0,ind:11,ty:4,nm:"Line 6",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:98,ix:10},p:{a:0,k:[393.5,418,0],ix:2},a:{a:0,k:[-2.5,200,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[344,-100],[-1.75,200.25]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:55,s:[0],e:[100]},{t:59}],ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:52,s:[6],e:[100]},{t:56}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:52,s:[5],e:[0]},{t:59}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:52,op:110,st:52,bm:0},{ddd:0,ind:12,ty:4,nm:"Line 12",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:68,ix:10},p:{a:0,k:[411.5,320,0],ix:2},a:{a:0,k:[-2.5,200,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0]],o:[[0,0],[0,0]],v:[[344,-100],[-1.75,200.25]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"tm",s:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:37,s:[0],e:[100]},{t:41}],ix:1},e:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:34,s:[6],e:[100]},{t:38}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:34,s:[5],e:[0]},{t:41}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"fl",c:{a:0,k:[.270588235294,.352941176471,.392156862745,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:4,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:34,op:110,st:34,bm:0},{ddd:0,ind:13,ty:4,nm:"Blasting Circle 4",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[400.5,855,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{d:1,ty:"el",s:{a:1,k:[{i:{x:[.37,.37],y:[1,1]},o:{x:[.42,.42],y:[0,0]},t:78,s:[0,0],e:[1127,1127]},{t:94}],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.37],y:[1]},o:{x:[.42],y:[0]},t:78,s:[5],e:[0]},{t:94}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:78,op:110,st:78,bm:0},{ddd:0,ind:14,ty:4,nm:"Blasting Circle 3",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[400.5,615,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{d:1,ty:"el",s:{a:1,k:[{i:{x:[.37,.37],y:[1,1]},o:{x:[.42,.42],y:[0,0]},t:78,s:[0,0],e:[1127,1127]},{t:94}],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.37],y:[1]},o:{x:[.42],y:[0]},t:78,s:[5],e:[0]},{t:94}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:78,op:110,st:78,bm:0},{ddd:0,ind:15,ty:4,nm:"Blasting Circle 2",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[400.5,415,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{d:1,ty:"el",s:{a:1,k:[{i:{x:[.667,.667],y:[1,1]},o:{x:[.333,.333],y:[0,0]},t:61,s:[1007,1007],e:[0,0]},{t:71}],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:61,s:[5],e:[0]},{t:71}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:61,op:110,st:61,bm:0},{ddd:0,ind:16,ty:4,nm:"Blasting Circle ",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[399,320,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{d:1,ty:"el",s:{a:1,k:[{i:{x:[.667,.667],y:[1,1]},o:{x:[.333,.333],y:[0,0]},t:40,s:[1007,1007],e:[0,0]},{t:50}],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:40,s:[5],e:[0]},{t:50}],ix:5},lc:1,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1}],ip:40,op:110,st:40,bm:0},{ddd:0,ind:17,ty:4,nm:"BG",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[400,300,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,shapes:[{ty:"rc",d:1,s:{a:0,k:[800,600],ix:2},p:{a:0,k:[0,0],ix:3},r:{a:0,k:0,ix:4},nm:"Rectangle Path 1",mn:"ADBE Vector Shape - Rect",hd:!1},{ty:"fl",c:{a:0,k:[.03137254902,.101960784314,.149019607843,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1}],ip:110,op:110,st:0,bm:0,hidden:0}],markers=[],rocketAnimation={v,fr,ip,op,w,h,nm,ddd,assets,layers,markers},CountdownTimer=({text:s,className:a,timerOnly:i})=>{const[o,E]=reactExports.useState(j(60,65));reactExports.useEffect(()=>{const R=setInterval(()=>{E(C=>C>0?C-1:(clearInterval(R),0))},1e3);return()=>clearInterval(R)},[]);function j(R,C){return Math.floor(Math.random()*(C-R+1))+R}return jsxRuntimeExports.jsx("p",{className:cn(" select-none",a),children:o===0?"It's taking longer than expected. Hang tight!":i?`${o}s`:`${s} — just ${o} seconds to completion. Hang tight!`})},steps=[{title:"Step 1",description:"Pre-Systems Check & Analysis",details:["Initiating RapidLoad launch sequence...","Checking network connectivity... Stable","Verifying WordPress version compatibility... Confirmed","Scanning active plugins for conflicts... None detected","Database connection status... Optimal","Analyzing current site configuration...","Creating optimization backup checkpoint...","Initializing cache systems...","Loading optimization modules…","Starting performance monitoring systems..."]},{title:"Step 2",description:"Main Optimization Sequence",details:["Beginning core optimization sequence...","Compressing JavaScript resources...","Minifying CSS files...","Optimizing image assets...","Configuring lazy loading parameters...","Generating Critical CSS...","Removing unused CSS...","Configuring browser caching rules...","Optimizing font delivery...","Establishing CDN connections..."]},{title:"Step 3",description:"Maximum Performance Achieved",details:["Maximum optimization altitude reached...","All optimization engines running at peak performance...","Conducting PageSpeed analysis...","Measuring Time to First Byte...","Final performance checks in progress...","Optimization sequence complete","Cache systems fully operational","All optimization modules deployed successfully","RapidLoad mission accomplished - Your site is now running at maximum speed"]}],StepThree=({onNext:s})=>{const{options:a,savingData:i,invalidatingCache:o}=useAppContext(),[E,j]=reactExports.useState(0);reactExports.useState(0);const[R,C]=reactExports.useState(!1),{submitSettings:S}=useSubmitSettings(),{dispatch:_,headerUrl:T}=useCommonDispatch(),[P,N]=reactExports.useState(!1),{settings:I,activeGear:M,cssStatus:D,touched:B,loading:F}=useSelector(optimizerData),[O,L]=reactExports.useState(!1),[$,V]=reactExports.useState(0),G=reactExports.useMemo(()=>steps[E-1]||steps[0],[E]);return reactExports.useEffect(()=>{const K=localStorage.getItem("rapidLoadGear");K&&_(changeGear(K))},[M]),reactExports.useEffect(()=>{I.length>0&&N(!0)},[I]),reactExports.useEffect(()=>{P&&(L(!0),S(!0).then(()=>{L(!1),j(1);const K=a==null?void 0:a.optimizer_url;K&&_(getCSSStatus(a,K,["uucss","cpcss"]))}).catch(K=>{L(!1),console.error("Submit settings failed:",K)}))},[P]),reactExports.useEffect(()=>{if(R&&!O&&!F&&s){const K=setTimeout(()=>{s()},5e3);return()=>clearTimeout(K)}},[R,O,s,F]),reactExports.useEffect(()=>{D!=null&&(j(2),F||_(getHomePagePerformance(a)).then(()=>{j(3),C(!0)}).catch(K=>{console.error("Fetching home page performance failed:",K)}))},[D,i,o,F]),reactExports.useEffect(()=>{V(0);const K=setInterval(()=>{V(J=>J>=G.details.length-1?0:J+1)},2e3);return()=>clearInterval(K)},[E,G]),jsxRuntimeExports.jsx("div",{className:"w-full flex flex-col gap-4",children:jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-8 p-16 items-center rounded-3xl",children:[jsxRuntimeExports.jsx("div",{className:"px-2",children:jsxRuntimeExports.jsx("img",{className:"w-22",src:a!=null&&a.page_optimizer_base?(a==null?void 0:a.page_optimizer_base)+"/logo.svg":"/logo.svg",alt:"RapidLoad - #1 to unlock breakneck page speed"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold",children:"Optimizing Your Site"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-base text-zinc-600 dark:text-brand-300",children:"Hold on your site is almost ready..."})]}),jsxRuntimeExports.jsx("div",{className:"flex items-center",children:jsxRuntimeExports.jsx("div",{style:{width:300,height:200},children:jsxRuntimeExports.jsx(Lottie,{animationData:rocketAnimation,loop:!0})})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center gap-2",children:[jsxRuntimeExports.jsx("div",{className:"text-gray-600/50 font-bold dark:text-brand-300",children:jsxRuntimeExports.jsx(CountdownTimer,{timerOnly:!0})}),jsxRuntimeExports.jsx("h4",{className:"text-xl font-bold capitalize text-center",children:G.description}),jsxRuntimeExports.jsx("p",{className:"text-gray-600 mb-2 text-center dark:text-brand-300",children:G.details[$]}),jsxRuntimeExports.jsx("div",{className:"flex items-center w-64",children:[0,1,2].map(K=>E>K?jsxRuntimeExports.jsx("div",{className:"h-2 flex-grow bg-[#673B9B] rounded-lg mr-2 dark:bg-brand-300"},K):K===E?jsxRuntimeExports.jsx(Skeleton,{className:"h-2 flex-grow bg-[#673B9B]/30 rounded-lg mr-2"},K):jsxRuntimeExports.jsx("div",{className:"h-2 flex-grow bg-gray-300 rounded-lg mr-2 dark:bg-brand-300"},K))}),jsxRuntimeExports.jsxs("p",{className:"text-sm text-gray-500 mt-2",children:["Step ",Math.min(E+1,3)," of 3"]})]})]})})},StepFour=()=>{var K,J,ne,le,ue,ce,pe,xe,oe,Y,ae,H,W,U,ie,me;const{options:s}=useAppContext(),{activeReport:a,data:i,homePerformance:o,settings:E}=useSelector(optimizerData),[j,R]=reactExports.useState(o),C=usePerformanceColors(j.first_entry),S=usePerformanceColors(j.last_entry),[_,T]=reactExports.useState(!1),{dispatch:P,aiPredictionResult:N}=useCommonDispatch(),[I,M]=reactExports.useState(!1),D=reactExports.useMemo(()=>!o.first_entry_metrics||!o.last_entry_metrics?[]:o.first_entry_metrics.filter(ee=>["first-contentful-paint","largest-contentful-paint","total-blocking-time","cumulative-layout-shift","speed-index"].includes(ee.id)).map(ee=>{var ye;return{id:ee.id,title:ee.title,before:ee.displayValue,after:((ye=o.last_entry_metrics.find(Ce=>Ce.id===ee.id))==null?void 0:ye.displayValue)||"0"}}),[i]);reactExports.useEffect(()=>{},[D,i]);const B=(ee,ye)=>{if(ee===0||ee<ye)return jsxRuntimeExports.jsx("span",{className:"text-brand-900 dark:text-brand-300",children:"-"});const Ce=ee/ye;return Ce>99?jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-sm",children:["More than ",jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("span",{className:"text-purple-600 font-bold",children:"100 X"})," Faster"]})]}):jsxRuntimeExports.jsxs("span",{className:"text-sm",children:[jsxRuntimeExports.jsxs("span",{className:"text-purple-600 font-bold",children:[Ce.toFixed(1)," X"]})," Faster"]})},F=ee=>{switch(ee){case"first-contentful-paint":return jsxRuntimeExports.jsx(PaintRoller,{className:"w-4 h-4"});case"largest-contentful-paint":return jsxRuntimeExports.jsx(Eye,{className:"w-4 h-4"});case"total-blocking-time":return jsxRuntimeExports.jsx(Download,{className:"w-4 h-4"});case"cumulative-layout-shift":return jsxRuntimeExports.jsx(LayoutDashboard,{className:"w-5 h-5"});case"speed-index":return jsxRuntimeExports.jsx(LoaderCircle,{className:"w-4 h-4"});case"first-input-delay":return jsxRuntimeExports.jsx(MousePointerClick,{className:"w-4 h-4"});case"time-to-first-byte":return jsxRuntimeExports.jsx(Hourglass,{className:"w-4 h-4"});case"page-load-time":return jsxRuntimeExports.jsx(Timer,{className:"w-4 h-4"});default:return jsxRuntimeExports.jsx(GearIcon,{className:"w-4 h-4"})}},O=ee=>{switch(ee){case"first-contentful-paint":return"(FCP)";case"largest-contentful-paint":return"(LCP)";case"total-blocking-time":return"(TBT)";case"cumulative-layout-shift":return"(CLS)";case"first-input-delay":return"(FID)";case"time-to-first-byte":return"(TTFB)";default:return""}},L=ee=>{switch(ee){case"first-contentful-paint":return"How long it takes to display the first visible element of the page";case"speed-index":return"Time until the page is fully functional for the user";case"total-blocking-time":return"Measures the delay before the page becomes usable";case"largest-contentful-paint":return"Primary content display speed";case"cumulative-layout-shift":return"The visual stability measure of a page during loading";default:return""}},$=()=>jsxRuntimeExports.jsx("div",{className:"w-full overflow-x-auto",children:jsxRuntimeExports.jsxs("table",{className:"w-full border-separate border-spacing-0 border border-brand-200 rounded-2xl overflow-hidden bg-brand-0 dark:bg-brand-800",children:[jsxRuntimeExports.jsx("thead",{children:jsxRuntimeExports.jsxs("tr",{className:"",children:[jsxRuntimeExports.jsx("th",{className:"text-left p-4 font-semibold border-b border-brand-200 dark:text-brand-300",children:"Key Metrics"}),jsxRuntimeExports.jsx("th",{className:"text-center p-4 font-semibold border-b border-brand-200 dark:text-brand-300",children:"Before"}),jsxRuntimeExports.jsx("th",{className:"text-center p-4 font-semibold border-b border-brand-200 dark:text-brand-300",children:"After"}),jsxRuntimeExports.jsx("th",{className:"text-center p-4 font-semibold border-b border-brand-200 dark:text-brand-300 w-1/4",children:"Boosted"})]})}),jsxRuntimeExports.jsx("tbody",{children:D.map((ee,ye)=>parseFloat(ee.after)>parseFloat(ee.before)?null:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsxs("td",{className:"p-4 border-b border-brand-200 dark:border-brand-600 gap-2 items-center flex",children:[jsxRuntimeExports.jsx("span",{children:F(ee.id)}),ee.title," ",O(ee.id)," ",jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(TooltipText,{text:L(ee.id),children:jsxRuntimeExports.jsx(Info$1,{className:"w-3 h-3 hover:cursor-pointer"})})})]}),jsxRuntimeExports.jsx("td",{className:"text-center border-b border-brand-200 dark:border-brand-600",children:ee.before}),jsxRuntimeExports.jsx("td",{className:"text-center border-b border-brand-200 dark:border-brand-600",children:ee.after}),jsxRuntimeExports.jsx("td",{className:"text-center border-b border-brand-200 dark:border-brand-600 font-medium",children:B(parseFloat(ee.before),parseFloat(ee.after))})]},ee.id))})]})}),V=()=>{T(!0),setTimeout(()=>{window.location.hash="#/"},300)};reactExports.useEffect(()=>{P(setCommonRootState("onboardCompleted",!0))},[P]),reactExports.useEffect(()=>{o.last_entry<o.first_entry||o.last_entry<1?M(!0):(R(o),M(!1))},[]);const G=()=>{if(j.first_entry===0||j.last_entry===0)return 50;const ee=(j.last_entry-j.first_entry)/j.first_entry*100;return Math.round(ee)};return jsxRuntimeExports.jsx(motion.div,{initial:{opacity:1},animate:{opacity:_?0:1},transition:{duration:.3},className:"w-full flex flex-col gap-4",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-8 p-16 items-center rounded-3xl",children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"px-2",children:jsxRuntimeExports.jsx("img",{className:"w-22",src:s!=null&&s.page_optimizer_base?(s==null?void 0:s.page_optimizer_base)+"/rapidload-logo.svg":"/logo.svg",alt:"RapidLoad - #1 to unlock breakneck page speed"})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2 text-center",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold",children:I?"Rapidload AI Analyzed Your site":"Your Site is FAST!"}),jsxRuntimeExports.jsx("span",{className:"font-medium text-base text-zinc-600 dark:text-brand-300",children:"We have analyzed your entire site and this is the current results"})]}),jsxRuntimeExports.jsx("div",{className:"flex justify-center p-4 mx-auto w-full relative items-center gap-4",children:I?jsxRuntimeExports.jsx("div",{className:"flex flex-col items-center gap-2 px-10 py-4 rounded-2xl min-w-[550px] ",children:!((J=(K=i==null?void 0:i.grouped)==null?void 0:K.opportunities)!=null&&J.length)&&!((le=(ne=i==null?void 0:i.grouped)==null?void 0:ne.diagnostics)!=null&&le.length)?jsxRuntimeExports.jsxs("div",{className:"border-2 border-brand-500 rounded-xl flex items-start gap-4 p-4",children:[jsxRuntimeExports.jsx("div",{className:"p-2 bg-brand-200/30 rounded-lg",children:jsxRuntimeExports.jsx(ForwardRef$t,{className:"w-10 h-10 text-purple-800"})}),jsxRuntimeExports.jsx("span",{className:"font-medium text-zinc-600 dark:text-brand-300",children:jsxRuntimeExports.jsx("p",{children:"We couldn't find any opportunities or diagnostics for your site. This is a good thing! It means your site is already performing well."})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"text-lg font-semibold flex items-center gap-2",children:[jsxRuntimeExports.jsx(AIButtonIcon,{})," AI Analysis"]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-4 w-full border border-brand-200 rounded-2xl bg-brand-0 dark:bg-brand-800",children:[((ce=(ue=i==null?void 0:i.grouped)==null?void 0:ue.opportunities)==null?void 0:ce.length)>0&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 text-sm font-semibold text-brand-900 dark:text-brand-300 border-b border-brand-200 px-6 py-2",children:[jsxRuntimeExports.jsx("span",{children:"Opportunities"}),jsxRuntimeExports.jsx("span",{className:"flex text-xxs items-center text-brand-0 dark:text-brand-900 justify-center rounded-full w-6 h-6 border-2 border-orange-400 bg-orange-400",children:((xe=(pe=i==null?void 0:i.grouped)==null?void 0:pe.opportunities)==null?void 0:xe.length)||0})]}),jsxRuntimeExports.jsx("div",{className:"p-6 py-2",children:(Y=(oe=i==null?void 0:i.grouped)==null?void 0:oe.opportunities)==null?void 0:Y.map((ee,ye)=>jsxRuntimeExports.jsxs("div",{className:"text-xs text-brand-600 dark:text-brand-300 flex justify-between py-0.5",children:[jsxRuntimeExports.jsx("span",{children:ee.name}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:ee.displayValue})]},ye))})]}),((H=(ae=i==null?void 0:i.grouped)==null?void 0:ae.diagnostics)==null?void 0:H.length)>0&&jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-4 text-sm font-semibold text-brand-900 dark:text-brand-300 border-b border-brand-200 px-6 py-2",children:[jsxRuntimeExports.jsx("span",{children:"Diagnostics"}),jsxRuntimeExports.jsx("span",{className:"flex text-xxs items-center text-brand-0 dark:text-brand-900 justify-center rounded-full w-6 h-6 border-2 border-yellow-400 bg-yellow-400",children:((U=(W=i==null?void 0:i.grouped)==null?void 0:W.diagnostics)==null?void 0:U.length)||0})]}),jsxRuntimeExports.jsx("div",{className:"p-6 pt-2",children:(me=(ie=i==null?void 0:i.grouped)==null?void 0:ie.diagnostics)==null?void 0:me.map((ee,ye)=>jsxRuntimeExports.jsxs("div",{className:"text-xs text-brand-600 dark:text-brand-300 flex justify-between py-0.5",children:[jsxRuntimeExports.jsx("span",{children:ee.name}),jsxRuntimeExports.jsx("span",{className:"font-medium",children:ee.displayValue})]},ye))})]})]})]})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-semibold",children:"Before Score"}),jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:cn("max-h-[180px]"),background:!1,stroke:6,loading:j.first_entry<1,performance:j.first_entry>1?j.first_entry:80})}),jsxRuntimeExports.jsxs("div",{className:"text-sm font-semibold flex items-center gap-1",children:[jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 transition-all relative inline-flex"),style:{fill:C[1]}})," Performance Score"]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2 relative",children:[jsxRuntimeExports.jsx(PerformanceArrowIcon,{className:"text-brand-900 dark:text-brand-300",fill:C[1]}),jsxRuntimeExports.jsxs("div",{className:"text-brand-900 dark:text-brand-300 font-bold text-2xl text-center",children:[jsxRuntimeExports.jsx("span",{className:"absolute -top-8 left-0 right-0 text-brand-900 dark:text-brand-300 font-normal text-xl",children:"Boosted with"}),G(),"%"]}),jsxRuntimeExports.jsx(PerformanceArrowIcon,{className:"text-brand-900 dark:text-brand-300",fill:S[1]})]}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center gap-4",children:[jsxRuntimeExports.jsx("div",{className:"text-lg font-semibold dark:text-brand-300",children:"Current Score"}),jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:cn("max-h-[180px]"),scoreClassName:"text-brand-950 dark:text-brand-300",background:!1,stroke:6,loading:j.last_entry<1,performance:j.last_entry>1?j.last_entry:80})}),jsxRuntimeExports.jsxs("div",{className:"text-sm font-semibold flex items-center gap-1",children:[jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 transition-all relative inline-flex"),style:{fill:S[1]}})," Performance Score"]})]})]})}),!I&&jsxRuntimeExports.jsx("div",{className:"flex justify-center p-4 mx-auto w-full relative items-center gap-4 ",children:jsxRuntimeExports.jsx("div",{className:"w-full max-w-2xl ",children:$()})}),jsxRuntimeExports.jsxs("button",{className:"flex items-center bg-gradient-to-r from-brand-900/90 to-brand-950 text-white font-medium py-2 px-4 rounded-lg hover:bg-gray-700 transition-all gap-2 dark:bg-brand-800 dark:text-brand-300 dark:border-brand-600 dark:border",onClick:V,children:["Go to Dashboard",jsxRuntimeExports.jsx(ForwardRef$D,{className:"w-6 h-6"})]})]})})})};function Onboard(){const[s,a]=reactExports.useState(0);useAppContext(),reactExports.useEffect(()=>{if(hasQueryParam("nonce")){a(2);const E=new URL(window.location.href),j=E.searchParams.get("page");E.search=j?`?page=${j}`:"",window.history.replaceState({},"",E.toString())}},[]);const i=[{component:jsxRuntimeExports.jsx(StepOne,{onNext:()=>a(1)}),key:"stepOne"},{component:jsxRuntimeExports.jsx(StepTwo,{onNext:()=>a(2)}),key:"stepTwo"},{component:jsxRuntimeExports.jsx(StepThree,{onNext:()=>a(3)}),key:"stepThree"},{component:jsxRuntimeExports.jsx(StepFour,{}),key:"stepFour"}];return reactExports.useEffect(()=>{const E=`#/onboard/${s+1}`;window.history.replaceState(null,"",E)},[s]),jsxRuntimeExports.jsx("div",{id:"rapidload-page-optimizer-wrapper",className:cn("h-fit font-sans overflow-hidden flex flex-col text-base items-center"),children:jsxRuntimeExports.jsx("div",{id:"onboard-content",className:cn("overflow-y-auto w-full min-h-screen flex items-center justify-center","dark:bg-brand-900"),children:jsxRuntimeExports.jsx("section",{className:cn("relative container flex flex-col p-6 gap-4","max-w-7xl mx-auto"),children:jsxRuntimeExports.jsx(AnimatePresence,{mode:"wait",children:jsxRuntimeExports.jsx(motion.div,{initial:{x:100,opacity:0},animate:{x:0,opacity:1},exit:{x:-100,opacity:0},transition:{duration:.2},children:i[s].component},i[s].key)})})})})}const TestModeSwitcher=()=>{const{testMode:s}=useSelector(optimizerData),[a,i]=reactExports.useState(!1),{testModeStatus:o,testModeLoading:E,dispatch:j}=useCommonDispatch(),{handleTestModeSwitchChange:R}=useTestModeUtils();useAppContext(),useSelector(optimizerData),reactExports.useEffect(()=>{s&&j(setCommonState("testModeStatus",s))},[s,j]);const C=async S=>{await R(S)};return reactExports.useEffect(()=>{i(E)},[o,E,s]),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("div",{className:"flex gap-4 justify-center",children:[a&&jsxRuntimeExports.jsx(TooltipText,{text:`Turning ${o?"on Test Mode":"on Live Mode"}`,className:"dark:bg-brand-930/90",children:jsxRuntimeExports.jsx(Loader,{className:"w-5 animate-spin"})}),jsxRuntimeExports.jsxs("div",{className:cn("flex items-center gap-2 justify-between p-2 px-4 rounded-xl text-sm font-medium transition-all duration-300",""),children:[jsxRuntimeExports.jsx("div",{className:"flex flex-col",children:"Test Mode"}),jsxRuntimeExports.jsx(Switch,{checked:!!s,onCheckedChange:async()=>{await C(!s)},className:"self-center data-[state=checked]:bg-[#FFAA34]"})]})]})})},JOB_OPTIONS=[{value:"1",label:"1 Job"},{value:"2",label:"2 Jobs"},{value:"3",label:"3 Jobs"}],TIME_INTERVAL_OPTIONS=[{value:"60",label:"1 Minute"},{value:"300",label:"5 Minutes"},{value:"600",label:"10 Minutes"},{value:"1800",label:"30 Minutes"},{value:"3600",label:"1 Hour"}],GeneralSettings=({onClose:s})=>{const{dispatch:a}=useCommonDispatch(),{options:i,uucssGlobal:o}=useAppContext(),[E,j]=reactExports.useState(o.active_modules.general.options),[R,C]=reactExports.useState(()=>{var V,G;const $=((V=E.uucss_jobs_per_queue)==null?void 0:V.toString())||"1";return((G=JOB_OPTIONS.find(K=>K.value===$))==null?void 0:G.value)||JOB_OPTIONS[0].value}),[S,_]=reactExports.useState(()=>{var V,G;const $=((V=E.uucss_queue_interval)==null?void 0:V.toString())||"600";return((G=TIME_INTERVAL_OPTIONS.find(K=>K.value===$))==null?void 0:G.value)||TIME_INTERVAL_OPTIONS[2].value}),{toast:T}=useToast(),[P,N]=reactExports.useState(!1);reactExports.useEffect(()=>{var $,V;E&&(C((($=E.uucss_jobs_per_queue)==null?void 0:$.toString())||"1"),_(((V=E.uucss_queue_interval)==null?void 0:V.toString())||"600"))},[E]);const I=$=>{j(V=>({...V,[$]:!V[$]}))},M=async()=>{N(!0);try{const $={...E,uucss_jobs_per_queue:parseInt(R),uucss_queue_interval:parseInt(S)},V=await a(saveGeneralSettings(i,$));V.success?T({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Settings saved successfully ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})]})}):T({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[V.error||"Failed to save settings. Please try again."," ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]})})}catch($){T({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[typeof $=="string"?$:"Error on Saving general settings","  ",jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-600"})]})})}finally{N(!1)}},D=($,V,G)=>{const K=typeof E[G]=="boolean"?E[G]:!1;return jsxRuntimeExports.jsxs("div",{className:"relative flex gap-2 font-medium text-base w-fit items-center py-1 dark:text-brand-300",children:[jsxRuntimeExports.jsx(Checkbox,{checked:K,onCheckedChange:()=>I(G)}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("div",{className:"select-none cursor-pointer",children:$}),jsxRuntimeExports.jsx("p",{className:"text-sm font-normal select-none",children:V})]})]})},B=($,V,G)=>{const K=Array.isArray(E[G])?E[G].join(`
`):"";return jsxRuntimeExports.jsxs("div",{className:"grid items-center my-4",children:[jsxRuntimeExports.jsx("div",{className:"text-sm font-semibold dark:text-brand-300",children:$}),jsxRuntimeExports.jsx("div",{className:"text-xs font-normal dark:text-brand-300 text-brand-500 mt-1",children:V}),jsxRuntimeExports.jsx(Textarea,{className:"mt-1 focus:outline-none focus-visible:ring-0 dark:text-brand-300 rounded-2xl",value:K,onChange:J=>j({...E,[G]:J.target.value.split(`
`)})})]})},[F,O]=reactExports.useState(!1),L=()=>{O($=>!$)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"content flex w-full sm:w-1/2 lg:w-full flex-col px-6",children:[D("Minify HTML","Minify the HTML output of your pages.","rapidload_minify_html"),D("Query String","Identify URLs with query strings as separate URLs.","uucss_query_string"),D("Preload Links","Preload internal links for faster navigation.","preload_internal_links"),D("Debug Mode","Enable debug logs for RapidLoad.","uucss_enable_debug"),jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-left dark:bg-brand-800/40 w-full dark:text-brand-300 bg-brand-100/30 rounded-xl py-4 px-4 border border-brand-200/60 my-2",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center justify-between cursor-pointer ",onClick:L,children:[jsxRuntimeExports.jsxs("div",{className:"flex flex-col",children:[jsxRuntimeExports.jsx("span",{children:"Queue Options"}),jsxRuntimeExports.jsx("span",{className:"text-sm font-normal text-gray-600 sm:max-w-[425px] dark:text-brand-300",children:"More advanced options for pro users."})]}),jsxRuntimeExports.jsx(ForwardRef$u,{className:`h-5 transition-all ${F&&"rotate-[90deg]"}`})]}),jsxRuntimeExports.jsxs(Accordion$1,{className:"flex flex-col text-left w-full gap-1 mt-6 ml-3",initialRender:!0,isOpen:F,children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-4 mb-1",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-brand-300",children:"Run"}),jsxRuntimeExports.jsxs(Select,{value:R,onValueChange:$=>C($),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-[130px] capitalize bg-brand-0 dark:text-brand-300 dark:bg-brand-950",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"1 Job"})}),jsxRuntimeExports.jsx(SelectContent,{className:"z-[100001]",children:jsxRuntimeExports.jsxs(SelectGroup,{children:[jsxRuntimeExports.jsx(SelectLabel,{children:"Jobs"}),JOB_OPTIONS.map(($,V)=>jsxRuntimeExports.jsx(SelectItem,{className:"capitalize cursor-pointer",value:$.value,children:$.label},V))]})})]})]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx("label",{className:"text-sm font-medium text-gray-700 dark:text-brand-300",children:"Per"}),jsxRuntimeExports.jsxs(Select,{value:S,onValueChange:$=>_($),children:[jsxRuntimeExports.jsx(SelectTrigger,{className:"w-[130px] capitalize bg-brand-0 dark:text-brand-300 dark:bg-brand-950",children:jsxRuntimeExports.jsx(SelectValue,{placeholder:"10 Minutes"})}),jsxRuntimeExports.jsx(SelectContent,{className:"z-[100001]",children:jsxRuntimeExports.jsxs(SelectGroup,{children:[jsxRuntimeExports.jsx(SelectLabel,{children:"Time Interval"}),TIME_INTERVAL_OPTIONS.map(($,V)=>jsxRuntimeExports.jsx(SelectItem,{className:"capitalize cursor-pointer",value:$.value,children:$.label},V))]})})]})]})]}),D("Disable Auto Queue","Disable jobs adding to queue on user visits.","uucss_disable_add_to_queue"),D("Disable Re-Queue","Disable jobs re-queuing on warnings.","uucss_disable_add_to_re_queue")]})]}),jsxRuntimeExports.jsxs("div",{className:"text-left flex w-fit gap-2 mt-2",children:[jsxRuntimeExports.jsx(Button,{className:"flex gap-2 dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",onClick:()=>{window.open("/wp-admin/options-general.php?page=uucss_legacy&uucss_jobs","_blank")},variant:"outline",children:"CSS Job Optimizations Table"}),jsxRuntimeExports.jsx(Button,{className:"flex gap-2 dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",onClick:()=>{window.location.href="/wp-admin/admin.php?page=rapidload-legacy-dashboard#/"},variant:"outline",children:"Dashboard 2.0"})]}),B("Exclude URLs","URLs that need to be excluded from RapidLoad optimization.","uucss_excluded_links")]}),jsxRuntimeExports.jsxs("div",{className:"border-t flex justify-end mt-4 px-4 pt-4 gap-2",children:[jsxRuntimeExports.jsxs(AppButton,{onClick:M,className:"text-sm font-semibold text-white py-1.5 px-4 rounded-lg bg-primary hover:bg-primary/90 dark:text-brand-950",children:[P&&jsxRuntimeExports.jsx(Loader,{className:"w-4 animate-spin "})," Save Changes"]}),jsxRuntimeExports.jsx(AppButton,{onClick:()=>s(!1),className:"mr-2 text-sm text-gray-500 bg-brand-0 hover:bg-accent border border-input dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",children:"Close"})]})]})},GeneralSettingsTrigger=({open:s,onOpenChange:a})=>jsxRuntimeExports.jsxs(Dialog,{open:s,onOpenChange:a,children:[jsxRuntimeExports.jsx(DialogTrigger,{asChild:!0,children:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(TooltipText,{text:"General Settings",children:jsxRuntimeExports.jsx(ForwardRef$2,{className:"w-5 text-brand-400"})})})}),jsxRuntimeExports.jsx(DialogTitle,{}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[650px]",children:[jsxRuntimeExports.jsx(DialogHeader,{className:"border-b px-6 py-4 mt-1",children:jsxRuntimeExports.jsx(DialogTitle,{children:"General Settings"})}),jsxRuntimeExports.jsx("div",{className:"py-2",children:jsxRuntimeExports.jsx(GeneralSettings,{onClose:a})}),jsxRuntimeExports.jsx(DialogDescription,{})]})]}),ContentSelector=({data:s,onOpenChange:a})=>{var $;const[i,o]=reactExports.useState(""),[E,j]=reactExports.useState(null),[R,C]=reactExports.useState([]),[S,_]=reactExports.useState(!1),{dispatch:T}=useCommonDispatch(),{options:P}=useAppContext(),[N,I]=reactExports.useState(!1);reactExports.useRef(null);const M=s?s.filter(V=>V.post_type.toLowerCase().includes(i.toLowerCase())):[],D=E?(($=s.find(V=>V.post_type===E))==null?void 0:$.links)||[]:[],B=V=>{o(V.target.value),_(!1)},F=V=>{j(V),C([])},O=()=>{j(null),o(""),C([])},L=V=>{T(setCommonState("headerUrl",V.permalink)),T(fetchSettings(P,V.permalink,!0)),T(fetchReport(P,V.permalink,!0)),window.location.hash="#/optimize",a(!1)};return reactExports.useEffect(()=>{const V=async()=>{if(i.length<3||!E){C([]);return}try{I(!0);const K=await T(searchData(P,"rapidload_fetch_post_search_by_title_or_permalink",i,E));K.success?(C(K.data),_(!1)):(C([]),i&&_(!0))}catch(K){K instanceof DOMException&&K.name==="AbortError"?console.error("Search aborted:",K):console.error("Error fetching optimization data:",K)}finally{I(!1)}},G=setTimeout(()=>{V()},300);return()=>{clearTimeout(G)}},[i,E,T,P]),reactExports.useEffect(()=>{I(!s)},[s]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center px-6 py-3 ",children:[E&&jsxRuntimeExports.jsx("button",{onClick:O,className:"mr-3",children:jsxRuntimeExports.jsx(ForwardRef$m,{className:"h-6 w-6 text-gray-500 dark:text-brand-300"})}),jsxRuntimeExports.jsx("div",{className:"text-gray-900 font-medium text-lg dark:text-brand-300",children:E?`Select ${E.charAt(0).toUpperCase()+E.slice(1)}`:"Select a content to Optimize"})]}),jsxRuntimeExports.jsxs("div",{className:"border-t border-1 px-6 pt-6",children:[jsxRuntimeExports.jsx("input",{type:"text",placeholder:E?`Search ${E}`:"Search content types",value:i,onChange:B,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-gray-400 dark:text-brand-300 dark:bg-brand-950 dark:border-brand-800/80 dark:focus:border-brand-600/40"}),jsxRuntimeExports.jsx("ul",{className:"overflow-y-auto mt-4 max-h-72",children:N?jsxRuntimeExports.jsxs("div",{className:"flex gap-4",children:[jsxRuntimeExports.jsx(Skeleton,{className:"w-72 h-10 "}),jsxRuntimeExports.jsx(Skeleton,{className:"w-72 h-10 "})]}):E?i&&R.length>0?R.map(V=>jsxRuntimeExports.jsx("li",{className:"py-4 cursor-pointer hover:bg-gray-50 rounded-xl dark:hover:bg-brand-800/40",onClick:()=>L(V),children:jsxRuntimeExports.jsxs("div",{className:"flex mx-6 justify-between items-center dark:text-brand-300",children:[jsxRuntimeExports.jsx("div",{className:"text-gray-900 font-medium dark:text-brand-300",children:V.title}),jsxRuntimeExports.jsx(ForwardRef$6,{className:"h-6 w-6 text-gray-500 dark:text-brand-300"})]})},V.permalink)):S?jsxRuntimeExports.jsx("div",{className:"text-gray-500 text-center py-4",children:"No results found"}):i.length<3&&D.map(V=>jsxRuntimeExports.jsx("li",{className:"py-4 cursor-pointer hover:bg-gray-50 rounded-xl dark:hover:bg-brand-800/40",onClick:()=>L(V),children:jsxRuntimeExports.jsxs("div",{className:"flex mx-6 justify-between items-center dark:text-brand-300",children:[jsxRuntimeExports.jsx("div",{className:"text-gray-900 font-medium dark:text-brand-300",children:V.title}),jsxRuntimeExports.jsx(ForwardRef$6,{className:"h-6 w-6 text-gray-500 dark:text-brand-300"})]})},V.permalink)):M.map(V=>jsxRuntimeExports.jsx("li",{className:"py-4 cursor-pointer hover:bg-gray-50 rounded-xl dark:hover:bg-brand-800/40",onClick:()=>F(V.post_type),children:jsxRuntimeExports.jsxs("div",{className:"flex mx-6 justify-between items-center dark:text-brand-300",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-4",children:[jsxRuntimeExports.jsx("div",{className:"text-gray-900 font-medium capitalize dark:text-brand-300",children:V.post_type}),jsxRuntimeExports.jsxs("span",{className:"text-gray-500 text-xs border border-0.5 rounded-lg px-2 py-0.5 bg-brand-0 dark:text-brand-300 dark:bg-brand-800/40",children:[V.links.length," ",V.post_type]})]}),jsxRuntimeExports.jsx(ForwardRef$k,{className:"h-6 w-6 text-gray-500 dark:text-brand-300"})]})},V.post_type))})]})]})},OptimzePagesTrigger=({open:s,onOpenChange:a,data:i})=>jsxRuntimeExports.jsxs(Dialog,{open:s,onOpenChange:a,children:[jsxRuntimeExports.jsx(DialogTitle,{}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[650px]",children:[jsxRuntimeExports.jsx(DialogHeader,{className:"border-b px-6 py-4 mt-1 hidden",children:jsxRuntimeExports.jsx(DialogTitle,{})}),jsxRuntimeExports.jsx(DialogDescription,{}),jsxRuntimeExports.jsx("div",{className:"py-2",children:jsxRuntimeExports.jsx(ContentSelector,{data:i,onOpenChange:a})}),jsxRuntimeExports.jsx(DialogFooter,{className:"px-6 py-3 border-t",children:jsxRuntimeExports.jsx(AppButton,{onClick:()=>a(!1),variant:"outline",className:"text-sm dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",children:"Close"})})]})]}),DateComponent=({data:s})=>{const i=new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return jsxRuntimeExports.jsx("div",{className:"text-sm text-gray-600 dark:text-brand-300",children:i})},PercentageIndicator=({percentage:s,className:a})=>{const i=s>0,o=i?"bg-green-200/40 dark:bg-green-900/40":"bg-red-200/40 dark:bg-red-900/40",E=i?"text-green-700 dark:text-green-300":"text-red-700 dark:text-red-300",j=i?ForwardRef$h:ForwardRef$i;return jsxRuntimeExports.jsxs("span",{className:cn(`${o} px-3 py-1.5 rounded-xl flex w-fit gap-2 items-center cursor-pointer ${E}`,a),children:[s,"% ",jsxRuntimeExports.jsx(j,{className:"w-4 h-4"})]})},TableSkeleton=({rows:s,columns:a})=>{const i=Array.from({length:s}).map((o,E)=>jsxRuntimeExports.jsx("tr",{className:E%2===0?"bg-gray-100/30 dark:bg-brand-950":"bg-white dark:bg-brand-900",children:Array.from({length:a}).map((j,R)=>jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:jsxRuntimeExports.jsx(Skeleton,{className:"w-full h-[48px] rounded-[18px]"})},R))},E));return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:i})},OptimizerPagesTable=({settings:s,onOpenChange:a})=>{const[i,o]=reactExports.useState(!1),{optimizationData:E,allPosts:j}=useSelector(ne=>ne.app),{toast:R}=useToast(),{options:C}=useAppContext(),{dispatch:S}=useCommonDispatch(),[_,T]=reactExports.useState(!0),[P,N]=reactExports.useState({startFrom:0,limit:10,hasMore:!1}),[I,M]=reactExports.useState([]),D=reactExports.useRef(null),[B,F]=reactExports.useState(""),O=reactExports.useRef(null);reactExports.useEffect(()=>{E&&M(ne=>[...ne,...E])},[E]);const L=async(ne=!1)=>{try{ne&&(M([]),N({startFrom:0,limit:10,hasMore:!1}));const le=await S(getTitanOptimizationData(C,P.startFrom,P.limit));N(ue=>({...ue,hasMore:le.hasMoreData||!1}))}catch(le){console.error("Error fetching optimization data:",le)}finally{T(!1)}},$=ne=>{S(setCommonState("headerUrl",ne)),S(fetchSettings(C,ne,!1)),S(fetchReport(C,ne,!1)),window.location.hash="#/optimize",a(!1)};reactExports.useEffect(()=>{P.startFrom<1?L(!0):L()},[P.startFrom]);const V=()=>{const ne=D.current;!ne||_||!P.hasMore||ne.scrollTop+ne.clientHeight>=ne.scrollHeight&&N(le=>({...le,startFrom:le.startFrom+le.limit}))};reactExports.useEffect(()=>{const ne=D.current;if(ne)return ne.addEventListener("scroll",V),()=>ne.removeEventListener("scroll",V)},[_,P.hasMore]);const G=async ne=>{try{T(!0),(await S(deleteOptimizedData(C,ne))).success&&R({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Optimization deleted successfully ",jsxRuntimeExports.jsx(ForwardRef$e,{className:"w-5 text-green-600"})]})})}catch(le){R({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:[typeof le=="string"?le:"Error deleting data","  ",jsxRuntimeExports.jsx(ForwardRef$4,{className:"w-5 text-red-600"})]})})}finally{T(!1),L(!0)}},K=async ne=>{try{T(!0);const le=await S(searchData(C,"rapidload_titan_optimizations_data",ne));le.success&&M(le.data)}catch(le){console.error("Error no data found:",le)}finally{T(!1)}},J=ne=>{const le=ne.target.value;F(le),O.current&&clearTimeout(O.current),le.length>3?O.current=setTimeout(()=>{K(le)},300):le.length<1&&L(!0)};return reactExports.useEffect(()=>()=>{O.current&&clearTimeout(O.current)},[]),jsxRuntimeExports.jsx("div",{className:"w-full flex flex-col gap-4",children:jsxRuntimeExports.jsx(Card,{className:cn("rounded-xl px-3 py-3 overflow-hidden border border-transparent dark:border-brand-800 flex flex-col sm:flex-row lg:flex-col justify-around border-brand-200 dark:border-brand-800"),children:jsxRuntimeExports.jsxs("div",{className:"content flex w-full sm:w-1/2 lg:w-full flex-col px-3 py-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center justify-between",children:[jsxRuntimeExports.jsxs("div",{className:"grid dark:text-brand-300 select-none",children:[jsxRuntimeExports.jsx("div",{className:"font-medium text-base",children:s.title}),jsxRuntimeExports.jsx("div",{className:"text-sm font-normal",children:s.description})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-4",children:[jsxRuntimeExports.jsxs("div",{className:"relative w-full",children:[jsxRuntimeExports.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3",children:jsxRuntimeExports.jsx(ForwardRef$8,{className:"h-6 w-6 text-brand-400/60"})}),jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search",className:"w-full pl-10 py-2 border border-gray-300 rounded-lg focus:outline-none focus:border-gray-400 dark:text-brand-300 dark:bg-brand-950 dark:border-brand-800/80 dark:focus:border-brand-600/40",value:B,onChange:J})]}),jsxRuntimeExports.jsxs(Dialog,{open:i,onOpenChange:o,children:[jsxRuntimeExports.jsx(DialogTrigger,{asChild:!0,children:jsxRuntimeExports.jsxs("button",{className:"rounded-lg flex gap-2 items-center cursor-pointer bg-black text-brand-0 py-1 px-[11px] pr-[15px] dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",children:[jsxRuntimeExports.jsx(ForwardRef$6,{className:"w-5 h-5"})," Add"]})}),jsxRuntimeExports.jsx(DialogTitle,{}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:max-w-[650px]",children:[jsxRuntimeExports.jsx("div",{className:"py-2",children:jsxRuntimeExports.jsx(ContentSelector,{data:j,onOpenChange:o})}),jsxRuntimeExports.jsx(DialogFooter,{className:"px-6 py-3 border-t",children:jsxRuntimeExports.jsx(AppButton,{onClick:()=>o(!1),variant:"outline",className:"text-sm",children:"Close"})})]})]})]})]}),jsxRuntimeExports.jsx("div",{className:"flex flex-col mt-4",children:jsxRuntimeExports.jsx("div",{className:"-m-1.5 overflow-x-auto",children:jsxRuntimeExports.jsx("div",{className:" p-1.5 min-w-full inline-block align-middle",children:jsxRuntimeExports.jsxs("div",{ref:D,className:"max-h-[600px] overflow-y-auto border rounded-[10px] overflow-hidden",children:[jsxRuntimeExports.jsxs("table",{className:"min-w-full divide-y divide-gray-200 dark:divide-brand-950 dark:text-brand-300",children:[jsxRuntimeExports.jsx("thead",{className:"dark:bg-brand-900 sticky top-0 z-10 bg-brand-0",children:jsxRuntimeExports.jsxs("tr",{children:[jsxRuntimeExports.jsx("th",{scope:"col",className:"px-6 py-4 text-start text-xs font-medium uppercase",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(ForwardRef$9,{className:"h-4 w-4"})," URLs"]})}),jsxRuntimeExports.jsx("th",{scope:"col",className:"px-6 py-4 text-start text-xs font-medium uppercase",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(ScoreIcon,{className:"h-4 w-4 dark:text-brand-300"})," Page Score"]})}),jsxRuntimeExports.jsx("th",{scope:"col",className:"px-6 py-4 text-start text-xs font-medium uppercase",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(ForwardRef$f,{className:"h-4 w-4 dark:text-brand-300"})," Update Date"]})}),jsxRuntimeExports.jsx("th",{scope:"col",className:"px-6 py-4 text-start text-xs font-medium uppercase",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(ForwardRef$c,{className:"h-4 w-4"})," Actions"]})})]})}),jsxRuntimeExports.jsx("tbody",{className:"divide-y divide-gray-200 dark:divide-brand-950",children:_?jsxRuntimeExports.jsx(TableSkeleton,{rows:4,columns:4}):I.length>0?I.map((ne,le)=>{var ue,ce;return ne.url?jsxRuntimeExports.jsxs("tr",{className:le%2===0?"bg-gray-100/30 dark:bg-brand-950":"bg-white dark:bg-brand-900",children:[jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-800 dark:text-brand-300",children:ne.url}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:jsxRuntimeExports.jsx(PercentageIndicator,{percentage:calculatePercentage((ue=ne.first_data)==null?void 0:ue.performance,(ce=ne.last_data)==null?void 0:ce.performance)})}),jsxRuntimeExports.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-800 dark:text-brand-300",children:jsxRuntimeExports.jsx(DateComponent,{data:ne.created_at})}),jsxRuntimeExports.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium flex items-center gap-2",children:[jsxRuntimeExports.jsxs("span",{className:"bg-gray-100 px-3 py-1.5 rounded-xl flex w-fit gap-2 items-center cursor-pointer dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50",onClick:()=>$(ne.url),children:[jsxRuntimeExports.jsx(ForwardRef$7,{className:"w-4 h-4"})," Optimize"]}),jsxRuntimeExports.jsx(ForwardRef$5,{onClick:()=>G(ne.url),className:"w-4 h-4 cursor-pointer"})]})]},le):null}):jsxRuntimeExports.jsx("tr",{children:jsxRuntimeExports.jsx("td",{colSpan:4,className:"text-gray-500 text-center py-4",children:"No results found"})})})]}),P.hasMore&&I.length>9&&!B&&jsxRuntimeExports.jsx("div",{className:"py-4 text-center text-gray-500",children:"Loading more data..."})]})})})})]})})})},OptimizerTableTrigger=({open:s,onOpenChange:a,settings:i})=>jsxRuntimeExports.jsxs(Dialog,{open:s,onOpenChange:a,children:[jsxRuntimeExports.jsx(DialogTitle,{}),jsxRuntimeExports.jsxs(DialogContent,{className:"sm:min-w-[950px] bg-brand-100/90 p-6 pt-12 sm:rounded-3xl dark:bg-brand-950/90",children:[jsxRuntimeExports.jsx(DialogHeader,{className:"border-b px-6 py-4 mt-1 hidden",children:jsxRuntimeExports.jsx(DialogTitle,{})}),jsxRuntimeExports.jsx(DialogDescription,{}),jsxRuntimeExports.jsx("div",{className:"",children:jsxRuntimeExports.jsx(OptimizerPagesTable,{settings:i,onOpenChange:a})})]})]}),ThemeSwitcher=({action:s=!0})=>{const{theme:a,setTheme:i,changeTheme:o}=useRootContext();return jsxRuntimeExports.jsx("div",{className:"cursor-pointer select-none",onClick:E=>s&&o(),children:a==="dark"?jsxRuntimeExports.jsx(Moon,{className:"w-5"}):a==="light"?jsxRuntimeExports.jsx(Sun,{className:"w-5"}):jsxRuntimeExports.jsx(Moon,{className:"w-5"})})};function ok$1(){}function unreachable(){}function stringify$1(s,a){const i={};return(s[s.length-1]===""?[...s,""]:s).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const nameRe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nameReJsx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,emptyOptions$2={};function name(s,a){return(emptyOptions$2.jsx?nameReJsx:nameRe).test(s)}const re=/[ \t\n\f\r]/g;function whitespace(s){return typeof s=="object"?s.type==="text"?empty$1(s.value):!1:empty$1(s)}function empty$1(s){return s.replace(re,"")===""}class Schema{constructor(a,i,o){this.property=a,this.normal=i,o&&(this.space=o)}}Schema.prototype.property={};Schema.prototype.normal={};Schema.prototype.space=null;function merge(s,a){const i={},o={};let E=-1;for(;++E<s.length;)Object.assign(i,s[E].property),Object.assign(o,s[E].normal);return new Schema(i,o,a)}function normalize$1(s){return s.toLowerCase()}class Info{constructor(a,i){this.property=a,this.attribute=i}}Info.prototype.space=null;Info.prototype.boolean=!1;Info.prototype.booleanish=!1;Info.prototype.overloadedBoolean=!1;Info.prototype.number=!1;Info.prototype.commaSeparated=!1;Info.prototype.spaceSeparated=!1;Info.prototype.commaOrSpaceSeparated=!1;Info.prototype.mustUseProperty=!1;Info.prototype.defined=!1;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types=Object.freeze(Object.defineProperty({__proto__:null,boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types);class DefinedInfo extends Info{constructor(a,i,o,E){let j=-1;if(super(a,i),mark(this,"space",E),typeof o=="number")for(;++j<checks.length;){const R=checks[j];mark(this,checks[j],(o&types[R])===types[R])}}}DefinedInfo.prototype.defined=!0;function mark(s,a,i){i&&(s[a]=i)}const own$4={}.hasOwnProperty;function create(s){const a={},i={};let o;for(o in s.properties)if(own$4.call(s.properties,o)){const E=s.properties[o],j=new DefinedInfo(o,s.transform(s.attributes||{},o),E,s.space);s.mustUseProperty&&s.mustUseProperty.includes(o)&&(j.mustUseProperty=!0),a[o]=j,i[normalize$1(o)]=o,i[normalize$1(j.attribute)]=o}return new Schema(a,i,s.space)}const xlink=create({space:"xlink",transform(s,a){return"xlink:"+a.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create({space:"xml",transform(s,a){return"xml:"+a.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(s,a){return a in s?s[a]:a}function caseInsensitiveTransform(s,a){return caseSensitiveTransform(s,a.toLowerCase())}const xmlns=create({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria=create({transform(s,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null}}),html$2=create({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:boolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null}}),svg$1=create({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap$1=/[A-Z]/g;function find(s,a){const i=normalize$1(a);let o=a,E=Info;if(i in s.normal)return s.property[s.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&valid.test(a)){if(a.charAt(4)==="-"){const j=a.slice(5).replace(dash,camelcase);o="data"+j.charAt(0).toUpperCase()+j.slice(1)}else{const j=a.slice(4);if(!dash.test(j)){let R=j.replace(cap$1,kebab);R.charAt(0)!=="-"&&(R="-"+R),a="data"+R}}E=DefinedInfo}return new E(o,a)}function kebab(s){return"-"+s.toLowerCase()}function camelcase(s){return s.charAt(1).toUpperCase()}const hastToReact={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},html$1=merge([xml,xlink,xmlns,aria,html$2],"html"),svg=merge([xml,xlink,xmlns,aria,svg$1],"svg");function stringify(s){return s.join(" ").trim()}var cjs={},COMMENT_REGEX=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,NEWLINE_REGEX=/\n/g,WHITESPACE_REGEX=/^\s*/,PROPERTY_REGEX=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,COLON_REGEX=/^:\s*/,VALUE_REGEX=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,SEMICOLON_REGEX=/^[;\s]*/,TRIM_REGEX=/^\s+|\s+$/g,NEWLINE=`
`,FORWARD_SLASH="/",ASTERISK="*",EMPTY_STRING="",TYPE_COMMENT="comment",TYPE_DECLARATION="declaration",inlineStyleParser=function(s,a){if(typeof s!="string")throw new TypeError("First argument must be a string");if(!s)return[];a=a||{};var i=1,o=1;function E(M){var D=M.match(NEWLINE_REGEX);D&&(i+=D.length);var B=M.lastIndexOf(NEWLINE);o=~B?M.length-B:o+M.length}function j(){var M={line:i,column:o};return function(D){return D.position=new R(M),_(),D}}function R(M){this.start=M,this.end={line:i,column:o},this.source=a.source}R.prototype.content=s;function C(M){var D=new Error(a.source+":"+i+":"+o+": "+M);if(D.reason=M,D.filename=a.source,D.line=i,D.column=o,D.source=s,!a.silent)throw D}function S(M){var D=M.exec(s);if(D){var B=D[0];return E(B),s=s.slice(B.length),D}}function _(){S(WHITESPACE_REGEX)}function T(M){var D;for(M=M||[];D=P();)D!==!1&&M.push(D);return M}function P(){var M=j();if(!(FORWARD_SLASH!=s.charAt(0)||ASTERISK!=s.charAt(1))){for(var D=2;EMPTY_STRING!=s.charAt(D)&&(ASTERISK!=s.charAt(D)||FORWARD_SLASH!=s.charAt(D+1));)++D;if(D+=2,EMPTY_STRING===s.charAt(D-1))return C("End of comment missing");var B=s.slice(2,D-2);return o+=2,E(B),s=s.slice(D),o+=2,M({type:TYPE_COMMENT,comment:B})}}function N(){var M=j(),D=S(PROPERTY_REGEX);if(D){if(P(),!S(COLON_REGEX))return C("property missing ':'");var B=S(VALUE_REGEX),F=M({type:TYPE_DECLARATION,property:trim(D[0].replace(COMMENT_REGEX,EMPTY_STRING)),value:B?trim(B[0].replace(COMMENT_REGEX,EMPTY_STRING)):EMPTY_STRING});return S(SEMICOLON_REGEX),F}}function I(){var M=[];T(M);for(var D;D=N();)D!==!1&&(M.push(D),T(M));return M}return _(),I()};function trim(s){return s?s.replace(TRIM_REGEX,EMPTY_STRING):EMPTY_STRING}var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(cjs,"__esModule",{value:!0});var _default=cjs.default=StyleToObject,inline_style_parser_1=__importDefault(inlineStyleParser);function StyleToObject(s,a){var i=null;if(!s||typeof s!="string")return i;var o=(0,inline_style_parser_1.default)(s),E=typeof a=="function";return o.forEach(function(j){if(j.type==="declaration"){var R=j.property,C=j.value;E?a(R,C,j):C&&(i=i||{},i[R]=C)}}),i}const styleToObject=_default.default||_default,pointEnd=point$2("end"),pointStart=point$2("start");function point$2(s){return a;function a(i){const o=i&&i.position&&i.position[s]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function position$1(s){const a=pointStart(s),i=pointEnd(s);if(a&&i)return{start:a,end:i}}function stringifyPosition(s){return!s||typeof s!="object"?"":"position"in s||"type"in s?position(s.position):"start"in s||"end"in s?position(s):"line"in s||"column"in s?point$1(s):""}function point$1(s){return index(s&&s.line)+":"+index(s&&s.column)}function position(s){return point$1(s&&s.start)+"-"+point$1(s&&s.end)}function index(s){return s&&typeof s=="number"?s:1}class VFileMessage extends Error{constructor(a,i,o){super(),typeof i=="string"&&(o=i,i=void 0);let E="",j={},R=!1;if(i&&("line"in i&&"column"in i?j={place:i}:"start"in i&&"end"in i?j={place:i}:"type"in i?j={ancestors:[i],place:i.position}:j={...i}),typeof a=="string"?E=a:!j.cause&&a&&(R=!0,E=a.message,j.cause=a),!j.ruleId&&!j.source&&typeof o=="string"){const S=o.indexOf(":");S===-1?j.ruleId=o:(j.source=o.slice(0,S),j.ruleId=o.slice(S+1))}if(!j.place&&j.ancestors&&j.ancestors){const S=j.ancestors[j.ancestors.length-1];S&&(j.place=S.position)}const C=j.place&&"start"in j.place?j.place.start:j.place;this.ancestors=j.ancestors||void 0,this.cause=j.cause||void 0,this.column=C?C.column:void 0,this.fatal=void 0,this.file,this.message=E,this.line=C?C.line:void 0,this.name=stringifyPosition(j.place)||"1:1",this.place=j.place||void 0,this.reason=this.message,this.ruleId=j.ruleId||void 0,this.source=j.source||void 0,this.stack=R&&j.cause&&typeof j.cause.stack=="string"?j.cause.stack:"",this.actual,this.expected,this.note,this.url}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;const own$3={}.hasOwnProperty,emptyMap=new Map,cap=/[A-Z]/g,dashSomething=/-([a-z])/g,tableElements=new Set(["table","tbody","thead","tfoot","tr"]),tableCellElement=new Set(["td","th"]),docs="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function toJsxRuntime(s,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=a.filePath||void 0;let o;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");o=developmentCreate(i,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");o=productionCreate(i,a.jsx,a.jsxs)}const E={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:o,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?svg:html$1,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},j=one$1(E,s,void 0);return j&&typeof j!="string"?j:E.create(s,E.Fragment,{children:j||void 0},void 0)}function one$1(s,a,i){if(a.type==="element")return element$1(s,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return mdxExpression(s,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return mdxJsxElement(s,a,i);if(a.type==="mdxjsEsm")return mdxEsm(s,a);if(a.type==="root")return root$1(s,a,i);if(a.type==="text")return text$3(s,a)}function element$1(s,a,i){const o=s.schema;let E=o;a.tagName.toLowerCase()==="svg"&&o.space==="html"&&(E=svg,s.schema=E),s.ancestors.push(a);const j=findComponentFromName(s,a.tagName,!1),R=createElementProps(s,a);let C=createChildren(s,a);return tableElements.has(a.tagName)&&(C=C.filter(function(S){return typeof S=="string"?!whitespace(S):!0})),addNode(s,R,j,a),addChildren(R,C),s.ancestors.pop(),s.schema=o,s.create(a,j,R,i)}function mdxExpression(s,a){if(a.data&&a.data.estree&&s.evaluater){const o=a.data.estree.body[0];return o.type,s.evaluater.evaluateExpression(o.expression)}crashEstree(s,a.position)}function mdxEsm(s,a){if(a.data&&a.data.estree&&s.evaluater)return s.evaluater.evaluateProgram(a.data.estree);crashEstree(s,a.position)}function mdxJsxElement(s,a,i){const o=s.schema;let E=o;a.name==="svg"&&o.space==="html"&&(E=svg,s.schema=E),s.ancestors.push(a);const j=a.name===null?s.Fragment:findComponentFromName(s,a.name,!0),R=createJsxElementProps(s,a),C=createChildren(s,a);return addNode(s,R,j,a),addChildren(R,C),s.ancestors.pop(),s.schema=o,s.create(a,j,R,i)}function root$1(s,a,i){const o={};return addChildren(o,createChildren(s,a)),s.create(a,s.Fragment,o,i)}function text$3(s,a){return a.value}function addNode(s,a,i,o){typeof i!="string"&&i!==s.Fragment&&s.passNode&&(a.node=o)}function addChildren(s,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(s.children=i)}}function productionCreate(s,a,i){return o;function o(E,j,R,C){const _=Array.isArray(R.children)?i:a;return C?_(j,R,C):_(j,R)}}function developmentCreate(s,a){return i;function i(o,E,j,R){const C=Array.isArray(j.children),S=pointStart(o);return a(E,j,R,C,{columnNumber:S?S.column-1:void 0,fileName:s,lineNumber:S?S.line:void 0},void 0)}}function createElementProps(s,a){const i={};let o,E;for(E in a.properties)if(E!=="children"&&own$3.call(a.properties,E)){const j=createProperty(s,E,a.properties[E]);if(j){const[R,C]=j;s.tableCellAlignToStyle&&R==="align"&&typeof C=="string"&&tableCellElement.has(a.tagName)?o=C:i[R]=C}}if(o){const j=i.style||(i.style={});j[s.stylePropertyNameCase==="css"?"text-align":"textAlign"]=o}return i}function createJsxElementProps(s,a){const i={};for(const o of a.attributes)if(o.type==="mdxJsxExpressionAttribute")if(o.data&&o.data.estree&&s.evaluater){const j=o.data.estree.body[0];j.type;const R=j.expression;R.type;const C=R.properties[0];C.type,Object.assign(i,s.evaluater.evaluateExpression(C.argument))}else crashEstree(s,a.position);else{const E=o.name;let j;if(o.value&&typeof o.value=="object")if(o.value.data&&o.value.data.estree&&s.evaluater){const C=o.value.data.estree.body[0];C.type,j=s.evaluater.evaluateExpression(C.expression)}else crashEstree(s,a.position);else j=o.value===null?!0:o.value;i[E]=j}return i}function createChildren(s,a){const i=[];let o=-1;const E=s.passKeys?new Map:emptyMap;for(;++o<a.children.length;){const j=a.children[o];let R;if(s.passKeys){const S=j.type==="element"?j.tagName:j.type==="mdxJsxFlowElement"||j.type==="mdxJsxTextElement"?j.name:void 0;if(S){const _=E.get(S)||0;R=S+"-"+_,E.set(S,_+1)}}const C=one$1(s,j,R);C!==void 0&&i.push(C)}return i}function createProperty(s,a,i){const o=find(s.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=o.commaSeparated?stringify$1(i):stringify(i)),o.property==="style"){let E=typeof i=="object"?i:parseStyle(s,String(i));return s.stylePropertyNameCase==="css"&&(E=transformStylesToCssCasing(E)),["style",E]}return[s.elementAttributeNameCase==="react"&&o.space?hastToReact[o.property]||o.property:o.attribute,i]}}function parseStyle(s,a){const i={};try{styleToObject(a,o)}catch(E){if(!s.ignoreInvalidStyle){const j=E,R=new VFileMessage("Cannot parse `style` attribute",{ancestors:s.ancestors,cause:j,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw R.file=s.filePath||void 0,R.url=docs+"#cannot-parse-style-attribute",R}}return i;function o(E,j){let R=E;R.slice(0,2)!=="--"&&(R.slice(0,4)==="-ms-"&&(R="ms-"+R.slice(4)),R=R.replace(dashSomething,toCamel)),i[R]=j}}function findComponentFromName(s,a,i){let o;if(!i)o={type:"Literal",value:a};else if(a.includes(".")){const E=a.split(".");let j=-1,R;for(;++j<E.length;){const C=name(E[j])?{type:"Identifier",name:E[j]}:{type:"Literal",value:E[j]};R=R?{type:"MemberExpression",object:R,property:C,computed:!!(j&&C.type==="Literal"),optional:!1}:C}o=R}else o=name(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(o.type==="Literal"){const E=o.value;return own$3.call(s.components,E)?s.components[E]:E}if(s.evaluater)return s.evaluater.evaluateExpression(o);crashEstree(s)}function crashEstree(s,a){const i=new VFileMessage("Cannot handle MDX estrees without `createEvaluater`",{ancestors:s.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=s.filePath||void 0,i.url=docs+"#cannot-handle-mdx-estrees-without-createevaluater",i}function transformStylesToCssCasing(s){const a={};let i;for(i in s)own$3.call(s,i)&&(a[transformStyleToCssCasing(i)]=s[i]);return a}function transformStyleToCssCasing(s){let a=s.replace(cap,toDash);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function toCamel(s,a){return a.toUpperCase()}function toDash(s){return"-"+s.toLowerCase()}const urlAttributes={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},emptyOptions$1={};function toString$1(s,a){const i=emptyOptions$1,o=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,E=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return one(s,o,E)}function one(s,a,i){if(node(s)){if("value"in s)return s.type==="html"&&!i?"":s.value;if(a&&"alt"in s&&s.alt)return s.alt;if("children"in s)return all(s.children,a,i)}return Array.isArray(s)?all(s,a,i):""}function all(s,a,i){const o=[];let E=-1;for(;++E<s.length;)o[E]=one(s[E],a,i);return o.join("")}function node(s){return!!(s&&typeof s=="object")}const element=document.createElement("i");function decodeNamedCharacterReference(s){const a="&"+s+";";element.innerHTML=a;const i=element.textContent;return i.charCodeAt(i.length-1)===59&&s!=="semi"||i===a?!1:i}function splice(s,a,i,o){const E=s.length;let j=0,R;if(a<0?a=-a>E?0:E+a:a=a>E?E:a,i=i>0?i:0,o.length<1e4)R=Array.from(o),R.unshift(a,i),s.splice(...R);else for(i&&s.splice(a,i);j<o.length;)R=o.slice(j,j+1e4),R.unshift(a,0),s.splice(...R),j+=1e4,a+=1e4}function push(s,a){return s.length>0?(splice(s,s.length,0,a),s):a}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(s){const a={};let i=-1;for(;++i<s.length;)syntaxExtension(a,s[i]);return a}function syntaxExtension(s,a){let i;for(i in a){const E=(hasOwnProperty.call(s,i)?s[i]:void 0)||(s[i]={}),j=a[i];let R;if(j)for(R in j){hasOwnProperty.call(E,R)||(E[R]=[]);const C=j[R];constructs(E[R],Array.isArray(C)?C:C?[C]:[])}}}function constructs(s,a){let i=-1;const o=[];for(;++i<a.length;)(a[i].add==="after"?s:o).push(a[i]);splice(s,0,0,o)}function decodeNumericCharacterReference(s,a){const i=Number.parseInt(s,a);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function normalizeIdentifier(s){return s.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(s){return s!==null&&(s<32||s===127)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(s){return s!==null&&s<-2}function markdownLineEndingOrSpace(s){return s!==null&&(s<0||s===32)}function markdownSpace(s){return s===-2||s===-1||s===32}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(s){return a;function a(i){return i!==null&&i>-1&&s.test(String.fromCharCode(i))}}function normalizeUri(s){const a=[];let i=-1,o=0,E=0;for(;++i<s.length;){const j=s.charCodeAt(i);let R="";if(j===37&&asciiAlphanumeric(s.charCodeAt(i+1))&&asciiAlphanumeric(s.charCodeAt(i+2)))E=2;else if(j<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(j))||(R=String.fromCharCode(j));else if(j>55295&&j<57344){const C=s.charCodeAt(i+1);j<56320&&C>56319&&C<57344?(R=String.fromCharCode(j,C),E=1):R="�"}else R=String.fromCharCode(j);R&&(a.push(s.slice(o,i),encodeURIComponent(R)),o=i+E+1,R=""),E&&(i+=E,E=0)}return a.join("")+s.slice(o)}function factorySpace(s,a,i,o){const E=o?o-1:Number.POSITIVE_INFINITY;let j=0;return R;function R(S){return markdownSpace(S)?(s.enter(i),C(S)):a(S)}function C(S){return markdownSpace(S)&&j++<E?(s.consume(S),C):(s.exit(i),a(S))}}const content$1={tokenize:initializeContent};function initializeContent(s){const a=s.attempt(this.parser.constructs.contentInitial,o,E);let i;return a;function o(C){if(C===null){s.consume(C);return}return s.enter("lineEnding"),s.consume(C),s.exit("lineEnding"),factorySpace(s,a,"linePrefix")}function E(C){return s.enter("paragraph"),j(C)}function j(C){const S=s.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=S),i=S,R(C)}function R(C){if(C===null){s.exit("chunkText"),s.exit("paragraph"),s.consume(C);return}return markdownLineEnding(C)?(s.consume(C),s.exit("chunkText"),j):(s.consume(C),R)}}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(s){const a=this,i=[];let o=0,E,j,R;return C;function C(L){if(o<i.length){const $=i[o];return a.containerState=$[1],s.attempt($[0].continuation,S,_)(L)}return _(L)}function S(L){if(o++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,E&&O();const $=a.events.length;let V=$,G;for(;V--;)if(a.events[V][0]==="exit"&&a.events[V][1].type==="chunkFlow"){G=a.events[V][1].end;break}F(o);let K=$;for(;K<a.events.length;)a.events[K][1].end={...G},K++;return splice(a.events,V+1,0,a.events.slice($)),a.events.length=K,_(L)}return C(L)}function _(L){if(o===i.length){if(!E)return N(L);if(E.currentConstruct&&E.currentConstruct.concrete)return M(L);a.interrupt=!!(E.currentConstruct&&!E._gfmTableDynamicInterruptHack)}return a.containerState={},s.check(containerConstruct,T,P)(L)}function T(L){return E&&O(),F(o),N(L)}function P(L){return a.parser.lazy[a.now().line]=o!==i.length,R=a.now().offset,M(L)}function N(L){return a.containerState={},s.attempt(containerConstruct,I,M)(L)}function I(L){return o++,i.push([a.currentConstruct,a.containerState]),N(L)}function M(L){if(L===null){E&&O(),F(0),s.consume(L);return}return E=E||a.parser.flow(a.now()),s.enter("chunkFlow",{_tokenizer:E,contentType:"flow",previous:j}),D(L)}function D(L){if(L===null){B(s.exit("chunkFlow"),!0),F(0),s.consume(L);return}return markdownLineEnding(L)?(s.consume(L),B(s.exit("chunkFlow")),o=0,a.interrupt=void 0,C):(s.consume(L),D)}function B(L,$){const V=a.sliceStream(L);if($&&V.push(null),L.previous=j,j&&(j.next=L),j=L,E.defineSkip(L.start),E.write(V),a.parser.lazy[L.start.line]){let G=E.events.length;for(;G--;)if(E.events[G][1].start.offset<R&&(!E.events[G][1].end||E.events[G][1].end.offset>R))return;const K=a.events.length;let J=K,ne,le;for(;J--;)if(a.events[J][0]==="exit"&&a.events[J][1].type==="chunkFlow"){if(ne){le=a.events[J][1].end;break}ne=!0}for(F(o),G=K;G<a.events.length;)a.events[G][1].end={...le},G++;splice(a.events,J+1,0,a.events.slice(K)),a.events.length=G}}function F(L){let $=i.length;for(;$-- >L;){const V=i[$];a.containerState=V[1],V[0].exit.call(a,s)}i.length=L}function O(){E.write([null]),j=void 0,E=void 0,a.containerState._closeFlow=void 0}}function tokenizeContainer(s,a,i){return factorySpace(s,s.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(s){if(s===null||markdownLineEndingOrSpace(s)||unicodeWhitespace(s))return 1;if(unicodePunctuation(s))return 2}function resolveAll(s,a,i){const o=[];let E=-1;for(;++E<s.length;){const j=s[E].resolveAll;j&&!o.includes(j)&&(a=j(a,i),o.push(j))}return a}const attention={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(s,a){let i=-1,o,E,j,R,C,S,_,T;for(;++i<s.length;)if(s[i][0]==="enter"&&s[i][1].type==="attentionSequence"&&s[i][1]._close){for(o=i;o--;)if(s[o][0]==="exit"&&s[o][1].type==="attentionSequence"&&s[o][1]._open&&a.sliceSerialize(s[o][1]).charCodeAt(0)===a.sliceSerialize(s[i][1]).charCodeAt(0)){if((s[o][1]._close||s[i][1]._open)&&(s[i][1].end.offset-s[i][1].start.offset)%3&&!((s[o][1].end.offset-s[o][1].start.offset+s[i][1].end.offset-s[i][1].start.offset)%3))continue;S=s[o][1].end.offset-s[o][1].start.offset>1&&s[i][1].end.offset-s[i][1].start.offset>1?2:1;const P={...s[o][1].end},N={...s[i][1].start};movePoint(P,-S),movePoint(N,S),R={type:S>1?"strongSequence":"emphasisSequence",start:P,end:{...s[o][1].end}},C={type:S>1?"strongSequence":"emphasisSequence",start:{...s[i][1].start},end:N},j={type:S>1?"strongText":"emphasisText",start:{...s[o][1].end},end:{...s[i][1].start}},E={type:S>1?"strong":"emphasis",start:{...R.start},end:{...C.end}},s[o][1].end={...R.start},s[i][1].start={...C.end},_=[],s[o][1].end.offset-s[o][1].start.offset&&(_=push(_,[["enter",s[o][1],a],["exit",s[o][1],a]])),_=push(_,[["enter",E,a],["enter",R,a],["exit",R,a],["enter",j,a]]),_=push(_,resolveAll(a.parser.constructs.insideSpan.null,s.slice(o+1,i),a)),_=push(_,[["exit",j,a],["enter",C,a],["exit",C,a],["exit",E,a]]),s[i][1].end.offset-s[i][1].start.offset?(T=2,_=push(_,[["enter",s[i][1],a],["exit",s[i][1],a]])):T=0,splice(s,o-1,i-o+3,_),i=o+_.length-T-2;break}}for(i=-1;++i<s.length;)s[i][1].type==="attentionSequence"&&(s[i][1].type="data");return s}function tokenizeAttention(s,a){const i=this.parser.constructs.attentionMarkers.null,o=this.previous,E=classifyCharacter(o);let j;return R;function R(S){return j=S,s.enter("attentionSequence"),C(S)}function C(S){if(S===j)return s.consume(S),C;const _=s.exit("attentionSequence"),T=classifyCharacter(S),P=!T||T===2&&E||i.includes(S),N=!E||E===2&&T||i.includes(o);return _._open=!!(j===42?P:P&&(E||!N)),_._close=!!(j===42?N:N&&(T||!P)),a(S)}}function movePoint(s,a){s.column+=a,s.offset+=a,s._bufferIndex+=a}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(s,a,i){let o=0;return E;function E(I){return s.enter("autolink"),s.enter("autolinkMarker"),s.consume(I),s.exit("autolinkMarker"),s.enter("autolinkProtocol"),j}function j(I){return asciiAlpha(I)?(s.consume(I),R):I===64?i(I):_(I)}function R(I){return I===43||I===45||I===46||asciiAlphanumeric(I)?(o=1,C(I)):_(I)}function C(I){return I===58?(s.consume(I),o=0,S):(I===43||I===45||I===46||asciiAlphanumeric(I))&&o++<32?(s.consume(I),C):(o=0,_(I))}function S(I){return I===62?(s.exit("autolinkProtocol"),s.enter("autolinkMarker"),s.consume(I),s.exit("autolinkMarker"),s.exit("autolink"),a):I===null||I===32||I===60||asciiControl(I)?i(I):(s.consume(I),S)}function _(I){return I===64?(s.consume(I),T):asciiAtext(I)?(s.consume(I),_):i(I)}function T(I){return asciiAlphanumeric(I)?P(I):i(I)}function P(I){return I===46?(s.consume(I),o=0,T):I===62?(s.exit("autolinkProtocol").type="autolinkEmail",s.enter("autolinkMarker"),s.consume(I),s.exit("autolinkMarker"),s.exit("autolink"),a):N(I)}function N(I){if((I===45||asciiAlphanumeric(I))&&o++<63){const M=I===45?N:P;return s.consume(I),M}return i(I)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(s,a,i){return o;function o(j){return markdownSpace(j)?factorySpace(s,E,"linePrefix")(j):E(j)}function E(j){return j===null||markdownLineEnding(j)?a(j):i(j)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(s,a,i){const o=this;return E;function E(R){if(R===62){const C=o.containerState;return C.open||(s.enter("blockQuote",{_container:!0}),C.open=!0),s.enter("blockQuotePrefix"),s.enter("blockQuoteMarker"),s.consume(R),s.exit("blockQuoteMarker"),j}return i(R)}function j(R){return markdownSpace(R)?(s.enter("blockQuotePrefixWhitespace"),s.consume(R),s.exit("blockQuotePrefixWhitespace"),s.exit("blockQuotePrefix"),a):(s.exit("blockQuotePrefix"),a(R))}}function tokenizeBlockQuoteContinuation(s,a,i){const o=this;return E;function E(R){return markdownSpace(R)?factorySpace(s,j,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):j(R)}function j(R){return s.attempt(blockQuote,a,i)(R)}}function exit(s){s.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(s,a,i){return o;function o(j){return s.enter("characterEscape"),s.enter("escapeMarker"),s.consume(j),s.exit("escapeMarker"),E}function E(j){return asciiPunctuation(j)?(s.enter("characterEscapeValue"),s.consume(j),s.exit("characterEscapeValue"),s.exit("characterEscape"),a):i(j)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(s,a,i){const o=this;let E=0,j,R;return C;function C(P){return s.enter("characterReference"),s.enter("characterReferenceMarker"),s.consume(P),s.exit("characterReferenceMarker"),S}function S(P){return P===35?(s.enter("characterReferenceMarkerNumeric"),s.consume(P),s.exit("characterReferenceMarkerNumeric"),_):(s.enter("characterReferenceValue"),j=31,R=asciiAlphanumeric,T(P))}function _(P){return P===88||P===120?(s.enter("characterReferenceMarkerHexadecimal"),s.consume(P),s.exit("characterReferenceMarkerHexadecimal"),s.enter("characterReferenceValue"),j=6,R=asciiHexDigit,T):(s.enter("characterReferenceValue"),j=7,R=asciiDigit,T(P))}function T(P){if(P===59&&E){const N=s.exit("characterReferenceValue");return R===asciiAlphanumeric&&!decodeNamedCharacterReference(o.sliceSerialize(N))?i(P):(s.enter("characterReferenceMarker"),s.consume(P),s.exit("characterReferenceMarker"),s.exit("characterReference"),a)}return R(P)&&E++<j?(s.consume(P),T):i(P)}}const nonLazyContinuation={partial:!0,tokenize:tokenizeNonLazyContinuation},codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(s,a,i){const o=this,E={partial:!0,tokenize:V};let j=0,R=0,C;return S;function S(G){return _(G)}function _(G){const K=o.events[o.events.length-1];return j=K&&K[1].type==="linePrefix"?K[2].sliceSerialize(K[1],!0).length:0,C=G,s.enter("codeFenced"),s.enter("codeFencedFence"),s.enter("codeFencedFenceSequence"),T(G)}function T(G){return G===C?(R++,s.consume(G),T):R<3?i(G):(s.exit("codeFencedFenceSequence"),markdownSpace(G)?factorySpace(s,P,"whitespace")(G):P(G))}function P(G){return G===null||markdownLineEnding(G)?(s.exit("codeFencedFence"),o.interrupt?a(G):s.check(nonLazyContinuation,D,$)(G)):(s.enter("codeFencedFenceInfo"),s.enter("chunkString",{contentType:"string"}),N(G))}function N(G){return G===null||markdownLineEnding(G)?(s.exit("chunkString"),s.exit("codeFencedFenceInfo"),P(G)):markdownSpace(G)?(s.exit("chunkString"),s.exit("codeFencedFenceInfo"),factorySpace(s,I,"whitespace")(G)):G===96&&G===C?i(G):(s.consume(G),N)}function I(G){return G===null||markdownLineEnding(G)?P(G):(s.enter("codeFencedFenceMeta"),s.enter("chunkString",{contentType:"string"}),M(G))}function M(G){return G===null||markdownLineEnding(G)?(s.exit("chunkString"),s.exit("codeFencedFenceMeta"),P(G)):G===96&&G===C?i(G):(s.consume(G),M)}function D(G){return s.attempt(E,$,B)(G)}function B(G){return s.enter("lineEnding"),s.consume(G),s.exit("lineEnding"),F}function F(G){return j>0&&markdownSpace(G)?factorySpace(s,O,"linePrefix",j+1)(G):O(G)}function O(G){return G===null||markdownLineEnding(G)?s.check(nonLazyContinuation,D,$)(G):(s.enter("codeFlowValue"),L(G))}function L(G){return G===null||markdownLineEnding(G)?(s.exit("codeFlowValue"),O(G)):(s.consume(G),L)}function $(G){return s.exit("codeFenced"),a(G)}function V(G,K,J){let ne=0;return le;function le(oe){return G.enter("lineEnding"),G.consume(oe),G.exit("lineEnding"),ue}function ue(oe){return G.enter("codeFencedFence"),markdownSpace(oe)?factorySpace(G,ce,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):ce(oe)}function ce(oe){return oe===C?(G.enter("codeFencedFenceSequence"),pe(oe)):J(oe)}function pe(oe){return oe===C?(ne++,G.consume(oe),pe):ne>=R?(G.exit("codeFencedFenceSequence"),markdownSpace(oe)?factorySpace(G,xe,"whitespace")(oe):xe(oe)):J(oe)}function xe(oe){return oe===null||markdownLineEnding(oe)?(G.exit("codeFencedFence"),K(oe)):J(oe)}}}function tokenizeNonLazyContinuation(s,a,i){const o=this;return E;function E(R){return R===null?i(R):(s.enter("lineEnding"),s.consume(R),s.exit("lineEnding"),j)}function j(R){return o.parser.lazy[o.now().line]?i(R):a(R)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(s,a,i){const o=this;return E;function E(_){return s.enter("codeIndented"),factorySpace(s,j,"linePrefix",5)(_)}function j(_){const T=o.events[o.events.length-1];return T&&T[1].type==="linePrefix"&&T[2].sliceSerialize(T[1],!0).length>=4?R(_):i(_)}function R(_){return _===null?S(_):markdownLineEnding(_)?s.attempt(furtherStart,R,S)(_):(s.enter("codeFlowValue"),C(_))}function C(_){return _===null||markdownLineEnding(_)?(s.exit("codeFlowValue"),R(_)):(s.consume(_),C)}function S(_){return s.exit("codeIndented"),a(_)}}function tokenizeFurtherStart(s,a,i){const o=this;return E;function E(R){return o.parser.lazy[o.now().line]?i(R):markdownLineEnding(R)?(s.enter("lineEnding"),s.consume(R),s.exit("lineEnding"),E):factorySpace(s,j,"linePrefix",5)(R)}function j(R){const C=o.events[o.events.length-1];return C&&C[1].type==="linePrefix"&&C[2].sliceSerialize(C[1],!0).length>=4?a(R):markdownLineEnding(R)?E(R):i(R)}}const codeText={name:"codeText",previous,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(s){let a=s.length-4,i=3,o,E;if((s[i][1].type==="lineEnding"||s[i][1].type==="space")&&(s[a][1].type==="lineEnding"||s[a][1].type==="space")){for(o=i;++o<a;)if(s[o][1].type==="codeTextData"){s[i][1].type="codeTextPadding",s[a][1].type="codeTextPadding",i+=2,a-=2;break}}for(o=i-1,a++;++o<=a;)E===void 0?o!==a&&s[o][1].type!=="lineEnding"&&(E=o):(o===a||s[o][1].type==="lineEnding")&&(s[E][1].type="codeTextData",o!==E+2&&(s[E][1].end=s[o-1][1].end,s.splice(E+2,o-E-2),a-=o-E-2,o=E+2),E=void 0);return s}function previous(s){return s!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tokenizeCodeText(s,a,i){let o=0,E,j;return R;function R(P){return s.enter("codeText"),s.enter("codeTextSequence"),C(P)}function C(P){return P===96?(s.consume(P),o++,C):(s.exit("codeTextSequence"),S(P))}function S(P){return P===null?i(P):P===32?(s.enter("space"),s.consume(P),s.exit("space"),S):P===96?(j=s.enter("codeTextSequence"),E=0,T(P)):markdownLineEnding(P)?(s.enter("lineEnding"),s.consume(P),s.exit("lineEnding"),S):(s.enter("codeTextData"),_(P))}function _(P){return P===null||P===32||P===96||markdownLineEnding(P)?(s.exit("codeTextData"),S(P)):(s.consume(P),_)}function T(P){return P===96?(s.consume(P),E++,T):E===o?(s.exit("codeTextSequence"),s.exit("codeText"),a(P)):(j.type="codeTextData",_(P))}}class SpliceBuffer{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,i){const o=i??Number.POSITIVE_INFINITY;return o<this.left.length?this.left.slice(a,o):a>this.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(a,i,o){const E=i||0;this.setCursor(Math.trunc(a));const j=this.right.splice(this.right.length-E,Number.POSITIVE_INFINITY);return o&&chunkedPush(this.left,o),j.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),chunkedPush(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const i=this.left.splice(a,Number.POSITIVE_INFINITY);chunkedPush(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);chunkedPush(this.left,i.reverse())}}}function chunkedPush(s,a){let i=0;if(a.length<1e4)s.push(...a);else for(;i<a.length;)s.push(...a.slice(i,i+1e4)),i+=1e4}function subtokenize(s){const a={};let i=-1,o,E,j,R,C,S,_;const T=new SpliceBuffer(s);for(;++i<T.length;){for(;i in a;)i=a[i];if(o=T.get(i),i&&o[1].type==="chunkFlow"&&T.get(i-1)[1].type==="listItemPrefix"&&(S=o[1]._tokenizer.events,j=0,j<S.length&&S[j][1].type==="lineEndingBlank"&&(j+=2),j<S.length&&S[j][1].type==="content"))for(;++j<S.length&&S[j][1].type!=="content";)S[j][1].type==="chunkText"&&(S[j][1]._isInFirstContentOfListItem=!0,j++);if(o[0]==="enter")o[1].contentType&&(Object.assign(a,subcontent(T,i)),i=a[i],_=!0);else if(o[1]._container){for(j=i,E=void 0;j--&&(R=T.get(j),R[1].type==="lineEnding"||R[1].type==="lineEndingBlank");)R[0]==="enter"&&(E&&(T.get(E)[1].type="lineEndingBlank"),R[1].type="lineEnding",E=j);E&&(o[1].end={...T.get(E)[1].start},C=T.slice(E,i),C.unshift(o),T.splice(E,i-E+1,C))}}return splice(s,0,Number.POSITIVE_INFINITY,T.slice(0)),!_}function subcontent(s,a){const i=s.get(a)[1],o=s.get(a)[2];let E=a-1;const j=[],R=i._tokenizer||o.parser[i.contentType](i.start),C=R.events,S=[],_={};let T,P,N=-1,I=i,M=0,D=0;const B=[D];for(;I;){for(;s.get(++E)[1]!==I;);j.push(E),I._tokenizer||(T=o.sliceStream(I),I.next||T.push(null),P&&R.defineSkip(I.start),I._isInFirstContentOfListItem&&(R._gfmTasklistFirstContentOfListItem=!0),R.write(T),I._isInFirstContentOfListItem&&(R._gfmTasklistFirstContentOfListItem=void 0)),P=I,I=I.next}for(I=i;++N<C.length;)C[N][0]==="exit"&&C[N-1][0]==="enter"&&C[N][1].type===C[N-1][1].type&&C[N][1].start.line!==C[N][1].end.line&&(D=N+1,B.push(D),I._tokenizer=void 0,I.previous=void 0,I=I.next);for(R.events=[],I?(I._tokenizer=void 0,I.previous=void 0):B.pop(),N=B.length;N--;){const F=C.slice(B[N],B[N+1]),O=j.pop();S.push([O,O+F.length-1]),s.splice(O,2,F)}for(S.reverse(),N=-1;++N<S.length;)_[M+S[N][0]]=M+S[N][1],M+=S[N][1]-S[N][0]-1;return _}const content={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(s){return subtokenize(s),s}function tokenizeContent(s,a){let i;return o;function o(C){return s.enter("content"),i=s.enter("chunkContent",{contentType:"content"}),E(C)}function E(C){return C===null?j(C):markdownLineEnding(C)?s.check(continuationConstruct,R,j)(C):(s.consume(C),E)}function j(C){return s.exit("chunkContent"),s.exit("content"),a(C)}function R(C){return s.consume(C),s.exit("chunkContent"),i.next=s.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,E}}function tokenizeContinuation(s,a,i){const o=this;return E;function E(R){return s.exit("chunkContent"),s.enter("lineEnding"),s.consume(R),s.exit("lineEnding"),factorySpace(s,j,"linePrefix")}function j(R){if(R===null||markdownLineEnding(R))return i(R);const C=o.events[o.events.length-1];return!o.parser.constructs.disable.null.includes("codeIndented")&&C&&C[1].type==="linePrefix"&&C[2].sliceSerialize(C[1],!0).length>=4?a(R):s.interrupt(o.parser.constructs.flow,i,a)(R)}}function factoryDestination(s,a,i,o,E,j,R,C,S){const _=S||Number.POSITIVE_INFINITY;let T=0;return P;function P(F){return F===60?(s.enter(o),s.enter(E),s.enter(j),s.consume(F),s.exit(j),N):F===null||F===32||F===41||asciiControl(F)?i(F):(s.enter(o),s.enter(R),s.enter(C),s.enter("chunkString",{contentType:"string"}),D(F))}function N(F){return F===62?(s.enter(j),s.consume(F),s.exit(j),s.exit(E),s.exit(o),a):(s.enter(C),s.enter("chunkString",{contentType:"string"}),I(F))}function I(F){return F===62?(s.exit("chunkString"),s.exit(C),N(F)):F===null||F===60||markdownLineEnding(F)?i(F):(s.consume(F),F===92?M:I)}function M(F){return F===60||F===62||F===92?(s.consume(F),I):I(F)}function D(F){return!T&&(F===null||F===41||markdownLineEndingOrSpace(F))?(s.exit("chunkString"),s.exit(C),s.exit(R),s.exit(o),a(F)):T<_&&F===40?(s.consume(F),T++,D):F===41?(s.consume(F),T--,D):F===null||F===32||F===40||asciiControl(F)?i(F):(s.consume(F),F===92?B:D)}function B(F){return F===40||F===41||F===92?(s.consume(F),D):D(F)}}function factoryLabel(s,a,i,o,E,j){const R=this;let C=0,S;return _;function _(I){return s.enter(o),s.enter(E),s.consume(I),s.exit(E),s.enter(j),T}function T(I){return C>999||I===null||I===91||I===93&&!S||I===94&&!C&&"_hiddenFootnoteSupport"in R.parser.constructs?i(I):I===93?(s.exit(j),s.enter(E),s.consume(I),s.exit(E),s.exit(o),a):markdownLineEnding(I)?(s.enter("lineEnding"),s.consume(I),s.exit("lineEnding"),T):(s.enter("chunkString",{contentType:"string"}),P(I))}function P(I){return I===null||I===91||I===93||markdownLineEnding(I)||C++>999?(s.exit("chunkString"),T(I)):(s.consume(I),S||(S=!markdownSpace(I)),I===92?N:P)}function N(I){return I===91||I===92||I===93?(s.consume(I),C++,P):P(I)}}function factoryTitle(s,a,i,o,E,j){let R;return C;function C(N){return N===34||N===39||N===40?(s.enter(o),s.enter(E),s.consume(N),s.exit(E),R=N===40?41:N,S):i(N)}function S(N){return N===R?(s.enter(E),s.consume(N),s.exit(E),s.exit(o),a):(s.enter(j),_(N))}function _(N){return N===R?(s.exit(j),S(R)):N===null?i(N):markdownLineEnding(N)?(s.enter("lineEnding"),s.consume(N),s.exit("lineEnding"),factorySpace(s,_,"linePrefix")):(s.enter("chunkString",{contentType:"string"}),T(N))}function T(N){return N===R||N===null||markdownLineEnding(N)?(s.exit("chunkString"),_(N)):(s.consume(N),N===92?P:T)}function P(N){return N===R||N===92?(s.consume(N),T):T(N)}}function factoryWhitespace(s,a){let i;return o;function o(E){return markdownLineEnding(E)?(s.enter("lineEnding"),s.consume(E),s.exit("lineEnding"),i=!0,o):markdownSpace(E)?factorySpace(s,o,i?"linePrefix":"lineSuffix")(E):a(E)}}const definition={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(s,a,i){const o=this;let E;return j;function j(I){return s.enter("definition"),R(I)}function R(I){return factoryLabel.call(o,s,C,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(I)}function C(I){return E=normalizeIdentifier(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),I===58?(s.enter("definitionMarker"),s.consume(I),s.exit("definitionMarker"),S):i(I)}function S(I){return markdownLineEndingOrSpace(I)?factoryWhitespace(s,_)(I):_(I)}function _(I){return factoryDestination(s,T,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(I)}function T(I){return s.attempt(titleBefore,P,P)(I)}function P(I){return markdownSpace(I)?factorySpace(s,N,"whitespace")(I):N(I)}function N(I){return I===null||markdownLineEnding(I)?(s.exit("definition"),o.parser.defined.push(E),a(I)):i(I)}}function tokenizeTitleBefore(s,a,i){return o;function o(C){return markdownLineEndingOrSpace(C)?factoryWhitespace(s,E)(C):i(C)}function E(C){return factoryTitle(s,j,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(C)}function j(C){return markdownSpace(C)?factorySpace(s,R,"whitespace")(C):R(C)}function R(C){return C===null||markdownLineEnding(C)?a(C):i(C)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(s,a,i){return o;function o(j){return s.enter("hardBreakEscape"),s.consume(j),E}function E(j){return markdownLineEnding(j)?(s.exit("hardBreakEscape"),a(j)):i(j)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(s,a){let i=s.length-2,o=3,E,j;return s[o][1].type==="whitespace"&&(o+=2),i-2>o&&s[i][1].type==="whitespace"&&(i-=2),s[i][1].type==="atxHeadingSequence"&&(o===i-1||i-4>o&&s[i-2][1].type==="whitespace")&&(i-=o+1===i?2:4),i>o&&(E={type:"atxHeadingText",start:s[o][1].start,end:s[i][1].end},j={type:"chunkText",start:s[o][1].start,end:s[i][1].end,contentType:"text"},splice(s,o,i-o+1,[["enter",E,a],["enter",j,a],["exit",j,a],["exit",E,a]])),s}function tokenizeHeadingAtx(s,a,i){let o=0;return E;function E(T){return s.enter("atxHeading"),j(T)}function j(T){return s.enter("atxHeadingSequence"),R(T)}function R(T){return T===35&&o++<6?(s.consume(T),R):T===null||markdownLineEndingOrSpace(T)?(s.exit("atxHeadingSequence"),C(T)):i(T)}function C(T){return T===35?(s.enter("atxHeadingSequence"),S(T)):T===null||markdownLineEnding(T)?(s.exit("atxHeading"),a(T)):markdownSpace(T)?factorySpace(s,C,"whitespace")(T):(s.enter("atxHeadingText"),_(T))}function S(T){return T===35?(s.consume(T),S):(s.exit("atxHeadingSequence"),C(T))}function _(T){return T===null||T===35||markdownLineEndingOrSpace(T)?(s.exit("atxHeadingText"),C(T)):(s.consume(T),_)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(s){let a=s.length;for(;a--&&!(s[a][0]==="enter"&&s[a][1].type==="htmlFlow"););return a>1&&s[a-2][1].type==="linePrefix"&&(s[a][1].start=s[a-2][1].start,s[a+1][1].start=s[a-2][1].start,s.splice(a-2,2)),s}function tokenizeHtmlFlow(s,a,i){const o=this;let E,j,R,C,S;return _;function _(ee){return T(ee)}function T(ee){return s.enter("htmlFlow"),s.enter("htmlFlowData"),s.consume(ee),P}function P(ee){return ee===33?(s.consume(ee),N):ee===47?(s.consume(ee),j=!0,D):ee===63?(s.consume(ee),E=3,o.interrupt?a:U):asciiAlpha(ee)?(s.consume(ee),R=String.fromCharCode(ee),B):i(ee)}function N(ee){return ee===45?(s.consume(ee),E=2,I):ee===91?(s.consume(ee),E=5,C=0,M):asciiAlpha(ee)?(s.consume(ee),E=4,o.interrupt?a:U):i(ee)}function I(ee){return ee===45?(s.consume(ee),o.interrupt?a:U):i(ee)}function M(ee){const ye="CDATA[";return ee===ye.charCodeAt(C++)?(s.consume(ee),C===ye.length?o.interrupt?a:ce:M):i(ee)}function D(ee){return asciiAlpha(ee)?(s.consume(ee),R=String.fromCharCode(ee),B):i(ee)}function B(ee){if(ee===null||ee===47||ee===62||markdownLineEndingOrSpace(ee)){const ye=ee===47,Ce=R.toLowerCase();return!ye&&!j&&htmlRawNames.includes(Ce)?(E=1,o.interrupt?a(ee):ce(ee)):htmlBlockNames.includes(R.toLowerCase())?(E=6,ye?(s.consume(ee),F):o.interrupt?a(ee):ce(ee)):(E=7,o.interrupt&&!o.parser.lazy[o.now().line]?i(ee):j?O(ee):L(ee))}return ee===45||asciiAlphanumeric(ee)?(s.consume(ee),R+=String.fromCharCode(ee),B):i(ee)}function F(ee){return ee===62?(s.consume(ee),o.interrupt?a:ce):i(ee)}function O(ee){return markdownSpace(ee)?(s.consume(ee),O):le(ee)}function L(ee){return ee===47?(s.consume(ee),le):ee===58||ee===95||asciiAlpha(ee)?(s.consume(ee),$):markdownSpace(ee)?(s.consume(ee),L):le(ee)}function $(ee){return ee===45||ee===46||ee===58||ee===95||asciiAlphanumeric(ee)?(s.consume(ee),$):V(ee)}function V(ee){return ee===61?(s.consume(ee),G):markdownSpace(ee)?(s.consume(ee),V):L(ee)}function G(ee){return ee===null||ee===60||ee===61||ee===62||ee===96?i(ee):ee===34||ee===39?(s.consume(ee),S=ee,K):markdownSpace(ee)?(s.consume(ee),G):J(ee)}function K(ee){return ee===S?(s.consume(ee),S=null,ne):ee===null||markdownLineEnding(ee)?i(ee):(s.consume(ee),K)}function J(ee){return ee===null||ee===34||ee===39||ee===47||ee===60||ee===61||ee===62||ee===96||markdownLineEndingOrSpace(ee)?V(ee):(s.consume(ee),J)}function ne(ee){return ee===47||ee===62||markdownSpace(ee)?L(ee):i(ee)}function le(ee){return ee===62?(s.consume(ee),ue):i(ee)}function ue(ee){return ee===null||markdownLineEnding(ee)?ce(ee):markdownSpace(ee)?(s.consume(ee),ue):i(ee)}function ce(ee){return ee===45&&E===2?(s.consume(ee),Y):ee===60&&E===1?(s.consume(ee),ae):ee===62&&E===4?(s.consume(ee),ie):ee===63&&E===3?(s.consume(ee),U):ee===93&&E===5?(s.consume(ee),W):markdownLineEnding(ee)&&(E===6||E===7)?(s.exit("htmlFlowData"),s.check(blankLineBefore,me,pe)(ee)):ee===null||markdownLineEnding(ee)?(s.exit("htmlFlowData"),pe(ee)):(s.consume(ee),ce)}function pe(ee){return s.check(nonLazyContinuationStart,xe,me)(ee)}function xe(ee){return s.enter("lineEnding"),s.consume(ee),s.exit("lineEnding"),oe}function oe(ee){return ee===null||markdownLineEnding(ee)?pe(ee):(s.enter("htmlFlowData"),ce(ee))}function Y(ee){return ee===45?(s.consume(ee),U):ce(ee)}function ae(ee){return ee===47?(s.consume(ee),R="",H):ce(ee)}function H(ee){if(ee===62){const ye=R.toLowerCase();return htmlRawNames.includes(ye)?(s.consume(ee),ie):ce(ee)}return asciiAlpha(ee)&&R.length<8?(s.consume(ee),R+=String.fromCharCode(ee),H):ce(ee)}function W(ee){return ee===93?(s.consume(ee),U):ce(ee)}function U(ee){return ee===62?(s.consume(ee),ie):ee===45&&E===2?(s.consume(ee),U):ce(ee)}function ie(ee){return ee===null||markdownLineEnding(ee)?(s.exit("htmlFlowData"),me(ee)):(s.consume(ee),ie)}function me(ee){return s.exit("htmlFlow"),a(ee)}}function tokenizeNonLazyContinuationStart(s,a,i){const o=this;return E;function E(R){return markdownLineEnding(R)?(s.enter("lineEnding"),s.consume(R),s.exit("lineEnding"),j):i(R)}function j(R){return o.parser.lazy[o.now().line]?i(R):a(R)}}function tokenizeBlankLineBefore(s,a,i){return o;function o(E){return s.enter("lineEnding"),s.consume(E),s.exit("lineEnding"),s.attempt(blankLine,a,i)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(s,a,i){const o=this;let E,j,R;return C;function C(U){return s.enter("htmlText"),s.enter("htmlTextData"),s.consume(U),S}function S(U){return U===33?(s.consume(U),_):U===47?(s.consume(U),V):U===63?(s.consume(U),L):asciiAlpha(U)?(s.consume(U),J):i(U)}function _(U){return U===45?(s.consume(U),T):U===91?(s.consume(U),j=0,M):asciiAlpha(U)?(s.consume(U),O):i(U)}function T(U){return U===45?(s.consume(U),I):i(U)}function P(U){return U===null?i(U):U===45?(s.consume(U),N):markdownLineEnding(U)?(R=P,ae(U)):(s.consume(U),P)}function N(U){return U===45?(s.consume(U),I):P(U)}function I(U){return U===62?Y(U):U===45?N(U):P(U)}function M(U){const ie="CDATA[";return U===ie.charCodeAt(j++)?(s.consume(U),j===ie.length?D:M):i(U)}function D(U){return U===null?i(U):U===93?(s.consume(U),B):markdownLineEnding(U)?(R=D,ae(U)):(s.consume(U),D)}function B(U){return U===93?(s.consume(U),F):D(U)}function F(U){return U===62?Y(U):U===93?(s.consume(U),F):D(U)}function O(U){return U===null||U===62?Y(U):markdownLineEnding(U)?(R=O,ae(U)):(s.consume(U),O)}function L(U){return U===null?i(U):U===63?(s.consume(U),$):markdownLineEnding(U)?(R=L,ae(U)):(s.consume(U),L)}function $(U){return U===62?Y(U):L(U)}function V(U){return asciiAlpha(U)?(s.consume(U),G):i(U)}function G(U){return U===45||asciiAlphanumeric(U)?(s.consume(U),G):K(U)}function K(U){return markdownLineEnding(U)?(R=K,ae(U)):markdownSpace(U)?(s.consume(U),K):Y(U)}function J(U){return U===45||asciiAlphanumeric(U)?(s.consume(U),J):U===47||U===62||markdownLineEndingOrSpace(U)?ne(U):i(U)}function ne(U){return U===47?(s.consume(U),Y):U===58||U===95||asciiAlpha(U)?(s.consume(U),le):markdownLineEnding(U)?(R=ne,ae(U)):markdownSpace(U)?(s.consume(U),ne):Y(U)}function le(U){return U===45||U===46||U===58||U===95||asciiAlphanumeric(U)?(s.consume(U),le):ue(U)}function ue(U){return U===61?(s.consume(U),ce):markdownLineEnding(U)?(R=ue,ae(U)):markdownSpace(U)?(s.consume(U),ue):ne(U)}function ce(U){return U===null||U===60||U===61||U===62||U===96?i(U):U===34||U===39?(s.consume(U),E=U,pe):markdownLineEnding(U)?(R=ce,ae(U)):markdownSpace(U)?(s.consume(U),ce):(s.consume(U),xe)}function pe(U){return U===E?(s.consume(U),E=void 0,oe):U===null?i(U):markdownLineEnding(U)?(R=pe,ae(U)):(s.consume(U),pe)}function xe(U){return U===null||U===34||U===39||U===60||U===61||U===96?i(U):U===47||U===62||markdownLineEndingOrSpace(U)?ne(U):(s.consume(U),xe)}function oe(U){return U===47||U===62||markdownLineEndingOrSpace(U)?ne(U):i(U)}function Y(U){return U===62?(s.consume(U),s.exit("htmlTextData"),s.exit("htmlText"),a):i(U)}function ae(U){return s.exit("htmlTextData"),s.enter("lineEnding"),s.consume(U),s.exit("lineEnding"),H}function H(U){return markdownSpace(U)?factorySpace(s,W,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):W(U)}function W(U){return s.enter("htmlTextData"),R(U)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(s){let a=-1;const i=[];for(;++a<s.length;){const o=s[a][1];if(i.push(s[a]),o.type==="labelImage"||o.type==="labelLink"||o.type==="labelEnd"){const E=o.type==="labelImage"?4:2;o.type="data",a+=E}}return s.length!==i.length&&splice(s,0,s.length,i),s}function resolveToLabelEnd(s,a){let i=s.length,o=0,E,j,R,C;for(;i--;)if(E=s[i][1],j){if(E.type==="link"||E.type==="labelLink"&&E._inactive)break;s[i][0]==="enter"&&E.type==="labelLink"&&(E._inactive=!0)}else if(R){if(s[i][0]==="enter"&&(E.type==="labelImage"||E.type==="labelLink")&&!E._balanced&&(j=i,E.type!=="labelLink")){o=2;break}}else E.type==="labelEnd"&&(R=i);const S={type:s[j][1].type==="labelLink"?"link":"image",start:{...s[j][1].start},end:{...s[s.length-1][1].end}},_={type:"label",start:{...s[j][1].start},end:{...s[R][1].end}},T={type:"labelText",start:{...s[j+o+2][1].end},end:{...s[R-2][1].start}};return C=[["enter",S,a],["enter",_,a]],C=push(C,s.slice(j+1,j+o+3)),C=push(C,[["enter",T,a]]),C=push(C,resolveAll(a.parser.constructs.insideSpan.null,s.slice(j+o+4,R-3),a)),C=push(C,[["exit",T,a],s[R-2],s[R-1],["exit",_,a]]),C=push(C,s.slice(R+1)),C=push(C,[["exit",S,a]]),splice(s,j,s.length,C),s}function tokenizeLabelEnd(s,a,i){const o=this;let E=o.events.length,j,R;for(;E--;)if((o.events[E][1].type==="labelImage"||o.events[E][1].type==="labelLink")&&!o.events[E][1]._balanced){j=o.events[E][1];break}return C;function C(N){return j?j._inactive?P(N):(R=o.parser.defined.includes(normalizeIdentifier(o.sliceSerialize({start:j.end,end:o.now()}))),s.enter("labelEnd"),s.enter("labelMarker"),s.consume(N),s.exit("labelMarker"),s.exit("labelEnd"),S):i(N)}function S(N){return N===40?s.attempt(resourceConstruct,T,R?T:P)(N):N===91?s.attempt(referenceFullConstruct,T,R?_:P)(N):R?T(N):P(N)}function _(N){return s.attempt(referenceCollapsedConstruct,T,P)(N)}function T(N){return a(N)}function P(N){return j._balanced=!0,i(N)}}function tokenizeResource(s,a,i){return o;function o(P){return s.enter("resource"),s.enter("resourceMarker"),s.consume(P),s.exit("resourceMarker"),E}function E(P){return markdownLineEndingOrSpace(P)?factoryWhitespace(s,j)(P):j(P)}function j(P){return P===41?T(P):factoryDestination(s,R,C,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(P)}function R(P){return markdownLineEndingOrSpace(P)?factoryWhitespace(s,S)(P):T(P)}function C(P){return i(P)}function S(P){return P===34||P===39||P===40?factoryTitle(s,_,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(P):T(P)}function _(P){return markdownLineEndingOrSpace(P)?factoryWhitespace(s,T)(P):T(P)}function T(P){return P===41?(s.enter("resourceMarker"),s.consume(P),s.exit("resourceMarker"),s.exit("resource"),a):i(P)}}function tokenizeReferenceFull(s,a,i){const o=this;return E;function E(C){return factoryLabel.call(o,s,j,R,"reference","referenceMarker","referenceString")(C)}function j(C){return o.parser.defined.includes(normalizeIdentifier(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)))?a(C):i(C)}function R(C){return i(C)}}function tokenizeReferenceCollapsed(s,a,i){return o;function o(j){return s.enter("reference"),s.enter("referenceMarker"),s.consume(j),s.exit("referenceMarker"),E}function E(j){return j===93?(s.enter("referenceMarker"),s.consume(j),s.exit("referenceMarker"),s.exit("reference"),a):i(j)}}const labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(s,a,i){const o=this;return E;function E(C){return s.enter("labelImage"),s.enter("labelImageMarker"),s.consume(C),s.exit("labelImageMarker"),j}function j(C){return C===91?(s.enter("labelMarker"),s.consume(C),s.exit("labelMarker"),s.exit("labelImage"),R):i(C)}function R(C){return C===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(C):a(C)}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(s,a,i){const o=this;return E;function E(R){return s.enter("labelLink"),s.enter("labelMarker"),s.consume(R),s.exit("labelMarker"),s.exit("labelLink"),j}function j(R){return R===94&&"_hiddenFootnoteSupport"in o.parser.constructs?i(R):a(R)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(s,a){return i;function i(o){return s.enter("lineEnding"),s.consume(o),s.exit("lineEnding"),factorySpace(s,a,"linePrefix")}}const thematicBreak$1={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(s,a,i){let o=0,E;return j;function j(_){return s.enter("thematicBreak"),R(_)}function R(_){return E=_,C(_)}function C(_){return _===E?(s.enter("thematicBreakSequence"),S(_)):o>=3&&(_===null||markdownLineEnding(_))?(s.exit("thematicBreak"),a(_)):i(_)}function S(_){return _===E?(s.consume(_),o++,S):(s.exit("thematicBreakSequence"),markdownSpace(_)?factorySpace(s,C,"whitespace")(_):C(_))}}const list$1={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent};function tokenizeListStart(s,a,i){const o=this,E=o.events[o.events.length-1];let j=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,R=0;return C;function C(I){const M=o.containerState.type||(I===42||I===43||I===45?"listUnordered":"listOrdered");if(M==="listUnordered"?!o.containerState.marker||I===o.containerState.marker:asciiDigit(I)){if(o.containerState.type||(o.containerState.type=M,s.enter(M,{_container:!0})),M==="listUnordered")return s.enter("listItemPrefix"),I===42||I===45?s.check(thematicBreak$1,i,_)(I):_(I);if(!o.interrupt||I===49)return s.enter("listItemPrefix"),s.enter("listItemValue"),S(I)}return i(I)}function S(I){return asciiDigit(I)&&++R<10?(s.consume(I),S):(!o.interrupt||R<2)&&(o.containerState.marker?I===o.containerState.marker:I===41||I===46)?(s.exit("listItemValue"),_(I)):i(I)}function _(I){return s.enter("listItemMarker"),s.consume(I),s.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||I,s.check(blankLine,o.interrupt?i:T,s.attempt(listItemPrefixWhitespaceConstruct,N,P))}function T(I){return o.containerState.initialBlankLine=!0,j++,N(I)}function P(I){return markdownSpace(I)?(s.enter("listItemPrefixWhitespace"),s.consume(I),s.exit("listItemPrefixWhitespace"),N):i(I)}function N(I){return o.containerState.size=j+o.sliceSerialize(s.exit("listItemPrefix"),!0).length,a(I)}}function tokenizeListContinuation(s,a,i){const o=this;return o.containerState._closeFlow=void 0,s.check(blankLine,E,j);function E(C){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,factorySpace(s,a,"listItemIndent",o.containerState.size+1)(C)}function j(C){return o.containerState.furtherBlankLines||!markdownSpace(C)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,R(C)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,s.attempt(indentConstruct,a,R)(C))}function R(C){return o.containerState._closeFlow=!0,o.interrupt=void 0,factorySpace(s,s.attempt(list$1,a,i),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C)}}function tokenizeIndent(s,a,i){const o=this;return factorySpace(s,E,"listItemIndent",o.containerState.size+1);function E(j){const R=o.events[o.events.length-1];return R&&R[1].type==="listItemIndent"&&R[2].sliceSerialize(R[1],!0).length===o.containerState.size?a(j):i(j)}}function tokenizeListEnd(s){s.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(s,a,i){const o=this;return factorySpace(s,E,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function E(j){const R=o.events[o.events.length-1];return!markdownSpace(j)&&R&&R[1].type==="listItemPrefixWhitespace"?a(j):i(j)}}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(s,a){let i=s.length,o,E,j;for(;i--;)if(s[i][0]==="enter"){if(s[i][1].type==="content"){o=i;break}s[i][1].type==="paragraph"&&(E=i)}else s[i][1].type==="content"&&s.splice(i,1),!j&&s[i][1].type==="definition"&&(j=i);const R={type:"setextHeading",start:{...s[E][1].start},end:{...s[s.length-1][1].end}};return s[E][1].type="setextHeadingText",j?(s.splice(E,0,["enter",R,a]),s.splice(j+1,0,["exit",s[o][1],a]),s[o][1].end={...s[j][1].end}):s[o][1]=R,s.push(["exit",R,a]),s}function tokenizeSetextUnderline(s,a,i){const o=this;let E;return j;function j(_){let T=o.events.length,P;for(;T--;)if(o.events[T][1].type!=="lineEnding"&&o.events[T][1].type!=="linePrefix"&&o.events[T][1].type!=="content"){P=o.events[T][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||P)?(s.enter("setextHeadingLine"),E=_,R(_)):i(_)}function R(_){return s.enter("setextHeadingLineSequence"),C(_)}function C(_){return _===E?(s.consume(_),C):(s.exit("setextHeadingLineSequence"),markdownSpace(_)?factorySpace(s,S,"lineSuffix")(_):S(_))}function S(_){return _===null||markdownLineEnding(_)?(s.exit("setextHeadingLine"),a(_)):i(_)}}const flow$1={tokenize:initializeFlow};function initializeFlow(s){const a=this,i=s.attempt(blankLine,o,s.attempt(this.parser.constructs.flowInitial,E,factorySpace(s,s.attempt(this.parser.constructs.flow,E,s.attempt(content,E)),"linePrefix")));return i;function o(j){if(j===null){s.consume(j);return}return s.enter("lineEndingBlank"),s.consume(j),s.exit("lineEndingBlank"),a.currentConstruct=void 0,i}function E(j){if(j===null){s.consume(j);return}return s.enter("lineEnding"),s.consume(j),s.exit("lineEnding"),a.currentConstruct=void 0,i}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$2=initializeFactory("text");function initializeFactory(s){return{resolveAll:createResolver(s==="text"?resolveAllLineSuffixes:void 0),tokenize:a};function a(i){const o=this,E=this.parser.constructs[s],j=i.attempt(E,R,C);return R;function R(T){return _(T)?j(T):C(T)}function C(T){if(T===null){i.consume(T);return}return i.enter("data"),i.consume(T),S}function S(T){return _(T)?(i.exit("data"),j(T)):(i.consume(T),S)}function _(T){if(T===null)return!0;const P=E[T];let N=-1;if(P)for(;++N<P.length;){const I=P[N];if(!I.previous||I.previous.call(o,o.previous))return!0}return!1}}}function createResolver(s){return a;function a(i,o){let E=-1,j;for(;++E<=i.length;)j===void 0?i[E]&&i[E][1].type==="data"&&(j=E,E++):(!i[E]||i[E][1].type!=="data")&&(E!==j+2&&(i[j][1].end=i[E-1][1].end,i.splice(j+2,E-j-2),E=j+2),j=void 0);return s?s(i,o):i}}function resolveAllLineSuffixes(s,a){let i=0;for(;++i<=s.length;)if((i===s.length||s[i][1].type==="lineEnding")&&s[i-1][1].type==="data"){const o=s[i-1][1],E=a.sliceStream(o);let j=E.length,R=-1,C=0,S;for(;j--;){const _=E[j];if(typeof _=="string"){for(R=_.length;_.charCodeAt(R-1)===32;)C++,R--;if(R)break;R=-1}else if(_===-2)S=!0,C++;else if(_!==-1){j++;break}}if(C){const _={type:i===s.length||S||C<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:j?R:o.start._bufferIndex+R,_index:o.start._index+j,line:o.end.line,column:o.end.column-C,offset:o.end.offset-C},end:{...o.end}};o.end={..._.start},o.start.offset===o.end.offset?Object.assign(o,_):(s.splice(i,0,["enter",_,a],["exit",_,a]),i+=2)}i++}return s}const document$1={42:list$1,43:list$1,45:list$1,48:list$1,49:list$1,50:list$1,51:list$1,52:list$1,53:list$1,54:list$1,55:list$1,56:list$1,57:list$1,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak$1,45:[setextUnderline,thematicBreak$1],60:htmlFlow,61:setextUnderline,95:thematicBreak$1,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$1={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers,contentInitial,disable,document:document$1,flow,flowInitial,insideSpan,string,text:text$1},Symbol.toStringTag,{value:"Module"}));function createTokenizer(s,a,i){let o={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const E={},j=[];let R=[],C=[];const S={attempt:K(V),check:K(G),consume:O,enter:L,exit:$,interrupt:K(G,{interrupt:!0})},_={code:null,containerState:{},defineSkip:D,events:[],now:M,parser:s,previous:null,sliceSerialize:N,sliceStream:I,write:P};let T=a.tokenize.call(_,S);return a.resolveAll&&j.push(a),_;function P(ue){return R=push(R,ue),B(),R[R.length-1]!==null?[]:(J(a,0),_.events=resolveAll(j,_.events,_),_.events)}function N(ue,ce){return serializeChunks(I(ue),ce)}function I(ue){return sliceChunks(R,ue)}function M(){const{_bufferIndex:ue,_index:ce,line:pe,column:xe,offset:oe}=o;return{_bufferIndex:ue,_index:ce,line:pe,column:xe,offset:oe}}function D(ue){E[ue.line]=ue.column,le()}function B(){let ue;for(;o._index<R.length;){const ce=R[o._index];if(typeof ce=="string")for(ue=o._index,o._bufferIndex<0&&(o._bufferIndex=0);o._index===ue&&o._bufferIndex<ce.length;)F(ce.charCodeAt(o._bufferIndex));else F(ce)}}function F(ue){T=T(ue)}function O(ue){markdownLineEnding(ue)?(o.line++,o.column=1,o.offset+=ue===-3?2:1,le()):ue!==-1&&(o.column++,o.offset++),o._bufferIndex<0?o._index++:(o._bufferIndex++,o._bufferIndex===R[o._index].length&&(o._bufferIndex=-1,o._index++)),_.previous=ue}function L(ue,ce){const pe=ce||{};return pe.type=ue,pe.start=M(),_.events.push(["enter",pe,_]),C.push(pe),pe}function $(ue){const ce=C.pop();return ce.end=M(),_.events.push(["exit",ce,_]),ce}function V(ue,ce){J(ue,ce.from)}function G(ue,ce){ce.restore()}function K(ue,ce){return pe;function pe(xe,oe,Y){let ae,H,W,U;return Array.isArray(xe)?me(xe):"tokenize"in xe?me([xe]):ie(xe);function ie(Ae){return De;function De(Ze){const Ue=Ze!==null&&Ae[Ze],Se=Ze!==null&&Ae.null,ze=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray(Se)?Se:Se?[Se]:[]];return me(ze)(Ze)}}function me(Ae){return ae=Ae,H=0,Ae.length===0?Y:ee(Ae[H])}function ee(Ae){return De;function De(Ze){return U=ne(),W=Ae,Ae.partial||(_.currentConstruct=Ae),Ae.name&&_.parser.constructs.disable.null.includes(Ae.name)?Ce():Ae.tokenize.call(ce?Object.assign(Object.create(_),ce):_,S,ye,Ce)(Ze)}}function ye(Ae){return ue(W,U),oe}function Ce(Ae){return U.restore(),++H<ae.length?ee(ae[H]):Y}}}function J(ue,ce){ue.resolveAll&&!j.includes(ue)&&j.push(ue),ue.resolve&&splice(_.events,ce,_.events.length-ce,ue.resolve(_.events.slice(ce),_)),ue.resolveTo&&(_.events=ue.resolveTo(_.events,_))}function ne(){const ue=M(),ce=_.previous,pe=_.currentConstruct,xe=_.events.length,oe=Array.from(C);return{from:xe,restore:Y};function Y(){o=ue,_.previous=ce,_.currentConstruct=pe,_.events.length=xe,C=oe,le()}}function le(){o.line in E&&o.column<2&&(o.column=E[o.line],o.offset+=E[o.line]-1)}}function sliceChunks(s,a){const i=a.start._index,o=a.start._bufferIndex,E=a.end._index,j=a.end._bufferIndex;let R;if(i===E)R=[s[i].slice(o,j)];else{if(R=s.slice(i,E),o>-1){const C=R[0];typeof C=="string"?R[0]=C.slice(o):R.shift()}j>0&&R.push(s[E].slice(0,j))}return R}function serializeChunks(s,a){let i=-1;const o=[];let E;for(;++i<s.length;){const j=s[i];let R;if(typeof j=="string")R=j;else switch(j){case-5:{R="\r";break}case-4:{R=`
`;break}case-3:{R=`\r
`;break}case-2:{R=a?" ":"	";break}case-1:{if(!a&&E)continue;R=" ";break}default:R=String.fromCharCode(j)}E=j===-2,o.push(R)}return o.join("")}function parse(s){const o={constructs:combineExtensions([defaultConstructs,...(s||{}).extensions||[]]),content:E(content$1),defined:[],document:E(document$2),flow:E(flow$1),lazy:{},string:E(string$1),text:E(text$2)};return o;function E(j){return R;function R(C){return createTokenizer(o,j,C)}}}function postprocess(s){for(;!subtokenize(s););return s}const search=/[\0\t\n\r]/g;function preprocess(){let s=1,a="",i=!0,o;return E;function E(j,R,C){const S=[];let _,T,P,N,I;for(j=a+(typeof j=="string"?j.toString():new TextDecoder(R||void 0).decode(j)),P=0,a="",i&&(j.charCodeAt(0)===65279&&P++,i=void 0);P<j.length;){if(search.lastIndex=P,_=search.exec(j),N=_&&_.index!==void 0?_.index:j.length,I=j.charCodeAt(N),!_){a=j.slice(P);break}if(I===10&&P===N&&o)S.push(-3),o=void 0;else switch(o&&(S.push(-5),o=void 0),P<N&&(S.push(j.slice(P,N)),s+=N-P),I){case 0:{S.push(65533),s++;break}case 9:{for(T=Math.ceil(s/4)*4,S.push(-2);s++<T;)S.push(-1);break}case 10:{S.push(-4),s=1;break}default:o=!0,s=1}P=N+1}return C&&(o&&S.push(-5),a&&S.push(a),S.push(null)),S}}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function decodeString(s){return s.replace(characterEscapeOrReference,decode)}function decode(s,a,i){if(a)return a;if(i.charCodeAt(0)===35){const E=i.charCodeAt(1),j=E===120||E===88;return decodeNumericCharacterReference(i.slice(j?2:1),j?16:10)}return decodeNamedCharacterReference(i)||s}const own$2={}.hasOwnProperty;function fromMarkdown(s,a,i){return typeof a!="string"&&(i=a,a=void 0),compiler(i)(postprocess(parse(i).document().write(preprocess()(s,a,!0))))}function compiler(s){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:j(qe),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:j(Oe),blockQuote:j(Se),characterEscape:ne,characterReference:ne,codeFenced:j(ze),codeFencedFenceInfo:R,codeFencedFenceMeta:R,codeIndented:j(ze,R),codeText:j(Me,R),codeTextData:ne,data:ne,codeFlowValue:ne,definition:j(Te),definitionDestinationString:R,definitionLabelString:R,definitionTitleString:R,emphasis:j(be),hardBreakEscape:j(Ge),hardBreakTrailing:j(Ge),htmlFlow:j(We,R),htmlFlowData:ne,htmlText:j(We,R),htmlTextData:ne,image:j($e),label:R,link:j(qe),listItem:j(Je),listItemValue:N,listOrdered:j(Qe,P),listUnordered:j(Qe),paragraph:j(st),reference:ee,referenceString:R,resourceDestinationString:R,resourceTitleString:R,setextHeading:j(Oe),strong:j(rt),thematicBreak:j(Re)},exit:{atxHeading:S(),atxHeadingSequence:V,autolink:S(),autolinkEmail:Ue,autolinkProtocol:Ze,blockQuote:S(),characterEscapeValue:le,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:Ae,characterReference:De,codeFenced:S(B),codeFencedFence:D,codeFencedFenceInfo:I,codeFencedFenceMeta:M,codeFlowValue:le,codeIndented:S(F),codeText:S(oe),codeTextData:le,data:le,definition:S(),definitionDestinationString:$,definitionLabelString:O,definitionTitleString:L,emphasis:S(),hardBreakEscape:S(ce),hardBreakTrailing:S(ce),htmlFlow:S(pe),htmlFlowData:le,htmlText:S(xe),htmlTextData:le,image:S(ae),label:W,labelText:H,lineEnding:ue,link:S(Y),listItem:S(),listOrdered:S(),listUnordered:S(),paragraph:S(),referenceString:ye,resourceDestinationString:U,resourceTitleString:ie,resource:me,setextHeading:S(J),setextHeadingLineSequence:K,setextHeadingText:G,strong:S(),thematicBreak:S()}};configure(a,(s||{}).mdastExtensions||[]);const i={};return o;function o(fe){let ve={type:"root",children:[]};const _e={stack:[ve],tokenStack:[],config:a,enter:C,exit:_,buffer:R,resume:T,data:i},Ie=[];let ke=-1;for(;++ke<fe.length;)if(fe[ke][1].type==="listOrdered"||fe[ke][1].type==="listUnordered")if(fe[ke][0]==="enter")Ie.push(ke);else{const Le=Ie.pop();ke=E(fe,Le,ke)}for(ke=-1;++ke<fe.length;){const Le=a[fe[ke][0]];own$2.call(Le,fe[ke][1].type)&&Le[fe[ke][1].type].call(Object.assign({sliceSerialize:fe[ke][2].sliceSerialize},_e),fe[ke][1])}if(_e.tokenStack.length>0){const Le=_e.tokenStack[_e.tokenStack.length-1];(Le[1]||defaultOnError).call(_e,void 0,Le[0])}for(ve.position={start:point(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:point(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},ke=-1;++ke<a.transforms.length;)ve=a.transforms[ke](ve)||ve;return ve}function E(fe,ve,_e){let Ie=ve-1,ke=-1,Le=!1,et,nt,ft,mt;for(;++Ie<=_e;){const at=fe[Ie];switch(at[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{at[0]==="enter"?ke++:ke--,mt=void 0;break}case"lineEndingBlank":{at[0]==="enter"&&(et&&!mt&&!ke&&!ft&&(ft=Ie),mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mt=void 0}if(!ke&&at[0]==="enter"&&at[1].type==="listItemPrefix"||ke===-1&&at[0]==="exit"&&(at[1].type==="listUnordered"||at[1].type==="listOrdered")){if(et){let ct=Ie;for(nt=void 0;ct--;){const Be=fe[ct];if(Be[1].type==="lineEnding"||Be[1].type==="lineEndingBlank"){if(Be[0]==="exit")continue;nt&&(fe[nt][1].type="lineEndingBlank",Le=!0),Be[1].type="lineEnding",nt=ct}else if(!(Be[1].type==="linePrefix"||Be[1].type==="blockQuotePrefix"||Be[1].type==="blockQuotePrefixWhitespace"||Be[1].type==="blockQuoteMarker"||Be[1].type==="listItemIndent"))break}ft&&(!nt||ft<nt)&&(et._spread=!0),et.end=Object.assign({},nt?fe[nt][1].start:at[1].end),fe.splice(nt||Ie,0,["exit",et,at[2]]),Ie++,_e++}if(at[1].type==="listItemPrefix"){const ct={type:"listItem",_spread:!1,start:Object.assign({},at[1].start),end:void 0};et=ct,fe.splice(Ie,0,["enter",ct,at[2]]),Ie++,_e++,ft=void 0,mt=!0}}}return fe[ve][1]._spread=Le,_e}function j(fe,ve){return _e;function _e(Ie){C.call(this,fe(Ie),Ie),ve&&ve.call(this,Ie)}}function R(){this.stack.push({type:"fragment",children:[]})}function C(fe,ve,_e){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([ve,_e||void 0]),fe.position={start:point(ve.start),end:void 0}}function S(fe){return ve;function ve(_e){fe&&fe.call(this,_e),_.call(this,_e)}}function _(fe,ve){const _e=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==fe.type&&(ve?ve.call(this,fe,Ie[0]):(Ie[1]||defaultOnError).call(this,fe,Ie[0]));else throw new Error("Cannot close `"+fe.type+"` ("+stringifyPosition({start:fe.start,end:fe.end})+"): it’s not open");_e.position.end=point(fe.end)}function T(){return toString$1(this.stack.pop())}function P(){this.data.expectingFirstListItemValue=!0}function N(fe){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function I(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=fe}function M(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=fe}function D(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function B(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function F(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe.replace(/(\r?\n|\r)$/g,"")}function O(fe){const ve=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ve,_e.identifier=normalizeIdentifier(this.sliceSerialize(fe)).toLowerCase()}function L(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.title=fe}function $(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.url=fe}function V(fe){const ve=this.stack[this.stack.length-1];if(!ve.depth){const _e=this.sliceSerialize(fe).length;ve.depth=_e}}function G(){this.data.setextHeadingSlurpLineEnding=!0}function K(fe){const ve=this.stack[this.stack.length-1];ve.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function J(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(fe){const _e=this.stack[this.stack.length-1].children;let Ie=_e[_e.length-1];(!Ie||Ie.type!=="text")&&(Ie=Ke(),Ie.position={start:point(fe.start),end:void 0},_e.push(Ie)),this.stack.push(Ie)}function le(fe){const ve=this.stack.pop();ve.value+=this.sliceSerialize(fe),ve.position.end=point(fe.end)}function ue(fe){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=ve.children[ve.children.length-1];_e.position.end=point(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ve.type)&&(ne.call(this,fe),le.call(this,fe))}function ce(){this.data.atHardBreak=!0}function pe(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function xe(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function oe(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.value=fe}function Y(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ve,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function ae(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=ve,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function H(fe){const ve=this.sliceSerialize(fe),_e=this.stack[this.stack.length-2];_e.label=decodeString(ve),_e.identifier=normalizeIdentifier(ve).toLowerCase()}function W(){const fe=this.stack[this.stack.length-1],ve=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Ie=fe.children;_e.children=Ie}else _e.alt=ve}function U(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.url=fe}function ie(){const fe=this.resume(),ve=this.stack[this.stack.length-1];ve.title=fe}function me(){this.data.inReference=void 0}function ee(){this.data.referenceType="collapsed"}function ye(fe){const ve=this.resume(),_e=this.stack[this.stack.length-1];_e.label=ve,_e.identifier=normalizeIdentifier(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function Ce(fe){this.data.characterReferenceType=fe.type}function Ae(fe){const ve=this.sliceSerialize(fe),_e=this.data.characterReferenceType;let Ie;_e?(Ie=decodeNumericCharacterReference(ve,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=decodeNamedCharacterReference(ve);const ke=this.stack[this.stack.length-1];ke.value+=Ie}function De(fe){const ve=this.stack.pop();ve.position.end=point(fe.end)}function Ze(fe){le.call(this,fe);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(fe)}function Ue(fe){le.call(this,fe);const ve=this.stack[this.stack.length-1];ve.url="mailto:"+this.sliceSerialize(fe)}function Se(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function Me(){return{type:"inlineCode",value:""}}function Te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function be(){return{type:"emphasis",children:[]}}function Oe(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function We(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function qe(){return{type:"link",title:null,url:"",children:[]}}function Qe(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function Je(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function st(){return{type:"paragraph",children:[]}}function rt(){return{type:"strong",children:[]}}function Ke(){return{type:"text",value:""}}function Re(){return{type:"thematicBreak"}}}function point(s){return{line:s.line,column:s.column,offset:s.offset}}function configure(s,a){let i=-1;for(;++i<a.length;){const o=a[i];Array.isArray(o)?configure(s,o):extension(s,o)}}function extension(s,a){let i;for(i in a)if(own$2.call(a,i))switch(i){case"canContainEols":{const o=a[i];o&&s[i].push(...o);break}case"transforms":{const o=a[i];o&&s[i].push(...o);break}case"enter":case"exit":{const o=a[i];o&&Object.assign(s[i],o);break}}}function defaultOnError(s,a){throw s?new Error("Cannot close `"+s.type+"` ("+stringifyPosition({start:s.start,end:s.end})+"): a different token (`"+a.type+"`, "+stringifyPosition({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+stringifyPosition({start:a.start,end:a.end})+") is still open")}function remarkParse(s){const a=this;a.parser=i;function i(o){return fromMarkdown(o,{...a.data("settings"),...s,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function blockquote(s,a){const i={type:"element",tagName:"blockquote",properties:{},children:s.wrap(s.all(a),!0)};return s.patch(a,i),s.applyData(a,i)}function hardBreak(s,a){const i={type:"element",tagName:"br",properties:{},children:[]};return s.patch(a,i),[s.applyData(a,i),{type:"text",value:`
`}]}function code(s,a){const i=a.value?a.value+`
`:"",o={};a.lang&&(o.className=["language-"+a.lang]);let E={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return a.meta&&(E.data={meta:a.meta}),s.patch(a,E),E=s.applyData(a,E),E={type:"element",tagName:"pre",properties:{},children:[E]},s.patch(a,E),E}function strikethrough(s,a){const i={type:"element",tagName:"del",properties:{},children:s.all(a)};return s.patch(a,i),s.applyData(a,i)}function emphasis(s,a){const i={type:"element",tagName:"em",properties:{},children:s.all(a)};return s.patch(a,i),s.applyData(a,i)}function footnoteReference(s,a){const i=typeof s.options.clobberPrefix=="string"?s.options.clobberPrefix:"user-content-",o=String(a.identifier).toUpperCase(),E=normalizeUri(o.toLowerCase()),j=s.footnoteOrder.indexOf(o);let R,C=s.footnoteCounts.get(o);C===void 0?(C=0,s.footnoteOrder.push(o),R=s.footnoteOrder.length):R=j+1,C+=1,s.footnoteCounts.set(o,C);const S={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+E,id:i+"fnref-"+E+(C>1?"-"+C:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(R)}]};s.patch(a,S);const _={type:"element",tagName:"sup",properties:{},children:[S]};return s.patch(a,_),s.applyData(a,_)}function heading(s,a){const i={type:"element",tagName:"h"+a.depth,properties:{},children:s.all(a)};return s.patch(a,i),s.applyData(a,i)}function html(s,a){if(s.options.allowDangerousHtml){const i={type:"raw",value:a.value};return s.patch(a,i),s.applyData(a,i)}}function revert(s,a){const i=a.referenceType;let o="]";if(i==="collapsed"?o+="[]":i==="full"&&(o+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+o}];const E=s.all(a),j=E[0];j&&j.type==="text"?j.value="["+j.value:E.unshift({type:"text",value:"["});const R=E[E.length-1];return R&&R.type==="text"?R.value+=o:E.push({type:"text",value:o}),E}function imageReference(s,a){const i=String(a.identifier).toUpperCase(),o=s.definitionById.get(i);if(!o)return revert(s,a);const E={src:normalizeUri(o.url||""),alt:a.alt};o.title!==null&&o.title!==void 0&&(E.title=o.title);const j={type:"element",tagName:"img",properties:E,children:[]};return s.patch(a,j),s.applyData(a,j)}function image(s,a){const i={src:normalizeUri(a.url)};a.alt!==null&&a.alt!==void 0&&(i.alt=a.alt),a.title!==null&&a.title!==void 0&&(i.title=a.title);const o={type:"element",tagName:"img",properties:i,children:[]};return s.patch(a,o),s.applyData(a,o)}function inlineCode(s,a){const i={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};s.patch(a,i);const o={type:"element",tagName:"code",properties:{},children:[i]};return s.patch(a,o),s.applyData(a,o)}function linkReference(s,a){const i=String(a.identifier).toUpperCase(),o=s.definitionById.get(i);if(!o)return revert(s,a);const E={href:normalizeUri(o.url||"")};o.title!==null&&o.title!==void 0&&(E.title=o.title);const j={type:"element",tagName:"a",properties:E,children:s.all(a)};return s.patch(a,j),s.applyData(a,j)}function link(s,a){const i={href:normalizeUri(a.url)};a.title!==null&&a.title!==void 0&&(i.title=a.title);const o={type:"element",tagName:"a",properties:i,children:s.all(a)};return s.patch(a,o),s.applyData(a,o)}function listItem(s,a,i){const o=s.all(a),E=i?listLoose(i):listItemLoose(a),j={},R=[];if(typeof a.checked=="boolean"){const T=o[0];let P;T&&T.type==="element"&&T.tagName==="p"?P=T:(P={type:"element",tagName:"p",properties:{},children:[]},o.unshift(P)),P.children.length>0&&P.children.unshift({type:"text",value:" "}),P.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:a.checked,disabled:!0},children:[]}),j.className=["task-list-item"]}let C=-1;for(;++C<o.length;){const T=o[C];(E||C!==0||T.type!=="element"||T.tagName!=="p")&&R.push({type:"text",value:`
`}),T.type==="element"&&T.tagName==="p"&&!E?R.push(...T.children):R.push(T)}const S=o[o.length-1];S&&(E||S.type!=="element"||S.tagName!=="p")&&R.push({type:"text",value:`
`});const _={type:"element",tagName:"li",properties:j,children:R};return s.patch(a,_),s.applyData(a,_)}function listLoose(s){let a=!1;if(s.type==="list"){a=s.spread||!1;const i=s.children;let o=-1;for(;!a&&++o<i.length;)a=listItemLoose(i[o])}return a}function listItemLoose(s){const a=s.spread;return a??s.children.length>1}function list(s,a){const i={},o=s.all(a);let E=-1;for(typeof a.start=="number"&&a.start!==1&&(i.start=a.start);++E<o.length;){const R=o[E];if(R.type==="element"&&R.tagName==="li"&&R.properties&&Array.isArray(R.properties.className)&&R.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const j={type:"element",tagName:a.ordered?"ol":"ul",properties:i,children:s.wrap(o,!0)};return s.patch(a,j),s.applyData(a,j)}function paragraph(s,a){const i={type:"element",tagName:"p",properties:{},children:s.all(a)};return s.patch(a,i),s.applyData(a,i)}function root(s,a){const i={type:"root",children:s.wrap(s.all(a))};return s.patch(a,i),s.applyData(a,i)}function strong(s,a){const i={type:"element",tagName:"strong",properties:{},children:s.all(a)};return s.patch(a,i),s.applyData(a,i)}function table(s,a){const i=s.all(a),o=i.shift(),E=[];if(o){const R={type:"element",tagName:"thead",properties:{},children:s.wrap([o],!0)};s.patch(a.children[0],R),E.push(R)}if(i.length>0){const R={type:"element",tagName:"tbody",properties:{},children:s.wrap(i,!0)},C=pointStart(a.children[1]),S=pointEnd(a.children[a.children.length-1]);C&&S&&(R.position={start:C,end:S}),E.push(R)}const j={type:"element",tagName:"table",properties:{},children:s.wrap(E,!0)};return s.patch(a,j),s.applyData(a,j)}function tableRow(s,a,i){const o=i?i.children:void 0,j=(o?o.indexOf(a):1)===0?"th":"td",R=i&&i.type==="table"?i.align:void 0,C=R?R.length:a.children.length;let S=-1;const _=[];for(;++S<C;){const P=a.children[S],N={},I=R?R[S]:void 0;I&&(N.align=I);let M={type:"element",tagName:j,properties:N,children:[]};P&&(M.children=s.all(P),s.patch(P,M),M=s.applyData(P,M)),_.push(M)}const T={type:"element",tagName:"tr",properties:{},children:s.wrap(_,!0)};return s.patch(a,T),s.applyData(a,T)}function tableCell(s,a){const i={type:"element",tagName:"td",properties:{},children:s.all(a)};return s.patch(a,i),s.applyData(a,i)}const tab=9,space=32;function trimLines(s){const a=String(s),i=/\r?\n|\r/g;let o=i.exec(a),E=0;const j=[];for(;o;)j.push(trimLine(a.slice(E,o.index),E>0,!0),o[0]),E=o.index+o[0].length,o=i.exec(a);return j.push(trimLine(a.slice(E),E>0,!1)),j.join("")}function trimLine(s,a,i){let o=0,E=s.length;if(a){let j=s.codePointAt(o);for(;j===tab||j===space;)o++,j=s.codePointAt(o)}if(i){let j=s.codePointAt(E-1);for(;j===tab||j===space;)E--,j=s.codePointAt(E-1)}return E>o?s.slice(o,E):""}function text(s,a){const i={type:"text",value:trimLines(String(a.value))};return s.patch(a,i),s.applyData(a,i)}function thematicBreak(s,a){const i={type:"element",tagName:"hr",properties:{},children:[]};return s.patch(a,i),s.applyData(a,i)}const handlers={blockquote,break:hardBreak,code,delete:strikethrough,emphasis,footnoteReference,heading,html,imageReference,image,inlineCode,linkReference,link,listItem,list,paragraph,root,strong,table,tableCell,tableRow,text,thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}const VOID=-1,PRIMITIVE=0,ARRAY=1,OBJECT=2,DATE=3,REGEXP=4,MAP=5,SET=6,ERROR=7,BIGINT=8,env=typeof self=="object"?self:globalThis,deserializer=(s,a)=>{const i=(E,j)=>(s.set(j,E),E),o=E=>{if(s.has(E))return s.get(E);const[j,R]=a[E];switch(j){case PRIMITIVE:case VOID:return i(R,E);case ARRAY:{const C=i([],E);for(const S of R)C.push(o(S));return C}case OBJECT:{const C=i({},E);for(const[S,_]of R)C[o(S)]=o(_);return C}case DATE:return i(new Date(R),E);case REGEXP:{const{source:C,flags:S}=R;return i(new RegExp(C,S),E)}case MAP:{const C=i(new Map,E);for(const[S,_]of R)C.set(o(S),o(_));return C}case SET:{const C=i(new Set,E);for(const S of R)C.add(o(S));return C}case ERROR:{const{name:C,message:S}=R;return i(new env[C](S),E)}case BIGINT:return i(BigInt(R),E);case"BigInt":return i(Object(BigInt(R)),E)}return i(new env[j](R),E)};return o},deserialize=s=>deserializer(new Map,s)(0),EMPTY="",{toString}={},{keys}=Object,typeOf=s=>{const a=typeof s;if(a!=="object"||!s)return[PRIMITIVE,a];const i=toString.call(s).slice(8,-1);switch(i){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY]}return i.includes("Array")?[ARRAY,i]:i.includes("Error")?[ERROR,i]:[OBJECT,i]},shouldSkip=([s,a])=>s===PRIMITIVE&&(a==="function"||a==="symbol"),serializer=(s,a,i,o)=>{const E=(R,C)=>{const S=o.push(R)-1;return i.set(C,S),S},j=R=>{if(i.has(R))return i.get(R);let[C,S]=typeOf(R);switch(C){case PRIMITIVE:{let T=R;switch(S){case"bigint":C=BIGINT,T=R.toString();break;case"function":case"symbol":if(s)throw new TypeError("unable to serialize "+S);T=null;break;case"undefined":return E([VOID],R)}return E([C,T],R)}case ARRAY:{if(S)return E([S,[...R]],R);const T=[],P=E([C,T],R);for(const N of R)T.push(j(N));return P}case OBJECT:{if(S)switch(S){case"BigInt":return E([S,R.toString()],R);case"Boolean":case"Number":case"String":return E([S,R.valueOf()],R)}if(a&&"toJSON"in R)return j(R.toJSON());const T=[],P=E([C,T],R);for(const N of keys(R))(s||!shouldSkip(typeOf(R[N])))&&T.push([j(N),j(R[N])]);return P}case DATE:return E([C,R.toISOString()],R);case REGEXP:{const{source:T,flags:P}=R;return E([C,{source:T,flags:P}],R)}case MAP:{const T=[],P=E([C,T],R);for(const[N,I]of R)(s||!(shouldSkip(typeOf(N))||shouldSkip(typeOf(I))))&&T.push([j(N),j(I)]);return P}case SET:{const T=[],P=E([C,T],R);for(const N of R)(s||!shouldSkip(typeOf(N)))&&T.push(j(N));return P}}const{message:_}=R;return E([C,{name:S,message:_}],R)};return j},serialize=(s,{json:a,lossy:i}={})=>{const o=[];return serializer(!(a||i),!!a,new Map,o)(s),o},structuredClone$1=typeof structuredClone=="function"?(s,a)=>a&&("json"in a||"lossy"in a)?deserialize(serialize(s,a)):structuredClone(s):(s,a)=>deserialize(serialize(s,a));function defaultFootnoteBackContent(s,a){const i=[{type:"text",value:"↩"}];return a>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),i}function defaultFootnoteBackLabel(s,a){return"Back to reference "+(s+1)+(a>1?"-"+a:"")}function footer(s){const a=typeof s.options.clobberPrefix=="string"?s.options.clobberPrefix:"user-content-",i=s.options.footnoteBackContent||defaultFootnoteBackContent,o=s.options.footnoteBackLabel||defaultFootnoteBackLabel,E=s.options.footnoteLabel||"Footnotes",j=s.options.footnoteLabelTagName||"h2",R=s.options.footnoteLabelProperties||{className:["sr-only"]},C=[];let S=-1;for(;++S<s.footnoteOrder.length;){const _=s.footnoteById.get(s.footnoteOrder[S]);if(!_)continue;const T=s.all(_),P=String(_.identifier).toUpperCase(),N=normalizeUri(P.toLowerCase());let I=0;const M=[],D=s.footnoteCounts.get(P);for(;D!==void 0&&++I<=D;){M.length>0&&M.push({type:"text",value:" "});let O=typeof i=="string"?i:i(S,I);typeof O=="string"&&(O={type:"text",value:O}),M.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+N+(I>1?"-"+I:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(S,I),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const B=T[T.length-1];if(B&&B.type==="element"&&B.tagName==="p"){const O=B.children[B.children.length-1];O&&O.type==="text"?O.value+=" ":B.children.push({type:"text",value:" "}),B.children.push(...M)}else T.push(...M);const F={type:"element",tagName:"li",properties:{id:a+"fn-"+N},children:s.wrap(T,!0)};s.patch(_,F),C.push(F)}if(C.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:j,properties:{...structuredClone$1(R),id:"footnote-label"},children:[{type:"text",value:E}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:s.wrap(C,!0)},{type:"text",value:`
`}]}}const convert=function(s){if(s==null)return ok;if(typeof s=="function")return castFactory(s);if(typeof s=="object")return Array.isArray(s)?anyFactory(s):propsFactory(s);if(typeof s=="string")return typeFactory(s);throw new Error("Expected function, string, or object as test")};function anyFactory(s){const a=[];let i=-1;for(;++i<s.length;)a[i]=convert(s[i]);return castFactory(o);function o(...E){let j=-1;for(;++j<a.length;)if(a[j].apply(this,E))return!0;return!1}}function propsFactory(s){const a=s;return castFactory(i);function i(o){const E=o;let j;for(j in s)if(E[j]!==a[j])return!1;return!0}}function typeFactory(s){return castFactory(a);function a(i){return i&&i.type===s}}function castFactory(s){return a;function a(i,o,E){return!!(looksLikeANode(i)&&s.call(this,i,typeof o=="number"?o:void 0,E||void 0))}}function ok(){return!0}function looksLikeANode(s){return s!==null&&typeof s=="object"&&"type"in s}function color(s){return s}const empty=[],CONTINUE=!0,EXIT=!1,SKIP="skip";function visitParents(s,a,i,o){let E;typeof a=="function"&&typeof i!="function"?(o=i,i=a):E=a;const j=convert(E),R=o?-1:1;C(s,void 0,[])();function C(S,_,T){const P=S&&typeof S=="object"?S:{};if(typeof P.type=="string"){const I=typeof P.tagName=="string"?P.tagName:typeof P.name=="string"?P.name:void 0;Object.defineProperty(N,"name",{value:"node ("+(S.type+(I?"<"+I+">":""))+")"})}return N;function N(){let I=empty,M,D,B;if((!a||j(S,_,T[T.length-1]||void 0))&&(I=toResult(i(S,T)),I[0]===EXIT))return I;if("children"in S&&S.children){const F=S;if(F.children&&I[0]!==SKIP)for(D=(o?F.children.length:-1)+R,B=T.concat(F);D>-1&&D<F.children.length;){const O=F.children[D];if(M=C(O,D,B)(),M[0]===EXIT)return M;D=typeof M[1]=="number"?M[1]:D+R}}return I}}}function toResult(s){return Array.isArray(s)?s:typeof s=="number"?[CONTINUE,s]:s==null?empty:[s]}function visit(s,a,i,o){let E,j,R;typeof a=="function"&&typeof i!="function"?(j=void 0,R=a,E=i):(j=a,R=i,E=o),visitParents(s,j,C,E);function C(S,_){const T=_[_.length-1],P=T?T.children.indexOf(S):void 0;return R(S,P,T)}}const own$1={}.hasOwnProperty,emptyOptions={};function createState(s,a){const i=a||emptyOptions,o=new Map,E=new Map,j=new Map,R={...handlers,...i.handlers},C={all:_,applyData,definitionById:o,footnoteById:E,footnoteCounts:j,footnoteOrder:[],handlers:R,one:S,options:i,patch,wrap:wrap$1};return visit(s,function(T){if(T.type==="definition"||T.type==="footnoteDefinition"){const P=T.type==="definition"?o:E,N=String(T.identifier).toUpperCase();P.has(N)||P.set(N,T)}}),C;function S(T,P){const N=T.type,I=C.handlers[N];if(own$1.call(C.handlers,N)&&I)return I(C,T,P);if(C.options.passThrough&&C.options.passThrough.includes(N)){if("children"in T){const{children:D,...B}=T,F=structuredClone$1(B);return F.children=C.all(T),F}return structuredClone$1(T)}return(C.options.unknownHandler||defaultUnknownHandler)(C,T,P)}function _(T){const P=[];if("children"in T){const N=T.children;let I=-1;for(;++I<N.length;){const M=C.one(N[I],T);if(M){if(I&&N[I-1].type==="break"&&(!Array.isArray(M)&&M.type==="text"&&(M.value=trimMarkdownSpaceStart(M.value)),!Array.isArray(M)&&M.type==="element")){const D=M.children[0];D&&D.type==="text"&&(D.value=trimMarkdownSpaceStart(D.value))}Array.isArray(M)?P.push(...M):P.push(M)}}}return P}}function patch(s,a){s.position&&(a.position=position$1(s))}function applyData(s,a){let i=a;if(s&&s.data){const o=s.data.hName,E=s.data.hChildren,j=s.data.hProperties;if(typeof o=="string")if(i.type==="element")i.tagName=o;else{const R="children"in i?i.children:[i];i={type:"element",tagName:o,properties:{},children:R}}i.type==="element"&&j&&Object.assign(i.properties,structuredClone$1(j)),"children"in i&&i.children&&E!==null&&E!==void 0&&(i.children=E)}return i}function defaultUnknownHandler(s,a){const i=a.data||{},o="value"in a&&!(own$1.call(i,"hProperties")||own$1.call(i,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:s.all(a)};return s.patch(a,o),s.applyData(a,o)}function wrap$1(s,a){const i=[];let o=-1;for(a&&i.push({type:"text",value:`
`});++o<s.length;)o&&i.push({type:"text",value:`
`}),i.push(s[o]);return a&&s.length>0&&i.push({type:"text",value:`
`}),i}function trimMarkdownSpaceStart(s){let a=0,i=s.charCodeAt(a);for(;i===9||i===32;)a++,i=s.charCodeAt(a);return s.slice(a)}function toHast(s,a){const i=createState(s,a),o=i.one(s,void 0),E=footer(i),j=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return E&&j.children.push({type:"text",value:`
`},E),j}function remarkRehype(s,a){return s&&"run"in s?async function(i,o){const E=toHast(i,{file:o,...a});await s.run(E,o)}:function(i,o){return toHast(i,{file:o,...s||a})}}function bail(s){if(s)throw s}var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function s(a){return typeof Array.isArray=="function"?Array.isArray(a):toStr.call(a)==="[object Array]"},isPlainObject$1=function s(a){if(!a||toStr.call(a)!=="[object Object]")return!1;var i=hasOwn.call(a,"constructor"),o=a.constructor&&a.constructor.prototype&&hasOwn.call(a.constructor.prototype,"isPrototypeOf");if(a.constructor&&!i&&!o)return!1;var E;for(E in a);return typeof E>"u"||hasOwn.call(a,E)},setProperty=function s(a,i){defineProperty&&i.name==="__proto__"?defineProperty(a,i.name,{enumerable:!0,configurable:!0,value:i.newValue,writable:!0}):a[i.name]=i.newValue},getProperty=function s(a,i){if(i==="__proto__")if(hasOwn.call(a,i)){if(gOPD)return gOPD(a,i).value}else return;return a[i]},extend=function s(){var a,i,o,E,j,R,C=arguments[0],S=1,_=arguments.length,T=!1;for(typeof C=="boolean"&&(T=C,C=arguments[1]||{},S=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});S<_;++S)if(a=arguments[S],a!=null)for(i in a)o=getProperty(C,i),E=getProperty(a,i),C!==E&&(T&&E&&(isPlainObject$1(E)||(j=isArray(E)))?(j?(j=!1,R=o&&isArray(o)?o:[]):R=o&&isPlainObject$1(o)?o:{},setProperty(C,{name:i,newValue:s(T,R,E)})):typeof E<"u"&&setProperty(C,{name:i,newValue:E}));return C};const extend$1=getDefaultExportFromCjs(extend);function isPlainObject(s){if(typeof s!="object"||s===null)return!1;const a=Object.getPrototypeOf(s);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)}function trough(){const s=[],a={run:i,use:o};return a;function i(...E){let j=-1;const R=E.pop();if(typeof R!="function")throw new TypeError("Expected function as last argument, not "+R);C(null,...E);function C(S,..._){const T=s[++j];let P=-1;if(S){R(S);return}for(;++P<E.length;)(_[P]===null||_[P]===void 0)&&(_[P]=E[P]);E=_,T?wrap(T,C)(..._):R(null,..._)}}function o(E){if(typeof E!="function")throw new TypeError("Expected `middelware` to be a function, not "+E);return s.push(E),a}}function wrap(s,a){let i;return o;function o(...R){const C=s.length>R.length;let S;C&&R.push(E);try{S=s.apply(this,R)}catch(_){const T=_;if(C&&i)throw T;return E(T)}C||(S&&S.then&&typeof S.then=="function"?S.then(j,E):S instanceof Error?E(S):j(S))}function E(R,...C){i||(i=!0,a(R,...C))}function j(R){E(null,R)}}const minpath={basename,dirname,extname,join,sep:"/"};function basename(s,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');assertPath$1(s);let i=0,o=-1,E=s.length,j;if(a===void 0||a.length===0||a.length>s.length){for(;E--;)if(s.codePointAt(E)===47){if(j){i=E+1;break}}else o<0&&(j=!0,o=E+1);return o<0?"":s.slice(i,o)}if(a===s)return"";let R=-1,C=a.length-1;for(;E--;)if(s.codePointAt(E)===47){if(j){i=E+1;break}}else R<0&&(j=!0,R=E+1),C>-1&&(s.codePointAt(E)===a.codePointAt(C--)?C<0&&(o=E):(C=-1,o=R));return i===o?o=R:o<0&&(o=s.length),s.slice(i,o)}function dirname(s){if(assertPath$1(s),s.length===0)return".";let a=-1,i=s.length,o;for(;--i;)if(s.codePointAt(i)===47){if(o){a=i;break}}else o||(o=!0);return a<0?s.codePointAt(0)===47?"/":".":a===1&&s.codePointAt(0)===47?"//":s.slice(0,a)}function extname(s){assertPath$1(s);let a=s.length,i=-1,o=0,E=-1,j=0,R;for(;a--;){const C=s.codePointAt(a);if(C===47){if(R){o=a+1;break}continue}i<0&&(R=!0,i=a+1),C===46?E<0?E=a:j!==1&&(j=1):E>-1&&(j=-1)}return E<0||i<0||j===0||j===1&&E===i-1&&E===o+1?"":s.slice(E,i)}function join(...s){let a=-1,i;for(;++a<s.length;)assertPath$1(s[a]),s[a]&&(i=i===void 0?s[a]:i+"/"+s[a]);return i===void 0?".":normalize(i)}function normalize(s){assertPath$1(s);const a=s.codePointAt(0)===47;let i=normalizeString(s,!a);return i.length===0&&!a&&(i="."),i.length>0&&s.codePointAt(s.length-1)===47&&(i+="/"),a?"/"+i:i}function normalizeString(s,a){let i="",o=0,E=-1,j=0,R=-1,C,S;for(;++R<=s.length;){if(R<s.length)C=s.codePointAt(R);else{if(C===47)break;C=47}if(C===47){if(!(E===R-1||j===1))if(E!==R-1&&j===2){if(i.length<2||o!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(S=i.lastIndexOf("/"),S!==i.length-1){S<0?(i="",o=0):(i=i.slice(0,S),o=i.length-1-i.lastIndexOf("/")),E=R,j=0;continue}}else if(i.length>0){i="",o=0,E=R,j=0;continue}}a&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+s.slice(E+1,R):i=s.slice(E+1,R),o=R-E-1;E=R,j=0}else C===46&&j>-1?j++:j=-1}return i}function assertPath$1(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}const minproc={cwd};function cwd(){return"/"}function isUrl(s){return!!(s!==null&&typeof s=="object"&&"href"in s&&s.href&&"protocol"in s&&s.protocol&&s.auth===void 0)}function urlToPath(s){if(typeof s=="string")s=new URL(s);else if(!isUrl(s)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+s+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(s.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return getPathFromURLPosix(s)}function getPathFromURLPosix(s){if(s.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const a=s.pathname;let i=-1;for(;++i<a.length;)if(a.codePointAt(i)===37&&a.codePointAt(i+1)===50){const o=a.codePointAt(i+2);if(o===70||o===102){const E=new TypeError("File URL path must not include encoded / characters");throw E.code="ERR_INVALID_FILE_URL_PATH",E}}return decodeURIComponent(a)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(a){let i;a?isUrl(a)?i={path:a}:typeof a=="string"||isUint8Array$1(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":minproc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let o=-1;for(;++o<order.length;){const j=order[o];j in i&&i[j]!==void 0&&i[j]!==null&&(this[j]=j==="history"?[...i[j]]:i[j])}let E;for(E in i)order.includes(E)||(this[E]=i[E])}get basename(){return typeof this.path=="string"?minpath.basename(this.path):void 0}set basename(a){assertNonEmpty(a,"basename"),assertPart(a,"basename"),this.path=minpath.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?minpath.dirname(this.path):void 0}set dirname(a){assertPath(this.basename,"dirname"),this.path=minpath.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?minpath.extname(this.path):void 0}set extname(a){if(assertPart(a,"extname"),assertPath(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=minpath.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){isUrl(a)&&(a=urlToPath(a)),assertNonEmpty(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?minpath.basename(this.path,this.extname):void 0}set stem(a){assertNonEmpty(a,"stem"),assertPart(a,"stem"),this.path=minpath.join(this.dirname||"",a+(this.extname||""))}fail(a,i,o){const E=this.message(a,i,o);throw E.fatal=!0,E}info(a,i,o){const E=this.message(a,i,o);return E.fatal=void 0,E}message(a,i,o){const E=new VFileMessage(a,i,o);return this.path&&(E.name=this.path+":"+E.name,E.file=this.path),E.fatal=!1,this.messages.push(E),E}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function assertPart(s,a){if(s&&s.includes(minpath.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(s,a){if(!s)throw new Error("`"+a+"` cannot be empty")}function assertPath(s,a){if(!s)throw new Error("Setting `"+a+"` requires `path` to be set too")}function isUint8Array$1(s){return!!(s&&typeof s=="object"&&"byteLength"in s&&"byteOffset"in s)}const CallableInstance=function(s){const o=this.constructor.prototype,E=o[s],j=function(){return E.apply(j,arguments)};return Object.setPrototypeOf(j,o),j},own={}.hasOwnProperty;class Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){const a=new Processor;let i=-1;for(;++i<this.attachers.length;){const o=this.attachers[i];a.use(...o)}return a.data(extend$1(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(assertUnfrozen("data",this.frozen),this.namespace[a]=i,this):own.call(this.namespace,a)&&this.namespace[a]||void 0:a?(assertUnfrozen("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...o]=this.attachers[this.freezeIndex];if(o[0]===!1)continue;o[0]===!0&&(o[0]=void 0);const E=i.call(a,...o);typeof E=="function"&&this.transformers.use(E)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const i=vfile(a),o=this.parser||this.Parser;return assertParser("parse",o),o(String(i),i)}process(a,i){const o=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),i?E(void 0,i):new Promise(E);function E(j,R){const C=vfile(a),S=o.parse(C);o.run(S,C,function(T,P,N){if(T||!P||!N)return _(T);const I=P,M=o.stringify(I,N);looksLikeAValue(M)?N.value=M:N.result=M,_(T,N)});function _(T,P){T||!P?R(T):j?j(P):i(void 0,P)}}}processSync(a){let i=!1,o;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(a,E),assertDone("processSync","process",i),o;function E(j,R){i=!0,bail(j),o=R}}run(a,i,o){assertNode(a),this.freeze();const E=this.transformers;return!o&&typeof i=="function"&&(o=i,i=void 0),o?j(void 0,o):new Promise(j);function j(R,C){const S=vfile(i);E.run(a,S,_);function _(T,P,N){const I=P||a;T?C(T):R?R(I):o(void 0,I,N)}}}runSync(a,i){let o=!1,E;return this.run(a,i,j),assertDone("runSync","run",o),E;function j(R,C){bail(R),E=C,o=!0}}stringify(a,i){this.freeze();const o=vfile(i),E=this.compiler||this.Compiler;return assertCompiler("stringify",E),assertNode(a),E(a,o)}use(a,...i){const o=this.attachers,E=this.namespace;if(assertUnfrozen("use",this.frozen),a!=null)if(typeof a=="function")S(a,i);else if(typeof a=="object")Array.isArray(a)?C(a):R(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function j(_){if(typeof _=="function")S(_,[]);else if(typeof _=="object")if(Array.isArray(_)){const[T,...P]=_;S(T,P)}else R(_);else throw new TypeError("Expected usable value, not `"+_+"`")}function R(_){if(!("plugins"in _)&&!("settings"in _))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");C(_.plugins),_.settings&&(E.settings=extend$1(!0,E.settings,_.settings))}function C(_){let T=-1;if(_!=null)if(Array.isArray(_))for(;++T<_.length;){const P=_[T];j(P)}else throw new TypeError("Expected a list of plugins, not `"+_+"`")}function S(_,T){let P=-1,N=-1;for(;++P<o.length;)if(o[P][0]===_){N=P;break}if(N===-1)o.push([_,...T]);else if(T.length>0){let[I,...M]=T;const D=o[N][1];isPlainObject(D)&&isPlainObject(I)&&(I=extend$1(!0,D,I)),o[N]=[_,I,...M]}}}}const unified=new Processor().freeze();function assertParser(s,a){if(typeof a!="function")throw new TypeError("Cannot `"+s+"` without `parser`")}function assertCompiler(s,a){if(typeof a!="function")throw new TypeError("Cannot `"+s+"` without `compiler`")}function assertUnfrozen(s,a){if(a)throw new Error("Cannot call `"+s+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(s){if(!isPlainObject(s)||typeof s.type!="string")throw new TypeError("Expected node, got `"+s+"`")}function assertDone(s,a,i){if(!i)throw new Error("`"+s+"` finished async. Use `"+a+"` instead")}function vfile(s){return looksLikeAVFile(s)?s:new VFile(s)}function looksLikeAVFile(s){return!!(s&&typeof s=="object"&&"message"in s&&"messages"in s)}function looksLikeAValue(s){return typeof s=="string"||isUint8Array(s)}function isUint8Array(s){return!!(s&&typeof s=="object"&&"byteLength"in s&&"byteOffset"in s)}const changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",emptyPlugins=[],emptyRemarkRehypeOptions={allowDangerousHtml:!0},safeProtocol=/^(https?|ircs?|mailto|xmpp)$/i,deprecations=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Markdown(s){const a=s.allowedElements,i=s.allowElement,o=s.children||"",E=s.className,j=s.components,R=s.disallowedElements,C=s.rehypePlugins||emptyPlugins,S=s.remarkPlugins||emptyPlugins,_=s.remarkRehypeOptions?{...s.remarkRehypeOptions,...emptyRemarkRehypeOptions}:emptyRemarkRehypeOptions,T=s.skipHtml,P=s.unwrapDisallowed,N=s.urlTransform||defaultUrlTransform,I=unified().use(remarkParse).use(S).use(remarkRehype,_).use(C),M=new VFile;typeof o=="string"&&(M.value=o);for(const O of deprecations)Object.hasOwn(s,O.from)&&(""+O.from+(O.to?"use `"+O.to+"` instead":"remove it")+changelog+O.id,void 0);const D=I.parse(M);let B=I.runSync(D,M);return E&&(B={type:"element",tagName:"div",properties:{className:E},children:B.type==="root"?B.children:[B]}),visit(B,F),toJsxRuntime(B,{Fragment:jsxRuntimeExports.Fragment,components:j,ignoreInvalidStyle:!0,jsx:jsxRuntimeExports.jsx,jsxs:jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0});function F(O,L,$){if(O.type==="raw"&&$&&typeof L=="number")return T?$.children.splice(L,1):$.children[L]={type:"text",value:O.value},L;if(O.type==="element"){let V;for(V in urlAttributes)if(Object.hasOwn(urlAttributes,V)&&Object.hasOwn(O.properties,V)){const G=O.properties[V],K=urlAttributes[V];(K===null||K.includes(O.tagName))&&(O.properties[V]=N(String(G||""),V,O))}}if(O.type==="element"){let V=a?!a.includes(O.tagName):R?R.includes(O.tagName):!1;if(!V&&i&&typeof L=="number"&&(V=!i(O,L,$)),V&&$&&typeof L=="number")return P&&O.children?$.children.splice(L,1,...O.children):$.children.splice(L,1),L}}}function defaultUrlTransform(s){const a=s.indexOf(":"),i=s.indexOf("?"),o=s.indexOf("#"),E=s.indexOf("/");return a<0||E>-1&&a>E||i>-1&&a>i||o>-1&&a>o||safeProtocol.test(s.slice(0,a))?s:""}function ChatHistoryPanel({conversations:s,onSelectConversation:a,onNewChat:i,onDeleteConversation:o}){return jsxRuntimeExports.jsxs("div",{className:"w-64 h-full border-r border-gray-200 p-4 flex flex-col",children:[jsxRuntimeExports.jsxs("button",{onClick:i,className:"w-full mb-4 flex items-center justify-center dark:bg-brand-800/40 dark:text-brand-300 dark:hover:bg-brand-800/50 gap-2 px-4 py-2 bg-brand-950 text-white rounded-lg hover:bg-brand-900 transition-colors",children:[jsxRuntimeExports.jsx(MessagesSquare,{size:16}),"New Chat"]}),jsxRuntimeExports.jsx("div",{className:"space-y-2 overflow-y-auto flex-1",children:s.map(E=>jsxRuntimeExports.jsxs("div",{className:"group relative",children:[jsxRuntimeExports.jsx("button",{onClick:()=>a(E.id),className:`w-full text-left px-3 py-2 rounded-lg transition-colors ${E.active?"bg-brand-100 text-brand-950 dark:bg-brand-800/40 dark:text-brand-300":"hover:bg-gray-100 text-gray-700 dark:hover:bg-brand-800/40 dark:text-brand-300"}`,children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(MessagesSquare,{size:14}),jsxRuntimeExports.jsx("span",{className:"text-sm truncate",children:E.title})]})}),jsxRuntimeExports.jsx("button",{onClick:()=>o(E.id),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded-md opacity-0 group-hover:opacity-100 hover:bg-gray-200 transition-opacity",children:jsxRuntimeExports.jsx(ForwardRef$3,{className:"h-4 w-4 text-gray-500"})})]},E.id))})]})}const useChatHistory=(s,a)=>{const[i,o]=reactExports.useState(()=>{const C=localStorage.getItem("chat-conversations");return C?JSON.parse(C):[{id:"1",title:"New Chat",active:!0,messages:[]}]});return reactExports.useEffect(()=>{localStorage.setItem("chat-conversations",JSON.stringify(i))},[i]),reactExports.useEffect(()=>{s.length>1&&o(C=>C.map(S=>{if(S.active){const _=s.find(P=>P&&P.role==="user"),T=_?_.content.slice(0,30)+(_.content.length>30?"...":""):S.title;return{...S,title:T,messages:s}}return S}))},[s]),{conversations:i,handleNewChat:C=>{if(console.log("messages",s,C),s.length<=1&&!C)return;const S={id:Date.now().toString(),title:"New Chat",active:!0,messages:[s[0]]};a([s[0]]),o(_=>_.map(T=>({...T,active:!1})).concat(S))},handleSelectConversation:C=>{const S=i.find(_=>_.id===C);S&&(a(S.messages),o(_=>_.map(T=>({...T,active:T.id===C}))))},handleDeleteConversation:C=>{o(S=>{var T;const _=S.filter(P=>P.id!==C);return(T=S.find(P=>P.id===C))!=null&&T.active&&_.length>0&&(_[0].active=!0,a(_[0].messages)),_})}}},formatSystemMessage=({data:s,settings:a,license:i,activeReport:o,activeGear:E,testMode:j})=>{var S,_,T,P,N,I,M,D,B,F;const R=()=>{let O="";return a==null||a.forEach(L=>{O+=`
- **${L.name}**:
`,L.inputs.forEach($=>{O+=`    - ${$.control_label}: ${$.value?"Enabled":"Disabled"}
`,$.inputs&&$.inputs.forEach(V=>{O+=`    - ${V.control_label}: "${V.value}"
`})})}),O},C=()=>{var V,G,K;const O=((V=s==null?void 0:s.grouped)==null?void 0:V.opportunities)||[],L=((G=s==null?void 0:s.grouped)==null?void 0:G.diagnostics)||[],$=((K=s==null?void 0:s.grouped)==null?void 0:K.passed_audits)||[];return`
    - **Opportunities**:
      ${O.map(J=>`- **${J.name}**: ${J.displayValue}`).join(`
        `)}
    - **Diagnostics**:
      ${L.map(J=>`- **${J.name}**: ${J.displayValue}`).join(`
        `)}
    - **Passed Audits**: Total of ${$.length}
    `};return`
    **User Details:**   
    - **Name**: ${(i==null?void 0:i.name)||"Unknown"}
    - **Website URL**: [${(i==null?void 0:i.siteUrl)||"Unknown"}](${(i==null?void 0:i.siteUrl)||"#"})

    **Google Page Speed Report Summary:**
    - **FCP**: ${((_=(S=s==null?void 0:s.metrics)==null?void 0:S.find(O=>O.id==="first-contentful-paint"))==null?void 0:_.displayValue)||"N/A"}
    - **SI**: ${((P=(T=s==null?void 0:s.metrics)==null?void 0:T.find(O=>O.id==="speed-index"))==null?void 0:P.displayValue)||"N/A"}
    - **TBT**: ${((I=(N=s==null?void 0:s.metrics)==null?void 0:N.find(O=>O.id==="total-blocking-time"))==null?void 0:I.displayValue)||"N/A"}
    - **LCP**: ${((D=(M=s==null?void 0:s.metrics)==null?void 0:M.find(O=>O.id==="largest-contentful-paint"))==null?void 0:D.displayValue)||"N/A"}
    - **CLS**: ${((F=(B=s==null?void 0:s.metrics)==null?void 0:B.find(O=>O.id==="cumulative-layout-shift"))==null?void 0:F.displayValue)||"N/A"}
    - **Performance Score**: ${(s==null?void 0:s.performance)||"N/A"}

    **Current Page Speed Audits:**
    ${C()}

    **${(i==null?void 0:i.name)||"User"}'s Current RapidLoad Settings:**
    Optimizing Device: ${o||"desktop"}
    Performance Score: ${(s==null?void 0:s.performance)||"N/A"}
    Test Mode: ${j?"Enabled":"Disabled"}
    Performance Gear: ${E||"custom"}

    **Speed Settings:**
    ${R()}
  `},WorldIcon=({className:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M6 12C5.16 12 4.37499 11.8425 3.645 11.5275C2.91501 11.2125 2.28 10.785 1.74 10.245C1.2 9.705 0.774999 9.0675 0.465 8.3325C0.155001 7.5975 0 6.81 0 5.97C0 5.13 0.155001 4.34751 0.465 3.6225C0.774999 2.89749 1.2 2.265 1.74 1.725C2.28 1.185 2.91501 0.762501 3.645 0.4575C4.37499 0.152499 5.16 0 6 0C6.84 0 7.62501 0.152499 8.355 0.4575C9.08499 0.762501 9.72 1.185 10.26 1.725C10.8 2.265 11.225 2.89749 11.535 3.6225C11.845 4.34751 12 5.13 12 5.97C12 6.81 11.845 7.5975 11.535 8.3325C11.225 9.0675 10.8 9.705 10.26 10.245C9.72 10.785 9.08499 11.2125 8.355 11.5275C7.62501 11.8425 6.84 12 6 12ZM6 11.13C6.35001 10.77 6.64251 10.3575 6.8775 9.8925C7.11249 9.4275 7.305 8.87499 7.455 8.235H4.56C4.70001 8.835 4.88751 9.375 5.1225 9.855C5.35749 10.335 5.64999 10.76 6 11.13ZM4.725 10.95C4.47501 10.57 4.26 10.16 4.08 9.72C3.9 9.27999 3.75 8.78499 3.63 8.235H1.38C1.76 8.94501 2.19999 9.5025 2.7 9.9075C3.20001 10.3125 3.87501 10.66 4.725 10.95ZM7.29 10.935C8.01 10.705 8.65749 10.36 9.2325 9.9C9.80751 9.44001 10.27 8.88501 10.62 8.235H8.385C8.25501 8.775 8.10249 9.26499 7.9275 9.705C7.75251 10.145 7.53999 10.555 7.29 10.935ZM1.08 7.335H3.465C3.435 7.065 3.41751 6.82251 3.4125 6.6075C3.40749 6.39249 3.405 6.18 3.405 5.97C3.405 5.72001 3.41001 5.4975 3.42 5.3025C3.42999 5.1075 3.45 4.89 3.48 4.65H1.08C1.01 4.89 0.962499 5.10501 0.9375 5.295C0.912501 5.48499 0.9 5.70999 0.9 5.97C0.9 6.23001 0.912501 6.46251 0.9375 6.6675C0.962499 6.87249 1.01 7.095 1.08 7.335ZM4.395 7.335H7.62C7.65999 7.02501 7.68501 6.7725 7.695 6.5775C7.70499 6.3825 7.71 6.18 7.71 5.97C7.71 5.76999 7.70499 5.57751 7.695 5.3925C7.68501 5.20749 7.65999 4.95999 7.62 4.65H4.395C4.35501 4.95999 4.32999 5.20749 4.32 5.3925C4.31001 5.57751 4.305 5.76999 4.305 5.97C4.305 6.18 4.31001 6.3825 4.32 6.5775C4.32999 6.7725 4.35501 7.02501 4.395 7.335ZM8.52 7.335H10.92C10.99 7.095 11.0375 6.87249 11.0625 6.6675C11.0875 6.46251 11.1 6.23001 11.1 5.97C11.1 5.70999 11.0875 5.48499 11.0625 5.295C11.0375 5.10501 10.99 4.89 10.92 4.65H8.535C8.565 5.00001 8.58501 5.26749 8.595 5.4525C8.60499 5.63751 8.61 5.81001 8.61 5.97C8.61 6.18999 8.6025 6.3975 8.5875 6.5925C8.5725 6.7875 8.55 7.035 8.52 7.335ZM8.37 3.75H10.62C10.29 3.06 9.83751 2.48499 9.2625 2.025C8.68749 1.565 8.025 1.24 7.275 1.05C7.52499 1.42 7.73751 1.82001 7.9125 2.25C8.08749 2.67999 8.24001 3.18 8.37 3.75ZM4.56 3.75H7.47C7.35999 3.21999 7.17501 2.7075 6.915 2.2125C6.65499 1.7175 6.35001 1.28 6 0.9C5.67999 1.17 5.40999 1.525 5.19 1.965C4.97001 2.40501 4.76001 3 4.56 3.75ZM1.38 3.75H3.645C3.75501 3.21 3.89499 2.72751 4.065 2.3025C4.23501 1.87749 4.44999 1.465 4.71 1.065C3.96 1.255 3.30501 1.575 2.745 2.025C2.18499 2.475 1.73 3.05001 1.38 3.75Z",fill:"#8D5FC4"})}),NoteBookIcon=({className:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1843 0.529946C11.8044 0.621754 11.1202 0.752746 10.3363 1.07513C10.035 1.19905 9.47567 1.47561 9.09677 1.68799C8.74306 1.88625 8.59081 1.95433 8.37634 2.01011C8.25144 2.04259 8.19415 2.04758 7.94434 2.04779C7.51792 2.04812 7.40864 2.0154 6.76834 1.69567C5.30936 0.967178 4.60959 0.751738 3.26434 0.616906C2.42852 0.53313 2.21348 0.536986 1.8933 0.641514C1.52668 0.761178 1.1802 1.02367 0.970996 1.34022C0.862196 1.50484 0.817092 1.59479 0.754964 1.77099C0.649492 2.07014 0.65634 1.76299 0.65634 6.19167C0.65634 10.6086 0.65026 10.3307 0.753412 10.6259C0.92274 11.1106 1.2721 11.4992 1.75234 11.7371C2.02424 11.8718 2.22098 11.9188 2.65026 11.9517C4.24634 12.074 4.85727 12.2446 6.30434 12.9721C6.59914 13.1204 6.90874 13.2673 6.99234 13.2987C7.63522 13.5399 8.36546 13.5399 9.00834 13.2987C9.09194 13.2673 9.40154 13.1204 9.69634 12.9721C11.1453 12.2437 11.7552 12.0736 13.3575 11.9514C13.7651 11.9203 13.9728 11.8715 14.2298 11.7468C14.6053 11.5645 14.8796 11.3153 15.0899 10.9655C15.2373 10.7202 15.3196 10.4507 15.3444 10.1321C15.3649 9.86811 15.3647 2.48187 15.3442 2.21769C15.2814 1.41006 14.7583 0.772138 13.9896 0.565722C13.8874 0.538266 13.8098 0.531338 13.5683 0.528074C13.4055 0.525882 13.2327 0.52673 13.1843 0.529946ZM13.2083 1.56127C12.0915 1.62374 11.3279 1.7706 10.6803 2.04751C10.4016 2.16673 9.92405 2.4058 9.57634 2.60025C9.13861 2.84505 8.9597 2.92073 8.58434 3.01993L8.50434 3.04108L8.50031 7.70854C8.49664 11.9549 8.49856 12.376 8.52159 12.376C8.57189 12.376 8.76789 12.2872 9.16034 12.0866C9.83474 11.7418 10.3956 11.4979 10.9028 11.329C11.5162 11.1246 12.1964 11.0076 13.2337 10.9279C13.406 10.9147 13.586 10.8924 13.6337 10.8784C13.8755 10.8073 14.1185 10.6124 14.2201 10.408C14.3281 10.1906 14.3203 10.5177 14.3203 6.18143C14.3203 3.37276 14.3153 2.22537 14.3027 2.16479C14.2557 1.93975 14.0956 1.72863 13.8987 1.63203C13.7153 1.54214 13.6572 1.53617 13.2083 1.56127ZM2.21613 1.62079C1.96103 1.709 1.76669 1.92371 1.70498 2.1855C1.68378 2.27545 1.68079 2.76747 1.68058 6.20065C1.68031 10.5159 1.67258 10.1907 1.7806 10.408C1.88215 10.6124 2.12514 10.8073 2.36701 10.8784C2.41468 10.8924 2.59468 10.9147 2.76701 10.9279C3.80432 11.0076 4.48452 11.1246 5.09789 11.329C5.60508 11.4979 6.16594 11.7418 6.84034 12.0866C7.23279 12.2872 7.42879 12.376 7.47909 12.376C7.50212 12.376 7.50404 11.9557 7.50037 7.71769L7.49634 3.05937L7.34575 3.02895C7.0594 2.9711 6.86799 2.89596 6.349 2.63764C5.02968 1.98099 4.4928 1.80241 3.44834 1.67279C2.79133 1.59126 2.35482 1.57283 2.21613 1.62079ZM3.08756 4.6378C2.7568 4.727 2.61143 5.11779 2.80197 5.40545C2.85255 5.48182 2.94437 5.55486 3.03234 5.58871C3.05874 5.59887 3.71754 5.76643 4.49634 5.96105C6.03168 6.34471 5.99215 6.33739 6.14714 6.26726C6.25168 6.21996 6.34528 6.12959 6.39536 6.02759C6.43404 5.94886 6.44031 5.91694 6.44015 5.80001C6.43999 5.68942 6.43314 5.65118 6.40346 5.59529C6.3484 5.49166 6.2629 5.40551 6.17092 5.36103C6.07626 5.31526 3.29245 4.6154 3.21176 4.61708C3.18348 4.61769 3.12759 4.627 3.08756 4.6378ZM11.3043 4.97292C10.5211 5.16972 9.85104 5.34579 9.81525 5.3642C9.73839 5.40375 9.64818 5.49937 9.59722 5.59529C9.56754 5.65118 9.56069 5.68942 9.56053 5.80001C9.56037 5.91694 9.56664 5.94886 9.60532 6.02759C9.6554 6.12959 9.749 6.21996 9.85354 6.26726C10.0082 6.33723 9.96941 6.34443 11.5043 5.961C12.2831 5.76646 12.9419 5.59895 12.9683 5.58876C13.105 5.53604 13.2293 5.40209 13.2652 5.269C13.2742 5.23551 13.282 5.16897 13.2826 5.12113C13.2856 4.86583 13.0839 4.64687 12.8243 4.62371C12.7375 4.61595 12.5931 4.64911 11.3043 4.97292ZM3.07752 7.37503C2.86021 7.44299 2.71482 7.63983 2.7184 7.86126C2.72028 7.9774 2.73909 8.04057 2.80016 8.13572C2.85173 8.21609 2.92829 8.27787 3.02738 8.31908C3.05984 8.33259 3.72224 8.5027 4.49938 8.69713C5.72815 9.00454 5.92311 9.0494 5.99496 9.04134C6.16932 9.02176 6.31988 8.91731 6.39536 8.76359C6.43404 8.68486 6.44031 8.65294 6.44015 8.53601C6.43999 8.42494 6.43319 8.38726 6.40301 8.33043C6.34754 8.22593 6.24896 8.12766 6.16215 8.09031C6.05431 8.04393 3.2768 7.35177 3.20376 7.35308C3.17108 7.35367 3.11428 7.36355 3.07752 7.37503ZM11.3043 7.70892C10.5211 7.90572 9.85104 8.08179 9.81525 8.1002C9.73839 8.13975 9.64818 8.23537 9.59722 8.33129C9.56754 8.38718 9.56069 8.42542 9.56053 8.53601C9.56037 8.65294 9.56664 8.68486 9.60532 8.76359C9.6808 8.91731 9.83136 9.02176 10.0057 9.04134C10.0776 9.0494 10.2725 9.00454 11.5013 8.69713C12.2784 8.5027 12.9408 8.33259 12.9733 8.31908C13.1134 8.26083 13.2263 8.13956 13.2653 8.00556C13.2899 7.92078 13.2861 7.77764 13.2569 7.68974C13.2218 7.58401 13.1101 7.461 13.0005 7.40739C12.8268 7.32239 12.8812 7.31273 11.3043 7.70892Z",fill:"#8D5FC4"})}),StarLockIcon=({className:s})=>jsxRuntimeExports.jsx("svg",{className:`${s}`,width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.28038 0.682033C5.05822 0.691953 4.72054 0.722849 4.59732 0.744513C3.84225 0.877265 3.38537 1.24342 3.16983 1.88856C3.06614 2.19896 3.02618 2.51923 3.00676 3.19565C2.99713 3.5315 2.99222 3.58427 2.97001 3.59042C2.95591 3.59432 2.86529 3.61688 2.76862 3.64053C2.30367 3.75432 1.94038 3.95525 1.64338 4.26286C1.19697 4.72528 1.0105 5.27978 0.932793 6.37597C0.903993 6.78218 0.903881 10.2334 0.932649 10.608C1.01924 11.7351 1.24855 12.3181 1.827 12.8817C2.19932 13.2444 2.57558 13.4848 3.59486 14.011C4.20107 14.3239 5.2071 14.8155 5.55238 14.9675C6.18075 15.2441 6.72806 15.3591 7.20902 15.3155C7.58313 15.2816 8.00283 15.1637 8.44838 14.9674C9.02538 14.7132 10.6145 13.9187 11.1217 13.6307C11.3908 13.478 11.6771 13.294 11.8641 13.1538C12.0152 13.0404 12.2887 12.7781 12.4083 12.632C12.8049 12.147 12.9958 11.5633 13.0677 10.616C13.0968 10.2324 13.097 6.7861 13.068 6.37597C12.988 5.24762 12.7864 4.67528 12.3055 4.21098C12.0147 3.93027 11.6722 3.74822 11.2321 3.64053C11.1355 3.61688 11.0448 3.59432 11.0307 3.59042C11.0085 3.58427 11.0036 3.5315 10.994 3.19565C10.9697 2.34909 10.8991 1.95402 10.7079 1.59518C10.4221 1.05886 9.94162 0.795073 9.08038 0.701649C8.927 0.685025 5.59815 0.667825 5.28038 0.682033ZM5.14238 1.6975C4.84972 1.71349 4.64523 1.74845 4.48678 1.80955C4.13627 1.94472 4.04524 2.20371 4.01492 3.15197L4.00442 3.47997H7.00046H9.99647L9.98588 3.15997C9.96537 2.54061 9.92817 2.28498 9.82932 2.08419C9.70351 1.82864 9.44985 1.73155 8.81638 1.69651C8.47963 1.67789 5.48659 1.67869 5.14238 1.6975ZM3.91238 4.49693C3.3418 4.52872 2.91556 4.60952 2.67238 4.73198C2.27215 4.93354 2.07567 5.27555 1.98534 5.92797C1.93015 6.32637 1.92393 6.52662 1.91671 8.13597C1.90583 10.5576 1.92972 10.9915 2.10175 11.4977C2.29639 12.0704 2.63551 12.3676 3.79238 12.9796C4.53218 13.371 5.82857 14.002 6.16038 14.1323C6.79607 14.382 7.23006 14.3788 7.87238 14.1197C8.33692 13.9324 10.0176 13.0964 10.6964 12.7151C11.3695 12.3369 11.7226 11.9906 11.8811 11.5531C12.0684 11.0363 12.0951 10.5856 12.0839 8.13597C12.0794 7.13957 12.0697 6.45448 12.0583 6.31997C11.9936 5.55442 11.8782 5.1987 11.6081 4.93174C11.3657 4.69213 11.0446 4.58622 10.3284 4.50955C10.1273 4.48803 4.27854 4.47651 3.91238 4.49693ZM6.77257 6.30304C6.64998 6.34222 6.54881 6.40962 6.42996 6.53125C6.30844 6.65562 6.22772 6.77576 6.01961 7.14197C5.92169 7.3143 5.84423 7.43299 5.82473 7.44059C5.80694 7.44754 5.63662 7.49048 5.44627 7.53603C5.0626 7.62782 4.89676 7.68781 4.75014 7.78778C4.62163 7.87541 4.54538 7.96504 4.47519 8.11101C4.42586 8.21358 4.417 8.24983 4.4111 8.37317C4.40284 8.54576 4.42492 8.65723 4.49767 8.81034C4.57226 8.96733 4.68674 9.12127 5.02547 9.51997L5.1546 9.67197L5.12635 9.96797C5.06067 10.6562 5.09316 10.9335 5.2663 11.1619C5.41596 11.3593 5.61638 11.456 5.87599 11.456C6.09182 11.456 6.28081 11.3958 6.78047 11.168L7.00059 11.0677L7.19647 11.1572C7.72313 11.3978 7.90383 11.456 8.12414 11.456C8.47358 11.456 8.74105 11.2636 8.85819 10.928C8.9091 10.7821 8.91612 10.3956 8.8755 9.97597L8.84607 9.67197L8.97524 9.51997C9.39607 9.02477 9.49475 8.87973 9.56095 8.65909C9.58948 8.56402 9.59486 8.51323 9.58978 8.3869C9.58422 8.2483 9.57735 8.2187 9.52593 8.11178C9.45538 7.96506 9.3793 7.87554 9.25062 7.78778C9.10399 7.68781 8.93815 7.62782 8.55449 7.53603C8.36414 7.49048 8.19361 7.44744 8.17555 7.44037C8.15559 7.43258 8.08667 7.32794 7.9999 7.17376C7.667 6.58216 7.48182 6.37683 7.20947 6.29733C7.09254 6.2632 6.88887 6.26586 6.77257 6.30304ZM6.82438 7.75637C6.68636 8.00243 6.63639 8.07616 6.54438 8.16955C6.39164 8.32458 6.30078 8.36478 5.87982 8.46373C5.6925 8.50774 5.5365 8.54651 5.53314 8.54986C5.5298 8.55322 5.63231 8.68106 5.76095 8.83397C6.09774 9.23426 6.15238 9.34634 6.15238 9.63683C6.15238 9.72432 6.14107 9.9101 6.12723 10.0497C6.1134 10.1893 6.10439 10.3178 6.10722 10.3353C6.1119 10.3642 6.13995 10.3547 6.41143 10.2316C6.7267 10.0887 6.85612 10.0484 7.00038 10.0484C7.14463 10.0484 7.27406 10.0887 7.58932 10.2316C7.86081 10.3547 7.88886 10.3642 7.89353 10.3353C7.89636 10.3178 7.887 10.1866 7.87275 10.0437C7.80857 9.40064 7.83425 9.31598 8.2398 8.83397C8.36844 8.68106 8.47095 8.55322 8.46761 8.54986C8.46425 8.54651 8.30825 8.50774 8.12094 8.46373C7.69998 8.36478 7.60911 8.32458 7.45638 8.16955C7.36436 8.07616 7.31439 8.00243 7.17638 7.75637C7.08398 7.59163 7.00478 7.45685 7.00038 7.45685C6.99598 7.45685 6.91678 7.59163 6.82438 7.75637Z",fill:"#8D5FC4"})}),WelcomeScreen=()=>jsxRuntimeExports.jsxs("div",{className:"flex flex-col items-center justify-center p-6 bg-white text-gray-800 dark:bg-brand-950 dark:text-brand-300",children:[jsxRuntimeExports.jsx("div",{className:"flex items-center justify-center mb-4",children:jsxRuntimeExports.jsx("div",{className:"w-16 h-16 flex items-center justify-center bg-gray-100 rounded-xl dark:bg-brand-800/40",children:jsxRuntimeExports.jsx(AnimatedLogo,{className:"!opacity-100",size:"lg",isPlaying:!1})})}),jsxRuntimeExports.jsx("h2",{className:"text-2xl text-gray-900 mb-3 font-normal dark:text-brand-300",children:jsxRuntimeExports.jsx("span",{className:"font-bold",children:"Rapidload AI"})}),jsxRuntimeExports.jsx("p",{className:"text-base font-normal select-none text-center text-gray-500 max-w-xl mb-6 leading-relaxed dark:text-brand-300",children:"A highly intelligent and responsive chatbot built to deliver real-time support, detailed troubleshooting, and personalized optimization tips. It ensures that websites achieve maximum performance and speed, helping users maintain smooth operations with minimal hassle."}),jsxRuntimeExports.jsx(FeaturesList,{})]}),FeaturesList=()=>jsxRuntimeExports.jsxs("ul",{className:"space-y-2 mb-6 text-gray-700 dark:text-brand-300",children:[jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(WorldIcon,{className:"w-6 h-5 text-purple-500"})," Natural Language conversations"]}),jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(NoteBookIcon,{className:"w-6 h-6 text-purple-500"})," Knowledge Base"]}),jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(StarLockIcon,{className:"w-6 h-6 text-purple-500"})," Personalized Recommendation"]}),jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-2",children:[jsxRuntimeExports.jsx(Cpu,{className:"w-6 h-6 text-purple-500"})," Seamless Integration"]})]});var define_import_meta_env_default={BASE_URL: window.rapidload_optimizer.page_optimizer_package_base+"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};const aiRoot=window.rapidload_optimizer.ai_root||"https://ai.rapidload.io/api";function Chat({apiEndpoint:s=`${aiRoot}/support`}){const{options:a}=useAppContext(),[i,o]=reactExports.useState(!1),[E,j]=reactExports.useState(null),{messages:R,input:C,handleInputChange:S,handleSubmit:_,setMessages:T,isLoading:P}=useChat({api:s,headers:{Authorization:`Bearer ${isDev?define_import_meta_env_default.VITE_KEY:a.license_key}`},body:{url:(a==null?void 0:a.optimizer_url)||""},onError:ne=>{console.error(ne);const le=[...R].reverse().find(ce=>ce.role==="user"),ue=(le==null?void 0:le.id)||"system";j(`${ue}:${ne==null?void 0:ne.message}`)},onFinish:(ne,le)=>{}}),{data:N,settings:I,activeReport:M,activeGear:D,testMode:B,license:F}=useSelector(optimizerData),O=reactExports.useRef(null),{conversations:L,handleNewChat:$,handleSelectConversation:V,handleDeleteConversation:G}=useChatHistory(R,T);reactExports.useEffect(()=>{const ne=formatSystemMessage({data:N,settings:I,license:F,activeReport:M,activeGear:D,testMode:B});T([{id:"1",role:"system",content:ne,createdAt:new Date}])},[N,I,F,M,D,B,T]),reactExports.useEffect(()=>{const le=new URLSearchParams(window.location.hash.split("?")[1]).get("conv");le&&L.find(ce=>ce.id===le)&&V(le)},[]);const K=()=>{L.forEach(ne=>{ne.messages.length<=1&&G(ne.id)}),window.location.hash="#/"},J=async ne=>{ne.preventDefault(),j(null),!P&&(R.length<=1&&(await $(!0),await new Promise(le=>setTimeout(le,100))),_(ne))};return jsxRuntimeExports.jsxs("div",{className:"chat-container relative flex container mx-auto dark:bg-brand-950 h-[calc(100vh-4rem)] max-h-[750px] py-4 bg-white my-4 rounded-2xl overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:`
        w-42 transform transition-all duration-300 ease-in-out
        ${i?"translate-x-0 opacity-100 visible":"-translate-x-full opacity-0 invisible absolute"}
      `,children:jsxRuntimeExports.jsx(ChatHistoryPanel,{conversations:L,onSelectConversation:V,onNewChat:()=>$(!1),onDeleteConversation:G})}),jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col ",children:[jsxRuntimeExports.jsxs("div",{className:"px-4 pb-2 flex justify-between",children:[jsxRuntimeExports.jsx("button",{onClick:()=>o(!i),className:"p-2 mt-4 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"Toggle history",children:i?jsxRuntimeExports.jsx(PanelLeftClose,{className:"h-6 w-6 text-gray-500"}):jsxRuntimeExports.jsx(PanelRightClose,{className:"h-6 w-6 text-gray-500"})}),jsxRuntimeExports.jsx("button",{onClick:K,className:"p-2 mt-4 hover:bg-gray-100 rounded-lg transition-colors","aria-label":"Close chat",children:jsxRuntimeExports.jsx(ForwardRef$3,{className:"h-6 w-6 text-gray-500"})})]}),jsxRuntimeExports.jsxs("div",{className:"flex-1 overflow-y-auto px-4 bg-white dark:bg-brand-950",children:[R.length===1?jsxRuntimeExports.jsx(WelcomeScreen,{}):jsxRuntimeExports.jsx(ChatMessages,{messages:R,loading:P,error:E}),jsxRuntimeExports.jsx("div",{ref:O})]}),jsxRuntimeExports.jsxs("form",{onSubmit:J,className:"input-container flex items-center px-2 py-1 border-t border-gray-200 bg-brand-100 mx-6 rounded-xl dark:bg-brand-800/40 dark:text-brand-300 dark:border-brand-700",children:[jsxRuntimeExports.jsx("input",{className:"flex-1 p-2 bg-brand-100 rounded-lg focus:outline-none focus:border-transparent dark:bg-brand-800/10 dark:text-brand-300 dark:border-brand-700",value:C,placeholder:"Ask Rapidload AI...",onChange:S}),jsxRuntimeExports.jsx("button",{type:"submit",disabled:C.trim()==="",className:"ml-2 bg-brand-950 text-white p-2 rounded-lg hover:bg-brand-950 disabled:opacity-50 transition-colors dark:bg-brand-500 dark:hover:bg-brand-400 dark:text-brand-950 dark:hover:text-brand-950 hover:cursor-pointer",children:jsxRuntimeExports.jsx(ForwardRef$g,{className:"h-4 w-4 text-brand-0 dark:text-brand-950"})})]})]})]})}const ChatMessages=({messages:s,loading:a,error:i})=>{const o=s.filter(R=>R&&typeof R=="object"&&(R==null?void 0:R.role)!=="system"),[E,j]=i?i.split(":"):[null,null];return console.log(E,j),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:Array.isArray(s)&&o.map((R,C)=>{const S=R.id===E||E==="system"&&C===0;return o[C+1],jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx(ChatMessage,{message:R,loading:a}),C===o.length-1&&a&&R.role==="user"&&jsxRuntimeExports.jsxs("div",{className:"flex justify-start my-2",children:[jsxRuntimeExports.jsx("div",{className:"flex mt-2 mr-2",children:jsxRuntimeExports.jsx(AnimatedLogo,{className:"!opacity-100",size:"sm",isPlaying:!0})}),jsxRuntimeExports.jsx("div",{className:"max-w-lg px-4 py-2 rounded-lg text-brand-950 dark:text-brand-300",children:jsxRuntimeExports.jsx("span",{className:"italic font-light",children:"Thinking..."})})]}),S&&i&&!a&&jsxRuntimeExports.jsxs("div",{className:"flex justify-start my-2 gap-4",children:[jsxRuntimeExports.jsx("div",{className:"flex mt-2 mr-2",children:jsxRuntimeExports.jsx(AnimatedLogo,{className:"!opacity-100",size:"sm",isPlaying:!1})}),jsxRuntimeExports.jsx("div",{className:"max-w-lg px-4 py-2 rounded-lg bg-red-50 border border-red-100 dark:bg-red-950 dark:border-red-800",children:jsxRuntimeExports.jsx("span",{className:"text-red-500 dark:text-red-400",children:j})})]})]},R.id||Math.random().toString())})})},ChatMessage=({message:s,loading:a})=>{var i,o;return s?jsxRuntimeExports.jsxs("div",{className:`message my-2 flex ${s.role==="user"?"justify-end":"justify-start"}`,children:[s.role==="assistant"&&jsxRuntimeExports.jsx("div",{className:"flex mt-2 mr-2",children:jsxRuntimeExports.jsx(AnimatedLogo,{className:"!opacity-100",size:"sm",isPlaying:!1})}),jsxRuntimeExports.jsxs("div",{className:`max-w-lg px-4 py-2 rounded-lg ${s.role==="user"?"bg-gray-100 text-brand-950 dark:bg-brand-800/40 dark:text-brand-300":"text-brand-950 dark:text-brand-300"}`,children:[s.content&&s.content.length>0?jsxRuntimeExports.jsx("div",{className:`prose prose-sm 
            prose-p:m-0 prose-p:p-0 prose-p:text-sm 
            prose-p:text-brand-950 dark:prose-p:text-brand-300
            prose-strong:text-brand-950 dark:prose-strong:text-brand-300
            prose-li:text-brand-950 dark:prose-li:text-brand-300
            prose-a:text-brand-950 dark:prose-a:text-brand-300
            prose-ul:text-brand-950 dark:prose-ul:text-brand-300
            prose-ol:text-brand-950 dark:prose-ol:text-brand-300
            prose-blockquote:text-brand-950 dark:prose-blockquote:text-brand-300
            prose-code:text-brand-950 dark:prose-code:text-brand-300
            prose-pre:text-brand-950 dark:prose-pre:text-brand-300
            prose-h1:text-brand-950 dark:prose-h1:text-brand-300
            prose-h2:text-brand-950 dark:prose-h2:text-brand-300
            prose-h3:text-brand-950 dark:prose-h3:text-brand-300
            prose-h4:text-brand-950 dark:prose-h4:text-brand-300`,children:jsxRuntimeExports.jsx(Markdown,{children:s.content})}):jsxRuntimeExports.jsx("span",{className:"italic font-light",children:((o=(i=s==null?void 0:s.toolInvocations)==null?void 0:i[0])==null?void 0:o.toolName)==="accessKnowledge"&&jsxRuntimeExports.jsx("div",{children:"Accessing knowledge base..."})}),jsxRuntimeExports.jsx(MessageTimestamp,{createdAt:s.createdAt})]})]}):null},MessageTimestamp=({createdAt:s})=>jsxRuntimeExports.jsx("div",{className:"text-xs text-right mt-1 opacity-75",children:new Date(s||Date.now()).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})});function ChatPage(){return jsxRuntimeExports.jsx(m$3.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{ease:"linear",duration:.04},id:"rapidload-page-optimizer-wrapper",className:"flex justify-center items-center container ",children:jsxRuntimeExports.jsx(Chat,{})})}const AppTour=React8.lazy(()=>__vitePreload(()=>import("./index.B4TrNB0E.js"),__vite__mapDeps([0,1,2,3,4]))),InitTour=React8.lazy(()=>__vitePreload(()=>import("./InitTour.DtcCru1H.js"),__vite__mapDeps([5,1,2,3,4]))),App=({popup:s,_showOptimizer:a=!1})=>{reactExports.useState(null);const{showOptimizer:i,version:o,setShowOptimizer:E,mode:j,options:R,uucssGlobal:C}=useAppContext();reactExports.useState(null);const[S,_]=reactExports.useState(!1),T=useDispatch(),{activeReport:P,allPosts:N}=useSelector(U=>U.app),{isDark:I}=useRootContext(),M=window.rapidload_optimizer?toBoolean(window.rapidload_optimizer.test_mode):!1,[D,B]=reactExports.useState({generalSettings:!1,optimizerTable:!1,optimizePages:!1}),{headerUrl:F,onboardCompleted:O,diagnosticLoading:L}=useCommonDispatch(),{changeTheme:$}=useRootContext(),{testMode:V,license:G,data:K}=useSelector(optimizerData);reactExports.useEffect(()=>{(a&&isAdminPage||isDev)&&E(!0),document.body.classList.add("rl-page-optimizer-loaded"),document.body.classList.add("rpo-loaded"),s&&document.body.classList.add("rpo-loaded:with-popup"),setTimeout(()=>{_(!0)},50),!disableDebugReport&&Bugsnag.leaveBreadcrumb("Titan Loaded")},[]),reactExports.useEffect(()=>{i?!disableDebugReport&&Bugsnag.leaveBreadcrumb("Titan Opened"):!disableDebugReport&&Bugsnag.leaveBreadcrumb("Titan Closed")},[i]),reactExports.useEffect(()=>{const U=getOptimizeUrl();T(setCommonState("headerUrl",U)),T(fetchReport(R,F||R.optimizer_url,!1,!0)),!(!(C!=null&&C.on_board_complete)&&!isDev)&&(T(fetchSettings(R,F||R.optimizer_url,!1)),T(setCommonState("testModeStatus",M)),T(fetchPosts(R)),T(updateDiagnosticResults(R,F||R.optimizer_url)))},[T,P]);const[J,ne]=reactExports.useState(!1);reactExports.useEffect(()=>{if((C==null?void 0:C.on_board_complete)=="")return;(async()=>{var ee;!((ee=(await T(updateLicense(R))).data)==null?void 0:ee.licensedDomain)&&(C==null?void 0:C.on_board_complete)=="1"&&(localStorage.removeItem("rapidLoadLicense"),ne(!0))})()},[T]),reactExports.useEffect(()=>{G!=null&&G.licensedDomain&&localStorage.setItem("rapidLoadLicense",JSON.stringify(G));const U=localStorage.getItem("rapidLoadLicense");console.log(G,U),U&&ne(!1)},[G]);const[le,ue]=reactExports.useState(window.location.hash.replace("#","")||"/"),[ce,pe]=reactExports.useState([{title:"Dashboard",id:"/",component:jsxRuntimeExports.jsx(Dashboard,{})},{title:"Optimize",id:"/optimize",component:jsxRuntimeExports.jsx(PageOptimizer,{})},{title:"Onboard",id:"/onboard",component:jsxRuntimeExports.jsx(Onboard,{})},{title:"Rapidload AI",id:"/rapidload-ai",component:jsxRuntimeExports.jsx(ChatPage,{})}]);reactExports.useEffect(()=>{const U=()=>{const ie=window.location.hash.replace("#",""),me=ie.split("?")[0],ee=ce.some(ye=>ye.id===me);ue(ee?ie:"/")};return window.addEventListener("hashchange",U),U(),()=>{window.removeEventListener("hashchange",U)}},[ce]);const xe=U=>{var me;const ie=U.split("?")[0];return((me=ce.find(ee=>ee.id===ie))==null?void 0:me.component)||ce[0].component};reactExports.useEffect(()=>{const U=hasQueryParam("nonce"),ie=window.location.hash.includes("onboard");if(isAdminPage||isDev){if(O||isDev){if(window.location.hash=le,U){const me=new URL(window.location.href);me.searchParams.delete("nonce"),window.history.replaceState({},"",me.toString())}return}if((C==null?void 0:C.on_board_complete)==""||U){window.location.hash="#/onboard",ue("/onboard");return}else if((C==null?void 0:C.on_board_complete)=="1"&&!U&&ie){window.location.hash="#/",ue("/");return}window.location.hash=le}},[le,O]);const oe={title:"Optimize Pages",description:"Check out your Optimized Pages details in here.",total_jobs:1e3},Y=(U,ie)=>{B(me=>({...me,[U]:ie}))},[ae,H]=reactExports.useState(!0);reactExports.useEffect(()=>{const U=localStorage.getItem("rapidload-new-banner")==="hidden";H(!U)},[]);const W=()=>{H(!1),localStorage.setItem("rapidload-new-banner","hidden")};return jsxRuntimeExports.jsx(AnimatePresence,{children:S&&i&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:"dark:text-brand-300 text-brand-800 dark:bg-brand-900 bg-[#F0F0F1]",children:[ae&&jsxRuntimeExports.jsx("div",{className:"bg-gradient-to-r from-[#332247] to-[#441C74] text-white py-3 relative  mt-[-1px]",children:jsxRuntimeExports.jsxs("div",{className:"container mx-auto px-4 text-center",children:[jsxRuntimeExports.jsxs("p",{className:"text-sm font-medium",children:["RapidLoad 3.0 is Here!"," ",jsxRuntimeExports.jsxs("span",{className:"opacity-90",children:["Get all the details in the official guide."," "]}),jsxRuntimeExports.jsx("a",{href:"https://docs.rapidload.io/rapidload-3-migration",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-white/90 font-semibold",children:"Learn more"})]}),jsxRuntimeExports.jsx("button",{onClick:W,className:"absolute right-4 top-1/2 -translate-y-1/2 text-white/80 hover:text-white p-1","aria-label":"Close banner",children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:jsxRuntimeExports.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})}),jsxRuntimeExports.jsx(reactExports.Suspense,{children:jsxRuntimeExports.jsx(AppTour,{isDark:I,children:jsxRuntimeExports.jsx(InitTour,{mode:j})})}),le!=="/onboard"&&!J&&jsxRuntimeExports.jsx("div",{className:"justify-center flex container",children:jsxRuntimeExports.jsxs("header",{className:cn("container px-2 py-2 flex gap-3 mt-4 justify-between dark:bg-brand-800 bg-brand-0 rounded-2xl",V&&"ring-2 ring-[#f7b250] ring-offset-0"),children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center",children:[jsxRuntimeExports.jsx("div",{className:"relative px-2",children:jsxRuntimeExports.jsx("img",{className:"w-10",src:R!=null&&R.page_optimizer_base?(R==null?void 0:R.page_optimizer_base)+`/${I?"dark_mode_logo.svg":"new-logo.svg"}`:`/${I?"dark_mode_logo.svg":"new-logo.svg"}`,alt:"RapidLoad - #1 to unlock breakneck page speed"})}),jsxRuntimeExports.jsx("div",{className:"flex",children:jsxRuntimeExports.jsxs("div",{"data-tour":"app-switch",className:"select-none relative flex dark:bg-brand-800/40 py-0.5 pl-[2px] pr-[8px] rounded-2xl overflow-hidden",children:[jsxRuntimeExports.jsx("div",{className:`absolute top-1 bottom-1 left-1 bg-brand-200/60 border dark:bg-brand-950 rounded-xl transition-all duration-300 ease-in-out transform ${le===ce[1].id?"translate-x-[115%] w-[45%]":"translate-x-0 w-[55%]"}`}),ce.map((U,ie)=>U.id==="/onboard"||U.id==="/rapidload-ai"?null:jsxRuntimeExports.jsxs("button",{onClick:()=>ue(U.id),className:cn("flex h-10 text-sm z-10 font-medium items-center px-3 gap-2 cursor-pointer",L&&"cursor-not-allowed opacity-90 pointer-events-none",le===U.id?"text-black dark:text-white  dark:text-brand-300":"text-gray-500"),children:[jsxRuntimeExports.jsx(Circle,{className:cn("w-2 stroke-0 transition-all fill-purple-800 relative inline-flex",le===U.id?"delay-200":"opacity-0")}),U.title]},ie))]})})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-6 items-center",children:[jsxRuntimeExports.jsx(TestModeSwitcher,{}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1.5",children:[jsxRuntimeExports.jsx(GeneralSettingsTrigger,{open:D.generalSettings,onOpenChange:U=>Y("generalSettings",U)}),jsxRuntimeExports.jsxs(DropdownMenu,{children:[jsxRuntimeExports.jsx(DropdownMenuTrigger,{className:"w-8 h-12 flex items-center justify-center",children:jsxRuntimeExports.jsx(TooltipText,{className:"flex items-center justify-center",asChild:!0,text:"Add Optimization",children:jsxRuntimeExports.jsx(EllipsisVertical,{className:cn("h-5 w-5 dark:text-brand-300 text-brand-600 transition-opacity")})})}),jsxRuntimeExports.jsxs(DropdownMenuContent,{style:{width:200},align:"end",sideOffset:6,className:"z-[110000] relative min-w-[200px]",children:[jsxRuntimeExports.jsx(DropdownMenuLabel,{children:"Additional Options"}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>{setTimeout(()=>{Y("optimizePages",!0)},100)},children:"Optimization"}),jsxRuntimeExports.jsx(DropdownMenuSeparator,{}),jsxRuntimeExports.jsx(DropdownMenuItem,{onClick:()=>{setTimeout(()=>{Y("optimizerTable",!0)},100)},children:"View Table"})]})]}),jsxRuntimeExports.jsx(OptimzePagesTrigger,{open:D.optimizePages,onOpenChange:U=>Y("optimizePages",U),data:N}),jsxRuntimeExports.jsx(OptimizerTableTrigger,{open:D.optimizerTable,onOpenChange:U=>Y("optimizerTable",U),settings:oe})]})]})]})}),jsxRuntimeExports.jsx(SlideUp,{uuid:le||ce[0].id,children:xe(le)}),o&&jsxRuntimeExports.jsx("div",{className:" container px-6",children:jsxRuntimeExports.jsxs("div",{className:"flex border-t-2 justify-between py-6 items-center",children:[jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsxs("span",{className:"text-sm dark:text-brand-500 text-brand-400",children:["Copyright © ",new Date().getFullYear()," RapidLoad v",o]})}),jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(AppButton,{onClick:U=>$(),className:"transition-none h-12 px-3 rounded-2xl border-none bg-transparent",variant:"outline",children:jsxRuntimeExports.jsx(ThemeSwitcher,{})})})]})})]}),jsxRuntimeExports.jsx("div",{className:"dark:bg-brand-900 absolute bottom-0 left-0 right-0 h-[8%] bg-[#F0F0F1]"})]})})};var createRoot,m=reactDomExports;createRoot=m.createRoot,m.hydrateRoot;const ShadowRoot=({children:s,node:a,styles:i,disabled:o=!0})=>{const E=reactExports.useRef(a),[j,R]=reactExports.useState(null),{theme:C,setIsDark:S}=useRootContext(),_="rapidload-dark";if(useCommonDispatch(),reactExports.useEffect(()=>{o&&R(document.body),j&&(C==="dark"?(j.classList.add(_),S(!0)):C==="light"?(j.classList.remove(_),S(!1)):C==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?(j.classList.add(_),S(!0)):(j.classList.remove(_),S(!1))))},[C,j,a]),o)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:s});reactExports.useEffect(()=>{var P;if(E.current){const N=E.current.attachShadow({mode:"open"});if(i){const M=document.getElementById("rapidload_page_optimizer-css");let D=(P=window==null?void 0:window.rapidload_optimizer)==null?void 0:P.titan_stylesheet_url;D||(D=(M==null?void 0:M.href)||i);const B=document.createElement("link");B.setAttribute("rel","stylesheet"),B.setAttribute("href",D),N.appendChild(B)}const I=document.createElement("div");N.appendChild(I),R(I)}},[i]);let T=j?ReactDOM.createPortal(s,j):"";return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[T,!a&&jsxRuntimeExports.jsx("div",{id:"rapidload-optimizer-shadow-dom",ref:E})]})},SpeedInsightGroup=({title:s,success:a=!1,items:i=[]})=>{const[o,E]=reactExports.useState(!1),j=({icon:R})=>R==="pass"?jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",children:jsxRuntimeExports.jsx("circle",{cx:"4",cy:"4",r:"4",fill:"green"})}):R==="average"?jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",children:jsxRuntimeExports.jsx("rect",{width:"8",height:"8",fill:"orange"})}):jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"8",height:"8",children:jsxRuntimeExports.jsx("polygon",{points:"4,0 0,8 8,8",fill:"red"})});return jsxRuntimeExports.jsxs(Card,{className:"cursor-pointer dark:bg-brand-950 bg-white",children:[jsxRuntimeExports.jsxs("div",{onClick:()=>{E(R=>!R)},className:"select-none flex justify-between w-full items-center py-2.5 px-4",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-4 items-center pr-8 ",children:[jsxRuntimeExports.jsx("div",{className:"text-sm",children:s}),a?jsxRuntimeExports.jsxs("div",{className:"text-xs dark:text-brand-600 border border-green-500 bg-green-50 flex gap-1 items-center pr-2 pl-1 py-0.5 rounded-full",children:[jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})," ",i.length," audits"]}):jsxRuntimeExports.jsxs("div",{className:"text-xs dark:text-brand-600 border border-red-300 bg-red-100 flex gap-1 items-center pr-2 pl-1 py-0.5 rounded-full",children:[jsxRuntimeExports.jsx(ForwardRef$o,{className:"w-5 text-red-500"})," ",i.length," audits"]})]}),i.length>0&&jsxRuntimeExports.jsx(ChevronDown,{className:"w-5"})]}),jsxRuntimeExports.jsx(Accordion$1,{isOpen:o,children:jsxRuntimeExports.jsx("div",{className:"w-full text-left flex flex-col divide-y",children:i.map(R=>jsxRuntimeExports.jsxs("div",{className:"last:pb-3 flex text-sm items-center gap-2 py-2 px-4",children:[jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(j,{icon:R.icon})}),jsxRuntimeExports.jsx("span",{className:"flex flex-col",children:jsxRuntimeExports.jsx("span",{className:"text-xs",children:R.name})})]},R.id)).slice(0,3)})})]})};var originalBodyUserSelect,HOVERCARD_NAME="HoverCard",[createHoverCardContext,createHoverCardScope]=createContextScope$1(HOVERCARD_NAME,[createPopperScope]),usePopperScope=createPopperScope(),[HoverCardProvider,useHoverCardContext]=createHoverCardContext(HOVERCARD_NAME),HoverCard$1=s=>{const{__scopeHoverCard:a,children:i,open:o,defaultOpen:E,onOpenChange:j,openDelay:R=700,closeDelay:C=300}=s,S=usePopperScope(a),_=reactExports.useRef(0),T=reactExports.useRef(0),P=reactExports.useRef(!1),N=reactExports.useRef(!1),[I=!1,M]=useControllableState({prop:o,defaultProp:E,onChange:j}),D=reactExports.useCallback(()=>{clearTimeout(T.current),_.current=window.setTimeout(()=>M(!0),R)},[R,M]),B=reactExports.useCallback(()=>{clearTimeout(_.current),!P.current&&!N.current&&(T.current=window.setTimeout(()=>M(!1),C))},[C,M]),F=reactExports.useCallback(()=>M(!1),[M]);return reactExports.useEffect(()=>()=>{clearTimeout(_.current),clearTimeout(T.current)},[]),jsxRuntimeExports.jsx(HoverCardProvider,{scope:a,open:I,onOpenChange:M,onOpen:D,onClose:B,onDismiss:F,hasSelectionRef:P,isPointerDownOnContentRef:N,children:jsxRuntimeExports.jsx(Root2$4,{...S,children:i})})};HoverCard$1.displayName=HOVERCARD_NAME;var TRIGGER_NAME="HoverCardTrigger",HoverCardTrigger$1=reactExports.forwardRef((s,a)=>{const{__scopeHoverCard:i,...o}=s,E=useHoverCardContext(TRIGGER_NAME,i),j=usePopperScope(i);return jsxRuntimeExports.jsx(Anchor,{asChild:!0,...j,children:jsxRuntimeExports.jsx(Primitive$1.a,{"data-state":E.open?"open":"closed",...o,ref:a,onPointerEnter:composeEventHandlers$1(s.onPointerEnter,excludeTouch(E.onOpen)),onPointerLeave:composeEventHandlers$1(s.onPointerLeave,excludeTouch(E.onClose)),onFocus:composeEventHandlers$1(s.onFocus,E.onOpen),onBlur:composeEventHandlers$1(s.onBlur,E.onClose),onTouchStart:composeEventHandlers$1(s.onTouchStart,R=>R.preventDefault())})})});HoverCardTrigger$1.displayName=TRIGGER_NAME;var PORTAL_NAME="HoverCardPortal",[PortalProvider,usePortalContext]=createHoverCardContext(PORTAL_NAME,{forceMount:void 0}),CONTENT_NAME="HoverCardContent",HoverCardContent$1=reactExports.forwardRef((s,a)=>{const i=usePortalContext(CONTENT_NAME,s.__scopeHoverCard),{forceMount:o=i.forceMount,...E}=s,j=useHoverCardContext(CONTENT_NAME,s.__scopeHoverCard);return jsxRuntimeExports.jsx(Presence$1,{present:o||j.open,children:jsxRuntimeExports.jsx(HoverCardContentImpl,{"data-state":j.open?"open":"closed",...E,onPointerEnter:composeEventHandlers$1(s.onPointerEnter,excludeTouch(j.onOpen)),onPointerLeave:composeEventHandlers$1(s.onPointerLeave,excludeTouch(j.onClose)),ref:a})})});HoverCardContent$1.displayName=CONTENT_NAME;var HoverCardContentImpl=reactExports.forwardRef((s,a)=>{const{__scopeHoverCard:i,onEscapeKeyDown:o,onPointerDownOutside:E,onFocusOutside:j,onInteractOutside:R,...C}=s,S=useHoverCardContext(CONTENT_NAME,i),_=usePopperScope(i),T=reactExports.useRef(null),P=useComposedRefs$1(a,T),[N,I]=reactExports.useState(!1);return reactExports.useEffect(()=>{if(N){const M=document.body;return originalBodyUserSelect=M.style.userSelect||M.style.webkitUserSelect,M.style.userSelect="none",M.style.webkitUserSelect="none",()=>{M.style.userSelect=originalBodyUserSelect,M.style.webkitUserSelect=originalBodyUserSelect}}},[N]),reactExports.useEffect(()=>{if(T.current){const M=()=>{I(!1),S.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var B;((B=document.getSelection())==null?void 0:B.toString())!==""&&(S.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",M),()=>{document.removeEventListener("pointerup",M),S.hasSelectionRef.current=!1,S.isPointerDownOnContentRef.current=!1}}},[S.isPointerDownOnContentRef,S.hasSelectionRef]),reactExports.useEffect(()=>{T.current&&getTabbableNodes(T.current).forEach(D=>D.setAttribute("tabindex","-1"))}),jsxRuntimeExports.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:R,onEscapeKeyDown:o,onPointerDownOutside:E,onFocusOutside:composeEventHandlers$1(j,M=>{M.preventDefault()}),onDismiss:S.onDismiss,children:jsxRuntimeExports.jsx(Content$2,{..._,...C,onPointerDown:composeEventHandlers$1(C.onPointerDown,M=>{M.currentTarget.contains(M.target)&&I(!0),S.hasSelectionRef.current=!1,S.isPointerDownOnContentRef.current=!0}),ref:P,style:{...C.style,userSelect:N?"text":void 0,WebkitUserSelect:N?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),ARROW_NAME="HoverCardArrow",HoverCardArrow=reactExports.forwardRef((s,a)=>{const{__scopeHoverCard:i,...o}=s,E=usePopperScope(i);return jsxRuntimeExports.jsx(Arrow,{...E,...o,ref:a})});HoverCardArrow.displayName=ARROW_NAME;function excludeTouch(s){return a=>a.pointerType==="touch"?void 0:s()}function getTabbableNodes(s){const a=[],i=document.createTreeWalker(s,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;i.nextNode();)a.push(i.currentNode);return a}var Root2=HoverCard$1,Trigger=HoverCardTrigger$1,Content2=HoverCardContent$1;const HoverCard=Root2,HoverCardTrigger=Trigger,HoverCardContent=reactExports.forwardRef(({className:s,align:a="center",sideOffset:i=4,...o},E)=>jsxRuntimeExports.jsx(Content2,{ref:E,align:a,sideOffset:i,className:cn("z-50 outline-none 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",s),...o}));HoverCardContent.displayName=Content2.displayName;const Feedback=React8.lazy(()=>__vitePreload(()=>Promise.resolve().then(()=>Feedback$2),void 0)),MetricValue=({metric:s})=>{const[a,i,o,E]=usePerformanceColors(s.score);return jsxRuntimeExports.jsx("div",{style:{color:i||"#515151"},className:"text-md font-medium text-brand-500",children:s.displayValue})},PageSpeedWidget=({pagespeed:s,priority:a=!0,dashboardMode:i=!1})=>{var K;const[o,E]=reactExports.useState(!1),[j,R]=reactExports.useState(!1),{data:C,error:S,loading:_,revisions:T}=useSelector(optimizerData);reactExports.useState(0);const[P,N]=reactExports.useState(!1),{dispatch:I,hoveredMetric:M,activeMetric:D}=useCommonDispatch();reactExports.useCallback(()=>{E(!o)},[o]);const B={LARGEST_CONTENTFUL_PAINT_MS:"LCP",FIRST_INPUT_DELAY_MS:"FID",CUMULATIVE_LAYOUT_SHIFT_SCORE:"CLS",FIRST_CONTENTFUL_PAINT_MS:"FCP",INTERACTION_TO_NEXT_PAINT:"INP",EXPERIMENTAL_TIME_TO_FIRST_BYTE:"TTFB"},F=["LARGEST_CONTENTFUL_PAINT_MS","FIRST_INPUT_DELAY_MS","CUMULATIVE_LAYOUT_SHIFT_SCORE","FIRST_CONTENTFUL_PAINT_MS","INTERACTION_TO_NEXT_PAINT","EXPERIMENTAL_TIME_TO_FIRST_BYTE"],O=J=>B[J]||J;F.map(J=>{var ne,le;return{metricName:O(J),metric:(ne=C==null?void 0:C.loadingExperience)!=null&&ne.metrics?(le=C==null?void 0:C.loadingExperience)==null?void 0:le.metrics[J]:null}});let L=M,$=Number((K=L!=null&&L.potentialGain?L==null?void 0:L.potentialGain:0)==null?void 0:K.toFixed(0));const[V,G]=reactExports.useState(1);return reactExports.useEffect(()=>{G(J=>J+1)},[]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:cn("w-full flex flex-col gap-4 ",i?"w-min min-w-[350px]":""),children:[jsxRuntimeExports.jsxs(Card,{"data-tour":"speed-insights",className:cn("overflow-hidden  border-transparent flex flex-col sm:flex-row lg:flex-col justify-around dark:bg-brand-800",j&&"border-brand-200 dark:border-brand-800",i?"":"border"),children:[jsxRuntimeExports.jsxs("div",{className:"content flex w-full sm:w-1/2 lg:w-full flex-col justify-center items-center gap-3 px-4 lg:px-4 lg:pb-0 xl:px-8 py-2.5",children:[jsxRuntimeExports.jsx("div",{className:"flex gap-6",children:jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3 px-4 items-center",children:jsxRuntimeExports.jsx("div",{className:`${i?"mt-3.5":"mt-6"}`,children:_||P?jsxRuntimeExports.jsx(Skeleton,{className:"w-44 h-44 rounded-full"}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{performance:C!=null&&C.performance&&$&&L?C.performance+$>=99?99:C.performance+$:C==null?void 0:C.performance,children:!!(L&&$)&&jsxRuntimeExports.jsxs("div",{className:"flex gap-1 flex-col text-xxs font-normal",children:[jsxRuntimeExports.jsx("span",{children:L==null?void 0:L.title}),jsxRuntimeExports.jsxs("span",{className:"text-sm text-green-600 -ml-1",children:["+",$]})]})})})})}),jsxRuntimeExports.jsxs("div",{className:"flex flex-col text-center gap-1",children:[jsxRuntimeExports.jsxs("div",{children:[L?"Forecasted Score":"Performance"," "]}),jsxRuntimeExports.jsx("div",{className:"text-xs text-brand-500 dark:text-brand-300 font-light",children:"Values are estimated and may vary with Google Page Speed Insights."})]}),jsxRuntimeExports.jsxs("div",{className:`flex justify-around text-sm gap-4 font-normal w-full text-brand-700 dark:text-brand-300 ${i?"":"mb-5 "}`,children:[jsxRuntimeExports.jsxs("div",{className:"flex lg:flex-col xl:flex-row items-center gap-1",children:[jsxRuntimeExports.jsx(PerformanceIcons,{icon:"fail"}),"0-49"]}),jsxRuntimeExports.jsxs("div",{className:"flex lg:flex-col xl:flex-row items-center gap-1",children:[jsxRuntimeExports.jsx(PerformanceIcons,{icon:"average"}),"50-89"]}),jsxRuntimeExports.jsxs("div",{className:"flex lg:flex-col xl:flex-row items-center gap-1",children:[jsxRuntimeExports.jsx(PerformanceIcons,{icon:"pass"}),"89-100"]})]})]}),(C==null?void 0:C.metrics)&&jsxRuntimeExports.jsxs(AppButton,{onClick:J=>R(ne=>!ne),variant:"outline",className:"select-none border-none bg-transparent dark:bg-brand-950 hover:bg-transparent text-center text-xs text-brand-600 py-2",children:[j?"Collapse":"Expand"," Metrics"]}),(C==null?void 0:C.metrics)&&!j&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx("div",{className:`flex justify-around ${i?"":"mb-3 px-2 "}`,onMouseLeave:()=>I(setCommonState("hoveredMetric",null)),children:C.metrics.map(J=>jsxRuntimeExports.jsxs("div",{onMouseEnter:()=>I(setCommonState("hoveredMetric",J)),className:`text-xs border text-center flex flex-col
                             gap-0.5 px-3 py-2 bg-brand-100/20 dark:hover:bg-brand-600 hover:bg-brand-100 cursor-default rounded-[14px]`,children:[jsxRuntimeExports.jsx("div",{className:"font-medium tracking-wider ",children:J.refs.acronym}),jsxRuntimeExports.jsx(MetricValue,{metric:J})]},J.id))})}),(C==null?void 0:C.metrics)&&j&&jsxRuntimeExports.jsxs("div",{className:cn("sticky top-0 w-full sm:w-1/2 lg:w-full border-l lg:border-l-0"),"data-tour":"metrics",children:[jsxRuntimeExports.jsxs("div",{onClick:J=>I(setCommonState("activeMetric",null)),className:cn("flex gap-3 items-center font-medium dark:hover:bg-brand-900/70  px-6 py-3 border-b lg:border-b-0 lg:border-t cursor-pointer text-sm",!D&&"bg-brand-100/80 dark:bg-brand-900/80 "),children:[jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(Hash,{className:"w-4 text-brand-400"})})," All Audits"]}),jsxRuntimeExports.jsx(Metrics$1,{performance:C==null?void 0:C.performance,metrics:C.metrics})]})]}),!i&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SideBarActions,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{children:jsxRuntimeExports.jsx(Feedback,{},V)})]})]})})},PageSpeedWidget$1=React8.memo(PageSpeedWidget),Content=({dashboard:s=!1})=>{var O,L,$;const{options:a,version:i}=useAppContext(),{data:o,error:E,loading:j,activeReport:R}=useSelector(optimizerData),[C,S]=reactExports.useState(0),{toast:_}=useToast(),[T,P]=reactExports.useState("#ECECED"),[N,I]=reactExports.useState(!1),M=useDispatch(),D=()=>{const V=(o==null?void 0:o.performance)??0;V<50?P("#FF3333"):V<90?P("#FFAA33"):V<101&&P("#09B42F")};reactExports.useEffect(()=>{if(D(),!j&&o){let V=0;const G=setInterval(()=>{V+=1,V<=o.performance?S(V):clearInterval(G)},10);return()=>clearInterval(G)}},[o,j]);const B=()=>{if(!a.actions)return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});let[V,G]=reactExports.useState(a.actions.map(ne=>({...ne,loading:!1}))),K={clear_cache:jsxRuntimeExports.jsx(Archive,{className:"w-4"}),clear_page_cache:jsxRuntimeExports.jsx(FileMinus2,{className:"w-4"}),clear_optimization:jsxRuntimeExports.jsx(FileCode2,{className:"w-4"})};const J=async ne=>{try{G(ue=>ue.map(ce=>ce.icon===ne.icon?{...ce,loading:!0}:ce));let le=await fetch(ne.href.replace(/&amp;/g,"&"));_({description:jsxRuntimeExports.jsxs("div",{className:"flex w-full gap-2 text-center",children:["Successfully completed ",jsxRuntimeExports.jsx(ForwardRef$y,{className:"w-5 text-green-600"})," "]})})}catch(le){console.error(le)}G(le=>le.map(ue=>ue.icon===ne.icon?{...ue,loading:!1}:ue))};return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:V.map(ne=>jsxRuntimeExports.jsx(TooltipText,{text:ne.tooltip,children:jsxRuntimeExports.jsxs(AppButton,{disabled:ne.loading,onClick:le=>J(ne),className:"rounded-[15px] dark:bg-brand-950/50 bg-brand-100/50",variant:"outline",children:[ne.loading&&jsxRuntimeExports.jsx("span",{children:jsxRuntimeExports.jsx(Loader,{className:"motion-safe:animate-spin w-4"})}),K[ne.icon]]})},ne.icon))})},F=(()=>{if(!a.dashboard_url)return"#";const V=`optimize-url=${a.optimizer_url}`,[G,K]=a.dashboard_url.split("?");return`${G}?${V}${K?"&"+K:""}#/optimize`})();return jsxRuntimeExports.jsx("div",{className:cn("relative text-base text-brand-950 dark:text-brand-50 flex flex-col justify-center min-h-[295px] w-fit py-6 px-6  ","backdrop-blur-md  dark:bg-brand-900/95 border border-brand-500/20 ",s?"w-auto rounded-3xl bg-brand-0":"mx-16 my-2 shadow-xl min-w-[565px] rounded-[50px] bg-brand-100/90"),children:jsxRuntimeExports.jsxs("div",{className:"flex gap-6",children:[jsxRuntimeExports.jsxs("div",{className:`flex flex-col gap-3 items-center ${s?"":"px-4"}`,children:[s&&jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{"data-tour":"switch-report-strategy",className:"select-none flex dark:bg-brand-800 py-0.5 bg-brand-200/80 rounded-2xl cursor-pointer left-4 absolute mx-2 ",children:[jsxRuntimeExports.jsx("div",{className:cn("absolute shadow-md translate-x-0 left-0.5 w-[45px] rounded-[14px] -z-1 duration-300 h-[39px] text-sm flex flex-column gap-2 px-4 py-3 font-medium dark:bg-brand-950 bg-brand-0",R==="desktop"&&"w-[45px] -translate-x-1 left-1/2")}),jsxRuntimeExports.jsx(TooltipText,{text:"Mobile",children:jsxRuntimeExports.jsx("div",{onClick:()=>M(changeReport("mobile")),className:"relative z-1 text-sm flex flex-column gap-2 px-4 py-3 font-medium rounded-2xl",children:jsxRuntimeExports.jsx(ForwardRef$d,{className:"h-4 w-4 font-medium dark:text-brand-500"})})}),jsxRuntimeExports.jsx(TooltipText,{text:"Desktop",children:jsxRuntimeExports.jsx("div",{onClick:()=>M(changeReport("desktop")),className:"relative z-1 text-sm flex flex-column gap-2 pl-2 px-4 py-3 font-medium rounded-2xl",children:jsxRuntimeExports.jsx(Monitor,{className:"h-4 w-4 font-medium dark:text-brand-500 "})})})]})}),jsxRuntimeExports.jsx("div",{className:"mt-2",children:j||N||E?jsxRuntimeExports.jsx(Skeleton,{className:cn("w-44 h-44 rounded-full ",s&&"mt-10")}):s?jsxRuntimeExports.jsx(PageSpeedWidget$1,{dashboardMode:!0}):jsxRuntimeExports.jsx(PerformanceProgressBar$1,{className:"h-[176px]",performance:o==null?void 0:o.performance})}),!s&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"text-xs w-full flex justify-center",children:jsxRuntimeExports.jsx(TooltipText,{asChild:!0,text:"Switch Report",children:jsxRuntimeExports.jsxs("button",{onClick:()=>M(changeReport(R==="desktop"?"mobile":"desktop")),className:"backdrop-blur-md dark:bg-brand-950/10 bg-brand-50/50 capitalize inline-flex gap-2 justify-center items-center border rounded-full py-1 px-3",children:[R==="desktop"?jsxRuntimeExports.jsx(Monitor,{className:"w-4 h-5"}):jsxRuntimeExports.jsx(ForwardRef$d,{className:"h-5"}),jsxRuntimeExports.jsx("span",{children:R})]})})}),jsxRuntimeExports.jsxs("div",{className:"flex justify-around text-sm text-brand-700 dark:text-brand-300 gap-4 font-light w-full",children:[jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:jsxRuntimeExports.jsx("polygon",{points:"5,0 0,10 10,10",fill:"red"})}),"0-49"]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:jsxRuntimeExports.jsx("rect",{width:"10",height:"10",fill:"orange"})}),"50-89"]}),jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-1",children:[jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",children:jsxRuntimeExports.jsx("circle",{cx:"5",cy:"5",r:"5",fill:"green"})}),"89-100"]})]})]})]}),jsxRuntimeExports.jsxs("div",{className:`flex flex-col flex-grow ${s?"border border-brand-200 dark:border-brand-800 rounded-xl px-4 py-4 h-fit":""}`,children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2 text-md justify-between items-center font-medium text-left mb-3 px-3",children:[jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:["Speed insights ",jsxRuntimeExports.jsxs("span",{className:"text-xxs leading-tight text-brand-400",children:["v",i]})]}),jsxRuntimeExports.jsxs("div",{className:"flex gap-2 text-brand-600 dark:text-brand-400",children:[jsxRuntimeExports.jsx(TooltipText,{text:"Go to Plugin Dashboard",children:jsxRuntimeExports.jsx("a",{className:"flex hover:dark:text-brand-100 justify-center rounded-full w-7 h-7 p-0.5 text-xs items-center gap-2",href:a!=null&&a.dashboard_url?a==null?void 0:a.dashboard_url:"#",children:jsxRuntimeExports.jsx(CircleGauge,{className:"w-5"})})}),jsxRuntimeExports.jsx(TooltipText,{text:"Switch theme",children:jsxRuntimeExports.jsx("div",{className:"hover:dark:text-brand-100",children:jsxRuntimeExports.jsx(ThemeSwitcher,{})})})]})]}),E?jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-2",children:jsxRuntimeExports.jsx(ErrorFetch,{error:E})}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[j||N?jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsx(Skeleton,{className:"w-full h-[48px] rounded-[18px]"}),jsxRuntimeExports.jsx(Skeleton,{className:"w-full h-[48px] rounded-[18px]"}),jsxRuntimeExports.jsx(Skeleton,{className:"w-full h-[48px] rounded-[18px]"})]}):jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-2",children:[jsxRuntimeExports.jsx(SpeedInsightGroup,{title:"Opportunities",items:(O=o==null?void 0:o.grouped)==null?void 0:O.opportunities}),jsxRuntimeExports.jsx(SpeedInsightGroup,{title:"Diagnostics",items:(L=o==null?void 0:o.grouped)==null?void 0:L.diagnostics}),jsxRuntimeExports.jsx(SpeedInsightGroup,{title:"Passed Audits",success:!0,items:($=o==null?void 0:o.grouped)==null?void 0:$.passed_audits})]}),jsxRuntimeExports.jsx("hr",{className:"my-3 mx-6"})]}),jsxRuntimeExports.jsxs("div",{className:cn("flex gap-3 text-sm ",s?"flex-row-reverse":""),children:[jsxRuntimeExports.jsx("a",{href:F,children:jsxRuntimeExports.jsxs(AppButton,{children:[jsxRuntimeExports.jsx(ForwardRef$A,{className:"w-4 text-white dark:text-brand-900 rounded-[15px]"})," Open Optimizer"]})}),jsxRuntimeExports.jsx(B,{})]})]})]})})},SpeedInsights=({children:s,dashboardMode:a})=>{const{options:i}=useAppContext(),o=i==null?void 0:i.plugin_url;return a?jsxRuntimeExports.jsx(Content,{dashboard:a}):jsxRuntimeExports.jsxs(HoverCard,{openDelay:0,children:[jsxRuntimeExports.jsx("a",{href:i!=null&&i.dashboard_url?i==null?void 0:i.dashboard_url:"#",children:jsxRuntimeExports.jsx(HoverCardTrigger,{asChild:!0,children:jsxRuntimeExports.jsx("div",{className:`${o?"flex gap-1 items-center cursor-pointer text-white":"bg-gray-900 dark:bg-brand-900 py-1 cursor-pointer"}`,children:s&&s})})}),jsxRuntimeExports.jsx(HoverCardContent,{id:"rpo-popup-content",className:"font-sans animate-rl-scale-in z-[99999]",sideOffset:5,children:jsxRuntimeExports.jsx(Content,{})})]})};function SpeedPopover(){const{options:s}=useAppContext();return reactExports.useEffect(()=>{!disableDebugReport&&Bugsnag.leaveBreadcrumb("Popup Loaded")},[]),jsxRuntimeExports.jsxs("div",{id:"rl-react-popup-wrapper",translate:"no",className:`notranslate
              font-sans ${s?"":"flex flex-col justify-center text-center "}`,children:[jsxRuntimeExports.jsxs(SpeedInsights,{children:[s&&s.plugin_url&&jsxRuntimeExports.jsx("span",{className:"rl-icon",children:jsxRuntimeExports.jsx("img",{src:(s==null?void 0:s.plugin_url)+"/assets/images/logo-icon-light.svg",alt:"RapidLoad logo"})}),jsxRuntimeExports.jsx("span",{className:"rl-label",children:"RapidLoad"})]}),jsxRuntimeExports.jsx(Toaster,{})]})}const Providers=({children:s,mode:a,modeData:i,showOptimizer:o,global:E,popup:j})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Provider$1,{store,children:jsxRuntimeExports.jsx(RootProvider,{children:jsxRuntimeExports.jsx(AppProvider,{global:E,initShowOptimizerValue:o,mode:a,modeData:i,children:jsxRuntimeExports.jsx(TooltipProvider,{children:jsxRuntimeExports.jsx(LazyMotion,{features:domAnimation,children:s})})})})})});var bugsnagReact={exports:{}};(function(s,a){(function(i){s.exports=i()})(function(){var i={};function o(){return o=Object.assign?Object.assign.bind():function(_){for(var T=1;T<arguments.length;T++){var P=arguments[T];for(var N in P)Object.prototype.hasOwnProperty.call(P,N)&&(_[N]=P[N])}return _},o.apply(this,arguments)}function E(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function j(_,T){_.prototype=Object.create(T.prototype),_.prototype.constructor=_,R(_,T)}function R(_,T){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,I){return N.__proto__=I,N},R(_,T)}i=function(){function _(){var P=typeof window<"u"&&window.React;if(this.name="react",this.lazy=arguments.length===0&&!P,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||P,!this.React))throw new Error("@bugsnag/plugin-react reference to `React` was undefined")}var T=_.prototype;return T.load=function(N){if(!this.lazy){var I=S(this.React,N);return I.createErrorBoundary=function(){return I},I}var M=function(){throw new Error(`@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:
Pass React to the plugin constructor

  \`Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })\`
and then call \`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()\`

Or if React is not available until after Bugsnag has started,
construct the plugin with no arguments
  \`Bugsnag.start({ plugins: [new BugsnagPluginReact()] })\`,
then pass in React when available to construct your error boundary
  \`const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)\``)};return M.createErrorBoundary=function(D){if(!D)throw new Error("@bugsnag/plugin-react reference to `React` was undefined");return S(D,N)},M},_}();var C=function(_){for(var T=_.split(/\n/g),P="",N=0,I=T.length;N<I;N++)T[N].length&&(P+=(P.length?`
`:"")+T[N].trim());return P},S=function(_,T){return function(P){j(N,P);function N(M){var D;return D=P.call(this,M)||this,D.state={error:null,info:null},D.handleClearError=D.handleClearError.bind(E(D)),D}var I=N.prototype;return I.handleClearError=function(){this.setState({error:null,info:null})},I.componentDidCatch=function(D,B){var F=this.props.onError,O={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},L=T.Event.create(D,!0,O,1);B&&B.componentStack&&(B.componentStack=C(B.componentStack)),L.addMetadata("react",B),T._notify(L,F),this.setState({error:D,info:B})},I.render=function(){var D=this.state.error;if(D){var B=this.props.FallbackComponent;return B?_.createElement(B,o({},this.state,{clearError:this.handleClearError})):null}return this.props.children},N}(_.Component)};return i.formatComponentStack=C,i.default=i,i})})(bugsnagReact);var bugsnagReactExports=bugsnagReact.exports;const BugsnagPluginReact=getDefaultExportFromCjs(bugsnagReactExports);disableDebugReport||Bugsnag.start({appVersion:"1.4.1",apiKey:"005f0d45718ad741e38cf9280457d034",plugins:[new BugsnagPluginReact],onError:function(s){s.addMetadata("titan",{...window==null?void 0:window.rapidload_optimizer})}});const plugin=disableDebugReport?null:Bugsnag.getPlugin("react"),ErrorBoundary=plugin?plugin.createErrorBoundary(React8):null,logError=(s,a)=>{console.error(s,a)},ApplicationCrashed=()=>{const s={bottom:0,position:"absolute",left:"50%",transform:"translateX(-50%)",padding:"10px 20px",borderRadius:"10px",marginBottom:"20px",border:"1px solid #F44336",boxShadow:"0 10px 15px -3px #F44336, 0 4px 6px -4px rgb(0 0 0 / 0.1)",fontSize:"14px"},a={background:"red",padding:"5px 15px",fontSize:"12px",borderRadius:"5px",color:"white",marginLeft:"10px"};return jsxRuntimeExports.jsx("div",{className:"rpo-app-crashed",style:s,children:jsxRuntimeExports.jsxs("div",{className:"rpo-error",children:["RapidLoad Optimizer crashed :( ",jsxRuntimeExports.jsx("button",{style:a,onClick:i=>window.location.reload(),children:"Reload"})]})})},ApplicationErrorBoundary=({fallback:s,onError:a,children:i})=>ErrorBoundary?jsxRuntimeExports.jsx(ErrorBoundary,{FallbackComponent:ApplicationCrashed,children:i}):i;class RapidLoadOptimizer{constructor({mode:a="normal",container:i,showOptimizer:o=!1,popup:E=null,modeData:j,global:R=!1,shadowRoot:C=!0}){createRoot(i).render(jsxRuntimeExports.jsx(ApplicationErrorBoundary,{fallback:jsxRuntimeExports.jsx(ApplicationCrashed,{}),onError:logError,children:jsxRuntimeExports.jsxs(Providers,{mode:a,modeData:j,popup:E,global:R,showOptimizer:o,children:[E&&jsxRuntimeExports.jsx(ShadowRoot,{disabled:!C,node:E,styles:stylesUrl,children:jsxRuntimeExports.jsx(SpeedPopover,{})}),jsxRuntimeExports.jsx(ShadowRoot,{disabled:!C,styles:stylesUrl,children:jsxRuntimeExports.jsx(App,{_showOptimizer:o,popup:E})})]})}))}static showOptimizer(a){const i=new CustomEvent("rapidLoad:set-optimizer",{detail:{status:a}});window.dispatchEvent(i)}}window.RapidLoadOptimizer=RapidLoadOptimizer;document.addEventListener("DOMContentLoaded",()=>{var s;if((s=window==null?void 0:window.rapidload_optimizer)!=null&&s.load_optimizer){const a=document.getElementById("rapidload-page-optimizer");let i=replaceParentWithDiv(document.getElementById("rl-node-wrapper"));new RapidLoadOptimizer({container:a,popup:i,showOptimizer:!0,mode:"normal"})}});function replaceParentWithDiv(s){var o;if(!s)return;const a=s.parentNode,i=document.createElement("div");i.innerHTML=a==null?void 0:a.innerHTML;for(let E=0;E<a.attributes.length;E++){const j=a.attributes[E];j.name!=="href"&&i.setAttribute(j.name,j.value)}return(o=a.parentNode)==null||o.replaceChild(i,a),i}export{Button as B,ForwardRef$3 as F,MousePointerClick as M,useSelector as a,setCommonRootState as b,optimizerData as o,setCommonState as s,transformFileType as t,useCommonDispatch as u};