@qonto/embed-sdk 0.48.0 → 0.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cards/cards.d.ts +39 -26
  2. package/dist/cards/cards.d.ts.map +1 -1
  3. package/dist/errors/AuthenticationError.d.ts +1 -1
  4. package/dist/index.umd.js +4 -4
  5. package/dist/mocks/handlers.d.ts.map +1 -1
  6. package/dist/organizations/organizations.d.ts +11 -6
  7. package/dist/organizations/organizations.d.ts.map +1 -1
  8. package/dist/payment-links/index.d.ts +1 -1
  9. package/dist/payment-links/payment-links.d.ts +26 -14
  10. package/dist/payment-links/payment-links.d.ts.map +1 -1
  11. package/dist/payment-links/payment-links.public-api.d.ts +1 -1
  12. package/dist/payment-links/payment-links.types.d.ts +1 -1
  13. package/dist/payment-links/payment-links.types.d.ts.map +1 -1
  14. package/dist/payment-links/validation/payment-links.validate.d.ts +5 -2
  15. package/dist/payment-links/validation/payment-links.validate.d.ts.map +1 -1
  16. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts +9 -1
  17. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.api.d.ts.map +1 -1
  18. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts +25 -32
  19. package/dist/sepa-transfers/bulk-transfers/bulk-transfers.d.ts.map +1 -1
  20. package/dist/sepa-transfers/sepa-transfers.d.ts +36 -51
  21. package/dist/sepa-transfers/sepa-transfers.d.ts.map +1 -1
  22. package/dist/src/cards/cards.js +1 -1
  23. package/dist/src/common/api-pagination/api-pagination.js +1 -1
  24. package/dist/src/errors/AuthenticationError.js +1 -1
  25. package/dist/src/payment-links/payment-links.js +1 -1
  26. package/dist/src/payment-links/validation/payment-links.validate.js +1 -1
  27. package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.api.js +1 -1
  28. package/dist/src/sepa-transfers/bulk-transfers/bulk-transfers.js +1 -1
  29. package/package.json +1 -1
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QontoEmbed={})}(this,(function(exports){"use strict";class AuthManager{constructor(){this.accessToken=null,this.stagingToken=null}static getInstance(){return AuthManager.instance||(AuthManager.instance=new AuthManager),AuthManager.instance}setAccessToken(e){this.accessToken=e}getAccessToken(){return this.accessToken}hasAccessToken(){return null!==this.accessToken&&""!==this.accessToken}clearAccessToken(){this.accessToken=null}setStagingToken(e){this.stagingToken=e}getStagingToken(){return this.stagingToken}hasStagingToken(){return null!==this.stagingToken&&""!==this.stagingToken}clearStagingToken(){this.stagingToken=null}}const authManager=AuthManager.getInstance();class QontoEmbedSdkError extends Error{constructor(){super(),this.stack=""}toString(){return`${this.name}: ${this.message}`}}class AuthenticationError extends QontoEmbedSdkError{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid access token.\nEnsure you have called the initialize function with a valid access token."}}function validatePresenceOfAuthToken(){if(!authManager.hasAccessToken())throw new AuthenticationError;return authManager.getAccessToken()}class InvalidParametersError extends QontoEmbedSdkError{constructor(e){super(),this.name="InvalidParametersError",this.invalidParameters=Array.isArray(e)?e:[e],this.message=`Invalid parameters were passed to the function:\n${this.invalidParameters.map((e=>e)).join("\n")}`}}const IFRAME_EVENTS={READY:"qonto.ready"},ACTIONS={CARD_SEE:"card.see",CARD_SEE_DETAILS:"card.see-details",CARD_ORDER:"card.order",CARD_UNLOCK:"card.unlock",CARD_SHOW_PIN:"card.show.pin",CARD_SET_PIN:"card.set.pin",TRANSFER_SINGLE_CREATE:"transfer.single.create",TRANSFER_BULK_CREATE:"transfer.bulk.create",BENEFICIARIES_TRUST:"beneficiary.trust"},ENVIRONMENTS={PRODUCTION:"production",STAGING:"staging",LOCAL:"local"},BRANCHES={MASTER:"master",SANDBOX:"sandbox",QA:"qa"},ACTIVITY_TAGS={ATM:"atm",FALLBACK:"fallback",FEES:"fees",FINANCE:"finance",FOOD_AND_GROCERY:"food_and_grocery",GAS_STATION:"gas_station",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",HOTEL_AND_LODGING:"hotel_and_lodging",INSURANCE:"insurance",IT_AND_ELECTRONICS:"it_and_electronics",LEGAL_AND_ACCOUNTING:"legal_and_accounting",LOGISTICS:"logistics",MANUFACTURING:"manufacturing",MARKETING:"marketing",OFFICE_RENTAL:"office_rental",OFFICE_SUPPLY:"office_supply",ONLINE_SERVICE:"online_service",OTHER_EXPENSE:"other_expense",OTHER_INCOME:"other_income",OTHER_SERVICE:"other_service",PENDING:"pending",REFUND:"refund",RESTAURANT_AND_BAR:"restaurant_and_bar",SALES:"sales",SALARY:"salary",SUBSCRIPTION:"subscription",TAX:"tax",TRANSPORT:"transport",TREASURY_AND_INTERCO:"treasury_and_interco",UTILITY:"utility",VOUCHER:"voucher"},BENEFICIARY_STATUSES={PENDING:"pending",VALIDATED:"validated",DECLINED:"declined"},LOCALES$1={EN:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt"},TRANSFER_DECLINE_REASONS={BENEFICIARY_BIC_INVALID:"beneficiary_bic_invalid",BENEFICIARY_IBAN_INVALID:"beneficiary_iban_invalid",BENEFICIARY_STATUS:"beneficiary_status",BENEFICIARY_NETWORK_RULES_ERROR:"beneficiary_network_rules_error",ORGANISATION_COMPLIANCE_REASONS:"organisation_compliance_reasons",DEBIT_ACCOUNT_INSUFFICIENT_FUNDS:"debit_account_insufficient_funds",QONTO_PROCESSING_FAILED:"qonto_processing_failed"},TRANSFER_STATUSES={PENDING:"pending",PROCESSING:"processing",CANCELED:"canceled",DECLINED:"declined",SETTLED:"settled",FAILED:"failed",COMPLETED:"completed"},TRANSACTION_STATUSES={PENDING:"pending",DECLINED:"declined",COMPLETED:"completed"},MFA_METHODS={PASSKEY:"passkey",SMS_OTP:"sms-otp",PAIRED_DEVICE:"paired-device",MOCK:"mock"},AMOUNT_REQUIRING_ATTACHMENTS=3e4,VOP_CHECK_RESULTS={MATCH_RESULT_MATCH:"MATCH_RESULT_MATCH",MATCH_RESULT_NO_MATCH:"MATCH_RESULT_NO_MATCH",MATCH_RESULT_CLOSE_MATCH:"MATCH_RESULT_CLOSE_MATCH",MATCH_RESULT_NOT_POSSIBLE:"MATCH_RESULT_NOT_POSSIBLE",MATCH_RESULT_UNSPECIFIED:"MATCH_RESULT_UNSPECIFIED"},VOP_DECISIONS={ACCEPT:"ACCEPT",REJECT:"REJECT"},AUTH_LINK_ACTIONS={CARD_DISPLAY:"display_card",PAYMENT_LINK_CREATE:"create_payment_link",SEPA_TRANSFER_CREATE:"create_sepa_transfer"},HTTP_CODES={PRECONDITION_REQUIRED:428};var constants$1=Object.freeze({__proto__:null,ACTIONS:ACTIONS,ACTIVITY_TAGS:ACTIVITY_TAGS,AMOUNT_REQUIRING_ATTACHMENTS:AMOUNT_REQUIRING_ATTACHMENTS,AUTH_LINK_ACTIONS:AUTH_LINK_ACTIONS,BENEFICIARY_STATUSES:BENEFICIARY_STATUSES,BRANCHES:BRANCHES,ENVIRONMENTS:ENVIRONMENTS,HTTP_CODES:HTTP_CODES,IFRAME_EVENTS:IFRAME_EVENTS,LOCALES:LOCALES$1,MFA_METHODS:MFA_METHODS,TRANSACTION_STATUSES:TRANSACTION_STATUSES,TRANSFER_DECLINE_REASONS:TRANSFER_DECLINE_REASONS,TRANSFER_STATUSES:TRANSFER_STATUSES,VOP_CHECK_RESULTS:VOP_CHECK_RESULTS,VOP_DECISIONS:VOP_DECISIONS});class OperationSettingsManager{constructor(){this.mfaPreference=MFA_METHODS.PASSKEY,this.debugMode=!1}static getInstance(){return OperationSettingsManager.instance||(OperationSettingsManager.instance=new OperationSettingsManager),OperationSettingsManager.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.proxyRequestFunction&&(this.proxyRequestFunction=e.proxyRequestFunction)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyRequestFunction(){return this.proxyRequestFunction}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=MFA_METHODS.PASSKEY,this.debugMode=!1,this.proxyRequestFunction=void 0}getSettings(){return{uiParentElementId:this.uiParentElementId,mfaPreference:this.mfaPreference,debugMode:this.debugMode,proxyRequestFunction:this.proxyRequestFunction}}}const operationSettingsManager=OperationSettingsManager.getInstance(),EMBED_BASE_URL_PROD="https://embed.qonto.com",EMBED_BASE_URL_STAGING="https://embed-js{branch}.staging.qonto.co",EMBED_BASE_URL_LOCAL="https://embed.dev.qonto.co",urlsPerEnvironment={[ENVIRONMENTS.PRODUCTION]:{EMBED_BASE_URL:EMBED_BASE_URL_PROD,EMBED_URL:`${EMBED_BASE_URL_PROD}/connect`,THIRD_PARTY_API_URL:"https://thirdparty.qonto.com"},[ENVIRONMENTS.STAGING]:{EMBED_BASE_URL:EMBED_BASE_URL_STAGING,EMBED_URL:`${EMBED_BASE_URL_STAGING}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"},[ENVIRONMENTS.LOCAL]:{EMBED_BASE_URL:EMBED_BASE_URL_LOCAL,EMBED_URL:`${EMBED_BASE_URL_LOCAL}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"}};class EnvironmentManager{constructor(){let e,t;this.environment=ENVIRONMENTS.PRODUCTION,this.branch=BRANCHES.SANDBOX,"undefined"!=typeof process&&process.env&&(e=process.env.QONTO_EMBED_ENVIRONMENT,t=process.env.QONTO_EMBED_BRANCH),this.environment=Object.values(ENVIRONMENTS).includes(e)?e:ENVIRONMENTS.PRODUCTION,this.branch=Object.values(BRANCHES).includes(t)?t:BRANCHES.SANDBOX}static getInstance(){return EnvironmentManager.instance||(EnvironmentManager.instance=new EnvironmentManager),EnvironmentManager.instance}setEnvironment(e){this.environment=e}getEnvironment(){return this.environment}isProductionEnvironment(){return this.environment===ENVIRONMENTS.PRODUCTION}setBranch(e){this.branch=e}getBranch(){return this.branch}clear(){this.environment=ENVIRONMENTS.PRODUCTION,this.branch=BRANCHES.MASTER}getEnvironmentUrls(){if(this.environment===ENVIRONMENTS.PRODUCTION)return urlsPerEnvironment.production;{const e=urlsPerEnvironment[this.environment];return Object.entries(e).reduce(((e,[t,r])=>({...e,[t]:r.replace("{branch}",`-${this.branch}`)})),{})}}}const environmentManager=EnvironmentManager.getInstance(),defaultOperationSettingsValidationConfiguration={requiresUI:!1};function validateOperationSettingsParams(e,{requiresUI:t}=defaultOperationSettingsValidationConfiguration){const r=e?.uiParentElementId||operationSettingsManager.getUIParentElementId();if(t){if(!r)throw new InvalidParametersError("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");if(!["string","function"].includes(typeof r))throw new InvalidParametersError("operationSettings.uiParentElementId must be a string or a function returning an HTMLElement")}const n=e?.mfaPreference||operationSettingsManager.getMFAPreference();if(n){const e=getMfaValuesAvailableInCurrentEnvironment(Object.values(MFA_METHODS));if(!e.includes(n))throw new InvalidParametersError(`operationSettings.mfaPreference must be one of ${e.join(", ")}`);if(environmentManager.isProductionEnvironment()&&n===MFA_METHODS.MOCK)throw new InvalidParametersError("operationSettings.mfaPreference cannot be set to mock in production environment.")}const a=e?.debugMode||operationSettingsManager.getDebugMode();if(void 0!==a&&"boolean"!=typeof a)throw new InvalidParametersError("operationSettings.debugMode must be a boolean.");const i=e?.proxyRequestFunction||operationSettingsManager.getProxyRequestFunction();if(i&&"function"!=typeof i)throw new InvalidParametersError("operationSettings.proxyRequestFunction must be a function.");return{...e,uiParentElementId:r,mfaPreference:n,debugMode:a,proxyRequestFunction:i}}function getMfaValuesAvailableInCurrentEnvironment(e){return environmentManager.isProductionEnvironment()?e.filter((e=>e!==MFA_METHODS.MOCK)):e}const SUPPORTED_LOCALES=Object.values(LOCALES$1);function validateLocale(e){if(!isLocaleSupported(e))throw new InvalidParametersError(`Unsupported locale: ${e}. The locale must be one of: ${SUPPORTED_LOCALES.join(", ")}.`);return e}function isLocaleSupported(e){return SUPPORTED_LOCALES.includes(e)}function validateInitializeParams(e){if(!e?.accessToken&&!e?.operationSettings?.proxyRequestFunction)throw new InvalidParametersError("Either operationSettings.proxyRequestFunction or access token is required when calling initialize()");return e?.operationSettings&&validateOperationSettingsParams(e.operationSettings),validateEnvironmentParams(e),e.locale&&validateLocale(e.locale),e}function validateEnvironmentParams(e){if(e.environment){if(!["production","staging","local"].includes(e.environment))throw new InvalidParametersError('If provided, environment must be either "production" or "staging"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.environment.PRODUCTION" or "constants.environment.STAGING"');if(e.branch&&!["master","sandbox","qa"].includes(e.branch))throw new InvalidParametersError('If provided, branch must be either "master", "sandbox" or "qa"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.branch.MASTER" or "constants.environment.SANDBOX" and so on')}return e}class LocaleManager{constructor(){this.currentLocale="en"}static getInstance(){return LocaleManager.instance||(LocaleManager.instance=new LocaleManager),LocaleManager.instance}setLocale(e){this.currentLocale=e}getLocale(){return this.currentLocale}setDefaultLocale(){this.currentLocale="en"}}const localeManager=LocaleManager.getInstance(),DEBUG_BUILD$3="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,SDK_VERSION="8.55.0",GLOBAL_OBJ=globalThis;function getGlobalSingleton(e,t,r){const n=r||GLOBAL_OBJ,a=n.__SENTRY__=n.__SENTRY__||{},i=a[SDK_VERSION]=a[SDK_VERSION]||{};return i[e]||(i[e]=t())}const DEBUG_BUILD$2="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,PREFIX="Sentry Logger ",CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],originalConsoleMethods={};function consoleSandbox(e){if(!("console"in GLOBAL_OBJ))return e();const t=GLOBAL_OBJ.console,r={},n=Object.keys(originalConsoleMethods);n.forEach((e=>{const n=originalConsoleMethods[e];r[e]=t[e],t[e]=n}));try{return e()}finally{n.forEach((e=>{t[e]=r[e]}))}}function makeLogger(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return DEBUG_BUILD$2?CONSOLE_LEVELS.forEach((r=>{t[r]=(...t)=>{e&&consoleSandbox((()=>{GLOBAL_OBJ.console[r](`${PREFIX}[${r}]:`,...t)}))}})):CONSOLE_LEVELS.forEach((e=>{t[e]=()=>{}})),t}const logger=getGlobalSingleton("logger",makeLogger),STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,r=0,n=0)=>{const a=[],i=e.split("\n");for(let e=r;e<i.length;e++){const r=i[e];if(r.length>1024)continue;const s=WEBPACK_ERROR_REGEXP.test(r)?r.replace(WEBPACK_ERROR_REGEXP,"$1"):r;if(!s.match(/\S*Error: /)){for(const e of t){const t=e(s);if(t){a.push(t);break}}if(a.length>=STACKTRACE_FRAME_LIMIT+n)break}}return stripSentryFramesAndReverse(a.slice(n))}}function stackParserFromStackParserOptions(e){return Array.isArray(e)?createStackParser(...e):e}function stripSentryFramesAndReverse(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(getLastStackFrame(t).function||"")&&t.pop(),t.reverse(),STRIP_FRAME_REGEXP.test(getLastStackFrame(t).function||"")&&(t.pop(),STRIP_FRAME_REGEXP.test(getLastStackFrame(t).function||"")&&t.pop()),t.slice(0,STACKTRACE_FRAME_LIMIT).map((e=>({...e,filename:e.filename||getLastStackFrame(t).filename,function:e.function||UNKNOWN_FUNCTION})))}function getLastStackFrame(e){return e[e.length-1]||{}}const defaultFunctionName="<anonymous>";function getFunctionName(e){try{return e&&"function"==typeof e&&e.name||defaultFunctionName}catch(e){return defaultFunctionName}}function getFramesFromEvent(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}}const handlers={},instrumented={};function addHandler(e,t){handlers[e]=handlers[e]||[],handlers[e].push(t)}function maybeInstrument(e,t){if(!instrumented[e]){instrumented[e]=!0;try{t()}catch(t){DEBUG_BUILD$2&&logger.error(`Error while instrumenting ${e}`,t)}}}function triggerHandlers(e,t){const r=e&&handlers[e];if(r)for(const n of r)try{n(t)}catch(t){DEBUG_BUILD$2&&logger.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${getFunctionName(n)}\nError:`,t)}}let _oldOnErrorHandler=null;function addGlobalErrorInstrumentationHandler(e){const t="error";addHandler(t,e),maybeInstrument(t,instrumentError)}function instrumentError(){_oldOnErrorHandler=GLOBAL_OBJ.onerror,GLOBAL_OBJ.onerror=function(e,t,r,n,a){return triggerHandlers("error",{column:n,error:a,line:r,msg:e,url:t}),!!_oldOnErrorHandler&&_oldOnErrorHandler.apply(this,arguments)},GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let _oldOnUnhandledRejectionHandler=null;function addGlobalUnhandledRejectionInstrumentationHandler(e){const t="unhandledrejection";addHandler(t,e),maybeInstrument(t,instrumentUnhandledRejection)}function instrumentUnhandledRejection(){_oldOnUnhandledRejectionHandler=GLOBAL_OBJ.onunhandledrejection,GLOBAL_OBJ.onunhandledrejection=function(e){return triggerHandlers("unhandledrejection",e),!_oldOnUnhandledRejectionHandler||_oldOnUnhandledRejectionHandler.apply(this,arguments)},GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||SDK_VERSION,t[SDK_VERSION]=t[SDK_VERSION]||{}}const objectToString=Object.prototype.toString;function isError(e){switch(objectToString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return isInstanceOf(e,Error)}}function isBuiltin(e,t){return objectToString.call(e)===`[object ${t}]`}function isErrorEvent$1(e){return isBuiltin(e,"ErrorEvent")}function isDOMError(e){return isBuiltin(e,"DOMError")}function isDOMException(e){return isBuiltin(e,"DOMException")}function isString(e){return isBuiltin(e,"String")}function isParameterizedString(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function isPrimitive(e){return null===e||isParameterizedString(e)||"object"!=typeof e&&"function"!=typeof e}function isPlainObject(e){return isBuiltin(e,"Object")}function isEvent(e){return"undefined"!=typeof Event&&isInstanceOf(e,Event)}function isElement(e){return"undefined"!=typeof Element&&isInstanceOf(e,Element)}function isRegExp(e){return isBuiltin(e,"RegExp")}function isThenable(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function isSyntheticEvent(e){return isPlainObject(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function isInstanceOf(e,t){try{return e instanceof t}catch(e){return!1}}function isVueViewModel(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const WINDOW$4=GLOBAL_OBJ,DEFAULT_MAX_STRING_LENGTH=80;function htmlTreeAsString(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,a=[];let i=0,s=0;const o=" > ",l=o.length;let c;const h=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;r&&i++<n&&(c=_htmlElementAsString(r,h),!("html"===c||i>1&&s+a.length*l+c.length>=p));)a.push(c),s+=c.length,r=r.parentNode;return a.reverse().join(o)}catch(e){return"<unknown>"}}function _htmlElementAsString(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(WINDOW$4.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const a=t&&t.length?t.filter((e=>r.getAttribute(e))).map((e=>[e,r.getAttribute(e)])):null;if(a&&a.length)a.forEach((e=>{n.push(`[${e[0]}="${e[1]}"]`)}));else{r.id&&n.push(`#${r.id}`);const e=r.className;if(e&&isString(e)){const t=e.split(/\s+/);for(const e of t)n.push(`.${e}`)}}const i=["aria-label","type","name","title","alt"];for(const e of i){const t=r.getAttribute(e);t&&n.push(`[${e}="${t}"]`)}return n.join("")}function getLocationHref(){try{return WINDOW$4.document.location.href}catch(e){return""}}function getComponentName(e){if(!WINDOW$4.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function truncate(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function safeJoin(e,t){if(!Array.isArray(e))return"";const r=[];for(let t=0;t<e.length;t++){const n=e[t];try{isVueViewModel(n)?r.push("[VueViewModel]"):r.push(String(n))}catch(e){r.push("[value cannot be serialized]")}}return r.join(t)}function isMatchingPattern(e,t,r=!1){return!!isString(e)&&(isRegExp(t)?t.test(e):!!isString(t)&&(r?e===t:e.includes(t)))}function stringMatchesSomePattern(e,t=[],r=!1){return t.some((t=>isMatchingPattern(e,t,r)))}function fill(e,t,r){if(!(t in e))return;const n=e[t],a=r(n);"function"==typeof a&&markFunctionWrapped(a,n);try{e[t]=a}catch(r){DEBUG_BUILD$2&&logger.log(`Failed to replace method "${t}" in object`,e)}}function addNonEnumerableProperty(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch(r){DEBUG_BUILD$2&&logger.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function markFunctionWrapped(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,addNonEnumerableProperty(e,"__sentry_original__",t)}catch(e){}}function getOriginalFunction(e){return e.__sentry_original__}function convertToPlainObject(e){if(isError(e))return{message:e.message,name:e.name,stack:e.stack,...getOwnProperties(e)};if(isEvent(e)){const t={type:e.type,target:serializeEventTarget(e.target),currentTarget:serializeEventTarget(e.currentTarget),...getOwnProperties(e)};return"undefined"!=typeof CustomEvent&&isInstanceOf(e,CustomEvent)&&(t.detail=e.detail),t}return e}function serializeEventTarget(e){try{return isElement(e)?htmlTreeAsString(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function getOwnProperties(e){if("object"==typeof e&&null!==e){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}return{}}function extractExceptionKeysForMessage(e,t=40){const r=Object.keys(convertToPlainObject(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return truncate(n,t);for(let e=r.length;e>0;e--){const n=r.slice(0,e).join(", ");if(!(n.length>t))return e===r.length?n:truncate(n,t)}return""}function dropUndefinedKeys(e){return _dropUndefinedKeys(e,new Map)}function _dropUndefinedKeys(e,t){if(isPojo(e)){const r=t.get(e);if(void 0!==r)return r;const n={};t.set(e,n);for(const r of Object.getOwnPropertyNames(e))void 0!==e[r]&&(n[r]=_dropUndefinedKeys(e[r],t));return n}if(Array.isArray(e)){const r=t.get(e);if(void 0!==r)return r;const n=[];return t.set(e,n),e.forEach((e=>{n.push(_dropUndefinedKeys(e,t))})),n}return e}function isPojo(e){if(!isPlainObject(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}const ONE_SECOND_IN_MS=1e3;function dateTimestampInSeconds(){return Date.now()/ONE_SECOND_IN_MS}function createUnixTimestampInSecondsFunc(){const{performance:e}=GLOBAL_OBJ;if(!e||!e.now)return dateTimestampInSeconds;const t=Date.now()-e.now(),r=null==e.timeOrigin?t:e.timeOrigin;return()=>(r+e.now())/ONE_SECOND_IN_MS}const timestampInSeconds=createUnixTimestampInSecondsFunc();function uuid4(){const e=GLOBAL_OBJ,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))}function getFirstException(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function getEventDescription(e){const{message:t,event_id:r}=e;if(t)return t;const n=getFirstException(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function addExceptionTypeValue(e,t,r){const n=e.exception=e.exception||{},a=n.values=n.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function addExceptionMechanism(e,t){const r=getFirstException(e);if(!r)return;const n=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t){const e={...n&&n.data,...t.data};r.mechanism.data=e}}function checkOrSetAlreadyCaught(e){if(isAlreadyCaptured(e))return!0;try{addNonEnumerableProperty(e,"__sentry_captured__",!0)}catch(e){}return!1}function isAlreadyCaptured(e){try{return e.__sentry_captured__}catch(e){}}var States;function resolvedSyncPromise(e){return new SyncPromise((t=>{t(e)}))}function rejectedSyncPromise(e){return new SyncPromise(((t,r)=>{r(e)}))}(()=>{const{performance:e}=GLOBAL_OBJ;if(!e||!e.now)return;const t=36e5,r=e.now(),n=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,i=a<t,s=e.timing&&e.timing.navigationStart,o="number"==typeof s?Math.abs(s+r-n):t;(i||o<t)&&(a<=o&&e.timeOrigin)})(),function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(States||(States={}));class SyncPromise{constructor(e){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),this._state=States.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new SyncPromise(((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new SyncPromise(((t,r)=>{let n,a;return this.then((t=>{a=!1,n=t,e&&e()}),(t=>{a=!0,n=t,e&&e()})).then((()=>{a?r(n):t(n)}))}))}__init(){this._resolve=e=>{this._setResult(States.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(States.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===States.PENDING&&(isThenable(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===States.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===States.RESOLVED&&e[1](this._value),this._state===States.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function makeSession(e){const t=timestampInSeconds(),r={sid:uuid4(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sessionToJSON(r)};return e&&updateSession(r,e),r}function updateSession(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||timestampInSeconds(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:uuid4()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function closeSession(e,t){let r={};"ok"===e.status&&(r={status:"exited"}),updateSession(e,r)}function sessionToJSON(e){return dropUndefinedKeys({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function generateTraceId(){return uuid4()}function generateSpanId(){return uuid4().substring(16)}function merge(e,t,r=2){if(!t||"object"!=typeof t||r<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=merge(n[e],t[e],r-1));return n}const SCOPE_SPAN_FIELD="_sentrySpan";function _setSpanForScope(e,t){t?addNonEnumerableProperty(e,SCOPE_SPAN_FIELD,t):delete e[SCOPE_SPAN_FIELD]}function _getSpanForScope(e){return e[SCOPE_SPAN_FIELD]}const DEFAULT_MAX_BREADCRUMBS=100;class ScopeClass{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:generateTraceId(),spanId:generateSpanId()}}clone(){const e=new ScopeClass;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,_setSpanForScope(e,_getSpanForScope(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&updateSession(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[r,n]=t instanceof Scope?[t.getScopeData(),t.getRequestSession()]:isPlainObject(t)?[e,e.requestSession]:[],{tags:a,extra:i,user:s,contexts:o,level:l,fingerprint:c=[],propagationContext:h}=r||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...i},this._contexts={...this._contexts,...o},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),c.length&&(this._fingerprint=c),h&&(this._propagationContext=h),n&&(this._requestSession=n),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,_setSpanForScope(this,void 0),this._attachments=[],this.setPropagationContext({traceId:generateTraceId()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const r="number"==typeof t?t:DEFAULT_MAX_BREADCRUMBS;if(r<=0)return this;const n={timestamp:dateTimestampInSeconds(),...e};return this._breadcrumbs.push(n),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:_getSpanForScope(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=merge(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:generateSpanId(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const r=t&&t.event_id?t.event_id:uuid4();if(!this._client)return logger.warn("No client configured on scope - will not capture exception!"),r;const n=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},this),r}captureMessage(e,t,r){const n=r&&r.event_id?r.event_id:uuid4();if(!this._client)return logger.warn("No client configured on scope - will not capture message!"),n;const a=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...r,event_id:n},this),n}captureEvent(e,t){const r=t&&t.event_id?t.event_id:uuid4();return this._client?(this._client.captureEvent(e,{...t,event_id:r},this),r):(logger.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Scope=ScopeClass;function getDefaultCurrentScope(){return getGlobalSingleton("defaultCurrentScope",(()=>new Scope))}function getDefaultIsolationScope(){return getGlobalSingleton("defaultIsolationScope",(()=>new Scope))}class AsyncContextStack{constructor(e,t){let r,n;r=e||new Scope,n=t||new Scope,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){const t=this._pushScope();let r;try{r=e(t)}catch(e){throw this._popScope(),e}return isThenable(r)?r.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function getAsyncContextStack(){const e=getSentryCarrier(getMainCarrier());return e.stack=e.stack||new AsyncContextStack(getDefaultCurrentScope(),getDefaultIsolationScope())}function withScope$1(e){return getAsyncContextStack().withScope(e)}function withSetScope(e,t){const r=getAsyncContextStack();return r.withScope((()=>(r.getStackTop().scope=e,t(e))))}function withIsolationScope(e){return getAsyncContextStack().withScope((()=>e(getAsyncContextStack().getIsolationScope())))}function getStackAsyncContextStrategy(){return{withIsolationScope:withIsolationScope,withScope:withScope$1,withSetScope:withSetScope,withSetIsolationScope:(e,t)=>withIsolationScope(t),getCurrentScope:()=>getAsyncContextStack().getScope(),getIsolationScope:()=>getAsyncContextStack().getIsolationScope()}}function getAsyncContextStrategy(e){const t=getSentryCarrier(e);return t.acs?t.acs:getStackAsyncContextStrategy()}function getCurrentScope(){return getAsyncContextStrategy(getMainCarrier()).getCurrentScope()}function getIsolationScope(){return getAsyncContextStrategy(getMainCarrier()).getIsolationScope()}function getGlobalScope(){return getGlobalSingleton("globalScope",(()=>new Scope))}function withScope(...e){const t=getAsyncContextStrategy(getMainCarrier());if(2===e.length){const[r,n]=e;return r?t.withSetScope(r,n):t.withScope(n)}return t.withScope(e[0])}function getClient(){return getCurrentScope().getClient()}function getTraceContextFromScope(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:a}=t;return dropUndefinedKeys({trace_id:r,span_id:n,parent_span_id:a})}const METRICS_SPAN_FIELD="_sentryMetrics";function getMetricSummaryJsonForSpan(e){const t=e[METRICS_SPAN_FIELD];if(!t)return;const r={};for(const[,[e,n]]of t){(r[e]||(r[e]=[])).push(dropUndefinedKeys(n))}return r}const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source",SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.sample_rate",SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",SPAN_STATUS_UNSET=0,SPAN_STATUS_OK=1,SENTRY_BAGGAGE_KEY_PREFIX="sentry-",SENTRY_BAGGAGE_KEY_PREFIX_REGEX=/^sentry-/;function baggageHeaderToDynamicSamplingContext(e){const t=parseBaggageHeader(e);if(!t)return;const r=Object.entries(t).reduce(((e,[t,r])=>{if(t.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)){e[t.slice(SENTRY_BAGGAGE_KEY_PREFIX.length)]=r}return e}),{});return Object.keys(r).length>0?r:void 0}function parseBaggageHeader(e){if(e&&(isString(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const r=baggageHeaderToObject(t);return Object.entries(r).forEach((([t,r])=>{e[t]=r})),e}),{}):baggageHeaderToObject(e)}function baggageHeaderToObject(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,r])=>(t&&r&&(e[t]=r),e)),{})}const TRACE_FLAG_SAMPLED=1;let hasShownSpanDropWarning=!1;function spanToTraceContext(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext();return dropUndefinedKeys({parent_span_id:n?t:spanToJSON(e).parent_span_id,span_id:n?generateSpanId():t,trace_id:r})}function spanTimeInputToSeconds(e){return"number"==typeof e?ensureTimestampInSeconds(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ensureTimestampInSeconds(e.getTime()):timestampInSeconds()}function ensureTimestampInSeconds(e){return e>9999999999?e/1e3:e}function spanToJSON(e){if(spanIsSentrySpan(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(e)){const{attributes:n,startTime:a,name:i,endTime:s,parentSpanId:o,status:l}=e;return dropUndefinedKeys({span_id:t,trace_id:r,data:n,description:i,parent_span_id:o,start_timestamp:spanTimeInputToSeconds(a),timestamp:spanTimeInputToSeconds(s)||void 0,status:getStatusMessage(l),op:n[SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:n[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:getMetricSummaryJsonForSpan(e)})}return{span_id:t,trace_id:r}}catch(e){return{}}}function spanIsOpenTelemetrySdkTraceBaseSpan(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function spanIsSentrySpan(e){return"function"==typeof e.getSpanJSON}function spanIsSampled(e){const{traceFlags:t}=e.spanContext();return t===TRACE_FLAG_SAMPLED}function getStatusMessage(e){if(e&&e.code!==SPAN_STATUS_UNSET)return e.code===SPAN_STATUS_OK?"ok":e.message||"unknown_error"}const ROOT_SPAN_FIELD="_sentryRootSpan";function getRootSpan(e){return e[ROOT_SPAN_FIELD]||e}function showSpanDropWarning(){hasShownSpanDropWarning||(consoleSandbox((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),hasShownSpanDropWarning=!0)}function hasTracingEnabled(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=getClient(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const DEFAULT_ENVIRONMENT="production",FROZEN_DSC_FIELD="_frozenDsc";function getDynamicSamplingContextFromClient(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},a=dropUndefinedKeys({environment:r.environment||DEFAULT_ENVIRONMENT,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",a),a}function getDynamicSamplingContextFromScope(e,t){const r=t.getPropagationContext();return r.dsc||getDynamicSamplingContextFromClient(r.traceId,e)}function getDynamicSamplingContextFromSpan(e){const t=getClient();if(!t)return{};const r=getRootSpan(e),n=r[FROZEN_DSC_FIELD];if(n)return n;const a=r.spanContext().traceState,i=a&&a.get("sentry.dsc"),s=i&&baggageHeaderToDynamicSamplingContext(i);if(s)return s;const o=getDynamicSamplingContextFromClient(e.spanContext().traceId,t),l=spanToJSON(r),c=l.data||{},h=c[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];null!=h&&(o.sample_rate=`${h}`);const p=c[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],d=l.description;return"url"!==p&&d&&(o.transaction=d),hasTracingEnabled()&&(o.sampled=String(spanIsSampled(r))),t.emit("createDsc",o,r),o}function parseSampleRate(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;DEBUG_BUILD$3&&logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function isValidProtocol(e){return"http"===e||"https"===e}function dsnToString(e,t=!1){const{host:r,path:n,pass:a,port:i,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&a?`:${a}`:""}@${r}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}function dsnFromString(e){const t=DSN_REGEX.exec(e);if(!t)return void consoleSandbox((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[r,n,a="",i="",s="",o=""]=t.slice(1);let l="",c=o;const h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return dsnFromComponents({host:i,pass:a,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function dsnFromComponents(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function validateDsn(e){if(!DEBUG_BUILD$2)return!0;const{port:t,projectId:r,protocol:n}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(logger.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(r.match(/^\d+$/)?isValidProtocol(n)?!t||!isNaN(parseInt(t,10))||(logger.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(logger.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(logger.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1))}function makeDsn(e){const t="string"==typeof e?dsnFromString(e):dsnFromComponents(e);if(t&&validateDsn(t))return t}function memoBuilder(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(r){if(e)return!!t.has(r)||(t.add(r),!1);for(let e=0;e<t.length;e++){if(t[e]===r)return!0}return t.push(r),!1},function(r){if(e)t.delete(r);else for(let e=0;e<t.length;e++)if(t[e]===r){t.splice(e,1);break}}]}function normalize(e,t=100,r=1/0){try{return visit("",e,t,r)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function normalizeToSize(e,t=3,r=102400){const n=normalize(e,t);return jsonSize(n)>r?normalizeToSize(e,t-1,r):n}function visit(e,t,r=1/0,n=1/0,a=memoBuilder()){const[i,s]=a;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const o=stringifyValue(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:r;if(0===l)return o.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return visit("",c.toJSON(),l-1,n,a)}catch(e){}const h=Array.isArray(t)?[]:{};let p=0;const d=convertToPlainObject(t);for(const e in d){if(!Object.prototype.hasOwnProperty.call(d,e))continue;if(p>=n){h[e]="[MaxProperties ~]";break}const t=d[e];h[e]=visit(e,t,l-1,n,a),p++}return s(t),h}function stringifyValue(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(isVueViewModel(t))return"[VueViewModel]";if(isSyntheticEvent(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${getFunctionName(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=getConstructorName(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}}function getConstructorName(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function utf8Length(e){return~-encodeURI(e).split(/%..|./).length}function jsonSize(e){return utf8Length(JSON.stringify(e))}function createEnvelope(e,t=[]){return[e,t]}function addItemToEnvelope(e,t){const[r,n]=e;return[r,[...n,t]]}function forEachEnvelopeItem(e,t){const r=e[1];for(const e of r){if(t(e,e[0].type))return!0}return!1}function encodeUTF8(e){return GLOBAL_OBJ.__SENTRY__&&GLOBAL_OBJ.__SENTRY__.encodePolyfill?GLOBAL_OBJ.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function serializeEnvelope(e){const[t,r]=e;let n=JSON.stringify(t);function a(e){"string"==typeof n?n="string"==typeof e?n+e:[encodeUTF8(n),e]:n.push("string"==typeof e?encodeUTF8(e):e)}for(const e of r){const[t,r]=e;if(a(`\n${JSON.stringify(t)}\n`),"string"==typeof r||r instanceof Uint8Array)a(r);else{let e;try{e=JSON.stringify(r)}catch(t){e=JSON.stringify(normalize(r))}a(e)}}return"string"==typeof n?n:concatBuffers(n)}function concatBuffers(e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}function createAttachmentEnvelopeItem(e){const t="string"==typeof e.data?encodeUTF8(e.data):e.data;return[dropUndefinedKeys({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const ITEM_TYPE_TO_DATA_CATEGORY_MAP={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function envelopeItemTypeToDataCategory(e){return ITEM_TYPE_TO_DATA_CATEGORY_MAP[e]}function getSdkMetadataForEnvelopeHeader(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function createEventEnvelopeHeaders(e,t,r,n){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:dsnToString(n)},...a&&{trace:dropUndefinedKeys({...a})}}}function enhanceEventWithSdkInfo(e,t){return t?(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]],e):e}function createSessionEnvelope(e,t,r,n){const a=getSdkMetadataForEnvelopeHeader(r);return createEnvelope({sent_at:(new Date).toISOString(),...a&&{sdk:a},...!!n&&t&&{dsn:dsnToString(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function createEventEnvelope(e,t,r,n){const a=getSdkMetadataForEnvelopeHeader(r),i=e.type&&"replay_event"!==e.type?e.type:"event";enhanceEventWithSdkInfo(e,r&&r.sdk);const s=createEventEnvelopeHeaders(e,a,n,t);delete e.sdkProcessingMetadata;return createEnvelope(s,[[{type:i},e]])}function notifyEventProcessors(e,t,r,n=0){return new SyncPromise(((a,i)=>{const s=e[n];if(null===t||"function"!=typeof s)a(t);else{const o=s({...t},r);DEBUG_BUILD$3&&s.id&&null===o&&logger.log(`Event processor "${s.id}" dropped event`),isThenable(o)?o.then((t=>notifyEventProcessors(e,t,r,n+1).then(a))).then(null,i):notifyEventProcessors(e,o,r,n+1).then(a).then(null,i)}}))}let parsedStackResults,lastKeysCount,cachedFilenameDebugIds;function getFilenameToDebugIdMap(e){const t=GLOBAL_OBJ._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return cachedFilenameDebugIds&&r.length===lastKeysCount||(lastKeysCount=r.length,cachedFilenameDebugIds=r.reduce(((r,n)=>{parsedStackResults||(parsedStackResults={});const a=parsedStackResults[n];if(a)r[a[0]]=a[1];else{const a=e(n);for(let e=a.length-1;e>=0;e--){const i=a[e],s=i&&i.filename,o=t[n];if(s&&o){r[s]=o,parsedStackResults[n]=[s,o];break}}}return r}),{})),cachedFilenameDebugIds}function applyScopeDataToEvent(e,t){const{fingerprint:r,span:n,breadcrumbs:a,sdkProcessingMetadata:i}=t;applyDataToEvent(e,t),n&&applySpanToEvent(e,n),applyFingerprintToEvent(e,r),applyBreadcrumbsToEvent(e,a),applySdkMetadataToEvent(e,i)}function mergeScopeData(e,t){const{extra:r,tags:n,user:a,contexts:i,level:s,sdkProcessingMetadata:o,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:p,propagationContext:d,transactionName:f,span:u}=t;mergeAndOverwriteScopeData(e,"extra",r),mergeAndOverwriteScopeData(e,"tags",n),mergeAndOverwriteScopeData(e,"user",a),mergeAndOverwriteScopeData(e,"contexts",i),e.sdkProcessingMetadata=merge(e.sdkProcessingMetadata,o,2),s&&(e.level=s),f&&(e.transactionName=f),u&&(e.span=u),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...d}}function mergeAndOverwriteScopeData(e,t,r){e[t]=merge(e[t],r,1)}function applyDataToEvent(e,t){const{extra:r,tags:n,user:a,contexts:i,level:s,transactionName:o}=t,l=dropUndefinedKeys(r);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=dropUndefinedKeys(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const h=dropUndefinedKeys(a);h&&Object.keys(h).length&&(e.user={...h,...e.user});const p=dropUndefinedKeys(i);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts}),s&&(e.level=s),o&&"transaction"!==e.type&&(e.transaction=o)}function applyBreadcrumbsToEvent(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function applySdkMetadataToEvent(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function applySpanToEvent(e,t){e.contexts={trace:spanToTraceContext(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:getDynamicSamplingContextFromSpan(t),...e.sdkProcessingMetadata};const r=spanToJSON(getRootSpan(t)).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}function applyFingerprintToEvent(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function prepareEvent(e,t,r,n,a,i){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||r.event_id||uuid4(),timestamp:t.timestamp||dateTimestampInSeconds()},c=r.integrations||e.integrations.map((e=>e.name));applyClientOptions(l,e),applyIntegrationsMetadata(l,c),a&&a.emit("applyFrameMetadata",t),void 0===t.type&&applyDebugIds(l,e.stackParser);const h=getFinalScope(n,r.captureContext);r.mechanism&&addExceptionMechanism(l,r.mechanism);const p=a?a.getEventProcessors():[],d=getGlobalScope().getScopeData();if(i){mergeScopeData(d,i.getScopeData())}if(h){mergeScopeData(d,h.getScopeData())}const f=[...r.attachments||[],...d.attachments];f.length&&(r.attachments=f),applyScopeDataToEvent(l,d);return notifyEventProcessors([...p,...d.eventProcessors],l,r).then((e=>(e&&applyDebugMeta(e),"number"==typeof s&&s>0?normalizeEvent(e,s,o):e)))}function applyClientOptions(e,t){const{environment:r,release:n,dist:a,maxValueLength:i=250}=t;e.environment=e.environment||r||DEFAULT_ENVIRONMENT,!e.release&&n&&(e.release=n),!e.dist&&a&&(e.dist=a),e.message&&(e.message=truncate(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=truncate(s.value,i));const o=e.request;o&&o.url&&(o.url=truncate(o.url,i))}function applyDebugIds(e,t){const r=getFilenameToDebugIdMap(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{r&&e.filename&&(e.debug_id=r[e.filename])}))}))}catch(e){}}function applyDebugMeta(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{r.push({type:"sourcemap",code_file:e,debug_id:t})}))}function applyIntegrationsMetadata(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function normalizeEvent(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:normalize(e.data,t,r)}})))},...e.user&&{user:normalize(e.user,t,r)},...e.contexts&&{contexts:normalize(e.contexts,t,r)},...e.extra&&{extra:normalize(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=normalize(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map((e=>({...e,...e.data&&{data:normalize(e.data,t,r)}})))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=normalize(e.contexts.flags,3,r)),n}function getFinalScope(e,t){if(!t)return e;const r=e?e.clone():new Scope;return r.update(t),r}function parseEventHintOrCaptureContext(e){}function captureException(e,t){return getCurrentScope().captureException(e,parseEventHintOrCaptureContext())}function captureMessage(e,t){const r="string"==typeof t?t:void 0,n="string"!=typeof t?{captureContext:t}:void 0;return getCurrentScope().captureMessage(e,r,n)}function captureEvent(e,t){return getCurrentScope().captureEvent(e,t)}function startSession(e){const t=getClient(),r=getIsolationScope(),n=getCurrentScope(),{release:a,environment:i=DEFAULT_ENVIRONMENT}=t&&t.getOptions()||{},{userAgent:s}=GLOBAL_OBJ.navigator||{},o=makeSession({release:a,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),l=r.getSession();return l&&"ok"===l.status&&updateSession(l,{status:"exited"}),endSession(),r.setSession(o),n.setSession(o),o}function endSession(){const e=getIsolationScope(),t=getCurrentScope(),r=t.getSession()||e.getSession();r&&closeSession(r),_sendSessionUpdate(),e.setSession(),t.setSession()}function _sendSessionUpdate(){const e=getIsolationScope(),t=getCurrentScope(),r=getClient(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function captureSession(e=!1){e?endSession():_sendSessionUpdate()}const SENTRY_API_VERSION="7";function getBaseApiEndpoint(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function _getIngestEndpoint(e){return`${getBaseApiEndpoint(e)}${e.projectId}/envelope/`}function _encodedAuth(e,t){const r={sentry_version:SENTRY_API_VERSION};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function getEnvelopeEndpointWithUrlEncodedAuth(e,t,r){return t||`${_getIngestEndpoint(e)}?${_encodedAuth(e,r)}`}const installedIntegrations=[];function filterDuplicates(e){const t={};return e.forEach((e=>{const{name:r}=e,n=t[r];n&&!n.isDefaultInstance&&e.isDefaultInstance||(t[r]=e)})),Object.values(t)}function getIntegrationsToSetup(e){const t=e.defaultIntegrations||[],r=e.integrations;let n;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(r))n=[...t,...r];else if("function"==typeof r){const e=r(t);n=Array.isArray(e)?e:[e]}else n=t;const a=filterDuplicates(n),i=a.findIndex((e=>"Debug"===e.name));if(i>-1){const[e]=a.splice(i,1);a.push(e)}return a}function setupIntegrations(e,t){const r={};return t.forEach((t=>{t&&setupIntegration(e,t,r)})),r}function afterSetupIntegrations(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function setupIntegration(e,t,r){if(r[t.name])DEBUG_BUILD$3&&logger.log(`Integration skipped because it was already installed: ${t.name}`);else{if(r[t.name]=t,-1===installedIntegrations.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),installedIntegrations.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,n)=>r(t,n,e)))}if("function"==typeof t.processEvent){const r=t.processEvent.bind(t),n=Object.assign(((t,n)=>r(t,n,e)),{id:t.name});e.addEventProcessor(n)}DEBUG_BUILD$3&&logger.log(`Integration installed: ${t.name}`)}}function defineIntegration(e){return e}function createClientReportEnvelope(e,t,r){return createEnvelope(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:dateTimestampInSeconds(),discarded_events:e}]])}class SentryError extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const ALREADY_SEEN_ERROR="Not capturing exception because it's already been captured.";class BaseClient{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=makeDsn(e.dsn):DEBUG_BUILD$3&&logger.warn("No DSN provided, client will not send events."),this._dsn){const t=getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&consoleSandbox((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,r){const n=uuid4();if(checkOrSetAlreadyCaught(e))return DEBUG_BUILD$3&&logger.log(ALREADY_SEEN_ERROR),n;const a={event_id:n,...t};return this._process(this.eventFromException(e,a).then((e=>this._captureEvent(e,a,r)))),a.event_id}captureMessage(e,t,r,n){const a={event_id:uuid4(),...r},i=isParameterizedString(e)?e:String(e),s=isPrimitive(e)?this.eventFromMessage(i,t,a):this.eventFromException(e,a);return this._process(s.then((e=>this._captureEvent(e,a,n)))),a.event_id}captureEvent(e,t,r){const n=uuid4();if(t&&t.originalException&&checkOrSetAlreadyCaught(t.originalException))return DEBUG_BUILD$3&&logger.log(ALREADY_SEEN_ERROR),n;const a={event_id:n,...t},i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,a,i||r)),a.event_id}captureSession(e){"string"!=typeof e.release?DEBUG_BUILD$3&&logger.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),updateSession(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((r=>t.flush(e).then((e=>r&&e))))):resolvedSyncPromise(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];setupIntegration(this,e,this._integrations),t||afterSetupIntegrations(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=createEventEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])r=addItemToEnvelope(r,createAttachmentEnvelopeItem(e));const n=this.sendEnvelope(r);n&&n.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=createSessionEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){const n="number"==typeof r?r:1,a=`${e}:${t}`;DEBUG_BUILD$3&&logger.log(`Recording outcome: "${a}"${n>1?` (${n} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+n}}on(e,t){const r=this._hooks[e]=this._hooks[e]||[];return r.push(t),()=>{const e=r.indexOf(t);e>-1&&r.splice(e,1)}}emit(e,...t){const r=this._hooks[e];r&&r.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(DEBUG_BUILD$3&&logger.error("Error while sending envelope:",e),e))):(DEBUG_BUILD$3&&logger.error("Transport disabled"),resolvedSyncPromise({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=setupIntegrations(this,e),afterSetupIntegrations(this,e)}_updateSessionFromEvent(e,t){let r="fatal"===t.level,n=!1;const a=t.exception&&t.exception.values;if(a){n=!0;for(const e of a){const t=e.mechanism;if(t&&!1===t.handled){r=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&r)&&(updateSession(e,{...r&&{status:"crashed"},errors:e.errors||Number(n||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new SyncPromise((t=>{let r=0;const n=setInterval((()=>{0==this._numProcessing?(clearInterval(n),t(!0)):(r+=1,e&&r>=e&&(clearInterval(n),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,r=getCurrentScope(),n=getIsolationScope()){const a=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||n.setLastEventId(e.event_id||t.event_id),prepareEvent(a,e,t,r,this,n).then((e=>{if(null===e)return e;e.contexts={trace:getTraceContextFromScope(r),...e.contexts};const t=getDynamicSamplingContextFromScope(this,r);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then((e=>e.event_id),(e=>{DEBUG_BUILD$3&&(e instanceof SentryError&&"log"===e.logLevel?logger.log(e.message):logger.warn(e))}))}_processEvent(e,t,r){const n=this.getOptions(),{sampleRate:a}=n,i=isTransactionEvent(e),s=isErrorEvent(e),o=e.type||"error",l=`before send for type \`${o}\``,c=void 0===a?void 0:parseSampleRate(a);if(s&&"number"==typeof c&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),rejectedSyncPromise(new SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const h="replay_event"===o?"replay":o,p=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,p).then((r=>{if(null===r)throw this.recordDroppedEvent("event_processor",h,e),new SentryError("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return r;return _validateBeforeSendResult(processBeforeSend(this,n,r,t),l)})).then((n=>{if(null===n){if(this.recordDroppedEvent("before_send",h,e),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new SentryError(`${l} returned \`null\`, will not send event.`,"log")}const a=r&&r.getSession();if(!i&&a&&this._updateSessionFromEvent(a,n),i){const e=(n.sdkProcessingMetadata&&n.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(n.spans?n.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const s=n.transaction_info;if(i&&s&&n.transaction!==e.transaction){const e="custom";n.transaction_info={...s,source:e}}return this.sendEvent(n,t),n})).then(null,(e=>{if(e instanceof SentryError)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[r,n]=e.split(":");return{reason:r,category:n,quantity:t}}))}_flushOutcomes(){DEBUG_BUILD$3&&logger.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(DEBUG_BUILD$3&&logger.log("No outcomes to send"));if(!this._dsn)return void(DEBUG_BUILD$3&&logger.log("No dsn provided, will not send outcomes"));DEBUG_BUILD$3&&logger.log("Sending outcomes:",e);const t=createClientReportEnvelope(e,this._options.tunnel&&dsnToString(this._dsn));this.sendEnvelope(t)}}function _validateBeforeSendResult(e,t){const r=`${t} must return \`null\` or a valid event.`;if(isThenable(e))return e.then((e=>{if(!isPlainObject(e)&&null!==e)throw new SentryError(r);return e}),(e=>{throw new SentryError(`${t} rejected with ${e}`)}));if(!isPlainObject(e)&&null!==e)throw new SentryError(r);return e}function processBeforeSend(e,t,r,n){const{beforeSend:a,beforeSendTransaction:i,beforeSendSpan:s}=t;if(isErrorEvent(r)&&a)return a(r,n);if(isTransactionEvent(r)){if(r.spans&&s){const t=[];for(const n of r.spans){const r=s(n);r?t.push(r):(showSpanDropWarning(),e.recordDroppedEvent("before_send","span"))}r.spans=t}if(i){if(r.spans){const e=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(r,n)}}return r}function isErrorEvent(e){return void 0===e.type}function isTransactionEvent(e){return"transaction"===e.type}function initAndBind(e,t){!0===t.debug&&(DEBUG_BUILD$3?logger.enable():consoleSandbox((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));getCurrentScope().update(t.initialScope);const r=new e(t);return setCurrentClient(r),r.init(),r}function setCurrentClient(e){getCurrentScope().setClient(e)}function makePromiseBuffer(e){const t=[];function r(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(n){if(!(void 0===e||t.length<e))return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached."));const a=n();return-1===t.indexOf(a)&&t.push(a),a.then((()=>r(a))).then(null,(()=>r(a).then(null,(()=>{})))),a},drain:function(e){return new SyncPromise(((r,n)=>{let a=t.length;if(!a)return r(!0);const i=setTimeout((()=>{e&&e>0&&r(!1)}),e);t.forEach((e=>{resolvedSyncPromise(e).then((()=>{--a||(clearTimeout(i),r(!0))}),n)}))}))}}}const DEFAULT_RETRY_AFTER=6e4;function parseRetryAfterHeader(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return 1e3*r;const n=Date.parse(`${e}`);return isNaN(n)?DEFAULT_RETRY_AFTER:n-t}function disabledUntil(e,t){return e[t]||e.all||0}function isRateLimited(e,t,r=Date.now()){return disabledUntil(e,t)>r}function updateRateLimits(e,{statusCode:t,headers:r},n=Date.now()){const a={...e},i=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,r,,,i]=e.split(":",5),s=parseInt(t,10),o=1e3*(isNaN(s)?60:s);if(r)for(const e of r.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(a[e]=n+o);else a.all=n+o}else s?a.all=n+parseRetryAfterHeader(s,n):429===t&&(a.all=n+6e4);return a}const DEFAULT_TRANSPORT_BUFFER_SIZE=64;function createTransport(e,t,r=makePromiseBuffer(e.bufferSize||DEFAULT_TRANSPORT_BUFFER_SIZE)){let n={};return{send:function(a){const i=[];if(forEachEnvelopeItem(a,((t,r)=>{const a=envelopeItemTypeToDataCategory(r);if(isRateLimited(n,a)){const n=getEventForEnvelopeItem(t,r);e.recordDroppedEvent("ratelimit_backoff",a,n)}else i.push(t)})),0===i.length)return resolvedSyncPromise({});const s=createEnvelope(a[0],i),o=t=>{forEachEnvelopeItem(s,((r,n)=>{const a=getEventForEnvelopeItem(r,n);e.recordDroppedEvent(t,envelopeItemTypeToDataCategory(n),a)}))};return r.add((()=>t({body:serializeEnvelope(s)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&DEBUG_BUILD$3&&logger.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),n=updateRateLimits(n,e),e)),(e=>{throw o("network_error"),e})))).then((e=>e),(e=>{if(e instanceof SentryError)return DEBUG_BUILD$3&&logger.error("Skipped sending event because buffer is full."),o("queue_overflow"),resolvedSyncPromise({});throw e}))},flush:e=>r.drain(e)}}function getEventForEnvelopeItem(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function applySdkMetadata(e,t,r=[t],n="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:r.map((e=>({name:`${n}:@sentry/${e}`,version:SDK_VERSION}))),version:SDK_VERSION}),e._metadata=a}const DEFAULT_BREADCRUMBS=100;function addBreadcrumb(e,t){const r=getClient(),n=getIsolationScope();if(!r)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:i=DEFAULT_BREADCRUMBS}=r.getOptions();if(i<=0)return;const s={timestamp:dateTimestampInSeconds(),...e},o=a?consoleSandbox((()=>a(s,t))):s;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,i))}let originalFunctionToString;const INTEGRATION_NAME$6="FunctionToString",SETUP_CLIENTS=new WeakMap,_functionToStringIntegration=()=>({name:INTEGRATION_NAME$6,setupOnce(){originalFunctionToString=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=getOriginalFunction(this),r=SETUP_CLIENTS.has(getClient())&&void 0!==t?t:this;return originalFunctionToString.apply(r,e)}}catch(e){}},setup(e){SETUP_CLIENTS.set(e,!0)}}),functionToStringIntegration=defineIntegration(_functionToStringIntegration),DEFAULT_IGNORE_ERRORS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],INTEGRATION_NAME$5="InboundFilters",_inboundFiltersIntegration=(e={})=>({name:INTEGRATION_NAME$5,processEvent(t,r,n){const a=n.getOptions();return _shouldDropEvent$1(t,_mergeOptions(e,a))?null:t}}),inboundFiltersIntegration=defineIntegration(_inboundFiltersIntegration);function _mergeOptions(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:DEFAULT_IGNORE_ERRORS],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function _shouldDropEvent$1(e,t){return t.ignoreInternal&&_isSentryError(e)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${getEventDescription(e)}`),!0):_isIgnoredError(e,t.ignoreErrors)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(e)}`),!0):_isUselessError(e)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${getEventDescription(e)}`),!0):_isIgnoredTransaction(e,t.ignoreTransactions)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${getEventDescription(e)}`),!0):_isDeniedUrl(e,t.denyUrls)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${getEventDescription(e)}.\nUrl: ${_getEventFilterUrl(e)}`),!0):!_isAllowedUrl(e,t.allowUrls)&&(DEBUG_BUILD$3&&logger.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${getEventDescription(e)}.\nUrl: ${_getEventFilterUrl(e)}`),!0)}function _isIgnoredError(e,t){return!(e.type||!t||!t.length)&&_getPossibleEventMessages(e).some((e=>stringMatchesSomePattern(e,t)))}function _isIgnoredTransaction(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const r=e.transaction;return!!r&&stringMatchesSomePattern(r,t)}function _isDeniedUrl(e,t){if(!t||!t.length)return!1;const r=_getEventFilterUrl(e);return!!r&&stringMatchesSomePattern(r,t)}function _isAllowedUrl(e,t){if(!t||!t.length)return!0;const r=_getEventFilterUrl(e);return!r||stringMatchesSomePattern(r,t)}function _getPossibleEventMessages(e){const t=[];let r;e.message&&t.push(e.message);try{r=e.exception.values[e.exception.values.length-1]}catch(e){}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function _isSentryError(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}function _getLastValidUrl(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&"<anonymous>"!==r.filename&&"[native code]"!==r.filename)return r.filename||null}return null}function _getEventFilterUrl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?_getLastValidUrl(t):null}catch(t){return DEBUG_BUILD$3&&logger.error(`Cannot extract url for event ${getEventDescription(e)}`),null}}function _isUselessError(e){return!e.type&&(!(!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))))}function applyAggregateErrorsToEvent(e,t,r=250,n,a,i,s){if(!(i.exception&&i.exception.values&&s&&isInstanceOf(s.originalException,Error)))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=truncateAggregateExceptions(aggregateExceptionsFromError(e,t,a,s.originalException,n,i.exception.values,o,0),r))}function aggregateExceptionsFromError(e,t,r,n,a,i,s,o){if(i.length>=r+1)return i;let l=[...i];if(isInstanceOf(n[a],Error)){applyExceptionGroupFieldsForParentException(s,o);const i=e(t,n[a]),c=l.length;applyExceptionGroupFieldsForChildException(i,a,c,o),l=aggregateExceptionsFromError(e,t,r,n[a],a,[i,...l],i,c)}return Array.isArray(n.errors)&&n.errors.forEach(((n,i)=>{if(isInstanceOf(n,Error)){applyExceptionGroupFieldsForParentException(s,o);const c=e(t,n),h=l.length;applyExceptionGroupFieldsForChildException(c,`errors[${i}]`,h,o),l=aggregateExceptionsFromError(e,t,r,n,a,[c,...l],c,h)}})),l}function applyExceptionGroupFieldsForParentException(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function applyExceptionGroupFieldsForChildException(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function truncateAggregateExceptions(e,t){return e.map((e=>(e.value&&(e.value=truncate(e.value,t)),e)))}function parseUrl$1(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function addConsoleInstrumentationHandler(e){const t="console";addHandler(t,e),maybeInstrument(t,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach((function(e){e in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,e,(function(t){return originalConsoleMethods[e]=t,function(...t){triggerHandlers("console",{args:t,level:e});const r=originalConsoleMethods[e];r&&r.apply(GLOBAL_OBJ.console,t)}}))}))}function severityLevelFromString(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let e;return{name:INTEGRATION_NAME$4,processEvent(t){if(t.type)return t;try{if(_shouldDropEvent(t,e))return DEBUG_BUILD$3&&logger.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}},dedupeIntegration=defineIntegration(_dedupeIntegration);function _shouldDropEvent(e,t){return!!t&&(!!_isSameMessageEvent(e,t)||!!_isSameExceptionEvent(e,t))}function _isSameMessageEvent(e,t){const r=e.message,n=t.message;return!(!r&&!n)&&(!(r&&!n||!r&&n)&&(r===n&&(!!_isSameFingerprint(e,t)&&!!_isSameStacktrace(e,t))))}function _isSameExceptionEvent(e,t){const r=_getExceptionFromEvent(t),n=_getExceptionFromEvent(e);return!(!r||!n)&&(r.type===n.type&&r.value===n.value&&(!!_isSameFingerprint(e,t)&&!!_isSameStacktrace(e,t)))}function _isSameStacktrace(e,t){let r=getFramesFromEvent(e),n=getFramesFromEvent(t);if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],a=r[e];if(t.filename!==a.filename||t.lineno!==a.lineno||t.colno!==a.colno||t.function!==a.function)return!1}return!0}function _isSameFingerprint(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;try{return!(r.join("")!==n.join(""))}catch(e){return!1}}function _getExceptionFromEvent(e){return e.exception&&e.exception.values&&e.exception.values[0]}function getBreadcrumbLogLevelFromHttpStatusCode(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const WINDOW$3=GLOBAL_OBJ;function supportsFetch(){if(!("fetch"in WINDOW$3))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function isNativeFunction(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function supportsNativeFetch(){if("string"==typeof EdgeRuntime)return!0;if(!supportsFetch())return!1;if(isNativeFunction(WINDOW$3.fetch))return!0;let e=!1;const t=WINDOW$3.document;if(t&&"function"==typeof t.createElement)try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=isNativeFunction(r.contentWindow.fetch)),t.head.removeChild(r)}catch(e){DEBUG_BUILD$2&&logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function addFetchInstrumentationHandler(e,t){const r="fetch";addHandler(r,e),maybeInstrument(r,(()=>instrumentFetch(void 0,t)))}function instrumentFetch(e,t=!1){t&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",(function(e){return function(...t){const r=new Error,{method:n,url:a}=parseFetchArgs(t),i={args:t,fetchData:{method:n,url:a},startTimestamp:1e3*timestampInSeconds(),virtualError:r};return triggerHandlers("fetch",{...i}),e.apply(GLOBAL_OBJ,t).then((async e=>(triggerHandlers("fetch",{...i,endTimestamp:1e3*timestampInSeconds(),response:e}),e)),(e=>{throw triggerHandlers("fetch",{...i,endTimestamp:1e3*timestampInSeconds(),error:e}),isError(e)&&void 0===e.stack&&(e.stack=r.stack,addNonEnumerableProperty(e,"framesToPop",1)),e}))}}))}function hasProp(e,t){return!!e&&"object"==typeof e&&!!e[t]}function getUrlFromResource(e){return"string"==typeof e?e:e?hasProp(e,"url")?e.url:e.toString?e.toString():"":""}function parseFetchArgs(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,r]=e;return{url:getUrlFromResource(t),method:hasProp(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:getUrlFromResource(t),method:hasProp(t,"method")?String(t.method).toUpperCase():"GET"}}function getSDKSource(){return"npm"}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){const e=WINDOW$2.chrome,t=e&&e.app&&e.app.runtime,r="history"in WINDOW$2&&!!WINDOW$2.history.pushState&&!!WINDOW$2.history.replaceState;return!t&&r}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout((()=>{ignoreOnError--}))}function wrap(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(getOriginalFunction(e))return e}catch(t){return e}const r=function(...r){try{const n=r.map((e=>wrap(e,t)));return e.apply(this,n)}catch(e){throw ignoreNextOnError(),withScope((n=>{n.addEventProcessor((e=>(t.mechanism&&(addExceptionTypeValue(e,void 0),addExceptionMechanism(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),captureException(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}markFunctionWrapped(r,e),addNonEnumerableProperty(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}const DEBUG_BUILD$1="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function exceptionFromError(e,t){const r=parseStackFrames(e,t),n={type:extractType(t),value:extractMessage(t)};return r.length&&(n.stacktrace={frames:r}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function eventFromPlainObject(e,t,r,n){const a=getClient(),i=a&&a.getOptions().normalizeDepth,s=getErrorPropertyFromObject(t),o={__serialized__:normalizeToSize(t,i)};if(s)return{exception:{values:[exceptionFromError(e,s)]},extra:o};const l={exception:{values:[{type:isEvent(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(t,{isUnhandledRejection:n})}]},extra:o};if(r){const t=parseStackFrames(e,r);t.length&&(l.exception.values[0].stacktrace={frames:t})}return l}function eventFromError(e,t){return{exception:{values:[exceptionFromError(e,t)]}}}function parseStackFrames(e,t){const r=t.stacktrace||t.stack||"",n=getSkipFirstStackStringLines(t),a=getPopFirstTopFrames(t);try{return e(r,n,a)}catch(e){}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(e){return e&&reactMinifiedRegexp.test(e.message)?1:0}function getPopFirstTopFrames(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function isWebAssemblyException(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function extractType(e){const t=e&&e.name;if(!t&&isWebAssemblyException(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function extractMessage(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:isWebAssemblyException(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function eventFromException(e,t,r,n){const a=eventFromUnknownInput(e,t,r&&r.syntheticException||void 0,n);return addExceptionMechanism(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id),resolvedSyncPromise(a)}function eventFromMessage(e,t,r="info",n,a){const i=eventFromString(e,t,n&&n.syntheticException||void 0,a);return i.level=r,n&&n.event_id&&(i.event_id=n.event_id),resolvedSyncPromise(i)}function eventFromUnknownInput(e,t,r,n,a){let i;if(isErrorEvent$1(t)&&t.error){return eventFromError(e,t.error)}if(isDOMError(t)||isDOMException(t)){const a=t;if("stack"in t)i=eventFromError(e,t);else{const t=a.name||(isDOMError(a)?"DOMError":"DOMException"),s=a.message?`${t}: ${a.message}`:t;i=eventFromString(e,s,r,n),addExceptionTypeValue(i,s)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}if(isError(t))return eventFromError(e,t);if(isPlainObject(t)||isEvent(t)){return i=eventFromPlainObject(e,t,r,a),addExceptionMechanism(i,{synthetic:!0}),i}return i=eventFromString(e,t,r,n),addExceptionTypeValue(i,`${t}`),addExceptionMechanism(i,{synthetic:!0}),i}function eventFromString(e,t,r,n){const a={};if(n&&r){const n=parseStackFrames(e,r);n.length&&(a.exception={values:[{value:t,stacktrace:{frames:n}}]}),addExceptionMechanism(a,{synthetic:!0})}if(isParameterizedString(t)){const{__sentry_template_string__:e,__sentry_template_values__:r}=t;return a.logentry={message:e,params:r},a}return a.message=t,a}function getNonErrorObjectExceptionValue(e,{isUnhandledRejection:t}){const r=extractExceptionKeysForMessage(e),n=t?"promise rejection":"exception";if(isErrorEvent$1(e))return`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``;if(isEvent(e)){return`Event \`${getObjectClassName(e)}\` (type=${e.type}) captured as ${n}`}return`Object captured as ${n} with keys: ${r}`}function getObjectClassName(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}function getErrorPropertyFromObject(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function createUserFeedbackEnvelope(e,{metadata:t,tunnel:r,dsn:n}){return createEnvelope({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:dsnToString(n)}},[createUserFeedbackEnvelopeItem(e)])}function createUserFeedbackEnvelopeItem(e){return[{type:"user_report"},e]}class BrowserClient extends BaseClient{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};applySdkMetadata(t,"browser",["browser"],WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource()),super(t),t.sendClientReports&&WINDOW$1.document&&WINDOW$1.document.addEventListener("visibilitychange",(()=>{"hidden"===WINDOW$1.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return eventFromException(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return eventFromMessage(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(DEBUG_BUILD$1&&logger.warn("SDK not enabled, will not capture user feedback."));const t=createUserFeedbackEnvelope(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}}const DEBUG_BUILD="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId,lastHref;function addClickKeypressInstrumentationHandler(e){addHandler("dom",e),maybeInstrument("dom",instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const e=triggerHandlers.bind(null,"dom"),t=makeDOMEventHandler(e,!0);WINDOW.document.addEventListener("click",t,!1),WINDOW.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const r=WINDOW[t],n=r&&r.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(fill(n,"addEventListener",(function(t){return function(r,n,a){if("click"===r||"keypress"==r)try{const n=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=n[r]=n[r]||{refCount:0};if(!i.handler){const n=makeDOMEventHandler(e);i.handler=n,t.call(this,r,n,a)}i.refCount++}catch(e){}return t.call(this,r,n,a)}})),fill(n,"removeEventListener",(function(e){return function(t,r,n){if("click"===t||"keypress"==t)try{const r=this.__sentry_instrumentation_handlers__||{},a=r[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,n),a.handler=void 0,delete r[t]),0===Object.keys(r).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,r,n)}})))}))}function isSimilarToLastCapturedEvent(e){if(e.type!==lastCapturedEventType)return!1;try{if(!e.target||e.target._sentryId!==lastCapturedEventTargetId)return!1}catch(e){}return!0}function shouldSkipDOMEvent(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}function makeDOMEventHandler(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=getEventTarget(r);if(shouldSkipDOMEvent(r.type,n))return;addNonEnumerableProperty(r,"_sentryCaptured",!0),n&&!n._sentryId&&addNonEnumerableProperty(n,"_sentryId",uuid4());const a="keypress"===r.type?"input":r.type;if(!isSimilarToLastCapturedEvent(r)){e({event:r,name:a,global:t}),lastCapturedEventType=r.type,lastCapturedEventTargetId=n?n._sentryId:void 0}clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout((()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0}),DEBOUNCE_DURATION)}}function getEventTarget(e){try{return e.target}catch(e){return null}}function addHistoryInstrumentationHandler(e){const t="history";addHandler(t,e),maybeInstrument(t,instrumentHistory)}function instrumentHistory(){if(!supportsHistory())return;const e=WINDOW.onpopstate;function t(e){return function(...t){const r=t.length>2?t[2]:void 0;if(r){const e=lastHref,t=String(r);lastHref=t;triggerHandlers("history",{from:e,to:t})}return e.apply(this,t)}}WINDOW.onpopstate=function(...t){const r=WINDOW.location.href,n=lastHref;lastHref=r;if(triggerHandlers("history",{from:n,to:r}),e)try{return e.apply(this,t)}catch(e){}},fill(WINDOW.history,"pushState",t),fill(WINDOW.history,"replaceState",t)}const cachedImplementations={};function getNativeImplementation(e){const t=cachedImplementations[e];if(t)return t;let r=WINDOW[e];if(isNativeFunction(r))return cachedImplementations[e]=r.bind(WINDOW);const n=WINDOW.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(t)}catch(t){DEBUG_BUILD&&logger.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return r?cachedImplementations[e]=r.bind(WINDOW):r}function clearCachedImplementation(e){cachedImplementations[e]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(e){addHandler("xhr",e),maybeInstrument("xhr",instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,r){const n=new Error,a=1e3*timestampInSeconds(),i=isString(r[0])?r[0].toUpperCase():void 0,s=parseUrl(r[1]);if(!i||!s)return e.apply(t,r);t[SENTRY_XHR_DATA_KEY]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const o=()=>{const e=t[SENTRY_XHR_DATA_KEY];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}triggerHandlers("xhr",{endTimestamp:1e3*timestampInSeconds(),startTimestamp:a,xhr:t,virtualError:n})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,r)=>(o(),e.apply(t,r))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,r){const[n,a]=r,i=t[SENTRY_XHR_DATA_KEY];return i&&isString(n)&&isString(a)&&(i.request_headers[n.toLowerCase()]=a),e.apply(t,r)}}),e.apply(t,r)}}),e.send=new Proxy(e.send,{apply(e,t,r){const n=t[SENTRY_XHR_DATA_KEY];if(!n)return e.apply(t,r);void 0!==r[0]&&(n.body=r[0]);return triggerHandlers("xhr",{startTimestamp:1e3*timestampInSeconds(),xhr:t}),e.apply(t,r)}})}function parseUrl(e){if(isString(e))return e;try{return e.toString()}catch(e){}}function makeFetchTransport(e,t=getNativeImplementation("fetch")){let r=0,n=0;return createTransport(e,(function(a){const i=a.body.length;r+=i,n++;const s={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return clearCachedImplementation("fetch"),rejectedSyncPromise("No fetch implementation available");try{return t(e.url,s).then((e=>(r-=i,n--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return clearCachedImplementation("fetch"),r-=i,n--,rejectedSyncPromise(e)}}))}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(e,t,r,n){const a={filename:e,function:"<anonymous>"===t?UNKNOWN_FUNCTION:t,in_app:!0};return void 0!==r&&(a.lineno=r),void 0!==n&&(a.colno=n),a}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeStackParserFn=e=>{const t=chromeRegexNoFnName.exec(e);if(t){const[,e,r,n]=t;return createFrame(e,UNKNOWN_FUNCTION,+r,+n)}const r=chromeRegex.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){const e=chromeEvalRegex.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=extractSafariExtensionDetails(r[1]||UNKNOWN_FUNCTION,r[2]);return createFrame(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=e=>{const t=geckoREgex.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=geckoEvalRegex.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],r=t[1]||UNKNOWN_FUNCTION;return[r,e]=extractSafariExtensionDetails(r,e),createFrame(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(e,t)=>{const r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:UNKNOWN_FUNCTION,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:INTEGRATION_NAME$3,setup(e){t.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(e)),t.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(e,t.dom)),t.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(e)),t.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(e)),t.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(e)),t.sentry&&e.on("beforeSendEvent",_getSentryBreadcrumbHandler(e))}}},breadcrumbsIntegration=defineIntegration(_breadcrumbsIntegration);function _getSentryBreadcrumbHandler(e){return function(t){getClient()===e&&addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:getEventDescription(t)},{event:t})}}function _getDomBreadcrumbHandler(e,t){return function(r){if(getClient()!==e)return;let n,a,i="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD$1&&logger.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${s} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),s=MAX_ALLOWED_STRING_LENGTH),"string"==typeof i&&(i=[i]);try{const e=r.event,t=_isEvent(e)?e.target:e;n=htmlTreeAsString(t,{keyAttrs:i,maxStringLength:s}),a=getComponentName(t)}catch(e){n="<unknown>"}if(0===n.length)return;const o={category:`ui.${r.name}`,message:n};a&&(o.data={"ui.component_name":a}),addBreadcrumb(o,{event:r.event,name:r.name,global:r.global})}}function _getConsoleBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;const r={category:"console",data:{arguments:t.args,logger:"console"},level:severityLevelFromString(t.level),message:safeJoin(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${safeJoin(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}addBreadcrumb(r,{input:t.args,level:t.level})}}function _getXhrBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;const{startTimestamp:r,endTimestamp:n}=t,a=t.xhr[SENTRY_XHR_DATA_KEY];if(!r||!n||!a)return;const{method:i,url:s,status_code:o,body:l}=a,c={method:i,url:s,status_code:o},h={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n};addBreadcrumb({category:"xhr",data:c,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(o)},h)}}function _getFetchBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;const{startTimestamp:r,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:r,endTimestamp:n})}else{const e=t.response,a={...t.fetchData,status_code:e&&e.status},i={input:t.args,response:e,startTimestamp:r,endTimestamp:n};addBreadcrumb({category:"fetch",data:a,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(a.status_code)},i)}}}function _getHistoryBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;let r=t.from,n=t.to;const a=parseUrl$1(WINDOW$1.location.href);let i=r?parseUrl$1(r):void 0;const s=parseUrl$1(n);i&&i.path||(i=a),a.protocol===s.protocol&&a.host===s.host&&(n=s.relative),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),addBreadcrumb({category:"navigation",data:{from:r,to:n}})}}function _isEvent(e){return!!e&&!!e.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:INTEGRATION_NAME$2,setupOnce(){t.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),t.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),t.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),t.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const e=t.eventTarget;if(e){(Array.isArray(e)?e:DEFAULT_EVENT_TARGET).forEach(_wrapEventTarget)}}}},browserApiErrorsIntegration=defineIntegration(_browserApiErrorsIntegration);function _wrapTimeFunction(e){return function(...t){const r=t[0];return t[0]=wrap(r,{mechanism:{data:{function:getFunctionName(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function _wrapRAF(e){return function(t){return e.apply(this,[wrap(t,{mechanism:{data:{function:"requestAnimationFrame",handler:getFunctionName(e)},handled:!1,type:"instrument"}})])}}function _wrapXHR(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in r&&"function"==typeof r[e]&&fill(r,e,(function(t){const r={mechanism:{data:{function:e,handler:getFunctionName(t)},handled:!1,type:"instrument"}},n=getOriginalFunction(t);return n&&(r.mechanism.data.handler=getFunctionName(n)),wrap(t,r)}))})),e.apply(this,t)}}function _wrapEventTarget(e){const t=WINDOW$1[e],r=t&&t.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(fill(r,"addEventListener",(function(t){return function(r,n,a){try{isEventListenerObject(n)&&(n.handleEvent=wrap(n.handleEvent,{mechanism:{data:{function:"handleEvent",handler:getFunctionName(n),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[r,wrap(n,{mechanism:{data:{function:"addEventListener",handler:getFunctionName(n),target:e},handled:!1,type:"instrument"}}),a])}})),fill(r,"removeEventListener",(function(e){return function(t,r,n){try{const a=r.__sentry_wrapped__;a&&e.call(this,t,a,n)}catch(e){}return e.call(this,t,r,n)}})))}function isEventListenerObject(e){return"function"==typeof e.handleEvent}const browserSessionIntegration=defineIntegration((()=>({name:"BrowserSession",setupOnce(){void 0!==WINDOW$1.document?(startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler((({from:e,to:t})=>{void 0!==e&&e!==t&&(startSession({ignoreDuration:!0}),captureSession())}))):DEBUG_BUILD$1&&logger.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}))),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(_installGlobalOnErrorHandler(e),globalHandlerLog("onerror")),t.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(e),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=defineIntegration(_globalHandlersIntegration);function _installGlobalOnErrorHandler(e){addGlobalErrorInstrumentationHandler((t=>{const{stackParser:r,attachStacktrace:n}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const{msg:a,url:i,line:s,column:o,error:l}=t,c=_enhanceEventWithInitialFrame(eventFromUnknownInput(r,l||a,void 0,n,!1),i,s,o);c.level="error",captureEvent(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}function _installGlobalOnUnhandledRejectionHandler(e){addGlobalUnhandledRejectionInstrumentationHandler((t=>{const{stackParser:r,attachStacktrace:n}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const a=_getUnhandledRejectionError(t),i=isPrimitive(a)?_eventFromRejectionWithPrimitive(a):eventFromUnknownInput(r,a,void 0,n,!0);i.level="error",captureEvent(i,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function _getUnhandledRejectionError(e){if(isPrimitive(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}function _eventFromRejectionWithPrimitive(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function _enhanceEventWithInitialFrame(e,t,r,n){const a=e.exception=e.exception||{},i=a.values=a.values||[],s=i[0]=i[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[],c=n,h=r,p=isString(t)&&t.length>0?t:getLocationHref();return 0===l.length&&l.push({colno:c,filename:p,function:UNKNOWN_FUNCTION,in_app:!0,lineno:h}),e}function globalHandlerLog(e){DEBUG_BUILD$1&&logger.log(`Global Handler attached: ${e}`)}function getOptions(){const e=getClient();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const httpContextIntegration=defineIntegration((()=>({name:"HttpContext",preprocessEvent(e){if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const t=e.request&&e.request.url||WINDOW$1.location&&WINDOW$1.location.href,{referrer:r}=WINDOW$1.document||{},{userAgent:n}=WINDOW$1.navigator||{},a={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},i={...e.request,...t&&{url:t},headers:a};e.request=i}}))),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(e={})=>{const t=e.limit||DEFAULT_LIMIT,r=e.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(e,n,a){const i=a.getOptions();applyAggregateErrorsToEvent(exceptionFromError,i.stackParser,i.maxValueLength,r,t,e,n)}}},linkedErrorsIntegration=defineIntegration(_linkedErrorsIntegration);function getDefaultIntegrations(e){const t=[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration()];return!1!==e.autoSessionTracking&&t.push(browserSessionIntegration()),t}function applyDefaultOptions(e={}){const t={defaultIntegrations:getDefaultIntegrations(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:WINDOW$1.SENTRY_RELEASE&&WINDOW$1.SENTRY_RELEASE.id?WINDOW$1.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function shouldShowBrowserExtensionError(){const e=void 0!==WINDOW$1.window&&WINDOW$1;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],r=t&&t.runtime&&t.runtime.id,n=WINDOW$1.location&&WINDOW$1.location.href||"",a=!!r&&WINDOW$1===WINDOW$1.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>n.startsWith(`${e}//`))),i=void 0!==e.nw;return!!r&&!a&&!i}function init(e={}){const t=applyDefaultOptions(e);if(!t.skipBrowserExtensionCheck&&shouldShowBrowserExtensionError())return void consoleSandbox((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));DEBUG_BUILD$1&&(supportsFetch()||logger.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:stackParserFromStackParserOptions(t.stackParser||defaultStackParser),integrations:getIntegrationsToSetup(t),transport:t.transport||makeFetchTransport};return initAndBind(BrowserClient,r)}class SentryManager{constructor(){this.isInitialized=!1}static getInstance(){return SentryManager.instance||(SentryManager.instance=new SentryManager),SentryManager.instance}initialize(){if(this.isInitialized)return;const e=environmentManager.getEnvironment()||"production";if(!(e===ENVIRONMENTS.PRODUCTION||e===ENVIRONMENTS.STAGING))return;init({dsn:"https://8e000dda9faf4372bd40163105017f8a@o74188.ingest.us.sentry.io/4510466352742400",environment:e,sampleRate:.1}),this.isInitialized=!0}isEnabled(){return this.isInitialized}captureError(e){this.isInitialized&&captureException(e)}captureMessage(e,t="info"){this.isInitialized&&captureMessage(e,t)}}const sentryManager=SentryManager.getInstance(),SDK_PREFIX="[Qonto Embed SDK]";function isDebugEnabled(){return operationSettingsManager.getDebugMode()}function info(e,t){if(!isDebugEnabled())return;const r=void 0!==t?[SDK_PREFIX,e,t]:[SDK_PREFIX,e];console.log(...r)}function initialize$1(e){const{accessToken:t,stagingToken:r,operationSettings:n,environment:a,branch:i,locale:s}=validateInitializeParams(e);t&&authManager.setAccessToken(t),r&&authManager.setStagingToken(r),s&&localeManager.setLocale(s),n&&operationSettingsManager.setSettings(n),a&&(environmentManager.setEnvironment(a),i&&environmentManager.setBranch(i)),sentryManager.initialize(),info("SDK initialized successfully",{environment:a,locale:s,debugMode:n?.debugMode})}function logout$1(){authManager.clearAccessToken(),authManager.clearStagingToken(),localeManager.setDefaultLocale(),operationSettingsManager.clearSettings()}const common={initialize:initialize$1,logout:logout$1,constants:constants$1},{initialize:initialize,logout:logout,constants:constants}=common;class EmbedApiError extends QontoEmbedSdkError{constructor({message:e,data:t,code:r}){super(),this.code=500;const n=Array.isArray(e)?e.join("\n"):e;this.name="EmbedApiError",this.message=`The call to the Embed API failed with the following errors:\n${n}`,this.data=t||{},this.code=r||this.code}}function isRunningInBrowser(){return"undefined"!=typeof window&&"undefined"!=typeof document}function isRunningInServer(){return!isRunningInBrowser()}function base64Encode(e){return isRunningInServer()?Buffer.from(e).toString("base64"):btoa(e)}function base64Decode(e){return isRunningInServer()?Buffer.from(e,"base64").toString("utf-8"):atob(e)}function buildRequestHeaders({accessToken:e,stagingToken:t,idempotencyKey:r,mfaPreference:n,scaSessionToken:a}){const i=new Headers;i.append("Authorization",`Bearer ${e}`);const s=t||authManager.getStagingToken();s&&i.append("X-Qonto-Staging-Token",s),r&&i.append("X-Qonto-Idempotency-Key",r);const o=n||operationSettingsManager.getMFAPreference();return o&&i.append("X-Qonto-2fa-Preference",o),a&&i.append("X-Qonto-SCA-Session-Token",a),i.append("Content-Type","application/json"),i.append("Accept-Language",localeManager.getLocale()),i}async function makeNetworkCall({path:e,options:t}){const r=`${environmentManager.getEnvironmentUrls().THIRD_PARTY_API_URL}${e}`,n=await fetch(r,{...t,headers:buildRequestHeaders(t.headers),body:t.body?JSON.stringify(t.body):void 0});if(204===n.status)return;const a=await n.json();if(!n.ok)throw a.errors?new EmbedApiError({code:n.status,message:a.errors.map((e=>`${e.code}: ${e.detail}`))}):new EmbedApiError({code:n.status,message:`${a.code}: ${a.detail}`,data:a});return a}function encodeNetworkCall(e){const t={method:e.options.method,headers:e.options.headers,path:e.path,payload:e.options?.body};return base64Encode(JSON.stringify(t))}function decodeNetworkResponse(e){return JSON.parse(base64Decode(e))}function prepareAuthLinkRequest({accessToken:e,stagingToken:t,action:r,callbackUrl:n}){const a={post_authn_action:r};return n&&(a.callback_url=n),{path:"/v1/embed_auth_links",options:{method:"POST",headers:{accessToken:e,stagingToken:t},body:{embed_auth_link:a}}}}async function requestAuthLink(e){const t=prepareAuthLinkRequest({accessToken:e.accessToken,stagingToken:e.stagingToken,action:e.action,callbackUrl:e.callbackUrl}),{embed_auth_link:r}=await makeNetworkCall(t);return{url:r.url,post_authn_action:r.post_authn_action,callback_url:r.callback_url,expired_at:r.expired_at,used_at:r.used_at}}function prepareGetCardsCall({membershipId:e,accessToken:t,stagingToken:r}){return{path:e?`/v2/cards?holder_ids[]=${e}`:"/v2/cards",options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getCards$1({membershipId:e,accessToken:t,stagingToken:r}){const n=prepareGetCardsCall({membershipId:e,accessToken:t,stagingToken:r}),{cards:a}=await makeNetworkCall(n);return a}function prepareGetCardCall({cardId:e,accessToken:t,stagingToken:r}){return{path:`/v2/cards?ids[]=${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getCard$1({cardId:e,accessToken:t,stagingToken:r}){const n=prepareGetCardCall({cardId:e,accessToken:t,stagingToken:r}),{cards:a}=await makeNetworkCall(n);return a[0]}function prepareGetCardIframeUrl({accessToken:e,stagingToken:t}){return prepareAuthLinkRequest({accessToken:e,stagingToken:t,action:AUTH_LINK_ACTIONS.CARD_DISPLAY})}async function getCardIframeURL(e){const t=prepareGetCardIframeUrl(e),{embed_auth_link:r}=await makeNetworkCall(t);return r}var CardStatus;!function(e){e.PENDING="pending",e.ONHOLD="onhold",e.ORDER_CANCELED="order_canceled",e.LIVE="live",e.PAUSED="paused",e.STOLEN="stolen",e.LOST="lost",e.PIN_BLOCKED="pin_blocked",e.DELETED="deleted",e.PRE_EXPIRED="pre_expired",e.EXPIRED="expired",e.DISCARDED="discarded",e.SHIPPED_LOST="shipped_lost",e.ABUSIVE="abusive"}(CardStatus||(CardStatus={}));const CardCategories={TRANSPORT:"transport",RESTAURANT_AND_BAR:"restaurant_and_bar",FOOD_AND_GROCERY:"food_and_grocery",IT_AND_ELECTRONICS:"it_and_electronics",UTILITY:"utility",TAX:"tax",LEGAL_AND_ACCOUNTING:"legal_and_accounting",ATM:"atm",OFFICE_SUPPLY:"office_supply",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",FINANCE:"finance"};var VirtualCardLevel,PhysicalCardLevel;function validatePresenceOfRequiredParams(e,t){const r=t.filter((t=>t.requiredIfPresent?!e[t.name]&&e[t.requiredIfPresent]:void 0===e[t.name])).map((e=>e.name));if(r.length>0)throw new InvalidParametersError(r.map((e=>`Missing required parameter: ${e}`)))}function validateExpectedStringValues(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"string"!=typeof e)).map((([e])=>`${e} must be a string`))}function validateExpectedBooleanValues(e){return Object.entries(e).filter((([,e])=>void 0!==e&&!1!==e&&!0!==e)).map((([e])=>`${e} must be a boolean`))}function validateExpectedNumericValues(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"number"!=typeof e)).map((([e])=>`${e} must be a number`))}!function(e){e.VIRTUAL="virtual"}(VirtualCardLevel||(VirtualCardLevel={})),function(e){e.METAL="metal",e.PLUS="plus",e.STANDARD="standard"}(PhysicalCardLevel||(PhysicalCardLevel={}));const requiredVirtualCardOrderParams=[{name:"organizationId"},{name:"membershipId"},{name:"bankAccountId"},{name:"monthlyLimit"},{name:"cardLevel"}],requiredPhysicalCardOrderParams=[...requiredVirtualCardOrderParams,{name:"atmDailyLimit",requiredIfPresent:"hasAtmDailyLimit"},{name:"hasAtmDailyLimit",requiredIfPresent:"hasAtmOption"},{name:"atmMonthlyLimit",requiredIfPresent:"hasAtmOption"},{name:"shipToBusiness"},{name:"cardLevel"}];function validateOrderCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");return"virtual"===e.cardLevel?validateOrderVirtualCardParams(e):validateOrderPhysicalCardParams(e)}function validateUnlockCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");if(!e.cardId)throw new InvalidParametersError("cardId is required for the called function");const t=validateExpectedStringValues({cardId:e.cardId});if(t.length>0)throw new InvalidParametersError(t)}function validateOrderVirtualCardParams(e){return validatePresenceOfRequiredParams(e,requiredVirtualCardOrderParams),validateOrderVirtualCardParamsType(e),e}function validateOrderVirtualCardParamsType(e){const{membershipId:t,organizationId:r,bankAccountId:n,hasDailyLimit:a,hasTransactionLimit:i,monthlyLimit:s,dailyLimit:o,transactionLimit:l,activeDays:c,categories:h,cardLevel:p}=e,d=[...validateVirtualCardLevel(p),...validateExpectedStringValues({membershipId:t,organizationId:r,bankAccountId:n}),...validateExpectedBooleanValues({hasDailyLimit:a,hasTransactionLimit:i}),...validateExpectedNumericValues({monthlyLimit:s,dailyLimit:o,transactionLimit:l}),...validateActiveDays(c),...validateCategories(h)];if(d.length>0)throw new InvalidParametersError(d)}function validateOrderPhysicalCardParams(e){validatePresenceOfRequiredParams(e,requiredPhysicalCardOrderParams),validateOrderPhysicalCardParamsType(e)}function validateOrderPhysicalCardParamsType(e){const{membershipId:t,organizationId:r,bankAccountId:n,hasDailyLimit:a,hasTransactionLimit:i,monthlyLimit:s,dailyLimit:o,transactionLimit:l,activeDays:c,categories:h,cardLevel:p,hasNfcOption:d,hasForeignPaymentOption:f,hasOnlinePaymentOption:u,shipToBusiness:m,hasAtmOption:g,hasAtmDailyLimit:y,atmDailyLimit:v,atmMonthlyLimit:b,address:E,cardDesign:S,typeOfPrint:_}=e,T=validatePhysicalCardLevel(p),k=validateTypeOfPrint(_),x=[...T,...validateExpectedStringValues({membershipId:t,organizationId:r,bankAccountId:n}),...validateExpectedBooleanValues({hasDailyLimit:a,hasTransactionLimit:i,hasAtmOption:g,hasNfcOption:d,hasForeignPaymentOption:f,hasOnlinePaymentOption:u,hasAtmDailyLimit:y,shipToBusiness:m}),...validateExpectedNumericValues({monthlyLimit:s,dailyLimit:o,transactionLimit:l,atmDailyLimit:v,atmMonthlyLimit:b}),...validateActiveDays(c),...validateCategories(h),...k,...validateCardDesign(S),...validateAddress(E,m)];if(x.length>0)throw new InvalidParametersError(x)}function validateActiveDays(e){const t=!Array.isArray(e)||!e.every((e=>Number.isInteger(e)&&e>0&&e<8));return void 0!==e&&t?["activeDays must be an array of integers between 1 and 7"]:[]}function validateCategories(e){const t=!Array.isArray(e)||e.some((e=>"string"!=typeof e));return void 0!==e&&t?["categories must be an array of strings"]:[]}function validateCardDesign(e){return["undefined","string"].includes(typeof e)?[]:["cardDesign must be a string"]}function validateTypeOfPrint(e){const t=null!=e&&"string"!=typeof e,r=!["print","embossed",void 0,null].includes(e);return t||r?['typeOfPrint must be one of "print", "embossed" or null']:[]}function validatePhysicalCardLevel(e){return Object.values(PhysicalCardLevel).includes(e)?[]:['cardLevel must be one of "standard", "plus", "metal"']}function validateVirtualCardLevel(e){return"virtual"!==e?['cardLevel must be "virtual"']:[]}function validateAddress(e,t){return t||!e||e.contactName&&e.firstLine&&e.zipCode&&e.city&&e.country?[]:["address must contain at least contactName, firstLine, zipCode, city and country properties"]}function validateDisplayCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");if(!e.cardId)throw new InvalidParametersError("cardId is required for the called function");const t=validateExpectedStringValues({cardId:e.cardId});if(t.length>0)throw new InvalidParametersError(t);let r={};void 0!==e.allowPinReveal&&(r={allowPinReveal:e.allowPinReveal}),void 0!==e.allowBlocking&&(r={...r,allowBlocking:e.allowBlocking});const n=validateExpectedBooleanValues(r);if(n.length>0)throw new InvalidParametersError(n);return e}function validateGetCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");if(!e.cardId)throw new InvalidParametersError("cardId parameter is required for the called function");const t=validateExpectedStringValues({cardId:e.cardId});if(t.length>0)throw new InvalidParametersError(t);return e}class EmbedOperationError extends QontoEmbedSdkError{constructor(e){super(),this.name="EmbedOperationError",this.message=e}}const byteToHex=[];for(let e=0;e<256;++e)byteToHex.push((e+256).toString(16).slice(1));function unsafeStringify(e,t=0){return(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var native={randomUUID:randomUUID};function v4(e,t,r){if(native.randomUUID&&!e)return native.randomUUID();const n=(e=e||{}).random??e.rng?.()??rng();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,unsafeStringify(n)}function buildIframeMessage({actionId:e,actionData:t}){const r=operationSettingsManager.getMFAPreference();return{actionId:e,actionData:{...t,scaPreference:t.scaPreference||r,idempotencyKey:t.idempotencyKey||v4()}}}function getUIParentElement(e){let t=null;if(t="function"==typeof e?e():document.getElementById(e),!(t&&t instanceof HTMLElement))throw new EmbedOperationError(`Could not install the UI Element because the parent element with id ${e} was not found.\nPlease make sure to pass a valid parentElementId or ensure the parentElementId function returns a valid element.`);return t}class EmbedIframe{constructor(e){this.options=e,this.iframe=null,this.parentElement=null,this.messageListeners=new Map,this.defaultTimeout=3e4;const t=new URL(e.iframeUrl);this.targetOrigin=`${t.protocol}//${t.host}`}async initialize(){if(this.iframe)return this;if(this.parentElement=getUIParentElement(this.options.parentElementId),!this.parentElement)throw new EmbedOperationError(`Could not install the authentication UI because the parent element with id ${this.options.parentElementId} was not found.\nPlease make sure to pass a valid parentElementId when calling the method.`);return new Promise(((e,t)=>{this.iframe=document.createElement("iframe"),this.iframe.src=this.options.iframeUrl,this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none";const r=this.options.timeout||this.defaultTimeout,n=setTimeout((()=>{window.removeEventListener("message",a),t(new EmbedOperationError(`Could not install the authentication UI because the timeout of ${r}ms was reached.\nPlease make sure the application can reach the Internet.`))}),r),a=t=>{t.data.eventId===IFRAME_EVENTS.READY&&(clearTimeout(n),window.removeEventListener("message",a),e(this))};window.addEventListener("message",a),this.parentElement?.appendChild(this.iframe)}))}postMessage(e){if(!this.iframe||!this.iframe.contentWindow)return Promise.reject(new EmbedOperationError("Attempted to perform an Embed operation without having the authentication UI initialized."));const t=buildIframeMessage(e);return new Promise(((e,r)=>{const n=a=>{if(a.data?.actionId===t.actionId){if("error"===a.data.status)return this.removeMessageListener(t.actionId,n),r(new EmbedOperationError(`An error occurred when performing the action ${t.actionId}.\n${JSON.stringify(a.data.payload)}`));this.removeMessageListener(t.actionId,n),e(a.data.payload)}};this.addMessageListener(t.actionId,n),this.iframe?.contentWindow?.postMessage(t,this.targetOrigin)}))}addMessageListener(e,t){this.messageListeners.has(e)||this.messageListeners.set(e,[]);this.messageListeners.get(e).push(t),window.addEventListener("message",t)}removeMessageListener(e,t){const r=this.messageListeners.get(e);if(r){const e=r.indexOf(t);-1!==e&&(r.splice(e,1),window.removeEventListener("message",t))}}destroy(){this.messageListeners.forEach((e=>{e.forEach((e=>{window.removeEventListener("message",e)}))})),this.messageListeners.clear(),this.iframe&&this.parentElement&&(this.parentElement.removeChild(this.iframe),this.iframe=null)}}function buildIframeUrl({accessToken:e,stagingToken:t,locale:r,debugMode:n}){const a=n||!1,i=r||localeManager.getLocale(),s=environmentManager.getEnvironmentUrls().EMBED_URL,o=t?`;staging_token=${encodeURIComponent(t)}`:"";return`${s}?debug=${a}&lang=${encodeURIComponent(i)}#access_token=${encodeURIComponent(e)}${o}`}function createIframe({parentElementId:e,iframeUrl:t}){return new EmbedIframe({parentElementId:e,iframeUrl:t}).initialize()}function serializeOrderCardPayload(e){return"virtual"===e.cardLevel?serializeOrderVirtualCardPayload(e):serializeOrderPhysicalCardPayload(e)}function serializeOrderVirtualCardPayload(e){const t=filterValidCategories(e.categories);return{actionId:ACTIONS.CARD_ORDER,actionData:{idempotencyKey:v4(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel}}}}}function serializeOrderPhysicalCardPayload(e){const t=filterValidCategories(e.categories);return{actionId:ACTIONS.CARD_ORDER,actionData:{idempotencyKey:v4(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel,card_design:e.cardDesign,..."plus"===e.cardLevel&&{type_of_print:e.typeOfPrint},ship_to_business_address:e.shipToBusiness,atm_option:e.hasAtmOption,nfc_option:e.hasNfcOption,foreign_option:e.hasForeignPaymentOption,online_option:e.hasOnlinePaymentOption,atm_daily_limit:e.atmDailyLimit,atm_monthly_limit:e.atmMonthlyLimit,...!e.shipToBusiness&&{address:{contact_name:e.address?.contactName,first_line:e.address?.firstLine,second_line:e.address?.secondLine,third_line:e.address?.thirdLine,zipcode:e.address?.zipCode,city:e.address?.city,country:e.address?.country}}}}}}}function serializeCard(e){return{id:e.id,nickname:e.nickname,embossedName:e.embossed_name,status:e.status,maskPan:e.mask_pan,expMonth:parseInt(e.exp_month,10),expYear:parseInt(e.exp_year,10),lastActivityAt:new Date(e.last_activity_at),lastDigits:e.last_digits,shipToBusiness:e.ship_to_business,atmOption:e.atm_option,atmDailyLimitOption:e.atm_daily_limit_option,nfcOption:e.nfc_option,onlineOption:e.online_option,foreignOption:e.foreign_option,atmMonthlyLimit:e.atm_monthly_limit,atmMonthlySpent:e.atm_monthly_spent,atmDailyLimit:e.atm_daily_limit,atmDailySpent:e.atm_daily_spent,paymentMonthlyLimit:e.payment_monthly_limit,paymentMonthlySpent:e.payment_monthly_spent,paymentDailyLimit:e.payment_daily_limit,paymentDailySpent:e.payment_daily_spent,paymentDailyLimitOption:e.payment_daily_limit_option,paymentTransactionLimit:e.payment_transaction_limit,paymentTransactionLimitOption:e.payment_transaction_limit_option,activeDays:e.active_days,holderId:e.holder_id,bankAccountId:e.bank_account_id,organizationId:e.organization_id,updatedAt:new Date(e.updated_at),createdAt:new Date(e.created_at),shippedAt:new Date(e.shipped_at),cardType:e.card_type,cardLevel:e.card_level,paymentLifespanLimit:e.payment_lifespan_limit,paymentLifespanSpent:e.payment_lifespan_spent,preExpiresAt:new Date(e.pre_expires_at),categories:e.categories,renewed:e.renewed,renewal:e.renewal,...e.parent_card_summary&&{parentCardSummary:{id:e.parent_card_summary.id,lastDigits:e.parent_card_summary.last_digits}},hadOperation:e.had_operation,hadPinOperation:e.had_pin_operation,cardDesign:e.card_design,typeOfPrint:e.type_of_print,upsold:e.upsold,upsell:e.upsell,discardOn:new Date(e.discard_on),reordered:e.reordered}}function filterValidCategories(e){const t=Object.values(CardCategories);return(e||[]).filter((e=>t.includes(e)))}function serializeUnlockCardPayload(e){return{actionId:ACTIONS.CARD_UNLOCK,actionData:{body:{cardId:e.cardSettings.cardId}}}}const CUSTOM_PROP_PREFIX="--qonto-embed";function isSameDomain(e){return!e.href||e.href.startsWith(window.location.origin)}function isStyleRule(e){return"CSSStyleRule"===e.constructor.name}function extractVariablesFromStylesheet(e,t){return[...e].filter(isSameDomain).reduce(((e,r)=>[...r.cssRules].filter(isStyleRule).reduce(((e,r)=>{if("style"in r){const n=[...r.style].map((e=>[e.trim(),r.style.getPropertyValue(e).trim()])).filter((([e])=>e.startsWith(t))).reduce(((e,[r,n])=>({...e,[r.replace(`${t}-`,"")]:n})),{});return{...e,...n}}return e}),e)),{})}function gatherQontoEmbedCssVariables(e=CUSTOM_PROP_PREFIX){return isRunningInBrowser()?extractVariablesFromStylesheet(document.styleSheets,e):{}}function getPopulatedIframeURL(e,t){const r=new URL(e);r.searchParams.set("cardId",t.cardId),"boolean"==typeof t.allowPinReveal&&r.searchParams.set("canSeePin",t.allowPinReveal.toString()),"boolean"==typeof t.allowBlocking&&r.searchParams.set("canBlock",t.allowBlocking.toString()),!0===t.debugMode&&r.searchParams.set("debug",t.debugMode.toString());const n=gatherQontoEmbedCssVariables(CUSTOM_PROP_PREFIX);return Object.keys(n).length>0&&r.searchParams.set("customization",JSON.stringify(n)),r.toString()}async function createEmbedUI({decorationParams:e,operationSettings:t,cardIframeUrl:r}){const{cardId:n,allowPinReveal:a,allowBlocking:i}=e,{uiParentElementId:s,debugMode:o}=t,l=getPopulatedIframeURL(r,{cardId:n,allowPinReveal:a,allowBlocking:i,debugMode:o}),c=await createIframe({iframeUrl:l,parentElementId:s});return{destroyEmbedUI:()=>{c.destroy()}}}async function getCards(e){try{const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new InvalidParametersError("membershipId must be a string");const{proxyRequestFunction:r,stagingToken:n}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetCardsCall({membershipId:t,stagingToken:n})),a=await r(e);return decodeNetworkResponse(a).body.cards.map((e=>serializeCard(e)))}{const r=e?.operationSettings?.accessToken||validatePresenceOfAuthToken();return(await getCards$1({membershipId:t,accessToken:r,stagingToken:n})).map((e=>serializeCard(e)))}}catch(e){return Promise.reject(e)}}async function getCard({cardSettings:e,operationSettings:t}){try{validateGetCardParams(e);const r=e.cardId,{proxyRequestFunction:n,stagingToken:a}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetCardCall({cardId:r,stagingToken:a})),t=await n(e),i=decodeNetworkResponse(t).body.cards;if(Array.isArray(i)&&i.length>0)return serializeCard(i[0]);throw new InvalidParametersError("Unable to retrieve card data")}{const e=t?.accessToken||validatePresenceOfAuthToken();return serializeCard(await getCard$1({cardId:r,accessToken:e,stagingToken:a}))}}catch(e){return Promise.reject(e)}}async function orderCard(e){try{const t=validatePresenceOfAuthToken(),{uiParentElementId:r,debugMode:n}=validateOperationSettingsParams(e.operationSettings,{requiresUI:!0});validateOrderCardParams(e.cardSettings);const a=buildIframeUrl({accessToken:t,stagingToken:authManager.getStagingToken()||void 0,debugMode:n}),i=await createIframe({iframeUrl:a,parentElementId:r}),s=serializeOrderCardPayload(e.cardSettings),o=await i.postMessage(s);return i.destroy(),serializeCard(o)}catch(e){return Promise.reject(e)}}async function unlockCard(e){try{const t=validatePresenceOfAuthToken(),{uiParentElementId:r,debugMode:n}=validateOperationSettingsParams(e.operationSettings,{requiresUI:!0});validateUnlockCardParams(e.cardSettings);const a=buildIframeUrl({accessToken:t,stagingToken:authManager.getStagingToken()||void 0,debugMode:n}),i=await createIframe({iframeUrl:a,parentElementId:r}),s=serializeUnlockCardPayload(e),o=await i.postMessage(s);return i.destroy(),serializeCard(o)}catch(e){return Promise.reject(e)}}async function displayCard(e){try{const{uiParentElementId:t,accessToken:r,stagingToken:n,debugMode:a,mfaPreference:i,proxyRequestFunction:s}=validateOperationSettingsParams(e.operationSettings,{requiresUI:!0});if(validateDisplayCardParams(e.cardSettings),s){const r=encodeNetworkCall(prepareGetCardIframeUrl({stagingToken:n})),i=await s(r),o=decodeNetworkResponse(i).body;return createEmbedUI({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:a},cardIframeUrl:o.url})}{const s=r||validatePresenceOfAuthToken(),o=await getCardIframeURL({...e.cardSettings,accessToken:s,stagingToken:n});return createEmbedUI({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:a,mfaPreference:i},cardIframeUrl:o.url})}}catch(e){return Promise.reject(e)}}const cards$1={getCards:getCards,getCard:getCard,orderCard:orderCard,unlockCard:unlockCard,displayCard:displayCard},cards=cards$1;function buildPaginationParams(e){const t=new URLSearchParams;return e?.page&&t.append("page",e.page.toString()),e?.itemsPerPage&&t.append("per_page",e.itemsPerPage.toString()),t}function addSearchParamsToUrl({url:e,searchParams:t}){const r=new URL(e.toString());for(const[e,n]of t.entries())r.searchParams.append(e,n);return r}function addPaginationParamsToUrl({endpointUrl:e,paginationSettings:t}){return addSearchParamsToUrl({url:new URL(e),searchParams:buildPaginationParams(t)})}function serializePaginationResponse(e){if(e)return{totalItems:e?.total_count,totalPages:e?.total_pages,currentPage:e?.current_page,itemsPerPage:e?.per_page,previousPage:e?.prev_page||null,nextPage:e?.next_page||null}}function serializeBeneficiary(e){return{id:e.id,name:e.name,email:e.email,activityTag:e.activity_tag,iban:e.iban,bic:e.bic,currency:e.currency,status:e.status,trusted:e.trusted,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at)}}function serializeToNewBeneficiaryDataObject(e){return{name:e.name,...e.email&&{email:e.email},...e.activityTag&&{activity_tag:e.activityTag},iban:e.iban,...e.bic&&{bic:e.bic}}}const BENEFICIARIES_ENDPOINT="/v2/sepa/beneficiaries";function prepareGetBeneficiariesCall({paginationSettings:e,accessToken:t,stagingToken:r}){const n={method:"GET",headers:{accessToken:t,stagingToken:r}},a=buildPaginationParams(e),i=a.size?`?${a.toString()}`:"";return{path:`${BENEFICIARIES_ENDPOINT}${i}`,options:n}}async function getBeneficiaries$1({paginationSettings:e,accessToken:t,stagingToken:r}){const n=prepareGetBeneficiariesCall({paginationSettings:e,accessToken:t,stagingToken:r}),{beneficiaries:a,meta:i}=await makeNetworkCall(n);return{beneficiaries:a,meta:i}}function prepareGetBeneficiaryCall({beneficiaryId:e,accessToken:t,stagingToken:r}){return{path:`${BENEFICIARIES_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getBeneficiary$1({accessToken:e,stagingToken:t,beneficiaryId:r}){const n=prepareGetBeneficiaryCall({beneficiaryId:r,accessToken:e,stagingToken:t}),{beneficiary:a}=await makeNetworkCall(n);return a}function prepareAddBeneficiaryCall({beneficiary:e,accessToken:t,stagingToken:r,idempotencyKey:n=v4()}){return{path:BENEFICIARIES_ENDPOINT,options:{method:"POST",headers:{accessToken:t,stagingToken:r,idempotencyKey:n},body:{beneficiary:serializeToNewBeneficiaryDataObject(e)}}}}async function addBeneficiary$1({beneficiary:e,accessToken:t,stagingToken:r,idempotencyKey:n=v4()}){const a=prepareAddBeneficiaryCall({beneficiary:e,accessToken:t,stagingToken:r,idempotencyKey:n}),{beneficiary:i}=await makeNetworkCall(a);return i}function prepareUntrustBeneficiaryCall({beneficiaryIds:e,accessToken:t,stagingToken:r}){return{path:`${BENEFICIARIES_ENDPOINT}/untrust`,options:{method:"PATCH",headers:{accessToken:t,stagingToken:r},body:{ids:e}}}}async function untrustBeneficiaries$1({beneficiaryIds:e,accessToken:t,stagingToken:r}){const n=prepareUntrustBeneficiaryCall({beneficiaryIds:e,accessToken:t,stagingToken:r}),{beneficiaries:a}=await makeNetworkCall(n);return a}function prepareUpdateBeneficiaryCall({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a}){const{name:i,email:s,activityTag:o}=e,l={method:"PATCH",headers:{accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a},body:{beneficiary:{name:i,email:s,activity_tag:o}}};return{path:`${BENEFICIARIES_ENDPOINT}/${e.id}`,options:l}}async function updateBeneficiary$1({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a}){const i=prepareUpdateBeneficiaryCall({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a}),{beneficiary:s}=await makeNetworkCall(i);return s}const requiredNewBeneficiaryParams=[{name:"name"},{name:"iban"}];function validateGetBeneficiaryParams(e){if(!e)throw new InvalidParametersError("beneficiaryId parameter is required for the called function");if(e&&"string"!=typeof e)throw new InvalidParametersError("beneficiaryId must be a string");return e}function validateAddBeneficiaryParams(e){if(!e)throw new InvalidParametersError("beneficiary parameter is required for the called function");if("object"!=typeof e)throw new InvalidParametersError("beneficiary must be an object");validatePresenceOfRequiredParams(e,requiredNewBeneficiaryParams);const t=validateExpectedStringValues({name:e.name,iban:e.iban,email:e.email,activityTag:e.activityTag,bic:e.bic});if(t.length>0)throw new InvalidParametersError(t);return e}function validateUpdateBeneficiaryParams(e){const{id:t,name:r,email:n,activityTag:a}=e||{};if(!t)throw new InvalidParametersError("Invalid parameters were passed to the function:\nA beneficiary ID is required for the called function");if(!r&&!n&&!a)throw new InvalidParametersError("Invalid parameters were passed to the function:\nAt least one of the following properties must be provided: name, email, activityTag");const i=validateExpectedStringValues({name:r,email:n,activityTag:a});if(i.length>0)throw new InvalidParametersError(i);return{id:t,name:r,email:n,activityTag:a}}function validateTrustBeneficiariesParams(e){if(!e)throw new InvalidParametersError("beneficiaryIds parameter is required for the called function");if(!Array.isArray(e)||!e.every((e=>"string"==typeof e)))throw new InvalidParametersError("beneficiaryIds must be an array of strings");return e}async function getBeneficiaries(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetBeneficiariesCall({paginationSettings:a})),t=decodeNetworkResponse(await r(e)),n=t.body.beneficiaries.map((e=>serializeBeneficiary(e))),i=serializePaginationResponse(t.body.meta);return{beneficiaries:n,...i?{meta:i}:{}}}{const e=n||validatePresenceOfAuthToken(),r=await getBeneficiaries$1({accessToken:e,stagingToken:t,paginationSettings:a}),i=r.beneficiaries.map((e=>serializeBeneficiary(e))),s=serializePaginationResponse(r.meta);return{beneficiaries:i,...s?{meta:s}:{}}}}async function getBeneficiary({beneficiarySettings:e,operationSettings:t}){const r=validateGetBeneficiaryParams(e?.beneficiaryId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetBeneficiaryCall({beneficiaryId:r}));return serializeBeneficiary(decodeNetworkResponse(await n(e)).body.beneficiary)}{const e=a||validatePresenceOfAuthToken();return serializeBeneficiary(await getBeneficiary$1({beneficiaryId:r,accessToken:e,stagingToken:i}))}}async function addBeneficiary({beneficiarySettings:e,operationSettings:t}){const r=validateAddBeneficiaryParams(e),{proxyRequestFunction:n,accessToken:a,stagingToken:i,idempotencyKey:s}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareAddBeneficiaryCall({beneficiary:r,idempotencyKey:s}));return serializeBeneficiary(decodeNetworkResponse(await n(e)).body.beneficiary)}{const e=a||validatePresenceOfAuthToken();return serializeBeneficiary(await addBeneficiary$1({beneficiary:r,accessToken:e,stagingToken:i,idempotencyKey:s}))}}async function updateBeneficiary({beneficiarySettings:e,operationSettings:t}){const r=validateUpdateBeneficiaryParams(e),{stagingToken:n,idempotencyKey:a,mfaPreference:i,proxyRequestFunction:s}=validateOperationSettingsParams(t),o={beneficiaryParamsBeingEdited:r,idempotencyKey:a,mfaPreference:i};if(s){const e=encodeNetworkCall(prepareUpdateBeneficiaryCall(o));return serializeBeneficiary(decodeNetworkResponse(await s(e)).body.beneficiary)}{const e=t?.accessToken||validatePresenceOfAuthToken();return serializeBeneficiary(await updateBeneficiary$1({...o,accessToken:e,stagingToken:n}))}}async function untrustBeneficiaries({beneficiarySettings:e,operationSettings:t}){const r=validateTrustBeneficiariesParams(e?.beneficiaryIds),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareUntrustBeneficiaryCall({beneficiaryIds:r}));return decodeNetworkResponse(await n(e)).body.beneficiaries.map(serializeBeneficiary)}{const e=a||validatePresenceOfAuthToken();return(await untrustBeneficiaries$1({beneficiaryIds:r,accessToken:e,stagingToken:i})).map(serializeBeneficiary)}}const beneficiaries$1={getBeneficiaries:getBeneficiaries,getBeneficiary:getBeneficiary,addBeneficiary:addBeneficiary,updateBeneficiary:updateBeneficiary,untrustBeneficiaries:untrustBeneficiaries},beneficiaries=beneficiaries$1;function serializeBulkTransfer(e){return{id:e.id,initiatorId:e.initiator_id,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),totalCount:Number(e.total_count),completedCount:Number(e.completed_count),failedCount:Number(e.failed_count),pendingCount:Number(e.pending_count),results:e.results.map((e=>({clientTransferId:e.client_transfer_id,transferId:e.transfer_id??null,errors:e.errors||null,status:e.status})))}}function serializeToNewBulkTransferDataObject(e){return{beneficiary_id:e.beneficiaryId||e.beneficiary?.id,client_transfer_id:e.clientTransferId,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentsIds?{attachment_ids:e.attachmentsIds}:{}}}function serializeToBulkVopVerificationResult(e){return{id:e.id,response:{matchResult:e.response.match_result,matchedName:e.response.matched_name}}}function serializeSepaTransfer(e){return{id:e.id,initiatorId:e.initiator_id,bankAccountId:e.bank_account_id,amount:Number(e.amount),amountCents:Number(e.amount_cents),amountCurrency:e.amount_currency,status:e.status,beneficiaryId:e.beneficiary_id,reference:e.reference,note:e.note,declinedReason:e.declined_reason,scheduledDate:new Date(e.scheduled_date),createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),processedAt:new Date(e.processed_at),completedAt:new Date(e.completed_at),transactionId:e.transaction_id}}function serializeToNewSepaTransferDataObject(e){const t=e.beneficiaryId||e.beneficiary?.id;return{bank_account_id:e.bankAccountId,beneficiary_id:t,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentIds?{attachment_ids:e.attachmentIds}:{}}}function serializeToVopVerificationResult(e){return{matchResult:e.match_result,matchedName:e.matched_name}}function serializeToSepaPayeeDataObject(e){return{name:e.name,iban:e.iban}}const SEPA_ENDPOINT="/v2/sepa",SEPA_TRANSFERS_ENDPOINT=`${SEPA_ENDPOINT}/transfers`;function prepareGetSepaTransfersCall({paginationSettings:e,accessToken:t,stagingToken:r}){const n={method:"GET",headers:{accessToken:t,stagingToken:r}},a=buildPaginationParams(e),i=a.size?`?${a.toString()}`:"";return{path:`${SEPA_TRANSFERS_ENDPOINT}${i}`,options:n}}async function getSepaTransfers$1({accessToken:e,stagingToken:t,paginationSettings:r}){const n=prepareGetSepaTransfersCall({paginationSettings:r,accessToken:e,stagingToken:t}),{transfers:a,meta:i}=await makeNetworkCall(n);return{transfers:a,meta:i}}function prepareGetSepaTransferCall({sepaTransferId:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_TRANSFERS_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getSepaTransfer$1({accessToken:e,stagingToken:t,sepaTransferId:r}){const n=prepareGetSepaTransferCall({sepaTransferId:r,accessToken:e,stagingToken:t}),{transfer:a}=await makeNetworkCall(n);return a}function prepareCreateSepaTransferCall({transfer:e,vopProofToken:t,accessToken:r,stagingToken:n,idempotencyKey:a}){const i=serializeToNewSepaTransferDataObject(e);return{path:SEPA_TRANSFERS_ENDPOINT,options:{method:"POST",headers:{accessToken:r,stagingToken:n,idempotencyKey:a},body:{transfer:i,vop_proof_token:t}}}}async function createSepaTransfer$1({transfer:e,vopProofToken:t,accessToken:r,stagingToken:n,idempotencyKey:a}){const i=prepareCreateSepaTransferCall({transfer:e,vopProofToken:t,accessToken:r,stagingToken:n,idempotencyKey:a}),{transfer:s}=await makeNetworkCall(i);return s}function prepareCancelSepaTransferCall({sepaTransferId:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_TRANSFERS_ENDPOINT}/${e}/cancel`,options:{method:"POST",headers:{accessToken:t,stagingToken:r}}}}async function cancelSepaTransfer$1({sepaTransferId:e,accessToken:t,stagingToken:r}){const n=prepareCancelSepaTransferCall({sepaTransferId:e,accessToken:t,stagingToken:r});await makeNetworkCall(n)}function prepareVerifySepaPayeeCall({sepaPayee:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_ENDPOINT}/verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:r},body:{beneficiary_name:e.name,iban:e.iban}}}}async function verifySepaPayee$1({sepaPayee:e,accessToken:t,stagingToken:r}){const n=prepareVerifySepaPayeeCall({sepaPayee:e,accessToken:t,stagingToken:r});return await makeNetworkCall(n)}const BULK_TRANSFERS_ENDPOINT="/v2/sepa/bulk_transfers";async function getBulkTransfers$1({accessToken:e,stagingToken:t,paginationSettings:r}){const n={method:"GET",headers:buildRequestHeaders({accessToken:e,stagingToken:t})},a=addPaginationParamsToUrl({endpointUrl:new URL(`${environmentManager.getEnvironmentUrls().THIRD_PARTY_API_URL}${BULK_TRANSFERS_ENDPOINT}`),paginationSettings:r}),i=await fetch(a,n);if(!i.ok)throw new EmbedApiError({message:"Failed to fetch SEPA bulk transfers"});const s=await i.json();if(s.errors)throw new EmbedApiError({message:s.errors.map((e=>`${e.code}: ${e.detail}`))});return{bulkTransfers:s.bulk_transfers,meta:s.meta}}async function getBulkTransfer$1({accessToken:e,stagingToken:t,bulkTransferId:r}){const n={method:"GET",headers:buildRequestHeaders({accessToken:e,stagingToken:t})},a=new URL(`${environmentManager.getEnvironmentUrls().THIRD_PARTY_API_URL}${BULK_TRANSFERS_ENDPOINT}/${r}`),i=await fetch(a,n),s=await i.json();if(s.errors)throw new EmbedApiError({message:s.errors.map((e=>`${e.code}: ${e.detail}`))});return s.bulk_transfer}function prepareVerifySepaPayeesCall({sepaPayees:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_ENDPOINT}/bulk_verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:r},body:{requests:e.map(serializeToSepaPayeeDataObject)}}}}async function verifySepaPayees({sepaPayees:e,accessToken:t,stagingToken:r}){const n=prepareVerifySepaPayeesCall({sepaPayees:e,accessToken:t,stagingToken:r});return await makeNetworkCall(n)}function validateBulkTransferParams(e){if(!e)throw new InvalidParametersError("bulkTransferId parameter is required for the called function.");if("string"!=typeof e)throw new InvalidParametersError("bulkTransferId must be a string.");return e}function validateCreateBulkTransferParams(e){if(!e)throw new InvalidParametersError("bulkTransferSettings parameter is required for the called function.");if(!e.bankAccountId)throw new InvalidParametersError("bankAccountId is required");if(!Array.isArray(e.bulkTransfers))throw new InvalidParametersError("bulkTransfers must be an array");if(e.bulkTransfers.length>400)throw new InvalidParametersError("Maximum of 400 bulk transfers allowed");return e.bulkTransfers.forEach(((e,t)=>{validateSingleBulkTransfer(e,t)})),e}function validateSingleBulkTransfer(e,t){if(!e)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: bulkTransfer object is required`);if(!e.beneficiary)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: Beneficiary details must be provided in the bulkTransferSettings.beneficiary field`);if(!e.beneficiary.iban)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: IBAN is required as part of the beneficiary details`);if(!e.beneficiary.name)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: Beneficiary name is required as part of the beneficiary details`);const r=[...validateExpectedStringValues({reference:e.reference,clientTransferId:e.clientTransferId,note:e.note}),...validateExpectedNumericValues({amount:e.amount})].flat();if(r.length>0)throw new InvalidParametersError(r);if(e.amount>AMOUNT_REQUIRING_ATTACHMENTS&&(!e.attachmentsIds||0===e.attachmentsIds.length))throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: Attachments are required for transfers over €${AMOUNT_REQUIRING_ATTACHMENTS}`)}const RUNTIME_ENVIRONMENT={BROWSER:"browser",SERVER:"server"};class InvalidRuntimeError extends Error{constructor(e){switch(super(),this.name="InvalidRuntimeError",e){case RUNTIME_ENVIRONMENT.BROWSER:this.message="This code is running in a browser environment, but it is expected to run in a server environment.";break;case RUNTIME_ENVIRONMENT.SERVER:this.message="This code is running in a server environment, but it is expected to run in a browser environment.";break;default:this.message="This code is not expected to run in this environment. Check if the function was server-only or browser-only."}}}async function getBulkTransfers(e){const{operationSettings:t}=e||{},r=t?.accessToken||validatePresenceOfAuthToken(),{stagingToken:n,paginationSettings:a}=validateOperationSettingsParams(t||{}),i=await getBulkTransfers$1({accessToken:r,stagingToken:n,paginationSettings:a}),s=i.bulkTransfers?.map(serializeBulkTransfer),o=serializePaginationResponse(i.meta);return{bulkTransfers:s,...o?{meta:o}:{}}}async function getBulkTransfer({sepaTransferSettings:e,operationSettings:t}){const r=t?.accessToken||validatePresenceOfAuthToken(),{stagingToken:n}=validateOperationSettingsParams(t||{}),a=validateBulkTransferParams(e?.bulkTransferId);return serializeBulkTransfer(await getBulkTransfer$1({accessToken:r,stagingToken:n,bulkTransferId:a}))}async function*createBulkTransfer({bulkTransferSettings:e,operationSettings:t}){const r=t?.accessToken||validatePresenceOfAuthToken(),n=t?.stagingToken||authManager.getStagingToken(),a=t?.idempotencyKey||v4();validateCreateBulkTransferParams(e);const{uiParentElementId:i,debugMode:s}=validateOperationSettingsParams(t,{requiresUI:!0});if(!isRunningInBrowser())throw new InvalidRuntimeError(RUNTIME_ENVIRONMENT.BROWSER);const o=new Map;for(const t of e.bulkTransfers){const e=t.beneficiary.iban;e&&!o.has(e)&&o.set(e,{name:t.beneficiary.name,iban:e})}const l=Array.from(o.values()),c=await verifySepaPayees({sepaPayees:l,accessToken:r,stagingToken:n||void 0});if((yield c.requests.map(serializeToBulkVopVerificationResult))===VOP_DECISIONS.REJECT)return;let h,p;try{const t=buildIframeUrl({accessToken:r,stagingToken:n||void 0,debugMode:s});p=await createIframe({iframeUrl:t,parentElementId:i});const o={bankAccountId:e.bankAccountId,bulkTransfers:e.bulkTransfers.map((e=>serializeToNewBulkTransferDataObject(e)))};h=await p.postMessage(buildIframeMessage({actionId:ACTIONS.TRANSFER_BULK_CREATE,actionData:{body:o,idempotencyKey:a}}))}finally{p?.destroy()}return serializeBulkTransfer(h)}const requiredCreateSepaTransferParams=[{name:"bankAccountId"},{name:"reference"},{name:"amount"}];function validateGetSepaTransferParams(e){if(!e)throw new InvalidParametersError("sepaTransferId parameter is required for the called function");if(e&&"string"!=typeof e)throw new InvalidParametersError("sepaTransferId must be a string");return e}function validateTransferBeneficiaryParams(e){if(!e)throw new InvalidParametersError("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new InvalidParametersError("sepaTransferSettings must be an object");if(!e.beneficiaryId&&!e.beneficiary)throw new InvalidParametersError("Either beneficiaryId or beneficiary must be provided");const t=validateExpectedStringValues({beneficiaryId:e.beneficiaryId});if(t.length>0)throw new InvalidParametersError(t);return e}function validateCreateSepaTransferParams(e){if(!e)throw new InvalidParametersError("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new InvalidParametersError("sepaTransferSettings must be an object");validatePresenceOfRequiredParams(e,requiredCreateSepaTransferParams);const t=[...validateExpectedStringValues({bankAccountId:e.bankAccountId,note:e.note,reference:e.reference}),...validateExpectedNumericValues({amount:e.amount})].flat();if(t.length>0)throw new InvalidParametersError(t);if(e.amount>AMOUNT_REQUIRING_ATTACHMENTS&&(!e.attachmentIds||0===e.attachmentIds.length))throw new InvalidParametersError("Attachments are required for transfers over €30,000");return e}function validateCancelSepaTransferParams(e){if(!e)throw new InvalidParametersError("sepaTransferId parameter is required for the called function");if("string"!=typeof e)throw new InvalidParametersError("sepaTransferId must be a string");return e}function validateGetSepaTransferCreationFlowLinkParams(e){if(!e||!e.callbackUrl)throw new InvalidParametersError("callbackUrl parameter is required for the getSepaTransferCreationFlowLink function");if("string"!=typeof e.callbackUrl)throw new InvalidParametersError("callbackUrl must be a string");return e.callbackUrl}function validateAuthLinkRequestSettings(e){if(!e||"object"!=typeof e)throw new InvalidParametersError("requestSettings must be an object");const t=e,{action:r,callbackUrl:n}=e;validatePresenceOfRequiredParams(t,[{name:"action"}]);const a=validateExpectedStringValues(t),i=Object.values(AUTH_LINK_ACTIONS);if(i.includes(r)||a.push(`action must be one of ${i.join(", ")}`),a.length>0)throw new InvalidParametersError(a);if(void 0!==n&&""===n.trim())throw new InvalidParametersError("callbackUrl cannot be empty")}function transformAuthLinkResponse(e){return{url:e.url,postAuthAction:e.post_authn_action,callbackUrl:e.callback_url,expiresAt:e.expired_at,usedAt:e.used_at}}async function request({requestSettings:e,operationSettings:t}){validateAuthLinkRequestSettings(e);const{proxyRequestFunction:r,stagingToken:n}=validateOperationSettingsParams(t||{});if(r){const t=encodeNetworkCall(prepareAuthLinkRequest({stagingToken:n,action:e.action,callbackUrl:e.callbackUrl}));return transformAuthLinkResponse(decodeNetworkResponse(await r(t)).body)}{const r=t?.accessToken||validatePresenceOfAuthToken();return transformAuthLinkResponse(await requestAuthLink({accessToken:r,stagingToken:n,action:e.action,callbackUrl:e.callbackUrl}))}}const authLinks$1={request:request},authLinks=authLinks$1;async function findBeneficiary({sepaTransferSettings:e,operationSettings:t}){return e?.beneficiary?e.beneficiary:await getBeneficiary({beneficiarySettings:{beneficiaryId:e?.beneficiaryId},operationSettings:t})}function decorateUrlWithExtraParams(e,t){const r=t?.locale||localeManager.getLocale(),n=new URL(e);return r&&n.searchParams.append("lang",r),t?.mfaPreference&&n.searchParams.append("mfaPreference",t.mfaPreference),t?.idempotencyKey&&n.searchParams.append("idempotencyKey",t.idempotencyKey),n.toString()}function createSepaTransferScaElement({networkCallDescriptor:e,scaSessionToken:t,operationSettings:r}){const{uiParentElementId:n,proxyRequestFunction:a,locale:i}=r,s=getUIParentElement(n);s.innerHTML="";const o=document.createElement("qonto-sca-passkey-waiting");return o.networkCallDescriptor={...e,options:{...e.options,headers:{...e.options.headers,scaSessionToken:t}}},o.operationSettings={uiParentElementId:n,proxyRequestFunction:a,locale:i},s.appendChild(o),o}async function waitForSepaTransferScaResult(e){return new Promise(((t,r)=>{e.addEventListener("sca-success",(e=>{t(e.detail.result.transfer)}),{once:!0}),e.addEventListener("sca-error",(e=>{r(e.detail.error)}),{once:!0}),e.addEventListener("sca-abort",(e=>{r(e.detail.result)}),{once:!0})}))}function __decorate(e,t,r,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}"function"==typeof SuppressedError&&SuppressedError;
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).QontoEmbed={})}(this,(function(exports){"use strict";class AuthManager{constructor(){this.accessToken=null,this.stagingToken=null}static getInstance(){return AuthManager.instance||(AuthManager.instance=new AuthManager),AuthManager.instance}setAccessToken(e){this.accessToken=e}getAccessToken(){return this.accessToken}hasAccessToken(){return null!==this.accessToken&&""!==this.accessToken}clearAccessToken(){this.accessToken=null}setStagingToken(e){this.stagingToken=e}getStagingToken(){return this.stagingToken}hasStagingToken(){return null!==this.stagingToken&&""!==this.stagingToken}clearStagingToken(){this.stagingToken=null}}const authManager=AuthManager.getInstance();class QontoEmbedSdkError extends Error{constructor(){super(),this.stack=""}toString(){return`${this.name}: ${this.message}`}}class AuthenticationError extends QontoEmbedSdkError{constructor(){super(),this.name="AuthenticationError",this.message="Authentication failed due to missing or invalid authentication method. Provide either a proxyRequestFunction (recommended) or accessToken, either as parameters or by calling the initialize function first."}}function validatePresenceOfAuthToken(){if(!authManager.hasAccessToken())throw new AuthenticationError;return authManager.getAccessToken()}class InvalidParametersError extends QontoEmbedSdkError{constructor(e){super(),this.name="InvalidParametersError",this.invalidParameters=Array.isArray(e)?e:[e],this.message=`Invalid parameters were passed to the function:\n${this.invalidParameters.map((e=>e)).join("\n")}`}}const IFRAME_EVENTS={READY:"qonto.ready"},ACTIONS={CARD_SEE:"card.see",CARD_SEE_DETAILS:"card.see-details",CARD_ORDER:"card.order",CARD_UNLOCK:"card.unlock",CARD_SHOW_PIN:"card.show.pin",CARD_SET_PIN:"card.set.pin",TRANSFER_SINGLE_CREATE:"transfer.single.create",TRANSFER_BULK_CREATE:"transfer.bulk.create",BENEFICIARIES_TRUST:"beneficiary.trust"},ENVIRONMENTS={PRODUCTION:"production",STAGING:"staging",LOCAL:"local"},BRANCHES={MASTER:"master",SANDBOX:"sandbox",QA:"qa"},ACTIVITY_TAGS={ATM:"atm",FALLBACK:"fallback",FEES:"fees",FINANCE:"finance",FOOD_AND_GROCERY:"food_and_grocery",GAS_STATION:"gas_station",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",HOTEL_AND_LODGING:"hotel_and_lodging",INSURANCE:"insurance",IT_AND_ELECTRONICS:"it_and_electronics",LEGAL_AND_ACCOUNTING:"legal_and_accounting",LOGISTICS:"logistics",MANUFACTURING:"manufacturing",MARKETING:"marketing",OFFICE_RENTAL:"office_rental",OFFICE_SUPPLY:"office_supply",ONLINE_SERVICE:"online_service",OTHER_EXPENSE:"other_expense",OTHER_INCOME:"other_income",OTHER_SERVICE:"other_service",PENDING:"pending",REFUND:"refund",RESTAURANT_AND_BAR:"restaurant_and_bar",SALES:"sales",SALARY:"salary",SUBSCRIPTION:"subscription",TAX:"tax",TRANSPORT:"transport",TREASURY_AND_INTERCO:"treasury_and_interco",UTILITY:"utility",VOUCHER:"voucher"},BENEFICIARY_STATUSES={PENDING:"pending",VALIDATED:"validated",DECLINED:"declined"},LOCALES$1={EN:"en",FR:"fr",DE:"de",ES:"es",IT:"it",PT:"pt"},TRANSFER_DECLINE_REASONS={BENEFICIARY_BIC_INVALID:"beneficiary_bic_invalid",BENEFICIARY_IBAN_INVALID:"beneficiary_iban_invalid",BENEFICIARY_STATUS:"beneficiary_status",BENEFICIARY_NETWORK_RULES_ERROR:"beneficiary_network_rules_error",ORGANISATION_COMPLIANCE_REASONS:"organisation_compliance_reasons",DEBIT_ACCOUNT_INSUFFICIENT_FUNDS:"debit_account_insufficient_funds",QONTO_PROCESSING_FAILED:"qonto_processing_failed"},TRANSFER_STATUSES={PENDING:"pending",PROCESSING:"processing",CANCELED:"canceled",DECLINED:"declined",SETTLED:"settled",FAILED:"failed",COMPLETED:"completed"},TRANSACTION_STATUSES={PENDING:"pending",DECLINED:"declined",COMPLETED:"completed"},MFA_METHODS={PASSKEY:"passkey",SMS_OTP:"sms-otp",PAIRED_DEVICE:"paired-device",MOCK:"mock"},AMOUNT_REQUIRING_ATTACHMENTS=3e4,VOP_CHECK_RESULTS={MATCH_RESULT_MATCH:"MATCH_RESULT_MATCH",MATCH_RESULT_NO_MATCH:"MATCH_RESULT_NO_MATCH",MATCH_RESULT_CLOSE_MATCH:"MATCH_RESULT_CLOSE_MATCH",MATCH_RESULT_NOT_POSSIBLE:"MATCH_RESULT_NOT_POSSIBLE",MATCH_RESULT_UNSPECIFIED:"MATCH_RESULT_UNSPECIFIED"},VOP_DECISIONS={ACCEPT:"ACCEPT",REJECT:"REJECT"},AUTH_LINK_ACTIONS={CARD_DISPLAY:"display_card",PAYMENT_LINK_CREATE:"create_payment_link",SEPA_TRANSFER_CREATE:"create_sepa_transfer"},HTTP_CODES={PRECONDITION_REQUIRED:428};var constants$1=Object.freeze({__proto__:null,ACTIONS:ACTIONS,ACTIVITY_TAGS:ACTIVITY_TAGS,AMOUNT_REQUIRING_ATTACHMENTS:AMOUNT_REQUIRING_ATTACHMENTS,AUTH_LINK_ACTIONS:AUTH_LINK_ACTIONS,BENEFICIARY_STATUSES:BENEFICIARY_STATUSES,BRANCHES:BRANCHES,ENVIRONMENTS:ENVIRONMENTS,HTTP_CODES:HTTP_CODES,IFRAME_EVENTS:IFRAME_EVENTS,LOCALES:LOCALES$1,MFA_METHODS:MFA_METHODS,TRANSACTION_STATUSES:TRANSACTION_STATUSES,TRANSFER_DECLINE_REASONS:TRANSFER_DECLINE_REASONS,TRANSFER_STATUSES:TRANSFER_STATUSES,VOP_CHECK_RESULTS:VOP_CHECK_RESULTS,VOP_DECISIONS:VOP_DECISIONS});class OperationSettingsManager{constructor(){this.mfaPreference=MFA_METHODS.PASSKEY,this.debugMode=!1}static getInstance(){return OperationSettingsManager.instance||(OperationSettingsManager.instance=new OperationSettingsManager),OperationSettingsManager.instance}setSettings(e){e.uiParentElementId&&(this.uiParentElementId=e.uiParentElementId),e.mfaPreference&&(this.mfaPreference=e.mfaPreference),e.debugMode&&(this.debugMode=e.debugMode),e.proxyRequestFunction&&(this.proxyRequestFunction=e.proxyRequestFunction)}getUIParentElementId(){return this.uiParentElementId}getMFAPreference(){return this.mfaPreference}getDebugMode(){return this.debugMode}getProxyRequestFunction(){return this.proxyRequestFunction}clearSettings(){this.uiParentElementId=void 0,this.mfaPreference=MFA_METHODS.PASSKEY,this.debugMode=!1,this.proxyRequestFunction=void 0}getSettings(){return{uiParentElementId:this.uiParentElementId,mfaPreference:this.mfaPreference,debugMode:this.debugMode,proxyRequestFunction:this.proxyRequestFunction}}}const operationSettingsManager=OperationSettingsManager.getInstance(),EMBED_BASE_URL_PROD="https://embed.qonto.com",EMBED_BASE_URL_STAGING="https://embed-js{branch}.staging.qonto.co",EMBED_BASE_URL_LOCAL="https://embed.dev.qonto.co",urlsPerEnvironment={[ENVIRONMENTS.PRODUCTION]:{EMBED_BASE_URL:EMBED_BASE_URL_PROD,EMBED_URL:`${EMBED_BASE_URL_PROD}/connect`,THIRD_PARTY_API_URL:"https://thirdparty.qonto.com"},[ENVIRONMENTS.STAGING]:{EMBED_BASE_URL:EMBED_BASE_URL_STAGING,EMBED_URL:`${EMBED_BASE_URL_STAGING}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"},[ENVIRONMENTS.LOCAL]:{EMBED_BASE_URL:EMBED_BASE_URL_LOCAL,EMBED_URL:`${EMBED_BASE_URL_LOCAL}/connect`,THIRD_PARTY_API_URL:"https://thirdparty{branch}.staging.qonto.co"}};class EnvironmentManager{constructor(){let e,t;this.environment=ENVIRONMENTS.PRODUCTION,this.branch=BRANCHES.SANDBOX,"undefined"!=typeof process&&process.env&&(e=process.env.QONTO_EMBED_ENVIRONMENT,t=process.env.QONTO_EMBED_BRANCH),this.environment=Object.values(ENVIRONMENTS).includes(e)?e:ENVIRONMENTS.PRODUCTION,this.branch=Object.values(BRANCHES).includes(t)?t:BRANCHES.SANDBOX}static getInstance(){return EnvironmentManager.instance||(EnvironmentManager.instance=new EnvironmentManager),EnvironmentManager.instance}setEnvironment(e){this.environment=e}getEnvironment(){return this.environment}isProductionEnvironment(){return this.environment===ENVIRONMENTS.PRODUCTION}setBranch(e){this.branch=e}getBranch(){return this.branch}clear(){this.environment=ENVIRONMENTS.PRODUCTION,this.branch=BRANCHES.MASTER}getEnvironmentUrls(){if(this.environment===ENVIRONMENTS.PRODUCTION)return urlsPerEnvironment.production;{const e=urlsPerEnvironment[this.environment];return Object.entries(e).reduce(((e,[t,r])=>({...e,[t]:r.replace("{branch}",`-${this.branch}`)})),{})}}}const environmentManager=EnvironmentManager.getInstance(),defaultOperationSettingsValidationConfiguration={requiresUI:!1};function validateOperationSettingsParams(e,{requiresUI:t}=defaultOperationSettingsValidationConfiguration){const r=e?.uiParentElementId||operationSettingsManager.getUIParentElementId();if(t){if(!r)throw new InvalidParametersError("operationSettings parameter must have a uiParentElementId for the called function.\nYou can pass it either to the initialize function or in a per function basis.");if(!["string","function"].includes(typeof r))throw new InvalidParametersError("operationSettings.uiParentElementId must be a string or a function returning an HTMLElement")}const n=e?.mfaPreference||operationSettingsManager.getMFAPreference();if(n){const e=getMfaValuesAvailableInCurrentEnvironment(Object.values(MFA_METHODS));if(!e.includes(n))throw new InvalidParametersError(`operationSettings.mfaPreference must be one of ${e.join(", ")}`);if(environmentManager.isProductionEnvironment()&&n===MFA_METHODS.MOCK)throw new InvalidParametersError("operationSettings.mfaPreference cannot be set to mock in production environment.")}const a=e?.debugMode||operationSettingsManager.getDebugMode();if(void 0!==a&&"boolean"!=typeof a)throw new InvalidParametersError("operationSettings.debugMode must be a boolean.");const i=e?.proxyRequestFunction||operationSettingsManager.getProxyRequestFunction();if(i&&"function"!=typeof i)throw new InvalidParametersError("operationSettings.proxyRequestFunction must be a function.");return{...e,uiParentElementId:r,mfaPreference:n,debugMode:a,proxyRequestFunction:i}}function getMfaValuesAvailableInCurrentEnvironment(e){return environmentManager.isProductionEnvironment()?e.filter((e=>e!==MFA_METHODS.MOCK)):e}const SUPPORTED_LOCALES=Object.values(LOCALES$1);function validateLocale(e){if(!isLocaleSupported(e))throw new InvalidParametersError(`Unsupported locale: ${e}. The locale must be one of: ${SUPPORTED_LOCALES.join(", ")}.`);return e}function isLocaleSupported(e){return SUPPORTED_LOCALES.includes(e)}function validateInitializeParams(e){if(!e?.accessToken&&!e?.operationSettings?.proxyRequestFunction)throw new InvalidParametersError("Either operationSettings.proxyRequestFunction or access token is required when calling initialize()");return e?.operationSettings&&validateOperationSettingsParams(e.operationSettings),validateEnvironmentParams(e),e.locale&&validateLocale(e.locale),e}function validateEnvironmentParams(e){if(e.environment){if(!["production","staging","local"].includes(e.environment))throw new InvalidParametersError('If provided, environment must be either "production" or "staging"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.environment.PRODUCTION" or "constants.environment.STAGING"');if(e.branch&&!["master","sandbox","qa"].includes(e.branch))throw new InvalidParametersError('If provided, branch must be either "master", "sandbox" or "qa"\nYou can "import constants from @qonto/embed-sdk/common" and then use "constants.branch.MASTER" or "constants.environment.SANDBOX" and so on')}return e}class LocaleManager{constructor(){this.currentLocale="en"}static getInstance(){return LocaleManager.instance||(LocaleManager.instance=new LocaleManager),LocaleManager.instance}setLocale(e){this.currentLocale=e}getLocale(){return this.currentLocale}setDefaultLocale(){this.currentLocale="en"}}const localeManager=LocaleManager.getInstance(),DEBUG_BUILD$3="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,SDK_VERSION="8.55.0",GLOBAL_OBJ=globalThis;function getGlobalSingleton(e,t,r){const n=r||GLOBAL_OBJ,a=n.__SENTRY__=n.__SENTRY__||{},i=a[SDK_VERSION]=a[SDK_VERSION]||{};return i[e]||(i[e]=t())}const DEBUG_BUILD$2="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,PREFIX="Sentry Logger ",CONSOLE_LEVELS=["debug","info","warn","error","log","assert","trace"],originalConsoleMethods={};function consoleSandbox(e){if(!("console"in GLOBAL_OBJ))return e();const t=GLOBAL_OBJ.console,r={},n=Object.keys(originalConsoleMethods);n.forEach((e=>{const n=originalConsoleMethods[e];r[e]=t[e],t[e]=n}));try{return e()}finally{n.forEach((e=>{t[e]=r[e]}))}}function makeLogger(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return DEBUG_BUILD$2?CONSOLE_LEVELS.forEach((r=>{t[r]=(...t)=>{e&&consoleSandbox((()=>{GLOBAL_OBJ.console[r](`${PREFIX}[${r}]:`,...t)}))}})):CONSOLE_LEVELS.forEach((e=>{t[e]=()=>{}})),t}const logger=getGlobalSingleton("logger",makeLogger),STACKTRACE_FRAME_LIMIT=50,UNKNOWN_FUNCTION="?",WEBPACK_ERROR_REGEXP=/\(error: (.*)\)/,STRIP_FRAME_REGEXP=/captureMessage|captureException/;function createStackParser(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,r=0,n=0)=>{const a=[],i=e.split("\n");for(let e=r;e<i.length;e++){const r=i[e];if(r.length>1024)continue;const s=WEBPACK_ERROR_REGEXP.test(r)?r.replace(WEBPACK_ERROR_REGEXP,"$1"):r;if(!s.match(/\S*Error: /)){for(const e of t){const t=e(s);if(t){a.push(t);break}}if(a.length>=STACKTRACE_FRAME_LIMIT+n)break}}return stripSentryFramesAndReverse(a.slice(n))}}function stackParserFromStackParserOptions(e){return Array.isArray(e)?createStackParser(...e):e}function stripSentryFramesAndReverse(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(getLastStackFrame(t).function||"")&&t.pop(),t.reverse(),STRIP_FRAME_REGEXP.test(getLastStackFrame(t).function||"")&&(t.pop(),STRIP_FRAME_REGEXP.test(getLastStackFrame(t).function||"")&&t.pop()),t.slice(0,STACKTRACE_FRAME_LIMIT).map((e=>({...e,filename:e.filename||getLastStackFrame(t).filename,function:e.function||UNKNOWN_FUNCTION})))}function getLastStackFrame(e){return e[e.length-1]||{}}const defaultFunctionName="<anonymous>";function getFunctionName(e){try{return e&&"function"==typeof e&&e.name||defaultFunctionName}catch(e){return defaultFunctionName}}function getFramesFromEvent(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}}const handlers={},instrumented={};function addHandler(e,t){handlers[e]=handlers[e]||[],handlers[e].push(t)}function maybeInstrument(e,t){if(!instrumented[e]){instrumented[e]=!0;try{t()}catch(t){DEBUG_BUILD$2&&logger.error(`Error while instrumenting ${e}`,t)}}}function triggerHandlers(e,t){const r=e&&handlers[e];if(r)for(const n of r)try{n(t)}catch(t){DEBUG_BUILD$2&&logger.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${getFunctionName(n)}\nError:`,t)}}let _oldOnErrorHandler=null;function addGlobalErrorInstrumentationHandler(e){const t="error";addHandler(t,e),maybeInstrument(t,instrumentError)}function instrumentError(){_oldOnErrorHandler=GLOBAL_OBJ.onerror,GLOBAL_OBJ.onerror=function(e,t,r,n,a){return triggerHandlers("error",{column:n,error:a,line:r,msg:e,url:t}),!!_oldOnErrorHandler&&_oldOnErrorHandler.apply(this,arguments)},GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let _oldOnUnhandledRejectionHandler=null;function addGlobalUnhandledRejectionInstrumentationHandler(e){const t="unhandledrejection";addHandler(t,e),maybeInstrument(t,instrumentUnhandledRejection)}function instrumentUnhandledRejection(){_oldOnUnhandledRejectionHandler=GLOBAL_OBJ.onunhandledrejection,GLOBAL_OBJ.onunhandledrejection=function(e){return triggerHandlers("unhandledrejection",e),!_oldOnUnhandledRejectionHandler||_oldOnUnhandledRejectionHandler.apply(this,arguments)},GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function getMainCarrier(){return getSentryCarrier(GLOBAL_OBJ),GLOBAL_OBJ}function getSentryCarrier(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||SDK_VERSION,t[SDK_VERSION]=t[SDK_VERSION]||{}}const objectToString=Object.prototype.toString;function isError(e){switch(objectToString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return isInstanceOf(e,Error)}}function isBuiltin(e,t){return objectToString.call(e)===`[object ${t}]`}function isErrorEvent$1(e){return isBuiltin(e,"ErrorEvent")}function isDOMError(e){return isBuiltin(e,"DOMError")}function isDOMException(e){return isBuiltin(e,"DOMException")}function isString(e){return isBuiltin(e,"String")}function isParameterizedString(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function isPrimitive(e){return null===e||isParameterizedString(e)||"object"!=typeof e&&"function"!=typeof e}function isPlainObject(e){return isBuiltin(e,"Object")}function isEvent(e){return"undefined"!=typeof Event&&isInstanceOf(e,Event)}function isElement(e){return"undefined"!=typeof Element&&isInstanceOf(e,Element)}function isRegExp(e){return isBuiltin(e,"RegExp")}function isThenable(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function isSyntheticEvent(e){return isPlainObject(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function isInstanceOf(e,t){try{return e instanceof t}catch(e){return!1}}function isVueViewModel(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const WINDOW$4=GLOBAL_OBJ,DEFAULT_MAX_STRING_LENGTH=80;function htmlTreeAsString(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,a=[];let i=0,s=0;const o=" > ",l=o.length;let c;const h=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||DEFAULT_MAX_STRING_LENGTH;for(;r&&i++<n&&(c=_htmlElementAsString(r,h),!("html"===c||i>1&&s+a.length*l+c.length>=p));)a.push(c),s+=c.length,r=r.parentNode;return a.reverse().join(o)}catch(e){return"<unknown>"}}function _htmlElementAsString(e,t){const r=e,n=[];if(!r||!r.tagName)return"";if(WINDOW$4.HTMLElement&&r instanceof HTMLElement&&r.dataset){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}n.push(r.tagName.toLowerCase());const a=t&&t.length?t.filter((e=>r.getAttribute(e))).map((e=>[e,r.getAttribute(e)])):null;if(a&&a.length)a.forEach((e=>{n.push(`[${e[0]}="${e[1]}"]`)}));else{r.id&&n.push(`#${r.id}`);const e=r.className;if(e&&isString(e)){const t=e.split(/\s+/);for(const e of t)n.push(`.${e}`)}}const i=["aria-label","type","name","title","alt"];for(const e of i){const t=r.getAttribute(e);t&&n.push(`[${e}="${t}"]`)}return n.join("")}function getLocationHref(){try{return WINDOW$4.document.location.href}catch(e){return""}}function getComponentName(e){if(!WINDOW$4.HTMLElement)return null;let t=e;for(let e=0;e<5;e++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function truncate(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function safeJoin(e,t){if(!Array.isArray(e))return"";const r=[];for(let t=0;t<e.length;t++){const n=e[t];try{isVueViewModel(n)?r.push("[VueViewModel]"):r.push(String(n))}catch(e){r.push("[value cannot be serialized]")}}return r.join(t)}function isMatchingPattern(e,t,r=!1){return!!isString(e)&&(isRegExp(t)?t.test(e):!!isString(t)&&(r?e===t:e.includes(t)))}function stringMatchesSomePattern(e,t=[],r=!1){return t.some((t=>isMatchingPattern(e,t,r)))}function fill(e,t,r){if(!(t in e))return;const n=e[t],a=r(n);"function"==typeof a&&markFunctionWrapped(a,n);try{e[t]=a}catch(r){DEBUG_BUILD$2&&logger.log(`Failed to replace method "${t}" in object`,e)}}function addNonEnumerableProperty(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch(r){DEBUG_BUILD$2&&logger.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function markFunctionWrapped(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,addNonEnumerableProperty(e,"__sentry_original__",t)}catch(e){}}function getOriginalFunction(e){return e.__sentry_original__}function convertToPlainObject(e){if(isError(e))return{message:e.message,name:e.name,stack:e.stack,...getOwnProperties(e)};if(isEvent(e)){const t={type:e.type,target:serializeEventTarget(e.target),currentTarget:serializeEventTarget(e.currentTarget),...getOwnProperties(e)};return"undefined"!=typeof CustomEvent&&isInstanceOf(e,CustomEvent)&&(t.detail=e.detail),t}return e}function serializeEventTarget(e){try{return isElement(e)?htmlTreeAsString(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function getOwnProperties(e){if("object"==typeof e&&null!==e){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}return{}}function extractExceptionKeysForMessage(e,t=40){const r=Object.keys(convertToPlainObject(e));r.sort();const n=r[0];if(!n)return"[object has no keys]";if(n.length>=t)return truncate(n,t);for(let e=r.length;e>0;e--){const n=r.slice(0,e).join(", ");if(!(n.length>t))return e===r.length?n:truncate(n,t)}return""}function dropUndefinedKeys(e){return _dropUndefinedKeys(e,new Map)}function _dropUndefinedKeys(e,t){if(isPojo(e)){const r=t.get(e);if(void 0!==r)return r;const n={};t.set(e,n);for(const r of Object.getOwnPropertyNames(e))void 0!==e[r]&&(n[r]=_dropUndefinedKeys(e[r],t));return n}if(Array.isArray(e)){const r=t.get(e);if(void 0!==r)return r;const n=[];return t.set(e,n),e.forEach((e=>{n.push(_dropUndefinedKeys(e,t))})),n}return e}function isPojo(e){if(!isPlainObject(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}const ONE_SECOND_IN_MS=1e3;function dateTimestampInSeconds(){return Date.now()/ONE_SECOND_IN_MS}function createUnixTimestampInSecondsFunc(){const{performance:e}=GLOBAL_OBJ;if(!e||!e.now)return dateTimestampInSeconds;const t=Date.now()-e.now(),r=null==e.timeOrigin?t:e.timeOrigin;return()=>(r+e.now())/ONE_SECOND_IN_MS}const timestampInSeconds=createUnixTimestampInSecondsFunc();function uuid4(){const e=GLOBAL_OBJ,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))}function getFirstException(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function getEventDescription(e){const{message:t,event_id:r}=e;if(t)return t;const n=getFirstException(e);return n?n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||r||"<unknown>":r||"<unknown>"}function addExceptionTypeValue(e,t,r){const n=e.exception=e.exception||{},a=n.values=n.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function addExceptionMechanism(e,t){const r=getFirstException(e);if(!r)return;const n=r.mechanism;if(r.mechanism={type:"generic",handled:!0,...n,...t},t&&"data"in t){const e={...n&&n.data,...t.data};r.mechanism.data=e}}function checkOrSetAlreadyCaught(e){if(isAlreadyCaptured(e))return!0;try{addNonEnumerableProperty(e,"__sentry_captured__",!0)}catch(e){}return!1}function isAlreadyCaptured(e){try{return e.__sentry_captured__}catch(e){}}var States;function resolvedSyncPromise(e){return new SyncPromise((t=>{t(e)}))}function rejectedSyncPromise(e){return new SyncPromise(((t,r)=>{r(e)}))}(()=>{const{performance:e}=GLOBAL_OBJ;if(!e||!e.now)return;const t=36e5,r=e.now(),n=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+r-n):t,i=a<t,s=e.timing&&e.timing.navigationStart,o="number"==typeof s?Math.abs(s+r-n):t;(i||o<t)&&(a<=o&&e.timeOrigin)})(),function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(States||(States={}));class SyncPromise{constructor(e){SyncPromise.prototype.__init.call(this),SyncPromise.prototype.__init2.call(this),SyncPromise.prototype.__init3.call(this),SyncPromise.prototype.__init4.call(this),this._state=States.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new SyncPromise(((r,n)=>{this._handlers.push([!1,t=>{if(e)try{r(e(t))}catch(e){n(e)}else r(t)},e=>{if(t)try{r(t(e))}catch(e){n(e)}else n(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new SyncPromise(((t,r)=>{let n,a;return this.then((t=>{a=!1,n=t,e&&e()}),(t=>{a=!0,n=t,e&&e()})).then((()=>{a?r(n):t(n)}))}))}__init(){this._resolve=e=>{this._setResult(States.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(States.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===States.PENDING&&(isThenable(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===States.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===States.RESOLVED&&e[1](this._value),this._state===States.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function makeSession(e){const t=timestampInSeconds(),r={sid:uuid4(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>sessionToJSON(r)};return e&&updateSession(r,e),r}function updateSession(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||timestampInSeconds(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:uuid4()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function closeSession(e,t){let r={};"ok"===e.status&&(r={status:"exited"}),updateSession(e,r)}function sessionToJSON(e){return dropUndefinedKeys({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function generateTraceId(){return uuid4()}function generateSpanId(){return uuid4().substring(16)}function merge(e,t,r=2){if(!t||"object"!=typeof t||r<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const n={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=merge(n[e],t[e],r-1));return n}const SCOPE_SPAN_FIELD="_sentrySpan";function _setSpanForScope(e,t){t?addNonEnumerableProperty(e,SCOPE_SPAN_FIELD,t):delete e[SCOPE_SPAN_FIELD]}function _getSpanForScope(e){return e[SCOPE_SPAN_FIELD]}const DEFAULT_MAX_BREADCRUMBS=100;class ScopeClass{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:generateTraceId(),spanId:generateSpanId()}}clone(){const e=new ScopeClass;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,_setSpanForScope(e,_getSpanForScope(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&updateSession(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[r,n]=t instanceof Scope?[t.getScopeData(),t.getRequestSession()]:isPlainObject(t)?[e,e.requestSession]:[],{tags:a,extra:i,user:s,contexts:o,level:l,fingerprint:c=[],propagationContext:h}=r||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...i},this._contexts={...this._contexts,...o},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),c.length&&(this._fingerprint=c),h&&(this._propagationContext=h),n&&(this._requestSession=n),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,_setSpanForScope(this,void 0),this._attachments=[],this.setPropagationContext({traceId:generateTraceId()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const r="number"==typeof t?t:DEFAULT_MAX_BREADCRUMBS;if(r<=0)return this;const n={timestamp:dateTimestampInSeconds(),...e};return this._breadcrumbs.push(n),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:_getSpanForScope(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=merge(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:generateSpanId(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const r=t&&t.event_id?t.event_id:uuid4();if(!this._client)return logger.warn("No client configured on scope - will not capture exception!"),r;const n=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:n,...t,event_id:r},this),r}captureMessage(e,t,r){const n=r&&r.event_id?r.event_id:uuid4();if(!this._client)return logger.warn("No client configured on scope - will not capture message!"),n;const a=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...r,event_id:n},this),n}captureEvent(e,t){const r=t&&t.event_id?t.event_id:uuid4();return this._client?(this._client.captureEvent(e,{...t,event_id:r},this),r):(logger.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const Scope=ScopeClass;function getDefaultCurrentScope(){return getGlobalSingleton("defaultCurrentScope",(()=>new Scope))}function getDefaultIsolationScope(){return getGlobalSingleton("defaultIsolationScope",(()=>new Scope))}class AsyncContextStack{constructor(e,t){let r,n;r=e||new Scope,n=t||new Scope,this._stack=[{scope:r}],this._isolationScope=n}withScope(e){const t=this._pushScope();let r;try{r=e(t)}catch(e){throw this._popScope(),e}return isThenable(r)?r.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function getAsyncContextStack(){const e=getSentryCarrier(getMainCarrier());return e.stack=e.stack||new AsyncContextStack(getDefaultCurrentScope(),getDefaultIsolationScope())}function withScope$1(e){return getAsyncContextStack().withScope(e)}function withSetScope(e,t){const r=getAsyncContextStack();return r.withScope((()=>(r.getStackTop().scope=e,t(e))))}function withIsolationScope(e){return getAsyncContextStack().withScope((()=>e(getAsyncContextStack().getIsolationScope())))}function getStackAsyncContextStrategy(){return{withIsolationScope:withIsolationScope,withScope:withScope$1,withSetScope:withSetScope,withSetIsolationScope:(e,t)=>withIsolationScope(t),getCurrentScope:()=>getAsyncContextStack().getScope(),getIsolationScope:()=>getAsyncContextStack().getIsolationScope()}}function getAsyncContextStrategy(e){const t=getSentryCarrier(e);return t.acs?t.acs:getStackAsyncContextStrategy()}function getCurrentScope(){return getAsyncContextStrategy(getMainCarrier()).getCurrentScope()}function getIsolationScope(){return getAsyncContextStrategy(getMainCarrier()).getIsolationScope()}function getGlobalScope(){return getGlobalSingleton("globalScope",(()=>new Scope))}function withScope(...e){const t=getAsyncContextStrategy(getMainCarrier());if(2===e.length){const[r,n]=e;return r?t.withSetScope(r,n):t.withScope(n)}return t.withScope(e[0])}function getClient(){return getCurrentScope().getClient()}function getTraceContextFromScope(e){const t=e.getPropagationContext(),{traceId:r,spanId:n,parentSpanId:a}=t;return dropUndefinedKeys({trace_id:r,span_id:n,parent_span_id:a})}const METRICS_SPAN_FIELD="_sentryMetrics";function getMetricSummaryJsonForSpan(e){const t=e[METRICS_SPAN_FIELD];if(!t)return;const r={};for(const[,[e,n]]of t){(r[e]||(r[e]=[])).push(dropUndefinedKeys(n))}return r}const SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source",SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.sample_rate",SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",SPAN_STATUS_UNSET=0,SPAN_STATUS_OK=1,SENTRY_BAGGAGE_KEY_PREFIX="sentry-",SENTRY_BAGGAGE_KEY_PREFIX_REGEX=/^sentry-/;function baggageHeaderToDynamicSamplingContext(e){const t=parseBaggageHeader(e);if(!t)return;const r=Object.entries(t).reduce(((e,[t,r])=>{if(t.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)){e[t.slice(SENTRY_BAGGAGE_KEY_PREFIX.length)]=r}return e}),{});return Object.keys(r).length>0?r:void 0}function parseBaggageHeader(e){if(e&&(isString(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const r=baggageHeaderToObject(t);return Object.entries(r).forEach((([t,r])=>{e[t]=r})),e}),{}):baggageHeaderToObject(e)}function baggageHeaderToObject(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,r])=>(t&&r&&(e[t]=r),e)),{})}const TRACE_FLAG_SAMPLED=1;let hasShownSpanDropWarning=!1;function spanToTraceContext(e){const{spanId:t,traceId:r,isRemote:n}=e.spanContext();return dropUndefinedKeys({parent_span_id:n?t:spanToJSON(e).parent_span_id,span_id:n?generateSpanId():t,trace_id:r})}function spanTimeInputToSeconds(e){return"number"==typeof e?ensureTimestampInSeconds(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ensureTimestampInSeconds(e.getTime()):timestampInSeconds()}function ensureTimestampInSeconds(e){return e>9999999999?e/1e3:e}function spanToJSON(e){if(spanIsSentrySpan(e))return e.getSpanJSON();try{const{spanId:t,traceId:r}=e.spanContext();if(spanIsOpenTelemetrySdkTraceBaseSpan(e)){const{attributes:n,startTime:a,name:i,endTime:s,parentSpanId:o,status:l}=e;return dropUndefinedKeys({span_id:t,trace_id:r,data:n,description:i,parent_span_id:o,start_timestamp:spanTimeInputToSeconds(a),timestamp:spanTimeInputToSeconds(s)||void 0,status:getStatusMessage(l),op:n[SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:n[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:getMetricSummaryJsonForSpan(e)})}return{span_id:t,trace_id:r}}catch(e){return{}}}function spanIsOpenTelemetrySdkTraceBaseSpan(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function spanIsSentrySpan(e){return"function"==typeof e.getSpanJSON}function spanIsSampled(e){const{traceFlags:t}=e.spanContext();return t===TRACE_FLAG_SAMPLED}function getStatusMessage(e){if(e&&e.code!==SPAN_STATUS_UNSET)return e.code===SPAN_STATUS_OK?"ok":e.message||"unknown_error"}const ROOT_SPAN_FIELD="_sentryRootSpan";function getRootSpan(e){return e[ROOT_SPAN_FIELD]||e}function showSpanDropWarning(){hasShownSpanDropWarning||(consoleSandbox((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),hasShownSpanDropWarning=!0)}function hasTracingEnabled(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=getClient(),r=t&&t.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)}const DEFAULT_ENVIRONMENT="production",FROZEN_DSC_FIELD="_frozenDsc";function getDynamicSamplingContextFromClient(e,t){const r=t.getOptions(),{publicKey:n}=t.getDsn()||{},a=dropUndefinedKeys({environment:r.environment||DEFAULT_ENVIRONMENT,release:r.release,public_key:n,trace_id:e});return t.emit("createDsc",a),a}function getDynamicSamplingContextFromScope(e,t){const r=t.getPropagationContext();return r.dsc||getDynamicSamplingContextFromClient(r.traceId,e)}function getDynamicSamplingContextFromSpan(e){const t=getClient();if(!t)return{};const r=getRootSpan(e),n=r[FROZEN_DSC_FIELD];if(n)return n;const a=r.spanContext().traceState,i=a&&a.get("sentry.dsc"),s=i&&baggageHeaderToDynamicSamplingContext(i);if(s)return s;const o=getDynamicSamplingContextFromClient(e.spanContext().traceId,t),l=spanToJSON(r),c=l.data||{},h=c[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];null!=h&&(o.sample_rate=`${h}`);const p=c[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],d=l.description;return"url"!==p&&d&&(o.transaction=d),hasTracingEnabled()&&(o.sampled=String(spanIsSampled(r))),t.emit("createDsc",o,r),o}function parseSampleRate(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;DEBUG_BUILD$3&&logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}const DSN_REGEX=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function isValidProtocol(e){return"http"===e||"https"===e}function dsnToString(e,t=!1){const{host:r,path:n,pass:a,port:i,projectId:s,protocol:o,publicKey:l}=e;return`${o}://${l}${t&&a?`:${a}`:""}@${r}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}function dsnFromString(e){const t=DSN_REGEX.exec(e);if(!t)return void consoleSandbox((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[r,n,a="",i="",s="",o=""]=t.slice(1);let l="",c=o;const h=c.split("/");if(h.length>1&&(l=h.slice(0,-1).join("/"),c=h.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return dsnFromComponents({host:i,pass:a,path:l,projectId:c,port:s,protocol:r,publicKey:n})}function dsnFromComponents(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function validateDsn(e){if(!DEBUG_BUILD$2)return!0;const{port:t,projectId:r,protocol:n}=e;return!["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(logger.error(`Invalid Sentry Dsn: ${t} missing`),!0)))&&(r.match(/^\d+$/)?isValidProtocol(n)?!t||!isNaN(parseInt(t,10))||(logger.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(logger.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(logger.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1))}function makeDsn(e){const t="string"==typeof e?dsnFromString(e):dsnFromComponents(e);if(t&&validateDsn(t))return t}function memoBuilder(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(r){if(e)return!!t.has(r)||(t.add(r),!1);for(let e=0;e<t.length;e++){if(t[e]===r)return!0}return t.push(r),!1},function(r){if(e)t.delete(r);else for(let e=0;e<t.length;e++)if(t[e]===r){t.splice(e,1);break}}]}function normalize(e,t=100,r=1/0){try{return visit("",e,t,r)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function normalizeToSize(e,t=3,r=102400){const n=normalize(e,t);return jsonSize(n)>r?normalizeToSize(e,t-1,r):n}function visit(e,t,r=1/0,n=1/0,a=memoBuilder()){const[i,s]=a;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const o=stringifyValue(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const l="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:r;if(0===l)return o.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&"function"==typeof c.toJSON)try{return visit("",c.toJSON(),l-1,n,a)}catch(e){}const h=Array.isArray(t)?[]:{};let p=0;const d=convertToPlainObject(t);for(const e in d){if(!Object.prototype.hasOwnProperty.call(d,e))continue;if(p>=n){h[e]="[MaxProperties ~]";break}const t=d[e];h[e]=visit(e,t,l-1,n,a),p++}return s(t),h}function stringifyValue(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(isVueViewModel(t))return"[VueViewModel]";if(isSyntheticEvent(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${getFunctionName(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const r=getConstructorName(t);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(e){return`**non-serializable** (${e})`}}function getConstructorName(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function utf8Length(e){return~-encodeURI(e).split(/%..|./).length}function jsonSize(e){return utf8Length(JSON.stringify(e))}function createEnvelope(e,t=[]){return[e,t]}function addItemToEnvelope(e,t){const[r,n]=e;return[r,[...n,t]]}function forEachEnvelopeItem(e,t){const r=e[1];for(const e of r){if(t(e,e[0].type))return!0}return!1}function encodeUTF8(e){return GLOBAL_OBJ.__SENTRY__&&GLOBAL_OBJ.__SENTRY__.encodePolyfill?GLOBAL_OBJ.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function serializeEnvelope(e){const[t,r]=e;let n=JSON.stringify(t);function a(e){"string"==typeof n?n="string"==typeof e?n+e:[encodeUTF8(n),e]:n.push("string"==typeof e?encodeUTF8(e):e)}for(const e of r){const[t,r]=e;if(a(`\n${JSON.stringify(t)}\n`),"string"==typeof r||r instanceof Uint8Array)a(r);else{let e;try{e=JSON.stringify(r)}catch(t){e=JSON.stringify(normalize(r))}a(e)}}return"string"==typeof n?n:concatBuffers(n)}function concatBuffers(e){const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r}function createAttachmentEnvelopeItem(e){const t="string"==typeof e.data?encodeUTF8(e.data):e.data;return[dropUndefinedKeys({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const ITEM_TYPE_TO_DATA_CATEGORY_MAP={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function envelopeItemTypeToDataCategory(e){return ITEM_TYPE_TO_DATA_CATEGORY_MAP[e]}function getSdkMetadataForEnvelopeHeader(e){if(!e||!e.sdk)return;const{name:t,version:r}=e.sdk;return{name:t,version:r}}function createEventEnvelopeHeaders(e,t,r,n){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!r&&n&&{dsn:dsnToString(n)},...a&&{trace:dropUndefinedKeys({...a})}}}function enhanceEventWithSdkInfo(e,t){return t?(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]],e):e}function createSessionEnvelope(e,t,r,n){const a=getSdkMetadataForEnvelopeHeader(r);return createEnvelope({sent_at:(new Date).toISOString(),...a&&{sdk:a},...!!n&&t&&{dsn:dsnToString(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}function createEventEnvelope(e,t,r,n){const a=getSdkMetadataForEnvelopeHeader(r),i=e.type&&"replay_event"!==e.type?e.type:"event";enhanceEventWithSdkInfo(e,r&&r.sdk);const s=createEventEnvelopeHeaders(e,a,n,t);delete e.sdkProcessingMetadata;return createEnvelope(s,[[{type:i},e]])}function notifyEventProcessors(e,t,r,n=0){return new SyncPromise(((a,i)=>{const s=e[n];if(null===t||"function"!=typeof s)a(t);else{const o=s({...t},r);DEBUG_BUILD$3&&s.id&&null===o&&logger.log(`Event processor "${s.id}" dropped event`),isThenable(o)?o.then((t=>notifyEventProcessors(e,t,r,n+1).then(a))).then(null,i):notifyEventProcessors(e,o,r,n+1).then(a).then(null,i)}}))}let parsedStackResults,lastKeysCount,cachedFilenameDebugIds;function getFilenameToDebugIdMap(e){const t=GLOBAL_OBJ._sentryDebugIds;if(!t)return{};const r=Object.keys(t);return cachedFilenameDebugIds&&r.length===lastKeysCount||(lastKeysCount=r.length,cachedFilenameDebugIds=r.reduce(((r,n)=>{parsedStackResults||(parsedStackResults={});const a=parsedStackResults[n];if(a)r[a[0]]=a[1];else{const a=e(n);for(let e=a.length-1;e>=0;e--){const i=a[e],s=i&&i.filename,o=t[n];if(s&&o){r[s]=o,parsedStackResults[n]=[s,o];break}}}return r}),{})),cachedFilenameDebugIds}function applyScopeDataToEvent(e,t){const{fingerprint:r,span:n,breadcrumbs:a,sdkProcessingMetadata:i}=t;applyDataToEvent(e,t),n&&applySpanToEvent(e,n),applyFingerprintToEvent(e,r),applyBreadcrumbsToEvent(e,a),applySdkMetadataToEvent(e,i)}function mergeScopeData(e,t){const{extra:r,tags:n,user:a,contexts:i,level:s,sdkProcessingMetadata:o,breadcrumbs:l,fingerprint:c,eventProcessors:h,attachments:p,propagationContext:d,transactionName:u,span:f}=t;mergeAndOverwriteScopeData(e,"extra",r),mergeAndOverwriteScopeData(e,"tags",n),mergeAndOverwriteScopeData(e,"user",a),mergeAndOverwriteScopeData(e,"contexts",i),e.sdkProcessingMetadata=merge(e.sdkProcessingMetadata,o,2),s&&(e.level=s),u&&(e.transactionName=u),f&&(e.span=f),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...d}}function mergeAndOverwriteScopeData(e,t,r){e[t]=merge(e[t],r,1)}function applyDataToEvent(e,t){const{extra:r,tags:n,user:a,contexts:i,level:s,transactionName:o}=t,l=dropUndefinedKeys(r);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=dropUndefinedKeys(n);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const h=dropUndefinedKeys(a);h&&Object.keys(h).length&&(e.user={...h,...e.user});const p=dropUndefinedKeys(i);p&&Object.keys(p).length&&(e.contexts={...p,...e.contexts}),s&&(e.level=s),o&&"transaction"!==e.type&&(e.transaction=o)}function applyBreadcrumbsToEvent(e,t){const r=[...e.breadcrumbs||[],...t];e.breadcrumbs=r.length?r:void 0}function applySdkMetadataToEvent(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function applySpanToEvent(e,t){e.contexts={trace:spanToTraceContext(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:getDynamicSamplingContextFromSpan(t),...e.sdkProcessingMetadata};const r=spanToJSON(getRootSpan(t)).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}function applyFingerprintToEvent(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function prepareEvent(e,t,r,n,a,i){const{normalizeDepth:s=3,normalizeMaxBreadth:o=1e3}=e,l={...t,event_id:t.event_id||r.event_id||uuid4(),timestamp:t.timestamp||dateTimestampInSeconds()},c=r.integrations||e.integrations.map((e=>e.name));applyClientOptions(l,e),applyIntegrationsMetadata(l,c),a&&a.emit("applyFrameMetadata",t),void 0===t.type&&applyDebugIds(l,e.stackParser);const h=getFinalScope(n,r.captureContext);r.mechanism&&addExceptionMechanism(l,r.mechanism);const p=a?a.getEventProcessors():[],d=getGlobalScope().getScopeData();if(i){mergeScopeData(d,i.getScopeData())}if(h){mergeScopeData(d,h.getScopeData())}const u=[...r.attachments||[],...d.attachments];u.length&&(r.attachments=u),applyScopeDataToEvent(l,d);return notifyEventProcessors([...p,...d.eventProcessors],l,r).then((e=>(e&&applyDebugMeta(e),"number"==typeof s&&s>0?normalizeEvent(e,s,o):e)))}function applyClientOptions(e,t){const{environment:r,release:n,dist:a,maxValueLength:i=250}=t;e.environment=e.environment||r||DEFAULT_ENVIRONMENT,!e.release&&n&&(e.release=n),!e.dist&&a&&(e.dist=a),e.message&&(e.message=truncate(e.message,i));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=truncate(s.value,i));const o=e.request;o&&o.url&&(o.url=truncate(o.url,i))}function applyDebugIds(e,t){const r=getFilenameToDebugIdMap(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{r&&e.filename&&(e.debug_id=r[e.filename])}))}))}catch(e){}}function applyDebugMeta(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const r=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{r.push({type:"sourcemap",code_file:e,debug_id:t})}))}function applyIntegrationsMetadata(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function normalizeEvent(e,t,r){if(!e)return null;const n={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:normalize(e.data,t,r)}})))},...e.user&&{user:normalize(e.user,t,r)},...e.contexts&&{contexts:normalize(e.contexts,t,r)},...e.extra&&{extra:normalize(e.extra,t,r)}};return e.contexts&&e.contexts.trace&&n.contexts&&(n.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(n.contexts.trace.data=normalize(e.contexts.trace.data,t,r))),e.spans&&(n.spans=e.spans.map((e=>({...e,...e.data&&{data:normalize(e.data,t,r)}})))),e.contexts&&e.contexts.flags&&n.contexts&&(n.contexts.flags=normalize(e.contexts.flags,3,r)),n}function getFinalScope(e,t){if(!t)return e;const r=e?e.clone():new Scope;return r.update(t),r}function parseEventHintOrCaptureContext(e){}function captureException(e,t){return getCurrentScope().captureException(e,parseEventHintOrCaptureContext())}function captureMessage(e,t){const r="string"==typeof t?t:void 0,n="string"!=typeof t?{captureContext:t}:void 0;return getCurrentScope().captureMessage(e,r,n)}function captureEvent(e,t){return getCurrentScope().captureEvent(e,t)}function startSession(e){const t=getClient(),r=getIsolationScope(),n=getCurrentScope(),{release:a,environment:i=DEFAULT_ENVIRONMENT}=t&&t.getOptions()||{},{userAgent:s}=GLOBAL_OBJ.navigator||{},o=makeSession({release:a,environment:i,user:n.getUser()||r.getUser(),...s&&{userAgent:s},...e}),l=r.getSession();return l&&"ok"===l.status&&updateSession(l,{status:"exited"}),endSession(),r.setSession(o),n.setSession(o),o}function endSession(){const e=getIsolationScope(),t=getCurrentScope(),r=t.getSession()||e.getSession();r&&closeSession(r),_sendSessionUpdate(),e.setSession(),t.setSession()}function _sendSessionUpdate(){const e=getIsolationScope(),t=getCurrentScope(),r=getClient(),n=t.getSession()||e.getSession();n&&r&&r.captureSession(n)}function captureSession(e=!1){e?endSession():_sendSessionUpdate()}const SENTRY_API_VERSION="7";function getBaseApiEndpoint(e){const t=e.protocol?`${e.protocol}:`:"",r=e.port?`:${e.port}`:"";return`${t}//${e.host}${r}${e.path?`/${e.path}`:""}/api/`}function _getIngestEndpoint(e){return`${getBaseApiEndpoint(e)}${e.projectId}/envelope/`}function _encodedAuth(e,t){const r={sentry_version:SENTRY_API_VERSION};return e.publicKey&&(r.sentry_key=e.publicKey),t&&(r.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(r).toString()}function getEnvelopeEndpointWithUrlEncodedAuth(e,t,r){return t||`${_getIngestEndpoint(e)}?${_encodedAuth(e,r)}`}const installedIntegrations=[];function filterDuplicates(e){const t={};return e.forEach((e=>{const{name:r}=e,n=t[r];n&&!n.isDefaultInstance&&e.isDefaultInstance||(t[r]=e)})),Object.values(t)}function getIntegrationsToSetup(e){const t=e.defaultIntegrations||[],r=e.integrations;let n;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(r))n=[...t,...r];else if("function"==typeof r){const e=r(t);n=Array.isArray(e)?e:[e]}else n=t;const a=filterDuplicates(n),i=a.findIndex((e=>"Debug"===e.name));if(i>-1){const[e]=a.splice(i,1);a.push(e)}return a}function setupIntegrations(e,t){const r={};return t.forEach((t=>{t&&setupIntegration(e,t,r)})),r}function afterSetupIntegrations(e,t){for(const r of t)r&&r.afterAllSetup&&r.afterAllSetup(e)}function setupIntegration(e,t,r){if(r[t.name])DEBUG_BUILD$3&&logger.log(`Integration skipped because it was already installed: ${t.name}`);else{if(r[t.name]=t,-1===installedIntegrations.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),installedIntegrations.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,n)=>r(t,n,e)))}if("function"==typeof t.processEvent){const r=t.processEvent.bind(t),n=Object.assign(((t,n)=>r(t,n,e)),{id:t.name});e.addEventProcessor(n)}DEBUG_BUILD$3&&logger.log(`Integration installed: ${t.name}`)}}function defineIntegration(e){return e}function createClientReportEnvelope(e,t,r){return createEnvelope(t?{dsn:t}:{},[[{type:"client_report"},{timestamp:dateTimestampInSeconds(),discarded_events:e}]])}class SentryError extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}const ALREADY_SEEN_ERROR="Not capturing exception because it's already been captured.";class BaseClient{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=makeDsn(e.dsn):DEBUG_BUILD$3&&logger.warn("No DSN provided, client will not send events."),this._dsn){const t=getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}const t=["enableTracing","tracesSampleRate","tracesSampler"].find((t=>t in e&&null==e[t]));t&&consoleSandbox((()=>{console.warn(`[Sentry] Deprecation warning: \`${t}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,r){const n=uuid4();if(checkOrSetAlreadyCaught(e))return DEBUG_BUILD$3&&logger.log(ALREADY_SEEN_ERROR),n;const a={event_id:n,...t};return this._process(this.eventFromException(e,a).then((e=>this._captureEvent(e,a,r)))),a.event_id}captureMessage(e,t,r,n){const a={event_id:uuid4(),...r},i=isParameterizedString(e)?e:String(e),s=isPrimitive(e)?this.eventFromMessage(i,t,a):this.eventFromException(e,a);return this._process(s.then((e=>this._captureEvent(e,a,n)))),a.event_id}captureEvent(e,t,r){const n=uuid4();if(t&&t.originalException&&checkOrSetAlreadyCaught(t.originalException))return DEBUG_BUILD$3&&logger.log(ALREADY_SEEN_ERROR),n;const a={event_id:n,...t},i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,a,i||r)),a.event_id}captureSession(e){"string"!=typeof e.release?DEBUG_BUILD$3&&logger.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),updateSession(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((r=>t.flush(e).then((e=>r&&e))))):resolvedSyncPromise(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];setupIntegration(this,e,this._integrations),t||afterSetupIntegrations(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let r=createEventEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])r=addItemToEnvelope(r,createAttachmentEnvelopeItem(e));const n=this.sendEnvelope(r);n&&n.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=createSessionEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){const n="number"==typeof r?r:1,a=`${e}:${t}`;DEBUG_BUILD$3&&logger.log(`Recording outcome: "${a}"${n>1?` (${n} times)`:""}`),this._outcomes[a]=(this._outcomes[a]||0)+n}}on(e,t){const r=this._hooks[e]=this._hooks[e]||[];return r.push(t),()=>{const e=r.indexOf(t);e>-1&&r.splice(e,1)}}emit(e,...t){const r=this._hooks[e];r&&r.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(DEBUG_BUILD$3&&logger.error("Error while sending envelope:",e),e))):(DEBUG_BUILD$3&&logger.error("Transport disabled"),resolvedSyncPromise({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=setupIntegrations(this,e),afterSetupIntegrations(this,e)}_updateSessionFromEvent(e,t){let r="fatal"===t.level,n=!1;const a=t.exception&&t.exception.values;if(a){n=!0;for(const e of a){const t=e.mechanism;if(t&&!1===t.handled){r=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&r)&&(updateSession(e,{...r&&{status:"crashed"},errors:e.errors||Number(n||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new SyncPromise((t=>{let r=0;const n=setInterval((()=>{0==this._numProcessing?(clearInterval(n),t(!0)):(r+=1,e&&r>=e&&(clearInterval(n),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,r=getCurrentScope(),n=getIsolationScope()){const a=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||n.setLastEventId(e.event_id||t.event_id),prepareEvent(a,e,t,r,this,n).then((e=>{if(null===e)return e;e.contexts={trace:getTraceContextFromScope(r),...e.contexts};const t=getDynamicSamplingContextFromScope(this,r);return e.sdkProcessingMetadata={dynamicSamplingContext:t,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then((e=>e.event_id),(e=>{DEBUG_BUILD$3&&(e instanceof SentryError&&"log"===e.logLevel?logger.log(e.message):logger.warn(e))}))}_processEvent(e,t,r){const n=this.getOptions(),{sampleRate:a}=n,i=isTransactionEvent(e),s=isErrorEvent(e),o=e.type||"error",l=`before send for type \`${o}\``,c=void 0===a?void 0:parseSampleRate(a);if(s&&"number"==typeof c&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),rejectedSyncPromise(new SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const h="replay_event"===o?"replay":o,p=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,r,p).then((r=>{if(null===r)throw this.recordDroppedEvent("event_processor",h,e),new SentryError("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return r;return _validateBeforeSendResult(processBeforeSend(this,n,r,t),l)})).then((n=>{if(null===n){if(this.recordDroppedEvent("before_send",h,e),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new SentryError(`${l} returned \`null\`, will not send event.`,"log")}const a=r&&r.getSession();if(!i&&a&&this._updateSessionFromEvent(a,n),i){const e=(n.sdkProcessingMetadata&&n.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(n.spans?n.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const s=n.transaction_info;if(i&&s&&n.transaction!==e.transaction){const e="custom";n.transaction_info={...s,source:e}}return this.sendEvent(n,t),n})).then(null,(e=>{if(e instanceof SentryError)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[r,n]=e.split(":");return{reason:r,category:n,quantity:t}}))}_flushOutcomes(){DEBUG_BUILD$3&&logger.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(DEBUG_BUILD$3&&logger.log("No outcomes to send"));if(!this._dsn)return void(DEBUG_BUILD$3&&logger.log("No dsn provided, will not send outcomes"));DEBUG_BUILD$3&&logger.log("Sending outcomes:",e);const t=createClientReportEnvelope(e,this._options.tunnel&&dsnToString(this._dsn));this.sendEnvelope(t)}}function _validateBeforeSendResult(e,t){const r=`${t} must return \`null\` or a valid event.`;if(isThenable(e))return e.then((e=>{if(!isPlainObject(e)&&null!==e)throw new SentryError(r);return e}),(e=>{throw new SentryError(`${t} rejected with ${e}`)}));if(!isPlainObject(e)&&null!==e)throw new SentryError(r);return e}function processBeforeSend(e,t,r,n){const{beforeSend:a,beforeSendTransaction:i,beforeSendSpan:s}=t;if(isErrorEvent(r)&&a)return a(r,n);if(isTransactionEvent(r)){if(r.spans&&s){const t=[];for(const n of r.spans){const r=s(n);r?t.push(r):(showSpanDropWarning(),e.recordDroppedEvent("before_send","span"))}r.spans=t}if(i){if(r.spans){const e=r.spans.length;r.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(r,n)}}return r}function isErrorEvent(e){return void 0===e.type}function isTransactionEvent(e){return"transaction"===e.type}function initAndBind(e,t){!0===t.debug&&(DEBUG_BUILD$3?logger.enable():consoleSandbox((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));getCurrentScope().update(t.initialScope);const r=new e(t);return setCurrentClient(r),r.init(),r}function setCurrentClient(e){getCurrentScope().setClient(e)}function makePromiseBuffer(e){const t=[];function r(e){return t.splice(t.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:t,add:function(n){if(!(void 0===e||t.length<e))return rejectedSyncPromise(new SentryError("Not adding Promise because buffer limit was reached."));const a=n();return-1===t.indexOf(a)&&t.push(a),a.then((()=>r(a))).then(null,(()=>r(a).then(null,(()=>{})))),a},drain:function(e){return new SyncPromise(((r,n)=>{let a=t.length;if(!a)return r(!0);const i=setTimeout((()=>{e&&e>0&&r(!1)}),e);t.forEach((e=>{resolvedSyncPromise(e).then((()=>{--a||(clearTimeout(i),r(!0))}),n)}))}))}}}const DEFAULT_RETRY_AFTER=6e4;function parseRetryAfterHeader(e,t=Date.now()){const r=parseInt(`${e}`,10);if(!isNaN(r))return 1e3*r;const n=Date.parse(`${e}`);return isNaN(n)?DEFAULT_RETRY_AFTER:n-t}function disabledUntil(e,t){return e[t]||e.all||0}function isRateLimited(e,t,r=Date.now()){return disabledUntil(e,t)>r}function updateRateLimits(e,{statusCode:t,headers:r},n=Date.now()){const a={...e},i=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,r,,,i]=e.split(":",5),s=parseInt(t,10),o=1e3*(isNaN(s)?60:s);if(r)for(const e of r.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(a[e]=n+o);else a.all=n+o}else s?a.all=n+parseRetryAfterHeader(s,n):429===t&&(a.all=n+6e4);return a}const DEFAULT_TRANSPORT_BUFFER_SIZE=64;function createTransport(e,t,r=makePromiseBuffer(e.bufferSize||DEFAULT_TRANSPORT_BUFFER_SIZE)){let n={};return{send:function(a){const i=[];if(forEachEnvelopeItem(a,((t,r)=>{const a=envelopeItemTypeToDataCategory(r);if(isRateLimited(n,a)){const n=getEventForEnvelopeItem(t,r);e.recordDroppedEvent("ratelimit_backoff",a,n)}else i.push(t)})),0===i.length)return resolvedSyncPromise({});const s=createEnvelope(a[0],i),o=t=>{forEachEnvelopeItem(s,((r,n)=>{const a=getEventForEnvelopeItem(r,n);e.recordDroppedEvent(t,envelopeItemTypeToDataCategory(n),a)}))};return r.add((()=>t({body:serializeEnvelope(s)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&DEBUG_BUILD$3&&logger.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),n=updateRateLimits(n,e),e)),(e=>{throw o("network_error"),e})))).then((e=>e),(e=>{if(e instanceof SentryError)return DEBUG_BUILD$3&&logger.error("Skipped sending event because buffer is full."),o("queue_overflow"),resolvedSyncPromise({});throw e}))},flush:e=>r.drain(e)}}function getEventForEnvelopeItem(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function applySdkMetadata(e,t,r=[t],n="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:r.map((e=>({name:`${n}:@sentry/${e}`,version:SDK_VERSION}))),version:SDK_VERSION}),e._metadata=a}const DEFAULT_BREADCRUMBS=100;function addBreadcrumb(e,t){const r=getClient(),n=getIsolationScope();if(!r)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:i=DEFAULT_BREADCRUMBS}=r.getOptions();if(i<=0)return;const s={timestamp:dateTimestampInSeconds(),...e},o=a?consoleSandbox((()=>a(s,t))):s;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,i))}let originalFunctionToString;const INTEGRATION_NAME$6="FunctionToString",SETUP_CLIENTS=new WeakMap,_functionToStringIntegration=()=>({name:INTEGRATION_NAME$6,setupOnce(){originalFunctionToString=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=getOriginalFunction(this),r=SETUP_CLIENTS.has(getClient())&&void 0!==t?t:this;return originalFunctionToString.apply(r,e)}}catch(e){}},setup(e){SETUP_CLIENTS.set(e,!0)}}),functionToStringIntegration=defineIntegration(_functionToStringIntegration),DEFAULT_IGNORE_ERRORS=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],INTEGRATION_NAME$5="InboundFilters",_inboundFiltersIntegration=(e={})=>({name:INTEGRATION_NAME$5,processEvent(t,r,n){const a=n.getOptions();return _shouldDropEvent$1(t,_mergeOptions(e,a))?null:t}}),inboundFiltersIntegration=defineIntegration(_inboundFiltersIntegration);function _mergeOptions(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:DEFAULT_IGNORE_ERRORS],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}function _shouldDropEvent$1(e,t){return t.ignoreInternal&&_isSentryError(e)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${getEventDescription(e)}`),!0):_isIgnoredError(e,t.ignoreErrors)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${getEventDescription(e)}`),!0):_isUselessError(e)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${getEventDescription(e)}`),!0):_isIgnoredTransaction(e,t.ignoreTransactions)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${getEventDescription(e)}`),!0):_isDeniedUrl(e,t.denyUrls)?(DEBUG_BUILD$3&&logger.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${getEventDescription(e)}.\nUrl: ${_getEventFilterUrl(e)}`),!0):!_isAllowedUrl(e,t.allowUrls)&&(DEBUG_BUILD$3&&logger.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${getEventDescription(e)}.\nUrl: ${_getEventFilterUrl(e)}`),!0)}function _isIgnoredError(e,t){return!(e.type||!t||!t.length)&&_getPossibleEventMessages(e).some((e=>stringMatchesSomePattern(e,t)))}function _isIgnoredTransaction(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const r=e.transaction;return!!r&&stringMatchesSomePattern(r,t)}function _isDeniedUrl(e,t){if(!t||!t.length)return!1;const r=_getEventFilterUrl(e);return!!r&&stringMatchesSomePattern(r,t)}function _isAllowedUrl(e,t){if(!t||!t.length)return!0;const r=_getEventFilterUrl(e);return!r||stringMatchesSomePattern(r,t)}function _getPossibleEventMessages(e){const t=[];let r;e.message&&t.push(e.message);try{r=e.exception.values[e.exception.values.length-1]}catch(e){}return r&&r.value&&(t.push(r.value),r.type&&t.push(`${r.type}: ${r.value}`)),t}function _isSentryError(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}function _getLastValidUrl(e=[]){for(let t=e.length-1;t>=0;t--){const r=e[t];if(r&&"<anonymous>"!==r.filename&&"[native code]"!==r.filename)return r.filename||null}return null}function _getEventFilterUrl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?_getLastValidUrl(t):null}catch(t){return DEBUG_BUILD$3&&logger.error(`Cannot extract url for event ${getEventDescription(e)}`),null}}function _isUselessError(e){return!e.type&&(!(!e.exception||!e.exception.values||0===e.exception.values.length)&&(!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))))}function applyAggregateErrorsToEvent(e,t,r=250,n,a,i,s){if(!(i.exception&&i.exception.values&&s&&isInstanceOf(s.originalException,Error)))return;const o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=truncateAggregateExceptions(aggregateExceptionsFromError(e,t,a,s.originalException,n,i.exception.values,o,0),r))}function aggregateExceptionsFromError(e,t,r,n,a,i,s,o){if(i.length>=r+1)return i;let l=[...i];if(isInstanceOf(n[a],Error)){applyExceptionGroupFieldsForParentException(s,o);const i=e(t,n[a]),c=l.length;applyExceptionGroupFieldsForChildException(i,a,c,o),l=aggregateExceptionsFromError(e,t,r,n[a],a,[i,...l],i,c)}return Array.isArray(n.errors)&&n.errors.forEach(((n,i)=>{if(isInstanceOf(n,Error)){applyExceptionGroupFieldsForParentException(s,o);const c=e(t,n),h=l.length;applyExceptionGroupFieldsForChildException(c,`errors[${i}]`,h,o),l=aggregateExceptionsFromError(e,t,r,n,a,[c,...l],c,h)}})),l}function applyExceptionGroupFieldsForParentException(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function applyExceptionGroupFieldsForChildException(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function truncateAggregateExceptions(e,t){return e.map((e=>(e.value&&(e.value=truncate(e.value,t)),e)))}function parseUrl$1(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const r=t[6]||"",n=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:r,hash:n,relative:t[5]+r+n}}function addConsoleInstrumentationHandler(e){const t="console";addHandler(t,e),maybeInstrument(t,instrumentConsole)}function instrumentConsole(){"console"in GLOBAL_OBJ&&CONSOLE_LEVELS.forEach((function(e){e in GLOBAL_OBJ.console&&fill(GLOBAL_OBJ.console,e,(function(t){return originalConsoleMethods[e]=t,function(...t){triggerHandlers("console",{args:t,level:e});const r=originalConsoleMethods[e];r&&r.apply(GLOBAL_OBJ.console,t)}}))}))}function severityLevelFromString(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const INTEGRATION_NAME$4="Dedupe",_dedupeIntegration=()=>{let e;return{name:INTEGRATION_NAME$4,processEvent(t){if(t.type)return t;try{if(_shouldDropEvent(t,e))return DEBUG_BUILD$3&&logger.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}},dedupeIntegration=defineIntegration(_dedupeIntegration);function _shouldDropEvent(e,t){return!!t&&(!!_isSameMessageEvent(e,t)||!!_isSameExceptionEvent(e,t))}function _isSameMessageEvent(e,t){const r=e.message,n=t.message;return!(!r&&!n)&&(!(r&&!n||!r&&n)&&(r===n&&(!!_isSameFingerprint(e,t)&&!!_isSameStacktrace(e,t))))}function _isSameExceptionEvent(e,t){const r=_getExceptionFromEvent(t),n=_getExceptionFromEvent(e);return!(!r||!n)&&(r.type===n.type&&r.value===n.value&&(!!_isSameFingerprint(e,t)&&!!_isSameStacktrace(e,t)))}function _isSameStacktrace(e,t){let r=getFramesFromEvent(e),n=getFramesFromEvent(t);if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e],a=r[e];if(t.filename!==a.filename||t.lineno!==a.lineno||t.colno!==a.colno||t.function!==a.function)return!1}return!0}function _isSameFingerprint(e,t){let r=e.fingerprint,n=t.fingerprint;if(!r&&!n)return!0;if(r&&!n||!r&&n)return!1;try{return!(r.join("")!==n.join(""))}catch(e){return!1}}function _getExceptionFromEvent(e){return e.exception&&e.exception.values&&e.exception.values[0]}function getBreadcrumbLogLevelFromHttpStatusCode(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0}const WINDOW$3=GLOBAL_OBJ;function supportsFetch(){if(!("fetch"in WINDOW$3))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function isNativeFunction(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function supportsNativeFetch(){if("string"==typeof EdgeRuntime)return!0;if(!supportsFetch())return!1;if(isNativeFunction(WINDOW$3.fetch))return!0;let e=!1;const t=WINDOW$3.document;if(t&&"function"==typeof t.createElement)try{const r=t.createElement("iframe");r.hidden=!0,t.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(e=isNativeFunction(r.contentWindow.fetch)),t.head.removeChild(r)}catch(e){DEBUG_BUILD$2&&logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}function addFetchInstrumentationHandler(e,t){const r="fetch";addHandler(r,e),maybeInstrument(r,(()=>instrumentFetch(void 0,t)))}function instrumentFetch(e,t=!1){t&&!supportsNativeFetch()||fill(GLOBAL_OBJ,"fetch",(function(e){return function(...t){const r=new Error,{method:n,url:a}=parseFetchArgs(t),i={args:t,fetchData:{method:n,url:a},startTimestamp:1e3*timestampInSeconds(),virtualError:r};return triggerHandlers("fetch",{...i}),e.apply(GLOBAL_OBJ,t).then((async e=>(triggerHandlers("fetch",{...i,endTimestamp:1e3*timestampInSeconds(),response:e}),e)),(e=>{throw triggerHandlers("fetch",{...i,endTimestamp:1e3*timestampInSeconds(),error:e}),isError(e)&&void 0===e.stack&&(e.stack=r.stack,addNonEnumerableProperty(e,"framesToPop",1)),e}))}}))}function hasProp(e,t){return!!e&&"object"==typeof e&&!!e[t]}function getUrlFromResource(e){return"string"==typeof e?e:e?hasProp(e,"url")?e.url:e.toString?e.toString():"":""}function parseFetchArgs(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,r]=e;return{url:getUrlFromResource(t),method:hasProp(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:getUrlFromResource(t),method:hasProp(t,"method")?String(t.method).toUpperCase():"GET"}}function getSDKSource(){return"npm"}const WINDOW$2=GLOBAL_OBJ;function supportsHistory(){const e=WINDOW$2.chrome,t=e&&e.app&&e.app.runtime,r="history"in WINDOW$2&&!!WINDOW$2.history.pushState&&!!WINDOW$2.history.replaceState;return!t&&r}const WINDOW$1=GLOBAL_OBJ;let ignoreOnError=0;function shouldIgnoreOnError(){return ignoreOnError>0}function ignoreNextOnError(){ignoreOnError++,setTimeout((()=>{ignoreOnError--}))}function wrap(e,t={}){if(!function(e){return"function"==typeof e}(e))return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(getOriginalFunction(e))return e}catch(t){return e}const r=function(...r){try{const n=r.map((e=>wrap(e,t)));return e.apply(this,n)}catch(e){throw ignoreNextOnError(),withScope((n=>{n.addEventProcessor((e=>(t.mechanism&&(addExceptionTypeValue(e,void 0),addExceptionMechanism(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),captureException(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}markFunctionWrapped(r,e),addNonEnumerableProperty(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}const DEBUG_BUILD$1="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function exceptionFromError(e,t){const r=parseStackFrames(e,t),n={type:extractType(t),value:extractMessage(t)};return r.length&&(n.stacktrace={frames:r}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function eventFromPlainObject(e,t,r,n){const a=getClient(),i=a&&a.getOptions().normalizeDepth,s=getErrorPropertyFromObject(t),o={__serialized__:normalizeToSize(t,i)};if(s)return{exception:{values:[exceptionFromError(e,s)]},extra:o};const l={exception:{values:[{type:isEvent(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:getNonErrorObjectExceptionValue(t,{isUnhandledRejection:n})}]},extra:o};if(r){const t=parseStackFrames(e,r);t.length&&(l.exception.values[0].stacktrace={frames:t})}return l}function eventFromError(e,t){return{exception:{values:[exceptionFromError(e,t)]}}}function parseStackFrames(e,t){const r=t.stacktrace||t.stack||"",n=getSkipFirstStackStringLines(t),a=getPopFirstTopFrames(t);try{return e(r,n,a)}catch(e){}return[]}const reactMinifiedRegexp=/Minified React error #\d+;/i;function getSkipFirstStackStringLines(e){return e&&reactMinifiedRegexp.test(e.message)?1:0}function getPopFirstTopFrames(e){return"number"==typeof e.framesToPop?e.framesToPop:0}function isWebAssemblyException(e){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&e instanceof WebAssembly.Exception}function extractType(e){const t=e&&e.name;if(!t&&isWebAssemblyException(e)){return e.message&&Array.isArray(e.message)&&2==e.message.length?e.message[0]:"WebAssembly.Exception"}return t}function extractMessage(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:isWebAssemblyException(e)&&Array.isArray(e.message)&&2==e.message.length?e.message[1]:t:"No error message"}function eventFromException(e,t,r,n){const a=eventFromUnknownInput(e,t,r&&r.syntheticException||void 0,n);return addExceptionMechanism(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id),resolvedSyncPromise(a)}function eventFromMessage(e,t,r="info",n,a){const i=eventFromString(e,t,n&&n.syntheticException||void 0,a);return i.level=r,n&&n.event_id&&(i.event_id=n.event_id),resolvedSyncPromise(i)}function eventFromUnknownInput(e,t,r,n,a){let i;if(isErrorEvent$1(t)&&t.error){return eventFromError(e,t.error)}if(isDOMError(t)||isDOMException(t)){const a=t;if("stack"in t)i=eventFromError(e,t);else{const t=a.name||(isDOMError(a)?"DOMError":"DOMException"),s=a.message?`${t}: ${a.message}`:t;i=eventFromString(e,s,r,n),addExceptionTypeValue(i,s)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}if(isError(t))return eventFromError(e,t);if(isPlainObject(t)||isEvent(t)){return i=eventFromPlainObject(e,t,r,a),addExceptionMechanism(i,{synthetic:!0}),i}return i=eventFromString(e,t,r,n),addExceptionTypeValue(i,`${t}`),addExceptionMechanism(i,{synthetic:!0}),i}function eventFromString(e,t,r,n){const a={};if(n&&r){const n=parseStackFrames(e,r);n.length&&(a.exception={values:[{value:t,stacktrace:{frames:n}}]}),addExceptionMechanism(a,{synthetic:!0})}if(isParameterizedString(t)){const{__sentry_template_string__:e,__sentry_template_values__:r}=t;return a.logentry={message:e,params:r},a}return a.message=t,a}function getNonErrorObjectExceptionValue(e,{isUnhandledRejection:t}){const r=extractExceptionKeysForMessage(e),n=t?"promise rejection":"exception";if(isErrorEvent$1(e))return`Event \`ErrorEvent\` captured as ${n} with message \`${e.message}\``;if(isEvent(e)){return`Event \`${getObjectClassName(e)}\` (type=${e.type}) captured as ${n}`}return`Object captured as ${n} with keys: ${r}`}function getObjectClassName(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}function getErrorPropertyFromObject(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];if(r instanceof Error)return r}}function createUserFeedbackEnvelope(e,{metadata:t,tunnel:r,dsn:n}){return createEnvelope({event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!r&&!!n&&{dsn:dsnToString(n)}},[createUserFeedbackEnvelopeItem(e)])}function createUserFeedbackEnvelopeItem(e){return[{type:"user_report"},e]}class BrowserClient extends BaseClient{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};applySdkMetadata(t,"browser",["browser"],WINDOW$1.SENTRY_SDK_SOURCE||getSDKSource()),super(t),t.sendClientReports&&WINDOW$1.document&&WINDOW$1.document.addEventListener("visibilitychange",(()=>{"hidden"===WINDOW$1.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return eventFromException(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",r){return eventFromMessage(this._options.stackParser,e,t,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(DEBUG_BUILD$1&&logger.warn("SDK not enabled, will not capture user feedback."));const t=createUserFeedbackEnvelope(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(t)}_prepareEvent(e,t,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,r)}}const DEBUG_BUILD="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,WINDOW=GLOBAL_OBJ,DEBOUNCE_DURATION=1e3;let debounceTimerID,lastCapturedEventType,lastCapturedEventTargetId,lastHref;function addClickKeypressInstrumentationHandler(e){addHandler("dom",e),maybeInstrument("dom",instrumentDOM)}function instrumentDOM(){if(!WINDOW.document)return;const e=triggerHandlers.bind(null,"dom"),t=makeDOMEventHandler(e,!0);WINDOW.document.addEventListener("click",t,!1),WINDOW.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const r=WINDOW[t],n=r&&r.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(fill(n,"addEventListener",(function(t){return function(r,n,a){if("click"===r||"keypress"==r)try{const n=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=n[r]=n[r]||{refCount:0};if(!i.handler){const n=makeDOMEventHandler(e);i.handler=n,t.call(this,r,n,a)}i.refCount++}catch(e){}return t.call(this,r,n,a)}})),fill(n,"removeEventListener",(function(e){return function(t,r,n){if("click"===t||"keypress"==t)try{const r=this.__sentry_instrumentation_handlers__||{},a=r[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,n),a.handler=void 0,delete r[t]),0===Object.keys(r).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,r,n)}})))}))}function isSimilarToLastCapturedEvent(e){if(e.type!==lastCapturedEventType)return!1;try{if(!e.target||e.target._sentryId!==lastCapturedEventTargetId)return!1}catch(e){}return!0}function shouldSkipDOMEvent(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}function makeDOMEventHandler(e,t=!1){return r=>{if(!r||r._sentryCaptured)return;const n=getEventTarget(r);if(shouldSkipDOMEvent(r.type,n))return;addNonEnumerableProperty(r,"_sentryCaptured",!0),n&&!n._sentryId&&addNonEnumerableProperty(n,"_sentryId",uuid4());const a="keypress"===r.type?"input":r.type;if(!isSimilarToLastCapturedEvent(r)){e({event:r,name:a,global:t}),lastCapturedEventType=r.type,lastCapturedEventTargetId=n?n._sentryId:void 0}clearTimeout(debounceTimerID),debounceTimerID=WINDOW.setTimeout((()=>{lastCapturedEventTargetId=void 0,lastCapturedEventType=void 0}),DEBOUNCE_DURATION)}}function getEventTarget(e){try{return e.target}catch(e){return null}}function addHistoryInstrumentationHandler(e){const t="history";addHandler(t,e),maybeInstrument(t,instrumentHistory)}function instrumentHistory(){if(!supportsHistory())return;const e=WINDOW.onpopstate;function t(e){return function(...t){const r=t.length>2?t[2]:void 0;if(r){const e=lastHref,t=String(r);lastHref=t;triggerHandlers("history",{from:e,to:t})}return e.apply(this,t)}}WINDOW.onpopstate=function(...t){const r=WINDOW.location.href,n=lastHref;lastHref=r;if(triggerHandlers("history",{from:n,to:r}),e)try{return e.apply(this,t)}catch(e){}},fill(WINDOW.history,"pushState",t),fill(WINDOW.history,"replaceState",t)}const cachedImplementations={};function getNativeImplementation(e){const t=cachedImplementations[e];if(t)return t;let r=WINDOW[e];if(isNativeFunction(r))return cachedImplementations[e]=r.bind(WINDOW);const n=WINDOW.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(t)}catch(t){DEBUG_BUILD&&logger.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return r?cachedImplementations[e]=r.bind(WINDOW):r}function clearCachedImplementation(e){cachedImplementations[e]=void 0}const SENTRY_XHR_DATA_KEY="__sentry_xhr_v3__";function addXhrInstrumentationHandler(e){addHandler("xhr",e),maybeInstrument("xhr",instrumentXHR)}function instrumentXHR(){if(!WINDOW.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,r){const n=new Error,a=1e3*timestampInSeconds(),i=isString(r[0])?r[0].toUpperCase():void 0,s=parseUrl(r[1]);if(!i||!s)return e.apply(t,r);t[SENTRY_XHR_DATA_KEY]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(t.__sentry_own_request__=!0);const o=()=>{const e=t[SENTRY_XHR_DATA_KEY];if(e&&4===t.readyState){try{e.status_code=t.status}catch(e){}triggerHandlers("xhr",{endTimestamp:1e3*timestampInSeconds(),startTimestamp:a,xhr:t,virtualError:n})}};return"onreadystatechange"in t&&"function"==typeof t.onreadystatechange?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply:(e,t,r)=>(o(),e.apply(t,r))}):t.addEventListener("readystatechange",o),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,r){const[n,a]=r,i=t[SENTRY_XHR_DATA_KEY];return i&&isString(n)&&isString(a)&&(i.request_headers[n.toLowerCase()]=a),e.apply(t,r)}}),e.apply(t,r)}}),e.send=new Proxy(e.send,{apply(e,t,r){const n=t[SENTRY_XHR_DATA_KEY];if(!n)return e.apply(t,r);void 0!==r[0]&&(n.body=r[0]);return triggerHandlers("xhr",{startTimestamp:1e3*timestampInSeconds(),xhr:t}),e.apply(t,r)}})}function parseUrl(e){if(isString(e))return e;try{return e.toString()}catch(e){}}function makeFetchTransport(e,t=getNativeImplementation("fetch")){let r=0,n=0;return createTransport(e,(function(a){const i=a.body.length;r+=i,n++;const s={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:r<=6e4&&n<15,...e.fetchOptions};if(!t)return clearCachedImplementation("fetch"),rejectedSyncPromise("No fetch implementation available");try{return t(e.url,s).then((e=>(r-=i,n--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return clearCachedImplementation("fetch"),r-=i,n--,rejectedSyncPromise(e)}}))}const CHROME_PRIORITY=30,GECKO_PRIORITY=50;function createFrame(e,t,r,n){const a={filename:e,function:"<anonymous>"===t?UNKNOWN_FUNCTION:t,in_app:!0};return void 0!==r&&(a.lineno=r),void 0!==n&&(a.colno=n),a}const chromeRegexNoFnName=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,chromeRegex=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,chromeEvalRegex=/\((\S*)(?::(\d+))(?::(\d+))\)/,chromeStackParserFn=e=>{const t=chromeRegexNoFnName.exec(e);if(t){const[,e,r,n]=t;return createFrame(e,UNKNOWN_FUNCTION,+r,+n)}const r=chromeRegex.exec(e);if(r){if(r[2]&&0===r[2].indexOf("eval")){const e=chromeEvalRegex.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}const[e,t]=extractSafariExtensionDetails(r[1]||UNKNOWN_FUNCTION,r[2]);return createFrame(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},chromeStackLineParser=[CHROME_PRIORITY,chromeStackParserFn],geckoREgex=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,geckoEvalRegex=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gecko=e=>{const t=geckoREgex.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=geckoEvalRegex.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],r=t[1]||UNKNOWN_FUNCTION;return[r,e]=extractSafariExtensionDetails(r,e),createFrame(e,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},geckoStackLineParser=[GECKO_PRIORITY,gecko],defaultStackLineParsers=[chromeStackLineParser,geckoStackLineParser],defaultStackParser=createStackParser(...defaultStackLineParsers),extractSafariExtensionDetails=(e,t)=>{const r=-1!==e.indexOf("safari-extension"),n=-1!==e.indexOf("safari-web-extension");return r||n?[-1!==e.indexOf("@")?e.split("@")[0]:UNKNOWN_FUNCTION,r?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},MAX_ALLOWED_STRING_LENGTH=1024,INTEGRATION_NAME$3="Breadcrumbs",_breadcrumbsIntegration=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:INTEGRATION_NAME$3,setup(e){t.console&&addConsoleInstrumentationHandler(_getConsoleBreadcrumbHandler(e)),t.dom&&addClickKeypressInstrumentationHandler(_getDomBreadcrumbHandler(e,t.dom)),t.xhr&&addXhrInstrumentationHandler(_getXhrBreadcrumbHandler(e)),t.fetch&&addFetchInstrumentationHandler(_getFetchBreadcrumbHandler(e)),t.history&&addHistoryInstrumentationHandler(_getHistoryBreadcrumbHandler(e)),t.sentry&&e.on("beforeSendEvent",_getSentryBreadcrumbHandler(e))}}},breadcrumbsIntegration=defineIntegration(_breadcrumbsIntegration);function _getSentryBreadcrumbHandler(e){return function(t){getClient()===e&&addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:getEventDescription(t)},{event:t})}}function _getDomBreadcrumbHandler(e,t){return function(r){if(getClient()!==e)return;let n,a,i="object"==typeof t?t.serializeAttribute:void 0,s="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;s&&s>MAX_ALLOWED_STRING_LENGTH&&(DEBUG_BUILD$1&&logger.warn(`\`dom.maxStringLength\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${s} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`),s=MAX_ALLOWED_STRING_LENGTH),"string"==typeof i&&(i=[i]);try{const e=r.event,t=_isEvent(e)?e.target:e;n=htmlTreeAsString(t,{keyAttrs:i,maxStringLength:s}),a=getComponentName(t)}catch(e){n="<unknown>"}if(0===n.length)return;const o={category:`ui.${r.name}`,message:n};a&&(o.data={"ui.component_name":a}),addBreadcrumb(o,{event:r.event,name:r.name,global:r.global})}}function _getConsoleBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;const r={category:"console",data:{arguments:t.args,logger:"console"},level:severityLevelFromString(t.level),message:safeJoin(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${safeJoin(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}addBreadcrumb(r,{input:t.args,level:t.level})}}function _getXhrBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;const{startTimestamp:r,endTimestamp:n}=t,a=t.xhr[SENTRY_XHR_DATA_KEY];if(!r||!n||!a)return;const{method:i,url:s,status_code:o,body:l}=a,c={method:i,url:s,status_code:o},h={xhr:t.xhr,input:l,startTimestamp:r,endTimestamp:n};addBreadcrumb({category:"xhr",data:c,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(o)},h)}}function _getFetchBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;const{startTimestamp:r,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:r,endTimestamp:n})}else{const e=t.response,a={...t.fetchData,status_code:e&&e.status},i={input:t.args,response:e,startTimestamp:r,endTimestamp:n};addBreadcrumb({category:"fetch",data:a,type:"http",level:getBreadcrumbLogLevelFromHttpStatusCode(a.status_code)},i)}}}function _getHistoryBreadcrumbHandler(e){return function(t){if(getClient()!==e)return;let r=t.from,n=t.to;const a=parseUrl$1(WINDOW$1.location.href);let i=r?parseUrl$1(r):void 0;const s=parseUrl$1(n);i&&i.path||(i=a),a.protocol===s.protocol&&a.host===s.host&&(n=s.relative),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),addBreadcrumb({category:"navigation",data:{from:r,to:n}})}}function _isEvent(e){return!!e&&!!e.target}const DEFAULT_EVENT_TARGET=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],INTEGRATION_NAME$2="BrowserApiErrors",_browserApiErrorsIntegration=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:INTEGRATION_NAME$2,setupOnce(){t.setTimeout&&fill(WINDOW$1,"setTimeout",_wrapTimeFunction),t.setInterval&&fill(WINDOW$1,"setInterval",_wrapTimeFunction),t.requestAnimationFrame&&fill(WINDOW$1,"requestAnimationFrame",_wrapRAF),t.XMLHttpRequest&&"XMLHttpRequest"in WINDOW$1&&fill(XMLHttpRequest.prototype,"send",_wrapXHR);const e=t.eventTarget;if(e){(Array.isArray(e)?e:DEFAULT_EVENT_TARGET).forEach(_wrapEventTarget)}}}},browserApiErrorsIntegration=defineIntegration(_browserApiErrorsIntegration);function _wrapTimeFunction(e){return function(...t){const r=t[0];return t[0]=wrap(r,{mechanism:{data:{function:getFunctionName(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function _wrapRAF(e){return function(t){return e.apply(this,[wrap(t,{mechanism:{data:{function:"requestAnimationFrame",handler:getFunctionName(e)},handled:!1,type:"instrument"}})])}}function _wrapXHR(e){return function(...t){const r=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in r&&"function"==typeof r[e]&&fill(r,e,(function(t){const r={mechanism:{data:{function:e,handler:getFunctionName(t)},handled:!1,type:"instrument"}},n=getOriginalFunction(t);return n&&(r.mechanism.data.handler=getFunctionName(n)),wrap(t,r)}))})),e.apply(this,t)}}function _wrapEventTarget(e){const t=WINDOW$1[e],r=t&&t.prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(fill(r,"addEventListener",(function(t){return function(r,n,a){try{isEventListenerObject(n)&&(n.handleEvent=wrap(n.handleEvent,{mechanism:{data:{function:"handleEvent",handler:getFunctionName(n),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[r,wrap(n,{mechanism:{data:{function:"addEventListener",handler:getFunctionName(n),target:e},handled:!1,type:"instrument"}}),a])}})),fill(r,"removeEventListener",(function(e){return function(t,r,n){try{const a=r.__sentry_wrapped__;a&&e.call(this,t,a,n)}catch(e){}return e.call(this,t,r,n)}})))}function isEventListenerObject(e){return"function"==typeof e.handleEvent}const browserSessionIntegration=defineIntegration((()=>({name:"BrowserSession",setupOnce(){void 0!==WINDOW$1.document?(startSession({ignoreDuration:!0}),captureSession(),addHistoryInstrumentationHandler((({from:e,to:t})=>{void 0!==e&&e!==t&&(startSession({ignoreDuration:!0}),captureSession())}))):DEBUG_BUILD$1&&logger.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}))),INTEGRATION_NAME$1="GlobalHandlers",_globalHandlersIntegration=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:INTEGRATION_NAME$1,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(_installGlobalOnErrorHandler(e),globalHandlerLog("onerror")),t.onunhandledrejection&&(_installGlobalOnUnhandledRejectionHandler(e),globalHandlerLog("onunhandledrejection"))}}},globalHandlersIntegration=defineIntegration(_globalHandlersIntegration);function _installGlobalOnErrorHandler(e){addGlobalErrorInstrumentationHandler((t=>{const{stackParser:r,attachStacktrace:n}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const{msg:a,url:i,line:s,column:o,error:l}=t,c=_enhanceEventWithInitialFrame(eventFromUnknownInput(r,l||a,void 0,n,!1),i,s,o);c.level="error",captureEvent(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}))}function _installGlobalOnUnhandledRejectionHandler(e){addGlobalUnhandledRejectionInstrumentationHandler((t=>{const{stackParser:r,attachStacktrace:n}=getOptions();if(getClient()!==e||shouldIgnoreOnError())return;const a=_getUnhandledRejectionError(t),i=isPrimitive(a)?_eventFromRejectionWithPrimitive(a):eventFromUnknownInput(r,a,void 0,n,!0);i.level="error",captureEvent(i,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}function _getUnhandledRejectionError(e){if(isPrimitive(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}function _eventFromRejectionWithPrimitive(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function _enhanceEventWithInitialFrame(e,t,r,n){const a=e.exception=e.exception||{},i=a.values=a.values||[],s=i[0]=i[0]||{},o=s.stacktrace=s.stacktrace||{},l=o.frames=o.frames||[],c=n,h=r,p=isString(t)&&t.length>0?t:getLocationHref();return 0===l.length&&l.push({colno:c,filename:p,function:UNKNOWN_FUNCTION,in_app:!0,lineno:h}),e}function globalHandlerLog(e){DEBUG_BUILD$1&&logger.log(`Global Handler attached: ${e}`)}function getOptions(){const e=getClient();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const httpContextIntegration=defineIntegration((()=>({name:"HttpContext",preprocessEvent(e){if(!WINDOW$1.navigator&&!WINDOW$1.location&&!WINDOW$1.document)return;const t=e.request&&e.request.url||WINDOW$1.location&&WINDOW$1.location.href,{referrer:r}=WINDOW$1.document||{},{userAgent:n}=WINDOW$1.navigator||{},a={...e.request&&e.request.headers,...r&&{Referer:r},...n&&{"User-Agent":n}},i={...e.request,...t&&{url:t},headers:a};e.request=i}}))),DEFAULT_KEY="cause",DEFAULT_LIMIT=5,INTEGRATION_NAME="LinkedErrors",_linkedErrorsIntegration=(e={})=>{const t=e.limit||DEFAULT_LIMIT,r=e.key||DEFAULT_KEY;return{name:INTEGRATION_NAME,preprocessEvent(e,n,a){const i=a.getOptions();applyAggregateErrorsToEvent(exceptionFromError,i.stackParser,i.maxValueLength,r,t,e,n)}}},linkedErrorsIntegration=defineIntegration(_linkedErrorsIntegration);function getDefaultIntegrations(e){const t=[inboundFiltersIntegration(),functionToStringIntegration(),browserApiErrorsIntegration(),breadcrumbsIntegration(),globalHandlersIntegration(),linkedErrorsIntegration(),dedupeIntegration(),httpContextIntegration()];return!1!==e.autoSessionTracking&&t.push(browserSessionIntegration()),t}function applyDefaultOptions(e={}){const t={defaultIntegrations:getDefaultIntegrations(e),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:WINDOW$1.SENTRY_RELEASE&&WINDOW$1.SENTRY_RELEASE.id?WINDOW$1.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==e.defaultIntegrations&&delete e.defaultIntegrations,{...t,...e}}function shouldShowBrowserExtensionError(){const e=void 0!==WINDOW$1.window&&WINDOW$1;if(!e)return!1;const t=e[e.chrome?"chrome":"browser"],r=t&&t.runtime&&t.runtime.id,n=WINDOW$1.location&&WINDOW$1.location.href||"",a=!!r&&WINDOW$1===WINDOW$1.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((e=>n.startsWith(`${e}//`))),i=void 0!==e.nw;return!!r&&!a&&!i}function init(e={}){const t=applyDefaultOptions(e);if(!t.skipBrowserExtensionCheck&&shouldShowBrowserExtensionError())return void consoleSandbox((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));DEBUG_BUILD$1&&(supportsFetch()||logger.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const r={...t,stackParser:stackParserFromStackParserOptions(t.stackParser||defaultStackParser),integrations:getIntegrationsToSetup(t),transport:t.transport||makeFetchTransport};return initAndBind(BrowserClient,r)}class SentryManager{constructor(){this.isInitialized=!1}static getInstance(){return SentryManager.instance||(SentryManager.instance=new SentryManager),SentryManager.instance}initialize(){if(this.isInitialized)return;const e=environmentManager.getEnvironment()||"production";if(!(e===ENVIRONMENTS.PRODUCTION||e===ENVIRONMENTS.STAGING))return;init({dsn:"https://8e000dda9faf4372bd40163105017f8a@o74188.ingest.us.sentry.io/4510466352742400",environment:e,sampleRate:.1}),this.isInitialized=!0}isEnabled(){return this.isInitialized}captureError(e){this.isInitialized&&captureException(e)}captureMessage(e,t="info"){this.isInitialized&&captureMessage(e,t)}}const sentryManager=SentryManager.getInstance(),SDK_PREFIX="[Qonto Embed SDK]";function isDebugEnabled(){return operationSettingsManager.getDebugMode()}function info(e,t){if(!isDebugEnabled())return;const r=void 0!==t?[SDK_PREFIX,e,t]:[SDK_PREFIX,e];console.log(...r)}function initialize$1(e){const{accessToken:t,stagingToken:r,operationSettings:n,environment:a,branch:i,locale:s}=validateInitializeParams(e);t&&authManager.setAccessToken(t),r&&authManager.setStagingToken(r),s&&localeManager.setLocale(s),n&&operationSettingsManager.setSettings(n),a&&(environmentManager.setEnvironment(a),i&&environmentManager.setBranch(i)),sentryManager.initialize(),info("SDK initialized successfully",{environment:a,locale:s,debugMode:n?.debugMode})}function logout$1(){authManager.clearAccessToken(),authManager.clearStagingToken(),localeManager.setDefaultLocale(),operationSettingsManager.clearSettings()}const common={initialize:initialize$1,logout:logout$1,constants:constants$1},{initialize:initialize,logout:logout,constants:constants}=common;class EmbedApiError extends QontoEmbedSdkError{constructor({message:e,data:t,code:r}){super(),this.code=500;const n=Array.isArray(e)?e.join("\n"):e;this.name="EmbedApiError",this.message=`The call to the Embed API failed with the following errors:\n${n}`,this.data=t||{},this.code=r||this.code}}function isRunningInBrowser(){return"undefined"!=typeof window&&"undefined"!=typeof document}function isRunningInServer(){return!isRunningInBrowser()}function base64Encode(e){return isRunningInServer()?Buffer.from(e).toString("base64"):btoa(e)}function base64Decode(e){return isRunningInServer()?Buffer.from(e,"base64").toString("utf-8"):atob(e)}function buildRequestHeaders({accessToken:e,stagingToken:t,idempotencyKey:r,mfaPreference:n,scaSessionToken:a}){const i=new Headers;i.append("Authorization",`Bearer ${e}`);const s=t||authManager.getStagingToken();s&&i.append("X-Qonto-Staging-Token",s),r&&i.append("X-Qonto-Idempotency-Key",r);const o=n||operationSettingsManager.getMFAPreference();return o&&i.append("X-Qonto-2fa-Preference",o),a&&i.append("X-Qonto-SCA-Session-Token",a),i.append("Content-Type","application/json"),i.append("Accept-Language",localeManager.getLocale()),i}async function makeNetworkCall({path:e,options:t}){const r=`${environmentManager.getEnvironmentUrls().THIRD_PARTY_API_URL}${e}`,n=await fetch(r,{...t,headers:buildRequestHeaders(t.headers),body:t.body?JSON.stringify(t.body):void 0});if(204===n.status)return;const a=await n.json();if(!n.ok)throw a.errors?new EmbedApiError({code:n.status,message:a.errors.map((e=>`${e.code}: ${e.detail}`))}):new EmbedApiError({code:n.status,message:`${a.code}: ${a.detail}`,data:a});return a}function encodeNetworkCall(e){const t={method:e.options.method,headers:e.options.headers,path:e.path,payload:e.options?.body};return base64Encode(JSON.stringify(t))}function decodeNetworkResponse(e){return JSON.parse(base64Decode(e))}function prepareAuthLinkRequest({accessToken:e,stagingToken:t,action:r,callbackUrl:n}){const a={post_authn_action:r};return n&&(a.callback_url=n),{path:"/v1/embed_auth_links",options:{method:"POST",headers:{accessToken:e,stagingToken:t},body:{embed_auth_link:a}}}}async function requestAuthLink(e){const t=prepareAuthLinkRequest({accessToken:e.accessToken,stagingToken:e.stagingToken,action:e.action,callbackUrl:e.callbackUrl}),{embed_auth_link:r}=await makeNetworkCall(t);return{url:r.url,post_authn_action:r.post_authn_action,callback_url:r.callback_url,expired_at:r.expired_at,used_at:r.used_at}}function prepareGetCardsCall({membershipId:e,accessToken:t,stagingToken:r}){return{path:e?`/v2/cards?holder_ids[]=${e}`:"/v2/cards",options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getCards$1({membershipId:e,accessToken:t,stagingToken:r}){const n=prepareGetCardsCall({membershipId:e,accessToken:t,stagingToken:r}),{cards:a}=await makeNetworkCall(n);return a}function prepareGetCardCall({cardId:e,accessToken:t,stagingToken:r}){return{path:`/v2/cards?ids[]=${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getCard$1({cardId:e,accessToken:t,stagingToken:r}){const n=prepareGetCardCall({cardId:e,accessToken:t,stagingToken:r}),{cards:a}=await makeNetworkCall(n);return a[0]}function prepareGetCardIframeUrl({accessToken:e,stagingToken:t}){return prepareAuthLinkRequest({accessToken:e,stagingToken:t,action:AUTH_LINK_ACTIONS.CARD_DISPLAY})}async function getCardIframeURL(e){const t=prepareGetCardIframeUrl(e),{embed_auth_link:r}=await makeNetworkCall(t);return r}var CardStatus;!function(e){e.PENDING="pending",e.ONHOLD="onhold",e.ORDER_CANCELED="order_canceled",e.LIVE="live",e.PAUSED="paused",e.STOLEN="stolen",e.LOST="lost",e.PIN_BLOCKED="pin_blocked",e.DELETED="deleted",e.PRE_EXPIRED="pre_expired",e.EXPIRED="expired",e.DISCARDED="discarded",e.SHIPPED_LOST="shipped_lost",e.ABUSIVE="abusive"}(CardStatus||(CardStatus={}));const CardCategories={TRANSPORT:"transport",RESTAURANT_AND_BAR:"restaurant_and_bar",FOOD_AND_GROCERY:"food_and_grocery",IT_AND_ELECTRONICS:"it_and_electronics",UTILITY:"utility",TAX:"tax",LEGAL_AND_ACCOUNTING:"legal_and_accounting",ATM:"atm",OFFICE_SUPPLY:"office_supply",HARDWARE_AND_EQUIPMENT:"hardware_and_equipment",FINANCE:"finance"};var VirtualCardLevel,PhysicalCardLevel;function validatePresenceOfRequiredParams(e,t){const r=t.filter((t=>t.requiredIfPresent?!e[t.name]&&e[t.requiredIfPresent]:void 0===e[t.name])).map((e=>e.name));if(r.length>0)throw new InvalidParametersError(r.map((e=>`Missing required parameter: ${e}`)))}function validateExpectedStringValues(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"string"!=typeof e)).map((([e])=>`${e} must be a string`))}function validateExpectedBooleanValues(e){return Object.entries(e).filter((([,e])=>void 0!==e&&!1!==e&&!0!==e)).map((([e])=>`${e} must be a boolean`))}function validateExpectedNumericValues(e){return Object.entries(e).filter((([,e])=>void 0!==e)).filter((([,e])=>"number"!=typeof e)).map((([e])=>`${e} must be a number`))}!function(e){e.VIRTUAL="virtual"}(VirtualCardLevel||(VirtualCardLevel={})),function(e){e.METAL="metal",e.PLUS="plus",e.STANDARD="standard"}(PhysicalCardLevel||(PhysicalCardLevel={}));const requiredVirtualCardOrderParams=[{name:"organizationId"},{name:"membershipId"},{name:"bankAccountId"},{name:"monthlyLimit"},{name:"cardLevel"}],requiredPhysicalCardOrderParams=[...requiredVirtualCardOrderParams,{name:"atmDailyLimit",requiredIfPresent:"hasAtmDailyLimit"},{name:"hasAtmDailyLimit",requiredIfPresent:"hasAtmOption"},{name:"atmMonthlyLimit",requiredIfPresent:"hasAtmOption"},{name:"shipToBusiness"},{name:"cardLevel"}];function validateOrderCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");return"virtual"===e.cardLevel?validateOrderVirtualCardParams(e):validateOrderPhysicalCardParams(e)}function validateUnlockCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");if(!e.cardId)throw new InvalidParametersError("cardId is required for the called function");const t=validateExpectedStringValues({cardId:e.cardId});if(t.length>0)throw new InvalidParametersError(t)}function validateOrderVirtualCardParams(e){return validatePresenceOfRequiredParams(e,requiredVirtualCardOrderParams),validateOrderVirtualCardParamsType(e),e}function validateOrderVirtualCardParamsType(e){const{membershipId:t,organizationId:r,bankAccountId:n,hasDailyLimit:a,hasTransactionLimit:i,monthlyLimit:s,dailyLimit:o,transactionLimit:l,activeDays:c,categories:h,cardLevel:p}=e,d=[...validateVirtualCardLevel(p),...validateExpectedStringValues({membershipId:t,organizationId:r,bankAccountId:n}),...validateExpectedBooleanValues({hasDailyLimit:a,hasTransactionLimit:i}),...validateExpectedNumericValues({monthlyLimit:s,dailyLimit:o,transactionLimit:l}),...validateActiveDays(c),...validateCategories(h)];if(d.length>0)throw new InvalidParametersError(d)}function validateOrderPhysicalCardParams(e){validatePresenceOfRequiredParams(e,requiredPhysicalCardOrderParams),validateOrderPhysicalCardParamsType(e)}function validateOrderPhysicalCardParamsType(e){const{membershipId:t,organizationId:r,bankAccountId:n,hasDailyLimit:a,hasTransactionLimit:i,monthlyLimit:s,dailyLimit:o,transactionLimit:l,activeDays:c,categories:h,cardLevel:p,hasNfcOption:d,hasForeignPaymentOption:u,hasOnlinePaymentOption:f,shipToBusiness:m,hasAtmOption:g,hasAtmDailyLimit:y,atmDailyLimit:v,atmMonthlyLimit:b,address:E,cardDesign:S,typeOfPrint:_}=e,T=validatePhysicalCardLevel(p),k=validateTypeOfPrint(_),x=[...T,...validateExpectedStringValues({membershipId:t,organizationId:r,bankAccountId:n}),...validateExpectedBooleanValues({hasDailyLimit:a,hasTransactionLimit:i,hasAtmOption:g,hasNfcOption:d,hasForeignPaymentOption:u,hasOnlinePaymentOption:f,hasAtmDailyLimit:y,shipToBusiness:m}),...validateExpectedNumericValues({monthlyLimit:s,dailyLimit:o,transactionLimit:l,atmDailyLimit:v,atmMonthlyLimit:b}),...validateActiveDays(c),...validateCategories(h),...k,...validateCardDesign(S),...validateAddress(E,m)];if(x.length>0)throw new InvalidParametersError(x)}function validateActiveDays(e){const t=!Array.isArray(e)||!e.every((e=>Number.isInteger(e)&&e>0&&e<8));return void 0!==e&&t?["activeDays must be an array of integers between 1 and 7"]:[]}function validateCategories(e){const t=!Array.isArray(e)||e.some((e=>"string"!=typeof e));return void 0!==e&&t?["categories must be an array of strings"]:[]}function validateCardDesign(e){return["undefined","string"].includes(typeof e)?[]:["cardDesign must be a string"]}function validateTypeOfPrint(e){const t=null!=e&&"string"!=typeof e,r=!["print","embossed",void 0,null].includes(e);return t||r?['typeOfPrint must be one of "print", "embossed" or null']:[]}function validatePhysicalCardLevel(e){return Object.values(PhysicalCardLevel).includes(e)?[]:['cardLevel must be one of "standard", "plus", "metal"']}function validateVirtualCardLevel(e){return"virtual"!==e?['cardLevel must be "virtual"']:[]}function validateAddress(e,t){return t||!e||e.contactName&&e.firstLine&&e.zipCode&&e.city&&e.country?[]:["address must contain at least contactName, firstLine, zipCode, city and country properties"]}function validateDisplayCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");if(!e.cardId)throw new InvalidParametersError("cardId is required for the called function");const t=validateExpectedStringValues({cardId:e.cardId});if(t.length>0)throw new InvalidParametersError(t);let r={};void 0!==e.allowPinReveal&&(r={allowPinReveal:e.allowPinReveal}),void 0!==e.allowBlocking&&(r={...r,allowBlocking:e.allowBlocking});const n=validateExpectedBooleanValues(r);if(n.length>0)throw new InvalidParametersError(n);return e}function validateGetCardParams(e){if(!e)throw new InvalidParametersError("cardSettings parameter is required for the called function");if(!e.cardId)throw new InvalidParametersError("cardId parameter is required for the called function");const t=validateExpectedStringValues({cardId:e.cardId});if(t.length>0)throw new InvalidParametersError(t);return e}class EmbedOperationError extends QontoEmbedSdkError{constructor(e){super(),this.name="EmbedOperationError",this.message=e}}const byteToHex=[];for(let e=0;e<256;++e)byteToHex.push((e+256).toString(16).slice(1));function unsafeStringify(e,t=0){return(byteToHex[e[t+0]]+byteToHex[e[t+1]]+byteToHex[e[t+2]]+byteToHex[e[t+3]]+"-"+byteToHex[e[t+4]]+byteToHex[e[t+5]]+"-"+byteToHex[e[t+6]]+byteToHex[e[t+7]]+"-"+byteToHex[e[t+8]]+byteToHex[e[t+9]]+"-"+byteToHex[e[t+10]]+byteToHex[e[t+11]]+byteToHex[e[t+12]]+byteToHex[e[t+13]]+byteToHex[e[t+14]]+byteToHex[e[t+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var native={randomUUID:randomUUID};function v4(e,t,r){if(native.randomUUID&&!e)return native.randomUUID();const n=(e=e||{}).random??e.rng?.()??rng();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,unsafeStringify(n)}function buildIframeMessage({actionId:e,actionData:t}){const r=operationSettingsManager.getMFAPreference();return{actionId:e,actionData:{...t,scaPreference:t.scaPreference||r,idempotencyKey:t.idempotencyKey||v4()}}}function getUIParentElement(e){let t=null;if(t="function"==typeof e?e():document.getElementById(e),!(t&&t instanceof HTMLElement))throw new EmbedOperationError(`Could not install the UI Element because the parent element with id ${e} was not found.\nPlease make sure to pass a valid parentElementId or ensure the parentElementId function returns a valid element.`);return t}class EmbedIframe{constructor(e){this.options=e,this.iframe=null,this.parentElement=null,this.messageListeners=new Map,this.defaultTimeout=3e4;const t=new URL(e.iframeUrl);this.targetOrigin=`${t.protocol}//${t.host}`}async initialize(){if(this.iframe)return this;if(this.parentElement=getUIParentElement(this.options.parentElementId),!this.parentElement)throw new EmbedOperationError(`Could not install the authentication UI because the parent element with id ${this.options.parentElementId} was not found.\nPlease make sure to pass a valid parentElementId when calling the method.`);return new Promise(((e,t)=>{this.iframe=document.createElement("iframe"),this.iframe.src=this.options.iframeUrl,this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.style.border="none";const r=this.options.timeout||this.defaultTimeout,n=setTimeout((()=>{window.removeEventListener("message",a),t(new EmbedOperationError(`Could not install the authentication UI because the timeout of ${r}ms was reached.\nPlease make sure the application can reach the Internet.`))}),r),a=t=>{t.data.eventId===IFRAME_EVENTS.READY&&(clearTimeout(n),window.removeEventListener("message",a),e(this))};window.addEventListener("message",a),this.parentElement?.appendChild(this.iframe)}))}postMessage(e){if(!this.iframe||!this.iframe.contentWindow)return Promise.reject(new EmbedOperationError("Attempted to perform an Embed operation without having the authentication UI initialized."));const t=buildIframeMessage(e);return new Promise(((e,r)=>{const n=a=>{if(a.data?.actionId===t.actionId){if("error"===a.data.status)return this.removeMessageListener(t.actionId,n),r(new EmbedOperationError(`An error occurred when performing the action ${t.actionId}.\n${JSON.stringify(a.data.payload)}`));this.removeMessageListener(t.actionId,n),e(a.data.payload)}};this.addMessageListener(t.actionId,n),this.iframe?.contentWindow?.postMessage(t,this.targetOrigin)}))}addMessageListener(e,t){this.messageListeners.has(e)||this.messageListeners.set(e,[]);this.messageListeners.get(e).push(t),window.addEventListener("message",t)}removeMessageListener(e,t){const r=this.messageListeners.get(e);if(r){const e=r.indexOf(t);-1!==e&&(r.splice(e,1),window.removeEventListener("message",t))}}destroy(){this.messageListeners.forEach((e=>{e.forEach((e=>{window.removeEventListener("message",e)}))})),this.messageListeners.clear(),this.iframe&&this.parentElement&&(this.parentElement.removeChild(this.iframe),this.iframe=null)}}function buildIframeUrl({accessToken:e,stagingToken:t,locale:r,debugMode:n}){const a=n||!1,i=r||localeManager.getLocale(),s=environmentManager.getEnvironmentUrls().EMBED_URL,o=t?`;staging_token=${encodeURIComponent(t)}`:"";return`${s}?debug=${a}&lang=${encodeURIComponent(i)}#access_token=${encodeURIComponent(e)}${o}`}function createIframe({parentElementId:e,iframeUrl:t}){return new EmbedIframe({parentElementId:e,iframeUrl:t}).initialize()}function serializeOrderCardPayload(e){return"virtual"===e.cardLevel?serializeOrderVirtualCardPayload(e):serializeOrderPhysicalCardPayload(e)}function serializeOrderVirtualCardPayload(e){const t=filterValidCategories(e.categories);return{actionId:ACTIONS.CARD_ORDER,actionData:{idempotencyKey:v4(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel}}}}}function serializeOrderPhysicalCardPayload(e){const t=filterValidCategories(e.categories);return{actionId:ACTIONS.CARD_ORDER,actionData:{idempotencyKey:v4(),body:{card:{payment_monthly_limit:e.monthlyLimit,payment_daily_limit:e.dailyLimit,payment_daily_limit_option:e.hasDailyLimit,payment_transaction_limit:e.transactionLimit,payment_transaction_limit_option:e.hasTransactionLimit,active_days:e.activeDays||[],holder_id:e.membershipId,organization_id:e.organizationId,bank_account_id:e.bankAccountId,categories:t,card_level:e.cardLevel,card_design:e.cardDesign,..."plus"===e.cardLevel&&{type_of_print:e.typeOfPrint},ship_to_business_address:e.shipToBusiness,atm_option:e.hasAtmOption,nfc_option:e.hasNfcOption,foreign_option:e.hasForeignPaymentOption,online_option:e.hasOnlinePaymentOption,atm_daily_limit:e.atmDailyLimit,atm_monthly_limit:e.atmMonthlyLimit,...!e.shipToBusiness&&{address:{contact_name:e.address?.contactName,first_line:e.address?.firstLine,second_line:e.address?.secondLine,third_line:e.address?.thirdLine,zipcode:e.address?.zipCode,city:e.address?.city,country:e.address?.country}}}}}}}function serializeCard(e){return{id:e.id,nickname:e.nickname,embossedName:e.embossed_name,status:e.status,maskPan:e.mask_pan,expMonth:parseInt(e.exp_month,10),expYear:parseInt(e.exp_year,10),lastActivityAt:new Date(e.last_activity_at),lastDigits:e.last_digits,shipToBusiness:e.ship_to_business,atmOption:e.atm_option,atmDailyLimitOption:e.atm_daily_limit_option,nfcOption:e.nfc_option,onlineOption:e.online_option,foreignOption:e.foreign_option,atmMonthlyLimit:e.atm_monthly_limit,atmMonthlySpent:e.atm_monthly_spent,atmDailyLimit:e.atm_daily_limit,atmDailySpent:e.atm_daily_spent,paymentMonthlyLimit:e.payment_monthly_limit,paymentMonthlySpent:e.payment_monthly_spent,paymentDailyLimit:e.payment_daily_limit,paymentDailySpent:e.payment_daily_spent,paymentDailyLimitOption:e.payment_daily_limit_option,paymentTransactionLimit:e.payment_transaction_limit,paymentTransactionLimitOption:e.payment_transaction_limit_option,activeDays:e.active_days,holderId:e.holder_id,bankAccountId:e.bank_account_id,organizationId:e.organization_id,updatedAt:new Date(e.updated_at),createdAt:new Date(e.created_at),shippedAt:new Date(e.shipped_at),cardType:e.card_type,cardLevel:e.card_level,paymentLifespanLimit:e.payment_lifespan_limit,paymentLifespanSpent:e.payment_lifespan_spent,preExpiresAt:new Date(e.pre_expires_at),categories:e.categories,renewed:e.renewed,renewal:e.renewal,...e.parent_card_summary&&{parentCardSummary:{id:e.parent_card_summary.id,lastDigits:e.parent_card_summary.last_digits}},hadOperation:e.had_operation,hadPinOperation:e.had_pin_operation,cardDesign:e.card_design,typeOfPrint:e.type_of_print,upsold:e.upsold,upsell:e.upsell,discardOn:new Date(e.discard_on),reordered:e.reordered}}function filterValidCategories(e){const t=Object.values(CardCategories);return(e||[]).filter((e=>t.includes(e)))}function serializeUnlockCardPayload(e){return{actionId:ACTIONS.CARD_UNLOCK,actionData:{body:{cardId:e.cardSettings.cardId}}}}const CUSTOM_PROP_PREFIX="--qonto-embed";function isSameDomain(e){return!e.href||e.href.startsWith(window.location.origin)}function isStyleRule(e){return"CSSStyleRule"===e.constructor.name}function extractVariablesFromStylesheet(e,t){return[...e].filter(isSameDomain).reduce(((e,r)=>[...r.cssRules].filter(isStyleRule).reduce(((e,r)=>{if("style"in r){const n=[...r.style].map((e=>[e.trim(),r.style.getPropertyValue(e).trim()])).filter((([e])=>e.startsWith(t))).reduce(((e,[r,n])=>({...e,[r.replace(`${t}-`,"")]:n})),{});return{...e,...n}}return e}),e)),{})}function gatherQontoEmbedCssVariables(e=CUSTOM_PROP_PREFIX){return isRunningInBrowser()?extractVariablesFromStylesheet(document.styleSheets,e):{}}function getPopulatedIframeURL(e,t){const r=new URL(e);r.searchParams.set("cardId",t.cardId),"boolean"==typeof t.allowPinReveal&&r.searchParams.set("canSeePin",t.allowPinReveal.toString()),"boolean"==typeof t.allowBlocking&&r.searchParams.set("canBlock",t.allowBlocking.toString()),!0===t.debugMode&&r.searchParams.set("debug",t.debugMode.toString());const n=gatherQontoEmbedCssVariables(CUSTOM_PROP_PREFIX);return Object.keys(n).length>0&&r.searchParams.set("customization",JSON.stringify(n)),r.toString()}async function createEmbedUI({decorationParams:e,operationSettings:t,cardIframeUrl:r}){const{cardId:n,allowPinReveal:a,allowBlocking:i}=e,{uiParentElementId:s,debugMode:o}=t,l=getPopulatedIframeURL(r,{cardId:n,allowPinReveal:a,allowBlocking:i,debugMode:o}),c=await createIframe({iframeUrl:l,parentElementId:s});return{destroyEmbedUI:()=>{c.destroy()}}}async function getCards(e){try{const t=e?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new InvalidParametersError("membershipId must be a string");const{proxyRequestFunction:r,stagingToken:n}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetCardsCall({membershipId:t,stagingToken:n})),a=await r(e);return decodeNetworkResponse(a).body.cards.map((e=>serializeCard(e)))}{const r=e?.operationSettings?.accessToken||validatePresenceOfAuthToken();return(await getCards$1({membershipId:t,accessToken:r,stagingToken:n})).map((e=>serializeCard(e)))}}catch(e){return Promise.reject(e)}}async function getCard({cardSettings:e,operationSettings:t}){try{validateGetCardParams(e);const r=e.cardId,{proxyRequestFunction:n,stagingToken:a}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetCardCall({cardId:r,stagingToken:a})),t=await n(e),i=decodeNetworkResponse(t).body.cards;if(Array.isArray(i)&&i.length>0)return serializeCard(i[0]);throw new InvalidParametersError("Unable to retrieve card data")}{const e=t?.accessToken||validatePresenceOfAuthToken();return serializeCard(await getCard$1({cardId:r,accessToken:e,stagingToken:a}))}}catch(e){return Promise.reject(e)}}async function orderCard(e){try{const t=validatePresenceOfAuthToken(),{uiParentElementId:r,debugMode:n}=validateOperationSettingsParams(e.operationSettings,{requiresUI:!0});validateOrderCardParams(e.cardSettings);const a=buildIframeUrl({accessToken:t,stagingToken:authManager.getStagingToken()||void 0,debugMode:n}),i=await createIframe({iframeUrl:a,parentElementId:r}),s=serializeOrderCardPayload(e.cardSettings),o=await i.postMessage(s);return i.destroy(),serializeCard(o)}catch(e){return Promise.reject(e)}}async function unlockCard(e){try{const t=validatePresenceOfAuthToken(),{uiParentElementId:r,debugMode:n}=validateOperationSettingsParams(e.operationSettings,{requiresUI:!0});validateUnlockCardParams(e.cardSettings);const a=buildIframeUrl({accessToken:t,stagingToken:authManager.getStagingToken()||void 0,debugMode:n}),i=await createIframe({iframeUrl:a,parentElementId:r}),s=serializeUnlockCardPayload(e),o=await i.postMessage(s);return i.destroy(),serializeCard(o)}catch(e){return Promise.reject(e)}}async function displayCard(e){try{const{uiParentElementId:t,accessToken:r,stagingToken:n,debugMode:a,mfaPreference:i,proxyRequestFunction:s}=validateOperationSettingsParams(e.operationSettings,{requiresUI:!0});if(validateDisplayCardParams(e.cardSettings),s){const r=encodeNetworkCall(prepareGetCardIframeUrl({stagingToken:n})),i=await s(r),o=decodeNetworkResponse(i).body.embed_auth_link;return createEmbedUI({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:a},cardIframeUrl:o.url})}{const s=r||validatePresenceOfAuthToken(),o=await getCardIframeURL({...e.cardSettings,accessToken:s,stagingToken:n});return createEmbedUI({decorationParams:e.cardSettings,operationSettings:{uiParentElementId:t,debugMode:a,mfaPreference:i},cardIframeUrl:o.url})}}catch(e){return Promise.reject(e)}}const cards$1={getCards:getCards,getCard:getCard,orderCard:orderCard,unlockCard:unlockCard,displayCard:displayCard},cards=cards$1;function buildPaginationParams(e){const t=new URLSearchParams;return e?.page&&t.append("page",e.page.toString()),e?.itemsPerPage&&t.append("per_page",e.itemsPerPage.toString()),t}function serializePaginationResponse(e){if(e)return{totalItems:e?.total_count,totalPages:e?.total_pages,currentPage:e?.current_page,itemsPerPage:e?.per_page,previousPage:e?.prev_page||null,nextPage:e?.next_page||null}}function serializeBeneficiary(e){return{id:e.id,name:e.name,email:e.email,activityTag:e.activity_tag,iban:e.iban,bic:e.bic,currency:e.currency,status:e.status,trusted:e.trusted,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at)}}function serializeToNewBeneficiaryDataObject(e){return{name:e.name,...e.email&&{email:e.email},...e.activityTag&&{activity_tag:e.activityTag},iban:e.iban,...e.bic&&{bic:e.bic}}}const BENEFICIARIES_ENDPOINT="/v2/sepa/beneficiaries";function prepareGetBeneficiariesCall({paginationSettings:e,accessToken:t,stagingToken:r}){const n={method:"GET",headers:{accessToken:t,stagingToken:r}},a=buildPaginationParams(e),i=a.size?`?${a.toString()}`:"";return{path:`${BENEFICIARIES_ENDPOINT}${i}`,options:n}}async function getBeneficiaries$1({paginationSettings:e,accessToken:t,stagingToken:r}){const n=prepareGetBeneficiariesCall({paginationSettings:e,accessToken:t,stagingToken:r}),{beneficiaries:a,meta:i}=await makeNetworkCall(n);return{beneficiaries:a,meta:i}}function prepareGetBeneficiaryCall({beneficiaryId:e,accessToken:t,stagingToken:r}){return{path:`${BENEFICIARIES_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getBeneficiary$1({accessToken:e,stagingToken:t,beneficiaryId:r}){const n=prepareGetBeneficiaryCall({beneficiaryId:r,accessToken:e,stagingToken:t}),{beneficiary:a}=await makeNetworkCall(n);return a}function prepareAddBeneficiaryCall({beneficiary:e,accessToken:t,stagingToken:r,idempotencyKey:n=v4()}){return{path:BENEFICIARIES_ENDPOINT,options:{method:"POST",headers:{accessToken:t,stagingToken:r,idempotencyKey:n},body:{beneficiary:serializeToNewBeneficiaryDataObject(e)}}}}async function addBeneficiary$1({beneficiary:e,accessToken:t,stagingToken:r,idempotencyKey:n=v4()}){const a=prepareAddBeneficiaryCall({beneficiary:e,accessToken:t,stagingToken:r,idempotencyKey:n}),{beneficiary:i}=await makeNetworkCall(a);return i}function prepareUntrustBeneficiaryCall({beneficiaryIds:e,accessToken:t,stagingToken:r}){return{path:`${BENEFICIARIES_ENDPOINT}/untrust`,options:{method:"PATCH",headers:{accessToken:t,stagingToken:r},body:{ids:e}}}}async function untrustBeneficiaries$1({beneficiaryIds:e,accessToken:t,stagingToken:r}){const n=prepareUntrustBeneficiaryCall({beneficiaryIds:e,accessToken:t,stagingToken:r}),{beneficiaries:a}=await makeNetworkCall(n);return a}function prepareUpdateBeneficiaryCall({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a}){const{name:i,email:s,activityTag:o}=e,l={method:"PATCH",headers:{accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a},body:{beneficiary:{name:i,email:s,activity_tag:o}}};return{path:`${BENEFICIARIES_ENDPOINT}/${e.id}`,options:l}}async function updateBeneficiary$1({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a}){const i=prepareUpdateBeneficiaryCall({beneficiaryParamsBeingEdited:e,accessToken:t,stagingToken:r,idempotencyKey:n,mfaPreference:a}),{beneficiary:s}=await makeNetworkCall(i);return s}const requiredNewBeneficiaryParams=[{name:"name"},{name:"iban"}];function validateGetBeneficiaryParams(e){if(!e)throw new InvalidParametersError("beneficiaryId parameter is required for the called function");if(e&&"string"!=typeof e)throw new InvalidParametersError("beneficiaryId must be a string");return e}function validateAddBeneficiaryParams(e){if(!e)throw new InvalidParametersError("beneficiary parameter is required for the called function");if("object"!=typeof e)throw new InvalidParametersError("beneficiary must be an object");validatePresenceOfRequiredParams(e,requiredNewBeneficiaryParams);const t=validateExpectedStringValues({name:e.name,iban:e.iban,email:e.email,activityTag:e.activityTag,bic:e.bic});if(t.length>0)throw new InvalidParametersError(t);return e}function validateUpdateBeneficiaryParams(e){const{id:t,name:r,email:n,activityTag:a}=e||{};if(!t)throw new InvalidParametersError("Invalid parameters were passed to the function:\nA beneficiary ID is required for the called function");if(!r&&!n&&!a)throw new InvalidParametersError("Invalid parameters were passed to the function:\nAt least one of the following properties must be provided: name, email, activityTag");const i=validateExpectedStringValues({name:r,email:n,activityTag:a});if(i.length>0)throw new InvalidParametersError(i);return{id:t,name:r,email:n,activityTag:a}}function validateTrustBeneficiariesParams(e){if(!e)throw new InvalidParametersError("beneficiaryIds parameter is required for the called function");if(!Array.isArray(e)||!e.every((e=>"string"==typeof e)))throw new InvalidParametersError("beneficiaryIds must be an array of strings");return e}async function getBeneficiaries(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetBeneficiariesCall({paginationSettings:a})),t=decodeNetworkResponse(await r(e)),n=t.body.beneficiaries.map((e=>serializeBeneficiary(e))),i=serializePaginationResponse(t.body.meta);return{beneficiaries:n,...i?{meta:i}:{}}}{const e=n||validatePresenceOfAuthToken(),r=await getBeneficiaries$1({accessToken:e,stagingToken:t,paginationSettings:a}),i=r.beneficiaries.map((e=>serializeBeneficiary(e))),s=serializePaginationResponse(r.meta);return{beneficiaries:i,...s?{meta:s}:{}}}}async function getBeneficiary({beneficiarySettings:e,operationSettings:t}){const r=validateGetBeneficiaryParams(e?.beneficiaryId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetBeneficiaryCall({beneficiaryId:r}));return serializeBeneficiary(decodeNetworkResponse(await n(e)).body.beneficiary)}{const e=a||validatePresenceOfAuthToken();return serializeBeneficiary(await getBeneficiary$1({beneficiaryId:r,accessToken:e,stagingToken:i}))}}async function addBeneficiary({beneficiarySettings:e,operationSettings:t}){const r=validateAddBeneficiaryParams(e),{proxyRequestFunction:n,accessToken:a,stagingToken:i,idempotencyKey:s}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareAddBeneficiaryCall({beneficiary:r,idempotencyKey:s}));return serializeBeneficiary(decodeNetworkResponse(await n(e)).body.beneficiary)}{const e=a||validatePresenceOfAuthToken();return serializeBeneficiary(await addBeneficiary$1({beneficiary:r,accessToken:e,stagingToken:i,idempotencyKey:s}))}}async function updateBeneficiary({beneficiarySettings:e,operationSettings:t}){const r=validateUpdateBeneficiaryParams(e),{stagingToken:n,idempotencyKey:a,mfaPreference:i,proxyRequestFunction:s}=validateOperationSettingsParams(t),o={beneficiaryParamsBeingEdited:r,idempotencyKey:a,mfaPreference:i};if(s){const e=encodeNetworkCall(prepareUpdateBeneficiaryCall(o));return serializeBeneficiary(decodeNetworkResponse(await s(e)).body.beneficiary)}{const e=t?.accessToken||validatePresenceOfAuthToken();return serializeBeneficiary(await updateBeneficiary$1({...o,accessToken:e,stagingToken:n}))}}async function untrustBeneficiaries({beneficiarySettings:e,operationSettings:t}){const r=validateTrustBeneficiariesParams(e?.beneficiaryIds),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareUntrustBeneficiaryCall({beneficiaryIds:r}));return decodeNetworkResponse(await n(e)).body.beneficiaries.map(serializeBeneficiary)}{const e=a||validatePresenceOfAuthToken();return(await untrustBeneficiaries$1({beneficiaryIds:r,accessToken:e,stagingToken:i})).map(serializeBeneficiary)}}const beneficiaries$1={getBeneficiaries:getBeneficiaries,getBeneficiary:getBeneficiary,addBeneficiary:addBeneficiary,updateBeneficiary:updateBeneficiary,untrustBeneficiaries:untrustBeneficiaries},beneficiaries=beneficiaries$1;function serializeBulkTransfer(e){return{id:e.id,initiatorId:e.initiator_id,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),totalCount:Number(e.total_count),completedCount:Number(e.completed_count),failedCount:Number(e.failed_count),pendingCount:Number(e.pending_count),results:e.results.map((e=>({clientTransferId:e.client_transfer_id,transferId:e.transfer_id??null,errors:e.errors||null,status:e.status})))}}function serializeToNewBulkTransferDataObject(e){return{beneficiary_id:e.beneficiaryId||e.beneficiary?.id,client_transfer_id:e.clientTransferId,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentsIds?{attachment_ids:e.attachmentsIds}:{}}}function serializeToBulkVopVerificationResult(e){return{id:e.id,response:{matchResult:e.response.match_result,matchedName:e.response.matched_name}}}function serializeSepaTransfer(e){return{id:e.id,initiatorId:e.initiator_id,bankAccountId:e.bank_account_id,amount:Number(e.amount),amountCents:Number(e.amount_cents),amountCurrency:e.amount_currency,status:e.status,beneficiaryId:e.beneficiary_id,reference:e.reference,note:e.note,declinedReason:e.declined_reason,scheduledDate:new Date(e.scheduled_date),createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at),processedAt:new Date(e.processed_at),completedAt:new Date(e.completed_at),transactionId:e.transaction_id}}function serializeToNewSepaTransferDataObject(e){const t=e.beneficiaryId||e.beneficiary?.id;return{bank_account_id:e.bankAccountId,beneficiary_id:t,amount:e.amount.toString(),reference:e.reference,...e.note?{note:e.note}:{},...e.scheduledDate?{scheduled_date:e.scheduledDate.toISOString().split("T")[0]}:{},...e.attachmentIds?{attachment_ids:e.attachmentIds}:{}}}function serializeToVopVerificationResult(e){return{matchResult:e.match_result,matchedName:e.matched_name}}function serializeToSepaPayeeDataObject(e){return{name:e.name,iban:e.iban}}const SEPA_ENDPOINT="/v2/sepa",SEPA_TRANSFERS_ENDPOINT=`${SEPA_ENDPOINT}/transfers`;function prepareGetSepaTransfersCall({paginationSettings:e,accessToken:t,stagingToken:r}){const n={method:"GET",headers:{accessToken:t,stagingToken:r}},a=buildPaginationParams(e),i=a.size?`?${a.toString()}`:"";return{path:`${SEPA_TRANSFERS_ENDPOINT}${i}`,options:n}}async function getSepaTransfers$1({accessToken:e,stagingToken:t,paginationSettings:r}){const n=prepareGetSepaTransfersCall({paginationSettings:r,accessToken:e,stagingToken:t}),{transfers:a,meta:i}=await makeNetworkCall(n);return{transfers:a,meta:i}}function prepareGetSepaTransferCall({sepaTransferId:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_TRANSFERS_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getSepaTransfer$1({accessToken:e,stagingToken:t,sepaTransferId:r}){const n=prepareGetSepaTransferCall({sepaTransferId:r,accessToken:e,stagingToken:t}),{transfer:a}=await makeNetworkCall(n);return a}function prepareCreateSepaTransferCall({transfer:e,vopProofToken:t,accessToken:r,stagingToken:n,idempotencyKey:a}){const i=serializeToNewSepaTransferDataObject(e);return{path:SEPA_TRANSFERS_ENDPOINT,options:{method:"POST",headers:{accessToken:r,stagingToken:n,idempotencyKey:a},body:{transfer:i,vop_proof_token:t}}}}async function createSepaTransfer$1({transfer:e,vopProofToken:t,accessToken:r,stagingToken:n,idempotencyKey:a}){const i=prepareCreateSepaTransferCall({transfer:e,vopProofToken:t,accessToken:r,stagingToken:n,idempotencyKey:a}),{transfer:s}=await makeNetworkCall(i);return s}function prepareCancelSepaTransferCall({sepaTransferId:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_TRANSFERS_ENDPOINT}/${e}/cancel`,options:{method:"POST",headers:{accessToken:t,stagingToken:r}}}}async function cancelSepaTransfer$1({sepaTransferId:e,accessToken:t,stagingToken:r}){const n=prepareCancelSepaTransferCall({sepaTransferId:e,accessToken:t,stagingToken:r});await makeNetworkCall(n)}function prepareVerifySepaPayeeCall({sepaPayee:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_ENDPOINT}/verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:r},body:{beneficiary_name:e.name,iban:e.iban}}}}async function verifySepaPayee$1({sepaPayee:e,accessToken:t,stagingToken:r}){const n=prepareVerifySepaPayeeCall({sepaPayee:e,accessToken:t,stagingToken:r});return await makeNetworkCall(n)}const BULK_TRANSFERS_ENDPOINT="/v2/sepa/bulk_transfers";function prepareGetBulkTransfersCall({paginationSettings:e,accessToken:t,stagingToken:r}){const n={method:"GET",headers:{accessToken:t,stagingToken:r}},a=buildPaginationParams(e),i=a.size?`?${a.toString()}`:"";return{path:`${BULK_TRANSFERS_ENDPOINT}${i}`,options:n}}async function getBulkTransfers$1({accessToken:e,stagingToken:t,paginationSettings:r}){const n=prepareGetBulkTransfersCall({paginationSettings:r,accessToken:e,stagingToken:t}),{bulk_transfers:a,meta:i}=await makeNetworkCall(n);return{bulkTransfers:a,meta:i}}function prepareGetBulkTransferCall({bulkTransferId:e,accessToken:t,stagingToken:r}){return{path:`${BULK_TRANSFERS_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getBulkTransfer$1({accessToken:e,stagingToken:t,bulkTransferId:r}){const n=prepareGetBulkTransferCall({bulkTransferId:r,accessToken:e,stagingToken:t}),{bulk_transfer:a}=await makeNetworkCall(n);return a}function prepareVerifySepaPayeesCall({sepaPayees:e,accessToken:t,stagingToken:r}){return{path:`${SEPA_ENDPOINT}/bulk_verify_payee`,options:{method:"POST",headers:{accessToken:t,stagingToken:r},body:{requests:e.map(serializeToSepaPayeeDataObject)}}}}async function verifySepaPayees({sepaPayees:e,accessToken:t,stagingToken:r}){const n=prepareVerifySepaPayeesCall({sepaPayees:e,accessToken:t,stagingToken:r});return await makeNetworkCall(n)}function validateBulkTransferParams(e){if(!e)throw new InvalidParametersError("bulkTransferId parameter is required for the called function.");if("string"!=typeof e)throw new InvalidParametersError("bulkTransferId must be a string.");return e}function validateCreateBulkTransferParams(e){if(!e)throw new InvalidParametersError("bulkTransferSettings parameter is required for the called function.");if(!e.bankAccountId)throw new InvalidParametersError("bankAccountId is required");if(!Array.isArray(e.bulkTransfers))throw new InvalidParametersError("bulkTransfers must be an array");if(e.bulkTransfers.length>400)throw new InvalidParametersError("Maximum of 400 bulk transfers allowed");return e.bulkTransfers.forEach(((e,t)=>{validateSingleBulkTransfer(e,t)})),e}function validateSingleBulkTransfer(e,t){if(!e)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: bulkTransfer object is required`);if(!e.beneficiary)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: Beneficiary details must be provided in the bulkTransferSettings.beneficiary field`);if(!e.beneficiary.iban)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: IBAN is required as part of the beneficiary details`);if(!e.beneficiary.name)throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: Beneficiary name is required as part of the beneficiary details`);const r=[...validateExpectedStringValues({reference:e.reference,clientTransferId:e.clientTransferId,note:e.note}),...validateExpectedNumericValues({amount:e.amount})].flat();if(r.length>0)throw new InvalidParametersError(r);if(e.amount>AMOUNT_REQUIRING_ATTACHMENTS&&(!e.attachmentsIds||0===e.attachmentsIds.length))throw new InvalidParametersError(`Invalid bulkTransfer at index ${t}: Attachments are required for transfers over €${AMOUNT_REQUIRING_ATTACHMENTS}`)}const RUNTIME_ENVIRONMENT={BROWSER:"browser",SERVER:"server"};class InvalidRuntimeError extends Error{constructor(e){switch(super(),this.name="InvalidRuntimeError",e){case RUNTIME_ENVIRONMENT.BROWSER:this.message="This code is running in a browser environment, but it is expected to run in a server environment.";break;case RUNTIME_ENVIRONMENT.SERVER:this.message="This code is running in a server environment, but it is expected to run in a browser environment.";break;default:this.message="This code is not expected to run in this environment. Check if the function was server-only or browser-only."}}}async function getBulkTransfers(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetBulkTransfersCall({paginationSettings:a})),t=decodeNetworkResponse(await r(e)),n=t.body.bulk_transfers.map(serializeBulkTransfer),i=serializePaginationResponse(t.body.meta);return{bulkTransfers:n,...i?{meta:i}:{}}}{const e=n||validatePresenceOfAuthToken(),r=await getBulkTransfers$1({accessToken:e,stagingToken:t,paginationSettings:a}),i=r.bulkTransfers?.map(serializeBulkTransfer),s=serializePaginationResponse(r.meta);return{bulkTransfers:i,...s?{meta:s}:{}}}}async function getBulkTransfer({sepaTransferSettings:e,operationSettings:t}){const r=validateBulkTransferParams(e?.bulkTransferId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetBulkTransferCall({bulkTransferId:r}));return serializeBulkTransfer(decodeNetworkResponse(await n(e)).body.bulk_transfer)}{const e=a||validatePresenceOfAuthToken();return serializeBulkTransfer(await getBulkTransfer$1({accessToken:e,stagingToken:i,bulkTransferId:r}))}}async function*createBulkTransfer({bulkTransferSettings:e,operationSettings:t}){const r=t?.accessToken||validatePresenceOfAuthToken(),n=t?.stagingToken||authManager.getStagingToken(),a=t?.idempotencyKey||v4();validateCreateBulkTransferParams(e);const{uiParentElementId:i,debugMode:s}=validateOperationSettingsParams(t,{requiresUI:!0});if(!isRunningInBrowser())throw new InvalidRuntimeError(RUNTIME_ENVIRONMENT.BROWSER);const o=new Map;for(const t of e.bulkTransfers){const e=t.beneficiary.iban;e&&!o.has(e)&&o.set(e,{name:t.beneficiary.name,iban:e})}const l=Array.from(o.values()),c=await verifySepaPayees({sepaPayees:l,accessToken:r,stagingToken:n||void 0});if((yield c.requests.map(serializeToBulkVopVerificationResult))===VOP_DECISIONS.REJECT)return;let h,p;try{const t=buildIframeUrl({accessToken:r,stagingToken:n||void 0,debugMode:s});p=await createIframe({iframeUrl:t,parentElementId:i});const o={bankAccountId:e.bankAccountId,bulkTransfers:e.bulkTransfers.map((e=>serializeToNewBulkTransferDataObject(e)))};h=await p.postMessage(buildIframeMessage({actionId:ACTIONS.TRANSFER_BULK_CREATE,actionData:{body:o,idempotencyKey:a}}))}finally{p?.destroy()}return serializeBulkTransfer(h)}const requiredCreateSepaTransferParams=[{name:"bankAccountId"},{name:"reference"},{name:"amount"}];function validateGetSepaTransferParams(e){if(!e)throw new InvalidParametersError("sepaTransferId parameter is required for the called function");if(e&&"string"!=typeof e)throw new InvalidParametersError("sepaTransferId must be a string");return e}function validateTransferBeneficiaryParams(e){if(!e)throw new InvalidParametersError("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new InvalidParametersError("sepaTransferSettings must be an object");if(!e.beneficiaryId&&!e.beneficiary)throw new InvalidParametersError("Either beneficiaryId or beneficiary must be provided");const t=validateExpectedStringValues({beneficiaryId:e.beneficiaryId});if(t.length>0)throw new InvalidParametersError(t);return e}function validateCreateSepaTransferParams(e){if(!e)throw new InvalidParametersError("sepaTransferSettings parameter is required for the called function");if("object"!=typeof e)throw new InvalidParametersError("sepaTransferSettings must be an object");validatePresenceOfRequiredParams(e,requiredCreateSepaTransferParams);const t=[...validateExpectedStringValues({bankAccountId:e.bankAccountId,note:e.note,reference:e.reference}),...validateExpectedNumericValues({amount:e.amount})].flat();if(t.length>0)throw new InvalidParametersError(t);if(e.amount>AMOUNT_REQUIRING_ATTACHMENTS&&(!e.attachmentIds||0===e.attachmentIds.length))throw new InvalidParametersError("Attachments are required for transfers over €30,000");return e}function validateCancelSepaTransferParams(e){if(!e)throw new InvalidParametersError("sepaTransferId parameter is required for the called function");if("string"!=typeof e)throw new InvalidParametersError("sepaTransferId must be a string");return e}function validateGetSepaTransferCreationFlowLinkParams(e){if(!e||!e.callbackUrl)throw new InvalidParametersError("callbackUrl parameter is required for the getSepaTransferCreationFlowLink function");if("string"!=typeof e.callbackUrl)throw new InvalidParametersError("callbackUrl must be a string");return e.callbackUrl}function validateAuthLinkRequestSettings(e){if(!e||"object"!=typeof e)throw new InvalidParametersError("requestSettings must be an object");const t=e,{action:r,callbackUrl:n}=e;validatePresenceOfRequiredParams(t,[{name:"action"}]);const a=validateExpectedStringValues(t),i=Object.values(AUTH_LINK_ACTIONS);if(i.includes(r)||a.push(`action must be one of ${i.join(", ")}`),a.length>0)throw new InvalidParametersError(a);if(void 0!==n&&""===n.trim())throw new InvalidParametersError("callbackUrl cannot be empty")}function transformAuthLinkResponse(e){return{url:e.url,postAuthAction:e.post_authn_action,callbackUrl:e.callback_url,expiresAt:e.expired_at,usedAt:e.used_at}}async function request({requestSettings:e,operationSettings:t}){validateAuthLinkRequestSettings(e);const{proxyRequestFunction:r,stagingToken:n}=validateOperationSettingsParams(t||{});if(r){const t=encodeNetworkCall(prepareAuthLinkRequest({stagingToken:n,action:e.action,callbackUrl:e.callbackUrl}));return transformAuthLinkResponse(decodeNetworkResponse(await r(t)).body)}{const r=t?.accessToken||validatePresenceOfAuthToken();return transformAuthLinkResponse(await requestAuthLink({accessToken:r,stagingToken:n,action:e.action,callbackUrl:e.callbackUrl}))}}const authLinks$1={request:request},authLinks=authLinks$1;async function findBeneficiary({sepaTransferSettings:e,operationSettings:t}){return e?.beneficiary?e.beneficiary:await getBeneficiary({beneficiarySettings:{beneficiaryId:e?.beneficiaryId},operationSettings:t})}function decorateUrlWithExtraParams(e,t){const r=t?.locale||localeManager.getLocale(),n=new URL(e);return r&&n.searchParams.append("lang",r),t?.mfaPreference&&n.searchParams.append("mfaPreference",t.mfaPreference),t?.idempotencyKey&&n.searchParams.append("idempotencyKey",t.idempotencyKey),n.toString()}function createSepaTransferScaElement({networkCallDescriptor:e,scaSessionToken:t,operationSettings:r}){const{uiParentElementId:n,proxyRequestFunction:a,locale:i}=r,s=getUIParentElement(n);s.innerHTML="";const o=document.createElement("qonto-sca-passkey-waiting");return o.networkCallDescriptor={...e,options:{...e.options,headers:{...e.options.headers,scaSessionToken:t}}},o.operationSettings={uiParentElementId:n,proxyRequestFunction:a,locale:i},s.appendChild(o),o}async function waitForSepaTransferScaResult(e){return new Promise(((t,r)=>{e.addEventListener("sca-success",(e=>{t(e.detail.result.transfer)}),{once:!0}),e.addEventListener("sca-error",(e=>{r(e.detail.error)}),{once:!0}),e.addEventListener("sca-abort",(e=>{r(e.detail.result)}),{once:!0})}))}function __decorate(e,t,r,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(i<3?a(s):i>3?a(t,r,s):a(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}"function"==typeof SuppressedError&&SuppressedError;
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2019 Google LLC
@@ -170,7 +170,7 @@ const t$1=e=>(t,r)=>{void 0!==r?r.addInitializer((()=>{customElements.define(e,t
170
170
  * @license
171
171
  * Copyright 2020 Google LLC
172
172
  * SPDX-License-Identifier: BSD-3-Clause
173
- */const e$1=()=>new h$1;let h$1=class{};const o$2=new WeakMap,n$1=e$2(class extends f{render(e){return E}update(e,[t]){const r=t!==this.G;return r&&void 0!==this.G&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),E}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let r=o$2.get(t);void 0===r&&(r=new WeakMap,o$2.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ht,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?o$2.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lottie$2={exports:{}},lottie$1=lottie$2.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){var factory;"undefined"!=typeof document&&"undefined"!=typeof navigator&&(factory=function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,n,a=e.length;for(r=0;r<a;r+=1)for(var i in n=e[r].prototype)Object.prototype.hasOwnProperty.call(n,i)&&(t.prototype[i]=n[i])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,r=this.audios.length;for(t=0;t<r;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var r,n=0,a=[];switch(e){case"int16":case"uint8c":r=1;break;default:r=1.1}for(n=0;n<t;n+=1)a.push(r);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,r){return"float32"===t?new Float32Array(r):"int16"===t?new Int16Array(r):"uint8c"===t?new Uint8ClampedArray(r):e(t,r)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$6(e)}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 e,t=["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"],r=t.length;for(e=0;e<r;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,r=createSizedArray(e.length),n=e.length;for(t=0;t<n;t+=1)r[t]=Math.abs(e[t]);return r}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,r,n){this.type=e,this.currentTime=t,this.totalTime=r,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,r,n){this.type=e,this.currentLoop=r,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,r){this.type=e,this.firstFrame=t,this.totalFrames=r}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,r){var n,a,i,s,o,l,c,h;switch(l=r*(1-t),c=r*(1-(o=6*e-(s=Math.floor(6*e)))*t),h=r*(1-(1-o)*t),s%6){case 0:n=r,a=h,i=l;break;case 1:n=c,a=r,i=l;break;case 2:n=l,a=r,i=h;break;case 3:n=l,a=c,i=r;break;case 4:n=h,a=l,i=r;break;case 5:n=r,a=l,i=c}return[n,a,i]}function RGBtoHSV(e,t,r){var n,a=Math.max(e,t,r),i=Math.min(e,t,r),s=a-i,o=0===a?0:s/a,l=a/255;switch(a){case i:n=0;break;case e:n=t-r+s*(t<r?6:0),n/=6*s;break;case t:n=r-e+2*s,n/=6*s;break;case r:n=e-t+4*s,n/=6*s}return[n,o,l]}function addSaturationToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[1]+=t,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e,t,r=[];for(e=0;e<256;e+=1)t=e.toString(16),r[e]=1===t.length?"0"+t:t;return function(e,t,n){return e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),"#"+r[e]+r[t]+r[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$5(e)}var dataManager=function(){var e,t,r=1,n=[],a={onmessage:function(){},postMessage:function(t){e({data:t})}},i={postMessage:function(e){a.onmessage({data:e})}};function s(){t||(t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),n=URL.createObjectURL(r);return new Worker(n)}return e=t,a}((function(e){if(i.dataManager||(i.dataManager=function(){function e(a,i){var s,o,l,c,h,d,f=a.length;for(o=0;o<f;o+=1)if("ks"in(s=a[o])&&!s.completed){if(s.completed=!0,s.hasMask){var u=s.masksProperties;for(c=u.length,l=0;l<c;l+=1)if(u[l].pt.k.i)n(u[l].pt.k);else for(d=u[l].pt.k.length,h=0;h<d;h+=1)u[l].pt.k[h].s&&n(u[l].pt.k[h].s[0]),u[l].pt.k[h].e&&n(u[l].pt.k[h].e[0])}0===s.ty?(s.layers=t(s.refId,i),e(s.layers,i)):4===s.ty?r(s.shapes):5===s.ty&&p(s)}}function t(e,t){var r=function(e,t){for(var r=0,n=t.length;r<n;){if(t[r].id===e)return t[r];r+=1}return null}(e,t);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(e){var t,a,i;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)n(e[t].ks.k);else for(i=e[t].ks.k.length,a=0;a<i;a+=1)e[t].ks.k[a].s&&n(e[t].ks.k[a].s[0]),e[t].ks.k[a].e&&n(e[t].ks.k[a].e[0]);else"gr"===e[t].ty&&r(e[t].it)}function n(e){var t,r=e.i.length;for(t=0;t<r;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function a(e,t){var r=t?t.split("."):[100,100,100];return e[0]>r[0]||!(r[0]>e[0])&&(e[1]>r[1]||!(r[1]>e[1])&&(e[2]>r[2]||!(r[2]>e[2])&&null))}var i,s=function(){var e=[4,4,14];function t(e){var t,r,n,a=e.length;for(t=0;t<a;t+=1)5===e[t].ty&&(n=void 0,n=(r=e[t]).t.d,r.t.d={k:[{s:n,t:0}]})}return function(r){if(a(e,r.v)&&(t(r.layers),r.assets)){var n,i=r.assets.length;for(n=0;n<i;n+=1)r.assets[n].layers&&t(r.assets[n].layers)}}}(),o=(i=[4,7,99],function(e){if(e.chars&&!a(i,e.v)){var t,n=e.chars.length;for(t=0;t<n;t+=1){var s=e.chars[t];s.data&&s.data.shapes&&(r(s.data.shapes),s.data.ip=0,s.data.op=99999,s.data.st=0,s.data.sr=1,s.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}},e.chars[t].t||(s.data.shapes.push({ty:"no"}),s.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var e=[5,7,15];function t(e){var t,r,n=e.length;for(t=0;t<n;t+=1)5===e[t].ty&&(r=void 0,"number"==typeof(r=e[t].t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(r){if(a(e,r.v)&&(t(r.layers),r.assets)){var n,i=r.assets.length;for(n=0;n<i;n+=1)r.assets[n].layers&&t(r.assets[n].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var r,n,a,i=e.length;for(r=0;r<i;r+=1)if("gr"===e[r].ty)t(e[r].it);else if("fl"===e[r].ty||"st"===e[r].ty)if(e[r].c.k&&e[r].c.k[0].i)for(a=e[r].c.k.length,n=0;n<a;n+=1)e[r].c.k[n].s&&(e[r].c.k[n].s[0]/=255,e[r].c.k[n].s[1]/=255,e[r].c.k[n].s[2]/=255,e[r].c.k[n].s[3]/=255),e[r].c.k[n].e&&(e[r].c.k[n].e[0]/=255,e[r].c.k[n].e[1]/=255,e[r].c.k[n].e[2]/=255,e[r].c.k[n].e[3]/=255);else e[r].c.k[0]/=255,e[r].c.k[1]/=255,e[r].c.k[2]/=255,e[r].c.k[3]/=255}function r(e){var r,n=e.length;for(r=0;r<n;r+=1)4===e[r].ty&&t(e[r].shapes)}return function(t){if(a(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}(),h=function(){var e=[4,4,18];function t(e){var r,n,a;for(r=e.length-1;r>=0;r-=1)if("sh"===e[r].ty)if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(a=e[r].ks.k.length,n=0;n<a;n+=1)e[r].ks.k[n].s&&(e[r].ks.k[n].s[0].c=e[r].closed),e[r].ks.k[n].e&&(e[r].ks.k[n].e[0].c=e[r].closed);else"gr"===e[r].ty&&t(e[r].it)}function r(e){var r,n,a,i,s,o,l=e.length;for(n=0;n<l;n+=1){if((r=e[n]).hasMask){var c=r.masksProperties;for(i=c.length,a=0;a<i;a+=1)if(c[a].pt.k.i)c[a].pt.k.c=c[a].cl;else for(o=c[a].pt.k.length,s=0;s<o;s+=1)c[a].pt.k[s].s&&(c[a].pt.k[s].s[0].c=c[a].cl),c[a].pt.k[s].e&&(c[a].pt.k[s].e[0].c=c[a].cl)}4===r.ty&&t(r.shapes)}}return function(t){if(a(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}();function p(e){0===e.t.a.length&&e.t.p}var d={completeData:function(r){r.__complete||(c(r),s(r),o(r),l(r),h(r),e(r.layers,r.assets),function(r,n){if(r){var a=0,i=r.length;for(a=0;a<i;a+=1)1===r[a].t&&(r[a].data.layers=t(r[a].data.refId,n),e(r[a].data.layers,n))}}(r.chars,r.assets),r.__complete=!0)}};return d.checkColors=c,d.checkChars=o,d.checkPathProperties=l,d.checkShapes=h,d.completeLayers=e,d}()),i.assetLoader||(i.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,r,n,a){var i,s=new XMLHttpRequest;try{s.responseType="json"}catch(e){}s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)i=e(s),n(i);else try{i=e(s),n(i)}catch(e){a&&a(e)}};try{s.open(["G","E","T"].join(""),t,!0)}catch(e){s.open(["G","E","T"].join(""),r+"/"+t,!0)}s.send()}}}()),"loadAnimation"===e.data.type)i.assetLoader.load(e.data.path,e.data.fullPath,(function(t){i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})}),(function(){i.postMessage({id:e.data.id,status:"error"})}));else if("complete"===e.data.type){var t=e.data.animation;i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&i.assetLoader.load(e.data.path,e.data.fullPath,(function(t){i.postMessage({id:e.data.id,payload:t,status:"success"})}),(function(){i.postMessage({id:e.data.id,status:"error"})}))})),t.onmessage=function(e){var t=e.data,r=t.id,a=n[r];n[r]=null,"success"===t.status?a.onComplete(t.payload):a.onError&&a.onError()})}function o(e,t){var a="processId_"+(r+=1);return n[a]={onComplete:e,onError:t},a}return{loadAnimation:function(e,r,n){s();var a=o(r,n);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:a})},loadData:function(e,r,n){s();var a=o(r,n);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:a})},completeAnimation:function(e,r,n){s();var a=o(r,n);t.postMessage({type:"complete",animation:e,id:a})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(e,t,r){var n="";if(e.e)n=e.p;else if(t){var a=e.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),n=t+a}else n=r,n+=e.u?e.u:"",n+=e.p;return n}function a(e){var t=0,r=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(r)),t+=1}.bind(this),50)}function i(e){var t={assetData:e},r=n(e,this.assetsPath,this.path);return dataManager.loadData(r,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=i.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(e,t){var r;this.imagesLoadedCb=t;var n=e.length;for(r=0;r<n;r+=1)e[r].layers||(e[r].t&&"seq"!==e[r].t?3===e[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[r]))):(this.totalImages+=1,this.images.push(this._createImageData(e[r]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,r=this.images.length;t<r;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var r=n(t,this.assetsPath,this.path),a=createTag("img");a.crossOrigin="anonymous",a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){i.img=e,this._imageLoaded()}.bind(this),!1),a.src=r;var i={img:a,assetData:t};return i},createImageData:function(t){var r=n(t,this.assetsPath,this.path),a=createNS("image");isSafari?this.testImageLoaded(a):a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){i.img=e,this._imageLoaded()}.bind(this),!1),a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(a):this._elementHelper.appendChild(a);var i={img:a,assetData:t};return i},imageLoaded:t,footageLoaded:r,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},s}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var r=this._cbs[e],n=0;n<r.length;n+=1)r[n](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var r=0,n=this._cbs[e].length;r<n;)this._cbs[e][r]===t&&(this._cbs[e].splice(r,1),r-=1,n-=1),r+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,r=e.split("\r\n"),n={},a=0,i=0;i<r.length;i+=1)2===(t=r[i].split(":")).length&&(n[t[0]]=t[1].trim(),a+=1);if(0===a)throw new Error;return n}return function(t){for(var r=[],n=0;n<t.length;n+=1){var a=t[n],i={time:a.tm,duration:a.dr};try{i.payload=JSON.parse(t[n].cm)}catch(r){try{i.payload=e(t[n].cm)}catch(e){i.payload={name:t[n].cm}}}r.push(i)}return r}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,r=this.compositions.length;t<r;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$4(e)}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(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var r=getRenderer(t);this.renderer=new r(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var r={wrapper:e,animationData:t},n=e.attributes;r.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",r.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var a=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===a?r.loop=!1:"true"===a?r.loop=!0:""!==a&&(r.loop=parseInt(a,10));var i=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:!n.getNamedItem("bm-autoplay")||n.getNamedItem("bm-autoplay").value;r.autoplay="false"!==i,r.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"","false"===(n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,r,n=this.animationData.layers,a=n.length,i=e.layers,s=i.length;for(r=0;r<s;r+=1)for(t=0;t<a;){if(n[t].id===i[r].id){n[t]=i[r];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(a=e.assets.length,t=0;t<a;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(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(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},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()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var r="number"==typeof e?e:void 0,n="number"==typeof t?t:void 0;this.renderer.updateContainerSize(r,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},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(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r<this.markers.length;r+=1)if((t=this.markers[r]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,r){if(!r||this.name===r){var n=Number(e);if(isNaN(n)){var a=this.getMarkerData(e);a&&this.goToAndStop(a.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,r){if(!r||this.name===r){var n=Number(e);if(isNaN(n)){var a=this.getMarkerData(e);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(n,t,r);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,r=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?r=e:this.currentRawFrame+this.firstFrame>t&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var r,n=e.length;for(r=0;r<n;r+=1)this.segments.push(e[r])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||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(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var r=e.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),t=this.assetsPath+r}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,r=this.assets.length;t<r;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,r){try{this.renderer.getElementByPath(e).updateDocumentData(t,r)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],r=0,n=0,a=0,i=!0,s=!1;function o(e){for(var r=0,a=e.target;r<n;)t[r].animation===a&&(t.splice(r,1),r-=1,n-=1,a.isPaused||h()),r+=1}function l(e,r){if(!e)return null;for(var a=0;a<n;){if(t[a].elem===e&&null!==t[a].elem)return t[a].animation;a+=1}var i=new AnimationItem;return p(i,e),i.setData(e,r),i}function c(){a+=1,u()}function h(){a-=1}function p(e,r){e.addEventListener("destroy",o),e.addEventListener("_active",c),e.addEventListener("_idle",h),t.push({elem:r,animation:e}),n+=1}function d(e){var o,l=e-r;for(o=0;o<n;o+=1)t[o].animation.advanceTime(l);r=e,a&&!s?window.requestAnimationFrame(d):i=!0}function f(e){r=e,window.requestAnimationFrame(d)}function u(){!s&&a&&i&&(window.requestAnimationFrame(f),i=!1)}return e.registerAnimation=l,e.loadAnimation=function(e){var t=new AnimationItem;return p(t,null),t.setParams(e),t},e.setSpeed=function(e,r){var a;for(a=0;a<n;a+=1)t[a].animation.setSpeed(e,r)},e.setDirection=function(e,r){var a;for(a=0;a<n;a+=1)t[a].animation.setDirection(e,r)},e.play=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.play(e)},e.pause=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.pause(e)},e.stop=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.stop(e)},e.togglePause=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.togglePause(e)},e.searchAnimations=function(e,t,r){var n,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),i=a.length;for(n=0;n<i;n+=1)r&&a[n].setAttribute("data-bm-type",r),l(a[n],e);if(t&&0===i){r||(r="svg");var s=document.getElementsByTagName("body")[0];s.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),s.appendChild(o),l(o,e)}},e.resize=function(){var e;for(e=0;e<n;e+=1)t[e].animation.resize()},e.goToAndStop=function(e,r,a){var i;for(i=0;i<n;i+=1)t[i].animation.goToAndStop(e,r,a)},e.destroy=function(e){var r;for(r=n-1;r>=0;r-=1)t[r].animation.destroy(e)},e.freeze=function(){s=!0},e.unfreeze=function(){s=!1,u()},e.setVolume=function(e,r){var a;for(a=0;a<n;a+=1)t[a].animation.setVolume(e,r)},e.mute=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.mute(e)},e.unmute=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.unmute(e)},e.getRegisteredAnimations=function(){var e,r=t.length,n=[];for(e=0;e<r;e+=1)n.push(t[e].animation);return n},e}(),BezierFactory=function(){var e={getBezierEasing:function(e,r,n,a,i){var s=i||("bez_"+e+"_"+r+"_"+n+"_"+a).replace(/\./g,"p");if(t[s])return t[s];var o=new h([e,r,n,a]);return t[s]=o,o}},t={},r=11,n=1/(r-1),a="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function o(e){return 3*e}function l(e,t,r){return((i(t,r)*e+s(t,r))*e+o(t))*e}function c(e,t,r){return 3*i(t,r)*e*e+2*s(t,r)*e+o(t)}function h(e){this._p=e,this._mSampleValues=a?new Float32Array(r):new Array(r),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(e){var t=this._p[0],r=this._p[1],n=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),t===r&&n===a?e:0===e?0:1===e?1:l(this._getTForX(e),r,a)},_precompute:function(){var e=this._p[0],t=this._p[1],r=this._p[2],n=this._p[3];this._precomputed=!0,e===t&&r===n||this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],a=0;a<r;++a)this._mSampleValues[a]=l(a*n,e,t)},_getTForX:function(e){for(var t=this._p[0],a=this._p[2],i=this._mSampleValues,s=0,o=1,h=r-1;o!==h&&i[o]<=e;++o)s+=n;var p=s+(e-i[--o])/(i[o+1]-i[o])*n,d=c(p,t,a);return d>=.001?function(e,t,r,n){for(var a=0;a<4;++a){var i=c(t,r,n);if(0===i)return t;t-=(l(t,r,n)-e)/i}return t}(e,p,t,a):0===d?p:function(e,t,r,n,a){var i,s,o=0;do{(i=l(s=t+(r-t)/2,n,a)-e)>0?r=s:t=s}while(Math.abs(i)>1e-7&&++o<10);return s}(e,s,s+n,t,a)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,r){var n=0,a=e,i=createSizedArray(a);return{newElement:function(){return n?i[n-=1]:t()},release:function(e){n===a&&(i=pooling.double(i),a*=2),r&&r(e),i[n]=e,n+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(e){var t,r=e.lengths.length;for(t=0;t<r;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0}));function bezFunction(){var e=Math;function t(e,t,r,n,a,i){var s=e*n+t*a+r*i-a*n-i*e-r*t;return s>-.001&&s<.001}var r=function(e,t,r,n){var a,i,s,o,l,c,h=getDefaultCurveSegments(),p=0,d=[],f=[],u=bezierLengthPool.newElement();for(s=r.length,a=0;a<h;a+=1){for(l=a/(h-1),c=0,i=0;i<s;i+=1)o=bmPow(1-l,3)*e[i]+3*bmPow(1-l,2)*l*r[i]+3*(1-l)*bmPow(l,2)*n[i]+bmPow(l,3)*t[i],d[i]=o,null!==f[i]&&(c+=bmPow(d[i]-f[i],2)),f[i]=d[i];c&&(p+=c=bmSqrt(c)),u.percents[a]=l,u.lengths[a]=p}return u.addedLength=p,u};function n(e){this.segmentLength=0,this.points=new Array(e)}function a(e,t){this.partialLength=e,this.point=t}var i,s=(i={},function(e,r,s,o){var l=(e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+s[0]+"_"+s[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!i[l]){var c,h,p,d,f,u,m,g=getDefaultCurveSegments(),y=0,v=null;2===e.length&&(e[0]!==r[0]||e[1]!==r[1])&&t(e[0],e[1],r[0],r[1],e[0]+s[0],e[1]+s[1])&&t(e[0],e[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(g=2);var b=new n(g);for(p=s.length,c=0;c<g;c+=1){for(m=createSizedArray(p),f=c/(g-1),u=0,h=0;h<p;h+=1)d=bmPow(1-f,3)*e[h]+3*bmPow(1-f,2)*f*(e[h]+s[h])+3*(1-f)*bmPow(f,2)*(r[h]+o[h])+bmPow(f,3)*r[h],m[h]=d,null!==v&&(u+=bmPow(m[h]-v[h],2));y+=u=bmSqrt(u),b.points[c]=new a(u,m),v=m}b.segmentLength=y,i[l]=b}return i[l]});function o(e,t){var r=t.percents,n=t.lengths,a=r.length,i=bmFloor((a-1)*e),s=e*t.addedLength,o=0;if(i===a-1||0===i||s===n[i])return r[i];for(var l=n[i]>s?-1:1,c=!0;c;)if(n[i]<=s&&n[i+1]>s?(o=(s-n[i])/(n[i+1]-n[i]),c=!1):i+=l,i<0||i>=a-1){if(i===a-1)return r[i];c=!1}return r[i]+(r[i+1]-r[i])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,n=segmentsLengthPool.newElement(),a=e.c,i=e.v,s=e.o,o=e.i,l=e._length,c=n.lengths,h=0;for(t=0;t<l-1;t+=1)c[t]=r(i[t],i[t+1],s[t],o[t+1]),h+=c[t].addedLength;return a&&l&&(c[t]=r(i[t],i[0],s[t],o[0]),h+=c[t].addedLength),n.totalLength=h,n},getNewSegment:function(t,r,n,a,i,s,c){i<0?i=0:i>1&&(i=1);var h,p=o(i,c),d=o(s=s>1?1:s,c),f=t.length,u=1-p,m=1-d,g=u*u*u,y=p*u*u*3,v=p*p*u*3,b=p*p*p,E=u*u*m,S=p*u*m+u*p*m+u*u*d,_=p*p*m+u*p*d+p*u*d,T=p*p*d,k=u*m*m,x=p*m*m+u*d*m+u*m*d,P=p*d*m+u*d*d+p*m*d,A=p*d*d,C=m*m*m,I=d*m*m+m*d*m+m*m*d,w=d*d*m+m*d*d+d*m*d,D=d*d*d;for(h=0;h<f;h+=1)l[4*h]=e.round(1e3*(g*t[h]+y*n[h]+v*a[h]+b*r[h]))/1e3,l[4*h+1]=e.round(1e3*(E*t[h]+S*n[h]+_*a[h]+T*r[h]))/1e3,l[4*h+2]=e.round(1e3*(k*t[h]+x*n[h]+P*a[h]+A*r[h]))/1e3,l[4*h+3]=e.round(1e3*(C*t[h]+I*n[h]+w*a[h]+D*r[h]))/1e3;return l},getPointInSegment:function(t,r,n,a,i,s){var l=o(i,s),c=1-l;return[e.round(1e3*(c*c*c*t[0]+(l*c*c+c*l*c+c*c*l)*n[0]+(l*l*c+c*l*l+l*c*l)*a[0]+l*l*l*r[0]))/1e3,e.round(1e3*(c*c*c*t[1]+(l*c*c+c*l*c+c*c*l)*n[1]+(l*l*c+c*l*l+l*c*l)*a[1]+l*l*l*r[1]))/1e3]},buildBezierData:s,pointOnLine2D:t,pointOnLine3D:function(r,n,a,i,s,o,l,c,h){if(0===a&&0===o&&0===h)return t(r,n,i,s,l,c);var p,d=e.sqrt(e.pow(i-r,2)+e.pow(s-n,2)+e.pow(o-a,2)),f=e.sqrt(e.pow(l-r,2)+e.pow(c-n,2)+e.pow(h-a,2)),u=e.sqrt(e.pow(l-i,2)+e.pow(c-s,2)+e.pow(h-o,2));return(p=d>f?d>u?d-f-u:u-f-d:u>f?u-f-d:f-d-u)>-1e-4&&p<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var r,n=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,i,s,o,l,c,h,p,d,f=t.lastIndex,u=f,m=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[u],i=this.keyframes[u+1],u===m-1&&e>=i.t-n){a.h&&(a=i),f=0;break}if(i.t-n>e){f=u;break}u<m-1?u+=1:(f=0,g=!1)}s=this.keyframesMetadata[u]||{};var y,v=i.t-n,b=a.t-n;if(a.to){s.bezierData||(s.bezierData=bez.buildBezierData(a.s,i.s||a.e,a.to,a.ti));var E=s.bezierData;if(e>=v||e<b){var S=e>=v?E.points.length-1:0;for(l=E.points[S].point.length,o=0;o<l;o+=1)r[o]=E.points[S].point[o]}else{s.__fnct?d=s.__fnct:(d=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,s.__fnct=d),c=d((e-b)/(v-b));var _,T=E.segmentLength*c,k=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastAddedLength:0;for(p=t.lastFrame<e&&t._lastKeyframeIndex===u?t._lastPoint:0,g=!0,h=E.points.length;g;){if(k+=E.points[p].partialLength,0===T||0===c||p===E.points.length-1){for(l=E.points[p].point.length,o=0;o<l;o+=1)r[o]=E.points[p].point[o];break}if(T>=k&&T<k+E.points[p+1].partialLength){for(_=(T-k)/E.points[p+1].partialLength,l=E.points[p].point.length,o=0;o<l;o+=1)r[o]=E.points[p].point[o]+(E.points[p+1].point[o]-E.points[p].point[o])*_;break}p<h-1?p+=1:g=!1}t._lastPoint=p,t._lastAddedLength=k-E.points[p].partialLength,t._lastKeyframeIndex=u}}else{var x,P,A,C,I;if(m=a.s.length,y=i.s||a.e,this.sh&&1!==a.h)e>=v?(r[0]=y[0],r[1]=y[1],r[2]=y[2]):e<=b?(r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2]):quaternionToEuler(r,slerp(createQuaternion(a.s),createQuaternion(y),(e-b)/(v-b)));else for(u=0;u<m;u+=1)1!==a.h&&(e>=v?c=1:e<b?c=0:(a.o.x.constructor===Array?(s.__fnct||(s.__fnct=[]),s.__fnct[u]?d=s.__fnct[u]:(x=void 0===a.o.x[u]?a.o.x[0]:a.o.x[u],P=void 0===a.o.y[u]?a.o.y[0]:a.o.y[u],A=void 0===a.i.x[u]?a.i.x[0]:a.i.x[u],C=void 0===a.i.y[u]?a.i.y[0]:a.i.y[u],d=BezierFactory.getBezierEasing(x,P,A,C).get,s.__fnct[u]=d)):s.__fnct?d=s.__fnct:(x=a.o.x,P=a.o.y,A=a.i.x,C=a.i.y,d=BezierFactory.getBezierEasing(x,P,A,C).get,a.keyframeMetadata=d),c=d((e-b)/(v-b)))),y=i.s||a.e,I=1===a.h?a.s[u]:a.s[u]+(y[u]-a.s[u])*c,"multidimensional"===this.propType?r[u]=I:r=I}return t.lastIndex=f,r}function slerp(e,t,r){var n,a,i,s,o,l=[],c=e[0],h=e[1],p=e[2],d=e[3],f=t[0],u=t[1],m=t[2],g=t[3];return(a=c*f+h*u+p*m+d*g)<0&&(a=-a,f=-f,u=-u,m=-m,g=-g),1-a>1e-6?(n=Math.acos(a),i=Math.sin(n),s=Math.sin((1-r)*n)/i,o=Math.sin(r*n)/i):(s=1-r,o=r),l[0]=s*c+o*f,l[1]=s*h+o*u,l[2]=s*p+o*m,l[3]=s*d+o*g,l}function quaternionToEuler(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],s=Math.atan2(2*n*i-2*r*a,1-2*n*n-2*a*a),o=Math.asin(2*r*n+2*a*i),l=Math.atan2(2*r*i-2*n*a,1-2*r*r-2*a*a);e[0]=s/degToRads,e[1]=o/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,r=e[1]*degToRads,n=e[2]*degToRads,a=Math.cos(t/2),i=Math.cos(r/2),s=Math.cos(n/2),o=Math.sin(t/2),l=Math.sin(r/2),c=Math.sin(n/2);return[o*l*s+a*i*c,o*i*s+a*l*c,a*l*s-o*i*c,a*i*s-o*l*c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&e>=r||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if("unidimensional"===this.propType)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var r=0,n=this.v.length;r<n;)t=e[r]*this.mult,mathAbs(this.v[r]-t)>1e-5&&(this.v[r]=t,this._mdf=!0),r+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)r=this.effectsSequence[e](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,r,n){this.propType="unidimensional",this.mult=r||1,this.data=t,this.v=r?t.k*r:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.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(e,t,r,n){var a;this.propType="multidimensional",this.mult=r||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i=t.k.length;for(this.v=createTypedArray("float32",i),this.pv=createTypedArray("float32",i),this.vel=createTypedArray("float32",i),a=0;a<i;a+=1)this.v[a]=t.k[a]*this.mult,this.pv[a]=t.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,r,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.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(e,t,r,n){var a;this.propType="multidimensional";var i,s,o,l,c=t.k.length;for(a=0;a<c-1;a+=1)t.k[a].to&&t.k[a].s&&t.k[a+1]&&t.k[a+1].s&&(i=t.k[a].s,s=t.k[a+1].s,o=t.k[a].to,l=t.k[a].ti,(2===i.length&&(i[0]!==s[0]||i[1]!==s[1])&&bez.pointOnLine2D(i[0],i[1],s[0],s[1],i[0]+o[0],i[1]+o[1])&&bez.pointOnLine2D(i[0],i[1],s[0],s[1],s[0]+l[0],s[1]+l[1])||3===i.length&&(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2])&&bez.pointOnLine3D(i[0],i[1],i[2],s[0],s[1],s[2],i[0]+o[0],i[1]+o[1],i[2]+o[2])&&bez.pointOnLine3D(i[0],i[1],i[2],s[0],s[1],s[2],s[0]+l[0],s[1]+l[1],s[2]+l[2]))&&(t.k[a].to=null,t.k[a].ti=null),i[0]===s[0]&&i[1]===s[1]&&0===o[0]&&0===o[1]&&0===l[0]&&0===l[1]&&(2===i.length||i[2]===s[2]&&0===o[2]&&0===l[2])&&(t.k[a].to=null,t.k[a].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var h=t.k[0].s.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),a=0;a<h;a+=1)this.v[a]=initFrame,this.pv[a]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",h)},this.addEffect=addEffect}var PropertyFactory=(ob={getProp:function(e,t,r,n,a){var i;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if("number"==typeof t.k[0])i=new MultiDimensionalProperty(e,t,n,a);else switch(r){case 0:i=new KeyframedValueProperty(e,t,n,a);break;case 1:i=new KeyframedMultidimensionalProperty(e,t,n,a)}else i=new ValueProperty(e,t,n,a);return i.effectsSequence.length&&a.addDynamicProperty(i),i}},ob),ob;function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));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(e,t){this.c=e,this.setLength(t);for(var r=0;r<t;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},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(e,t,r,n,a){var i;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":i=this.v;break;case"i":i=this.i;break;case"o":i=this.o;break;default:i=[]}(!i[n]||i[n]&&!a)&&(i[n]=pointPool.newElement()),i[n][0]=e,i[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,r,n,a,i,s,o){this.setXYAt(e,t,"v",s,o),this.setXYAt(r,n,"o",s,o),this.setXYAt(a,i,"i",s,o)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,r=this.o,n=this.i,a=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],r[0][0],r[0][1],0,!1),a=1);var i,s=this._length-1,o=this._length;for(i=a;i<o;i+=1)e.setTripleAt(t[s][0],t[s][1],n[s][0],n[s][1],r[s][0],r[s][1],i,!1),s-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(e){var t,r=e._length;for(t=0;t<r;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1})),factory.clone=function(e){var t,r=factory.newElement(),n=void 0===e._length?e.v.length:e._length;for(r.setLength(n),r.c=e.c,t=0;t<n;t+=1)r.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:function(){return t?n[t-=1]:new ShapeCollection},release:function(e){var a,i=e._length;for(a=0;a<i;a+=1)shapePool.release(e.shapes[a]);e._length=0,t===r&&(n=pooling.double(n),r*=2),n[t]=e,t+=1}},t=0,r=4,n=createSizedArray(r);return e}(),ShapePropertyFactory=function(){var e=-999999;function t(e,t,r){var n,a,i,s,o,l,c,h,p,d=r.lastIndex,f=this.keyframes;if(e<f[0].t-this.offsetTime)n=f[0].s[0],i=!0,d=0;else if(e>=f[f.length-1].t-this.offsetTime)n=f[f.length-1].s?f[f.length-1].s[0]:f[f.length-2].e[0],i=!0;else{for(var u,m,g,y=d,v=f.length-1,b=!0;b&&(u=f[y],!((m=f[y+1]).t-this.offsetTime>e));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},d=y,!(i=1===u.h)){if(e>=m.t-this.offsetTime)h=1;else if(e<u.t-this.offsetTime)h=0;else{var E;g.__fnct?E=g.__fnct:(E=BezierFactory.getBezierEasing(u.o.x,u.o.y,u.i.x,u.i.y).get,g.__fnct=E),h=E((e-(u.t-this.offsetTime))/(m.t-this.offsetTime-(u.t-this.offsetTime)))}a=m.s?m.s[0]:u.e[0]}n=u.s[0]}for(l=t._length,c=n.i[0].length,r.lastIndex=d,s=0;s<l;s+=1)for(o=0;o<c;o+=1)p=i?n.i[s][o]:n.i[s][o]+(a.i[s][o]-n.i[s][o])*h,t.i[s][o]=p,p=i?n.o[s][o]:n.o[s][o]+(a.o[s][o]-n.o[s][o])*h,t.o[s][o]=p,p=i?n.v[s][o]:n.v[s][o]+(a.v[s][o]-n.v[s][o])*h,t.v[s][o]=p}function r(){var t=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime,a=this._caching.lastFrame;return a!==e&&(a<r&&t<r||a>n&&t>n)||(this._caching.lastIndex=a<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function n(){this.paths=this.localShapeCollection}function a(e){(function(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var r,n=e._length;for(r=0;r<n;r+=1)if(e.v[r][0]!==t.v[r][0]||e.v[r][1]!==t.v[r][1]||e.o[r][0]!==t.o[r][0]||e.o[r][1]!==t.o[r][1]||e.i[r][0]!==t.i[r][0]||e.i[r][1]!==t.i[r][1])return!1;return!0})(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function i(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e,t;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(t=0;t<r;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function s(e,t,r){this.propType="shape",this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var a=3===r?t.pt.k:t.ks.k;this.v=shapePool.clone(a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function o(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function l(t,a,i){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===i?a.pt.k:a.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var s=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=n,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[r.bind(this)]}s.prototype.interpolateShape=t,s.prototype.getValue=i,s.prototype.setVValue=a,s.prototype.addEffect=o,l.prototype.getValue=i,l.prototype.interpolateShape=t,l.prototype.setVValue=a,l.prototype.addEffect=o;var c=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],r=this.p.v[1],n=this.s.v[0]/2,a=this.s.v[1]/2,i=3!==this.d,s=this.v;s.v[0][0]=t,s.v[0][1]=r-a,s.v[1][0]=i?t+n:t-n,s.v[1][1]=r,s.v[2][0]=t,s.v[2][1]=r+a,s.v[3][0]=i?t-n:t+n,s.v[3][1]=r,s.i[0][0]=i?t-n*e:t+n*e,s.i[0][1]=r-a,s.i[1][0]=i?t+n:t-n,s.i[1][1]=r-a*e,s.i[2][0]=i?t+n*e:t-n*e,s.i[2][1]=r+a,s.i[3][0]=i?t-n:t+n,s.i[3][1]=r+a*e,s.o[0][0]=i?t+n*e:t-n*e,s.o[0][1]=r-a,s.o[1][0]=i?t+n:t-n,s.o[1][1]=r+a*e,s.o[2][0]=i?t-n*e:t+n*e,s.o[2][1]=r+a,s.o[3][0]=i?t-n:t+n,s.o[3][1]=r-a*e}},extendPrototype([DynamicPropertyContainer],t),t}(),h=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),1===t.sy?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.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 e.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e,t,r,n,a=2*Math.floor(this.pt.v),i=2*Math.PI/a,s=!0,o=this.or.v,l=this.ir.v,c=this.os.v,h=this.is.v,p=2*Math.PI*o/(2*a),d=2*Math.PI*l/(2*a),f=-Math.PI/2;f+=this.r.v;var u=3===this.data.d?-1:1;for(this.v._length=0,e=0;e<a;e+=1){r=s?c:h,n=s?p:d;var m=(t=s?o:l)*Math.cos(f),g=t*Math.sin(f),y=0===m&&0===g?0:g/Math.sqrt(m*m+g*g),v=0===m&&0===g?0:-m/Math.sqrt(m*m+g*g);m+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(m,g,m-y*n*r*u,g-v*n*r*u,m+y*n*r*u,g+v*n*r*u,e,!0),s=!s,f+=i*u}},convertPolygonToPath:function(){var e,t=Math.floor(this.pt.v),r=2*Math.PI/t,n=this.or.v,a=this.os.v,i=2*Math.PI*n/(4*t),s=.5*-Math.PI,o=3===this.data.d?-1:1;for(s+=this.r.v,this.v._length=0,e=0;e<t;e+=1){var l=n*Math.cos(s),c=n*Math.sin(s),h=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),p=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-h*i*a*o,c-p*i*a*o,l+h*i*a*o,c+p*i*a*o,e,!0),s+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],r=this.s.v[0]/2,n=this.s.v[1]/2,a=bmMin(r,n,this.r.v),i=a*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(e+r,t-n+a,e+r,t-n+a,e+r,t-n+i,0,!0),this.v.setTripleAt(e+r,t+n-a,e+r,t+n-i,e+r,t+n-a,1,!0),0!==a?(this.v.setTripleAt(e+r-a,t+n,e+r-a,t+n,e+r-i,t+n,2,!0),this.v.setTripleAt(e-r+a,t+n,e-r+i,t+n,e-r+a,t+n,3,!0),this.v.setTripleAt(e-r,t+n-a,e-r,t+n-a,e-r,t+n-i,4,!0),this.v.setTripleAt(e-r,t-n+a,e-r,t-n+i,e-r,t-n+a,5,!0),this.v.setTripleAt(e-r+a,t-n,e-r+a,t-n,e-r+i,t-n,6,!0),this.v.setTripleAt(e+r-a,t-n,e+r-i,t-n,e+r-a,t-n,7,!0)):(this.v.setTripleAt(e-r,t+n,e-r+i,t+n,e-r,t+n,2),this.v.setTripleAt(e-r,t-n,e-r,t-n+i,e-r,t-n,3))):(this.v.setTripleAt(e+r,t-n+a,e+r,t-n+i,e+r,t-n+a,0,!0),0!==a?(this.v.setTripleAt(e+r-a,t-n,e+r-a,t-n,e+r-i,t-n,1,!0),this.v.setTripleAt(e-r+a,t-n,e-r+i,t-n,e-r+a,t-n,2,!0),this.v.setTripleAt(e-r,t-n+a,e-r,t-n+a,e-r,t-n+i,3,!0),this.v.setTripleAt(e-r,t+n-a,e-r,t+n-i,e-r,t+n-a,4,!0),this.v.setTripleAt(e-r+a,t+n,e-r+a,t+n,e-r+i,t+n,5,!0),this.v.setTripleAt(e+r-a,t+n,e+r-i,t+n,e+r-a,t+n,6,!0),this.v.setTripleAt(e+r,t+n-a,e+r,t+n-a,e+r,t+n-i,7,!0)):(this.v.setTripleAt(e-r,t-n,e-r+i,t-n,e-r,t-n,1,!0),this.v.setTripleAt(e-r,t+n,e-r,t+n-i,e-r,t+n,2,!0),this.v.setTripleAt(e+r,t+n,e+r-i,t+n,e+r,t+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],e),e}(),d={getShapeProp:function(e,t,r){var n;return 3===r||4===r?n=(3===r?t.pt:t.ks).k.length?new l(e,t,r):new s(e,t,r):5===r?n=new p(e,t):6===r?n=new c(e,t):7===r&&(n=new h(e,t)),n.k&&e.addDynamicProperty(n),n},getConstructorFunction:function(){return s},getKeyframedConstructorFunction:function(){return l}};return d}(),Matrix=function(){var e=Math.cos,t=Math.sin,r=Math.tan,n=Math.round;function a(){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 i(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(n,-a,0,0,a,n,0,0,0,0,1,0,0,0,0,1)}function s(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(1,0,0,0,0,n,-a,0,0,a,n,0,0,0,0,1)}function o(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(n,0,a,0,0,1,0,0,-a,0,n,0,0,0,0,1)}function l(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(n,-a,0,0,a,n,0,0,0,0,1,0,0,0,0,1)}function c(e,t){return this._t(1,t,e,1,0,0)}function h(e,t){return this.shear(r(e),r(t))}function p(n,a){var i=e(a),s=t(a);return this._t(i,s,0,0,-s,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(n),1,0,0,0,0,1,0,0,0,0,1)._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function d(e,t,r){return r||0===r||(r=1),1===e&&1===t&&1===r?this:this._t(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1)}function f(e,t,r,n,a,i,s,o,l,c,h,p,d,f,u,m){return this.props[0]=e,this.props[1]=t,this.props[2]=r,this.props[3]=n,this.props[4]=a,this.props[5]=i,this.props[6]=s,this.props[7]=o,this.props[8]=l,this.props[9]=c,this.props[10]=h,this.props[11]=p,this.props[12]=d,this.props[13]=f,this.props[14]=u,this.props[15]=m,this}function u(e,t,r){return r=r||0,0!==e||0!==t||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,r,1):this}function m(e,t,r,n,a,i,s,o,l,c,h,p,d,f,u,m){var g=this.props;if(1===e&&0===t&&0===r&&0===n&&0===a&&1===i&&0===s&&0===o&&0===l&&0===c&&1===h&&0===p)return g[12]=g[12]*e+g[15]*d,g[13]=g[13]*i+g[15]*f,g[14]=g[14]*h+g[15]*u,g[15]*=m,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],E=g[3],S=g[4],_=g[5],T=g[6],k=g[7],x=g[8],P=g[9],A=g[10],C=g[11],I=g[12],w=g[13],D=g[14],M=g[15];return g[0]=y*e+v*a+b*l+E*d,g[1]=y*t+v*i+b*c+E*f,g[2]=y*r+v*s+b*h+E*u,g[3]=y*n+v*o+b*p+E*m,g[4]=S*e+_*a+T*l+k*d,g[5]=S*t+_*i+T*c+k*f,g[6]=S*r+_*s+T*h+k*u,g[7]=S*n+_*o+T*p+k*m,g[8]=x*e+P*a+A*l+C*d,g[9]=x*t+P*i+A*c+C*f,g[10]=x*r+P*s+A*h+C*u,g[11]=x*n+P*o+A*p+C*m,g[12]=I*e+w*a+D*l+M*d,g[13]=I*t+w*i+D*c+M*f,g[14]=I*r+w*s+D*h+M*u,g[15]=I*n+w*o+D*p+M*m,this._identityCalculated=!1,this}function g(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function b(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function E(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function S(e,t,r){return{x:e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]}}function _(e,t,r){return e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12]}function T(e,t,r){return e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13]}function k(e,t,r){return e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]}function x(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,r=-this.props[1]/e,n=-this.props[4]/e,a=this.props[0]/e,i=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,s=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,o=new Matrix;return o.props[0]=t,o.props[1]=r,o.props[4]=n,o.props[5]=a,o.props[12]=i,o.props[13]=s,o}function P(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function A(e){var t,r=e.length,n=[];for(t=0;t<r;t+=1)n[t]=P(e[t]);return n}function C(e,t,r){var n=createTypedArray("float32",6);if(this.isIdentity())n[0]=e[0],n[1]=e[1],n[2]=t[0],n[3]=t[1],n[4]=r[0],n[5]=r[1];else{var a=this.props[0],i=this.props[1],s=this.props[4],o=this.props[5],l=this.props[12],c=this.props[13];n[0]=e[0]*a+e[1]*s+l,n[1]=e[0]*i+e[1]*o+c,n[2]=t[0]*a+t[1]*s+l,n[3]=t[0]*i+t[1]*o+c,n[4]=r[0]*a+r[1]*s+l,n[5]=r[0]*i+r[1]*o+c}return n}function I(e,t,r){return this.isIdentity()?[e,t,r]:[e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]]}function w(e,t){if(this.isIdentity())return e+","+t;var r=this.props;return Math.round(100*(e*r[0]+t*r[4]+r[12]))/100+","+Math.round(100*(e*r[1]+t*r[5]+r[13]))/100}function D(){for(var e=0,t=this.props,r="matrix3d(";e<16;)r+=n(1e4*t[e])/1e4,r+=15===e?")":",",e+=1;return r}function M(e){return e<1e-6&&e>0||e>-1e-6&&e<0?n(1e4*e)/1e4:e}function R(){var e=this.props;return"matrix("+M(e[0])+","+M(e[1])+","+M(e[4])+","+M(e[5])+","+M(e[12])+","+M(e[13])+")"}return function(){this.reset=a,this.rotate=i,this.rotateX=s,this.rotateY=o,this.rotateZ=l,this.skew=h,this.skewFromAxis=p,this.shear=c,this.scale=d,this.setTransform=f,this.translate=u,this.transform=m,this.multiply=g,this.applyToPoint=S,this.applyToX=_,this.applyToY=T,this.applyToZ=k,this.applyToPointArray=I,this.applyToTriplePoints=C,this.applyToPointStringified=w,this.toCSS=D,this.to2dCSS=R,this.clone=b,this.cloneFromProps=E,this.equals=v,this.inversePoints=A,this.inversePoint=P,this.getInverseMatrix=x,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$3(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),r=0;r<t.length;r+=1){var n=t[r].split("=");if(decodeURIComponent(n[0])==e)return decodeURIComponent(n[1])}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.13.0";var queryString="",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{"object"!==_typeof$3(exports)&&(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};return e.registerModifier=function(e,r){t[e]||(t[e]=r)},e.getModifier=function(e,r,n){return new t[e](r,n)},e}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),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),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,r,n,a){var i=[];t<=1?i.push({s:e,e:t}):e>=1?i.push({s:e-1,e:t-1}):(i.push({s:e,e:1}),i.push({s:0,e:t-1}));var s,o,l=[],c=i.length;for(s=0;s<c;s+=1){var h,p;(o=i[s]).e*a<n||o.s*a>n+r||(h=o.s*a<=n?0:(o.s*a-n)/r,p=o.e*a>=n+r?1:(o.e*a-n)/r,l.push([h,p]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t<r;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,r,n,a;if(this._mdf||e){var i=this.o.v%360/360;if(i<0&&(i+=1),(t=this.s.v>1?1+i:this.s.v<0?0+i:this.s.v+i)>(r=this.e.v>1?1+i:this.e.v<0?0+i:this.e.v+i)){var s=t;t=r,r=s}t=1e-4*Math.round(1e4*t),r=1e-4*Math.round(1e4*r),this.sValue=t,this.eValue=r}else t=this.sValue,r=this.eValue;var o,l,c,h,p,d=this.shapes.length,f=0;if(r===t)for(a=0;a<d;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===r&&0===t||0===r&&1===t){if(this._mdf)for(a=0;a<d;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var u,m,g=[];for(a=0;a<d;a+=1)if((u=this.shapes[a]).shape._mdf||this._mdf||e||2===this.m){if(l=(n=u.shape.paths)._length,p=0,!u.shape._mdf&&u.pathsData.length)p=u.totalShapeLength;else{for(c=this.releasePathsData(u.pathsData),o=0;o<l;o+=1)h=bez.getSegmentsLength(n.shapes[o]),c.push(h),p+=h.totalLength;u.totalShapeLength=p,u.pathsData=c}f+=p,u.shape._mdf=!0}else u.shape.paths=u.localShapeCollection;var y,v=t,b=r,E=0;for(a=d-1;a>=0;a-=1)if((u=this.shapes[a]).shape._mdf){for((m=u.localShapeCollection).releaseShapes(),2===this.m&&d>1?(y=this.calculateShapeEdges(t,r,u.totalShapeLength,E,f),E+=u.totalShapeLength):y=[[v,b]],l=y.length,o=0;o<l;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:u.totalShapeLength*v,e:u.totalShapeLength*b}):v>=1?g.push({s:u.totalShapeLength*(v-1),e:u.totalShapeLength*(b-1)}):(g.push({s:u.totalShapeLength*v,e:u.totalShapeLength}),g.push({s:0,e:u.totalShapeLength*(b-1)}));var S=this.addShapes(u,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(u.shape.paths.shapes[u.shape.paths._length-1].c){var _=S.pop();this.addPaths(S,m),S=this.addShapes(u,g[1],_)}else this.addPaths(S,m),S=this.addShapes(u,g[1]);this.addPaths(S,m)}}u.shape.paths=m}}},TrimModifier.prototype.addPaths=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t.addShape(e[r])},TrimModifier.prototype.addSegment=function(e,t,r,n,a,i,s){a.setXYAt(t[0],t[1],"o",i),a.setXYAt(r[0],r[1],"i",i+1),s&&a.setXYAt(e[0],e[1],"v",i),a.setXYAt(n[0],n[1],"v",i+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,r,n){t.setXYAt(e[1],e[5],"o",r),t.setXYAt(e[2],e[6],"i",r+1),n&&t.setXYAt(e[0],e[4],"v",r),t.setXYAt(e[3],e[7],"v",r+1)},TrimModifier.prototype.addShapes=function(e,t,r){var n,a,i,s,o,l,c,h,p=e.pathsData,d=e.shape.paths.shapes,f=e.shape.paths._length,u=0,m=[],g=!0;for(r?(o=r._length,h=r._length):(r=shapePool.newElement(),o=0,h=0),m.push(r),n=0;n<f;n+=1){for(l=p[n].lengths,r.c=d[n].c,i=d[n].c?l.length:l.length+1,a=1;a<i;a+=1)if(u+(s=l[a-1]).addedLength<t.s)u+=s.addedLength,r.c=!1;else{if(u>t.e){r.c=!1;break}t.s<=u&&t.e>=u+s.addedLength?(this.addSegment(d[n].v[a-1],d[n].o[a-1],d[n].i[a],d[n].v[a],r,o,g),g=!1):(c=bez.getNewSegment(d[n].v[a-1],d[n].v[a],d[n].o[a-1],d[n].i[a],(t.s-u)/s.addedLength,(t.e-u)/s.addedLength,l[a-1]),this.addSegmentFromArray(c,r,o,g),g=!1,r.c=!1),u+=s.addedLength,o+=1}if(d[n].c&&l.length){if(s=l[a-1],u<=t.e){var y=l[a-1].addedLength;t.s<=u&&t.e>=u+y?(this.addSegment(d[n].v[a-1],d[n].o[a-1],d[n].i[0],d[n].v[0],r,o,g),g=!1):(c=bez.getNewSegment(d[n].v[a-1],d[n].v[0],d[n].o[a-1],d[n].i[0],(t.s-u)/y,(t.e-u)/y,l[a-1]),this.addSegmentFromArray(c,r,o,g),g=!1,r.c=!1)}else r.c=!1;u+=s.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[h][0],r.v[h][1],"i",h),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),u>t.e)break;n<f-1&&(r=shapePool.newElement(),g=!0,m.push(r),o=0)}return m},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var r=t/100,n=[0,0],a=e._length,i=0;for(i=0;i<a;i+=1)n[0]+=e.v[i][0],n[1]+=e.v[i][1];n[0]/=a,n[1]/=a;var s,o,l,c,h,p,d=shapePool.newElement();for(d.c=e.c,i=0;i<a;i+=1)s=e.v[i][0]+(n[0]-e.v[i][0])*r,o=e.v[i][1]+(n[1]-e.v[i][1])*r,l=e.o[i][0]+(n[0]-e.o[i][0])*-r,c=e.o[i][1]+(n[1]-e.o[i][1])*-r,h=e.i[i][0]+(n[0]-e.i[i][0])*-r,p=e.i[i][1]+(n[1]-e.i[i][1])*-r,d.setTripleAt(s,o,l,c,h,p,i);return d},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.amount.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e,t,r){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var n,a=t.or.k.length;for(n=0;n<a;n+=1)t.or.k[n].to=null,t.or.k[n].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var r;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 n,a;if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),a=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(n=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],a=[];var i=this.px,s=this.py;i._caching.lastFrame+i.offsetTime<=i.keyframes[0].t?(n[0]=i.getValueAtTime((i.keyframes[0].t+.01)/r,0),n[1]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),a[0]=i.getValueAtTime(i.keyframes[0].t/r,0),a[1]=s.getValueAtTime(s.keyframes[0].t/r,0)):i._caching.lastFrame+i.offsetTime>=i.keyframes[i.keyframes.length-1].t?(n[0]=i.getValueAtTime(i.keyframes[i.keyframes.length-1].t/r,0),n[1]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),a[0]=i.getValueAtTime((i.keyframes[i.keyframes.length-1].t-.01)/r,0),a[1]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0)):(n=[i.pv,s.pv],a[0]=i.getValueAtTime((i._caching.lastFrame+i.offsetTime-.01)/r,i.offsetTime),a[1]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime))}else n=a=e;this.v.rotate(-Math.atan2(n[1]-a[1],n[0]-a[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}},precalculateMatrix:function(){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,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}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)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,r,n){return new t(e,r,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,r){return e*(1-r)+t*r}function lerpPoint(e,t,r){return[lerp(e[0],t[0],r),lerp(e[1],t[1],r)]}function quadRoots(e,t,r){if(0===e)return[];var n=t*t-4*e*r;if(n<0)return[];var a=-t/(2*e);if(0===n)return[a];var i=Math.sqrt(n)/(2*e);return[a-i,a+i]}function polynomialCoefficients(e,t,r,n){return[3*t-e-3*r+n,3*e-6*t+3*r,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,r,n,a){a&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),a&&pointEqual(r,n)&&(r=lerpPoint(e,n,2/3));var i=polynomialCoefficients(e[0],t[0],r[0],n[0]),s=polynomialCoefficients(e[1],t[1],r[1],n[1]);this.a=[i[0],s[0]],this.b=[i[1],s[1]],this.c=[i[2],s[2]],this.d=[i[3],s[3]],this.points=[e,t,r,n]}function extrema(e,t){var r=e.points[0][t],n=e.points[e.points.length-1][t];if(r>n){var a=n;n=r,r=a}for(var i=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),s=0;s<i.length;s+=1)if(i[s]>0&&i[s]<1){var o=e.point(i[s])[t];o<r?r=o:o>n&&(n=o)}return{min:r,max:n}}function intersectData(e,t,r){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+r)/2,t1:t,t2:r}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,r,n,a,i){if(boxIntersect(e,t))if(r>=i||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n)a.push([e.t,t.t]);else{var s=splitData(e),o=splitData(t);intersectsImpl(s[0],o[0],r+1,n,a,i),intersectsImpl(s[0],o[1],r+1,n,a,i),intersectsImpl(s[1],o[0],r+1,n,a,i),intersectsImpl(s[1],o[1],r+1,n,a,i)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,r,n){var a=[e[0],e[1],1],i=[t[0],t[1],1],s=[r[0],r[1],1],o=[n[0],n[1],1],l=crossProduct(crossProduct(a,i),crossProduct(s,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,r){return[e[0]+Math.cos(t)*r,e[1]-Math.sin(t)*r]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,r,n,a,i,s){var o=r-Math.PI/2,l=r+Math.PI/2,c=t[0]+Math.cos(r)*n*a,h=t[1]-Math.sin(r)*n*a;e.setTripleAt(c,h,c+Math.cos(o)*i,h-Math.sin(o)*i,c+Math.cos(l)*s,h-Math.sin(l)*s,e.length())}function getPerpendicularVector(e,t){var r=[t[0]-e[0],t[1]-e[1]],n=.5*-Math.PI;return[Math.cos(n)*r[0]-Math.sin(n)*r[1],Math.sin(n)*r[0]+Math.cos(n)*r[1]]}function getProjectingAngle(e,t){var r=0===t?e.length()-1:t-1,n=(t+1)%e.length(),a=getPerpendicularVector(e.v[r],e.v[n]);return Math.atan2(0,1)-Math.atan2(a[1],a[0])}function zigZagCorner(e,t,r,n,a,i,s){var o=getProjectingAngle(t,r),l=t.v[r%t._length],c=t.v[0===r?t._length-1:r-1],h=t.v[(r+1)%t._length],p=2===i?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0,d=2===i?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0;setPoint(e,t.v[r%t._length],o,s,n,d/(2*(a+1)),p/(2*(a+1)))}function zigZagSegment(e,t,r,n,a,i){for(var s=0;s<n;s+=1){var o=(s+1)/(n+1),l=2===a?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,c=t.normalAngle(o);setPoint(e,t.point(o),c,i,r,l/(2*(n+1)),l/(2*(n+1))),i=-i}return i}function linearOffset(e,t,r){var n=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,n,r),polarOffset(t,n,r)]}function offsetSegment(e,t){var r,n,a,i,s,o,l;r=(l=linearOffset(e.points[0],e.points[1],t))[0],n=l[1],a=(l=linearOffset(e.points[1],e.points[2],t))[0],i=l[1],s=(l=linearOffset(e.points[2],e.points[3],t))[0],o=l[1];var c=lineIntersection(r,n,a,i);null===c&&(c=n);var h=lineIntersection(s,o,a,i);return null===h&&(h=s),new PolynomialBezier(r,c,h,o)}function joinLines(e,t,r,n,a){var i=t.points[3],s=r.points[0];if(3===n)return i;if(pointEqual(i,s))return i;if(2===n){var o=-t.tangentAngle(1),l=-r.tangentAngle(0)+Math.PI,c=lineIntersection(i,polarOffset(i,o+Math.PI/2,100),s,polarOffset(s,o+Math.PI/2,100)),h=c?pointDistance(c,i):pointDistance(i,s)/2,p=polarOffset(i,o,2*h*roundCorner);return e.setXYAt(p[0],p[1],"o",e.length()-1),p=polarOffset(s,l,2*h*roundCorner),e.setTripleAt(s[0],s[1],s[0],s[1],p[0],p[1],e.length()),s}var d=lineIntersection(pointEqual(i,t.points[2])?t.points[0]:t.points[2],i,s,pointEqual(s,r.points[1])?r.points[3]:r.points[1]);return d&&pointDistance(d,i)<a?(e.setTripleAt(d[0],d[1],d[0],d[1],d[0],d[1],e.length()),d):i}function getIntersection(e,t){var r=e.intersections(t);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(e,t){var r=e.slice(),n=t.slice(),a=getIntersection(e[e.length-1],t[0]);return a&&(r[e.length-1]=e[e.length-1].split(a[0])[0],n[0]=t[0].split(a[1])[1]),e.length>1&&t.length>1&&(a=getIntersection(e[0],t[t.length-1]))?[[e[0].split(a[0])[0]],[t[t.length-1].split(a[1])[1]]]:[r,n]}function pruneIntersections(e){for(var t,r=1;r<e.length;r+=1)t=pruneSegmentIntersection(e[r-1],e[r]),e[r-1]=t[0],e[r]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var r,n,a,i,s=e.inflectionPoints();if(0===s.length)return[offsetSegment(e,t)];if(1===s.length||floatEqual(s[1],1))return r=(a=e.split(s[0]))[0],n=a[1],[offsetSegment(r,t),offsetSegment(n,t)];r=(a=e.split(s[0]))[0];var o=(s[1]-s[0])/(1-s[0]);return i=(a=a[1].split(o))[0],n=a[1],[offsetSegment(r,t),offsetSegment(i,t),offsetSegment(n,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],r="normal",n="normal",a=t.length,i=0;i<a;i+=1)switch(t[i].toLowerCase()){case"italic":n="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:n,weight:e.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,r,n,a,i){var s=i?-1:1,o=n.s.v[0]+(1-n.s.v[0])*(1-a),l=n.s.v[1]+(1-n.s.v[1])*(1-a);e.translate(n.p.v[0]*s*a,n.p.v[1]*s*a,n.p.v[2]),t.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),t.rotate(-n.r.v*s*a),t.translate(n.a.v[0],n.a.v[1],n.a.v[2]),r.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),r.scale(i?1/o:o,i?1/l:l),r.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(e,t,r,n){for(this.elem=e,this.arr=t,this.pos=r,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[r]);r>0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t]._processed=!1,"gr"===e[t].ty&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]._render=t,"gr"===e[r].ty&&this.changeGroupRender(e[r].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,r,n,a,i,s=!1;if(this._mdf||e){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),s=!0}for(i=0,n=0;n<=this._groups.length-1;n+=1){if(o=i<l,this._groups[n]._render=o,this.changeGroupRender(this._groups[n].it,o),!o){var h=this.elemsData[n].it,p=h[h.length-1];0!==p.transform.op.v?(p.transform.op._mdf=!0,p.transform.op.v=0):p.transform.op._mdf=!1}i+=1}this._currentCopies=l;var d=this.o.v,f=d%1,u=d>0?Math.floor(d):Math.ceil(d),m=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,E=0;if(d>0){for(;E<u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),E+=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,f,!1),E+=f)}else if(d<0){for(;E>u;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),E-=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-f,!0),E-=f)}for(n=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,i=this._currentCopies;i;){if(b=(r=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==E){for((0!==n&&1===a||n!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];E+=1,i-=1,n+=a}}else for(i=this._currentCopies,n=0,a=1;i;)r=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,i-=1,n+=a;return s},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var r,n=shapePool.newElement();n.c=e.c;var a,i,s,o,l,c,h,p,d,f,u,m,g=e._length,y=0;for(r=0;r<g;r+=1)a=e.v[r],s=e.o[r],i=e.i[r],a[0]===s[0]&&a[1]===s[1]&&a[0]===i[0]&&a[1]===i[1]?0!==r&&r!==g-1||e.c?(o=0===r?e.v[g-1]:e.v[r-1],c=(l=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(l/2,t)/l:0,h=u=a[0]+(o[0]-a[0])*c,p=m=a[1]-(a[1]-o[1])*c,d=h-(h-a[0])*roundCorner,f=p-(p-a[1])*roundCorner,n.setTripleAt(h,p,d,f,u,m,y),y+=1,o=r===g-1?e.v[0]:e.v[r+1],c=(l=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(l/2,t)/l:0,h=d=a[0]+(o[0]-a[0])*c,p=f=a[1]+(o[1]-a[1])*c,u=h-(h-a[0])*roundCorner,m=p-(p-a[1])*roundCorner,n.setTripleAt(h,p,d,f,u,m,y),y+=1):(n.setTripleAt(a[0],a[1],s[0],s[1],i[0],i[1],y),y+=1):(n.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],y),y+=1);return n},RoundCornersModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.rd.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,r=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(r<0)return[];var n=Math.sqrt(r);return floatZero(n)?n>0&&n<1?[t]:[]:[t-n,t+n].filter((function(e){return e>0&&e<1}))},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),r=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),a=lerpPoint(t,r,e),i=lerpPoint(r,n,e),s=lerpPoint(a,i,e);return[new PolynomialBezier(this.points[0],t,a,s,!0),new PolynomialBezier(s,i,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,r){void 0===t&&(t=2),void 0===r&&(r=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,r),n},PolynomialBezier.shapeSegment=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[r],e.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[r],e.i[r],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,r,n){var a=e._length,i=shapePool.newElement();if(i.c=e.c,e.c||(a-=1),0===a)return i;var s=-1,o=PolynomialBezier.shapeSegment(e,0);zigZagCorner(i,e,0,t,r,n,s);for(var l=0;l<a;l+=1)s=zigZagSegment(i,o,t,r,n,-s),o=l!==a-1||e.c?PolynomialBezier.shapeSegment(e,(l+1)%a):null,zigZagCorner(i,e,l+1,t,r,n,s);return i},ZigZagModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),h=this.pointsType.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l,c,h));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(e,t,r,n){var a=shapePool.newElement();a.c=e.c;var i,s,o,l=e.length();e.c||(l-=1);var c=[];for(i=0;i<l;i+=1)o=PolynomialBezier.shapeSegment(e,i),c.push(offsetSegmentSplit(o,t));if(!e.c)for(i=l-1;i>=0;i-=1)o=PolynomialBezier.shapeSegmentInverted(e,i),c.push(offsetSegmentSplit(o,t));c=pruneIntersections(c);var h=null,p=null;for(i=0;i<c.length;i+=1){var d=c[i];for(p&&(h=joinLines(a,p,d[0],r,n)),p=d[d.length-1],s=0;s<d.length;s+=1)o=d[s],h&&pointEqual(o.points[0],h)?a.setXYAt(o.points[1][0],o.points[1][1],"o",a.length()-1):a.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],a.length()),a.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],a.length()),h=o.points[3]}return c.length&&joinLines(a,p,c[0][0],r,n),a},OffsetPathModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.amount.v,c=this.miterLimit.v,h=this.lineJoin;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l,h,c));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=127988,n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function a(e,t){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=t;var n=createTag("span");n.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(n),document.body.appendChild(r);var a=n.offsetWidth;return n.style.fontFamily=function(e){var t,r=e.split(","),n=r.length,a=[];for(t=0;t<n;t+=1)"sans-serif"!==r[t]&&"monospace"!==r[t]&&a.push(r[t]);return a.join(",")}(e)+", "+t,{node:n,w:a,parent:r}}function i(e,t){var r,n=document.body&&t?"svg":"canvas",a=getFontProperties(e);if("svg"===n){var i=createNS("text");i.style.fontSize="100px",i.setAttribute("font-family",e.fFamily),i.setAttribute("font-style",a.style),i.setAttribute("font-weight",a.weight),i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.setAttribute("class",e.fClass)):i.style.fontFamily=e.fFamily,t.appendChild(i),r=i}else{var s=new OffscreenCanvas(500,500).getContext("2d");s.font=a.style+" "+a.weight+" 100px "+e.fFamily,r=s}return{measureText:function(e){return"svg"===n?(r.textContent=e,r.getComputedTextLength()):r.measureText(e).width}}}function s(e){var t=0,r=e.charCodeAt(0);if(r>=55296&&r<=56319){var n=e.charCodeAt(1);n>=56320&&n<=57343&&(t=1024*(r-55296)+n-56320+65536)}return t}function o(e){var t=s(e);return t>=127462&&t<=127487}var l=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)};l.isModifier=function(e,t){var r=e.toString(16)+t.toString(16);return-1!==n.indexOf(r)},l.isZeroWidthJoiner=function(e){return 8205===e},l.isFlagEmoji=function(e){return o(e.substr(0,2))&&o(e.substr(2,2))},l.isRegionalCode=o,l.isCombinedCharacter=function(e){return-1!==t.indexOf(e)},l.isRegionalFlag=function(e,t){var n=s(e.substr(t,2));if(n!==r)return!1;var a=0;for(t+=2;a<5;){if((n=s(e.substr(t,2)))<917601||n>917626)return!1;a+=1,t+=2}return 917631===s(e.substr(t,2))},l.isVariationSelector=function(e){return 65039===e},l.BLACK_FLAG_CODE_POINT=r;var c={addChars:function(e){if(e){var t;this.chars||(this.chars=[]);var r,n,a=e.length,i=this.chars.length;for(t=0;t<a;t+=1){for(r=0,n=!1;r<i;)this.chars[r].style===e[t].style&&this.chars[r].fFamily===e[t].fFamily&&this.chars[r].ch===e[t].ch&&(n=!0),r+=1;n||(this.chars.push(e[t]),i+=1)}}},addFonts:function(e,t){if(e){if(this.chars)return this.isLoaded=!0,void(this.fonts=e.list);if(!document.body)return this.isLoaded=!0,e.list.forEach((function(e){e.helper=i(e),e.cache={}})),void(this.fonts=e.list);var r,n=e.list,s=n.length,o=s;for(r=0;r<s;r+=1){var l,c,h=!0;if(n[r].loaded=!1,n[r].monoCase=a(n[r].fFamily,"monospace"),n[r].sansCase=a(n[r].fFamily,"sans-serif"),n[r].fPath){if("p"===n[r].fOrigin||3===n[r].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+n[r].fFamily+'"], style[f-origin="3"][f-family="'+n[r].fFamily+'"]')).length>0&&(h=!1),h){var p=createTag("style");p.setAttribute("f-forigin",n[r].fOrigin),p.setAttribute("f-origin",n[r].origin),p.setAttribute("f-family",n[r].fFamily),p.type="text/css",p.innerText="@font-face {font-family: "+n[r].fFamily+"; font-style: normal; src: url('"+n[r].fPath+"');}",t.appendChild(p)}}else if("g"===n[r].fOrigin||1===n[r].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(n[r].fPath)&&(h=!1);if(h){var d=createTag("link");d.setAttribute("f-forigin",n[r].fOrigin),d.setAttribute("f-origin",n[r].origin),d.type="text/css",d.rel="stylesheet",d.href=n[r].fPath,document.body.appendChild(d)}}else if("t"===n[r].fOrigin||2===n[r].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)n[r].fPath===l[c].src&&(h=!1);if(h){var f=createTag("link");f.setAttribute("f-forigin",n[r].fOrigin),f.setAttribute("f-origin",n[r].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",n[r].fPath),t.appendChild(f)}}}else n[r].loaded=!0,o-=1;n[r].helper=i(n[r],t),n[r].cache={},this.fonts.push(n[r])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,r,n){for(var a=0,i=this.chars.length;a<i;){if(this.chars[a].ch===t&&this.chars[a].style===r&&this.chars[a].fFamily===n)return this.chars[a];a+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,r,n)),e},getFontByName:function(e){for(var t=0,r=this.fonts.length;t<r;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]},measureText:function(e,t,r){var n=this.getFontByName(t),a=e;if(!n.cache[a]){var i=n.helper;if(" "===e){var s=i.measureText("|"+e+"|"),o=i.measureText("||");n.cache[a]=(s-o)/100}else n.cache[a]=i.measureText(e)/100}return n.cache[a]*r},checkLoadedFonts:function(){var e,t,r,n=this.fonts.length,a=n;for(e=0;e<n;e+=1)this.fonts[e].loaded?a-=1:"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(t=this.fonts[e].monoCase.node,r=this.fonts[e].monoCase.w,t.offsetWidth!==r?(a-=1,this.fonts[e].loaded=!0):(t=this.fonts[e].sansCase.node,r=this.fonts[e].sansCase.w,t.offsetWidth!==r&&(a-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return l.prototype=c,l}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){-1===this.renderableComponents.indexOf(e)&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){-1!==this.renderableComponents.indexOf(e)&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={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"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function AngleEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function ColorEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function PointEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function LayerIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function MaskIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function CheckboxEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var r,n=e.ef||[];this.effectElements=[];var a,i=n.length;for(r=0;r<i;r+=1)a=new GroupEffect(n[r],t),this.effectElements.push(a)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,r)}function AudioElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,r),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var r;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,a=this.data.ef.length,i=this.data.ef;for(r=0;r<a;r+=1){switch(n=null,i[r].ty){case 0:n=new SliderEffect(i[r],t,this);break;case 1:n=new AngleEffect(i[r],t,this);break;case 2:n=new ColorEffect(i[r],t,this);break;case 3:n=new PointEffect(i[r],t,this);break;case 4:case 7:n=new CheckboxEffect(i[r],t,this);break;case 10:n=new LayerIndexEffect(i[r],t,this);break;case 11:n=new MaskIndexEffect(i[r],t,this);break;case 5:n=new EffectsManager(i[r],t);break;default:n=new NoValueEffect(i[r])}n&&this.effectElements.push(n)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if("n"!==this.data.masksProperties[e].mode&&!1!==this.data.masksProperties[e].cl)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),r=e("effects"),n=e("shape"),a=e("text"),i=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var s=r.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(s),0===this.data.ty||this.data.xt?this.compInterface=i(this):4===this.data.ty?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=a(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,r){this.globalData=t,this.comp=r,this.data=e,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(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var r,n=this.dynamicProperties.length;for(r=0;r<n;r+=1)(t||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&this.dynamicProperties.push(e)}},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 e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},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(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*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(){},BaseRenderer.prototype.checkLayers=function(e){var t,r,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)this.elements[t]||(r=this.layers[t]).ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var r,n=e.length,a=this.layers.length;for(t=0;t<n;t+=1)for(r=0;r<a;){if(this.layers[r].id===e[t].id){this.layers[r]=e[t];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,r){for(var n=this.elements,a=this.layers,i=0,s=a.length;i<s;)a[i].ind==t&&(n[i]&&!0!==n[i]?(r.push(n[i]),n[i].setAsParent(),void 0!==a[i].parent?this.buildElementParenting(e,a[i].parent,r):e.setHierarchy(r)):(this.buildItem(i),this.addPendingElement(e))),i+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,r=e.length;for(t=0;t<r;t+=1)if(e[t].xt){var n=this.createComp(e[t]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(e){var t,r=this.elements.length;for(t=0;t<r;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,r=e.shift();if("number"==typeof r)t=this.elements[r];else{var n,a=this.elements.length;for(n=0;n<a;n+=1)if(this.elements[n].data.nm===r){t=this.elements[n];break}}return 0===e.length?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,r){this.data=e,this.element=t,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n,a,i=this.globalData.defs,s=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(s),this.solidPath="";var o,l,c,h,p,d,f=this.masksProperties,u=0,m=[],g=createElementID(),y="clipPath",v="clip-path";for(n=0;n<s;n+=1)if(("a"!==f[n].mode&&"n"!==f[n].mode||f[n].inv||100!==f[n].o.k||f[n].o.x)&&(y="mask",v="mask"),"s"!==f[n].mode&&"i"!==f[n].mode||0!==u?c=null:((c=createNS("rect")).setAttribute("fill","#ffffff"),c.setAttribute("width",this.element.comp.data.w||0),c.setAttribute("height",this.element.comp.data.h||0),m.push(c)),a=createNS("path"),"n"===f[n].mode)this.viewData[n]={op:PropertyFactory.getProp(this.element,f[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[n],3),elem:a,lastPath:""},i.appendChild(a);else{var b;if(u+=1,a.setAttribute("fill","s"===f[n].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==f[n].x.k?(y="mask",v="mask",d=PropertyFactory.getProp(this.element,f[n].x,0,null,this.element),b=createElementID(),(h=createNS("filter")).setAttribute("id",b),(p=createNS("feMorphology")).setAttribute("operator","erode"),p.setAttribute("in","SourceGraphic"),p.setAttribute("radius","0"),h.appendChild(p),i.appendChild(h),a.setAttribute("stroke","s"===f[n].mode?"#000000":"#ffffff")):(p=null,d=null),this.storedData[n]={elem:a,x:d,expan:p,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===f[n].mode){l=m.length;var E=createNS("g");for(o=0;o<l;o+=1)E.appendChild(m[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",g+"_"+u),S.appendChild(a),i.appendChild(S),E.setAttribute("mask","url("+getLocationHref()+"#"+g+"_"+u+")"),m.length=0,m.push(E)}else m.push(a);f[n].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[n]={elem:a,lastPath:"",op:PropertyFactory.getProp(this.element,f[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[n],3),invRect:c},this.viewData[n].prop.k||this.drawPath(f[n],this.viewData[n].prop.v,this.viewData[n])}for(this.maskElement=createNS(y),s=m.length,n=0;n<s;n+=1)this.maskElement.appendChild(m[n]);u>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+g+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,r=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<n;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),r=0;r<n;r+=1)t.multiply(this.hierarchy[r].finalTransform.mProp.v)}this.localTransforms&&!this.finalTransform._matMdf||(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var r=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(r),e=1;e<t;e+=1){var n=this.localTransforms[e].matrix;r.multiply(n)}r.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var a=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)a*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=a}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,r=e.length;for(t=0;t<r;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var r,n=!0,a=this.comp;n;)a.finalTransform?(a.data.hasMask&&t.splice(0,0,a.finalTransform),a=a.comp):n=!1;var i,s=t.length;for(r=0;r<s;r+=1)i=t[r].mat.applyToPointArray(0,0,0),e=[e[0]-i[0],e[1]-i[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,r=this.element.finalTransform.mat,n=this.masksProperties.length;for(t=0;t<n;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),"n"!==this.masksProperties[t].mode&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var a=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),a.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,r){var n,a,i=" M"+t.v[0][0]+","+t.v[0][1];for(a=t._length,n=1;n<a;n+=1)i+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[n][0]+","+t.i[n][1]+" "+t.v[n][0]+","+t.v[n][1];if(t.c&&a>1&&(i+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==i){var s="";r.elem&&(t.c&&(s=e.inv?this.solidPath+i:i),r.elem.setAttribute("d",s)),r.lastPath=i}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={createFilter:function(e,t){var r=createNS("filter");return r.setAttribute("id",e),!0!==t&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},createAlphaToLuminanceFilter:function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e}};return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,r,n="SourceGraphic",a=e.data.ef?e.data.ef.length:0,i=createElementID(),s=filtersFactory.createFilter(i,!0),o=0;for(this.filters=[],t=0;t<a;t+=1){r=null;var l=e.data.ef[t].ty;registeredEffects$1[l]&&(r=new(0,registeredEffects$1[l].effect)(s,e.effectsManager.effectElements[t],e,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)),r&&this.filters.push(r)}o&&(e.globalData.defs.appendChild(s),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+i+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,r){registeredEffects$1[e]={effect:t,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},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 e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var r=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var a=createElementID();if(r.setAttribute("id",a),r.appendChild(n),this.globalData.defs.appendChild(r),this.checkMasks()){var i=createNS("g");i.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),i.appendChild(this.layerElement),this.transformedElement=i,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")")}0!==this.data.bm&&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(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,r,n,a,i=this.layerId+"_"+e;if(1===e||3===e){var s=createNS("mask");s.setAttribute("id",i),s.setAttribute("mask-type",3===e?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),s.appendChild(n),this.globalData.defs.appendChild(s),featureSupport.maskType||1!==e||(s.setAttribute("mask-type","luminance"),t=createElementID(),r=filtersFactory.createFilter(t),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(a=createNS("g")).appendChild(n),s.appendChild(a),a.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2===e){var o=createNS("mask");o.setAttribute("id",i),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),t=createElementID(),r=filtersFactory.createFilter(t);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),r.appendChild(c);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),c.appendChild(h),this.globalData.defs.appendChild(r);var p=createNS("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),l.appendChild(p),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(n),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS("g"),l.appendChild(p),a.appendChild(this.layerElement),l.appendChild(a)),this.globalData.defs.appendChild(o)}this.matteMasks[e]=i}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).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(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=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",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,r=this.shapeModifiers.length;for(t=0;t<r;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,r=0,n=t.length;r<n;){if(t[r].elem===e)return t[r].pos;r+=1}return 0},addProcessedElement:function(e,t){for(var r=this.processedElements,n=r.length;n;)if(r[n-=1].elem===e)return void(r[n].pos=t);r.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,r){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=r,this.lvl=t,this._isAnimated=!!r.k;for(var n=0,a=e.length;n<a;){if(e[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=!0===e.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,r,n){var a;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var i,s=t.length||0;for(a=0;a<s;a+=1)i=PropertyFactory.getProp(e,t[a].v,0,0,this),this.k=i.k||this.k,this.dataProps[a]={n:t[a].n,p:i};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r}function SVGNoStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(e,t,r){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var n=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,r)}function SVGGradientStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,r){this.transform={mProps:e,op:t,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),t=0;t<r;t+=1)"o"!==this.dataProps[t].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var r=0,n=this.o.length/2;r<n;){if(Math.abs(e[4*r]-e[4*t+2*r])>.01)return!1;r+=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 e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,r,n,a=4*this.data.p;for(t=0;t<a;t+=1)r=t%4==0?100:255,n=Math.round(this.prop.v[t]*r),this.c[t]!==n&&(this.c[t]=n,this._cmdf=!e);if(this.o.length)for(a=this.prop.v.length,t=4*this.data.p;t<a;t+=1)r=t%2==0?100:1,n=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==n&&(this.o[t-4*this.data.p]=n,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,r){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,t),this.setGradientOpacity(t,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var r=createElementID(),n=createNS(1===t.t?"linearGradient":"radialGradient");n.setAttribute("id",r),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var a,i,s,o=[];for(s=4*t.g.p,i=0;i<s;i+=4)a=createNS("stop"),n.appendChild(a),o.push(a);e.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=n,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var r,n,a,i=createNS("mask"),s=createNS("path");i.appendChild(s);var o=createElementID(),l=createElementID();i.setAttribute("id",l);var c=createNS(1===e.t?"linearGradient":"radialGradient");c.setAttribute("id",o),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),a=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var h=this.stops;for(n=4*e.g.p;n<a;n+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(r),h.push(r);s.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===e.ty&&(s.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),1===e.lj&&s.setAttribute("stroke-miterlimit",e.ml)),this.of=c,this.ms=i,this.ost=h,this.maskId=l,t.msElem=s}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,r,n){if(0===t)return"";var a,i=e.o,s=e.i,o=e.v,l=" M"+n.applyToPointStringified(o[0][0],o[0][1]);for(a=1;a<t;a+=1)l+=" C"+n.applyToPointStringified(i[a-1][0],i[a-1][1])+" "+n.applyToPointStringified(s[a][0],s[a][1])+" "+n.applyToPointStringified(o[a][0],o[a][1]);return r&&t&&(l+=" C"+n.applyToPointStringified(i[a-1][0],i[a-1][1])+" "+n.applyToPointStringified(s[0][0],s[0][1])+" "+n.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function r(e,t,r){(r||t.transform.op._mdf)&&t.transform.container.setAttribute("opacity",t.transform.op.v),(r||t.transform.mProps._mdf)&&t.transform.container.setAttribute("transform",t.transform.mProps.v.to2dCSS())}function n(){}function a(r,n,a){var i,s,o,l,c,h,p,d,f,u,m=n.styles.length,g=n.lvl;for(h=0;h<m;h+=1){if(l=n.sh._mdf||a,n.styles[h].lvl<g){for(d=t.reset(),f=g-n.styles[h].lvl,u=n.transformers.length-1;!l&&f>0;)l=n.transformers[u].mProps._mdf||l,f-=1,u-=1;if(l)for(f=g-n.styles[h].lvl,u=n.transformers.length-1;f>0;)d.multiply(n.transformers[u].mProps.v),f-=1,u-=1}else d=e;if(s=(p=n.sh.paths)._length,l){for(o="",i=0;i<s;i+=1)(c=p.shapes[i])&&c._length&&(o+=buildShapeString(c,c._length,c.c,d));n.caches[h]=o}else o=n.caches[h];n.styles[h].d+=!0===r.hd?"":o,n.styles[h]._mdf=l||n.styles[h]._mdf}}function i(e,t,r){var n=t.style;(t.c._mdf||r)&&n.pElem.setAttribute("fill","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("fill-opacity",t.o.v)}function s(e,t,r){o(e,t,r),l(0,t,r)}function o(e,t,r){var n,a,i,s,o,l=t.gf,c=t.g._hasOpacity,h=t.s.v,p=t.e.v;if(t.o._mdf||r){var d="gf"===e.ty?"fill-opacity":"stroke-opacity";t.style.pElem.setAttribute(d,t.o.v)}if(t.s._mdf||r){var f=1===e.t?"x1":"cx",u="x1"===f?"y1":"cy";l.setAttribute(f,h[0]),l.setAttribute(u,h[1]),c&&!t.g._collapsable&&(t.of.setAttribute(f,h[0]),t.of.setAttribute(u,h[1]))}if(t.g._cmdf||r){n=t.cst;var m=t.g.c;for(i=n.length,a=0;a<i;a+=1)(s=n[a]).setAttribute("offset",m[4*a]+"%"),s.setAttribute("stop-color","rgb("+m[4*a+1]+","+m[4*a+2]+","+m[4*a+3]+")")}if(c&&(t.g._omdf||r)){var g=t.g.o;for(i=(n=t.g._collapsable?t.cst:t.ost).length,a=0;a<i;a+=1)s=n[a],t.g._collapsable||s.setAttribute("offset",g[2*a]+"%"),s.setAttribute("stop-opacity",g[2*a+1])}if(1===e.t)(t.e._mdf||r)&&(l.setAttribute("x2",p[0]),l.setAttribute("y2",p[1]),c&&!t.g._collapsable&&(t.of.setAttribute("x2",p[0]),t.of.setAttribute("y2",p[1])));else if((t.s._mdf||t.e._mdf||r)&&(o=Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)),l.setAttribute("r",o),c&&!t.g._collapsable&&t.of.setAttribute("r",o)),t.s._mdf||t.e._mdf||t.h._mdf||t.a._mdf||r){o||(o=Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)));var y=Math.atan2(p[1]-h[1],p[0]-h[0]),v=t.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,E=Math.cos(y+t.a.v)*b+h[0],S=Math.sin(y+t.a.v)*b+h[1];l.setAttribute("fx",E),l.setAttribute("fy",S),c&&!t.g._collapsable&&(t.of.setAttribute("fx",E),t.of.setAttribute("fy",S))}}function l(e,t,r){var n=t.style,a=t.d;a&&(a._mdf||r)&&a.dashStr&&(n.pElem.setAttribute("stroke-dasharray",a.dashStr),n.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),t.c&&(t.c._mdf||r)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||r)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return i;case"gf":return o;case"gs":return s;case"st":return l;case"sh":case"el":case"rc":case"sr":return a;case"tr":return r;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),this.prevViewData=[]}function LetterProps(e,t,r,n,a,i){this.o=e,this.sw=t,this.sc=r,this.fc=n,this.m=a,this.p=i,this._mdf={o:!0,sw:!!t,sc:!!r,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}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 e,t,r,n,a=this.shapes.length,i=this.stylesList.length,s=[],o=!1;for(r=0;r<i;r+=1){for(n=this.stylesList[r],o=!1,s.length=0,e=0;e<a;e+=1)-1!==(t=this.shapes[e]).styles.indexOf(n)&&(s.push(t),o=t._isAnimated||o);s.length>1&&o&&this.setShapesAsAnimated(s)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var r,n=new SVGStyleData(e,t),a=n.pElem;return"st"===e.ty?r=new SVGStrokeStyleData(this,e,n):"fl"===e.ty?r=new SVGFillStyleData(this,e,n):"gf"===e.ty||"gs"===e.ty?(r=new("gf"===e.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,n),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),a.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))):"no"===e.ty&&(r=new SVGNoStyleData(this,e,n)),"st"!==e.ty&&"gs"!==e.ty||(a.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),a.setAttribute("fill-opacity","0"),1===e.lj&&a.setAttribute("stroke-miterlimit",e.ml)),2===e.r&&a.setAttribute("fill-rule","evenodd"),e.ln&&a.setAttribute("id",e.ln),e.cl&&a.setAttribute("class",e.cl),e.bm&&(a.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(n),this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var r=TransformPropertyFactory.getTransformProperty(this,e,this),n=new SVGTransformData(r,r.o,t);return this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createShapeElement=function(e,t,r){var n=4;"rc"===e.ty?n=5:"el"===e.ty?n=6:"sr"===e.ty&&(n=7);var a=new SVGShapeData(t,r,ShapePropertyFactory.getShapeProp(this,e,n,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(e,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var r=0,n=this.animatedContents.length;r<n;){if(this.animatedContents[r].element===t)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,r=e.styles,n=this.stylesList.length;for(t=0;t<n;t+=1)-1!==r.indexOf(this.stylesList[t])||this.stylesList[t].closed||r.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,r,n,a,i,s){var o,l,c,h,p,d,f=[].concat(i),u=e.length-1,m=[],g=[];for(o=u;o>=0;o-=1){if((d=this.searchProcessedElement(e[o]))?t[o]=r[d-1]:e[o]._render=s,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty||"no"===e[o].ty)d?t[o].style.closed=e[o].hd:t[o]=this.createStyleElement(e[o],a),e[o]._render&&t[o].style.pElem.parentNode!==n&&n.appendChild(t[o].style.pElem),m.push(t[o].style);else if("gr"===e[o].ty){if(d)for(c=t[o].it.length,l=0;l<c;l+=1)t[o].prevViewData[l]=t[o].it[l];else t[o]=this.createGroupElement(e[o]);this.searchShapes(e[o].it,t[o].it,t[o].prevViewData,t[o].gr,a+1,f,s),e[o]._render&&t[o].gr.parentNode!==n&&n.appendChild(t[o].gr)}else"tr"===e[o].ty?(d||(t[o]=this.createTransformElement(e[o],n)),h=t[o].transform,f.push(h)):"sh"===e[o].ty||"rc"===e[o].ty||"el"===e[o].ty||"sr"===e[o].ty?(d||(t[o]=this.createShapeElement(e[o],f,a)),this.setElementStyles(t[o])):"tm"===e[o].ty||"rd"===e[o].ty||"ms"===e[o].ty||"pb"===e[o].ty||"zz"===e[o].ty||"op"===e[o].ty?(d?(p=t[o]).closed=!1:((p=ShapeModifiers.getModifier(e[o].ty)).init(this,e[o]),t[o]=p,this.shapeModifiers.push(p)),g.push(p)):"rp"===e[o].ty&&(d?(p=t[o]).closed=!0:(p=ShapeModifiers.getModifier(e[o].ty),t[o]=p,p.init(this,e,o,t),this.shapeModifiers.push(p),s=!1),g.push(p));this.addProcessedElement(e[o],o+1)}for(u=m.length,o=0;o<u;o+=1)m[o].closed=!0;for(u=g.length,o=0;o<u;o+=1)g[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,r=this.animatedContents.length;for(e=0;e<r;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&!0!==t.data&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,r,n,a,i){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 s=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,s=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,s=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,s=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,s=!0),this.m!==a&&(this.m=a,this._mdf.m=!0,s=!0),!i.length||this.p[0]===i[0]&&this.p[1]===i[1]&&this.p[4]===i[4]&&this.p[5]===i[5]&&this.p[12]===i[12]&&this.p[13]===i[13]||(this.p=i,this._mdf.p=!0,s=!0),s},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,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(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,i=e||this.data.d.k[this.keysIndex].s;for(n=0;n<a;n+=1)i=r!==this.keysIndex?this.effectsSequence[n](i,i.t):this.effectsSequence[n](this.currentData,i.t);t!==i&&this.setCurrentData(i),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,r=0,n=e.length;r<=n-1&&!(r===n-1||e[r+1].t>t);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,r,n=[],a=0,i=e.length,s=!1,o=!1,l="";a<i;)s=o,o=!1,t=e.charCodeAt(a),l=e.charAt(a),FontManager.isCombinedCharacter(t)?s=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,a)?l=e.substr(a,14):(r=e.charCodeAt(a+1))>=56320&&r<=57343&&(FontManager.isModifier(t,r)?(l=e.substr(a,2),s=!0):l=FontManager.isFlagEmoji(e.substr(a,4))?e.substr(a,4):e.substr(a,2)):t>56319?(r=e.charCodeAt(a+1),FontManager.isVariationSelector(t)&&(s=!0)):FontManager.isZeroWidthJoiner(t)&&(s=!0,o=!0),s?(n[n.length-1]+=l,s=!1):n.push(l),a+=l.length;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,r,n,a,i,s,o,l=this.elem.globalData.fontManager,c=this.data,h=[],p=0,d=c.m.g,f=0,u=0,m=0,g=[],y=0,v=0,b=l.getFontByName(e.f),E=0,S=getFontProperties(b);e.fWeight=S.weight,e.fStyle=S.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),r=e.finalText.length,e.finalLineHeight=e.lh;var _,T=e.tr/1e3*e.finalSize;if(e.sz)for(var k,x,P=!0,A=e.sz[0],C=e.sz[1];P;){k=0,y=0,r=(x=this.buildFinalText(e.t)).length,T=e.tr/1e3*e.finalSize;var I=-1;for(t=0;t<r;t+=1)_=x[t].charCodeAt(0),n=!1," "===x[t]?I=t:13!==_&&3!==_||(y=0,n=!0,k+=e.finalLineHeight||1.2*e.finalSize),l.chars?(o=l.getCharData(x[t],b.fStyle,b.fFamily),E=n?0:o.w*e.finalSize/100):E=l.measureText(x[t],e.f,e.finalSize),y+E>A&&" "!==x[t]?(-1===I?r+=1:t=I,k+=e.finalLineHeight||1.2*e.finalSize,x.splice(t,I===t?1:0,"\r"),I=-1,y=0):(y+=E,y+=T);k+=b.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&C<k?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=x,r=e.finalText.length,P=!1)}y=-T,E=0;var w,D=0;for(t=0;t<r;t+=1)if(n=!1,13===(_=(w=e.finalText[t]).charCodeAt(0))||3===_?(D=0,g.push(y),v=y>v?y:v,y=-2*T,a="",n=!0,m+=1):a=w,l.chars?(o=l.getCharData(w,b.fStyle,l.getFontByName(e.f).fFamily),E=n?0:o.w*e.finalSize/100):E=l.measureText(a,e.f,e.finalSize)," "===w?D+=E+T:(y+=E+T+D,D=0),h.push({l:E,an:E,add:f,n:n,anIndexes:[],val:a,line:m,animatorJustifyOffset:0}),2==d){if(f+=E,""===a||" "===a||t===r-1){for(""!==a&&" "!==a||(f-=E);u<=t;)h[u].an=f,h[u].ind=p,h[u].extra=E,u+=1;p+=1,f=0}}else if(3==d){if(f+=E,""===a||t===r-1){for(""===a&&(f-=E);u<=t;)h[u].an=f,h[u].ind=p,h[u].extra=E,u+=1;f=0,p+=1}}else h[p].ind=p,h[p].extra=0,p+=1;if(e.l=h,v=y>v?y:v,g.push(y),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=g;var M,R,L,F,N=c.a;s=N.length;var O=[];for(i=0;i<s;i+=1){for((M=N[i]).a.sc&&(e.strokeColorAnim=!0),M.a.sw&&(e.strokeWidthAnim=!0),(M.a.fc||M.a.fh||M.a.fs||M.a.fb)&&(e.fillColorAnim=!0),F=0,L=M.s.b,t=0;t<r;t+=1)(R=h[t]).anIndexes[i]=F,(1==L&&""!==R.val||2==L&&""!==R.val&&" "!==R.val||3==L&&(R.n||" "==R.val||t==r-1)||4==L&&(R.n||t==r-1))&&(1===M.s.rn&&O.push(F),F+=1);c.a[i].s.totalChars=F;var B,$=-1;if(1===M.s.rn)for(t=0;t<r;t+=1)$!=(R=h[t]).anIndexes[i]&&($=R.anIndexes[i],B=O.splice(Math.floor(Math.random()*O.length),1)[0]),R.anIndexes[i]=B}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=b.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=void 0===t?this.keysIndex:t;var r=this.copyData({},this.data.d.k[t].s);r=this.copyData(r,e),this.data.d.k[t].s=r,this.recalculate(t),this.setCurrentData(r),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,r=Math.floor;function n(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),this.e="e"in t?PropertyFactory.getProp(e,t.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return n.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var a=0,i=0,s=1,o=1;this.ne.v>0?a=this.ne.v/100:i=-this.ne.v/100,this.xe.v>0?s=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(a,i,s,o).get,c=0,h=this.finalS,p=this.finalE,d=this.data.sh;if(2===d)c=l(c=p===h?n>=p?1:0:e(0,t(.5/(p-h)+(n-h)/(p-h),1)));else if(3===d)c=l(c=p===h?n>=p?0:1:1-e(0,t(.5/(p-h)+(n-h)/(p-h),1)));else if(4===d)p===h?c=0:(c=e(0,t(.5/(p-h)+(n-h)/(p-h),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===d){if(p===h)c=0;else{var f=p-h,u=-f/2+(n=t(e(0,n+.5-h),p-h)),m=f/2;c=Math.sqrt(1-u*u/(m*m))}c=l(c)}else 6===d?(p===h?c=0:(n=t(e(0,n+.5-h),p-h),c=(1+Math.cos(Math.PI+2*Math.PI*n/(p-h)))/2),c=l(c)):(n>=r(h)&&(c=e(0,t(n-h<0?t(p,1)-(h-n):p-n,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;c<y?c=0:(c=(c-y)/g)>1&&(c=1)}return c*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/t,n=this.s.v/t+r,a=this.e.v/t+r;if(n>a){var i=n;n=a,a=i}this.finalS=n,this.finalE=a}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,r){return new n(e,t)}}}();function TextAnimatorDataProperty(e,t,r){var n={propType:!1},a=PropertyFactory.getProp,i=t.a;this.a={r:i.r?a(e,i.r,0,degToRads,r):n,rx:i.rx?a(e,i.rx,0,degToRads,r):n,ry:i.ry?a(e,i.ry,0,degToRads,r):n,sk:i.sk?a(e,i.sk,0,degToRads,r):n,sa:i.sa?a(e,i.sa,0,degToRads,r):n,s:i.s?a(e,i.s,1,.01,r):n,a:i.a?a(e,i.a,1,0,r):n,o:i.o?a(e,i.o,0,.01,r):n,p:i.p?a(e,i.p,1,0,r):n,sw:i.sw?a(e,i.sw,0,0,r):n,sc:i.sc?a(e,i.sc,1,0,r):n,fc:i.fc?a(e,i.fc,1,0,r):n,fh:i.fh?a(e,i.fh,0,0,r):n,fs:i.fs?a(e,i.fs,0,.01,r):n,fb:i.fb?a(e,i.fb,0,.01,r):n,t:i.t?a(e,i.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,r=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e<r;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(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=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,n,a,i,s,o,l,c,h,p,d,f,u,m,g,y,v,b,E,S=this._moreOptions.alignment.v,_=this._animatorsData,T=this._textData,k=this.mHelper,x=this._renderType,P=this.renderedLetters.length,A=e.l;if(this._hasMaskedPath){if(E=this._pathData.m,!this._pathData.n||this._pathData._mdf){var C,I=E.v;for(this._pathData.r.v&&(I=I.reverse()),s={tLength:0,segments:[]},i=I._length-1,y=0,a=0;a<i;a+=1)C=bez.buildBezierData(I.v[a],I.v[a+1],[I.o[a][0]-I.v[a][0],I.o[a][1]-I.v[a][1]],[I.i[a+1][0]-I.v[a+1][0],I.i[a+1][1]-I.v[a+1][1]]),s.tLength+=C.segmentLength,s.segments.push(C),y+=C.segmentLength;a=i,E.v.c&&(C=bez.buildBezierData(I.v[a],I.v[0],[I.o[a][0]-I.v[a][0],I.o[a][1]-I.v[a][1]],[I.i[0][0]-I.v[0][0],I.i[0][1]-I.v[0][1]]),s.tLength+=C.segmentLength,s.segments.push(C),y+=C.segmentLength),this._pathData.pi=s}if(s=this._pathData.pi,o=this._pathData.f.v,d=0,p=1,c=0,h=!0,m=s.segments,o<0&&E.v.c)for(s.tLength<Math.abs(o)&&(o=-Math.abs(o)%s.tLength),p=(u=m[d=m.length-1].points).length-1;o<0;)o+=u[p].partialLength,(p-=1)<0&&(p=(u=m[d-=1].points).length-1);f=(u=m[d].points)[p-1],g=(l=u[p]).partialLength}i=A.length,r=0,n=0;var w,D,M,R,L,F=1.2*e.finalSize*.714,N=!0;M=_.length;var O,B,$,V,G,z,U,q,H,j,W,K,Y=-1,J=o,X=d,Q=p,Z=-1,ee="",te=this.defaultPropsArray;if(2===e.j||1===e.j){var re=0,ne=0,ae=2===e.j?-.5:-1,ie=0,se=!0;for(a=0;a<i;a+=1)if(A[a].n){for(re&&(re+=ne);ie<a;)A[ie].animatorJustifyOffset=re,ie+=1;re=0,se=!0}else{for(D=0;D<M;D+=1)(w=_[D].a).t.propType&&(se&&2===e.j&&(ne+=w.t.v*ae),(L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?re+=w.t.v*L[0]*ae:re+=w.t.v*L*ae);se=!1}for(re&&(re+=ne);ie<a;)A[ie].animatorJustifyOffset=re,ie+=1}for(a=0;a<i;a+=1){if(k.reset(),V=1,A[a].n)r=0,n+=e.yOffset,n+=N?1:0,o=J,N=!1,this._hasMaskedPath&&(p=Q,f=(u=m[d=X].points)[p-1],g=(l=u[p]).partialLength,c=0),ee="",W="",H="",K="",te=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Z!==A[a].line){switch(e.j){case 1:o+=y-e.lineWidths[A[a].line];break;case 2:o+=(y-e.lineWidths[A[a].line])/2}Z=A[a].line}Y!==A[a].ind&&(A[Y]&&(o+=A[Y].extra),o+=A[a].an/2,Y=A[a].ind),o+=S[0]*A[a].an*.005;var oe=0;for(D=0;D<M;D+=1)(w=_[D].a).p.propType&&((L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?oe+=w.p.v[0]*L[0]:oe+=w.p.v[0]*L),w.a.propType&&((L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?oe+=w.a.v[0]*L[0]:oe+=w.a.v[0]*L);for(h=!0,this._pathData.a.v&&(o=.5*A[0].an+(y-this._pathData.f.v-.5*A[0].an-.5*A[A.length-1].an)*Y/(i-1),o+=this._pathData.f.v);h;)c+g>=o+oe||!u?(v=(o+oe-c)/l.partialLength,B=f.point[0]+(l.point[0]-f.point[0])*v,$=f.point[1]+(l.point[1]-f.point[1])*v,k.translate(-S[0]*A[a].an*.005,-S[1]*F*.01),h=!1):u&&(c+=l.partialLength,(p+=1)>=u.length&&(p=0,m[d+=1]?u=m[d].points:E.v.c?(p=0,u=m[d=0].points):(c-=l.partialLength,u=null)),u&&(f=l,g=(l=u[p]).partialLength));O=A[a].an/2-A[a].add,k.translate(-O,0,0)}else O=A[a].an/2-A[a].add,k.translate(-O,0,0),k.translate(-S[0]*A[a].an*.005,-S[1]*F*.01,0);for(D=0;D<M;D+=1)(w=_[D].a).t.propType&&(L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars),0===r&&0===e.j||(this._hasMaskedPath?L.length?o+=w.t.v*L[0]:o+=w.t.v*L:L.length?r+=w.t.v*L[0]:r+=w.t.v*L));for(e.strokeWidthAnim&&(z=e.sw||0),e.strokeColorAnim&&(G=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(U=[e.fc[0],e.fc[1],e.fc[2]]),D=0;D<M;D+=1)(w=_[D].a).a.propType&&((L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?k.translate(-w.a.v[0]*L[0],-w.a.v[1]*L[1],w.a.v[2]*L[2]):k.translate(-w.a.v[0]*L,-w.a.v[1]*L,w.a.v[2]*L));for(D=0;D<M;D+=1)(w=_[D].a).s.propType&&((L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?k.scale(1+(w.s.v[0]-1)*L[0],1+(w.s.v[1]-1)*L[1],1):k.scale(1+(w.s.v[0]-1)*L,1+(w.s.v[1]-1)*L,1));for(D=0;D<M;D+=1){if(w=_[D].a,L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars),w.sk.propType&&(L.length?k.skewFromAxis(-w.sk.v*L[0],w.sa.v*L[1]):k.skewFromAxis(-w.sk.v*L,w.sa.v*L)),w.r.propType&&(L.length?k.rotateZ(-w.r.v*L[2]):k.rotateZ(-w.r.v*L)),w.ry.propType&&(L.length?k.rotateY(w.ry.v*L[1]):k.rotateY(w.ry.v*L)),w.rx.propType&&(L.length?k.rotateX(w.rx.v*L[0]):k.rotateX(w.rx.v*L)),w.o.propType&&(L.length?V+=(w.o.v*L[0]-V)*L[0]:V+=(w.o.v*L-V)*L),e.strokeWidthAnim&&w.sw.propType&&(L.length?z+=w.sw.v*L[0]:z+=w.sw.v*L),e.strokeColorAnim&&w.sc.propType)for(q=0;q<3;q+=1)L.length?G[q]+=(w.sc.v[q]-G[q])*L[0]:G[q]+=(w.sc.v[q]-G[q])*L;if(e.fillColorAnim&&e.fc){if(w.fc.propType)for(q=0;q<3;q+=1)L.length?U[q]+=(w.fc.v[q]-U[q])*L[0]:U[q]+=(w.fc.v[q]-U[q])*L;w.fh.propType&&(U=L.length?addHueToRGB(U,w.fh.v*L[0]):addHueToRGB(U,w.fh.v*L)),w.fs.propType&&(U=L.length?addSaturationToRGB(U,w.fs.v*L[0]):addSaturationToRGB(U,w.fs.v*L)),w.fb.propType&&(U=L.length?addBrightnessToRGB(U,w.fb.v*L[0]):addBrightnessToRGB(U,w.fb.v*L))}}for(D=0;D<M;D+=1)(w=_[D].a).p.propType&&(L=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars),this._hasMaskedPath?L.length?k.translate(0,w.p.v[1]*L[0],-w.p.v[2]*L[1]):k.translate(0,w.p.v[1]*L,-w.p.v[2]*L):L.length?k.translate(w.p.v[0]*L[0],w.p.v[1]*L[1],-w.p.v[2]*L[2]):k.translate(w.p.v[0]*L,w.p.v[1]*L,-w.p.v[2]*L));if(e.strokeWidthAnim&&(H=z<0?0:z),e.strokeColorAnim&&(j="rgb("+Math.round(255*G[0])+","+Math.round(255*G[1])+","+Math.round(255*G[2])+")"),e.fillColorAnim&&e.fc&&(W="rgb("+Math.round(255*U[0])+","+Math.round(255*U[1])+","+Math.round(255*U[2])+")"),this._hasMaskedPath){if(k.translate(0,-e.ls),k.translate(0,S[1]*F*.01+n,0),this._pathData.p.v){b=(l.point[1]-f.point[1])/(l.point[0]-f.point[0]);var le=180*Math.atan(b)/Math.PI;l.point[0]<f.point[0]&&(le+=180),k.rotate(-le*Math.PI/180)}k.translate(B,$,0),o-=S[0]*A[a].an*.005,A[a+1]&&Y!==A[a+1].ind&&(o+=A[a].an/2,o+=.001*e.tr*e.finalSize)}else{switch(k.translate(r,n,0),e.ps&&k.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:k.translate(A[a].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[A[a].line]),0,0);break;case 2:k.translate(A[a].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[A[a].line])/2,0,0)}k.translate(0,-e.ls),k.translate(O,0,0),k.translate(S[0]*A[a].an*.005,S[1]*F*.01,0),r+=A[a].l+.001*e.tr*e.finalSize}"html"===x?ee=k.toCSS():"svg"===x?ee=k.to2dCSS():te=[k.props[0],k.props[1],k.props[2],k.props[3],k.props[4],k.props[5],k.props[6],k.props[7],k.props[8],k.props[9],k.props[10],k.props[11],k.props[12],k.props[13],k.props[14],k.props[15]],K=V}P<=a?(R=new LetterProps(K,H,j,W,ee,te),this.renderedLetters.push(R),P+=1,this.lettersChangedFlag=!0):(R=this.renderedLetters[a],this.lettersChangedFlag=R.update(K,H,j,W,ee,te)||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),ITextElement.prototype.initElement=function(e,t,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,r),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var r,n,a=t.length,i="";for(r=0;r<a;r+=1)"sh"===t[r].ty&&(n=t[r].ks.k,i+=buildShapeString(n,n.i.length,!0,e));return i},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,r,n,a){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r])/2,0,0)}t.translate(n,a,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},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(e,t,r){this.textSpans=[],this.renderType="svg",this.initElement(e,t,r)}function ISolidElement(e,t,r){this.initElement(e,t,r)}function NullElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initFrame(),this.initTransform(e,t,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,r){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(t&&t.title){var n=createNS("title"),a=createElementID();n.setAttribute("id",a),n.textContent=t.title,this.svgElement.appendChild(n),r+=a}if(t&&t.description){var i=createNS("desc"),s=createElementID();i.setAttribute("id",s),i.textContent=t.description,this.svgElement.appendChild(i),r+=" "+s}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&!1===t.hideOnTransparent),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}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(e){for(var t=0,r=e.length,n=[],a="";t<r;)e[t]===String.fromCharCode(13)||e[t]===String.fromCharCode(3)?(n.push(a),a=""):a+=e[t],t+=1;return n.push(a),n},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var r=e.shapes[0];if(r.it){var n=r.it[r.it.length-1];n.s&&(n.s.k[0]=t,n.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var n=this.globalData.fontManager.getFontByName(r.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var a=r.fWeight,i=r.fStyle;this.layerElement.setAttribute("font-style",i),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",r.t);var s,o=r.l||[],l=!!this.globalData.fontManager.chars;t=o.length;var c=this.mHelper,h=this.data.singleShape,p=0,d=0,f=!0,u=.001*r.tr*r.finalSize;if(!h||l||r.sz){var m,g=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!l||!h||0===e){if(s=g>e?this.textSpans[e].span:createNS(l?"g":"text"),g<=e){if(s.setAttribute("stroke-linecap","butt"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=s,l){var y=createNS("g");s.appendChild(y),this.textSpans[e].childSpan=y}this.textSpans[e].span=s,this.layerElement.appendChild(s)}s.style.display="inherit"}if(c.reset(),h&&(o[e].n&&(p=-u,d+=r.yOffset,d+=f?1:0,f=!1),this.applyTextPropertiesToMatrix(r,c,o[e].line,p,d),p+=o[e].l||0,p+=u),l){var v;if(1===(m=this.globalData.fontManager.getCharData(r.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(m.data,this.globalData,this);else{var b=emptyShapeData;m.data&&m.data.shapes&&(b=this.buildShapeData(m.data,r.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[e].glyph){var E=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(E.layerElement),E.destroy()}this.textSpans[e].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[e].childSpan.appendChild(v.layerElement),1===m.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else h&&s.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),s.textContent=o[e].val,s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&s&&s.setAttribute("d","")}else{var S=this.textContainer,_="start";switch(r.j){case 1:_="end";break;case 2:_="middle";break;default:_="start"}S.setAttribute("text-anchor",_),S.setAttribute("letter-spacing",u);var T=this.buildTextContents(r.finalText);for(t=T.length,d=r.ps?r.ps[1]+r.ascent:0,e=0;e<t;e+=1)(s=this.textSpans[e].span||createNS("tspan")).textContent=T[e],s.setAttribute("x",0),s.setAttribute("y",d),s.style.display="inherit",S.appendChild(s),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=s,d+=r.finalLineHeight;this.layerElement.appendChild(S)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=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 e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<r;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._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)){var e,t;this._sizeChanged=!0;var r,n,a,i=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;for(t=s.length,e=0;e<t;e+=1)s[e].n||(r=i[e],n=this.textSpans[e].span,(a=this.textSpans[e].glyph)&&a.renderFrame(),r._mdf.m&&n.setAttribute("transform",r.m),r._mdf.o&&n.setAttribute("opacity",r.o),r._mdf.sw&&n.setAttribute("stroke-width",r.sw),r._mdf.sc&&n.setAttribute("stroke",r.sc),r._mdf.fc&&n.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!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),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var r=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",e.w),n.setAttribute("height",e.h),n.setAttribute("x",0),n.setAttribute("y",0);var a=createElementID();r.setAttribute("id",a),r.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),t.appendChild(r),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,r=this.layers.length;for(t=0;t<r;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){t[e]=!0;var r=this.createItem(this.layers[e]);if(t[e]=r,getExpressionsPlugin()&&(0===this.layers[e].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,e),this.layers[e].tt){var n="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(-1===n)return;if(this.elements[n]&&!0!==this.elements[n]){var a=t[n].getMatte(this.layers[e].tt);r.setMatte(a)}else this.buildItem(n),this.addPendingElement(r)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,r=this.elements.length;t<r;){if(this.elements[t]===e){var n="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,a=this.elements[n].getMatte(this.layers[t].tt);e.setMatte(a);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;null===e?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=r-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<r;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){for(var n,a=0;a<t;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(n=this.elements[a].getBaseElement()),a+=1;n?this.layerElement.insertBefore(r,n):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var r,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,r=e.length,n="_";for(t=0;t<r;t+=1)n+=e[t].transform.key+"_";var a=this.sequences[n];return a||(a={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=a,this.sequenceList.push(a)),a},processSequence:function(e,t){for(var r=0,n=e.transforms.length,a=t;r<n&&!t;){if(e.transforms[r].transform.mProps._mdf){a=!0;break}r+=1}if(a)for(e.finalTransform.reset(),r=n-1;r>=0;r-=1)e.finalTransform.multiply(e.transforms[r].transform.mProps.v);e._mdf=a},processSequences:function(e){var t,r=this.sequenceList.length;for(t=0;t<r;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,r=null,n=null;function a(){var a,i,s;t||(a=createNS("svg"),i=createNS("filter"),s=createNS("feColorMatrix"),i.setAttribute("id",e),s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.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"),i.appendChild(s),a.appendChild(i),a.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(a.style.display="none"),n=a,document.body.appendChild(n),t=createTag("canvas"),(r=t.getContext("2d")).filter="url(#"+e+")",r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1))}return{load:a,get:function(n){return t||a(),t.width=n.width,t.height=n.height,r.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var r=createTag("canvas");return r.width=e,r.height=t,r}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas},registeredEffects={};function CVEffects(e){var t,r,n=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<n;t+=1){r=null;var a=e.data.ef[t].ty;registeredEffects[a]&&(r=new(0,registeredEffects[a].effect)(e.effectsManager.effectElements[t],e)),r&&this.filters.push(r)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var r;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n=this.masksProperties.length,a=!1;for(r=0;r<n;r+=1)"n"!==this.masksProperties[r].mode&&(a=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=a,a&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,r,n,a=this.element.finalTransform.mat,i=this.element.canvasContext,s=this.masksProperties.length;for(i.beginPath(),e=0;e<s;e+=1)if("n"!==this.masksProperties[e].mode){var o;this.masksProperties[e].inv&&(i.moveTo(0,0),i.lineTo(this.element.globalData.compSize.w,0),i.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),i.lineTo(0,this.element.globalData.compSize.h),i.lineTo(0,0)),n=this.viewData[e].v,t=a.applyToPointArray(n.v[0][0],n.v[0][1],0),i.moveTo(t[0],t[1]);var l=n._length;for(o=1;o<l;o+=1)r=a.applyToTriplePoints(n.o[o-1],n.i[o],n.v[o]),i.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=a.applyToTriplePoints(n.o[o-1],n.i[0],n.v[0]),i.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),i.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,r,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var a,i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,i,e);var s,o=r.length;for(a=0;a<o;a+=1)r[a].closed||(s={transforms:n.addTransformSequence(r[a].transforms),trNodes:[]},this.styledShapes.push(s),r[a].elements.push(s))}function CVShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,r)}function CVTextElement(e,t,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,r)}function CVImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,r)}function CVSolidElement(e,t,r){this.initElement(e,t,r)}function CanvasRendererBase(){}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(){var e;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}this._length=15,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=""}function CVCompElement(e,t,r){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||void 0===t.clearCanvas||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new 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))}function HBaseElement(){}function HSolidElement(e,t,r){this.initElement(e,t,r)}function HShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,r)}function HCameraElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,e.pe,0,0,this),e.ks.p.s?(this.px=n(this,e.ks.p.x,1,0,this),this.py=n(this,e.ks.p.y,1,0,this),this.pz=n(this,e.ks.p.z,1,0,this)):this.p=n(this,e.ks.p,1,0,this),e.ks.a&&(this.a=n(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var a,i=e.ks.or.k.length;for(a=0;a<i;a+=1)e.ks.or.k[a].to=null,e.ks.or.k[a].ti=null}this.or=n(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,e.ks.rx,0,degToRads,this),this.ry=n(this,e.ks.ry,0,degToRads,this),this.rz=n(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,r)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.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"}function HCompElement(e,t,r){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||void 0===t.runExpressions||t.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"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r),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 e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},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(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var r=assetLoader.getLumaCanvas(this.canvasContext.canvas);r.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(r,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(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,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,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(e,t){var r={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},n={};if("fl"===e.ty||"st"===e.ty?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(r.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):"gf"!==e.ty&&"gs"!==e.ty||(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty){if(r.lc=lineCapEnum[e.lc||2],r.lj=lineJoinEnum[e.lj||2],1==e.lj&&(r.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(r.wi=n.w.v),e.d){var a=new DashProperty(this,e.d,"canvas",this);n.d=a,n.d.k||(r.da=n.d.dashArray,r.do=n.d.dashoffset[0])}}else r.r=2===e.r?"evenodd":"nonzero";return this.stylesList.push(r),n.style=r,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,r=this.stylesList.length;for(t=0;t<r;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,r,n,a){var i,s,o,l,c,h,p=e.length-1,d=[],f=[],u=[].concat(a);for(i=p;i>=0;i-=1){if((l=this.searchProcessedElement(e[i]))?t[i]=r[l-1]:e[i]._shouldRender=n,"fl"===e[i].ty||"st"===e[i].ty||"gf"===e[i].ty||"gs"===e[i].ty)l?t[i].style.closed=!1:t[i]=this.createStyleElement(e[i],u),d.push(t[i].style);else if("gr"===e[i].ty){if(l)for(o=t[i].it.length,s=0;s<o;s+=1)t[i].prevViewData[s]=t[i].it[s];else t[i]=this.createGroupElement(e[i]);this.searchShapes(e[i].it,t[i].it,t[i].prevViewData,n,u)}else"tr"===e[i].ty?(l||(h=this.createTransformElement(e[i]),t[i]=h),u.push(t[i]),this.addTransformToStyleList(t[i])):"sh"===e[i].ty||"rc"===e[i].ty||"el"===e[i].ty||"sr"===e[i].ty?l||(t[i]=this.createShapeElement(e[i])):"tm"===e[i].ty||"rd"===e[i].ty||"pb"===e[i].ty||"zz"===e[i].ty||"op"===e[i].ty?(l?(c=t[i]).closed=!1:((c=ShapeModifiers.getModifier(e[i].ty)).init(this,e[i]),t[i]=c,this.shapeModifiers.push(c)),f.push(c)):"rp"===e[i].ty&&(l?(c=t[i]).closed=!0:(c=ShapeModifiers.getModifier(e[i].ty),t[i]=c,c.init(this,e,i,t),this.shapeModifiers.push(c),n=!1),f.push(c));this.addProcessedElement(e[i],i+1)}for(this.removeTransformFromStyleList(),this.closeStyles(d),p=f.length,i=0;i<p;i+=1)f[i].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(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,r,n,a,i,s,o,l,c=this.stylesList.length,h=this.globalData.renderer,p=this.globalData.canvasContext;for(e=0;e<c;e+=1)if(("st"!==(o=(l=this.stylesList[e]).type)&&"gs"!==o||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(h.save(),i=l.elements,"st"===o||"gs"===o?(h.ctxStrokeStyle("st"===o?l.co:l.grd),h.ctxLineWidth(l.wi),h.ctxLineCap(l.lc),h.ctxLineJoin(l.lj),h.ctxMiterLimit(l.ml||0)):h.ctxFillStyle("fl"===o?l.co:l.grd),h.ctxOpacity(l.coOp),"st"!==o&&"gs"!==o&&p.beginPath(),h.ctxTransform(l.preTransforms.finalTransform.props),r=i.length,t=0;t<r;t+=1){for("st"!==o&&"gs"!==o||(p.beginPath(),l.da&&(p.setLineDash(l.da),p.lineDashOffset=l.do)),a=(s=i[t].trNodes).length,n=0;n<a;n+=1)"m"===s[n].t?p.moveTo(s[n].p[0],s[n].p[1]):"c"===s[n].t?p.bezierCurveTo(s[n].pts[0],s[n].pts[1],s[n].pts[2],s[n].pts[3],s[n].pts[4],s[n].pts[5]):p.closePath();"st"!==o&&"gs"!==o||(h.ctxStroke(),l.da&&p.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&this.globalData.renderer.ctxFill(l.r),h.restore()}},CVShapeElement.prototype.renderShape=function(e,t,r,n){var a,i;for(i=e,a=t.length-1;a>=0;a-=1)"tr"===t[a].ty?(i=r[a].transform,this.renderShapeTransform(e,i)):"sh"===t[a].ty||"el"===t[a].ty||"rc"===t[a].ty||"sr"===t[a].ty?this.renderPath(t[a],r[a]):"fl"===t[a].ty?this.renderFill(t[a],r[a],i):"st"===t[a].ty?this.renderStroke(t[a],r[a],i):"gf"===t[a].ty||"gs"===t[a].ty?this.renderGradientFill(t[a],r[a],i):"gr"===t[a].ty?this.renderShape(i,t[a].it,r[a].it):t[a].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r,n,a,i=e.trNodes,s=t.paths,o=s._length;i.length=0;var l=e.transforms.finalTransform;for(a=0;a<o;a+=1){var c=s.shapes[a];if(c&&c.v){for(n=c._length,r=1;r<n;r+=1)1===r&&i.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),i.push({t:"c",pts:l.applyToTriplePoints(c.o[r-1],c.i[r],c.v[r])});1===n&&i.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&n&&(i.push({t:"c",pts:l.applyToTriplePoints(c.o[r-1],c.i[0],c.v[0])}),i.push({t:"z"}))}}e.trNodes=i}},CVShapeElement.prototype.renderPath=function(e,t){if(!0!==e.hd&&e._shouldRender){var r,n=t.styledShapes.length;for(r=0;r<n;r+=1)this.renderStyledShape(t.styledShapes[r],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,r){var n=t.style;(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,r){var n,a=t.style;if(!a.grd||t.g._mdf||t.s._mdf||t.e._mdf||1!==e.t&&(t.h._mdf||t.a._mdf)){var i,s=this.globalData.canvasContext,o=t.s.v,l=t.e.v;if(1===e.t)n=s.createLinearGradient(o[0],o[1],l[0],l[1]);else{var c=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),h=Math.atan2(l[1]-o[1],l[0]-o[0]),p=t.h.v;p>=1?p=.99:p<=-1&&(p=-.99);var d=c*p,f=Math.cos(h+t.a.v)*d+o[0],u=Math.sin(h+t.a.v)*d+o[1];n=s.createRadialGradient(f,u,0,o[0],o[1],c)}var m=e.g.p,g=t.g.c,y=1;for(i=0;i<m;i+=1)t.g._hasOpacity&&t.g._collapsable&&(y=t.g.o[2*i+1]),n.addColorStop(g[4*i]/100,"rgba("+g[4*i+1]+","+g[4*i+2]+","+g[4*i+3]+","+y+")");a.grd=n}a.coOp=t.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(e,t,r){var n=t.style,a=t.d;a&&(a._mdf||this._isFirstFrame)&&(n.da=a.dashArray,n.do=a.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity),(t.w._mdf||this._isFirstFrame)&&(n.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var r=!1;e.sc&&(r=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var n,a,i,s,o,l,c,h,p,d,f,u,m=this.globalData.fontManager.getFontByName(e.f),g=e.l,y=this.mHelper;this.stroke=r,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,a=e.finalText.length;var v=this.data.singleShape,b=.001*e.tr*e.finalSize,E=0,S=0,_=!0,T=0;for(n=0;n<a;n+=1){s=(i=this.globalData.fontManager.getCharData(e.finalText[n],m.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&i.data||{},y.reset(),v&&g[n].n&&(E=-b,S+=e.yOffset,S+=_?1:0,_=!1),p=(c=s.shapes?s.shapes[0].it:[]).length,y.scale(e.finalSize/100,e.finalSize/100),v&&this.applyTextPropertiesToMatrix(e,y,g[n].line,E,S),f=createSizedArray(p-1);var k=0;for(h=0;h<p;h+=1)if("sh"===c[h].ty){for(l=c[h].ks.k.i.length,d=c[h].ks.k,u=[],o=1;o<l;o+=1)1===o&&u.push(y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),u.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[o][0],d.i[o][1],0),y.applyToY(d.i[o][0],d.i[o][1],0),y.applyToX(d.v[o][0],d.v[o][1],0),y.applyToY(d.v[o][0],d.v[o][1],0));u.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[0][0],d.i[0][1],0),y.applyToY(d.i[0][0],d.i[0][1],0),y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),f[k]=u,k+=1}v&&(E+=g[n].l,E+=b),this.textSpans[T]?this.textSpans[T].elem=f:this.textSpans[T]={elem:f},T+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,r,n,a,i;this.validateText(),this.canvasContext.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 s,o=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;t=l.length;var c,h,p=null,d=null,f=null,u=this.globalData.renderer;for(e=0;e<t;e+=1)if(!l[e].n){if((s=o[e])&&(u.save(),u.ctxTransform(s.p),u.ctxOpacity(s.o)),this.fill){for(s&&s.fc?p!==s.fc&&(u.ctxFillStyle(s.fc),p=s.fc):p!==this.values.fill&&(p=this.values.fill,u.ctxFillStyle(this.values.fill)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<n;r+=1)for(i=(h=c[r]).length,this.globalData.canvasContext.moveTo(h[0],h[1]),a=2;a<i;a+=6)this.globalData.canvasContext.bezierCurveTo(h[a],h[a+1],h[a+2],h[a+3],h[a+4],h[a+5]);this.globalData.canvasContext.closePath(),u.ctxFill()}if(this.stroke){for(s&&s.sw?f!==s.sw&&(f=s.sw,u.ctxLineWidth(s.sw)):f!==this.values.sWidth&&(f=this.values.sWidth,u.ctxLineWidth(this.values.sWidth)),s&&s.sc?d!==s.sc&&(d=s.sc,u.ctxStrokeStyle(s.sc)):d!==this.values.stroke&&(d=this.values.stroke,u.ctxStrokeStyle(this.values.stroke)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<n;r+=1)for(i=(h=c[r]).length,this.globalData.canvasContext.moveTo(h[0],h[1]),a=2;a<i;a+=6)this.globalData.canvasContext.bezierCurveTo(h[a],h[a+1],h[a+2],h[a+3],h[a+4],h[a+5]);this.globalData.canvasContext.closePath(),u.ctxStroke()}s&&this.globalData.renderer.restore()}},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 e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,r,n=e.getContext("2d"),a=this.img.width,i=this.img.height,s=a/i,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;s>o&&"xMidYMid slice"===l||s<o&&"xMidYMid slice"!==l?t=(r=i)*o:r=(t=a)/o,n.drawImage(this.img,(a-t)/2,(i-r)/2,t,r,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},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)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){1===e[0]&&0===e[1]&&0===e[4]&&1===e[5]&&0===e[12]&&0===e[13]||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,r,n){this.canvasContext.fillRect(e,t,r,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var r="0px 0px 0px";t.transformOrigin=r,t.mozTransformOrigin=r,t.webkitTransformOrigin=r,t["-webkit-transform"]=r,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var r,n,a,i;if(this.reset(),e?(r=e,n=t,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),o=s[1]||"meet",l=s[0]||"xMidYMid",c=l.substr(0,4),h=l.substr(4);a=r/n,(i=this.transformCanvas.w/this.transformCanvas.h)>a&&"meet"===o||i<a&&"slice"===o?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===c&&(i<a&&"meet"===o||i>a&&"slice"===o)?(r-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===c&&(i<a&&"meet"===o||i>a&&"slice"===o)?(r-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>a&&"meet"===o||i<a&&"slice"===o)?(n-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(i>a&&"meet"===o||i<a&&"slice"===o)?(n-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(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(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var r;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(e-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,r=this.stack[this.cArrPos],n=r.transform,a=this.cTr.props;for(t=0;t<16;t+=1)a[t]=n[t];if(e){this.nativeContext.restore();var i=this.stack[this.cArrPos+1];this.appliedFillStyle=i.fillStyle,this.appliedStrokeStyle=i.strokeStyle,this.appliedLineWidth=i.lineWidth,this.appliedLineCap=i.lineCap,this.appliedLineJoin=i.lineJoin,this.appliedMiterLimit=i.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||-1!==r.opacity&&this.currentOpacity!==r.opacity)&&(this.nativeContext.globalAlpha=r.opacity,this.currentOpacity=r.opacity),this.currentFillStyle=r.fillStyle,this.currentStrokeStyle=r.strokeStyle,this.currentLineWidth=r.lineWidth,this.currentLineCap=r.lineCap,this.currentLineJoin=r.lineJoin,this.currentMiterLimit=r.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var r,n=this.stack[this.cArrPos];for(r=0;r<16;r+=1)n.transform[r]=t[r];this.cArrPos+=1;var a=this.stack[this.cArrPos];a.opacity=n.opacity,a.fillStyle=n.fillStyle,a.strokeStyle=n.strokeStyle,a.lineWidth=n.lineWidth,a.lineCap=n.lineCap,a.lineJoin=n.lineJoin,a.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var r=t.props;this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,r,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,r,n)},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()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},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),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.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,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t=e[r].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var r,n,a,i,s,o=e.sh.v,l=e.transformers,c=o._length;if(!(c<=1)){for(r=0;r<c-1;r+=1)n=this.getTransformedPoint(l,o.v[r]),a=this.getTransformedPoint(l,o.o[r]),i=this.getTransformedPoint(l,o.i[r+1]),s=this.getTransformedPoint(l,o.v[r+1]),this.checkBounds(n,a,i,s,t);o.c&&(n=this.getTransformedPoint(l,o.v[r]),a=this.getTransformedPoint(l,o.o[r]),i=this.getTransformedPoint(l,o.i[0]),s=this.getTransformedPoint(l,o.v[0]),this.checkBounds(n,a,i,s,t))}},HShapeElement.prototype.checkBounds=function(e,t,r,n,a){this.getBoundsOfCurve(e,t,r,n);var i=this.shapeBoundingBox;a.x=bmMin(i.left,a.x),a.xMax=bmMax(i.right,a.xMax),a.y=bmMin(i.top,a.y),a.yMax=bmMax(i.bottom,a.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(e,t,r,n){for(var a,i,s,o,l,c,h,p=[[e[0],n[0]],[e[1],n[1]]],d=0;d<2;++d)i=6*e[d]-12*t[d]+6*r[d],a=-3*e[d]+9*t[d]-9*r[d]+3*n[d],s=3*t[d]-3*e[d],i|=0,s|=0,0==(a|=0)&&0===i||(0===a?(o=-s/i)>0&&o<1&&p[d].push(this.calculateF(o,e,t,r,n,d)):(l=i*i-4*s*a)>=0&&((c=(-i+bmSqrt(l))/(2*a))>0&&c<1&&p[d].push(this.calculateF(c,e,t,r,n,d)),(h=(-i-bmSqrt(l))/(2*a))>0&&h<1&&p[d].push(this.calculateF(h,e,t,r,n,d))));this.shapeBoundingBox.left=bmMin.apply(null,p[0]),this.shapeBoundingBox.top=bmMin.apply(null,p[1]),this.shapeBoundingBox.right=bmMax.apply(null,p[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,p[1])},HShapeElement.prototype.calculateF=function(e,t,r,n,a,i){return bmPow(1-e,3)*t[i]+3*bmPow(1-e,2)*e*r[i]+3*(1-e)*bmPow(e,2)*n[i]+bmPow(e,3)*a[i]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]&&e[r].sh?this.calculateShapeBoundingBox(e[r],t):e[r]&&e[r].it?this.calculateBoundingBox(e[r].it,t):e[r]&&e[r].style&&e[r].w&&this.expandStrokeBoundingBox(e[r].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var r=0;if(e.keyframes){for(var n=0;n<e.keyframes.length;n+=1){var a=e.keyframes[n].s;a>r&&(r=a)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var r=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),r=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),r=!0),r||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,a="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=a,n.webkitTransform=a}}},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 e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,r=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=r,t.color=r,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var n,a,i=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",i.fClass)this.innerElem.className=i.fClass;else{t.fontFamily=i.fFamily;var s=e.fWeight,o=e.fStyle;t.fontStyle=o,t.fontWeight=s}var l,c,h,p=e.l;a=p.length;var d,f=this.mHelper,u="",m=0;for(n=0;n<a;n+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?l=this.textPaths[m]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?h=(c=this.textSpans[m]).children[0]:((c=createTag("div")).style.lineHeight=0,(h=createNS("svg")).appendChild(l),styleDiv(c)))):this.isMasked?l=this.textPaths[m]?this.textPaths[m]:createNS("text"):this.textSpans[m]?(c=this.textSpans[m],l=this.textPaths[m]):(styleDiv(c=createTag("span")),styleDiv(l=createTag("span")),c.appendChild(l)),this.globalData.fontManager.chars){var g,y=this.globalData.fontManager.getCharData(e.finalText[n],i.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(g=y?y.data:null,f.reset(),g&&g.shapes&&g.shapes.length&&(d=g.shapes[0].it,f.scale(e.finalSize/100,e.finalSize/100),u=this.createPathShape(f,d),l.setAttribute("d",u)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(h);var v=h.getBBox();h.setAttribute("width",v.width+2),h.setAttribute("height",v.height+2),h.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=h.style,E="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=E,b.webkitTransform=E,p[n].yOffset=v.y-1}else h.setAttribute("width",1),h.setAttribute("height",1);c.appendChild(h)}}else if(l.textContent=p[n].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(c);var S=l.style,_="translate3d(0,"+-e.finalSize/1.2+"px,0)";S.transform=_,S.webkitTransform=_}this.isMasked?this.textSpans[m]=l:this.textSpans[m]=c,this.textSpans[m].style.display="block",this.textPaths[m]=l,m+=1}for(;m<this.textSpans.length;)this.textSpans[m].style.display="none",m+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),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),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,n,a,i,s,o=0,l=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;for(n=c.length,r=0;r<n;r+=1)c[r].n?o+=1:(i=this.textSpans[r],s=this.textPaths[r],a=l[o],o+=1,a._mdf.m&&(this.isMasked?i.setAttribute("transform",a.m):(i.style.webkitTransform=a.m,i.style.transform=a.m)),i.style.opacity=a.o,a.sw&&a._mdf.sw&&s.setAttribute("stroke-width",a.sw),a.sc&&a._mdf.sc&&s.setAttribute("stroke",a.sc),a.fc&&a._mdf.fc&&(s.setAttribute("fill",a.fc),s.style.color=a.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var h=this.innerElem.getBBox();if(this.currentBBox.w!==h.width&&(this.currentBBox.w=h.width,this.svgElement.setAttribute("width",h.width)),this.currentBBox.h!==h.height&&(this.currentBBox.h=h.height,this.svgElement.setAttribute("height",h.height)),this.currentBBox.w!==h.width+2||this.currentBBox.h!==h.height+2||this.currentBBox.x!==h.x-1||this.currentBBox.y!==h.y-1){this.currentBBox.w=h.width+2,this.currentBBox.h=h.height+2,this.currentBBox.x=h.x-1,this.currentBBox.y=h.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var p="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=p,e.webkitTransform=p}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,r,n,a=this.comp.threeDElements.length;for(e=0;e<a;e+=1)if("3d"===(t=this.comp.threeDElements[e]).type){r=t.perspectiveElem.style,n=t.container.style;var i=this.pe.v+"px",s="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=i,r.webkitPerspective=i,n.transformOrigin=s,n.mozTransformOrigin=s,n.webkitTransformOrigin=s,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,r=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)r=this.hierarchy[e].finalTransform.mProp._mdf||r;if(r||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(e=t=this.hierarchy.length-1;e>=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.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 a;a=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var i=Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)),s=[a[0]/i,a[1]/i,a[2]/i],o=Math.sqrt(s[2]*s[2]+s[0]*s[0]),l=Math.atan2(s[1],o),c=Math.atan2(s[0],-s[2]);this.mat.rotateY(c).rotateX(-l)}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 h=!this._prevMat.equals(this.mat);if((h||this.pe._mdf)&&this.comp.threeDElements){var p,d,f;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if("3d"===(p=this.comp.threeDElements[e]).type){if(h){var u=this.mat.toCSS();(f=p.container.style).transform=u,f.webkitTransform=u}this.pe._mdf&&((d=p.perspectiveElem.style).perspective=this.pe.v+"px",d.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=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",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){var n=this.layers[t];if(n.ddd&&this.supports3d)this.addTo3dContainer(r,t);else if(this.threeDElements)this.addTo3dContainer(r,t);else{for(var a,i,s=0;s<t;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement&&(i=this.elements[s],a=(this.layers[s].ddd?this.getThreeDContainerByPos(s):i.getBaseElement())||a),s+=1;a?n.ddd&&this.supports3d||this.layerElement.insertBefore(r,a):n.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,r=this.threeDElements.length;t<r;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r,n,a=createTag("div");styleDiv(a);var i=createTag("div");if(styleDiv(i),"3d"===t){(r=a.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var s="50% 50%";r.webkitTransformOrigin=s,r.mozTransformOrigin=s,r.transformOrigin=s;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=i.style).transform=o,n.webkitTransform=o}a.appendChild(i);var l={container:i,perspectiveElem:a,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t,r=this.layers.length,n="";for(e=0;e<r;e+=1)this.layers[e].ddd&&3!==this.layers[e].ty?("3d"!==n&&(n="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):("2d"!==n&&(n="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(r=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,n=this.threeDElements.length;r<n;){if(t<=this.threeDElements[r].endPos){for(var a,i=this.threeDElements[r].startPos;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(a=this.elements[i].getBaseElement()),i+=1;a?this.threeDElements[r].container.insertBefore(e,a):this.threeDElements[r].container.appendChild(e);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),r=this.animationItem.wrapper,n=t.style;n.width=e.w+"px",n.height=e.h+"px",this.resizerElem=t,styleDiv(t),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),r.appendChild(t),n.overflow="hidden";var a=createNS("svg");a.setAttribute("width","1"),a.setAttribute("height","1"),styleDiv(a),this.resizerElem.appendChild(a);var i=createNS("defs");a.appendChild(i),this.data=e,this.setupGlobalData(e,a),this.globalData.defs=i,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,r,n,a=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight,s=a/i;this.globalData.compSize.w/this.globalData.compSize.h>s?(e=a/this.globalData.compSize.w,t=a/this.globalData.compSize.w,r=0,n=(i-this.globalData.compSize.h*(a/this.globalData.compSize.w))/2):(e=i/this.globalData.compSize.h,t=i/this.globalData.compSize.h,r=(a-this.globalData.compSize.w*(i/this.globalData.compSize.h))/2,n=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+r+","+n+",0,1)",o.transform=o.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 e,t=this.globalData.compSize.w,r=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e<n;e+=1){var a=this.threeDElements[e].perspectiveElem.style;a.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(r,2))+"px",a.perspective=a.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,r=e.length,n=createTag("div");for(t=0;t<r;t+=1)if(e[t].xt){var a=this.createComp(e[t],n,this.globalData.comp,null);a.initExpressions(),this.globalData.projectInterface.registerComposition(a)}},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(e,t){for(var r,n=0;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(r=this.elements[n].getBaseElement()),n+=1;r?this.layerElement.insertBefore(e,r):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(t){for(var r=0,n=e.layers.length;r<n;){if(e.layers[r].nm===t||e.layers[r].ind===t)return e.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$2(e)}function seedRandom(e,t){var r=this,n=256,a="random",i=t.pow(n,6),s=t.pow(2,52),o=2*s,l=255;function c(e){var t,r=e.length,a=this,i=0,s=a.i=a.j=0,o=a.S=[];for(r||(e=[r++]);i<n;)o[i]=i++;for(i=0;i<n;i++)o[i]=o[s=l&s+e[i%r]+(t=o[i])],o[s]=t;a.g=function(e){for(var t,r=0,i=a.i,s=a.j,o=a.S;e--;)t=o[i=l&i+1],r=r*n+o[l&(o[i]=o[s=l&s+t])+(o[s]=t)];return a.i=i,a.j=s,r}}function h(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function p(e,t){var r,n=[],a=_typeof$2(e);if(t&&"object"==a)for(r in e)try{n.push(p(e[r],t-1))}catch(e){}return n.length?n:"string"==a?e:e+"\0"}function d(e,t){for(var r,n=e+"",a=0;a<n.length;)t[l&a]=l&(r^=19*t[l&a])+n.charCodeAt(a++);return f(t)}function f(e){return String.fromCharCode.apply(0,e)}t["seed"+a]=function(l,u,m){var g=[],y=d(p((u=!0===u?{entropy:!0}:u||{}).entropy?[l,f(e)]:null===l?function(){try{var t=new Uint8Array(n);return(r.crypto||r.msCrypto).getRandomValues(t),f(t)}catch(t){var a=r.navigator,i=a&&a.plugins;return[+new Date,r,i,r.screen,f(e)]}}():l,3),g),v=new c(g),b=function(){for(var e=v.g(6),t=i,r=0;e<s;)e=(e+r)*n,t*=n,r=v.g(1);for(;e>=o;)e/=2,t/=2,r>>>=1;return(e+r)/t};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,d(f(v.S),e),(u.pass||m||function(e,r,n,i){return i&&(i.S&&h(i,v),e.state=function(){return h(v,{})}),n?(t[a]=e,r):e})(b,y,"global"in u?u.global:this==t,u.state)},d(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var r,n=e.length,a=[];for(r=0;r<n;r+=1)a[r]=-e[r];return a}return e.propType?e.v:-e}initialize$2(BMMath);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(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t)||"string"===r||"string"===n)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var a=0,i=e.length,s=t.length,o=[];a<i||a<s;)("number"==typeof e[a]||e[a]instanceof Number)&&("number"==typeof t[a]||t[a]instanceof Number)?o[a]=e[a]+t[a]:o[a]=void 0===t[a]?e[a]:e[a]||t[a],a+=1;return o}return 0}var add=sum;function sub(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t))return"string"===r&&(e=parseInt(e,10)),"string"===n&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var a=0,i=e.length,s=t.length,o=[];a<i||a<s;)("number"==typeof e[a]||e[a]instanceof Number)&&("number"==typeof t[a]||t[a]instanceof Number)?o[a]=e[a]-t[a]:o[a]=void 0===t[a]?e[a]:e[a]||t[a],a+=1;return o}return 0}function mul(e,t){var r,n,a,i=_typeof$1(e),s=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(s,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(a=e.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e[n]*t;return r}if(isNumerable(i,e)&&$bm_isInstanceOfArray(t)){for(a=t.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e*t[n];return r}return 0}function div(e,t){var r,n,a,i=_typeof$1(e),s=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(s,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(a=e.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e[n]/t;return r}if(isNumerable(i,e)&&$bm_isInstanceOfArray(t)){for(a=t.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e/t[n];return r}return 0}function mod(e,t){return"string"==typeof e&&(e=parseInt(e,10)),"string"==typeof t&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,r){if(t>r){var n=r;r=t,t=n}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var r;t||(t=helperLengthArray);var n=Math.min(e.length,t.length),a=0;for(r=0;r<n;r+=1)a+=Math.pow(t[r]-e[r],2);return Math.sqrt(a)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,r,n=e[0],a=e[1],i=e[2],s=Math.max(n,a,i),o=Math.min(n,a,i),l=(s+o)/2;if(s===o)t=0,r=0;else{var c=s-o;switch(r=l>.5?c/(2-s-o):c/(s+o),s){case n:t=(a-i)/c+(a<i?6:0);break;case a:t=(i-n)/c+2;break;case i:t=(n-a)/c+4}t/=6}return[t,r,l,e[3]]}function hue2rgb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t,r,n,a=e[0],i=e[1],s=e[2];if(0===i)t=s,n=s,r=s;else{var o=s<.5?s*(1+i):s+i-s*i,l=2*s-o;t=hue2rgb(l,o,a+1/3),r=hue2rgb(l,o,a),n=hue2rgb(l,o,a-1/3)}return[t,r,n,e[3]]}function linear(e,t,r,n,a){if(void 0!==n&&void 0!==a||(n=t,a=r,t=0,r=1),r<t){var i=r;r=t,t=i}if(e<=t)return n;if(e>=r)return a;var s,o=r===t?0:(e-t)/(r-t);if(!n.length)return n+(a-n)*o;var l=n.length,c=createTypedArray("float32",l);for(s=0;s<l;s+=1)c[s]=n[s]+(a[s]-n[s])*o;return c}function random(e,t){if(void 0===t&&(void 0===e?(e=0,t=1):(t=e,e=void 0)),t.length){var r,n=t.length;e||(e=createTypedArray("float32",n));var a=createTypedArray("float32",n),i=BMMath.random();for(r=0;r<n;r+=1)a[r]=e[r]+i*(t[r]-e[r]);return a}return void 0===e&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,r,n){var a,i=e.length,s=shapePool.newElement();s.setPathData(!!n,i);var o,l,c=[0,0];for(a=0;a<i;a+=1)o=t&&t[a]?t[a]:c,l=r&&r[a]?r[a]:c,s.setTripleAt(e[a][0],e[a][1],l[0]+e[a][0],l[1]+e[a][1],o[0]+e[a][0],o[1]+e[a][1],a,!0);return s}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,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||!0!==this.data.hd,wiggle=function(e,t){var r,n,a=this.pv.length?this.pv.length:1,i=createTypedArray("float32",a),s=Math.floor(5*time);for(r=0,n=0;r<s;){for(n=0;n<a;n+=1)i[n]+=-t+2*t*BMMath.random();r+=1}var o=5*time,l=o-Math.floor(o),c=createTypedArray("float32",a);if(a>1){for(n=0;n<a;n+=1)c[n]=this.pv[n]+i[n]+(-t+2*t*BMMath.random())*l;return c}return this.pv+i[0]+(-t+2*t*BMMath.random())*l}.bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}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)),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),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var r=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],n=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,n,0]}function easeOut(e,t,r,n,a){return applyEase(easeOutBez,e,t,r,n,a)}function easeIn(e,t,r,n,a){return applyEase(easeInBez,e,t,r,n,a)}function ease(e,t,r,n,a){return applyEase(easeInOutBez,e,t,r,n,a)}function applyEase(e,t,r,n,a,i){void 0===a?(a=r,i=n):t=(t-r)/(n-r),t>1?t=1:t<0&&(t=0);var s=e(t);if($bm_isInstanceOfArray(a)){var o,l=a.length,c=createTypedArray("float32",l);for(o=0;o<l;o+=1)c[o]=(i[o]-a[o])*s+a[o];return c}return(i-a)*s+a}function nearestKey(e){var t,r,n,a=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,n=data.k[0].t;else{for(t=0;t<a-1;t+=1){if(e===data.k[t].t){r=t+1,n=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(r=t+2,n=data.k[t+1].t):(r=t+1,n=data.k[t].t);break}}-1===r&&(r=t+1,n=data.k[t].t)}else r=0,n=0;var i={};return i.index=r,i.time=n/elem.comp.globalData.frameRate,i}function key(e){var t,r,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var a=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=a.length,r=0;r<n;r+=1)t[r]=a[r],t.value[r]=a[r];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||0===e||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return"string"==typeof value?void 0===t?value.substring(e):value.substring(e,t):""}function substr(e,t){return"string"==typeof value?void 0===t?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=0===e?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(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)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!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)}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 e={initExpressions:function(e){var t=0,r=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){t+=1},e.renderer.globalData.popExpression=function(){0==(t-=1)&&function(){var e,t=r.length;for(e=0;e<t;e+=1)r[e].release();r.length=0}()},e.renderer.globalData.registerExpressionProperty=function(e){-1===r.indexOf(e)&&r.push(e)}}};return e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var r,n=createSizedArray(t.viewData.length),a=t.viewData.length;for(r=0;r<a;r+=1)n[r]=new e(t.viewData[r],t.masksProperties[r]);return function(e){for(r=0;r<a;){if(t.masksProperties[r].nm===e)return n[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function r(e,t,r){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(n){if(!e.numKeys)return 0;var a="";a="s"in t.keyframes[n-1]?t.keyframes[n-1].s:"e"in t.keyframes[n-2]?t.keyframes[n-2].e:t.keyframes[n-2].s;var i="unidimensional"===r?new Number(a):Object.assign({},a);return i.time=t.keyframes[n-1].t/t.elem.comp.globalData.frameRate,i.value="unidimensional"===r?a[0]:a,i},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function n(){return e}return function(a){return a?"unidimensional"===a.propType?function(t){t&&"pv"in t||(t=e);var n=1/t.mult,a=t.pv*n,i=new Number(a);return i.value=a,r(i,t,"unidimensional"),function(){return t.k&&t.getValue(),a=t.v*n,i.value!==a&&((i=new Number(a)).value=a,i[0]=a,r(i,t,"unidimensional")),i}}(a):function(e){e&&"pv"in e||(e=t);var n=1/e.mult,a=e.data&&e.data.l||e.pv.length,i=createTypedArray("float32",a),s=createTypedArray("float32",a);return i.value=s,r(i,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<a;t+=1)s[t]=e.v[t]*n,i[t]=s[t];return i}}(a):n}}(),TransformExpressionInterface=function(e){function t(e){switch(e){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var r,n,a,i;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?i=ExpressionPropertyInterface(e.p):(r=ExpressionPropertyInterface(e.px),n=ExpressionPropertyInterface(e.py),e.pz&&(a=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?i():[r(),n(),a?a():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(e){var t=new Matrix;return void 0!==e?this._elem.finalTransform.mProp.getValueAtTime(e).clone(t):this._elem.finalTransform.mProp.applyToMatrix(t),t}function t(e,t){var r=this.getMatrix(t);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,e)}function r(e,t){var r=this.getMatrix(t);return this.applyPoint(r,e)}function n(e,t){var r=this.getMatrix(t);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,e)}function a(e,t){var r=this.getMatrix(t);return this.invertPoint(r,e)}function i(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function s(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function o(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function l(){return[1,1,1,1]}return function(c){var h;function p(e){switch(e){case"ADBE Root Vectors Group":case"Contents":case 2:return p.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return h;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return p.effect;case"ADBE Text Properties":return p.textInterface;default:return null}}p.getMatrix=e,p.invertPoint=s,p.applyPoint=i,p.toWorld=r,p.toWorldVec=t,p.fromWorld=a,p.fromWorldVec=n,p.toComp=r,p.fromComp=o,p.sampleImage=l,p.sourceRectAtTime=c.sourceRectAtTime.bind(c),p._elem=c;var d=getDescriptor(h=TransformExpressionInterface(c.finalTransform.mProp),"anchorPoint");return Object.defineProperties(p,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(h,"rotation"),scale:getDescriptor(h,"scale"),position:getDescriptor(h,"position"),opacity:getDescriptor(h,"opacity"),anchorPoint:d,anchor_point:d,transform:{get:function(){return h}},active:{get:function(){return c.isInRange}}}),p.startTime=c.data.st,p.index=c.data.ind,p.source=c.data.refId,p.height=0===c.data.ty?c.data.h:100,p.width=0===c.data.ty?c.data.w:100,p.inPoint=c.data.ip/c.comp.globalData.frameRate,p.outPoint=c.data.op/c.comp.globalData.frameRate,p._name=c.data.nm,p.registerMaskInterface=function(e){p.mask=new MaskManagerInterface(e,c)},p.registerEffectsInterface=function(e){p.effect=e},p}}(),propertyGroupFactory=function(e,t){return function(r){return(r=void 0===r?1:r)<=0?e:t(r-1)}},PropertyInterface=function(e,t){var r={_name:e};return function(e){return(e=void 0===e?1:e)<=0?r:t(e-1)}},EffectsExpressionInterface=function(){var e={createEffectsInterface:function(e,r){if(e.effectsManager){var n,a=[],i=e.data.ef,s=e.effectsManager.effectElements.length;for(n=0;n<s;n+=1)a.push(t(i[n],e.effectsManager.effectElements[n],r,e));var o=e.data.ef||[],l=function(e){for(n=0,s=o.length;n<s;){if(e===o[n].nm||e===o[n].mn||e===o[n].ix)return a[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return o.length}}),l}return null}};function t(e,n,a,i){function s(t){for(var r=e.ef,n=0,a=r.length;n<a;){if(t===r[n].nm||t===r[n].mn||t===r[n].ix)return 5===r[n].ty?c[n]:c[n]();n+=1}throw new Error}var o,l=propertyGroupFactory(s,a),c=[],h=e.ef.length;for(o=0;o<h;o+=1)5===e.ef[o].ty?c.push(t(e.ef[o],n.effectElements[o],n.effectElements[o].propertyGroup,i)):c.push(r(n.effectElements[o],e.ef[o].ty,i,l));return"ADBE Color Control"===e.mn&&Object.defineProperty(s,"color",{get:function(){return c[0]()}}),Object.defineProperties(s,{numProperties:{get:function(){return e.np}},_name:{value:e.nm},propertyGroup:{value:l}}),s.enabled=0!==e.en,s.active=s.enabled,s}function r(e,t,r,n){var a=ExpressionPropertyInterface(e.p);return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface("",n)),function(){return 10===t?r.comp.compInterface(e.p.v):a()}}return e}(),ShapePathInterface=function(e,t,r){var n=t.sh;function a(e){return"Shape"===e||"shape"===e||"Path"===e||"path"===e||"ADBE Vector Shape"===e||2===e?a.path:null}var i=propertyGroupFactory(a,r);return n.setGroupProperty(PropertyInterface("Path",i)),Object.defineProperties(a,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:r}}),a},ShapeExpressionInterface=function(){function e(e,s,d){var f,u=[],m=e?e.length:0;for(f=0;f<m;f+=1)"gr"===e[f].ty?u.push(t(e[f],s[f],d)):"fl"===e[f].ty?u.push(r(e[f],s[f],d)):"st"===e[f].ty?u.push(a(e[f],s[f],d)):"tm"===e[f].ty?u.push(i(e[f],s[f],d)):"tr"===e[f].ty||("el"===e[f].ty?u.push(o(e[f],s[f],d)):"sr"===e[f].ty?u.push(l(e[f],s[f],d)):"sh"===e[f].ty?u.push(ShapePathInterface(e[f],s[f],d)):"rc"===e[f].ty?u.push(c(e[f],s[f],d)):"rd"===e[f].ty?u.push(h(e[f],s[f],d)):"rp"===e[f].ty?u.push(p(e[f],s[f],d)):"gf"===e[f].ty?u.push(n(e[f],s[f],d)):u.push((e[f],s[f],function(){return null})));return u}function t(t,r,n){var a=function(e){switch(e){case"ADBE Vectors Group":case"Contents":case 2:return a.content;default:return a.transform}};a.propertyGroup=propertyGroupFactory(a,n);var i=function(t,r,n){var a,i=function(e){for(var t=0,r=a.length;t<r;){if(a[t]._name===e||a[t].mn===e||a[t].propertyIndex===e||a[t].ix===e||a[t].ind===e)return a[t];t+=1}return"number"==typeof e?a[e-1]:null};i.propertyGroup=propertyGroupFactory(i,n),a=e(t.it,r.it,i.propertyGroup),i.numProperties=a.length;var o=s(t.it[t.it.length-1],r.it[r.it.length-1],i.propertyGroup);return i.transform=o,i.propertyIndex=t.cix,i._name=t.nm,i}(t,r,a.propertyGroup),o=s(t.it[t.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.content=i,a.transform=o,Object.defineProperty(a,"_name",{get:function(){return t.nm}}),a.numProperties=t.np,a.propertyIndex=t.ix,a.nm=t.nm,a.mn=t.mn,a}function r(e,t,r){function n(e){return"Color"===e||"color"===e?n.color:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),n}function n(e,t,r){function n(e){return"Start Point"===e||"start point"===e?n.startPoint:"End Point"===e||"end point"===e?n.endPoint:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return"a"}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface("Start Point",r)),t.e.setGroupProperty(PropertyInterface("End Point",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),n}function a(e,t,r){var n,a=propertyGroupFactory(c,r),i=propertyGroupFactory(l,a);function s(r){Object.defineProperty(l,e.d[r].nm,{get:ExpressionPropertyInterface(t.d.dataProps[r].p)})}var o=e.d?e.d.length:0,l={};for(n=0;n<o;n+=1)s(n),t.d.dataProps[n].p.setGroupProperty(i);function c(e){return"Color"===e||"color"===e?c.color:"Opacity"===e||"opacity"===e?c.opacity:"Stroke Width"===e||"stroke width"===e?c.strokeWidth:null}return Object.defineProperties(c,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return l}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",a)),t.o.setGroupProperty(PropertyInterface("Opacity",a)),t.w.setGroupProperty(PropertyInterface("Stroke Width",a)),c}function i(e,t,r){function n(t){return t===e.e.ix||"End"===t||"end"===t?n.end:t===e.s.ix?n.start:t===e.o.ix?n.offset:null}var a=propertyGroupFactory(n,r);return n.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",a)),t.e.setGroupProperty(PropertyInterface("End",a)),t.o.setGroupProperty(PropertyInterface("Offset",a)),n.propertyIndex=e.ix,n.propertyGroup=r,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),n.mn=e.mn,n}function s(e,t,r){function n(t){return e.a.ix===t||"Anchor Point"===t?n.anchorPoint:e.o.ix===t||"Opacity"===t?n.opacity:e.p.ix===t||"Position"===t?n.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?n.rotation:e.s.ix===t||"Scale"===t?n.scale:e.sk&&e.sk.ix===t||"Skew"===t?n.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?n.skewAxis:null}var a=propertyGroupFactory(n,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",a)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",a)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",a)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",a)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",a)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",a)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",a))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",a)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),n.ty="tr",n.mn=e.mn,n.propertyGroup=r,n}function o(e,t,r){function n(t){return e.p.ix===t?n.position:e.s.ix===t?n.size:null}var a=propertyGroupFactory(n,r);n.propertyIndex=e.ix;var i="tm"===t.sh.ty?t.sh.prop:t.sh;return i.s.setGroupProperty(PropertyInterface("Size",a)),i.p.setGroupProperty(PropertyInterface("Position",a)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(i.s)},position:{get:ExpressionPropertyInterface(i.p)},_name:{value:e.nm}}),n.mn=e.mn,n}function l(e,t,r){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.rotation:e.pt.ix===t?n.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?n.outerRadius:e.os.ix===t?n.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?n.innerRoundness:null:n.innerRadius}var a=propertyGroupFactory(n,r),i="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,i.or.setGroupProperty(PropertyInterface("Outer Radius",a)),i.os.setGroupProperty(PropertyInterface("Outer Roundness",a)),i.pt.setGroupProperty(PropertyInterface("Points",a)),i.p.setGroupProperty(PropertyInterface("Position",a)),i.r.setGroupProperty(PropertyInterface("Rotation",a)),e.ir&&(i.ir.setGroupProperty(PropertyInterface("Inner Radius",a)),i.is.setGroupProperty(PropertyInterface("Inner Roundness",a))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(i.p)},rotation:{get:ExpressionPropertyInterface(i.r)},points:{get:ExpressionPropertyInterface(i.pt)},outerRadius:{get:ExpressionPropertyInterface(i.or)},outerRoundness:{get:ExpressionPropertyInterface(i.os)},innerRadius:{get:ExpressionPropertyInterface(i.ir)},innerRoundness:{get:ExpressionPropertyInterface(i.is)},_name:{value:e.nm}}),n.mn=e.mn,n}function c(e,t,r){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?n.size:null}var a=propertyGroupFactory(n,r),i="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,i.p.setGroupProperty(PropertyInterface("Position",a)),i.s.setGroupProperty(PropertyInterface("Size",a)),i.r.setGroupProperty(PropertyInterface("Rotation",a)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(i.p)},roundness:{get:ExpressionPropertyInterface(i.r)},size:{get:ExpressionPropertyInterface(i.s)},_name:{value:e.nm}}),n.mn=e.mn,n}function h(e,t,r){function n(t){return e.r.ix===t||"Round Corners 1"===t?n.radius:null}var a=propertyGroupFactory(n,r),i=t;return n.propertyIndex=e.ix,i.rd.setGroupProperty(PropertyInterface("Radius",a)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(i.rd)},_name:{value:e.nm}}),n.mn=e.mn,n}function p(e,t,r){function n(t){return e.c.ix===t||"Copies"===t?n.copies:e.o.ix===t||"Offset"===t?n.offset:null}var a=propertyGroupFactory(n,r),i=t;return n.propertyIndex=e.ix,i.c.setGroupProperty(PropertyInterface("Copies",a)),i.o.setGroupProperty(PropertyInterface("Offset",a)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(i.c)},offset:{get:ExpressionPropertyInterface(i.o)},_name:{value:e.nm}}),n.mn=e.mn,n}return function(t,r,n){var a;function i(e){if("number"==typeof e)return 0===(e=void 0===e?1:e)?n:a[e-1];for(var t=0,r=a.length;t<r;){if(a[t]._name===e)return a[t];t+=1}return null}return i.propertyGroup=propertyGroupFactory(i,(function(){return n})),a=e(t,r,i.propertyGroup),i.numProperties=a.length,i._name="Contents",i}}(),TextExpressionInterface=function(e){var t;function r(e){return"ADBE Text Document"===e?r.sourceText:null}return Object.defineProperty(r,"sourceText",{get:function(){e.textProperty.getValue();var r=e.textProperty.currentData.t;return t&&r===t.value||((t=new String(r)).value=r||new String(r),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),r};function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(e){return"Outline"===e?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(e){var t="",r=e.getFootageData();function n(e){if(r[e])return t=e,"object"===_typeof(r=r[e])?n:r;var a=e.indexOf(t);if(-1!==a){var i=parseInt(e.substr(a+t.length),10);return"object"===_typeof(r=r[i])?n:r}return""}return function(){return t="",r=e.getFootageData(),n}}(e),t},function(e){function t(e){return"Data"===e?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,r){t.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(e,t,r).bind(r)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),r=this.getValueAtTime(e+-.01),n=0;if(t.length){var a;for(a=0;a<t.length;a+=1)n+=Math.pow(r[a]-t[a],2);n=100*Math.sqrt(n)}else n=0;return n},getVelocityAtTime:function(e){if(void 0!==this.vel)return this.vel;var t,r,n=-.001,a=this.getValueAtTime(e),i=this.getValueAtTime(e+n);if(a.length)for(t=createTypedArray("float32",a.length),r=0;r<a.length;r+=1)t[r]=(i[r]-a[r])/n;else t=(i-a)/n;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(e,t,r){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():"";var n,a,i,s,o,l=this.comp.renderedFrame,c=this.keyframes,h=c[c.length-1].t;if(l<=h)return this.pv;if(r?a=h-(n=t?Math.abs(h-this.elem.comp.globalData.frameRate*t):Math.max(0,h-this.elem.data.ip)):((!t||t>c.length-1)&&(t=c.length-1),n=h-(a=c[c.length-1-t].t)),"pingpong"===e){if(Math.floor((l-a)/n)%2!=0)return this.getValueAtTime((n-(l-a)%n+a)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var p=this.getValueAtTime(a/this.comp.globalData.frameRate,0),d=this.getValueAtTime(h/this.comp.globalData.frameRate,0),f=this.getValueAtTime(((l-a)%n+a)/this.comp.globalData.frameRate,0),u=Math.floor((l-a)/n);if(this.pv.length){for(s=(o=new Array(p.length)).length,i=0;i<s;i+=1)o[i]=(d[i]-p[i])*u+f[i];return o}return(d-p)*u+f}if("continue"===e){var m=this.getValueAtTime(h/this.comp.globalData.frameRate,0),g=this.getValueAtTime((h-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(s=(o=new Array(m.length)).length,i=0;i<s;i+=1)o[i]=m[i]+(m[i]-g[i])*((l-h)/this.comp.globalData.frameRate)/5e-4;return o}return m+(l-h)/.001*(m-g)}}return this.getValueAtTime(((l-a)%n+a)/this.comp.globalData.frameRate,0)}function t(e,t,r){if(!this.k)return this.pv;e=e?e.toLowerCase():"";var n,a,i,s,o,l=this.comp.renderedFrame,c=this.keyframes,h=c[0].t;if(l>=h)return this.pv;if(r?a=h+(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-h)):((!t||t>c.length-1)&&(t=c.length-1),n=(a=c[t].t)-h),"pingpong"===e){if(Math.floor((h-l)/n)%2==0)return this.getValueAtTime(((h-l)%n+h)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var p=this.getValueAtTime(h/this.comp.globalData.frameRate,0),d=this.getValueAtTime(a/this.comp.globalData.frameRate,0),f=this.getValueAtTime((n-(h-l)%n+h)/this.comp.globalData.frameRate,0),u=Math.floor((h-l)/n)+1;if(this.pv.length){for(s=(o=new Array(p.length)).length,i=0;i<s;i+=1)o[i]=f[i]-(d[i]-p[i])*u;return o}return f-(d-p)*u}if("continue"===e){var m=this.getValueAtTime(h/this.comp.globalData.frameRate,0),g=this.getValueAtTime((h+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(s=(o=new Array(m.length)).length,i=0;i<s;i+=1)o[i]=m[i]+(m[i]-g[i])*(h-l)/.001;return o}return m+(m-g)*(h-l)/.001}}return this.getValueAtTime((n-((h-l)%n+h))/this.comp.globalData.frameRate,0)}function r(e,t){if(!this.k)return this.pv;if(e=.5*(e||.4),(t=Math.floor(t||5))<=1)return this.pv;var r,n,a=this.comp.renderedFrame/this.comp.globalData.frameRate,i=a-e,s=t>1?(a+e-i)/(t-1):1,o=0,l=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<t;){if(n=this.getValueAtTime(i+o*s),this.pv.length)for(l=0;l<this.pv.length;l+=1)r[l]+=n[l];else r+=n;o+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)r[l]/=t;else r/=t;return r}function n(e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(e);t.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var n=this.s.getValueAtTime(e);t.scale(n[0]*this.s.mult,n[1]*this.s.mult,n[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var a=this.sk.getValueAtTime(e),i=this.sa.getValueAtTime(e);t.skewFromAxis(-a*this.sk.mult,i*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var s=this.r.getValueAtTime(e);t.rotate(-s*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(e),l=this.ry.getValueAtTime(e),c=this.rx.getValueAtTime(e),h=this.or.getValueAtTime(e);t.rotateZ(-o*this.rz.mult).rotateY(l*this.ry.mult).rotateX(c*this.rx.mult).rotateZ(-h[2]*this.or.mult).rotateY(h[1]*this.or.mult).rotateX(h[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var p=this.px.getValueAtTime(e),d=this.py.getValueAtTime(e);if(this.data.p.z){var f=this.pz.getValueAtTime(e);t.translate(p*this.px.mult,d*this.py.mult,-f*this.pz.mult)}else t.translate(p*this.px.mult,d*this.py.mult,0)}else{var u=this.p.getValueAtTime(e);t.translate(u[0]*this.p.mult,u[1]*this.p.mult,-u[2]*this.p.mult)}return t}function a(){return this.v.clone(new Matrix)}var i=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,r){var s=i(e,t,r);return s.dynamicProperties.length?s.getValueAtTime=n.bind(s):s.getValueAtTime=a.bind(s),s.setGroupProperty=expressionHelpers.setGroupProperty,s};var s=PropertyFactory.getProp;PropertyFactory.getProp=function(n,a,i,o,l){var c=s(n,a,i,o,l);c.kf?c.getValueAtTime=expressionHelpers.getValueAtTime.bind(c):c.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(c),c.setGroupProperty=expressionHelpers.setGroupProperty,c.loopOut=e,c.loopIn=t,c.smooth=r,c.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(c),c.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(c),c.numKeys=1===a.a?a.k.length:0,c.propertyIndex=a.ix;var h=0;return 0!==i&&(h=createTypedArray("float32",1===a.a?a.k[0].s.length:a.k.length)),c._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:h},expressionHelpers.searchExpressions(n,a,c),c.k&&l.addDynamicProperty(c),c};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(e,t){this.k&&this.getValue();var r,n=this.v;void 0!==t&&(n=this.getValueAtTime(t,0));var a=n._length,i=n[e],s=n.v,o=createSizedArray(a);for(r=0;r<a;r+=1)o[r]="i"===e||"o"===e?[i[r][0]-s[r][0],i[r][1]-s[r][1]]:[i[r][0],i[r][1]];return o},points:function(e){return this.vertices("v",e)},inTangents:function(e){return this.vertices("i",e)},outTangents:function(e){return this.vertices("o",e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var r=this.v;void 0!==t&&(r=this.getValueAtTime(t,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var n,a=this._segmentsLength,i=a.lengths,s=a.totalLength*e,o=0,l=i.length,c=0;o<l;){if(c+i[o].addedLength>s){var h=o,p=r.c&&o===l-1?0:o+1,d=(s-c)/i[o].addedLength;n=bez.getPointInSegment(r.v[h],r.v[p],r.o[h],r.i[p],d,i[o]);break}c+=i[o].addedLength,o+=1}return n||(n=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),n},vectorOnPath:function(e,t,r){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),a=this.pointOnPath(e+.001,t),i=a[0]-n[0],s=a[1]-n[1],o=Math.sqrt(Math.pow(i,2)+Math.pow(s,2));return 0===o?[0,0]:"tangent"===r?[i/o,s/o]:[-s/o,i/o]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],o),extendPrototype([c],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var h=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,r,n,a){var i=h(e,t,r,n,a);return i.propertyIndex=t.ix,i.lock=!1,3===r?expressionHelpers.searchExpressions(e,t.pt,i):4===r&&expressionHelpers.searchExpressions(e,t.ks,i),i.k&&e.addDynamicProperty(i),i}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var r=this.calculateExpression(t);if(e.t!==r){var n={};return this.copyData(n,e),n.t=r.toString(),n.__complete=!1,n}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){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}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var r,n,a=createNS("feMerge");for(a.setAttribute("result",e),n=0;n<t.length;n+=1)(r=createNS("feMergeNode")).setAttribute("in",t[n]),a.appendChild(r),a.appendChild(r);return a}};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(e,t,r,n,a){this.filterManager=t;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=i,i.setAttribute("result",n+"_tint_1"),e.appendChild(i),(i=createNS("feColorMatrix")).setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result",n+"_tint_2"),e.appendChild(i),this.matrixFilter=i;var s=this.createMergeNode(n,[a,n+"_tint_1",n+"_tint_2"]);e.appendChild(s)}function SVGFillFilter(e,t,r,n){this.filterManager=t;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",n),e.appendChild(a),this.matrixFilter=a}function SVGStrokeEffect(e,t,r){this.initialized=!1,this.filterManager=t,this.elem=r,this.paths=[]}function SVGTritoneFilter(e,t,r,n){this.filterManager=t;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.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"),e.appendChild(a);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("result",n),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var o=createNS("feFuncG");o.setAttribute("type","table"),i.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),i.appendChild(l),this.feFuncB=l,e.appendChild(i)}function SVGProLevelsFilter(e,t,r,n){this.filterManager=t;var a=this.filterManager.effectElements,i=createNS("feComponentTransfer");(a[10].p.k||0!==a[10].p.v||a[11].p.k||1!==a[11].p.v||a[12].p.k||1!==a[12].p.v||a[13].p.k||0!==a[13].p.v||a[14].p.k||1!==a[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(a[17].p.k||0!==a[17].p.v||a[18].p.k||1!==a[18].p.v||a[19].p.k||1!==a[19].p.v||a[20].p.k||0!==a[20].p.v||a[21].p.k||1!==a[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(a[24].p.k||0!==a[24].p.v||a[25].p.k||1!==a[25].p.v||a[26].p.k||1!==a[26].p.v||a[27].p.k||0!==a[27].p.v||a[28].p.k||1!==a[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(a[31].p.k||0!==a[31].p.v||a[32].p.k||1!==a[32].p.v||a[33].p.k||1!==a[33].p.v||a[34].p.k||0!==a[34].p.v||a[35].p.k||1!==a[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(i)),(a[3].p.k||0!==a[3].p.v||a[4].p.k||1!==a[4].p.v||a[5].p.k||1!==a[5].p.v||a[6].p.k||0!==a[6].p.v||a[7].p.k||1!==a[7].p.v)&&((i=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("result",n),e.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(e,t,r,n,a){var i=t.container.globalData.renderConfig.filterSize,s=t.data.fs||i;e.setAttribute("x",s.x||i.x),e.setAttribute("y",s.y||i.y),e.setAttribute("width",s.width||i.width),e.setAttribute("height",s.height||i.height),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",n+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,e.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=c,e.appendChild(c);var h=createNS("feComposite");h.setAttribute("in",n+"_drop_shadow_3"),h.setAttribute("in2",n+"_drop_shadow_2"),h.setAttribute("operator","in"),h.setAttribute("result",n+"_drop_shadow_4"),e.appendChild(h);var p=this.createMergeNode(n,[n+"_drop_shadow_4",a]);e.appendChild(p)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",r[0]-t[0]+" 0 0 0 "+t[0]+" "+(r[1]-t[1])+" 0 0 0 "+t[1]+" "+(r[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,r,n,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,r=0):n=1+(r=this.filterManager.effectElements[0].p.v-1),(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);r<n;r+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:r});if(3===this.filterManager.effectElements[10].p.v){var i=createNS("mask"),s=createElementID();i.setAttribute("id",s),i.setAttribute("mask-type","alpha"),i.appendChild(t),this.elem.globalData.defs.appendChild(i);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+s+")");a[0];)o.appendChild(a[0]);this.elem.layerElement.appendChild(o),this.masker=i,t.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var r,n,a=this.paths.length;for(t=0;t<a;t+=1)if(-1!==this.paths[t].m&&(r=this.elem.maskManager.viewData[this.paths[t].m],n=this.paths[t].p,(e||this.filterManager._mdf||r.prop._mdf)&&n.setAttribute("d",r.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var i;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var s=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=n.getTotalLength();i="0 0 0 "+l*s+" ";var c,h=l*(o-s),p=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,d=Math.floor(h/p);for(c=0;c<d;c+=1)i+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";i+="0 "+10*l+" 0 0"}else i="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;n.setAttribute("stroke-dasharray",i)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(e||this.filterManager.effectElements[3].p._mdf)){var f=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*f[0])+","+bmFloor(255*f[1])+","+bmFloor(255*f[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,a=n[0]+" "+r[0]+" "+t[0],i=n[1]+" "+r[1]+" "+t[1],s=n[2]+" "+r[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",i),this.feFuncB.setAttribute("tableValues",s)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var r=createNS(e);return r.setAttribute("type","table"),t.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(e,t,r,n,a){for(var i,s,o=0,l=Math.min(e,t),c=Math.max(e,t),h=Array.call(null,{length:256}),p=0,d=a-n,f=t-e;o<=256;)s=(i=o/256)<=l?f<0?a:n:i>=c?f<0?n:a:n+d*Math.pow((i-e)/f,1/r),h[p]=s,p+=1,o+=256/255;return h.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,a=r*Math.cos(n),i=r*Math.sin(n);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",i)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(e,t,r,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var a=createNS("feGaussianBlur");a.setAttribute("result",n),e.appendChild(a),this.feGaussianBlur=a}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t<r;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var r=e.layerElement.parentNode;if(r){for(var n,a=r.children,i=0,s=a.length;i<s&&a[i]!==e.layerElement;)i+=1;i<=s-2&&(n=a[i+1]);var o=createNS("use");o.setAttribute("href","#"+t),n?r.insertBefore(o,n):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var r=createElementID(),n=createNS("mask");n.setAttribute("id",t.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var a=e.globalData.defs;a.appendChild(n);var i=createNS("symbol");i.setAttribute("id",r),this.replaceInParent(t,r),i.appendChild(t.layerElement),a.appendChild(i);var s=createNS("use");s.setAttribute("href","#"+r),n.appendChild(s),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,r=0,n=t.length;r<n;)t[r]&&t[r].data.ind===e&&this.setElementAsMask(this.elem,t[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=3==r?0:t,a=2==r?0:t;this.feGaussianBlur.setAttribute("stdDeviation",n+" "+a);var i=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",i)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,r=t[0].p.v,n=t[1].p.v,a=1===t[2].p.v,i=t[3].p.v,s=a?i:t[4].p.v,o=t[5].p.v,l=t[6].p.v,c=t[7].p.v;this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(.01*s,.01*i,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-o*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),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},module.exports=factory())}(lottie$2,lottie$2.exports)),lottie$2.exports}var lottieExports=requireLottie(),lottie=getDefaultExportFromCjs(lottieExports);const qontoLottiePlayerStyles=i$4`
173
+ */const e$1=()=>new h$1;let h$1=class{};const o$2=new WeakMap,n$1=e$2(class extends f{render(e){return E}update(e,[t]){const r=t!==this.G;return r&&void 0!==this.G&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),E}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let r=o$2.get(t);void 0===r&&(r=new WeakMap,o$2.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ht,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?o$2.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lottie$2={exports:{}},lottie$1=lottie$2.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){var factory;"undefined"!=typeof document&&"undefined"!=typeof navigator&&(factory=function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var r,n,a=e.length;for(r=0;r<a;r+=1)for(var i in n=e[r].prototype)Object.prototype.hasOwnProperty.call(n,i)&&(t.prototype[i]=n[i])}function getDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)}function createProxyFunction(e){function t(){}return t.prototype=e,t}var audioControllerFactory=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,r=this.audios.length;for(t=0;t<r;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1))}},function(){return new e}}(),createTypedArray=function(){function e(e,t){var r,n=0,a=[];switch(e){case"int16":case"uint8c":r=1;break;default:r=1.1}for(n=0;n<t;n+=1)a.push(r);return a}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(t,r){return"float32"===t?new Float32Array(r):"int16"===t?new Int16Array(r):"uint8c"===t?new Uint8ClampedArray(r):e(t,r)}:e}();function createSizedArray(e){return Array.apply(null,{length:e})}function _typeof$6(e){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$6(e)}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 e,t=["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"],r=t.length;for(e=0;e<r;e+=1)BMMath[t[e]]=Math[t[e]]}(),BMMath.random=Math.random,BMMath.abs=function(e){if("object"===_typeof$6(e)&&e.length){var t,r=createSizedArray(e.length),n=e.length;for(t=0;t<n;t+=1)r[t]=Math.abs(e[t]);return r}return Math.abs(e)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(e){e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.display="block",e.style.transformOrigin="0 0",e.style.webkitTransformOrigin="0 0",e.style.backfaceVisibility="visible",e.style.webkitBackfaceVisibility="visible",e.style.transformStyle="preserve-3d",e.style.webkitTransformStyle="preserve-3d",e.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(e,t,r,n){this.type=e,this.currentTime=t,this.totalTime=r,this.direction=n<0?-1:1}function BMCompleteEvent(e,t){this.type=e,this.direction=t<0?-1:1}function BMCompleteLoopEvent(e,t,r,n){this.type=e,this.currentLoop=r,this.totalLoops=t,this.direction=n<0?-1:1}function BMSegmentStartEvent(e,t,r){this.type=e,this.firstFrame=t,this.totalFrames=r}function BMDestroyEvent(e,t){this.type=e,this.target=t}function BMRenderFrameErrorEvent(e,t){this.type="renderFrameError",this.nativeError=e,this.currentTime=t}function BMConfigErrorEvent(e){this.type="configError",this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(e,t,r){var n,a,i,s,o,l,c,h;switch(l=r*(1-t),c=r*(1-(o=6*e-(s=Math.floor(6*e)))*t),h=r*(1-(1-o)*t),s%6){case 0:n=r,a=h,i=l;break;case 1:n=c,a=r,i=l;break;case 2:n=l,a=r,i=h;break;case 3:n=l,a=c,i=r;break;case 4:n=h,a=l,i=r;break;case 5:n=r,a=l,i=c}return[n,a,i]}function RGBtoHSV(e,t,r){var n,a=Math.max(e,t,r),i=Math.min(e,t,r),s=a-i,o=0===a?0:s/a,l=a/255;switch(a){case i:n=0;break;case e:n=t-r+s*(t<r?6:0),n/=6*s;break;case t:n=r-e+2*s,n/=6*s;break;case r:n=e-t+4*s,n/=6*s}return[n,o,l]}function addSaturationToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[1]+=t,r[1]>1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[2]+=t,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(e,t){var r=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return r[0]+=t/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var e,t,r=[];for(e=0;e<256;e+=1)t=e.toString(16),r[e]=1===t.length?"0"+t:t;return function(e,t,n){return e<0&&(e=0),t<0&&(t=0),n<0&&(n=0),"#"+r[e]+r[t]+r[n]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}function _typeof$5(e){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$5(e)}var dataManager=function(){var e,t,r=1,n=[],a={onmessage:function(){},postMessage:function(t){e({data:t})}},i={postMessage:function(e){a.onmessage({data:e})}};function s(){t||(t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var r=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),n=URL.createObjectURL(r);return new Worker(n)}return e=t,a}((function(e){if(i.dataManager||(i.dataManager=function(){function e(a,i){var s,o,l,c,h,d,u=a.length;for(o=0;o<u;o+=1)if("ks"in(s=a[o])&&!s.completed){if(s.completed=!0,s.hasMask){var f=s.masksProperties;for(c=f.length,l=0;l<c;l+=1)if(f[l].pt.k.i)n(f[l].pt.k);else for(d=f[l].pt.k.length,h=0;h<d;h+=1)f[l].pt.k[h].s&&n(f[l].pt.k[h].s[0]),f[l].pt.k[h].e&&n(f[l].pt.k[h].e[0])}0===s.ty?(s.layers=t(s.refId,i),e(s.layers,i)):4===s.ty?r(s.shapes):5===s.ty&&p(s)}}function t(e,t){var r=function(e,t){for(var r=0,n=t.length;r<n;){if(t[r].id===e)return t[r];r+=1}return null}(e,t);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function r(e){var t,a,i;for(t=e.length-1;t>=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)n(e[t].ks.k);else for(i=e[t].ks.k.length,a=0;a<i;a+=1)e[t].ks.k[a].s&&n(e[t].ks.k[a].s[0]),e[t].ks.k[a].e&&n(e[t].ks.k[a].e[0]);else"gr"===e[t].ty&&r(e[t].it)}function n(e){var t,r=e.i.length;for(t=0;t<r;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function a(e,t){var r=t?t.split("."):[100,100,100];return e[0]>r[0]||!(r[0]>e[0])&&(e[1]>r[1]||!(r[1]>e[1])&&(e[2]>r[2]||!(r[2]>e[2])&&null))}var i,s=function(){var e=[4,4,14];function t(e){var t,r,n,a=e.length;for(t=0;t<a;t+=1)5===e[t].ty&&(n=void 0,n=(r=e[t]).t.d,r.t.d={k:[{s:n,t:0}]})}return function(r){if(a(e,r.v)&&(t(r.layers),r.assets)){var n,i=r.assets.length;for(n=0;n<i;n+=1)r.assets[n].layers&&t(r.assets[n].layers)}}}(),o=(i=[4,7,99],function(e){if(e.chars&&!a(i,e.v)){var t,n=e.chars.length;for(t=0;t<n;t+=1){var s=e.chars[t];s.data&&s.data.shapes&&(r(s.data.shapes),s.data.ip=0,s.data.op=99999,s.data.st=0,s.data.sr=1,s.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}},e.chars[t].t||(s.data.shapes.push({ty:"no"}),s.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var e=[5,7,15];function t(e){var t,r,n=e.length;for(t=0;t<n;t+=1)5===e[t].ty&&(r=void 0,"number"==typeof(r=e[t].t.p).a&&(r.a={a:0,k:r.a}),"number"==typeof r.p&&(r.p={a:0,k:r.p}),"number"==typeof r.r&&(r.r={a:0,k:r.r}))}return function(r){if(a(e,r.v)&&(t(r.layers),r.assets)){var n,i=r.assets.length;for(n=0;n<i;n+=1)r.assets[n].layers&&t(r.assets[n].layers)}}}(),c=function(){var e=[4,1,9];function t(e){var r,n,a,i=e.length;for(r=0;r<i;r+=1)if("gr"===e[r].ty)t(e[r].it);else if("fl"===e[r].ty||"st"===e[r].ty)if(e[r].c.k&&e[r].c.k[0].i)for(a=e[r].c.k.length,n=0;n<a;n+=1)e[r].c.k[n].s&&(e[r].c.k[n].s[0]/=255,e[r].c.k[n].s[1]/=255,e[r].c.k[n].s[2]/=255,e[r].c.k[n].s[3]/=255),e[r].c.k[n].e&&(e[r].c.k[n].e[0]/=255,e[r].c.k[n].e[1]/=255,e[r].c.k[n].e[2]/=255,e[r].c.k[n].e[3]/=255);else e[r].c.k[0]/=255,e[r].c.k[1]/=255,e[r].c.k[2]/=255,e[r].c.k[3]/=255}function r(e){var r,n=e.length;for(r=0;r<n;r+=1)4===e[r].ty&&t(e[r].shapes)}return function(t){if(a(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}(),h=function(){var e=[4,4,18];function t(e){var r,n,a;for(r=e.length-1;r>=0;r-=1)if("sh"===e[r].ty)if(e[r].ks.k.i)e[r].ks.k.c=e[r].closed;else for(a=e[r].ks.k.length,n=0;n<a;n+=1)e[r].ks.k[n].s&&(e[r].ks.k[n].s[0].c=e[r].closed),e[r].ks.k[n].e&&(e[r].ks.k[n].e[0].c=e[r].closed);else"gr"===e[r].ty&&t(e[r].it)}function r(e){var r,n,a,i,s,o,l=e.length;for(n=0;n<l;n+=1){if((r=e[n]).hasMask){var c=r.masksProperties;for(i=c.length,a=0;a<i;a+=1)if(c[a].pt.k.i)c[a].pt.k.c=c[a].cl;else for(o=c[a].pt.k.length,s=0;s<o;s+=1)c[a].pt.k[s].s&&(c[a].pt.k[s].s[0].c=c[a].cl),c[a].pt.k[s].e&&(c[a].pt.k[s].e[0].c=c[a].cl)}4===r.ty&&t(r.shapes)}}return function(t){if(a(e,t.v)&&(r(t.layers),t.assets)){var n,i=t.assets.length;for(n=0;n<i;n+=1)t.assets[n].layers&&r(t.assets[n].layers)}}}();function p(e){0===e.t.a.length&&e.t.p}var d={completeData:function(r){r.__complete||(c(r),s(r),o(r),l(r),h(r),e(r.layers,r.assets),function(r,n){if(r){var a=0,i=r.length;for(a=0;a<i;a+=1)1===r[a].t&&(r[a].data.layers=t(r[a].data.refId,n),e(r[a].data.layers,n))}}(r.chars,r.assets),r.__complete=!0)}};return d.checkColors=c,d.checkChars=o,d.checkPathProperties=l,d.checkShapes=h,d.completeLayers=e,d}()),i.assetLoader||(i.assetLoader=function(){function e(e){var t=e.getResponseHeader("content-type");return t&&"json"===e.responseType&&-1!==t.indexOf("json")||e.response&&"object"===_typeof$5(e.response)?e.response:e.response&&"string"==typeof e.response?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}return{load:function(t,r,n,a){var i,s=new XMLHttpRequest;try{s.responseType="json"}catch(e){}s.onreadystatechange=function(){if(4===s.readyState)if(200===s.status)i=e(s),n(i);else try{i=e(s),n(i)}catch(e){a&&a(e)}};try{s.open(["G","E","T"].join(""),t,!0)}catch(e){s.open(["G","E","T"].join(""),r+"/"+t,!0)}s.send()}}}()),"loadAnimation"===e.data.type)i.assetLoader.load(e.data.path,e.data.fullPath,(function(t){i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})}),(function(){i.postMessage({id:e.data.id,status:"error"})}));else if("complete"===e.data.type){var t=e.data.animation;i.dataManager.completeData(t),i.postMessage({id:e.data.id,payload:t,status:"success"})}else"loadData"===e.data.type&&i.assetLoader.load(e.data.path,e.data.fullPath,(function(t){i.postMessage({id:e.data.id,payload:t,status:"success"})}),(function(){i.postMessage({id:e.data.id,status:"error"})}))})),t.onmessage=function(e){var t=e.data,r=t.id,a=n[r];n[r]=null,"success"===t.status?a.onComplete(t.payload):a.onError&&a.onError()})}function o(e,t){var a="processId_"+(r+=1);return n[a]={onComplete:e,onError:t},a}return{loadAnimation:function(e,r,n){s();var a=o(r,n);t.postMessage({type:"loadAnimation",path:e,fullPath:window.location.origin+window.location.pathname,id:a})},loadData:function(e,r,n){s();var a=o(r,n);t.postMessage({type:"loadData",path:e,fullPath:window.location.origin+window.location.pathname,id:a})},completeAnimation:function(e,r,n){s();var a=o(r,n);t.postMessage({type:"complete",animation:e,id:a})}}}(),ImagePreloader=function(){var e=function(){var e=createTag("canvas");e.width=1,e.height=1;var t=e.getContext("2d");return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(e,t,r){var n="";if(e.e)n=e.p;else if(t){var a=e.p;-1!==a.indexOf("images/")&&(a=a.split("/")[1]),n=t+a}else n=r,n+=e.u?e.u:"",n+=e.p;return n}function a(e){var t=0,r=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(r)),t+=1}.bind(this),50)}function i(e){var t={assetData:e},r=n(e,this.assetsPath,this.path);return dataManager.loadData(r,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function s(){this._imageLoaded=t.bind(this),this._footageLoaded=r.bind(this),this.testImageLoaded=a.bind(this),this.createFootageData=i.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return s.prototype={loadAssets:function(e,t){var r;this.imagesLoadedCb=t;var n=e.length;for(r=0;r<n;r+=1)e[r].layers||(e[r].t&&"seq"!==e[r].t?3===e[r].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[r]))):(this.totalImages+=1,this.images.push(this._createImageData(e[r]))))},setAssetsPath:function(e){this.assetsPath=e||""},setPath:function(e){this.path=e||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(e){for(var t=0,r=this.images.length;t<r;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null},createImgData:function(t){var r=n(t,this.assetsPath,this.path),a=createTag("img");a.crossOrigin="anonymous",a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){i.img=e,this._imageLoaded()}.bind(this),!1),a.src=r;var i={img:a,assetData:t};return i},createImageData:function(t){var r=n(t,this.assetsPath,this.path),a=createNS("image");isSafari?this.testImageLoaded(a):a.addEventListener("load",this._imageLoaded,!1),a.addEventListener("error",function(){i.img=e,this._imageLoaded()}.bind(this),!1),a.setAttributeNS("http://www.w3.org/1999/xlink","href",r),this._elementHelper.append?this._elementHelper.append(a):this._elementHelper.appendChild(a);var i={img:a,assetData:t};return i},imageLoaded:t,footageLoaded:r,setCacheType:function(e,t){"svg"===e?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},s}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var r=this._cbs[e],n=0;n<r.length;n+=1)r[n](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(t){if(this._cbs[e]){for(var r=0,n=this._cbs[e].length;r<n;)this._cbs[e][r]===t&&(this._cbs[e].splice(r,1),r-=1,n-=1),r+=1;this._cbs[e].length||(this._cbs[e]=null)}}else this._cbs[e]=null}};var markerParser=function(){function e(e){for(var t,r=e.split("\r\n"),n={},a=0,i=0;i<r.length;i+=1)2===(t=r[i].split(":")).length&&(n[t[0]]=t[1].trim(),a+=1);if(0===a)throw new Error;return n}return function(t){for(var r=[],n=0;n<t.length;n+=1){var a=t[n],i={time:a.tm,duration:a.dr};try{i.payload=JSON.parse(t[n].cm)}catch(r){try{i.payload=e(t[n].cm)}catch(e){i.payload={name:t[n].cm}}}r.push(i)}return r}}(),ProjectInterface=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,r=this.compositions.length;t<r;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),renderers={},registerRenderer=function(e,t){renderers[e]=t};function getRenderer(e){return renderers[e]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var e in renderers)if(renderers[e])return e;return""}function _typeof$4(e){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$4(e)}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(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);var r=getRenderer(t);this.renderer=new r(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!==_typeof$4(t)&&(t=JSON.parse(t));var r={wrapper:e,animationData:t},n=e.attributes;r.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",r.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var a=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===a?r.loop=!1:"true"===a?r.loop=!0:""!==a&&(r.loop=parseInt(a,10));var i=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:!n.getNamedItem("bm-autoplay")||n.getNamedItem("bm-autoplay").value;r.autoplay="false"!==i,r.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"","false"===(n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"")&&(r.prerender=!1),r.path?this.setParams(r):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,r,n=this.animationData.layers,a=n.length,i=e.layers,s=i.length;for(r=0;r<s;r+=1)for(t=0;t<a;){if(n[t].id===i[r].id){n[t]=i[r];break}t+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(a=e.assets.length,t=0;t<a;t+=1)this.animationData.assets.push(e.assets[t]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(e){this.animationData=e;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||0===e.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var t=e.shift();this.timeCompleted=t.time*this.frameRate;var r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(r,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(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(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||(e.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=markerParser(e.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},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()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(e,t){var r="number"==typeof e?e:void 0,n="number"==typeof t?t:void 0;this.renderer.updateContainerSize(r,n)},AnimationItem.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},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(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,r=0;r<this.markers.length;r+=1)if((t=this.markers[r]).payload&&t.payload.name===e)return t;return null},AnimationItem.prototype.goToAndStop=function(e,t,r){if(!r||this.name===r){var n=Number(e);if(isNaN(n)){var a=this.getMarkerData(e);a&&this.goToAndStop(a.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(e,t,r){if(!r||this.name===r){var n=Number(e);if(isNaN(n)){var a=this.getMarkerData(e);a&&(a.duration?this.playSegments([a.time,a.time+a.duration],!0):this.goToAndStop(a.time,!0))}else this.goToAndStop(n,t,r);this.play()}},AnimationItem.prototype.advanceTime=function(e){if(!0!==this.isPaused&&!1!==this.isLoaded){var t=this.currentRawFrame+e*this.frameModifier,r=!1;t>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(r=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(r=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),r&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var r=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?r=e:this.currentRawFrame+this.firstFrame>t&&(r=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==r&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"===_typeof$4(e[0])){var r,n=e.length;for(r=0;r<n;r+=1)this.segments.push(e[r])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(e){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),e),!0)},AnimationItem.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(e){this.loop=e},AnimationItem.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},AnimationItem.prototype.unmute=function(e){e&&this.name!==e||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(e){var t="";if(e.e)t=e.p;else if(this.assetsPath){var r=e.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),t=this.assetsPath+r}else t=this.path,t+=e.u?e.u:"",t+=e.p;return t},AnimationItem.prototype.getAssetData=function(e){for(var t=0,r=this.assets.length;t<r;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(e,t,r){try{this.renderer.getElementByPath(e).updateDocumentData(t,r)}catch(e){}},AnimationItem.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case"enterFrame":this.triggerEvent(e,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(e,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(e,new BMCompleteEvent(e,this.frameMult));break;case"segmentStart":this.triggerEvent(e,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(e,new BMDestroyEvent(e,this));break;default:this.triggerEvent(e)}"enterFrame"===e&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(e,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===e&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(e,this.loop,this.playCount,this.frameMult)),"complete"===e&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(e,this.frameMult)),"segmentStart"===e&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(e,this.firstFrame,this.totalFrames)),"destroy"===e&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(e,this))},AnimationItem.prototype.triggerRenderFrameError=function(e){var t=new BMRenderFrameErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)},AnimationItem.prototype.triggerConfigError=function(e){var t=new BMConfigErrorEvent(e,this.currentFrame);this.triggerEvent("error",t),this.onError&&this.onError.call(this,t)};var animationManager=function(){var e={},t=[],r=0,n=0,a=0,i=!0,s=!1;function o(e){for(var r=0,a=e.target;r<n;)t[r].animation===a&&(t.splice(r,1),r-=1,n-=1,a.isPaused||h()),r+=1}function l(e,r){if(!e)return null;for(var a=0;a<n;){if(t[a].elem===e&&null!==t[a].elem)return t[a].animation;a+=1}var i=new AnimationItem;return p(i,e),i.setData(e,r),i}function c(){a+=1,f()}function h(){a-=1}function p(e,r){e.addEventListener("destroy",o),e.addEventListener("_active",c),e.addEventListener("_idle",h),t.push({elem:r,animation:e}),n+=1}function d(e){var o,l=e-r;for(o=0;o<n;o+=1)t[o].animation.advanceTime(l);r=e,a&&!s?window.requestAnimationFrame(d):i=!0}function u(e){r=e,window.requestAnimationFrame(d)}function f(){!s&&a&&i&&(window.requestAnimationFrame(u),i=!1)}return e.registerAnimation=l,e.loadAnimation=function(e){var t=new AnimationItem;return p(t,null),t.setParams(e),t},e.setSpeed=function(e,r){var a;for(a=0;a<n;a+=1)t[a].animation.setSpeed(e,r)},e.setDirection=function(e,r){var a;for(a=0;a<n;a+=1)t[a].animation.setDirection(e,r)},e.play=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.play(e)},e.pause=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.pause(e)},e.stop=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.stop(e)},e.togglePause=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.togglePause(e)},e.searchAnimations=function(e,t,r){var n,a=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),i=a.length;for(n=0;n<i;n+=1)r&&a[n].setAttribute("data-bm-type",r),l(a[n],e);if(t&&0===i){r||(r="svg");var s=document.getElementsByTagName("body")[0];s.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",r),s.appendChild(o),l(o,e)}},e.resize=function(){var e;for(e=0;e<n;e+=1)t[e].animation.resize()},e.goToAndStop=function(e,r,a){var i;for(i=0;i<n;i+=1)t[i].animation.goToAndStop(e,r,a)},e.destroy=function(e){var r;for(r=n-1;r>=0;r-=1)t[r].animation.destroy(e)},e.freeze=function(){s=!0},e.unfreeze=function(){s=!1,f()},e.setVolume=function(e,r){var a;for(a=0;a<n;a+=1)t[a].animation.setVolume(e,r)},e.mute=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.mute(e)},e.unmute=function(e){var r;for(r=0;r<n;r+=1)t[r].animation.unmute(e)},e.getRegisteredAnimations=function(){var e,r=t.length,n=[];for(e=0;e<r;e+=1)n.push(t[e].animation);return n},e}(),BezierFactory=function(){var e={getBezierEasing:function(e,r,n,a,i){var s=i||("bez_"+e+"_"+r+"_"+n+"_"+a).replace(/\./g,"p");if(t[s])return t[s];var o=new h([e,r,n,a]);return t[s]=o,o}},t={},r=11,n=1/(r-1),a="function"==typeof Float32Array;function i(e,t){return 1-3*t+3*e}function s(e,t){return 3*t-6*e}function o(e){return 3*e}function l(e,t,r){return((i(t,r)*e+s(t,r))*e+o(t))*e}function c(e,t,r){return 3*i(t,r)*e*e+2*s(t,r)*e+o(t)}function h(e){this._p=e,this._mSampleValues=a?new Float32Array(r):new Array(r),this._precomputed=!1,this.get=this.get.bind(this)}return h.prototype={get:function(e){var t=this._p[0],r=this._p[1],n=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),t===r&&n===a?e:0===e?0:1===e?1:l(this._getTForX(e),r,a)},_precompute:function(){var e=this._p[0],t=this._p[1],r=this._p[2],n=this._p[3];this._precomputed=!0,e===t&&r===n||this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],a=0;a<r;++a)this._mSampleValues[a]=l(a*n,e,t)},_getTForX:function(e){for(var t=this._p[0],a=this._p[2],i=this._mSampleValues,s=0,o=1,h=r-1;o!==h&&i[o]<=e;++o)s+=n;var p=s+(e-i[--o])/(i[o+1]-i[o])*n,d=c(p,t,a);return d>=.001?function(e,t,r,n){for(var a=0;a<4;++a){var i=c(t,r,n);if(0===i)return t;t-=(l(t,r,n)-e)/i}return t}(e,p,t,a):0===d?p:function(e,t,r,n,a){var i,s,o=0;do{(i=l(s=t+(r-t)/2,n,a)-e)>0?r=s:t=s}while(Math.abs(i)>1e-7&&++o<10);return s}(e,s,s+n,t,a)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,r){var n=0,a=e,i=createSizedArray(a);return{newElement:function(){return n?i[n-=1]:t()},release:function(e){n===a&&(i=pooling.double(i),a*=2),r&&r(e),i[n]=e,n+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(e){var t,r=e.lengths.length;for(t=0;t<r;t+=1)bezierLengthPool.release(e.lengths[t]);e.lengths.length=0}));function bezFunction(){var e=Math;function t(e,t,r,n,a,i){var s=e*n+t*a+r*i-a*n-i*e-r*t;return s>-.001&&s<.001}var r=function(e,t,r,n){var a,i,s,o,l,c,h=getDefaultCurveSegments(),p=0,d=[],u=[],f=bezierLengthPool.newElement();for(s=r.length,a=0;a<h;a+=1){for(l=a/(h-1),c=0,i=0;i<s;i+=1)o=bmPow(1-l,3)*e[i]+3*bmPow(1-l,2)*l*r[i]+3*(1-l)*bmPow(l,2)*n[i]+bmPow(l,3)*t[i],d[i]=o,null!==u[i]&&(c+=bmPow(d[i]-u[i],2)),u[i]=d[i];c&&(p+=c=bmSqrt(c)),f.percents[a]=l,f.lengths[a]=p}return f.addedLength=p,f};function n(e){this.segmentLength=0,this.points=new Array(e)}function a(e,t){this.partialLength=e,this.point=t}var i,s=(i={},function(e,r,s,o){var l=(e[0]+"_"+e[1]+"_"+r[0]+"_"+r[1]+"_"+s[0]+"_"+s[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!i[l]){var c,h,p,d,u,f,m,g=getDefaultCurveSegments(),y=0,v=null;2===e.length&&(e[0]!==r[0]||e[1]!==r[1])&&t(e[0],e[1],r[0],r[1],e[0]+s[0],e[1]+s[1])&&t(e[0],e[1],r[0],r[1],r[0]+o[0],r[1]+o[1])&&(g=2);var b=new n(g);for(p=s.length,c=0;c<g;c+=1){for(m=createSizedArray(p),u=c/(g-1),f=0,h=0;h<p;h+=1)d=bmPow(1-u,3)*e[h]+3*bmPow(1-u,2)*u*(e[h]+s[h])+3*(1-u)*bmPow(u,2)*(r[h]+o[h])+bmPow(u,3)*r[h],m[h]=d,null!==v&&(f+=bmPow(m[h]-v[h],2));y+=f=bmSqrt(f),b.points[c]=new a(f,m),v=m}b.segmentLength=y,i[l]=b}return i[l]});function o(e,t){var r=t.percents,n=t.lengths,a=r.length,i=bmFloor((a-1)*e),s=e*t.addedLength,o=0;if(i===a-1||0===i||s===n[i])return r[i];for(var l=n[i]>s?-1:1,c=!0;c;)if(n[i]<=s&&n[i+1]>s?(o=(s-n[i])/(n[i+1]-n[i]),c=!1):i+=l,i<0||i>=a-1){if(i===a-1)return r[i];c=!1}return r[i]+(r[i+1]-r[i])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,n=segmentsLengthPool.newElement(),a=e.c,i=e.v,s=e.o,o=e.i,l=e._length,c=n.lengths,h=0;for(t=0;t<l-1;t+=1)c[t]=r(i[t],i[t+1],s[t],o[t+1]),h+=c[t].addedLength;return a&&l&&(c[t]=r(i[t],i[0],s[t],o[0]),h+=c[t].addedLength),n.totalLength=h,n},getNewSegment:function(t,r,n,a,i,s,c){i<0?i=0:i>1&&(i=1);var h,p=o(i,c),d=o(s=s>1?1:s,c),u=t.length,f=1-p,m=1-d,g=f*f*f,y=p*f*f*3,v=p*p*f*3,b=p*p*p,E=f*f*m,S=p*f*m+f*p*m+f*f*d,_=p*p*m+f*p*d+p*f*d,T=p*p*d,k=f*m*m,x=p*m*m+f*d*m+f*m*d,P=p*d*m+f*d*d+p*m*d,A=p*d*d,C=m*m*m,I=d*m*m+m*d*m+m*m*d,w=d*d*m+m*d*d+d*m*d,D=d*d*d;for(h=0;h<u;h+=1)l[4*h]=e.round(1e3*(g*t[h]+y*n[h]+v*a[h]+b*r[h]))/1e3,l[4*h+1]=e.round(1e3*(E*t[h]+S*n[h]+_*a[h]+T*r[h]))/1e3,l[4*h+2]=e.round(1e3*(k*t[h]+x*n[h]+P*a[h]+A*r[h]))/1e3,l[4*h+3]=e.round(1e3*(C*t[h]+I*n[h]+w*a[h]+D*r[h]))/1e3;return l},getPointInSegment:function(t,r,n,a,i,s){var l=o(i,s),c=1-l;return[e.round(1e3*(c*c*c*t[0]+(l*c*c+c*l*c+c*c*l)*n[0]+(l*l*c+c*l*l+l*c*l)*a[0]+l*l*l*r[0]))/1e3,e.round(1e3*(c*c*c*t[1]+(l*c*c+c*l*c+c*c*l)*n[1]+(l*l*c+c*l*l+l*c*l)*a[1]+l*l*l*r[1]))/1e3]},buildBezierData:s,pointOnLine2D:t,pointOnLine3D:function(r,n,a,i,s,o,l,c,h){if(0===a&&0===o&&0===h)return t(r,n,i,s,l,c);var p,d=e.sqrt(e.pow(i-r,2)+e.pow(s-n,2)+e.pow(o-a,2)),u=e.sqrt(e.pow(l-r,2)+e.pow(c-n,2)+e.pow(h-a,2)),f=e.sqrt(e.pow(l-i,2)+e.pow(c-s,2)+e.pow(h-o,2));return(p=d>u?d>f?d-u-f:f-u-d:f>u?f-u-d:u-d-f)>-1e-4&&p<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(e,t){var r,n=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,i,s,o,l,c,h,p,d,u=t.lastIndex,f=u,m=this.keyframes.length-1,g=!0;g;){if(a=this.keyframes[f],i=this.keyframes[f+1],f===m-1&&e>=i.t-n){a.h&&(a=i),u=0;break}if(i.t-n>e){u=f;break}f<m-1?f+=1:(u=0,g=!1)}s=this.keyframesMetadata[f]||{};var y,v=i.t-n,b=a.t-n;if(a.to){s.bezierData||(s.bezierData=bez.buildBezierData(a.s,i.s||a.e,a.to,a.ti));var E=s.bezierData;if(e>=v||e<b){var S=e>=v?E.points.length-1:0;for(l=E.points[S].point.length,o=0;o<l;o+=1)r[o]=E.points[S].point[o]}else{s.__fnct?d=s.__fnct:(d=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,s.__fnct=d),c=d((e-b)/(v-b));var _,T=E.segmentLength*c,k=t.lastFrame<e&&t._lastKeyframeIndex===f?t._lastAddedLength:0;for(p=t.lastFrame<e&&t._lastKeyframeIndex===f?t._lastPoint:0,g=!0,h=E.points.length;g;){if(k+=E.points[p].partialLength,0===T||0===c||p===E.points.length-1){for(l=E.points[p].point.length,o=0;o<l;o+=1)r[o]=E.points[p].point[o];break}if(T>=k&&T<k+E.points[p+1].partialLength){for(_=(T-k)/E.points[p+1].partialLength,l=E.points[p].point.length,o=0;o<l;o+=1)r[o]=E.points[p].point[o]+(E.points[p+1].point[o]-E.points[p].point[o])*_;break}p<h-1?p+=1:g=!1}t._lastPoint=p,t._lastAddedLength=k-E.points[p].partialLength,t._lastKeyframeIndex=f}}else{var x,P,A,C,I;if(m=a.s.length,y=i.s||a.e,this.sh&&1!==a.h)e>=v?(r[0]=y[0],r[1]=y[1],r[2]=y[2]):e<=b?(r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2]):quaternionToEuler(r,slerp(createQuaternion(a.s),createQuaternion(y),(e-b)/(v-b)));else for(f=0;f<m;f+=1)1!==a.h&&(e>=v?c=1:e<b?c=0:(a.o.x.constructor===Array?(s.__fnct||(s.__fnct=[]),s.__fnct[f]?d=s.__fnct[f]:(x=void 0===a.o.x[f]?a.o.x[0]:a.o.x[f],P=void 0===a.o.y[f]?a.o.y[0]:a.o.y[f],A=void 0===a.i.x[f]?a.i.x[0]:a.i.x[f],C=void 0===a.i.y[f]?a.i.y[0]:a.i.y[f],d=BezierFactory.getBezierEasing(x,P,A,C).get,s.__fnct[f]=d)):s.__fnct?d=s.__fnct:(x=a.o.x,P=a.o.y,A=a.i.x,C=a.i.y,d=BezierFactory.getBezierEasing(x,P,A,C).get,a.keyframeMetadata=d),c=d((e-b)/(v-b)))),y=i.s||a.e,I=1===a.h?a.s[f]:a.s[f]+(y[f]-a.s[f])*c,"multidimensional"===this.propType?r[f]=I:r=I}return t.lastIndex=u,r}function slerp(e,t,r){var n,a,i,s,o,l=[],c=e[0],h=e[1],p=e[2],d=e[3],u=t[0],f=t[1],m=t[2],g=t[3];return(a=c*u+h*f+p*m+d*g)<0&&(a=-a,u=-u,f=-f,m=-m,g=-g),1-a>1e-6?(n=Math.acos(a),i=Math.sin(n),s=Math.sin((1-r)*n)/i,o=Math.sin(r*n)/i):(s=1-r,o=r),l[0]=s*c+o*u,l[1]=s*h+o*f,l[2]=s*p+o*m,l[3]=s*d+o*g,l}function quaternionToEuler(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],s=Math.atan2(2*n*i-2*r*a,1-2*n*n-2*a*a),o=Math.asin(2*r*n+2*a*i),l=Math.atan2(2*r*i-2*n*a,1-2*r*r-2*a*a);e[0]=s/degToRads,e[1]=o/degToRads,e[2]=l/degToRads}function createQuaternion(e){var t=e[0]*degToRads,r=e[1]*degToRads,n=e[2]*degToRads,a=Math.cos(t/2),i=Math.cos(r/2),s=Math.cos(n/2),o=Math.sin(t/2),l=Math.sin(r/2),c=Math.sin(n/2);return[o*l*s+a*i*c,o*i*s+a*l*c,a*l*s-o*i*c,a*i*s-o*l*c]}function getValueAtCurrentTime(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&e>=r||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(e,this._caching);this.pv=n}return this._caching.lastFrame=e,this.pv}function setVValue(e){var t;if("unidimensional"===this.propType)t=e*this.mult,mathAbs(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var r=0,n=this.v.length;r<n;)t=e[r]*this.mult,mathAbs(this.v[r]-t)>1e-5&&(this.v[r]=t,this._mdf=!0),r+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)r=this.effectsSequence[e](r);this.setVValue(r),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function ValueProperty(e,t,r,n){this.propType="unidimensional",this.mult=r||1,this.data=t,this.v=r?t.k*r:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.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(e,t,r,n){var a;this.propType="multidimensional",this.mult=r||1,this.data=t,this._mdf=!1,this.elem=e,this.container=n,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i=t.k.length;for(this.v=createTypedArray("float32",i),this.pv=createTypedArray("float32",i),this.vel=createTypedArray("float32",i),a=0;a<i;a+=1)this.v[a]=t.k[a]*this.mult,this.pv[a]=t.k[a];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(e,t,r,n){this.propType="unidimensional",this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.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(e,t,r,n){var a;this.propType="multidimensional";var i,s,o,l,c=t.k.length;for(a=0;a<c-1;a+=1)t.k[a].to&&t.k[a].s&&t.k[a+1]&&t.k[a+1].s&&(i=t.k[a].s,s=t.k[a+1].s,o=t.k[a].to,l=t.k[a].ti,(2===i.length&&(i[0]!==s[0]||i[1]!==s[1])&&bez.pointOnLine2D(i[0],i[1],s[0],s[1],i[0]+o[0],i[1]+o[1])&&bez.pointOnLine2D(i[0],i[1],s[0],s[1],s[0]+l[0],s[1]+l[1])||3===i.length&&(i[0]!==s[0]||i[1]!==s[1]||i[2]!==s[2])&&bez.pointOnLine3D(i[0],i[1],i[2],s[0],s[1],s[2],i[0]+o[0],i[1]+o[1],i[2]+o[2])&&bez.pointOnLine3D(i[0],i[1],i[2],s[0],s[1],s[2],s[0]+l[0],s[1]+l[1],s[2]+l[2]))&&(t.k[a].to=null,t.k[a].ti=null),i[0]===s[0]&&i[1]===s[1]&&0===o[0]&&0===o[1]&&0===l[0]&&0===l[1]&&(2===i.length||i[2]===s[2]&&0===o[2]&&0===l[2])&&(t.k[a].to=null,t.k[a].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=r||1,this.elem=e,this.container=n,this.comp=e.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var h=t.k[0].s.length;for(this.v=createTypedArray("float32",h),this.pv=createTypedArray("float32",h),a=0;a<h;a+=1)this.v[a]=initFrame,this.pv[a]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",h)},this.addEffect=addEffect}var PropertyFactory=(ob={getProp:function(e,t,r,n,a){var i;if(t.sid&&(t=e.globalData.slotManager.getProp(t)),t.k.length)if("number"==typeof t.k[0])i=new MultiDimensionalProperty(e,t,n,a);else switch(r){case 0:i=new KeyframedValueProperty(e,t,n,a);break;case 1:i=new KeyframedMultidimensionalProperty(e,t,n,a)}else i=new ValueProperty(e,t,n,a);return i.effectsSequence.length&&a.addDynamicProperty(i),i}},ob),ob;function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var e;this._mdf=!1;var t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,(function(){return createTypedArray("float32",2)}));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(e,t){this.c=e,this.setLength(t);for(var r=0;r<t;)this.v[r]=pointPool.newElement(),this.o[r]=pointPool.newElement(),this.i[r]=pointPool.newElement(),r+=1},ShapePath.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},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(e,t,r,n,a){var i;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),r){case"v":i=this.v;break;case"i":i=this.i;break;case"o":i=this.o;break;default:i=[]}(!i[n]||i[n]&&!a)&&(i[n]=pointPool.newElement()),i[n][0]=e,i[n][1]=t},ShapePath.prototype.setTripleAt=function(e,t,r,n,a,i,s,o){this.setXYAt(e,t,"v",s,o),this.setXYAt(r,n,"o",s,o),this.setXYAt(a,i,"i",s,o)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,r=this.o,n=this.i,a=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],n[0][0],n[0][1],r[0][0],r[0][1],0,!1),a=1);var i,s=this._length-1,o=this._length;for(i=a;i<o;i+=1)e.setTripleAt(t[s][0],t[s][1],n[s][0],n[s][1],r[s][0],r[s][1],i,!1),s-=1;return e},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,(function(){return new ShapePath}),(function(e){var t,r=e._length;for(t=0;t<r;t+=1)pointPool.release(e.v[t]),pointPool.release(e.i[t]),pointPool.release(e.o[t]),e.v[t]=null,e.i[t]=null,e.o[t]=null;e._length=0,e.c=!1})),factory.clone=function(e){var t,r=factory.newElement(),n=void 0===e._length?e.v.length:e._length;for(r.setLength(n),r.c=e.c,t=0;t<n;t+=1)r.setTripleAt(e.v[t][0],e.v[t][1],e.o[t][0],e.o[t][1],e.i[t][0],e.i[t][1],t);return r},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)shapePool.release(this.shapes[e]);this._length=0};var shapeCollectionPool=function(){var e={newShapeCollection:function(){return t?n[t-=1]:new ShapeCollection},release:function(e){var a,i=e._length;for(a=0;a<i;a+=1)shapePool.release(e.shapes[a]);e._length=0,t===r&&(n=pooling.double(n),r*=2),n[t]=e,t+=1}},t=0,r=4,n=createSizedArray(r);return e}(),ShapePropertyFactory=function(){var e=-999999;function t(e,t,r){var n,a,i,s,o,l,c,h,p,d=r.lastIndex,u=this.keyframes;if(e<u[0].t-this.offsetTime)n=u[0].s[0],i=!0,d=0;else if(e>=u[u.length-1].t-this.offsetTime)n=u[u.length-1].s?u[u.length-1].s[0]:u[u.length-2].e[0],i=!0;else{for(var f,m,g,y=d,v=u.length-1,b=!0;b&&(f=u[y],!((m=u[y+1]).t-this.offsetTime>e));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},d=y,!(i=1===f.h)){if(e>=m.t-this.offsetTime)h=1;else if(e<f.t-this.offsetTime)h=0;else{var E;g.__fnct?E=g.__fnct:(E=BezierFactory.getBezierEasing(f.o.x,f.o.y,f.i.x,f.i.y).get,g.__fnct=E),h=E((e-(f.t-this.offsetTime))/(m.t-this.offsetTime-(f.t-this.offsetTime)))}a=m.s?m.s[0]:f.e[0]}n=f.s[0]}for(l=t._length,c=n.i[0].length,r.lastIndex=d,s=0;s<l;s+=1)for(o=0;o<c;o+=1)p=i?n.i[s][o]:n.i[s][o]+(a.i[s][o]-n.i[s][o])*h,t.i[s][o]=p,p=i?n.o[s][o]:n.o[s][o]+(a.o[s][o]-n.o[s][o])*h,t.o[s][o]=p,p=i?n.v[s][o]:n.v[s][o]+(a.v[s][o]-n.v[s][o])*h,t.v[s][o]=p}function r(){var t=this.comp.renderedFrame-this.offsetTime,r=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime,a=this._caching.lastFrame;return a!==e&&(a<r&&t<r||a>n&&t>n)||(this._caching.lastIndex=a<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function n(){this.paths=this.localShapeCollection}function a(e){(function(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var r,n=e._length;for(r=0;r<n;r+=1)if(e.v[r][0]!==t.v[r][0]||e.v[r][1]!==t.v[r][1]||e.o[r][0]!==t.o[r][0]||e.o[r][1]!==t.o[r][1]||e.i[r][0]!==t.i[r][0]||e.i[r][1]!==t.i[r][1])return!1;return!0})(this.v,e)||(this.v=shapePool.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function i(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e,t;this.lock=!0,this._mdf=!1,e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var r=this.effectsSequence.length;for(t=0;t<r;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function s(e,t,r){this.propType="shape",this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var a=3===r?t.pt.k:t.ks.k;this.v=shapePool.clone(a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function o(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function l(t,a,i){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===i?a.pt.k:a.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var s=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=n,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[r.bind(this)]}s.prototype.interpolateShape=t,s.prototype.getValue=i,s.prototype.setVValue=a,s.prototype.addEffect=o,l.prototype.getValue=i,l.prototype.interpolateShape=t,l.prototype.setVValue=a,l.prototype.addEffect=o;var c=function(){var e=roundCorner;function t(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],r=this.p.v[1],n=this.s.v[0]/2,a=this.s.v[1]/2,i=3!==this.d,s=this.v;s.v[0][0]=t,s.v[0][1]=r-a,s.v[1][0]=i?t+n:t-n,s.v[1][1]=r,s.v[2][0]=t,s.v[2][1]=r+a,s.v[3][0]=i?t-n:t+n,s.v[3][1]=r,s.i[0][0]=i?t-n*e:t+n*e,s.i[0][1]=r-a,s.i[1][0]=i?t+n:t-n,s.i[1][1]=r-a*e,s.i[2][0]=i?t+n*e:t-n*e,s.i[2][1]=r+a,s.i[3][0]=i?t-n:t+n,s.i[3][1]=r+a*e,s.o[0][0]=i?t+n*e:t-n*e,s.o[0][1]=r-a,s.o[1][0]=i?t+n:t-n,s.o[1][1]=r+a*e,s.o[2][0]=i?t-n*e:t+n*e,s.o[2][1]=r+a,s.o[3][0]=i?t-n:t+n,s.o[3][1]=r-a*e}},extendPrototype([DynamicPropertyContainer],t),t}(),h=function(){function e(e,t){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),1===t.sy?(this.ir=PropertyFactory.getProp(e,t.ir,0,0,this),this.is=PropertyFactory.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(e,t.pt,0,0,this),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,degToRads,this),this.or=PropertyFactory.getProp(e,t.or,0,0,this),this.os=PropertyFactory.getProp(e,t.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 e.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e,t,r,n,a=2*Math.floor(this.pt.v),i=2*Math.PI/a,s=!0,o=this.or.v,l=this.ir.v,c=this.os.v,h=this.is.v,p=2*Math.PI*o/(2*a),d=2*Math.PI*l/(2*a),u=-Math.PI/2;u+=this.r.v;var f=3===this.data.d?-1:1;for(this.v._length=0,e=0;e<a;e+=1){r=s?c:h,n=s?p:d;var m=(t=s?o:l)*Math.cos(u),g=t*Math.sin(u),y=0===m&&0===g?0:g/Math.sqrt(m*m+g*g),v=0===m&&0===g?0:-m/Math.sqrt(m*m+g*g);m+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(m,g,m-y*n*r*f,g-v*n*r*f,m+y*n*r*f,g+v*n*r*f,e,!0),s=!s,u+=i*f}},convertPolygonToPath:function(){var e,t=Math.floor(this.pt.v),r=2*Math.PI/t,n=this.or.v,a=this.os.v,i=2*Math.PI*n/(4*t),s=.5*-Math.PI,o=3===this.data.d?-1:1;for(s+=this.r.v,this.v._length=0,e=0;e<t;e+=1){var l=n*Math.cos(s),c=n*Math.sin(s),h=0===l&&0===c?0:c/Math.sqrt(l*l+c*c),p=0===l&&0===c?0:-l/Math.sqrt(l*l+c*c);l+=+this.p.v[0],c+=+this.p.v[1],this.v.setTripleAt(l,c,l-h*i*a*o,c-p*i*a*o,l+h*i*a*o,c+p*i*a*o,e,!0),s+=r*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],e),e}(),p=function(){function e(e,t){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=PropertyFactory.getProp(e,t.p,1,0,this),this.s=PropertyFactory.getProp(e,t.s,1,0,this),this.r=PropertyFactory.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],r=this.s.v[0]/2,n=this.s.v[1]/2,a=bmMin(r,n,this.r.v),i=a*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(e+r,t-n+a,e+r,t-n+a,e+r,t-n+i,0,!0),this.v.setTripleAt(e+r,t+n-a,e+r,t+n-i,e+r,t+n-a,1,!0),0!==a?(this.v.setTripleAt(e+r-a,t+n,e+r-a,t+n,e+r-i,t+n,2,!0),this.v.setTripleAt(e-r+a,t+n,e-r+i,t+n,e-r+a,t+n,3,!0),this.v.setTripleAt(e-r,t+n-a,e-r,t+n-a,e-r,t+n-i,4,!0),this.v.setTripleAt(e-r,t-n+a,e-r,t-n+i,e-r,t-n+a,5,!0),this.v.setTripleAt(e-r+a,t-n,e-r+a,t-n,e-r+i,t-n,6,!0),this.v.setTripleAt(e+r-a,t-n,e+r-i,t-n,e+r-a,t-n,7,!0)):(this.v.setTripleAt(e-r,t+n,e-r+i,t+n,e-r,t+n,2),this.v.setTripleAt(e-r,t-n,e-r,t-n+i,e-r,t-n,3))):(this.v.setTripleAt(e+r,t-n+a,e+r,t-n+i,e+r,t-n+a,0,!0),0!==a?(this.v.setTripleAt(e+r-a,t-n,e+r-a,t-n,e+r-i,t-n,1,!0),this.v.setTripleAt(e-r+a,t-n,e-r+i,t-n,e-r+a,t-n,2,!0),this.v.setTripleAt(e-r,t-n+a,e-r,t-n+a,e-r,t-n+i,3,!0),this.v.setTripleAt(e-r,t+n-a,e-r,t+n-i,e-r,t+n-a,4,!0),this.v.setTripleAt(e-r+a,t+n,e-r+a,t+n,e-r+i,t+n,5,!0),this.v.setTripleAt(e+r-a,t+n,e+r-i,t+n,e+r-a,t+n,6,!0),this.v.setTripleAt(e+r,t+n-a,e+r,t+n-a,e+r,t+n-i,7,!0)):(this.v.setTripleAt(e-r,t-n,e-r+i,t-n,e-r,t-n,1,!0),this.v.setTripleAt(e-r,t+n,e-r,t+n-i,e-r,t+n,2,!0),this.v.setTripleAt(e+r,t+n,e+r-i,t+n,e+r,t+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],e),e}(),d={getShapeProp:function(e,t,r){var n;return 3===r||4===r?n=(3===r?t.pt:t.ks).k.length?new l(e,t,r):new s(e,t,r):5===r?n=new p(e,t):6===r?n=new c(e,t):7===r&&(n=new h(e,t)),n.k&&e.addDynamicProperty(n),n},getConstructorFunction:function(){return s},getKeyframedConstructorFunction:function(){return l}};return d}(),Matrix=function(){var e=Math.cos,t=Math.sin,r=Math.tan,n=Math.round;function a(){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 i(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(n,-a,0,0,a,n,0,0,0,0,1,0,0,0,0,1)}function s(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(1,0,0,0,0,n,-a,0,0,a,n,0,0,0,0,1)}function o(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(n,0,a,0,0,1,0,0,-a,0,n,0,0,0,0,1)}function l(r){if(0===r)return this;var n=e(r),a=t(r);return this._t(n,-a,0,0,a,n,0,0,0,0,1,0,0,0,0,1)}function c(e,t){return this._t(1,t,e,1,0,0)}function h(e,t){return this.shear(r(e),r(t))}function p(n,a){var i=e(a),s=t(a);return this._t(i,s,0,0,-s,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,r(n),1,0,0,0,0,1,0,0,0,0,1)._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function d(e,t,r){return r||0===r||(r=1),1===e&&1===t&&1===r?this:this._t(e,0,0,0,0,t,0,0,0,0,r,0,0,0,0,1)}function u(e,t,r,n,a,i,s,o,l,c,h,p,d,u,f,m){return this.props[0]=e,this.props[1]=t,this.props[2]=r,this.props[3]=n,this.props[4]=a,this.props[5]=i,this.props[6]=s,this.props[7]=o,this.props[8]=l,this.props[9]=c,this.props[10]=h,this.props[11]=p,this.props[12]=d,this.props[13]=u,this.props[14]=f,this.props[15]=m,this}function f(e,t,r){return r=r||0,0!==e||0!==t||0!==r?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,r,1):this}function m(e,t,r,n,a,i,s,o,l,c,h,p,d,u,f,m){var g=this.props;if(1===e&&0===t&&0===r&&0===n&&0===a&&1===i&&0===s&&0===o&&0===l&&0===c&&1===h&&0===p)return g[12]=g[12]*e+g[15]*d,g[13]=g[13]*i+g[15]*u,g[14]=g[14]*h+g[15]*f,g[15]*=m,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],E=g[3],S=g[4],_=g[5],T=g[6],k=g[7],x=g[8],P=g[9],A=g[10],C=g[11],I=g[12],w=g[13],D=g[14],M=g[15];return g[0]=y*e+v*a+b*l+E*d,g[1]=y*t+v*i+b*c+E*u,g[2]=y*r+v*s+b*h+E*f,g[3]=y*n+v*o+b*p+E*m,g[4]=S*e+_*a+T*l+k*d,g[5]=S*t+_*i+T*c+k*u,g[6]=S*r+_*s+T*h+k*f,g[7]=S*n+_*o+T*p+k*m,g[8]=x*e+P*a+A*l+C*d,g[9]=x*t+P*i+A*c+C*u,g[10]=x*r+P*s+A*h+C*f,g[11]=x*n+P*o+A*p+C*m,g[12]=I*e+w*a+D*l+M*d,g[13]=I*t+w*i+D*c+M*u,g[14]=I*r+w*s+D*h+M*f,g[15]=I*n+w*o+D*p+M*m,this._identityCalculated=!1,this}function g(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function b(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function E(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function S(e,t,r){return{x:e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]}}function _(e,t,r){return e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12]}function T(e,t,r){return e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13]}function k(e,t,r){return e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]}function x(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,r=-this.props[1]/e,n=-this.props[4]/e,a=this.props[0]/e,i=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,s=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,o=new Matrix;return o.props[0]=t,o.props[1]=r,o.props[4]=n,o.props[5]=a,o.props[12]=i,o.props[13]=s,o}function P(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function A(e){var t,r=e.length,n=[];for(t=0;t<r;t+=1)n[t]=P(e[t]);return n}function C(e,t,r){var n=createTypedArray("float32",6);if(this.isIdentity())n[0]=e[0],n[1]=e[1],n[2]=t[0],n[3]=t[1],n[4]=r[0],n[5]=r[1];else{var a=this.props[0],i=this.props[1],s=this.props[4],o=this.props[5],l=this.props[12],c=this.props[13];n[0]=e[0]*a+e[1]*s+l,n[1]=e[0]*i+e[1]*o+c,n[2]=t[0]*a+t[1]*s+l,n[3]=t[0]*i+t[1]*o+c,n[4]=r[0]*a+r[1]*s+l,n[5]=r[0]*i+r[1]*o+c}return n}function I(e,t,r){return this.isIdentity()?[e,t,r]:[e*this.props[0]+t*this.props[4]+r*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+r*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+r*this.props[10]+this.props[14]]}function w(e,t){if(this.isIdentity())return e+","+t;var r=this.props;return Math.round(100*(e*r[0]+t*r[4]+r[12]))/100+","+Math.round(100*(e*r[1]+t*r[5]+r[13]))/100}function D(){for(var e=0,t=this.props,r="matrix3d(";e<16;)r+=n(1e4*t[e])/1e4,r+=15===e?")":",",e+=1;return r}function M(e){return e<1e-6&&e>0||e>-1e-6&&e<0?n(1e4*e)/1e4:e}function R(){var e=this.props;return"matrix("+M(e[0])+","+M(e[1])+","+M(e[4])+","+M(e[5])+","+M(e[12])+","+M(e[13])+")"}return function(){this.reset=a,this.rotate=i,this.rotateX=s,this.rotateY=o,this.rotateZ=l,this.skew=h,this.skewFromAxis=p,this.shear=c,this.scale=d,this.setTransform=u,this.translate=f,this.transform=m,this.multiply=g,this.applyToPoint=S,this.applyToX=_,this.applyToY=T,this.applyToZ=k,this.applyToPointArray=I,this.applyToTriplePoints=C,this.applyToPointStringified=w,this.toCSS=D,this.to2dCSS=R,this.clone=b,this.cloneFromProps=E,this.equals=v,this.inversePoints=A,this.inversePoint=P,this.getInverseMatrix=x,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(e){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$3(e)}var lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),r=0;r<t.length;r+=1){var n=t[r].split("=");if(decodeURIComponent(n[0])==e)return decodeURIComponent(n[1])}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.13.0";var queryString="",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{"object"!==_typeof$3(exports)&&(window.bodymovin=lottie)}catch(e){}var ShapeModifiers=function(){var e={},t={};return e.registerModifier=function(e,r){t[e]||(t[e]=r)},e.getModifier=function(e,r,n){return new t[e](r,n)},e}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},ShapeModifier.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),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),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(e,t){this.s=PropertyFactory.getProp(e,t.s,0,.01,this),this.e=PropertyFactory.getProp(e,t.e,0,.01,this),this.o=PropertyFactory.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(e){e.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(e,t,r,n,a){var i=[];t<=1?i.push({s:e,e:t}):e>=1?i.push({s:e-1,e:t-1}):(i.push({s:e,e:1}),i.push({s:0,e:t-1}));var s,o,l=[],c=i.length;for(s=0;s<c;s+=1){var h,p;(o=i[s]).e*a<n||o.s*a>n+r||(h=o.s*a<=n?0:(o.s*a-n)/r,p=o.e*a>=n+r?1:(o.e*a-n)/r,l.push([h,p]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t<r;t+=1)segmentsLengthPool.release(e[t]);return e.length=0,e},TrimModifier.prototype.processShapes=function(e){var t,r,n,a;if(this._mdf||e){var i=this.o.v%360/360;if(i<0&&(i+=1),(t=this.s.v>1?1+i:this.s.v<0?0+i:this.s.v+i)>(r=this.e.v>1?1+i:this.e.v<0?0+i:this.e.v+i)){var s=t;t=r,r=s}t=1e-4*Math.round(1e4*t),r=1e-4*Math.round(1e4*r),this.sValue=t,this.eValue=r}else t=this.sValue,r=this.eValue;var o,l,c,h,p,d=this.shapes.length,u=0;if(r===t)for(a=0;a<d;a+=1)this.shapes[a].localShapeCollection.releaseShapes(),this.shapes[a].shape._mdf=!0,this.shapes[a].shape.paths=this.shapes[a].localShapeCollection,this._mdf&&(this.shapes[a].pathsData.length=0);else if(1===r&&0===t||0===r&&1===t){if(this._mdf)for(a=0;a<d;a+=1)this.shapes[a].pathsData.length=0,this.shapes[a].shape._mdf=!0}else{var f,m,g=[];for(a=0;a<d;a+=1)if((f=this.shapes[a]).shape._mdf||this._mdf||e||2===this.m){if(l=(n=f.shape.paths)._length,p=0,!f.shape._mdf&&f.pathsData.length)p=f.totalShapeLength;else{for(c=this.releasePathsData(f.pathsData),o=0;o<l;o+=1)h=bez.getSegmentsLength(n.shapes[o]),c.push(h),p+=h.totalLength;f.totalShapeLength=p,f.pathsData=c}u+=p,f.shape._mdf=!0}else f.shape.paths=f.localShapeCollection;var y,v=t,b=r,E=0;for(a=d-1;a>=0;a-=1)if((f=this.shapes[a]).shape._mdf){for((m=f.localShapeCollection).releaseShapes(),2===this.m&&d>1?(y=this.calculateShapeEdges(t,r,f.totalShapeLength,E,u),E+=f.totalShapeLength):y=[[v,b]],l=y.length,o=0;o<l;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:f.totalShapeLength*v,e:f.totalShapeLength*b}):v>=1?g.push({s:f.totalShapeLength*(v-1),e:f.totalShapeLength*(b-1)}):(g.push({s:f.totalShapeLength*v,e:f.totalShapeLength}),g.push({s:0,e:f.totalShapeLength*(b-1)}));var S=this.addShapes(f,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(f.shape.paths.shapes[f.shape.paths._length-1].c){var _=S.pop();this.addPaths(S,m),S=this.addShapes(f,g[1],_)}else this.addPaths(S,m),S=this.addShapes(f,g[1]);this.addPaths(S,m)}}f.shape.paths=m}}},TrimModifier.prototype.addPaths=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t.addShape(e[r])},TrimModifier.prototype.addSegment=function(e,t,r,n,a,i,s){a.setXYAt(t[0],t[1],"o",i),a.setXYAt(r[0],r[1],"i",i+1),s&&a.setXYAt(e[0],e[1],"v",i),a.setXYAt(n[0],n[1],"v",i+1)},TrimModifier.prototype.addSegmentFromArray=function(e,t,r,n){t.setXYAt(e[1],e[5],"o",r),t.setXYAt(e[2],e[6],"i",r+1),n&&t.setXYAt(e[0],e[4],"v",r),t.setXYAt(e[3],e[7],"v",r+1)},TrimModifier.prototype.addShapes=function(e,t,r){var n,a,i,s,o,l,c,h,p=e.pathsData,d=e.shape.paths.shapes,u=e.shape.paths._length,f=0,m=[],g=!0;for(r?(o=r._length,h=r._length):(r=shapePool.newElement(),o=0,h=0),m.push(r),n=0;n<u;n+=1){for(l=p[n].lengths,r.c=d[n].c,i=d[n].c?l.length:l.length+1,a=1;a<i;a+=1)if(f+(s=l[a-1]).addedLength<t.s)f+=s.addedLength,r.c=!1;else{if(f>t.e){r.c=!1;break}t.s<=f&&t.e>=f+s.addedLength?(this.addSegment(d[n].v[a-1],d[n].o[a-1],d[n].i[a],d[n].v[a],r,o,g),g=!1):(c=bez.getNewSegment(d[n].v[a-1],d[n].v[a],d[n].o[a-1],d[n].i[a],(t.s-f)/s.addedLength,(t.e-f)/s.addedLength,l[a-1]),this.addSegmentFromArray(c,r,o,g),g=!1,r.c=!1),f+=s.addedLength,o+=1}if(d[n].c&&l.length){if(s=l[a-1],f<=t.e){var y=l[a-1].addedLength;t.s<=f&&t.e>=f+y?(this.addSegment(d[n].v[a-1],d[n].o[a-1],d[n].i[0],d[n].v[0],r,o,g),g=!1):(c=bez.getNewSegment(d[n].v[a-1],d[n].v[0],d[n].o[a-1],d[n].i[0],(t.s-f)/y,(t.e-f)/y,l[a-1]),this.addSegmentFromArray(c,r,o,g),g=!1,r.c=!1)}else r.c=!1;f+=s.addedLength,o+=1}if(r._length&&(r.setXYAt(r.v[h][0],r.v[h][1],"i",h),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),f>t.e)break;n<u-1&&(r=shapePool.newElement(),g=!0,m.push(r),o=0)}return m},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(e,t){var r=t/100,n=[0,0],a=e._length,i=0;for(i=0;i<a;i+=1)n[0]+=e.v[i][0],n[1]+=e.v[i][1];n[0]/=a,n[1]/=a;var s,o,l,c,h,p,d=shapePool.newElement();for(d.c=e.c,i=0;i<a;i+=1)s=e.v[i][0]+(n[0]-e.v[i][0])*r,o=e.v[i][1]+(n[1]-e.v[i][1])*r,l=e.o[i][0]+(n[0]-e.o[i][0])*-r,c=e.o[i][1]+(n[1]-e.o[i][1])*-r,h=e.i[i][0]+(n[0]-e.i[i][0])*-r,p=e.i[i][1]+(n[1]-e.i[i][1])*-r,d.setTripleAt(s,o,l,c,h,p,i);return d},PuckerAndBloatModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.amount.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var e=[0,0];function t(e,t,r){if(this.elem=e,this.frameId=-1,this.propType="transform",this.data=t,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(r||e),t.p&&t.p.s?(this.px=PropertyFactory.getProp(e,t.p.x,0,0,this),this.py=PropertyFactory.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=PropertyFactory.getProp(e,t.p.z,0,0,this))):this.p=PropertyFactory.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=PropertyFactory.getProp(e,t.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(e,t.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(e,t.rz,0,degToRads,this),t.or.k[0].ti){var n,a=t.or.k.length;for(n=0;n<a;n+=1)t.or.k[n].to=null,t.or.k[n].ti=null}this.or=PropertyFactory.getProp(e,t.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(e,t.r||{k:0},0,degToRads,this);t.sk&&(this.sk=PropertyFactory.getProp(e,t.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(e,t.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=PropertyFactory.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return t.prototype={applyToMatrix:function(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var r;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 n,a;if(r=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/r,0),a=this.p.getValueAtTime(this.p.keyframes[0].t/r,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(n=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],a=[];var i=this.px,s=this.py;i._caching.lastFrame+i.offsetTime<=i.keyframes[0].t?(n[0]=i.getValueAtTime((i.keyframes[0].t+.01)/r,0),n[1]=s.getValueAtTime((s.keyframes[0].t+.01)/r,0),a[0]=i.getValueAtTime(i.keyframes[0].t/r,0),a[1]=s.getValueAtTime(s.keyframes[0].t/r,0)):i._caching.lastFrame+i.offsetTime>=i.keyframes[i.keyframes.length-1].t?(n[0]=i.getValueAtTime(i.keyframes[i.keyframes.length-1].t/r,0),n[1]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/r,0),a[0]=i.getValueAtTime((i.keyframes[i.keyframes.length-1].t-.01)/r,0),a[1]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/r,0)):(n=[i.pv,s.pv],a[0]=i.getValueAtTime((i._caching.lastFrame+i.offsetTime-.01)/r,i.offsetTime),a[1]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/r,s.offsetTime))}else n=a=e;this.v.rotate(-Math.atan2(n[1]-a[1],n[0]-a[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}},precalculateMatrix:function(){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,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}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)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,r,n){return new t(e,r,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,r){return e*(1-r)+t*r}function lerpPoint(e,t,r){return[lerp(e[0],t[0],r),lerp(e[1],t[1],r)]}function quadRoots(e,t,r){if(0===e)return[];var n=t*t-4*e*r;if(n<0)return[];var a=-t/(2*e);if(0===n)return[a];var i=Math.sqrt(n)/(2*e);return[a-i,a+i]}function polynomialCoefficients(e,t,r,n){return[3*t-e-3*r+n,3*e-6*t+3*r,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,r,n,a){a&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),a&&pointEqual(r,n)&&(r=lerpPoint(e,n,2/3));var i=polynomialCoefficients(e[0],t[0],r[0],n[0]),s=polynomialCoefficients(e[1],t[1],r[1],n[1]);this.a=[i[0],s[0]],this.b=[i[1],s[1]],this.c=[i[2],s[2]],this.d=[i[3],s[3]],this.points=[e,t,r,n]}function extrema(e,t){var r=e.points[0][t],n=e.points[e.points.length-1][t];if(r>n){var a=n;n=r,r=a}for(var i=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),s=0;s<i.length;s+=1)if(i[s]>0&&i[s]<1){var o=e.point(i[s])[t];o<r?r=o:o>n&&(n=o)}return{min:r,max:n}}function intersectData(e,t,r){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+r)/2,t1:t,t2:r}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)<e.width+t.width&&2*Math.abs(e.cy-t.cy)<e.height+t.height}function intersectsImpl(e,t,r,n,a,i){if(boxIntersect(e,t))if(r>=i||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n)a.push([e.t,t.t]);else{var s=splitData(e),o=splitData(t);intersectsImpl(s[0],o[0],r+1,n,a,i),intersectsImpl(s[0],o[1],r+1,n,a,i),intersectsImpl(s[1],o[0],r+1,n,a,i),intersectsImpl(s[1],o[1],r+1,n,a,i)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,r,n){var a=[e[0],e[1],1],i=[t[0],t[1],1],s=[r[0],r[1],1],o=[n[0],n[1],1],l=crossProduct(crossProduct(a,i),crossProduct(s,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,r){return[e[0]+Math.cos(t)*r,e[1]-Math.sin(t)*r]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,r,n,a,i,s){var o=r-Math.PI/2,l=r+Math.PI/2,c=t[0]+Math.cos(r)*n*a,h=t[1]-Math.sin(r)*n*a;e.setTripleAt(c,h,c+Math.cos(o)*i,h-Math.sin(o)*i,c+Math.cos(l)*s,h-Math.sin(l)*s,e.length())}function getPerpendicularVector(e,t){var r=[t[0]-e[0],t[1]-e[1]],n=.5*-Math.PI;return[Math.cos(n)*r[0]-Math.sin(n)*r[1],Math.sin(n)*r[0]+Math.cos(n)*r[1]]}function getProjectingAngle(e,t){var r=0===t?e.length()-1:t-1,n=(t+1)%e.length(),a=getPerpendicularVector(e.v[r],e.v[n]);return Math.atan2(0,1)-Math.atan2(a[1],a[0])}function zigZagCorner(e,t,r,n,a,i,s){var o=getProjectingAngle(t,r),l=t.v[r%t._length],c=t.v[0===r?t._length-1:r-1],h=t.v[(r+1)%t._length],p=2===i?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0,d=2===i?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0;setPoint(e,t.v[r%t._length],o,s,n,d/(2*(a+1)),p/(2*(a+1)))}function zigZagSegment(e,t,r,n,a,i){for(var s=0;s<n;s+=1){var o=(s+1)/(n+1),l=2===a?Math.sqrt(Math.pow(t.points[3][0]-t.points[0][0],2)+Math.pow(t.points[3][1]-t.points[0][1],2)):0,c=t.normalAngle(o);setPoint(e,t.point(o),c,i,r,l/(2*(n+1)),l/(2*(n+1))),i=-i}return i}function linearOffset(e,t,r){var n=Math.atan2(t[0]-e[0],t[1]-e[1]);return[polarOffset(e,n,r),polarOffset(t,n,r)]}function offsetSegment(e,t){var r,n,a,i,s,o,l;r=(l=linearOffset(e.points[0],e.points[1],t))[0],n=l[1],a=(l=linearOffset(e.points[1],e.points[2],t))[0],i=l[1],s=(l=linearOffset(e.points[2],e.points[3],t))[0],o=l[1];var c=lineIntersection(r,n,a,i);null===c&&(c=n);var h=lineIntersection(s,o,a,i);return null===h&&(h=s),new PolynomialBezier(r,c,h,o)}function joinLines(e,t,r,n,a){var i=t.points[3],s=r.points[0];if(3===n)return i;if(pointEqual(i,s))return i;if(2===n){var o=-t.tangentAngle(1),l=-r.tangentAngle(0)+Math.PI,c=lineIntersection(i,polarOffset(i,o+Math.PI/2,100),s,polarOffset(s,o+Math.PI/2,100)),h=c?pointDistance(c,i):pointDistance(i,s)/2,p=polarOffset(i,o,2*h*roundCorner);return e.setXYAt(p[0],p[1],"o",e.length()-1),p=polarOffset(s,l,2*h*roundCorner),e.setTripleAt(s[0],s[1],s[0],s[1],p[0],p[1],e.length()),s}var d=lineIntersection(pointEqual(i,t.points[2])?t.points[0]:t.points[2],i,s,pointEqual(s,r.points[1])?r.points[3]:r.points[1]);return d&&pointDistance(d,i)<a?(e.setTripleAt(d[0],d[1],d[0],d[1],d[0],d[1],e.length()),d):i}function getIntersection(e,t){var r=e.intersections(t);return r.length&&floatEqual(r[0][0],1)&&r.shift(),r.length?r[0]:null}function pruneSegmentIntersection(e,t){var r=e.slice(),n=t.slice(),a=getIntersection(e[e.length-1],t[0]);return a&&(r[e.length-1]=e[e.length-1].split(a[0])[0],n[0]=t[0].split(a[1])[1]),e.length>1&&t.length>1&&(a=getIntersection(e[0],t[t.length-1]))?[[e[0].split(a[0])[0]],[t[t.length-1].split(a[1])[1]]]:[r,n]}function pruneIntersections(e){for(var t,r=1;r<e.length;r+=1)t=pruneSegmentIntersection(e[r-1],e[r]),e[r-1]=t[0],e[r]=t[1];return e.length>1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var r,n,a,i,s=e.inflectionPoints();if(0===s.length)return[offsetSegment(e,t)];if(1===s.length||floatEqual(s[1],1))return r=(a=e.split(s[0]))[0],n=a[1],[offsetSegment(r,t),offsetSegment(n,t)];r=(a=e.split(s[0]))[0];var o=(s[1]-s[0])/(1-s[0]);return i=(a=a[1].split(o))[0],n=a[1],[offsetSegment(r,t),offsetSegment(i,t),offsetSegment(n,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],r="normal",n="normal",a=t.length,i=0;i<a;i+=1)switch(t[i].toLowerCase()){case"italic":n="italic";break;case"bold":r="700";break;case"black":r="900";break;case"medium":r="500";break;case"regular":case"normal":r="400";break;case"light":case"thin":r="200"}return{style:n,weight:e.fWeight||r}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(e,t.c,0,null,this),this.o=PropertyFactory.getProp(e,t.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(e,t.tr,this),this.so=PropertyFactory.getProp(e,t.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(e,t,r,n,a,i){var s=i?-1:1,o=n.s.v[0]+(1-n.s.v[0])*(1-a),l=n.s.v[1]+(1-n.s.v[1])*(1-a);e.translate(n.p.v[0]*s*a,n.p.v[1]*s*a,n.p.v[2]),t.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),t.rotate(-n.r.v*s*a),t.translate(n.a.v[0],n.a.v[1],n.a.v[2]),r.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),r.scale(i?1/o:o,i?1/l:l),r.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(e,t,r,n){for(this.elem=e,this.arr=t,this.pos=r,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[r]);r>0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t]._processed=!1,"gr"===e[t].ty&&this.resetElements(e[t].it)},RepeaterModifier.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},RepeaterModifier.prototype.changeGroupRender=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]._render=t,"gr"===e[r].ty&&this.changeGroupRender(e[r].it,t)},RepeaterModifier.prototype.processShapes=function(e){var t,r,n,a,i,s=!1;if(this._mdf||e){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var c={it:this.cloneElements(this._elements),ty:"gr"};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),s=!0}for(i=0,n=0;n<=this._groups.length-1;n+=1){if(o=i<l,this._groups[n]._render=o,this.changeGroupRender(this._groups[n].it,o),!o){var h=this.elemsData[n].it,p=h[h.length-1];0!==p.transform.op.v?(p.transform.op._mdf=!0,p.transform.op.v=0):p.transform.op._mdf=!1}i+=1}this._currentCopies=l;var d=this.o.v,u=d%1,f=d>0?Math.floor(d):Math.ceil(d),m=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,E=0;if(d>0){for(;E<f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),E+=1;u&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,u,!1),E+=u)}else if(d<0){for(;E>f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),E-=1;u&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-u,!0),E-=u)}for(n=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,i=this._currentCopies;i;){if(b=(r=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==E){for((0!==n&&1===a||n!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),v=0;v<b;v+=1)r[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)r[v]=this.matrix.props[v];E+=1,i-=1,n+=a}}else for(i=this._currentCopies,n=0,a=1;i;)r=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,i-=1,n+=a;return s},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(e,t){var r,n=shapePool.newElement();n.c=e.c;var a,i,s,o,l,c,h,p,d,u,f,m,g=e._length,y=0;for(r=0;r<g;r+=1)a=e.v[r],s=e.o[r],i=e.i[r],a[0]===s[0]&&a[1]===s[1]&&a[0]===i[0]&&a[1]===i[1]?0!==r&&r!==g-1||e.c?(o=0===r?e.v[g-1]:e.v[r-1],c=(l=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(l/2,t)/l:0,h=f=a[0]+(o[0]-a[0])*c,p=m=a[1]-(a[1]-o[1])*c,d=h-(h-a[0])*roundCorner,u=p-(p-a[1])*roundCorner,n.setTripleAt(h,p,d,u,f,m,y),y+=1,o=r===g-1?e.v[0]:e.v[r+1],c=(l=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2)))?Math.min(l/2,t)/l:0,h=d=a[0]+(o[0]-a[0])*c,p=u=a[1]+(o[1]-a[1])*c,f=h-(h-a[0])*roundCorner,m=p-(p-a[1])*roundCorner,n.setTripleAt(h,p,d,u,f,m,y),y+=1):(n.setTripleAt(a[0],a[1],s[0],s[1],i[0],i[1],y),y+=1):(n.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],y),y+=1);return n},RoundCornersModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.rd.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},PolynomialBezier.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},PolynomialBezier.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},PolynomialBezier.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,r=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(r<0)return[];var n=Math.sqrt(r);return floatZero(n)?n>0&&n<1?[t]:[]:[t-n,t+n].filter((function(e){return e>0&&e<1}))},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),r=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),a=lerpPoint(t,r,e),i=lerpPoint(r,n,e),s=lerpPoint(a,i,e);return[new PolynomialBezier(this.points[0],t,a,s,!0),new PolynomialBezier(s,i,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,r){void 0===t&&(t=2),void 0===r&&(r=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,r),n},PolynomialBezier.shapeSegment=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[r],e.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[r],e.i[r],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,r,n){var a=e._length,i=shapePool.newElement();if(i.c=e.c,e.c||(a-=1),0===a)return i;var s=-1,o=PolynomialBezier.shapeSegment(e,0);zigZagCorner(i,e,0,t,r,n,s);for(var l=0;l<a;l+=1)s=zigZagSegment(i,o,t,r,n,-s),o=l!==a-1||e.c?PolynomialBezier.shapeSegment(e,(l+1)%a):null,zigZagCorner(i,e,l+1,t,r,n,s);return i},ZigZagModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.amplitude.v,c=Math.max(0,Math.round(this.frequency.v)),h=this.pointsType.v;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l,c,h));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(e,t.a,0,null,this),this.miterLimit=PropertyFactory.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(e,t,r,n){var a=shapePool.newElement();a.c=e.c;var i,s,o,l=e.length();e.c||(l-=1);var c=[];for(i=0;i<l;i+=1)o=PolynomialBezier.shapeSegment(e,i),c.push(offsetSegmentSplit(o,t));if(!e.c)for(i=l-1;i>=0;i-=1)o=PolynomialBezier.shapeSegmentInverted(e,i),c.push(offsetSegmentSplit(o,t));c=pruneIntersections(c);var h=null,p=null;for(i=0;i<c.length;i+=1){var d=c[i];for(p&&(h=joinLines(a,p,d[0],r,n)),p=d[d.length-1],s=0;s<d.length;s+=1)o=d[s],h&&pointEqual(o.points[0],h)?a.setXYAt(o.points[1][0],o.points[1][1],"o",a.length()-1):a.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],a.length()),a.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],a.length()),h=o.points[3]}return c.length&&joinLines(a,p,c[0][0],r,n),a},OffsetPathModifier.prototype.processShapes=function(e){var t,r,n,a,i,s,o=this.shapes.length,l=this.amount.v,c=this.miterLimit.v,h=this.lineJoin;if(0!==l)for(r=0;r<o;r+=1){if(s=(i=this.shapes[r]).localShapeCollection,i.shape._mdf||this._mdf||e)for(s.releaseShapes(),i.shape._mdf=!0,t=i.shape.paths.shapes,a=i.shape.paths._length,n=0;n<a;n+=1)s.addShape(this.processPath(t[n],l,h,c));i.shape.paths=i.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var r=127988,n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function a(e,t){var r=createTag("span");r.setAttribute("aria-hidden",!0),r.style.fontFamily=t;var n=createTag("span");n.innerText="giItT1WQy@!-/#",r.style.position="absolute",r.style.left="-10000px",r.style.top="-10000px",r.style.fontSize="300px",r.style.fontVariant="normal",r.style.fontStyle="normal",r.style.fontWeight="normal",r.style.letterSpacing="0",r.appendChild(n),document.body.appendChild(r);var a=n.offsetWidth;return n.style.fontFamily=function(e){var t,r=e.split(","),n=r.length,a=[];for(t=0;t<n;t+=1)"sans-serif"!==r[t]&&"monospace"!==r[t]&&a.push(r[t]);return a.join(",")}(e)+", "+t,{node:n,w:a,parent:r}}function i(e,t){var r,n=document.body&&t?"svg":"canvas",a=getFontProperties(e);if("svg"===n){var i=createNS("text");i.style.fontSize="100px",i.setAttribute("font-family",e.fFamily),i.setAttribute("font-style",a.style),i.setAttribute("font-weight",a.weight),i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.setAttribute("class",e.fClass)):i.style.fontFamily=e.fFamily,t.appendChild(i),r=i}else{var s=new OffscreenCanvas(500,500).getContext("2d");s.font=a.style+" "+a.weight+" 100px "+e.fFamily,r=s}return{measureText:function(e){return"svg"===n?(r.textContent=e,r.getComputedTextLength()):r.measureText(e).width}}}function s(e){var t=0,r=e.charCodeAt(0);if(r>=55296&&r<=56319){var n=e.charCodeAt(1);n>=56320&&n<=57343&&(t=1024*(r-55296)+n-56320+65536)}return t}function o(e){var t=s(e);return t>=127462&&t<=127487}var l=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)};l.isModifier=function(e,t){var r=e.toString(16)+t.toString(16);return-1!==n.indexOf(r)},l.isZeroWidthJoiner=function(e){return 8205===e},l.isFlagEmoji=function(e){return o(e.substr(0,2))&&o(e.substr(2,2))},l.isRegionalCode=o,l.isCombinedCharacter=function(e){return-1!==t.indexOf(e)},l.isRegionalFlag=function(e,t){var n=s(e.substr(t,2));if(n!==r)return!1;var a=0;for(t+=2;a<5;){if((n=s(e.substr(t,2)))<917601||n>917626)return!1;a+=1,t+=2}return 917631===s(e.substr(t,2))},l.isVariationSelector=function(e){return 65039===e},l.BLACK_FLAG_CODE_POINT=r;var c={addChars:function(e){if(e){var t;this.chars||(this.chars=[]);var r,n,a=e.length,i=this.chars.length;for(t=0;t<a;t+=1){for(r=0,n=!1;r<i;)this.chars[r].style===e[t].style&&this.chars[r].fFamily===e[t].fFamily&&this.chars[r].ch===e[t].ch&&(n=!0),r+=1;n||(this.chars.push(e[t]),i+=1)}}},addFonts:function(e,t){if(e){if(this.chars)return this.isLoaded=!0,void(this.fonts=e.list);if(!document.body)return this.isLoaded=!0,e.list.forEach((function(e){e.helper=i(e),e.cache={}})),void(this.fonts=e.list);var r,n=e.list,s=n.length,o=s;for(r=0;r<s;r+=1){var l,c,h=!0;if(n[r].loaded=!1,n[r].monoCase=a(n[r].fFamily,"monospace"),n[r].sansCase=a(n[r].fFamily,"sans-serif"),n[r].fPath){if("p"===n[r].fOrigin||3===n[r].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+n[r].fFamily+'"], style[f-origin="3"][f-family="'+n[r].fFamily+'"]')).length>0&&(h=!1),h){var p=createTag("style");p.setAttribute("f-forigin",n[r].fOrigin),p.setAttribute("f-origin",n[r].origin),p.setAttribute("f-family",n[r].fFamily),p.type="text/css",p.innerText="@font-face {font-family: "+n[r].fFamily+"; font-style: normal; src: url('"+n[r].fPath+"');}",t.appendChild(p)}}else if("g"===n[r].fOrigin||1===n[r].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;c<l.length;c+=1)-1!==l[c].href.indexOf(n[r].fPath)&&(h=!1);if(h){var d=createTag("link");d.setAttribute("f-forigin",n[r].fOrigin),d.setAttribute("f-origin",n[r].origin),d.type="text/css",d.rel="stylesheet",d.href=n[r].fPath,document.body.appendChild(d)}}else if("t"===n[r].fOrigin||2===n[r].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),c=0;c<l.length;c+=1)n[r].fPath===l[c].src&&(h=!1);if(h){var u=createTag("link");u.setAttribute("f-forigin",n[r].fOrigin),u.setAttribute("f-origin",n[r].origin),u.setAttribute("rel","stylesheet"),u.setAttribute("href",n[r].fPath),t.appendChild(u)}}}else n[r].loaded=!0,o-=1;n[r].helper=i(n[r],t),n[r].cache={},this.fonts.push(n[r])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(t,r,n){for(var a=0,i=this.chars.length;a<i;){if(this.chars[a].ch===t&&this.chars[a].style===r&&this.chars[a].fFamily===n)return this.chars[a];a+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,r,n)),e},getFontByName:function(e){for(var t=0,r=this.fonts.length;t<r;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]},measureText:function(e,t,r){var n=this.getFontByName(t),a=e;if(!n.cache[a]){var i=n.helper;if(" "===e){var s=i.measureText("|"+e+"|"),o=i.measureText("||");n.cache[a]=(s-o)/100}else n.cache[a]=i.measureText(e)/100}return n.cache[a]*r},checkLoadedFonts:function(){var e,t,r,n=this.fonts.length,a=n;for(e=0;e<n;e+=1)this.fonts[e].loaded?a-=1:"n"===this.fonts[e].fOrigin||0===this.fonts[e].origin?this.fonts[e].loaded=!0:(t=this.fonts[e].monoCase.node,r=this.fonts[e].monoCase.w,t.offsetWidth!==r?(a-=1,this.fonts[e].loaded=!0):(t=this.fonts[e].sansCase.node,r=this.fonts[e].sansCase.w,t.offsetWidth!==r&&(a-=1,this.fonts[e].loaded=!0)),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));0!==a&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return l.prototype=c,l}();function SlotManager(e){this.animationData=e}function slotFactory(e){return new SlotManager(e)}function RenderableElement(){}SlotManager.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){-1===this.renderableComponents.indexOf(e)&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){-1!==this.renderableComponents.indexOf(e)&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={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"},function(e){return blendModeEnums[e]||""}),blendModeEnums;function SliderEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function AngleEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function ColorEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function PointEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,1,0,r)}function LayerIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function MaskIndexEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function CheckboxEffect(e,t,r){this.p=PropertyFactory.getProp(t,e.v,0,0,r)}function NoValueEffect(){this.p={}}function EffectsManager(e,t){var r,n=e.ef||[];this.effectElements=[];var a,i=n.length;for(r=0;r<i;r+=1)a=new GroupEffect(n[r],t),this.effectElements.push(a)}function GroupEffect(e,t){this.init(e,t)}function BaseElement(){}function FrameElement(){}function FootageElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,r)}function AudioElement(e,t,r){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,r),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(e,t){var r;this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,a=this.data.ef.length,i=this.data.ef;for(r=0;r<a;r+=1){switch(n=null,i[r].ty){case 0:n=new SliderEffect(i[r],t,this);break;case 1:n=new AngleEffect(i[r],t,this);break;case 2:n=new ColorEffect(i[r],t,this);break;case 3:n=new PointEffect(i[r],t,this);break;case 4:case 7:n=new CheckboxEffect(i[r],t,this);break;case 10:n=new LayerIndexEffect(i[r],t,this);break;case 11:n=new MaskIndexEffect(i[r],t,this);break;case 5:n=new EffectsManager(i[r],t);break;default:n=new NoValueEffect(i[r])}n&&this.effectElements.push(n)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if("n"!==this.data.masksProperties[e].mode&&!1!==this.data.masksProperties[e].cl)return!0;e+=1}return!1},initExpressions:function(){var e=getExpressionInterfaces();if(e){var t=e("layer"),r=e("effects"),n=e("shape"),a=e("text"),i=e("comp");this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var s=r.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(s),0===this.data.ty||this.data.xt?this.compInterface=i(this):4===this.data.ty?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=a(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=e},initBaseData:function(e,t,r){this.globalData=t,this.comp=r,this.data=e,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(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var r,n=this.dynamicProperties.length;for(r=0;r<n;r+=1)(t||this._isParent&&"transform"===this.dynamicProperties[r].propType)&&(this.dynamicProperties[r].getValue(),this.dynamicProperties[r]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){-1===this.dynamicProperties.indexOf(e)&&this.dynamicProperties.push(e)}},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 e=getExpressionInterfaces();if(e){var t=e("footage");this.layerInterface=t(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var r=this._volume*this._volumeMultiplier;this._previousVolume!==r&&(this._previousVolume=r,this.audio.volume(r))},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(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*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(){},BaseRenderer.prototype.checkLayers=function(e){var t,r,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)this.elements[t]||(r=this.layers[t]).ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(e){var t;this.completeLayers=!1;var r,n=e.length,a=this.layers.length;for(t=0;t<n;t+=1)for(r=0;r<a;){if(this.layers[r].id===e[t].id){this.layers[r]=e[t];break}r+=1}},BaseRenderer.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(e,t,r){for(var n=this.elements,a=this.layers,i=0,s=a.length;i<s;)a[i].ind==t&&(n[i]&&!0!==n[i]?(r.push(n[i]),n[i].setAsParent(),void 0!==a[i].parent?this.buildElementParenting(e,a[i].parent,r):e.setHierarchy(r)):(this.buildItem(i),this.addPendingElement(e))),i+=1},BaseRenderer.prototype.addPendingElement=function(e){this.pendingElements.push(e)},BaseRenderer.prototype.searchExtraCompositions=function(e){var t,r=e.length;for(t=0;t<r;t+=1)if(e[t].xt){var n=this.createComp(e[t]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(e){var t,r=this.elements.length;for(t=0;t<r;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},BaseRenderer.prototype.getElementByPath=function(e){var t,r=e.shift();if("number"==typeof r)t=this.elements[r];else{var n,a=this.elements.length;for(n=0;n<a;n+=1)if(this.elements[n].data.nm===r){t=this.elements[n];break}}return 0===e.length?t:t.getElementByPath(e)},BaseRenderer.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(e,t,r){this.data=e,this.element=t,this.globalData=r,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n,a,i=this.globalData.defs,s=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(s),this.solidPath="";var o,l,c,h,p,d,u=this.masksProperties,f=0,m=[],g=createElementID(),y="clipPath",v="clip-path";for(n=0;n<s;n+=1)if(("a"!==u[n].mode&&"n"!==u[n].mode||u[n].inv||100!==u[n].o.k||u[n].o.x)&&(y="mask",v="mask"),"s"!==u[n].mode&&"i"!==u[n].mode||0!==f?c=null:((c=createNS("rect")).setAttribute("fill","#ffffff"),c.setAttribute("width",this.element.comp.data.w||0),c.setAttribute("height",this.element.comp.data.h||0),m.push(c)),a=createNS("path"),"n"===u[n].mode)this.viewData[n]={op:PropertyFactory.getProp(this.element,u[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,u[n],3),elem:a,lastPath:""},i.appendChild(a);else{var b;if(f+=1,a.setAttribute("fill","s"===u[n].mode?"#000000":"#ffffff"),a.setAttribute("clip-rule","nonzero"),0!==u[n].x.k?(y="mask",v="mask",d=PropertyFactory.getProp(this.element,u[n].x,0,null,this.element),b=createElementID(),(h=createNS("filter")).setAttribute("id",b),(p=createNS("feMorphology")).setAttribute("operator","erode"),p.setAttribute("in","SourceGraphic"),p.setAttribute("radius","0"),h.appendChild(p),i.appendChild(h),a.setAttribute("stroke","s"===u[n].mode?"#000000":"#ffffff")):(p=null,d=null),this.storedData[n]={elem:a,x:d,expan:p,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===u[n].mode){l=m.length;var E=createNS("g");for(o=0;o<l;o+=1)E.appendChild(m[o]);var S=createNS("mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",g+"_"+f),S.appendChild(a),i.appendChild(S),E.setAttribute("mask","url("+getLocationHref()+"#"+g+"_"+f+")"),m.length=0,m.push(E)}else m.push(a);u[n].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[n]={elem:a,lastPath:"",op:PropertyFactory.getProp(this.element,u[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,u[n],3),invRect:c},this.viewData[n].prop.k||this.drawPath(u[n],this.viewData[n].prop.v,this.viewData[n])}for(this.maskElement=createNS(y),s=m.length,n=0;n<s;n+=1)this.maskElement.appendChild(m[n]);f>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+g+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,r=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r<n;){if(this.hierarchy[r].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}r+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),r=0;r<n;r+=1)t.multiply(this.hierarchy[r].finalTransform.mProp.v)}this.localTransforms&&!this.finalTransform._matMdf||(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var r=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(r),e=1;e<t;e+=1){var n=this.localTransforms[e].matrix;r.multiply(n)}r.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var a=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)a*=.01*this.localTransforms[e].opacity;this.finalTransform.localOpacity=a}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var t=0,r=e.length;for(t=0;t<r;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var r,n=!0,a=this.comp;n;)a.finalTransform?(a.data.hasMask&&t.splice(0,0,a.finalTransform),a=a.comp):n=!1;var i,s=t.length;for(r=0;r<s;r+=1)i=t[r].mat.applyToPointArray(0,0,0),e=[e[0]-i[0],e[1]-i[1],0];return e},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(e){return this.viewData[e].prop},MaskElement.prototype.renderFrame=function(e){var t,r=this.element.finalTransform.mat,n=this.masksProperties.length;for(t=0;t<n;t+=1)if((this.viewData[t].prop._mdf||e)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),(this.viewData[t].op._mdf||e)&&this.viewData[t].elem.setAttribute("fill-opacity",this.viewData[t].op.v),"n"!==this.masksProperties[t].mode&&(this.viewData[t].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[t].invRect.setAttribute("transform",r.getInverseMatrix().to2dCSS()),this.storedData[t].x&&(this.storedData[t].x._mdf||e))){var a=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[t].filterId+")")),a.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var e="M0,0 ";return e+=" h"+this.globalData.compSize.w,e+=" v"+this.globalData.compSize.h,e+=" h-"+this.globalData.compSize.w,e+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(e,t,r){var n,a,i=" M"+t.v[0][0]+","+t.v[0][1];for(a=t._length,n=1;n<a;n+=1)i+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[n][0]+","+t.i[n][1]+" "+t.v[n][0]+","+t.v[n][1];if(t.c&&a>1&&(i+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==i){var s="";r.elem&&(t.c&&(s=e.inv?this.solidPath+i:i),r.elem.setAttribute("d",s)),r.lastPath=i}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={createFilter:function(e,t){var r=createNS("filter");return r.setAttribute("id",e),!0!==t&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},createAlphaToLuminanceFilter:function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e}};return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,r,n="SourceGraphic",a=e.data.ef?e.data.ef.length:0,i=createElementID(),s=filtersFactory.createFilter(i,!0),o=0;for(this.filters=[],t=0;t<a;t+=1){r=null;var l=e.data.ef[t].ty;registeredEffects$1[l]&&(r=new(0,registeredEffects$1[l].effect)(s,e.effectsManager.effectElements[t],e,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)),r&&this.filters.push(r)}o&&(e.globalData.defs.appendChild(s),e.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+i+")")),this.filters.length&&e.addRenderableComponent(this)}function registerEffect$1(e,t,r){registeredEffects$1[e]={effect:t,countsAsEffect:r}}function SVGBaseElement(){}function HierarchyElement(){}function RenderableDOMElement(){}function IImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,r),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(e,t){this.elem=e,this.pos=t}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},SVGEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},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 e=null;if(this.data.td){this.matteMasks={};var t=createNS("g");t.setAttribute("id",this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var r=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var a=createElementID();if(r.setAttribute("id",a),r.appendChild(n),this.globalData.defs.appendChild(r),this.checkMasks()){var i=createNS("g");i.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),i.appendChild(this.layerElement),this.transformedElement=i,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")")}0!==this.data.bm&&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(e){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[e]){var t,r,n,a,i=this.layerId+"_"+e;if(1===e||3===e){var s=createNS("mask");s.setAttribute("id",i),s.setAttribute("mask-type",3===e?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),s.appendChild(n),this.globalData.defs.appendChild(s),featureSupport.maskType||1!==e||(s.setAttribute("mask-type","luminance"),t=createElementID(),r=filtersFactory.createFilter(t),this.globalData.defs.appendChild(r),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(a=createNS("g")).appendChild(n),s.appendChild(a),a.setAttribute("filter","url("+getLocationHref()+"#"+t+")"))}else if(2===e){var o=createNS("mask");o.setAttribute("id",i),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),t=createElementID(),r=filtersFactory.createFilter(t);var c=createNS("feComponentTransfer");c.setAttribute("in","SourceGraphic"),r.appendChild(c);var h=createNS("feFuncA");h.setAttribute("type","table"),h.setAttribute("tableValues","1.0 0.0"),c.appendChild(h),this.globalData.defs.appendChild(r);var p=createNS("rect");p.setAttribute("width",this.comp.data.w),p.setAttribute("height",this.comp.data.h),p.setAttribute("x","0"),p.setAttribute("y","0"),p.setAttribute("fill","#ffffff"),p.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+t+")"),l.appendChild(p),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(n),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),r.appendChild(filtersFactory.createAlphaToLuminanceFilter()),a=createNS("g"),l.appendChild(p),a.appendChild(this.layerElement),l.appendChild(a)),this.globalData.defs.appendChild(o)}this.matteMasks[e]=i}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+e+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).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(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var e=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",e),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(e){var t,r=this.shapeModifiers.length;for(t=0;t<r;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=this.shapeModifiers.length;0<t;)if(this.shapeModifiers[0].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();for(e=(t=this.shapeModifiers.length)-1;e>=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,r=0,n=t.length;r<n;){if(t[r].elem===e)return t[r].pos;r+=1}return 0},addProcessedElement:function(e,t){for(var r=this.processedElements,n=r.length;n;)if(r[n-=1].elem===e)return void(r[n].pos=t);r.push(new ProcessedElement(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(e,t,r){this.caches=[],this.styles=[],this.transformers=e,this.lStr="",this.sh=r,this.lvl=t,this._isAnimated=!!r.k;for(var n=0,a=e.length;n<a;){if(e[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}function SVGStyleData(e,t){this.data=e,this.type=e.ty,this.d="",this.lvl=t,this._mdf=!1,this.closed=!0===e.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(e,t,r,n){var a;this.elem=e,this.frameId=-1,this.dataProps=createSizedArray(t.length),this.renderer=r,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",t.length?t.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var i,s=t.length||0;for(a=0;a<s;a+=1)i=PropertyFactory.getProp(e,t[a].v,0,0,this),this.k=i.k||this.k,this.dataProps[a]={n:t[a].n,p:i};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.c=PropertyFactory.getProp(e,t.c,1,255,this),this.style=r}function SVGNoStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=r}function GradientProperty(e,t,r){this.data=t,this.c=createTypedArray("uint8c",4*t.p);var n=t.k.k[0].s?t.k.k[0].s.length-4*t.p:t.k.k.length-4*t.p;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(r),this.prop=PropertyFactory.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,r)}function SVGGradientStrokeStyleData(e,t,r){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(e,t.w,0,null,this),this.d=new DashProperty(e,t.d||{},"svg",this),this.initGradientData(e,t,r),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(e,t,r){this.transform={mProps:e,op:t,container:r},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(e){if((this.elem.globalData.frameId!==this.frameId||e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,r=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),t=0;t<r;t+=1)"o"!==this.dataProps[t].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v:this.dashoffset[0]=this.dataProps[t].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(e,t){for(var r=0,n=this.o.length/2;r<n;){if(Math.abs(e[4*r]-e[4*t+2*r])>.01)return!1;r+=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 e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,r,n,a=4*this.data.p;for(t=0;t<a;t+=1)r=t%4==0?100:255,n=Math.round(this.prop.v[t]*r),this.c[t]!==n&&(this.c[t]=n,this._cmdf=!e);if(this.o.length)for(a=this.prop.v.length,t=4*this.data.p;t<a;t+=1)r=t%2==0?100:1,n=t%2==0?Math.round(100*this.prop.v[t]):this.prop.v[t],this.o[t-4*this.data.p]!==n&&(this.o[t-4*this.data.p]=n,this._omdf=!e);this._mdf=!e}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(e,t,r){this.o=PropertyFactory.getProp(e,t.o,0,.01,this),this.s=PropertyFactory.getProp(e,t.s,1,null,this),this.e=PropertyFactory.getProp(e,t.e,1,null,this),this.h=PropertyFactory.getProp(e,t.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(e,t.a||{k:0},0,degToRads,this),this.g=new GradientProperty(e,t.g,this),this.style=r,this.stops=[],this.setGradientData(r.pElem,t),this.setGradientOpacity(t,r),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(e,t){var r=createElementID(),n=createNS(1===t.t?"linearGradient":"radialGradient");n.setAttribute("id",r),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var a,i,s,o=[];for(s=4*t.g.p,i=0;i<s;i+=4)a=createNS("stop"),n.appendChild(a),o.push(a);e.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+r+")"),this.gf=n,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var r,n,a,i=createNS("mask"),s=createNS("path");i.appendChild(s);var o=createElementID(),l=createElementID();i.setAttribute("id",l);var c=createNS(1===e.t?"linearGradient":"radialGradient");c.setAttribute("id",o),c.setAttribute("spreadMethod","pad"),c.setAttribute("gradientUnits","userSpaceOnUse"),a=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var h=this.stops;for(n=4*e.g.p;n<a;n+=2)(r=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),c.appendChild(r),h.push(r);s.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===e.ty&&(s.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),1===e.lj&&s.setAttribute("stroke-miterlimit",e.ml)),this.of=c,this.ms=i,this.ost=h,this.maskId=l,t.msElem=s}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(e,t,r,n){if(0===t)return"";var a,i=e.o,s=e.i,o=e.v,l=" M"+n.applyToPointStringified(o[0][0],o[0][1]);for(a=1;a<t;a+=1)l+=" C"+n.applyToPointStringified(i[a-1][0],i[a-1][1])+" "+n.applyToPointStringified(s[a][0],s[a][1])+" "+n.applyToPointStringified(o[a][0],o[a][1]);return r&&t&&(l+=" C"+n.applyToPointStringified(i[a-1][0],i[a-1][1])+" "+n.applyToPointStringified(s[0][0],s[0][1])+" "+n.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var e=new Matrix,t=new Matrix;function r(e,t,r){(r||t.transform.op._mdf)&&t.transform.container.setAttribute("opacity",t.transform.op.v),(r||t.transform.mProps._mdf)&&t.transform.container.setAttribute("transform",t.transform.mProps.v.to2dCSS())}function n(){}function a(r,n,a){var i,s,o,l,c,h,p,d,u,f,m=n.styles.length,g=n.lvl;for(h=0;h<m;h+=1){if(l=n.sh._mdf||a,n.styles[h].lvl<g){for(d=t.reset(),u=g-n.styles[h].lvl,f=n.transformers.length-1;!l&&u>0;)l=n.transformers[f].mProps._mdf||l,u-=1,f-=1;if(l)for(u=g-n.styles[h].lvl,f=n.transformers.length-1;u>0;)d.multiply(n.transformers[f].mProps.v),u-=1,f-=1}else d=e;if(s=(p=n.sh.paths)._length,l){for(o="",i=0;i<s;i+=1)(c=p.shapes[i])&&c._length&&(o+=buildShapeString(c,c._length,c.c,d));n.caches[h]=o}else o=n.caches[h];n.styles[h].d+=!0===r.hd?"":o,n.styles[h]._mdf=l||n.styles[h]._mdf}}function i(e,t,r){var n=t.style;(t.c._mdf||r)&&n.pElem.setAttribute("fill","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("fill-opacity",t.o.v)}function s(e,t,r){o(e,t,r),l(0,t,r)}function o(e,t,r){var n,a,i,s,o,l=t.gf,c=t.g._hasOpacity,h=t.s.v,p=t.e.v;if(t.o._mdf||r){var d="gf"===e.ty?"fill-opacity":"stroke-opacity";t.style.pElem.setAttribute(d,t.o.v)}if(t.s._mdf||r){var u=1===e.t?"x1":"cx",f="x1"===u?"y1":"cy";l.setAttribute(u,h[0]),l.setAttribute(f,h[1]),c&&!t.g._collapsable&&(t.of.setAttribute(u,h[0]),t.of.setAttribute(f,h[1]))}if(t.g._cmdf||r){n=t.cst;var m=t.g.c;for(i=n.length,a=0;a<i;a+=1)(s=n[a]).setAttribute("offset",m[4*a]+"%"),s.setAttribute("stop-color","rgb("+m[4*a+1]+","+m[4*a+2]+","+m[4*a+3]+")")}if(c&&(t.g._omdf||r)){var g=t.g.o;for(i=(n=t.g._collapsable?t.cst:t.ost).length,a=0;a<i;a+=1)s=n[a],t.g._collapsable||s.setAttribute("offset",g[2*a]+"%"),s.setAttribute("stop-opacity",g[2*a+1])}if(1===e.t)(t.e._mdf||r)&&(l.setAttribute("x2",p[0]),l.setAttribute("y2",p[1]),c&&!t.g._collapsable&&(t.of.setAttribute("x2",p[0]),t.of.setAttribute("y2",p[1])));else if((t.s._mdf||t.e._mdf||r)&&(o=Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)),l.setAttribute("r",o),c&&!t.g._collapsable&&t.of.setAttribute("r",o)),t.s._mdf||t.e._mdf||t.h._mdf||t.a._mdf||r){o||(o=Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)));var y=Math.atan2(p[1]-h[1],p[0]-h[0]),v=t.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,E=Math.cos(y+t.a.v)*b+h[0],S=Math.sin(y+t.a.v)*b+h[1];l.setAttribute("fx",E),l.setAttribute("fy",S),c&&!t.g._collapsable&&(t.of.setAttribute("fx",E),t.of.setAttribute("fy",S))}}function l(e,t,r){var n=t.style,a=t.d;a&&(a._mdf||r)&&a.dashStr&&(n.pElem.setAttribute("stroke-dasharray",a.dashStr),n.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),t.c&&(t.c._mdf||r)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||r)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return i;case"gf":return o;case"gs":return s;case"st":return l;case"sh":case"el":case"rc":case"sr":return a;case"tr":return r;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),this.prevViewData=[]}function LetterProps(e,t,r,n,a,i){this.o=e,this.sw=t,this.sc=r,this.fc=n,this.m=a,this.p=i,this._mdf={o:!0,sw:!!t,sc:!!r,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}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 e,t,r,n,a=this.shapes.length,i=this.stylesList.length,s=[],o=!1;for(r=0;r<i;r+=1){for(n=this.stylesList[r],o=!1,s.length=0,e=0;e<a;e+=1)-1!==(t=this.shapes[e]).styles.indexOf(n)&&(s.push(t),o=t._isAnimated||o);s.length>1&&o&&this.setShapesAsAnimated(s)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(e,t){var r,n=new SVGStyleData(e,t),a=n.pElem;return"st"===e.ty?r=new SVGStrokeStyleData(this,e,n):"fl"===e.ty?r=new SVGFillStyleData(this,e,n):"gf"===e.ty||"gs"===e.ty?(r=new("gf"===e.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,e,n),this.globalData.defs.appendChild(r.gf),r.maskId&&(this.globalData.defs.appendChild(r.ms),this.globalData.defs.appendChild(r.of),a.setAttribute("mask","url("+getLocationHref()+"#"+r.maskId+")"))):"no"===e.ty&&(r=new SVGNoStyleData(this,e,n)),"st"!==e.ty&&"gs"!==e.ty||(a.setAttribute("stroke-linecap",lineCapEnum[e.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[e.lj||2]),a.setAttribute("fill-opacity","0"),1===e.lj&&a.setAttribute("stroke-miterlimit",e.ml)),2===e.r&&a.setAttribute("fill-rule","evenodd"),e.ln&&a.setAttribute("id",e.ln),e.cl&&a.setAttribute("class",e.cl),e.bm&&(a.style["mix-blend-mode"]=getBlendMode(e.bm)),this.stylesList.push(n),this.addToAnimatedContents(e,r),r},SVGShapeElement.prototype.createGroupElement=function(e){var t=new ShapeGroupData;return e.ln&&t.gr.setAttribute("id",e.ln),e.cl&&t.gr.setAttribute("class",e.cl),e.bm&&(t.gr.style["mix-blend-mode"]=getBlendMode(e.bm)),t},SVGShapeElement.prototype.createTransformElement=function(e,t){var r=TransformPropertyFactory.getTransformProperty(this,e,this),n=new SVGTransformData(r,r.o,t);return this.addToAnimatedContents(e,n),n},SVGShapeElement.prototype.createShapeElement=function(e,t,r){var n=4;"rc"===e.ty?n=5:"el"===e.ty?n=6:"sr"===e.ty&&(n=7);var a=new SVGShapeData(t,r,ShapePropertyFactory.getShapeProp(this,e,n,this));return this.shapes.push(a),this.addShapeToModifiers(a),this.addToAnimatedContents(e,a),a},SVGShapeElement.prototype.addToAnimatedContents=function(e,t){for(var r=0,n=this.animatedContents.length;r<n;){if(this.animatedContents[r].element===t)return;r+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(e),element:t,data:e})},SVGShapeElement.prototype.setElementStyles=function(e){var t,r=e.styles,n=this.stylesList.length;for(t=0;t<n;t+=1)-1!==r.indexOf(this.stylesList[t])||this.stylesList[t].closed||r.push(this.stylesList[t])},SVGShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(e,t,r,n,a,i,s){var o,l,c,h,p,d,u=[].concat(i),f=e.length-1,m=[],g=[];for(o=f;o>=0;o-=1){if((d=this.searchProcessedElement(e[o]))?t[o]=r[d-1]:e[o]._render=s,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty||"no"===e[o].ty)d?t[o].style.closed=e[o].hd:t[o]=this.createStyleElement(e[o],a),e[o]._render&&t[o].style.pElem.parentNode!==n&&n.appendChild(t[o].style.pElem),m.push(t[o].style);else if("gr"===e[o].ty){if(d)for(c=t[o].it.length,l=0;l<c;l+=1)t[o].prevViewData[l]=t[o].it[l];else t[o]=this.createGroupElement(e[o]);this.searchShapes(e[o].it,t[o].it,t[o].prevViewData,t[o].gr,a+1,u,s),e[o]._render&&t[o].gr.parentNode!==n&&n.appendChild(t[o].gr)}else"tr"===e[o].ty?(d||(t[o]=this.createTransformElement(e[o],n)),h=t[o].transform,u.push(h)):"sh"===e[o].ty||"rc"===e[o].ty||"el"===e[o].ty||"sr"===e[o].ty?(d||(t[o]=this.createShapeElement(e[o],u,a)),this.setElementStyles(t[o])):"tm"===e[o].ty||"rd"===e[o].ty||"ms"===e[o].ty||"pb"===e[o].ty||"zz"===e[o].ty||"op"===e[o].ty?(d?(p=t[o]).closed=!1:((p=ShapeModifiers.getModifier(e[o].ty)).init(this,e[o]),t[o]=p,this.shapeModifiers.push(p)),g.push(p)):"rp"===e[o].ty&&(d?(p=t[o]).closed=!0:(p=ShapeModifiers.getModifier(e[o].ty),t[o]=p,p.init(this,e,o,t),this.shapeModifiers.push(p),s=!1),g.push(p));this.addProcessedElement(e[o],o+1)}for(f=m.length,o=0;o<f;o+=1)m[o].closed=!0;for(f=g.length,o=0;o<f;o+=1)g[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var e;this.renderModifiers();var t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute("d",this.stylesList[e].d),this.stylesList[e].d="M0 0"+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute("d",this.stylesList[e].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var e,t,r=this.animatedContents.length;for(e=0;e<r;e+=1)t=this.animatedContents[e],(this._isFirstFrame||t.element._isAnimated)&&!0!==t.data&&t.fn(t.data,t.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(e,t,r,n,a,i){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 s=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,s=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,s=!0),this.sc!==r&&(this.sc=r,this._mdf.sc=!0,s=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,s=!0),this.m!==a&&(this.m=a,this._mdf.m=!0,s=!0),!i.length||this.p[0]===i[0]&&this.p[1]===i[1]&&this.p[4]===i[4]&&this.p[5]===i[5]&&this.p[12]===i[12]&&this.p[13]===i[13]||(this.p=i,this._mdf.p=!0,s=!0),s},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},TextProperty.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,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(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,i=e||this.data.d.k[this.keysIndex].s;for(n=0;n<a;n+=1)i=r!==this.keysIndex?this.effectsSequence[n](i,i.t):this.effectsSequence[n](this.currentData,i.t);t!==i&&this.setCurrentData(i),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,r=0,n=e.length;r<=n-1&&!(r===n-1||e[r+1].t>t);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,r,n=[],a=0,i=e.length,s=!1,o=!1,l="";a<i;)s=o,o=!1,t=e.charCodeAt(a),l=e.charAt(a),FontManager.isCombinedCharacter(t)?s=!0:t>=55296&&t<=56319?FontManager.isRegionalFlag(e,a)?l=e.substr(a,14):(r=e.charCodeAt(a+1))>=56320&&r<=57343&&(FontManager.isModifier(t,r)?(l=e.substr(a,2),s=!0):l=FontManager.isFlagEmoji(e.substr(a,4))?e.substr(a,4):e.substr(a,2)):t>56319?(r=e.charCodeAt(a+1),FontManager.isVariationSelector(t)&&(s=!0)):FontManager.isZeroWidthJoiner(t)&&(s=!0,o=!0),s?(n[n.length-1]+=l,s=!1):n.push(l),a+=l.length;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,r,n,a,i,s,o,l=this.elem.globalData.fontManager,c=this.data,h=[],p=0,d=c.m.g,u=0,f=0,m=0,g=[],y=0,v=0,b=l.getFontByName(e.f),E=0,S=getFontProperties(b);e.fWeight=S.weight,e.fStyle=S.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),r=e.finalText.length,e.finalLineHeight=e.lh;var _,T=e.tr/1e3*e.finalSize;if(e.sz)for(var k,x,P=!0,A=e.sz[0],C=e.sz[1];P;){k=0,y=0,r=(x=this.buildFinalText(e.t)).length,T=e.tr/1e3*e.finalSize;var I=-1;for(t=0;t<r;t+=1)_=x[t].charCodeAt(0),n=!1," "===x[t]?I=t:13!==_&&3!==_||(y=0,n=!0,k+=e.finalLineHeight||1.2*e.finalSize),l.chars?(o=l.getCharData(x[t],b.fStyle,b.fFamily),E=n?0:o.w*e.finalSize/100):E=l.measureText(x[t],e.f,e.finalSize),y+E>A&&" "!==x[t]?(-1===I?r+=1:t=I,k+=e.finalLineHeight||1.2*e.finalSize,x.splice(t,I===t?1:0,"\r"),I=-1,y=0):(y+=E,y+=T);k+=b.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&C<k?(e.finalSize-=1,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=x,r=e.finalText.length,P=!1)}y=-T,E=0;var w,D=0;for(t=0;t<r;t+=1)if(n=!1,13===(_=(w=e.finalText[t]).charCodeAt(0))||3===_?(D=0,g.push(y),v=y>v?y:v,y=-2*T,a="",n=!0,m+=1):a=w,l.chars?(o=l.getCharData(w,b.fStyle,l.getFontByName(e.f).fFamily),E=n?0:o.w*e.finalSize/100):E=l.measureText(a,e.f,e.finalSize)," "===w?D+=E+T:(y+=E+T+D,D=0),h.push({l:E,an:E,add:u,n:n,anIndexes:[],val:a,line:m,animatorJustifyOffset:0}),2==d){if(u+=E,""===a||" "===a||t===r-1){for(""!==a&&" "!==a||(u-=E);f<=t;)h[f].an=u,h[f].ind=p,h[f].extra=E,f+=1;p+=1,u=0}}else if(3==d){if(u+=E,""===a||t===r-1){for(""===a&&(u-=E);f<=t;)h[f].an=u,h[f].ind=p,h[f].extra=E,f+=1;u=0,p+=1}}else h[p].ind=p,h[p].extra=0,p+=1;if(e.l=h,v=y>v?y:v,g.push(y),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=g;var M,R,N,L,F=c.a;s=F.length;var O=[];for(i=0;i<s;i+=1){for((M=F[i]).a.sc&&(e.strokeColorAnim=!0),M.a.sw&&(e.strokeWidthAnim=!0),(M.a.fc||M.a.fh||M.a.fs||M.a.fb)&&(e.fillColorAnim=!0),L=0,N=M.s.b,t=0;t<r;t+=1)(R=h[t]).anIndexes[i]=L,(1==N&&""!==R.val||2==N&&""!==R.val&&" "!==R.val||3==N&&(R.n||" "==R.val||t==r-1)||4==N&&(R.n||t==r-1))&&(1===M.s.rn&&O.push(L),L+=1);c.a[i].s.totalChars=L;var B,$=-1;if(1===M.s.rn)for(t=0;t<r;t+=1)$!=(R=h[t]).anIndexes[i]&&($=R.anIndexes[i],B=O.splice(Math.floor(Math.random()*O.length),1)[0]),R.anIndexes[i]=B}e.yOffset=e.finalLineHeight||1.2*e.finalSize,e.ls=e.ls||0,e.ascent=b.ascent*e.finalSize/100},TextProperty.prototype.updateDocumentData=function(e,t){t=void 0===t?this.keysIndex:t;var r=this.copyData({},this.data.d.k[t].s);r=this.copyData(r,e),this.data.d.k[t].s=r,this.recalculate(t),this.setCurrentData(r),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},TextProperty.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var e=Math.max,t=Math.min,r=Math.floor;function n(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=PropertyFactory.getProp(e,t.s||{k:0},0,0,this),this.e="e"in t?PropertyFactory.getProp(e,t.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(e,t.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(e,t.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(e,t.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(e,t.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return n.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var a=0,i=0,s=1,o=1;this.ne.v>0?a=this.ne.v/100:i=-this.ne.v/100,this.xe.v>0?s=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(a,i,s,o).get,c=0,h=this.finalS,p=this.finalE,d=this.data.sh;if(2===d)c=l(c=p===h?n>=p?1:0:e(0,t(.5/(p-h)+(n-h)/(p-h),1)));else if(3===d)c=l(c=p===h?n>=p?0:1:1-e(0,t(.5/(p-h)+(n-h)/(p-h),1)));else if(4===d)p===h?c=0:(c=e(0,t(.5/(p-h)+(n-h)/(p-h),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===d){if(p===h)c=0;else{var u=p-h,f=-u/2+(n=t(e(0,n+.5-h),p-h)),m=u/2;c=Math.sqrt(1-f*f/(m*m))}c=l(c)}else 6===d?(p===h?c=0:(n=t(e(0,n+.5-h),p-h),c=(1+Math.cos(Math.PI+2*Math.PI*n/(p-h)))/2),c=l(c)):(n>=r(h)&&(c=e(0,t(n-h<0?t(p,1)-(h-n):p-n,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;c<y?c=0:(c=(c-y)/g)>1&&(c=1)}return c*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/t,n=this.s.v/t+r,a=this.e.v/t+r;if(n>a){var i=n;n=a,a=i}this.finalS=n,this.finalE=a}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,r){return new n(e,t)}}}();function TextAnimatorDataProperty(e,t,r){var n={propType:!1},a=PropertyFactory.getProp,i=t.a;this.a={r:i.r?a(e,i.r,0,degToRads,r):n,rx:i.rx?a(e,i.rx,0,degToRads,r):n,ry:i.ry?a(e,i.ry,0,degToRads,r):n,sk:i.sk?a(e,i.sk,0,degToRads,r):n,sa:i.sa?a(e,i.sa,0,degToRads,r):n,s:i.s?a(e,i.s,1,.01,r):n,a:i.a?a(e,i.a,1,0,r):n,o:i.o?a(e,i.o,0,.01,r):n,p:i.p?a(e,i.p,1,0,r):n,sw:i.sw?a(e,i.sw,0,0,r):n,sc:i.sc?a(e,i.sc,1,0,r):n,fc:i.fc?a(e,i.fc,1,0,r):n,fh:i.fh?a(e,i.fh,0,0,r):n,fs:i.fs?a(e,i.fs,0,.01,r):n,fb:i.fb?a(e,i.fb,0,.01,r):n,t:i.t?a(e,i.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,r=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e<r;e+=1)t=this._textData.a[e],this._animatorsData[e]=new TextAnimatorDataProperty(this._elem,t,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(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=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,this._mdf||this._isFirstFrame||t||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var r,n,a,i,s,o,l,c,h,p,d,u,f,m,g,y,v,b,E,S=this._moreOptions.alignment.v,_=this._animatorsData,T=this._textData,k=this.mHelper,x=this._renderType,P=this.renderedLetters.length,A=e.l;if(this._hasMaskedPath){if(E=this._pathData.m,!this._pathData.n||this._pathData._mdf){var C,I=E.v;for(this._pathData.r.v&&(I=I.reverse()),s={tLength:0,segments:[]},i=I._length-1,y=0,a=0;a<i;a+=1)C=bez.buildBezierData(I.v[a],I.v[a+1],[I.o[a][0]-I.v[a][0],I.o[a][1]-I.v[a][1]],[I.i[a+1][0]-I.v[a+1][0],I.i[a+1][1]-I.v[a+1][1]]),s.tLength+=C.segmentLength,s.segments.push(C),y+=C.segmentLength;a=i,E.v.c&&(C=bez.buildBezierData(I.v[a],I.v[0],[I.o[a][0]-I.v[a][0],I.o[a][1]-I.v[a][1]],[I.i[0][0]-I.v[0][0],I.i[0][1]-I.v[0][1]]),s.tLength+=C.segmentLength,s.segments.push(C),y+=C.segmentLength),this._pathData.pi=s}if(s=this._pathData.pi,o=this._pathData.f.v,d=0,p=1,c=0,h=!0,m=s.segments,o<0&&E.v.c)for(s.tLength<Math.abs(o)&&(o=-Math.abs(o)%s.tLength),p=(f=m[d=m.length-1].points).length-1;o<0;)o+=f[p].partialLength,(p-=1)<0&&(p=(f=m[d-=1].points).length-1);u=(f=m[d].points)[p-1],g=(l=f[p]).partialLength}i=A.length,r=0,n=0;var w,D,M,R,N,L=1.2*e.finalSize*.714,F=!0;M=_.length;var O,B,$,V,G,z,U,q,H,j,W,K,Y=-1,J=o,X=d,Q=p,Z=-1,ee="",te=this.defaultPropsArray;if(2===e.j||1===e.j){var re=0,ne=0,ae=2===e.j?-.5:-1,ie=0,se=!0;for(a=0;a<i;a+=1)if(A[a].n){for(re&&(re+=ne);ie<a;)A[ie].animatorJustifyOffset=re,ie+=1;re=0,se=!0}else{for(D=0;D<M;D+=1)(w=_[D].a).t.propType&&(se&&2===e.j&&(ne+=w.t.v*ae),(N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?re+=w.t.v*N[0]*ae:re+=w.t.v*N*ae);se=!1}for(re&&(re+=ne);ie<a;)A[ie].animatorJustifyOffset=re,ie+=1}for(a=0;a<i;a+=1){if(k.reset(),V=1,A[a].n)r=0,n+=e.yOffset,n+=F?1:0,o=J,F=!1,this._hasMaskedPath&&(p=Q,u=(f=m[d=X].points)[p-1],g=(l=f[p]).partialLength,c=0),ee="",W="",H="",K="",te=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Z!==A[a].line){switch(e.j){case 1:o+=y-e.lineWidths[A[a].line];break;case 2:o+=(y-e.lineWidths[A[a].line])/2}Z=A[a].line}Y!==A[a].ind&&(A[Y]&&(o+=A[Y].extra),o+=A[a].an/2,Y=A[a].ind),o+=S[0]*A[a].an*.005;var oe=0;for(D=0;D<M;D+=1)(w=_[D].a).p.propType&&((N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?oe+=w.p.v[0]*N[0]:oe+=w.p.v[0]*N),w.a.propType&&((N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?oe+=w.a.v[0]*N[0]:oe+=w.a.v[0]*N);for(h=!0,this._pathData.a.v&&(o=.5*A[0].an+(y-this._pathData.f.v-.5*A[0].an-.5*A[A.length-1].an)*Y/(i-1),o+=this._pathData.f.v);h;)c+g>=o+oe||!f?(v=(o+oe-c)/l.partialLength,B=u.point[0]+(l.point[0]-u.point[0])*v,$=u.point[1]+(l.point[1]-u.point[1])*v,k.translate(-S[0]*A[a].an*.005,-S[1]*L*.01),h=!1):f&&(c+=l.partialLength,(p+=1)>=f.length&&(p=0,m[d+=1]?f=m[d].points:E.v.c?(p=0,f=m[d=0].points):(c-=l.partialLength,f=null)),f&&(u=l,g=(l=f[p]).partialLength));O=A[a].an/2-A[a].add,k.translate(-O,0,0)}else O=A[a].an/2-A[a].add,k.translate(-O,0,0),k.translate(-S[0]*A[a].an*.005,-S[1]*L*.01,0);for(D=0;D<M;D+=1)(w=_[D].a).t.propType&&(N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars),0===r&&0===e.j||(this._hasMaskedPath?N.length?o+=w.t.v*N[0]:o+=w.t.v*N:N.length?r+=w.t.v*N[0]:r+=w.t.v*N));for(e.strokeWidthAnim&&(z=e.sw||0),e.strokeColorAnim&&(G=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(U=[e.fc[0],e.fc[1],e.fc[2]]),D=0;D<M;D+=1)(w=_[D].a).a.propType&&((N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?k.translate(-w.a.v[0]*N[0],-w.a.v[1]*N[1],w.a.v[2]*N[2]):k.translate(-w.a.v[0]*N,-w.a.v[1]*N,w.a.v[2]*N));for(D=0;D<M;D+=1)(w=_[D].a).s.propType&&((N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars)).length?k.scale(1+(w.s.v[0]-1)*N[0],1+(w.s.v[1]-1)*N[1],1):k.scale(1+(w.s.v[0]-1)*N,1+(w.s.v[1]-1)*N,1));for(D=0;D<M;D+=1){if(w=_[D].a,N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars),w.sk.propType&&(N.length?k.skewFromAxis(-w.sk.v*N[0],w.sa.v*N[1]):k.skewFromAxis(-w.sk.v*N,w.sa.v*N)),w.r.propType&&(N.length?k.rotateZ(-w.r.v*N[2]):k.rotateZ(-w.r.v*N)),w.ry.propType&&(N.length?k.rotateY(w.ry.v*N[1]):k.rotateY(w.ry.v*N)),w.rx.propType&&(N.length?k.rotateX(w.rx.v*N[0]):k.rotateX(w.rx.v*N)),w.o.propType&&(N.length?V+=(w.o.v*N[0]-V)*N[0]:V+=(w.o.v*N-V)*N),e.strokeWidthAnim&&w.sw.propType&&(N.length?z+=w.sw.v*N[0]:z+=w.sw.v*N),e.strokeColorAnim&&w.sc.propType)for(q=0;q<3;q+=1)N.length?G[q]+=(w.sc.v[q]-G[q])*N[0]:G[q]+=(w.sc.v[q]-G[q])*N;if(e.fillColorAnim&&e.fc){if(w.fc.propType)for(q=0;q<3;q+=1)N.length?U[q]+=(w.fc.v[q]-U[q])*N[0]:U[q]+=(w.fc.v[q]-U[q])*N;w.fh.propType&&(U=N.length?addHueToRGB(U,w.fh.v*N[0]):addHueToRGB(U,w.fh.v*N)),w.fs.propType&&(U=N.length?addSaturationToRGB(U,w.fs.v*N[0]):addSaturationToRGB(U,w.fs.v*N)),w.fb.propType&&(U=N.length?addBrightnessToRGB(U,w.fb.v*N[0]):addBrightnessToRGB(U,w.fb.v*N))}}for(D=0;D<M;D+=1)(w=_[D].a).p.propType&&(N=_[D].s.getMult(A[a].anIndexes[D],T.a[D].s.totalChars),this._hasMaskedPath?N.length?k.translate(0,w.p.v[1]*N[0],-w.p.v[2]*N[1]):k.translate(0,w.p.v[1]*N,-w.p.v[2]*N):N.length?k.translate(w.p.v[0]*N[0],w.p.v[1]*N[1],-w.p.v[2]*N[2]):k.translate(w.p.v[0]*N,w.p.v[1]*N,-w.p.v[2]*N));if(e.strokeWidthAnim&&(H=z<0?0:z),e.strokeColorAnim&&(j="rgb("+Math.round(255*G[0])+","+Math.round(255*G[1])+","+Math.round(255*G[2])+")"),e.fillColorAnim&&e.fc&&(W="rgb("+Math.round(255*U[0])+","+Math.round(255*U[1])+","+Math.round(255*U[2])+")"),this._hasMaskedPath){if(k.translate(0,-e.ls),k.translate(0,S[1]*L*.01+n,0),this._pathData.p.v){b=(l.point[1]-u.point[1])/(l.point[0]-u.point[0]);var le=180*Math.atan(b)/Math.PI;l.point[0]<u.point[0]&&(le+=180),k.rotate(-le*Math.PI/180)}k.translate(B,$,0),o-=S[0]*A[a].an*.005,A[a+1]&&Y!==A[a+1].ind&&(o+=A[a].an/2,o+=.001*e.tr*e.finalSize)}else{switch(k.translate(r,n,0),e.ps&&k.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:k.translate(A[a].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[A[a].line]),0,0);break;case 2:k.translate(A[a].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[A[a].line])/2,0,0)}k.translate(0,-e.ls),k.translate(O,0,0),k.translate(S[0]*A[a].an*.005,S[1]*L*.01,0),r+=A[a].l+.001*e.tr*e.finalSize}"html"===x?ee=k.toCSS():"svg"===x?ee=k.to2dCSS():te=[k.props[0],k.props[1],k.props[2],k.props[3],k.props[4],k.props[5],k.props[6],k.props[7],k.props[8],k.props[9],k.props[10],k.props[11],k.props[12],k.props[13],k.props[14],k.props[15]],K=V}P<=a?(R=new LetterProps(K,H,j,W,ee,te),this.renderedLetters.push(R),P+=1,this.lettersChangedFlag=!0):(R=this.renderedLetters[a],this.lettersChangedFlag=R.update(K,H,j,W,ee,te)||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),ITextElement.prototype.initElement=function(e,t,r){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,r),this.textProperty=new TextProperty(this,e.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(e.t,this.renderType,this),this.initTransform(e,t,r),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},ITextElement.prototype.createPathShape=function(e,t){var r,n,a=t.length,i="";for(r=0;r<a;r+=1)"sh"===t[r].ty&&(n=t[r].ks.k,i+=buildShapeString(n,n.i.length,!0,e));return i},ITextElement.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},ITextElement.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},ITextElement.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},ITextElement.prototype.applyTextPropertiesToMatrix=function(e,t,r,n,a){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[r])/2,0,0)}t.translate(n,a,0)},ITextElement.prototype.buildColor=function(e){return"rgb("+Math.round(255*e[0])+","+Math.round(255*e[1])+","+Math.round(255*e[2])+")"},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(e,t,r){this.textSpans=[],this.renderType="svg",this.initElement(e,t,r)}function ISolidElement(e,t,r){this.initElement(e,t,r)}function NullElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initFrame(),this.initTransform(e,t,r),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(e,t,r){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function SVGRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var r="";if(t&&t.title){var n=createNS("title"),a=createElementID();n.setAttribute("id",a),n.textContent=t.title,this.svgElement.appendChild(n),r+=a}if(t&&t.description){var i=createNS("desc"),s=createElementID();i.setAttribute("id",s),i.textContent=t.description,this.svgElement.appendChild(i),r+=" "+s}r&&this.svgElement.setAttribute("aria-labelledby",r);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&!1===t.hideOnTransparent),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||"",id:t&&t.id||"",focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||"100%",height:t&&t.filterSize&&t.filterSize.height||"100%",x:t&&t.filterSize&&t.filterSize.x||"0%",y:t&&t.filterSize&&t.filterSize.y||"0%"},width:t&&t.width,height:t&&t.height,runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}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(e){for(var t=0,r=e.length,n=[],a="";t<r;)e[t]===String.fromCharCode(13)||e[t]===String.fromCharCode(3)?(n.push(a),a=""):a+=e[t],t+=1;return n.push(a),n},SVGTextLottieElement.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var r=e.shapes[0];if(r.it){var n=r.it[r.it.length-1];n.s&&(n.s.k[0]=t,n.s.k[1]=t)}}return e},SVGTextLottieElement.prototype.buildNewText=function(){var e,t;this.addDynamicProperty(this);var r=this.textProperty.currentData;this.renderedLetters=createSizedArray(r?r.l.length:0),r.fc?this.layerElement.setAttribute("fill",this.buildColor(r.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),r.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(r.sc)),this.layerElement.setAttribute("stroke-width",r.sw)),this.layerElement.setAttribute("font-size",r.finalSize);var n=this.globalData.fontManager.getFontByName(r.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var a=r.fWeight,i=r.fStyle;this.layerElement.setAttribute("font-style",i),this.layerElement.setAttribute("font-weight",a)}this.layerElement.setAttribute("aria-label",r.t);var s,o=r.l||[],l=!!this.globalData.fontManager.chars;t=o.length;var c=this.mHelper,h=this.data.singleShape,p=0,d=0,u=!0,f=.001*r.tr*r.finalSize;if(!h||l||r.sz){var m,g=this.textSpans.length;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!l||!h||0===e){if(s=g>e?this.textSpans[e].span:createNS(l?"g":"text"),g<=e){if(s.setAttribute("stroke-linecap","butt"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=s,l){var y=createNS("g");s.appendChild(y),this.textSpans[e].childSpan=y}this.textSpans[e].span=s,this.layerElement.appendChild(s)}s.style.display="inherit"}if(c.reset(),h&&(o[e].n&&(p=-f,d+=r.yOffset,d+=u?1:0,u=!1),this.applyTextPropertiesToMatrix(r,c,o[e].line,p,d),p+=o[e].l||0,p+=f),l){var v;if(1===(m=this.globalData.fontManager.getCharData(r.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(m.data,this.globalData,this);else{var b=emptyShapeData;m.data&&m.data.shapes&&(b=this.buildShapeData(m.data,r.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[e].glyph){var E=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(E.layerElement),E.destroy()}this.textSpans[e].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[e].childSpan.appendChild(v.layerElement),1===m.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else h&&s.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),s.textContent=o[e].val,s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&s&&s.setAttribute("d","")}else{var S=this.textContainer,_="start";switch(r.j){case 1:_="end";break;case 2:_="middle";break;default:_="start"}S.setAttribute("text-anchor",_),S.setAttribute("letter-spacing",f);var T=this.buildTextContents(r.finalText);for(t=T.length,d=r.ps?r.ps[1]+r.ascent:0,e=0;e<t;e+=1)(s=this.textSpans[e].span||createNS("tspan")).textContent=T[e],s.setAttribute("x",0),s.setAttribute("y",d),s.style.display="inherit",S.appendChild(s),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=s,d+=r.finalLineHeight;this.layerElement.appendChild(S)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display="none",e+=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 e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var e,t,r=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<r;e+=1)(t=this.textSpans[e].glyph)&&(t.prepareFrame(this.comp.renderedFrame-this.data.st),t._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)){var e,t;this._sizeChanged=!0;var r,n,a,i=this.textAnimator.renderedLetters,s=this.textProperty.currentData.l;for(t=s.length,e=0;e<t;e+=1)s[e].n||(r=i[e],n=this.textSpans[e].span,(a=this.textSpans[e].glyph)&&a.renderFrame(),r._mdf.m&&n.setAttribute("transform",r.m),r._mdf.o&&n.setAttribute("opacity",r.o),r._mdf.sw&&n.setAttribute("stroke-width",r.sw),r._mdf.sc&&n.setAttribute("stroke",r.sc),r._mdf.fc&&n.setAttribute("fill",r.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var e=createNS("rect");e.setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.layerElement.appendChild(e)},NullElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!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),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(e){return new NullElement(e,this.globalData,this)},SVGRendererBase.prototype.createShape=function(e){return new SVGShapeElement(e,this.globalData,this)},SVGRendererBase.prototype.createText=function(e){return new SVGTextLottieElement(e,this.globalData,this)},SVGRendererBase.prototype.createImage=function(e){return new IImageElement(e,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(e){return new ISolidElement(e,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(e){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+e.w+" "+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",e.w),this.svgElement.setAttribute("height",e.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var r=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",e.w),n.setAttribute("height",e.h),n.setAttribute("x",0),n.setAttribute("y",0);var a=createElementID();r.setAttribute("id",a),r.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+a+")"),t.appendChild(r),this.layers=e.layers,this.elements=createSizedArray(e.layers.length)},SVGRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(e){var t=0,r=this.layers.length;for(t=0;t<r;t+=1)if(this.layers[t].ind===e)return t;return-1},SVGRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){t[e]=!0;var r=this.createItem(this.layers[e]);if(t[e]=r,getExpressionsPlugin()&&(0===this.layers[e].ty&&this.globalData.projectInterface.registerComposition(r),r.initExpressions()),this.appendElementInPos(r,e),this.layers[e].tt){var n="tp"in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(-1===n)return;if(this.elements[n]&&!0!==this.elements[n]){var a=t[n].getMatte(this.layers[e].tt);r.setMatte(a)}else this.buildItem(n),this.addPendingElement(r)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,r=this.elements.length;t<r;){if(this.elements[t]===e){var n="tp"in e.data?this.findIndexByInd(e.data.tp):t-1,a=this.elements[n].getMatte(this.layers[t].tt);e.setMatte(a);break}t+=1}}},SVGRendererBase.prototype.renderFrame=function(e){if(this.renderedFrame!==e&&!this.destroyed){var t;null===e?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var r=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=r-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<r;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){for(var n,a=0;a<t;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement()&&(n=this.elements[a].getBaseElement()),a+=1;n?this.layerElement.insertBefore(r,n):this.layerElement.appendChild(r)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initTransform(e,t,r),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&t.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var r,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},ICompElement.prototype.setElements=function(e){this.elements=e},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(e){return new SVGCompElement(e,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(e){var t,r=e.length,n="_";for(t=0;t<r;t+=1)n+=e[t].transform.key+"_";var a=this.sequences[n];return a||(a={transforms:[].concat(e),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=a,this.sequenceList.push(a)),a},processSequence:function(e,t){for(var r=0,n=e.transforms.length,a=t;r<n&&!t;){if(e.transforms[r].transform.mProps._mdf){a=!0;break}r+=1}if(a)for(e.finalTransform.reset(),r=n-1;r>=0;r-=1)e.finalTransform.multiply(e.transforms[r].transform.mProps.v);e._mdf=a},processSequences:function(e){var t,r=this.sequenceList.length;for(t=0;t<r;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var e="__lottie_element_luma_buffer",t=null,r=null,n=null;function a(){var a,i,s;t||(a=createNS("svg"),i=createNS("filter"),s=createNS("feColorMatrix"),i.setAttribute("id",e),s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.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"),i.appendChild(s),a.appendChild(i),a.setAttribute("id",e+"_svg"),featureSupport.svgLumaHidden&&(a.style.display="none"),n=a,document.body.appendChild(n),t=createTag("canvas"),(r=t.getContext("2d")).filter="url(#"+e+")",r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1))}return{load:a,get:function(n){return t||a(),t.width=n.width,t.height=n.height,r.filter="url(#"+e+")",t}}};function createCanvas(e,t){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(e,t);var r=createTag("canvas");return r.width=e,r.height=t,r}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas},registeredEffects={};function CVEffects(e){var t,r,n=e.data.ef?e.data.ef.length:0;for(this.filters=[],t=0;t<n;t+=1){r=null;var a=e.data.ef[t].ty;registeredEffects[a]&&(r=new(0,registeredEffects[a].effect)(e.effectsManager.effectElements[t],e)),r&&this.filters.push(r)}this.filters.length&&e.addRenderableComponent(this)}function registerEffect(e,t){registeredEffects[e]={effect:t}}function CVMaskElement(e,t){var r;this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n=this.masksProperties.length,a=!1;for(r=0;r<n;r+=1)"n"!==this.masksProperties[r].mode&&(a=!0),this.viewData[r]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[r],3);this.hasMasks=a,a&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(e){var t,r=this.filters.length;for(t=0;t<r;t+=1)this.filters[t].renderFrame(e)},CVEffects.prototype.getEffects=function(e){var t,r=this.filters.length,n=[];for(t=0;t<r;t+=1)this.filters[t].type===e&&n.push(this.filters[t]);return n},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var e,t,r,n,a=this.element.finalTransform.mat,i=this.element.canvasContext,s=this.masksProperties.length;for(i.beginPath(),e=0;e<s;e+=1)if("n"!==this.masksProperties[e].mode){var o;this.masksProperties[e].inv&&(i.moveTo(0,0),i.lineTo(this.element.globalData.compSize.w,0),i.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),i.lineTo(0,this.element.globalData.compSize.h),i.lineTo(0,0)),n=this.viewData[e].v,t=a.applyToPointArray(n.v[0][0],n.v[0][1],0),i.moveTo(t[0],t[1]);var l=n._length;for(o=1;o<l;o+=1)r=a.applyToTriplePoints(n.o[o-1],n.i[o],n.v[o]),i.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);r=a.applyToTriplePoints(n.o[o-1],n.i[0],n.v[0]),i.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5])}this.element.globalData.renderer.save(!0),i.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(e,t,r,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var a,i=4;"rc"===t.ty?i=5:"el"===t.ty?i=6:"sr"===t.ty&&(i=7),this.sh=ShapePropertyFactory.getShapeProp(e,t,i,e);var s,o=r.length;for(a=0;a<o;a+=1)r[a].closed||(s={transforms:n.addTransformSequence(r[a].transforms),trNodes:[]},this.styledShapes.push(s),r[a].elements.push(s))}function CVShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(e,t,r)}function CVTextElement(e,t,r){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(e,t,r)}function CVImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,r)}function CVSolidElement(e,t,r){this.initElement(e,t,r)}function CanvasRendererBase(){}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(){var e;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,e=0;e<15;e+=1){var t=new CanvasContext;this.stack[e]=t}this._length=15,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=""}function CVCompElement(e,t,r){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function CanvasRenderer(e,t){this.animationItem=e,this.renderConfig={clearCanvas:!t||void 0===t.clearCanvas||t.clearCanvas,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:t&&t.contentVisibility||"visible",className:t&&t.className||"",id:t&&t.id||"",runExpressions:!t||void 0===t.runExpressions||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new 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))}function HBaseElement(){}function HSolidElement(e,t,r){this.initElement(e,t,r)}function HShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(e,t,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(e,t,r){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(e,t,r)}function HCameraElement(e,t,r){this.initFrame(),this.initBaseData(e,t,r),this.initHierarchy();var n=PropertyFactory.getProp;if(this.pe=n(this,e.pe,0,0,this),e.ks.p.s?(this.px=n(this,e.ks.p.x,1,0,this),this.py=n(this,e.ks.p.y,1,0,this),this.pz=n(this,e.ks.p.z,1,0,this)):this.p=n(this,e.ks.p,1,0,this),e.ks.a&&(this.a=n(this,e.ks.a,1,0,this)),e.ks.or.k.length&&e.ks.or.k[0].to){var a,i=e.ks.or.k.length;for(a=0;a<i;a+=1)e.ks.or.k[a].to=null,e.ks.or.k[a].ti=null}this.or=n(this,e.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,e.ks.rx,0,degToRads,this),this.ry=n(this,e.ks.ry,0,degToRads,this),this.rz=n(this,e.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(e,t,r){this.assetData=t.getAssetData(e.refId),this.initElement(e,t,r)}function HybridRendererBase(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.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"}function HCompElement(e,t,r){this.layers=e.layers,this.supports3d=!e.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(e,t,r),this.tm=e.tm?PropertyFactory.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}function HybridRenderer(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:t&&t.className||"",imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(t&&!1===t.hideOnTransparent),filterSize:{width:t&&t.filterSize&&t.filterSize.width||"400%",height:t&&t.filterSize&&t.filterSize.height||"400%",x:t&&t.filterSize&&t.filterSize.x||"-100%",y:t&&t.filterSize&&t.filterSize.y||"-100%"},runExpressions:!t||void 0===t.runExpressions||t.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"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r),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 e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},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(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var r=assetLoader.getLumaCanvas(this.canvasContext.canvas);r.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(r,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(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,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,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(e,t){var r={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},n={};if("fl"===e.ty||"st"===e.ty?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(r.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):"gf"!==e.ty&&"gs"!==e.ty||(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty){if(r.lc=lineCapEnum[e.lc||2],r.lj=lineJoinEnum[e.lj||2],1==e.lj&&(r.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(r.wi=n.w.v),e.d){var a=new DashProperty(this,e.d,"canvas",this);n.d=a,n.d.k||(r.da=n.d.dashArray,r.do=n.d.dashoffset[0])}}else r.r=2===e.r?"evenodd":"nonzero";return this.stylesList.push(r),n.style=r,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(e){var t,r=this.stylesList.length;for(t=0;t<r;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},CVShapeElement.prototype.closeStyles=function(e){var t,r=e.length;for(t=0;t<r;t+=1)e[t].closed=!0},CVShapeElement.prototype.searchShapes=function(e,t,r,n,a){var i,s,o,l,c,h,p=e.length-1,d=[],u=[],f=[].concat(a);for(i=p;i>=0;i-=1){if((l=this.searchProcessedElement(e[i]))?t[i]=r[l-1]:e[i]._shouldRender=n,"fl"===e[i].ty||"st"===e[i].ty||"gf"===e[i].ty||"gs"===e[i].ty)l?t[i].style.closed=!1:t[i]=this.createStyleElement(e[i],f),d.push(t[i].style);else if("gr"===e[i].ty){if(l)for(o=t[i].it.length,s=0;s<o;s+=1)t[i].prevViewData[s]=t[i].it[s];else t[i]=this.createGroupElement(e[i]);this.searchShapes(e[i].it,t[i].it,t[i].prevViewData,n,f)}else"tr"===e[i].ty?(l||(h=this.createTransformElement(e[i]),t[i]=h),f.push(t[i]),this.addTransformToStyleList(t[i])):"sh"===e[i].ty||"rc"===e[i].ty||"el"===e[i].ty||"sr"===e[i].ty?l||(t[i]=this.createShapeElement(e[i])):"tm"===e[i].ty||"rd"===e[i].ty||"pb"===e[i].ty||"zz"===e[i].ty||"op"===e[i].ty?(l?(c=t[i]).closed=!1:((c=ShapeModifiers.getModifier(e[i].ty)).init(this,e[i]),t[i]=c,this.shapeModifiers.push(c)),u.push(c)):"rp"===e[i].ty&&(l?(c=t[i]).closed=!0:(c=ShapeModifiers.getModifier(e[i].ty),t[i]=c,c.init(this,e,i,t),this.shapeModifiers.push(c),n=!1),u.push(c));this.addProcessedElement(e[i],i+1)}for(this.removeTransformFromStyleList(),this.closeStyles(d),p=u.length,i=0;i<p;i+=1)u[i].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(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var e,t,r,n,a,i,s,o,l,c=this.stylesList.length,h=this.globalData.renderer,p=this.globalData.canvasContext;for(e=0;e<c;e+=1)if(("st"!==(o=(l=this.stylesList[e]).type)&&"gs"!==o||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(h.save(),i=l.elements,"st"===o||"gs"===o?(h.ctxStrokeStyle("st"===o?l.co:l.grd),h.ctxLineWidth(l.wi),h.ctxLineCap(l.lc),h.ctxLineJoin(l.lj),h.ctxMiterLimit(l.ml||0)):h.ctxFillStyle("fl"===o?l.co:l.grd),h.ctxOpacity(l.coOp),"st"!==o&&"gs"!==o&&p.beginPath(),h.ctxTransform(l.preTransforms.finalTransform.props),r=i.length,t=0;t<r;t+=1){for("st"!==o&&"gs"!==o||(p.beginPath(),l.da&&(p.setLineDash(l.da),p.lineDashOffset=l.do)),a=(s=i[t].trNodes).length,n=0;n<a;n+=1)"m"===s[n].t?p.moveTo(s[n].p[0],s[n].p[1]):"c"===s[n].t?p.bezierCurveTo(s[n].pts[0],s[n].pts[1],s[n].pts[2],s[n].pts[3],s[n].pts[4],s[n].pts[5]):p.closePath();"st"!==o&&"gs"!==o||(h.ctxStroke(),l.da&&p.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&this.globalData.renderer.ctxFill(l.r),h.restore()}},CVShapeElement.prototype.renderShape=function(e,t,r,n){var a,i;for(i=e,a=t.length-1;a>=0;a-=1)"tr"===t[a].ty?(i=r[a].transform,this.renderShapeTransform(e,i)):"sh"===t[a].ty||"el"===t[a].ty||"rc"===t[a].ty||"sr"===t[a].ty?this.renderPath(t[a],r[a]):"fl"===t[a].ty?this.renderFill(t[a],r[a],i):"st"===t[a].ty?this.renderStroke(t[a],r[a],i):"gf"===t[a].ty||"gs"===t[a].ty?this.renderGradientFill(t[a],r[a],i):"gr"===t[a].ty?this.renderShape(i,t[a].it,r[a].it):t[a].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r,n,a,i=e.trNodes,s=t.paths,o=s._length;i.length=0;var l=e.transforms.finalTransform;for(a=0;a<o;a+=1){var c=s.shapes[a];if(c&&c.v){for(n=c._length,r=1;r<n;r+=1)1===r&&i.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),i.push({t:"c",pts:l.applyToTriplePoints(c.o[r-1],c.i[r],c.v[r])});1===n&&i.push({t:"m",p:l.applyToPointArray(c.v[0][0],c.v[0][1],0)}),c.c&&n&&(i.push({t:"c",pts:l.applyToTriplePoints(c.o[r-1],c.i[0],c.v[0])}),i.push({t:"z"}))}}e.trNodes=i}},CVShapeElement.prototype.renderPath=function(e,t){if(!0!==e.hd&&e._shouldRender){var r,n=t.styledShapes.length;for(r=0;r<n;r+=1)this.renderStyledShape(t.styledShapes[r],t.sh)}},CVShapeElement.prototype.renderFill=function(e,t,r){var n=t.style;(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity)},CVShapeElement.prototype.renderGradientFill=function(e,t,r){var n,a=t.style;if(!a.grd||t.g._mdf||t.s._mdf||t.e._mdf||1!==e.t&&(t.h._mdf||t.a._mdf)){var i,s=this.globalData.canvasContext,o=t.s.v,l=t.e.v;if(1===e.t)n=s.createLinearGradient(o[0],o[1],l[0],l[1]);else{var c=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),h=Math.atan2(l[1]-o[1],l[0]-o[0]),p=t.h.v;p>=1?p=.99:p<=-1&&(p=-.99);var d=c*p,u=Math.cos(h+t.a.v)*d+o[0],f=Math.sin(h+t.a.v)*d+o[1];n=s.createRadialGradient(u,f,0,o[0],o[1],c)}var m=e.g.p,g=t.g.c,y=1;for(i=0;i<m;i+=1)t.g._hasOpacity&&t.g._collapsable&&(y=t.g.o[2*i+1]),n.addColorStop(g[4*i]/100,"rgba("+g[4*i+1]+","+g[4*i+2]+","+g[4*i+3]+","+y+")");a.grd=n}a.coOp=t.o.v*r.opacity},CVShapeElement.prototype.renderStroke=function(e,t,r){var n=t.style,a=t.d;a&&(a._mdf||this._isFirstFrame)&&(n.da=a.dashArray,n.do=a.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r._opMdf||this._isFirstFrame)&&(n.coOp=t.o.v*r.opacity),(t.w._mdf||this._isFirstFrame)&&(n.wi=t.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=t;var r=!1;e.sc&&(r=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var n,a,i,s,o,l,c,h,p,d,u,f,m=this.globalData.fontManager.getFontByName(e.f),g=e.l,y=this.mHelper;this.stroke=r,this.values.fValue=e.finalSize+"px "+this.globalData.fontManager.getFontByName(e.f).fFamily,a=e.finalText.length;var v=this.data.singleShape,b=.001*e.tr*e.finalSize,E=0,S=0,_=!0,T=0;for(n=0;n<a;n+=1){s=(i=this.globalData.fontManager.getCharData(e.finalText[n],m.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily))&&i.data||{},y.reset(),v&&g[n].n&&(E=-b,S+=e.yOffset,S+=_?1:0,_=!1),p=(c=s.shapes?s.shapes[0].it:[]).length,y.scale(e.finalSize/100,e.finalSize/100),v&&this.applyTextPropertiesToMatrix(e,y,g[n].line,E,S),u=createSizedArray(p-1);var k=0;for(h=0;h<p;h+=1)if("sh"===c[h].ty){for(l=c[h].ks.k.i.length,d=c[h].ks.k,f=[],o=1;o<l;o+=1)1===o&&f.push(y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),f.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[o][0],d.i[o][1],0),y.applyToY(d.i[o][0],d.i[o][1],0),y.applyToX(d.v[o][0],d.v[o][1],0),y.applyToY(d.v[o][0],d.v[o][1],0));f.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[0][0],d.i[0][1],0),y.applyToY(d.i[0][0],d.i[0][1],0),y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),u[k]=f,k+=1}v&&(E+=g[n].l,E+=b),this.textSpans[T]?this.textSpans[T].elem=u:this.textSpans[T]={elem:u},T+=1}},CVTextElement.prototype.renderInnerContent=function(){var e,t,r,n,a,i;this.validateText(),this.canvasContext.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 s,o=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;t=l.length;var c,h,p=null,d=null,u=null,f=this.globalData.renderer;for(e=0;e<t;e+=1)if(!l[e].n){if((s=o[e])&&(f.save(),f.ctxTransform(s.p),f.ctxOpacity(s.o)),this.fill){for(s&&s.fc?p!==s.fc&&(f.ctxFillStyle(s.fc),p=s.fc):p!==this.values.fill&&(p=this.values.fill,f.ctxFillStyle(this.values.fill)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<n;r+=1)for(i=(h=c[r]).length,this.globalData.canvasContext.moveTo(h[0],h[1]),a=2;a<i;a+=6)this.globalData.canvasContext.bezierCurveTo(h[a],h[a+1],h[a+2],h[a+3],h[a+4],h[a+5]);this.globalData.canvasContext.closePath(),f.ctxFill()}if(this.stroke){for(s&&s.sw?u!==s.sw&&(u=s.sw,f.ctxLineWidth(s.sw)):u!==this.values.sWidth&&(u=this.values.sWidth,f.ctxLineWidth(this.values.sWidth)),s&&s.sc?d!==s.sc&&(d=s.sc,f.ctxStrokeStyle(s.sc)):d!==this.values.stroke&&(d=this.values.stroke,f.ctxStrokeStyle(this.values.stroke)),n=(c=this.textSpans[e].elem).length,this.globalData.canvasContext.beginPath(),r=0;r<n;r+=1)for(i=(h=c[r]).length,this.globalData.canvasContext.moveTo(h[0],h[1]),a=2;a<i;a+=6)this.globalData.canvasContext.bezierCurveTo(h[a],h[a+1],h[a+2],h[a+3],h[a+4],h[a+5]);this.globalData.canvasContext.closePath(),f.ctxStroke()}s&&this.globalData.renderer.restore()}},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 e=createTag("canvas");e.width=this.assetData.w,e.height=this.assetData.h;var t,r,n=e.getContext("2d"),a=this.img.width,i=this.img.height,s=a/i,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;s>o&&"xMidYMid slice"===l||s<o&&"xMidYMid slice"!==l?t=(r=i)*o:r=(t=a)/o,n.drawImage(this.img,(a-t)/2,(i-r)/2,t,r,0,0,this.assetData.w,this.assetData.h),this.img=e}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},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)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(e){return new CVShapeElement(e,this.globalData,this)},CanvasRendererBase.prototype.createText=function(e){return new CVTextElement(e,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(e){return new CVImageElement(e,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(e){return new CVSolidElement(e,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(e){1===e[0]&&0===e[1]&&0===e[4]&&1===e[5]&&0===e[12]&&0===e[13]||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},CanvasRendererBase.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},CanvasRendererBase.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},CanvasRendererBase.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},CanvasRendererBase.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},CanvasRendererBase.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},CanvasRendererBase.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},CanvasRendererBase.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},CanvasRendererBase.prototype.ctxFill=function(e){this.canvasContext.fill(e)},CanvasRendererBase.prototype.ctxFillRect=function(e,t,r,n){this.canvasContext.fillRect(e,t,r,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(e){this.renderConfig.clearCanvas?(e&&(this.globalData.blendMode="source-over"),this.contextData.restore(e)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var t=this.animationItem.container.style;t.width="100%",t.height="100%";var r="0px 0px 0px";t.transformOrigin=r,t.mozTransformOrigin=r,t.webkitTransformOrigin=r,t["-webkit-transform"]=r,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(e.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(e,t){var r,n,a,i;if(this.reset(),e?(r=e,n=t,this.canvasContext.canvas.width=r,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(r=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(r=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=r*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),o=s[1]||"meet",l=s[0]||"xMidYMid",c=l.substr(0,4),h=l.substr(4);a=r/n,(i=this.transformCanvas.w/this.transformCanvas.h)>a&&"meet"===o||i<a&&"slice"===o?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===c&&(i<a&&"meet"===o||i>a&&"slice"===o)?(r-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===c&&(i<a&&"meet"===o||i>a&&"slice"===o)?(r-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===h&&(i>a&&"meet"===o||i<a&&"slice"===o)?(n-this.transformCanvas.h*(r/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===h&&(i>a&&"meet"===o||i<a&&"slice"===o)?(n-this.transformCanvas.h*(r/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=r/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(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(){var e;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),e=(this.layers?this.layers.length:0)-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var r;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(e-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new CanvasContext;this._length=e},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(e){this.cArrPos-=1;var t,r=this.stack[this.cArrPos],n=r.transform,a=this.cTr.props;for(t=0;t<16;t+=1)a[t]=n[t];if(e){this.nativeContext.restore();var i=this.stack[this.cArrPos+1];this.appliedFillStyle=i.fillStyle,this.appliedStrokeStyle=i.strokeStyle,this.appliedLineWidth=i.lineWidth,this.appliedLineCap=i.lineCap,this.appliedLineJoin=i.lineJoin,this.appliedMiterLimit=i.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||-1!==r.opacity&&this.currentOpacity!==r.opacity)&&(this.nativeContext.globalAlpha=r.opacity,this.currentOpacity=r.opacity),this.currentFillStyle=r.fillStyle,this.currentStrokeStyle=r.strokeStyle,this.currentLineWidth=r.lineWidth,this.currentLineCap=r.lineCap,this.currentLineJoin=r.lineJoin,this.currentMiterLimit=r.miterLimit},CVContextData.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var r,n=this.stack[this.cArrPos];for(r=0;r<16;r+=1)n.transform[r]=t[r];this.cArrPos+=1;var a=this.stack[this.cArrPos];a.opacity=n.opacity,a.fillStyle=n.fillStyle,a.strokeStyle=n.strokeStyle,a.lineWidth=n.lineWidth,a.lineCap=n.lineCap,a.lineJoin=n.lineJoin,a.miterLimit=n.miterLimit},CVContextData.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},CVContextData.prototype.setContext=function(e){this.nativeContext=e},CVContextData.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},CVContextData.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},CVContextData.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},CVContextData.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},CVContextData.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},CVContextData.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},CVContextData.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var r=t.props;this.nativeContext.setTransform(r[0],r[1],r[4],r[5],r[12],r[13])},CVContextData.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},CVContextData.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},CVContextData.prototype.fillRect=function(e,t,r,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,r,n)},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()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},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),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.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,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)t=e[r].mProps.v.applyToPointArray(t[0],t[1],0);return t},HShapeElement.prototype.calculateShapeBoundingBox=function(e,t){var r,n,a,i,s,o=e.sh.v,l=e.transformers,c=o._length;if(!(c<=1)){for(r=0;r<c-1;r+=1)n=this.getTransformedPoint(l,o.v[r]),a=this.getTransformedPoint(l,o.o[r]),i=this.getTransformedPoint(l,o.i[r+1]),s=this.getTransformedPoint(l,o.v[r+1]),this.checkBounds(n,a,i,s,t);o.c&&(n=this.getTransformedPoint(l,o.v[r]),a=this.getTransformedPoint(l,o.o[r]),i=this.getTransformedPoint(l,o.i[0]),s=this.getTransformedPoint(l,o.v[0]),this.checkBounds(n,a,i,s,t))}},HShapeElement.prototype.checkBounds=function(e,t,r,n,a){this.getBoundsOfCurve(e,t,r,n);var i=this.shapeBoundingBox;a.x=bmMin(i.left,a.x),a.xMax=bmMax(i.right,a.xMax),a.y=bmMin(i.top,a.y),a.yMax=bmMax(i.bottom,a.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(e,t,r,n){for(var a,i,s,o,l,c,h,p=[[e[0],n[0]],[e[1],n[1]]],d=0;d<2;++d)i=6*e[d]-12*t[d]+6*r[d],a=-3*e[d]+9*t[d]-9*r[d]+3*n[d],s=3*t[d]-3*e[d],i|=0,s|=0,0==(a|=0)&&0===i||(0===a?(o=-s/i)>0&&o<1&&p[d].push(this.calculateF(o,e,t,r,n,d)):(l=i*i-4*s*a)>=0&&((c=(-i+bmSqrt(l))/(2*a))>0&&c<1&&p[d].push(this.calculateF(c,e,t,r,n,d)),(h=(-i-bmSqrt(l))/(2*a))>0&&h<1&&p[d].push(this.calculateF(h,e,t,r,n,d))));this.shapeBoundingBox.left=bmMin.apply(null,p[0]),this.shapeBoundingBox.top=bmMin.apply(null,p[1]),this.shapeBoundingBox.right=bmMax.apply(null,p[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,p[1])},HShapeElement.prototype.calculateF=function(e,t,r,n,a,i){return bmPow(1-e,3)*t[i]+3*bmPow(1-e,2)*e*r[i]+3*(1-e)*bmPow(e,2)*n[i]+bmPow(e,3)*a[i]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,n=e.length;for(r=0;r<n;r+=1)e[r]&&e[r].sh?this.calculateShapeBoundingBox(e[r],t):e[r]&&e[r].it?this.calculateBoundingBox(e[r].it,t):e[r]&&e[r].style&&e[r].w&&this.expandStrokeBoundingBox(e[r].w,t)},HShapeElement.prototype.expandStrokeBoundingBox=function(e,t){var r=0;if(e.keyframes){for(var n=0;n<e.keyframes.length;n+=1){var a=e.keyframes[n].s;a>r&&(r=a)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax<e.x?0:e.xMax-e.x,e.height=e.yMax<e.y?0:e.yMax-e.y,this.currentBoxContains(e))return;var r=!1;if(this.currentBBox.w!==e.width&&(this.currentBBox.w=e.width,this.shapeCont.setAttribute("width",e.width),r=!0),this.currentBBox.h!==e.height&&(this.currentBBox.h=e.height,this.shapeCont.setAttribute("height",e.height),r=!0),r||this.currentBBox.x!==e.x||this.currentBBox.y!==e.y){this.currentBBox.w=e.width,this.currentBBox.h=e.height,this.currentBBox.x=e.x,this.currentBBox.y=e.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,a="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=a,n.webkitTransform=a}}},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 e=createNS("g");this.maskedElement.appendChild(e),this.innerElem=e}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=createSizedArray(e.l?e.l.length:0);var t=this.innerElem.style,r=e.fc?this.buildColor(e.fc):"rgba(0,0,0,0)";t.fill=r,t.color=r,e.sc&&(t.stroke=this.buildColor(e.sc),t.strokeWidth=e.sw+"px");var n,a,i=this.globalData.fontManager.getFontByName(e.f);if(!this.globalData.fontManager.chars)if(t.fontSize=e.finalSize+"px",t.lineHeight=e.finalSize+"px",i.fClass)this.innerElem.className=i.fClass;else{t.fontFamily=i.fFamily;var s=e.fWeight,o=e.fStyle;t.fontStyle=o,t.fontWeight=s}var l,c,h,p=e.l;a=p.length;var d,u=this.mHelper,f="",m=0;for(n=0;n<a;n+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?l=this.textPaths[m]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?h=(c=this.textSpans[m]).children[0]:((c=createTag("div")).style.lineHeight=0,(h=createNS("svg")).appendChild(l),styleDiv(c)))):this.isMasked?l=this.textPaths[m]?this.textPaths[m]:createNS("text"):this.textSpans[m]?(c=this.textSpans[m],l=this.textPaths[m]):(styleDiv(c=createTag("span")),styleDiv(l=createTag("span")),c.appendChild(l)),this.globalData.fontManager.chars){var g,y=this.globalData.fontManager.getCharData(e.finalText[n],i.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily);if(g=y?y.data:null,u.reset(),g&&g.shapes&&g.shapes.length&&(d=g.shapes[0].it,u.scale(e.finalSize/100,e.finalSize/100),f=this.createPathShape(u,d),l.setAttribute("d",f)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(h);var v=h.getBBox();h.setAttribute("width",v.width+2),h.setAttribute("height",v.height+2),h.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=h.style,E="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=E,b.webkitTransform=E,p[n].yOffset=v.y-1}else h.setAttribute("width",1),h.setAttribute("height",1);c.appendChild(h)}}else if(l.textContent=p[n].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(c);var S=l.style,_="translate3d(0,"+-e.finalSize/1.2+"px,0)";S.transform=_,S.webkitTransform=_}this.isMasked?this.textSpans[m]=l:this.textSpans[m]=c,this.textSpans[m].style.display="block",this.textPaths[m]=l,m+=1}for(;m<this.textSpans.length;)this.textSpans[m].style.display="none",m+=1},HTextElement.prototype.renderInnerContent=function(){var e;if(this.validateText(),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),e=this.svgElement.style;var t="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";e.transform=t,e.webkitTransform=t}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var r,n,a,i,s,o=0,l=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;for(n=c.length,r=0;r<n;r+=1)c[r].n?o+=1:(i=this.textSpans[r],s=this.textPaths[r],a=l[o],o+=1,a._mdf.m&&(this.isMasked?i.setAttribute("transform",a.m):(i.style.webkitTransform=a.m,i.style.transform=a.m)),i.style.opacity=a.o,a.sw&&a._mdf.sw&&s.setAttribute("stroke-width",a.sw),a.sc&&a._mdf.sc&&s.setAttribute("stroke",a.sc),a.fc&&a._mdf.fc&&(s.setAttribute("fill",a.fc),s.style.color=a.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var h=this.innerElem.getBBox();if(this.currentBBox.w!==h.width&&(this.currentBBox.w=h.width,this.svgElement.setAttribute("width",h.width)),this.currentBBox.h!==h.height&&(this.currentBBox.h=h.height,this.svgElement.setAttribute("height",h.height)),this.currentBBox.w!==h.width+2||this.currentBBox.h!==h.height+2||this.currentBBox.x!==h.x-1||this.currentBBox.y!==h.y-1){this.currentBBox.w=h.width+2,this.currentBBox.h=h.height+2,this.currentBBox.x=h.x-1,this.currentBBox.y=h.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),e=this.svgElement.style;var p="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";e.transform=p,e.webkitTransform=p}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var e,t,r,n,a=this.comp.threeDElements.length;for(e=0;e<a;e+=1)if("3d"===(t=this.comp.threeDElements[e]).type){r=t.perspectiveElem.style,n=t.container.style;var i=this.pe.v+"px",s="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";r.perspective=i,r.webkitPerspective=i,n.transformOrigin=s,n.mozTransformOrigin=s,n.webkitTransformOrigin=s,r.transform=o,r.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var e,t,r=this._isFirstFrame;if(this.hierarchy)for(t=this.hierarchy.length,e=0;e<t;e+=1)r=this.hierarchy[e].finalTransform.mProp._mdf||r;if(r||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(e=t=this.hierarchy.length-1;e>=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.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 a;a=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var i=Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2)+Math.pow(a[2],2)),s=[a[0]/i,a[1]/i,a[2]/i],o=Math.sqrt(s[2]*s[2]+s[0]*s[0]),l=Math.atan2(s[1],o),c=Math.atan2(s[0],-s[2]);this.mat.rotateY(c).rotateX(-l)}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 h=!this._prevMat.equals(this.mat);if((h||this.pe._mdf)&&this.comp.threeDElements){var p,d,u;for(t=this.comp.threeDElements.length,e=0;e<t;e+=1)if("3d"===(p=this.comp.threeDElements[e]).type){if(h){var f=this.mat.toCSS();(u=p.container.style).transform=f,u.webkitTransform=f}this.pe._mdf&&((d=p.perspectiveElem.style).perspective=this.pe.v+"px",d.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData),t=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",e),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(t),t.crossOrigin="anonymous",t.src=e,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(e,t){var r=e.getBaseElement();if(r){var n=this.layers[t];if(n.ddd&&this.supports3d)this.addTo3dContainer(r,t);else if(this.threeDElements)this.addTo3dContainer(r,t);else{for(var a,i,s=0;s<t;)this.elements[s]&&!0!==this.elements[s]&&this.elements[s].getBaseElement&&(i=this.elements[s],a=(this.layers[s].ddd?this.getThreeDContainerByPos(s):i.getBaseElement())||a),s+=1;a?n.ddd&&this.supports3d||this.layerElement.insertBefore(r,a):n.ddd&&this.supports3d||this.layerElement.appendChild(r)}}},HybridRendererBase.prototype.createShape=function(e){return this.supports3d?new HShapeElement(e,this.globalData,this):new SVGShapeElement(e,this.globalData,this)},HybridRendererBase.prototype.createText=function(e){return this.supports3d?new HTextElement(e,this.globalData,this):new SVGTextLottieElement(e,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(e){return this.camera=new HCameraElement(e,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(e){return this.supports3d?new HImageElement(e,this.globalData,this):new IImageElement(e,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(e){return this.supports3d?new HSolidElement(e,this.globalData,this):new ISolidElement(e,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(e){for(var t=0,r=this.threeDElements.length;t<r;){if(this.threeDElements[t].startPos<=e&&this.threeDElements[t].endPos>=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r,n,a=createTag("div");styleDiv(a);var i=createTag("div");if(styleDiv(i),"3d"===t){(r=a.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var s="50% 50%";r.webkitTransformOrigin=s,r.mozTransformOrigin=s,r.transformOrigin=s;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=i.style).transform=o,n.webkitTransform=o}a.appendChild(i);var l={container:i,perspectiveElem:a,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t,r=this.layers.length,n="";for(e=0;e<r;e+=1)this.layers[e].ddd&&3!==this.layers[e].ty?("3d"!==n&&(n="3d",t=this.createThreeDContainer(e,"3d")),t.endPos=Math.max(t.endPos,e)):("2d"!==n&&(n="2d",t=this.createThreeDContainer(e,"2d")),t.endPos=Math.max(t.endPos,e));for(e=(r=this.threeDElements.length)-1;e>=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,n=this.threeDElements.length;r<n;){if(t<=this.threeDElements[r].endPos){for(var a,i=this.threeDElements[r].startPos;i<t;)this.elements[i]&&this.elements[i].getBaseElement&&(a=this.elements[i].getBaseElement()),i+=1;a?this.threeDElements[r].container.insertBefore(e,a):this.threeDElements[r].container.appendChild(e);break}r+=1}},HybridRendererBase.prototype.configAnimation=function(e){var t=createTag("div"),r=this.animationItem.wrapper,n=t.style;n.width=e.w+"px",n.height=e.h+"px",this.resizerElem=t,styleDiv(t),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&t.setAttribute("class",this.renderConfig.className),r.appendChild(t),n.overflow="hidden";var a=createNS("svg");a.setAttribute("width","1"),a.setAttribute("height","1"),styleDiv(a),this.resizerElem.appendChild(a);var i=createNS("defs");a.appendChild(i),this.data=e,this.setupGlobalData(e,a),this.globalData.defs=i,this.layers=e.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var e;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var e,t,r,n,a=this.animationItem.wrapper.offsetWidth,i=this.animationItem.wrapper.offsetHeight,s=a/i;this.globalData.compSize.w/this.globalData.compSize.h>s?(e=a/this.globalData.compSize.w,t=a/this.globalData.compSize.w,r=0,n=(i-this.globalData.compSize.h*(a/this.globalData.compSize.w))/2):(e=i/this.globalData.compSize.h,t=i/this.globalData.compSize.h,r=(a-this.globalData.compSize.w*(i/this.globalData.compSize.h))/2,n=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+r+","+n+",0,1)",o.transform=o.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 e,t=this.globalData.compSize.w,r=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e<n;e+=1){var a=this.threeDElements[e].perspectiveElem.style;a.webkitPerspective=Math.sqrt(Math.pow(t,2)+Math.pow(r,2))+"px",a.perspective=a.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(e){var t,r=e.length,n=createTag("div");for(t=0;t<r;t+=1)if(e[t].xt){var a=this.createComp(e[t],n,this.globalData.comp,null);a.initExpressions(),this.globalData.projectInterface.registerComposition(a)}},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(e,t){for(var r,n=0;n<t;)this.elements[n]&&this.elements[n].getBaseElement&&(r=this.elements[n].getBaseElement()),n+=1;r?this.layerElement.insertBefore(e,r):this.layerElement.appendChild(e)},HCompElement.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(e){return this.supports3d?new HCompElement(e,this.globalData,this):new SVGCompElement(e,this.globalData,this)};var CompExpressionInterface=function(e){function t(t){for(var r=0,n=e.layers.length;r<n;){if(e.layers[r].nm===t||e.layers[r].ind===t)return e.elements[r].layerInterface;r+=1}return null}return Object.defineProperty(t,"_name",{value:e.data.nm}),t.layer=t,t.pixelAspect=1,t.height=e.data.h||e.globalData.compSize.h,t.width=e.data.w||e.globalData.compSize.w,t.pixelAspect=1,t.frameDuration=1/e.globalData.frameRate,t.displayStartTime=0,t.numLayers=e.layers.length,t};function _typeof$2(e){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$2(e)}function seedRandom(e,t){var r=this,n=256,a="random",i=t.pow(n,6),s=t.pow(2,52),o=2*s,l=255;function c(e){var t,r=e.length,a=this,i=0,s=a.i=a.j=0,o=a.S=[];for(r||(e=[r++]);i<n;)o[i]=i++;for(i=0;i<n;i++)o[i]=o[s=l&s+e[i%r]+(t=o[i])],o[s]=t;a.g=function(e){for(var t,r=0,i=a.i,s=a.j,o=a.S;e--;)t=o[i=l&i+1],r=r*n+o[l&(o[i]=o[s=l&s+t])+(o[s]=t)];return a.i=i,a.j=s,r}}function h(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function p(e,t){var r,n=[],a=_typeof$2(e);if(t&&"object"==a)for(r in e)try{n.push(p(e[r],t-1))}catch(e){}return n.length?n:"string"==a?e:e+"\0"}function d(e,t){for(var r,n=e+"",a=0;a<n.length;)t[l&a]=l&(r^=19*t[l&a])+n.charCodeAt(a++);return u(t)}function u(e){return String.fromCharCode.apply(0,e)}t["seed"+a]=function(l,f,m){var g=[],y=d(p((f=!0===f?{entropy:!0}:f||{}).entropy?[l,u(e)]:null===l?function(){try{var t=new Uint8Array(n);return(r.crypto||r.msCrypto).getRandomValues(t),u(t)}catch(t){var a=r.navigator,i=a&&a.plugins;return[+new Date,r,i,r.screen,u(e)]}}():l,3),g),v=new c(g),b=function(){for(var e=v.g(6),t=i,r=0;e<s;)e=(e+r)*n,t*=n,r=v.g(1);for(;e>=o;)e/=2,t/=2,r>>>=1;return(e+r)/t};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,d(u(v.S),e),(f.pass||m||function(e,r,n,i){return i&&(i.S&&h(i,v),e.state=function(){return h(v,{})}),n?(t[a]=e,r):e})(b,y,"global"in f?f.global:this==t,f.state)},d(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var r,n=e.length,a=[];for(r=0;r<n;r+=1)a[r]=-e[r];return a}return e.propType?e.v:-e}initialize$2(BMMath);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(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t)||"string"===r||"string"===n)return e+t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]+=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e+t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var a=0,i=e.length,s=t.length,o=[];a<i||a<s;)("number"==typeof e[a]||e[a]instanceof Number)&&("number"==typeof t[a]||t[a]instanceof Number)?o[a]=e[a]+t[a]:o[a]=void 0===t[a]?e[a]:e[a]||t[a],a+=1;return o}return 0}var add=sum;function sub(e,t){var r=_typeof$1(e),n=_typeof$1(t);if(isNumerable(r,e)&&isNumerable(n,t))return"string"===r&&(e=parseInt(e,10)),"string"===n&&(t=parseInt(t,10)),e-t;if($bm_isInstanceOfArray(e)&&isNumerable(n,t))return(e=e.slice(0))[0]-=t,e;if(isNumerable(r,e)&&$bm_isInstanceOfArray(t))return(t=t.slice(0))[0]=e-t[0],t;if($bm_isInstanceOfArray(e)&&$bm_isInstanceOfArray(t)){for(var a=0,i=e.length,s=t.length,o=[];a<i||a<s;)("number"==typeof e[a]||e[a]instanceof Number)&&("number"==typeof t[a]||t[a]instanceof Number)?o[a]=e[a]-t[a]:o[a]=void 0===t[a]?e[a]:e[a]||t[a],a+=1;return o}return 0}function mul(e,t){var r,n,a,i=_typeof$1(e),s=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(s,t))return e*t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(a=e.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e[n]*t;return r}if(isNumerable(i,e)&&$bm_isInstanceOfArray(t)){for(a=t.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e*t[n];return r}return 0}function div(e,t){var r,n,a,i=_typeof$1(e),s=_typeof$1(t);if(isNumerable(i,e)&&isNumerable(s,t))return e/t;if($bm_isInstanceOfArray(e)&&isNumerable(s,t)){for(a=e.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e[n]/t;return r}if(isNumerable(i,e)&&$bm_isInstanceOfArray(t)){for(a=t.length,r=createTypedArray("float32",a),n=0;n<a;n+=1)r[n]=e/t[n];return r}return 0}function mod(e,t){return"string"==typeof e&&(e=parseInt(e,10)),"string"==typeof t&&(t=parseInt(t,10)),e%t}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(e,t,r){if(t>r){var n=r;r=t,t=n}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var r;t||(t=helperLengthArray);var n=Math.min(e.length,t.length),a=0;for(r=0;r<n;r+=1)a+=Math.pow(t[r]-e[r],2);return Math.sqrt(a)}function normalize(e){return div(e,length(e))}function rgbToHsl(e){var t,r,n=e[0],a=e[1],i=e[2],s=Math.max(n,a,i),o=Math.min(n,a,i),l=(s+o)/2;if(s===o)t=0,r=0;else{var c=s-o;switch(r=l>.5?c/(2-s-o):c/(s+o),s){case n:t=(a-i)/c+(a<i?6:0);break;case a:t=(i-n)/c+2;break;case i:t=(n-a)/c+4}t/=6}return[t,r,l,e[3]]}function hue2rgb(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t,r,n,a=e[0],i=e[1],s=e[2];if(0===i)t=s,n=s,r=s;else{var o=s<.5?s*(1+i):s+i-s*i,l=2*s-o;t=hue2rgb(l,o,a+1/3),r=hue2rgb(l,o,a),n=hue2rgb(l,o,a-1/3)}return[t,r,n,e[3]]}function linear(e,t,r,n,a){if(void 0!==n&&void 0!==a||(n=t,a=r,t=0,r=1),r<t){var i=r;r=t,t=i}if(e<=t)return n;if(e>=r)return a;var s,o=r===t?0:(e-t)/(r-t);if(!n.length)return n+(a-n)*o;var l=n.length,c=createTypedArray("float32",l);for(s=0;s<l;s+=1)c[s]=n[s]+(a[s]-n[s])*o;return c}function random(e,t){if(void 0===t&&(void 0===e?(e=0,t=1):(t=e,e=void 0)),t.length){var r,n=t.length;e||(e=createTypedArray("float32",n));var a=createTypedArray("float32",n),i=BMMath.random();for(r=0;r<n;r+=1)a[r]=e[r]+i*(t[r]-e[r]);return a}return void 0===e&&(e=0),e+BMMath.random()*(t-e)}function createPath(e,t,r,n){var a,i=e.length,s=shapePool.newElement();s.setPathData(!!n,i);var o,l,c=[0,0];for(a=0;a<i;a+=1)o=t&&t[a]?t[a]:c,l=r&&r[a]?r[a]:c,s.setTripleAt(e[a][0],e[a][1],l[0]+e[a][0],l[1]+e[a][1],o[0]+e[a][0],o[1]+e[a][1],a,!0);return s}function initiateExpression(elem,data,property){function noOp(e){return e}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty._name=elem.data.nm,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||!0!==this.data.hd,wiggle=function(e,t){var r,n,a=this.pv.length?this.pv.length:1,i=createTypedArray("float32",a),s=Math.floor(5*time);for(r=0,n=0;r<s;){for(n=0;n<a;n+=1)i[n]+=-t+2*t*BMMath.random();r+=1}var o=5*time,l=o-Math.floor(o),c=createTypedArray("float32",a);if(a>1){for(n=0;n<a;n+=1)c[n]=this.pv[n]+i[n]+(-t+2*t*BMMath.random())*l;return c}return this.pv+i[0]+(-t+2*t*BMMath.random())*l}.bind(this);function loopInDuration(e,t){return loopIn(e,t,!0)}function loopOutDuration(e,t){return loopOut(e,t,!0)}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)),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),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(e,t){var r=[t[0]-e[0],t[1]-e[1],t[2]-e[2]],n=Math.atan2(r[0],Math.sqrt(r[1]*r[1]+r[2]*r[2]))/degToRads;return[-Math.atan2(r[1],r[2])/degToRads,n,0]}function easeOut(e,t,r,n,a){return applyEase(easeOutBez,e,t,r,n,a)}function easeIn(e,t,r,n,a){return applyEase(easeInBez,e,t,r,n,a)}function ease(e,t,r,n,a){return applyEase(easeInOutBez,e,t,r,n,a)}function applyEase(e,t,r,n,a,i){void 0===a?(a=r,i=n):t=(t-r)/(n-r),t>1?t=1:t<0&&(t=0);var s=e(t);if($bm_isInstanceOfArray(a)){var o,l=a.length,c=createTypedArray("float32",l);for(o=0;o<l;o+=1)c[o]=(i[o]-a[o])*s+a[o];return c}return(i-a)*s+a}function nearestKey(e){var t,r,n,a=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(r=-1,(e*=elem.comp.globalData.frameRate)<data.k[0].t)r=1,n=data.k[0].t;else{for(t=0;t<a-1;t+=1){if(e===data.k[t].t){r=t+1,n=data.k[t].t;break}if(e>data.k[t].t&&e<data.k[t+1].t){e-data.k[t].t>data.k[t+1].t-e?(r=t+2,n=data.k[t+1].t):(r=t+1,n=data.k[t].t);break}}-1===r&&(r=t+1,n=data.k[t].t)}else r=0,n=0;var i={};return i.index=r,i.time=n/elem.comp.globalData.frameRate,i}function key(e){var t,r,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var a=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=a.length,r=0;r<n;r+=1)t[r]=a[r],t.value[r]=a[r];return t}function framesToTime(e,t){return t||(t=elem.comp.globalData.frameRate),e/t}function timeToFrames(e,t){return e||0===e||(e=time),t||(t=elem.comp.globalData.frameRate),e*t}function seedRandom(e){BMMath.seedrandom(randSeed+e)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(e,t){return"string"==typeof value?void 0===t?value.substring(e):value.substring(e,t):""}function substr(e,t){return"string"==typeof value?void 0===t?value.substr(e):value.substr(e,t):""}function posterizeTime(e){time=0===e?0:Math.floor(time*e)/e,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(e){return value=e,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(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)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!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)}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 e={initExpressions:function(e){var t=0,r=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){t+=1},e.renderer.globalData.popExpression=function(){0==(t-=1)&&function(){var e,t=r.length;for(e=0;e<t;e+=1)r[e].release();r.length=0}()},e.renderer.globalData.registerExpressionProperty=function(e){-1===r.indexOf(e)&&r.push(e)}}};return e.resetFrame=ExpressionManager.resetFrame,e}(),MaskManagerInterface=function(){function e(e,t){this._mask=e,this._data=t}return Object.defineProperty(e.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(e.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(t){var r,n=createSizedArray(t.viewData.length),a=t.viewData.length;for(r=0;r<a;r+=1)n[r]=new e(t.viewData[r],t.masksProperties[r]);return function(e){for(r=0;r<a;){if(t.masksProperties[r].nm===e)return n[r];r+=1}return null}}}(),ExpressionPropertyInterface=function(){var e={pv:0,v:0,mult:1},t={pv:[0,0,0],v:[0,0,0],mult:1};function r(e,t,r){Object.defineProperty(e,"velocity",{get:function(){return t.getVelocityAtTime(t.comp.currentFrame)}}),e.numKeys=t.keyframes?t.keyframes.length:0,e.key=function(n){if(!e.numKeys)return 0;var a="";a="s"in t.keyframes[n-1]?t.keyframes[n-1].s:"e"in t.keyframes[n-2]?t.keyframes[n-2].e:t.keyframes[n-2].s;var i="unidimensional"===r?new Number(a):Object.assign({},a);return i.time=t.keyframes[n-1].t/t.elem.comp.globalData.frameRate,i.value="unidimensional"===r?a[0]:a,i},e.valueAtTime=t.getValueAtTime,e.speedAtTime=t.getSpeedAtTime,e.velocityAtTime=t.getVelocityAtTime,e.propertyGroup=t.propertyGroup}function n(){return e}return function(a){return a?"unidimensional"===a.propType?function(t){t&&"pv"in t||(t=e);var n=1/t.mult,a=t.pv*n,i=new Number(a);return i.value=a,r(i,t,"unidimensional"),function(){return t.k&&t.getValue(),a=t.v*n,i.value!==a&&((i=new Number(a)).value=a,i[0]=a,r(i,t,"unidimensional")),i}}(a):function(e){e&&"pv"in e||(e=t);var n=1/e.mult,a=e.data&&e.data.l||e.pv.length,i=createTypedArray("float32",a),s=createTypedArray("float32",a);return i.value=s,r(i,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;t<a;t+=1)s[t]=e.v[t]*n,i[t]=s[t];return i}}(a):n}}(),TransformExpressionInterface=function(e){function t(e){switch(e){case"scale":case"Scale":case"ADBE Scale":case 6:return t.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return t.rotation;case"ADBE Rotate X":return t.xRotation;case"ADBE Rotate Y":return t.yRotation;case"position":case"Position":case"ADBE Position":case 2:return t.position;case"ADBE Position_0":return t.xPosition;case"ADBE Position_1":return t.yPosition;case"ADBE Position_2":return t.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return t.anchorPoint;case"opacity":case"Opacity":case 11:return t.opacity;default:return null}}var r,n,a,i;return Object.defineProperty(t,"rotation",{get:ExpressionPropertyInterface(e.r||e.rz)}),Object.defineProperty(t,"zRotation",{get:ExpressionPropertyInterface(e.rz||e.r)}),Object.defineProperty(t,"xRotation",{get:ExpressionPropertyInterface(e.rx)}),Object.defineProperty(t,"yRotation",{get:ExpressionPropertyInterface(e.ry)}),Object.defineProperty(t,"scale",{get:ExpressionPropertyInterface(e.s)}),e.p?i=ExpressionPropertyInterface(e.p):(r=ExpressionPropertyInterface(e.px),n=ExpressionPropertyInterface(e.py),e.pz&&(a=ExpressionPropertyInterface(e.pz))),Object.defineProperty(t,"position",{get:function(){return e.p?i():[r(),n(),a?a():0]}}),Object.defineProperty(t,"xPosition",{get:ExpressionPropertyInterface(e.px)}),Object.defineProperty(t,"yPosition",{get:ExpressionPropertyInterface(e.py)}),Object.defineProperty(t,"zPosition",{get:ExpressionPropertyInterface(e.pz)}),Object.defineProperty(t,"anchorPoint",{get:ExpressionPropertyInterface(e.a)}),Object.defineProperty(t,"opacity",{get:ExpressionPropertyInterface(e.o)}),Object.defineProperty(t,"skew",{get:ExpressionPropertyInterface(e.sk)}),Object.defineProperty(t,"skewAxis",{get:ExpressionPropertyInterface(e.sa)}),Object.defineProperty(t,"orientation",{get:ExpressionPropertyInterface(e.or)}),t},LayerExpressionInterface=function(){function e(e){var t=new Matrix;return void 0!==e?this._elem.finalTransform.mProp.getValueAtTime(e).clone(t):this._elem.finalTransform.mProp.applyToMatrix(t),t}function t(e,t){var r=this.getMatrix(t);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.applyPoint(r,e)}function r(e,t){var r=this.getMatrix(t);return this.applyPoint(r,e)}function n(e,t){var r=this.getMatrix(t);return r.props[12]=0,r.props[13]=0,r.props[14]=0,this.invertPoint(r,e)}function a(e,t){var r=this.getMatrix(t);return this.invertPoint(r,e)}function i(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e)}return e.applyToPointArray(t[0],t[1],t[2]||0)}function s(e,t){if(this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(e)}return e.inversePoint(t)}function o(e){var t=new Matrix;if(t.reset(),this._elem.finalTransform.mProp.applyToMatrix(t),this._elem.hierarchy&&this._elem.hierarchy.length){var r,n=this._elem.hierarchy.length;for(r=0;r<n;r+=1)this._elem.hierarchy[r].finalTransform.mProp.applyToMatrix(t);return t.inversePoint(e)}return t.inversePoint(e)}function l(){return[1,1,1,1]}return function(c){var h;function p(e){switch(e){case"ADBE Root Vectors Group":case"Contents":case 2:return p.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return h;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return p.effect;case"ADBE Text Properties":return p.textInterface;default:return null}}p.getMatrix=e,p.invertPoint=s,p.applyPoint=i,p.toWorld=r,p.toWorldVec=t,p.fromWorld=a,p.fromWorldVec=n,p.toComp=r,p.fromComp=o,p.sampleImage=l,p.sourceRectAtTime=c.sourceRectAtTime.bind(c),p._elem=c;var d=getDescriptor(h=TransformExpressionInterface(c.finalTransform.mProp),"anchorPoint");return Object.defineProperties(p,{hasParent:{get:function(){return c.hierarchy.length}},parent:{get:function(){return c.hierarchy[0].layerInterface}},rotation:getDescriptor(h,"rotation"),scale:getDescriptor(h,"scale"),position:getDescriptor(h,"position"),opacity:getDescriptor(h,"opacity"),anchorPoint:d,anchor_point:d,transform:{get:function(){return h}},active:{get:function(){return c.isInRange}}}),p.startTime=c.data.st,p.index=c.data.ind,p.source=c.data.refId,p.height=0===c.data.ty?c.data.h:100,p.width=0===c.data.ty?c.data.w:100,p.inPoint=c.data.ip/c.comp.globalData.frameRate,p.outPoint=c.data.op/c.comp.globalData.frameRate,p._name=c.data.nm,p.registerMaskInterface=function(e){p.mask=new MaskManagerInterface(e,c)},p.registerEffectsInterface=function(e){p.effect=e},p}}(),propertyGroupFactory=function(e,t){return function(r){return(r=void 0===r?1:r)<=0?e:t(r-1)}},PropertyInterface=function(e,t){var r={_name:e};return function(e){return(e=void 0===e?1:e)<=0?r:t(e-1)}},EffectsExpressionInterface=function(){var e={createEffectsInterface:function(e,r){if(e.effectsManager){var n,a=[],i=e.data.ef,s=e.effectsManager.effectElements.length;for(n=0;n<s;n+=1)a.push(t(i[n],e.effectsManager.effectElements[n],r,e));var o=e.data.ef||[],l=function(e){for(n=0,s=o.length;n<s;){if(e===o[n].nm||e===o[n].mn||e===o[n].ix)return a[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return o.length}}),l}return null}};function t(e,n,a,i){function s(t){for(var r=e.ef,n=0,a=r.length;n<a;){if(t===r[n].nm||t===r[n].mn||t===r[n].ix)return 5===r[n].ty?c[n]:c[n]();n+=1}throw new Error}var o,l=propertyGroupFactory(s,a),c=[],h=e.ef.length;for(o=0;o<h;o+=1)5===e.ef[o].ty?c.push(t(e.ef[o],n.effectElements[o],n.effectElements[o].propertyGroup,i)):c.push(r(n.effectElements[o],e.ef[o].ty,i,l));return"ADBE Color Control"===e.mn&&Object.defineProperty(s,"color",{get:function(){return c[0]()}}),Object.defineProperties(s,{numProperties:{get:function(){return e.np}},_name:{value:e.nm},propertyGroup:{value:l}}),s.enabled=0!==e.en,s.active=s.enabled,s}function r(e,t,r,n){var a=ExpressionPropertyInterface(e.p);return e.p.setGroupProperty&&e.p.setGroupProperty(PropertyInterface("",n)),function(){return 10===t?r.comp.compInterface(e.p.v):a()}}return e}(),ShapePathInterface=function(e,t,r){var n=t.sh;function a(e){return"Shape"===e||"shape"===e||"Path"===e||"path"===e||"ADBE Vector Shape"===e||2===e?a.path:null}var i=propertyGroupFactory(a,r);return n.setGroupProperty(PropertyInterface("Path",i)),Object.defineProperties(a,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:e.nm},ix:{value:e.ix},propertyIndex:{value:e.ix},mn:{value:e.mn},propertyGroup:{value:r}}),a},ShapeExpressionInterface=function(){function e(e,s,d){var u,f=[],m=e?e.length:0;for(u=0;u<m;u+=1)"gr"===e[u].ty?f.push(t(e[u],s[u],d)):"fl"===e[u].ty?f.push(r(e[u],s[u],d)):"st"===e[u].ty?f.push(a(e[u],s[u],d)):"tm"===e[u].ty?f.push(i(e[u],s[u],d)):"tr"===e[u].ty||("el"===e[u].ty?f.push(o(e[u],s[u],d)):"sr"===e[u].ty?f.push(l(e[u],s[u],d)):"sh"===e[u].ty?f.push(ShapePathInterface(e[u],s[u],d)):"rc"===e[u].ty?f.push(c(e[u],s[u],d)):"rd"===e[u].ty?f.push(h(e[u],s[u],d)):"rp"===e[u].ty?f.push(p(e[u],s[u],d)):"gf"===e[u].ty?f.push(n(e[u],s[u],d)):f.push((e[u],s[u],function(){return null})));return f}function t(t,r,n){var a=function(e){switch(e){case"ADBE Vectors Group":case"Contents":case 2:return a.content;default:return a.transform}};a.propertyGroup=propertyGroupFactory(a,n);var i=function(t,r,n){var a,i=function(e){for(var t=0,r=a.length;t<r;){if(a[t]._name===e||a[t].mn===e||a[t].propertyIndex===e||a[t].ix===e||a[t].ind===e)return a[t];t+=1}return"number"==typeof e?a[e-1]:null};i.propertyGroup=propertyGroupFactory(i,n),a=e(t.it,r.it,i.propertyGroup),i.numProperties=a.length;var o=s(t.it[t.it.length-1],r.it[r.it.length-1],i.propertyGroup);return i.transform=o,i.propertyIndex=t.cix,i._name=t.nm,i}(t,r,a.propertyGroup),o=s(t.it[t.it.length-1],r.it[r.it.length-1],a.propertyGroup);return a.content=i,a.transform=o,Object.defineProperty(a,"_name",{get:function(){return t.nm}}),a.numProperties=t.np,a.propertyIndex=t.ix,a.nm=t.nm,a.mn=t.mn,a}function r(e,t,r){function n(e){return"Color"===e||"color"===e?n.color:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),n}function n(e,t,r){function n(e){return"Start Point"===e||"start point"===e?n.startPoint:"End Point"===e||"end point"===e?n.endPoint:"Opacity"===e||"opacity"===e?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(t.s)},endPoint:{get:ExpressionPropertyInterface(t.e)},opacity:{get:ExpressionPropertyInterface(t.o)},type:{get:function(){return"a"}},_name:{value:e.nm},mn:{value:e.mn}}),t.s.setGroupProperty(PropertyInterface("Start Point",r)),t.e.setGroupProperty(PropertyInterface("End Point",r)),t.o.setGroupProperty(PropertyInterface("Opacity",r)),n}function a(e,t,r){var n,a=propertyGroupFactory(c,r),i=propertyGroupFactory(l,a);function s(r){Object.defineProperty(l,e.d[r].nm,{get:ExpressionPropertyInterface(t.d.dataProps[r].p)})}var o=e.d?e.d.length:0,l={};for(n=0;n<o;n+=1)s(n),t.d.dataProps[n].p.setGroupProperty(i);function c(e){return"Color"===e||"color"===e?c.color:"Opacity"===e||"opacity"===e?c.opacity:"Stroke Width"===e||"stroke width"===e?c.strokeWidth:null}return Object.defineProperties(c,{color:{get:ExpressionPropertyInterface(t.c)},opacity:{get:ExpressionPropertyInterface(t.o)},strokeWidth:{get:ExpressionPropertyInterface(t.w)},dash:{get:function(){return l}},_name:{value:e.nm},mn:{value:e.mn}}),t.c.setGroupProperty(PropertyInterface("Color",a)),t.o.setGroupProperty(PropertyInterface("Opacity",a)),t.w.setGroupProperty(PropertyInterface("Stroke Width",a)),c}function i(e,t,r){function n(t){return t===e.e.ix||"End"===t||"end"===t?n.end:t===e.s.ix?n.start:t===e.o.ix?n.offset:null}var a=propertyGroupFactory(n,r);return n.propertyIndex=e.ix,t.s.setGroupProperty(PropertyInterface("Start",a)),t.e.setGroupProperty(PropertyInterface("End",a)),t.o.setGroupProperty(PropertyInterface("Offset",a)),n.propertyIndex=e.ix,n.propertyGroup=r,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(t.s)},end:{get:ExpressionPropertyInterface(t.e)},offset:{get:ExpressionPropertyInterface(t.o)},_name:{value:e.nm}}),n.mn=e.mn,n}function s(e,t,r){function n(t){return e.a.ix===t||"Anchor Point"===t?n.anchorPoint:e.o.ix===t||"Opacity"===t?n.opacity:e.p.ix===t||"Position"===t?n.position:e.r.ix===t||"Rotation"===t||"ADBE Vector Rotation"===t?n.rotation:e.s.ix===t||"Scale"===t?n.scale:e.sk&&e.sk.ix===t||"Skew"===t?n.skew:e.sa&&e.sa.ix===t||"Skew Axis"===t?n.skewAxis:null}var a=propertyGroupFactory(n,r);return t.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",a)),t.transform.mProps.p.setGroupProperty(PropertyInterface("Position",a)),t.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",a)),t.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",a)),t.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",a)),t.transform.mProps.sk&&(t.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",a)),t.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",a))),t.transform.op.setGroupProperty(PropertyInterface("Opacity",a)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(t.transform.mProps.o)},position:{get:ExpressionPropertyInterface(t.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(t.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(t.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(t.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(t.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(t.transform.mProps.sa)},_name:{value:e.nm}}),n.ty="tr",n.mn=e.mn,n.propertyGroup=r,n}function o(e,t,r){function n(t){return e.p.ix===t?n.position:e.s.ix===t?n.size:null}var a=propertyGroupFactory(n,r);n.propertyIndex=e.ix;var i="tm"===t.sh.ty?t.sh.prop:t.sh;return i.s.setGroupProperty(PropertyInterface("Size",a)),i.p.setGroupProperty(PropertyInterface("Position",a)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(i.s)},position:{get:ExpressionPropertyInterface(i.p)},_name:{value:e.nm}}),n.mn=e.mn,n}function l(e,t,r){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.rotation:e.pt.ix===t?n.points:e.or.ix===t||"ADBE Vector Star Outer Radius"===t?n.outerRadius:e.os.ix===t?n.outerRoundness:!e.ir||e.ir.ix!==t&&"ADBE Vector Star Inner Radius"!==t?e.is&&e.is.ix===t?n.innerRoundness:null:n.innerRadius}var a=propertyGroupFactory(n,r),i="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,i.or.setGroupProperty(PropertyInterface("Outer Radius",a)),i.os.setGroupProperty(PropertyInterface("Outer Roundness",a)),i.pt.setGroupProperty(PropertyInterface("Points",a)),i.p.setGroupProperty(PropertyInterface("Position",a)),i.r.setGroupProperty(PropertyInterface("Rotation",a)),e.ir&&(i.ir.setGroupProperty(PropertyInterface("Inner Radius",a)),i.is.setGroupProperty(PropertyInterface("Inner Roundness",a))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(i.p)},rotation:{get:ExpressionPropertyInterface(i.r)},points:{get:ExpressionPropertyInterface(i.pt)},outerRadius:{get:ExpressionPropertyInterface(i.or)},outerRoundness:{get:ExpressionPropertyInterface(i.os)},innerRadius:{get:ExpressionPropertyInterface(i.ir)},innerRoundness:{get:ExpressionPropertyInterface(i.is)},_name:{value:e.nm}}),n.mn=e.mn,n}function c(e,t,r){function n(t){return e.p.ix===t?n.position:e.r.ix===t?n.roundness:e.s.ix===t||"Size"===t||"ADBE Vector Rect Size"===t?n.size:null}var a=propertyGroupFactory(n,r),i="tm"===t.sh.ty?t.sh.prop:t.sh;return n.propertyIndex=e.ix,i.p.setGroupProperty(PropertyInterface("Position",a)),i.s.setGroupProperty(PropertyInterface("Size",a)),i.r.setGroupProperty(PropertyInterface("Rotation",a)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(i.p)},roundness:{get:ExpressionPropertyInterface(i.r)},size:{get:ExpressionPropertyInterface(i.s)},_name:{value:e.nm}}),n.mn=e.mn,n}function h(e,t,r){function n(t){return e.r.ix===t||"Round Corners 1"===t?n.radius:null}var a=propertyGroupFactory(n,r),i=t;return n.propertyIndex=e.ix,i.rd.setGroupProperty(PropertyInterface("Radius",a)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(i.rd)},_name:{value:e.nm}}),n.mn=e.mn,n}function p(e,t,r){function n(t){return e.c.ix===t||"Copies"===t?n.copies:e.o.ix===t||"Offset"===t?n.offset:null}var a=propertyGroupFactory(n,r),i=t;return n.propertyIndex=e.ix,i.c.setGroupProperty(PropertyInterface("Copies",a)),i.o.setGroupProperty(PropertyInterface("Offset",a)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(i.c)},offset:{get:ExpressionPropertyInterface(i.o)},_name:{value:e.nm}}),n.mn=e.mn,n}return function(t,r,n){var a;function i(e){if("number"==typeof e)return 0===(e=void 0===e?1:e)?n:a[e-1];for(var t=0,r=a.length;t<r;){if(a[t]._name===e)return a[t];t+=1}return null}return i.propertyGroup=propertyGroupFactory(i,(function(){return n})),a=e(t,r,i.propertyGroup),i.numProperties=a.length,i._name="Contents",i}}(),TextExpressionInterface=function(e){var t;function r(e){return"ADBE Text Document"===e?r.sourceText:null}return Object.defineProperty(r,"sourceText",{get:function(){e.textProperty.getValue();var r=e.textProperty.currentData.t;return t&&r===t.value||((t=new String(r)).value=r||new String(r),Object.defineProperty(t,"style",{get:function(){return{fillColor:e.textProperty.currentData.fc}}})),t}}),r};function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var FootageInterface=(dataInterfaceFactory=function(e){function t(e){return"Outline"===e?t.outlineInterface():null}return t._name="Outline",t.outlineInterface=function(e){var t="",r=e.getFootageData();function n(e){if(r[e])return t=e,"object"===_typeof(r=r[e])?n:r;var a=e.indexOf(t);if(-1!==a){var i=parseInt(e.substr(a+t.length),10);return"object"===_typeof(r=r[i])?n:r}return""}return function(){return t="",r=e.getFootageData(),n}}(e),t},function(e){function t(e){return"Data"===e?t.dataInterface:null}return t._name="Data",t.dataInterface=dataInterfaceFactory(e),t}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(e){return interfaces[e]||null}var expressionHelpers={searchExpressions:function(e,t,r){t.x&&(r.k=!0,r.x=!0,r.initiateExpression=ExpressionManager.initiateExpression,r.effectsSequence.push(r.initiateExpression(e,t,r).bind(r)))},getSpeedAtTime:function(e){var t=this.getValueAtTime(e),r=this.getValueAtTime(e+-.01),n=0;if(t.length){var a;for(a=0;a<t.length;a+=1)n+=Math.pow(r[a]-t[a],2);n=100*Math.sqrt(n)}else n=0;return n},getVelocityAtTime:function(e){if(void 0!==this.vel)return this.vel;var t,r,n=-.001,a=this.getValueAtTime(e),i=this.getValueAtTime(e+n);if(a.length)for(t=createTypedArray("float32",a.length),r=0;r<a.length;r+=1)t[r]=(i[r]-a[r])/n;else t=(i-a)/n;return t},getValueAtTime:function(e){return e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<e?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(e,this._cachingAtTime),this._cachingAtTime.lastFrame=e),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(e){this.propertyGroup=e}};function addPropertyDecorator(){function e(e,t,r){if(!this.k||!this.keyframes)return this.pv;e=e?e.toLowerCase():"";var n,a,i,s,o,l=this.comp.renderedFrame,c=this.keyframes,h=c[c.length-1].t;if(l<=h)return this.pv;if(r?a=h-(n=t?Math.abs(h-this.elem.comp.globalData.frameRate*t):Math.max(0,h-this.elem.data.ip)):((!t||t>c.length-1)&&(t=c.length-1),n=h-(a=c[c.length-1-t].t)),"pingpong"===e){if(Math.floor((l-a)/n)%2!=0)return this.getValueAtTime((n-(l-a)%n+a)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var p=this.getValueAtTime(a/this.comp.globalData.frameRate,0),d=this.getValueAtTime(h/this.comp.globalData.frameRate,0),u=this.getValueAtTime(((l-a)%n+a)/this.comp.globalData.frameRate,0),f=Math.floor((l-a)/n);if(this.pv.length){for(s=(o=new Array(p.length)).length,i=0;i<s;i+=1)o[i]=(d[i]-p[i])*f+u[i];return o}return(d-p)*f+u}if("continue"===e){var m=this.getValueAtTime(h/this.comp.globalData.frameRate,0),g=this.getValueAtTime((h-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(s=(o=new Array(m.length)).length,i=0;i<s;i+=1)o[i]=m[i]+(m[i]-g[i])*((l-h)/this.comp.globalData.frameRate)/5e-4;return o}return m+(l-h)/.001*(m-g)}}return this.getValueAtTime(((l-a)%n+a)/this.comp.globalData.frameRate,0)}function t(e,t,r){if(!this.k)return this.pv;e=e?e.toLowerCase():"";var n,a,i,s,o,l=this.comp.renderedFrame,c=this.keyframes,h=c[0].t;if(l>=h)return this.pv;if(r?a=h+(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-h)):((!t||t>c.length-1)&&(t=c.length-1),n=(a=c[t].t)-h),"pingpong"===e){if(Math.floor((h-l)/n)%2==0)return this.getValueAtTime(((h-l)%n+h)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var p=this.getValueAtTime(h/this.comp.globalData.frameRate,0),d=this.getValueAtTime(a/this.comp.globalData.frameRate,0),u=this.getValueAtTime((n-(h-l)%n+h)/this.comp.globalData.frameRate,0),f=Math.floor((h-l)/n)+1;if(this.pv.length){for(s=(o=new Array(p.length)).length,i=0;i<s;i+=1)o[i]=u[i]-(d[i]-p[i])*f;return o}return u-(d-p)*f}if("continue"===e){var m=this.getValueAtTime(h/this.comp.globalData.frameRate,0),g=this.getValueAtTime((h+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(s=(o=new Array(m.length)).length,i=0;i<s;i+=1)o[i]=m[i]+(m[i]-g[i])*(h-l)/.001;return o}return m+(m-g)*(h-l)/.001}}return this.getValueAtTime((n-((h-l)%n+h))/this.comp.globalData.frameRate,0)}function r(e,t){if(!this.k)return this.pv;if(e=.5*(e||.4),(t=Math.floor(t||5))<=1)return this.pv;var r,n,a=this.comp.renderedFrame/this.comp.globalData.frameRate,i=a-e,s=t>1?(a+e-i)/(t-1):1,o=0,l=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;o<t;){if(n=this.getValueAtTime(i+o*s),this.pv.length)for(l=0;l<this.pv.length;l+=1)r[l]+=n[l];else r+=n;o+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)r[l]/=t;else r/=t;return r}function n(e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var t=this._transformCachingAtTime.v;if(t.cloneFromProps(this.pre.props),this.appliedTransformations<1){var r=this.a.getValueAtTime(e);t.translate(-r[0]*this.a.mult,-r[1]*this.a.mult,r[2]*this.a.mult)}if(this.appliedTransformations<2){var n=this.s.getValueAtTime(e);t.scale(n[0]*this.s.mult,n[1]*this.s.mult,n[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var a=this.sk.getValueAtTime(e),i=this.sa.getValueAtTime(e);t.skewFromAxis(-a*this.sk.mult,i*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var s=this.r.getValueAtTime(e);t.rotate(-s*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(e),l=this.ry.getValueAtTime(e),c=this.rx.getValueAtTime(e),h=this.or.getValueAtTime(e);t.rotateZ(-o*this.rz.mult).rotateY(l*this.ry.mult).rotateX(c*this.rx.mult).rotateZ(-h[2]*this.or.mult).rotateY(h[1]*this.or.mult).rotateX(h[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var p=this.px.getValueAtTime(e),d=this.py.getValueAtTime(e);if(this.data.p.z){var u=this.pz.getValueAtTime(e);t.translate(p*this.px.mult,d*this.py.mult,-u*this.pz.mult)}else t.translate(p*this.px.mult,d*this.py.mult,0)}else{var f=this.p.getValueAtTime(e);t.translate(f[0]*this.p.mult,f[1]*this.p.mult,-f[2]*this.p.mult)}return t}function a(){return this.v.clone(new Matrix)}var i=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(e,t,r){var s=i(e,t,r);return s.dynamicProperties.length?s.getValueAtTime=n.bind(s):s.getValueAtTime=a.bind(s),s.setGroupProperty=expressionHelpers.setGroupProperty,s};var s=PropertyFactory.getProp;PropertyFactory.getProp=function(n,a,i,o,l){var c=s(n,a,i,o,l);c.kf?c.getValueAtTime=expressionHelpers.getValueAtTime.bind(c):c.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(c),c.setGroupProperty=expressionHelpers.setGroupProperty,c.loopOut=e,c.loopIn=t,c.smooth=r,c.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(c),c.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(c),c.numKeys=1===a.a?a.k.length:0,c.propertyIndex=a.ix;var h=0;return 0!==i&&(h=createTypedArray("float32",1===a.a?a.k[0].s.length:a.k.length)),c._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:h},expressionHelpers.searchExpressions(n,a,c),c.k&&l.addDynamicProperty(c),c};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function c(){}c.prototype={vertices:function(e,t){this.k&&this.getValue();var r,n=this.v;void 0!==t&&(n=this.getValueAtTime(t,0));var a=n._length,i=n[e],s=n.v,o=createSizedArray(a);for(r=0;r<a;r+=1)o[r]="i"===e||"o"===e?[i[r][0]-s[r][0],i[r][1]-s[r][1]]:[i[r][0],i[r][1]];return o},points:function(e){return this.vertices("v",e)},inTangents:function(e){return this.vertices("i",e)},outTangents:function(e){return this.vertices("o",e)},isClosed:function(){return this.v.c},pointOnPath:function(e,t){var r=this.v;void 0!==t&&(r=this.getValueAtTime(t,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(r));for(var n,a=this._segmentsLength,i=a.lengths,s=a.totalLength*e,o=0,l=i.length,c=0;o<l;){if(c+i[o].addedLength>s){var h=o,p=r.c&&o===l-1?0:o+1,d=(s-c)/i[o].addedLength;n=bez.getPointInSegment(r.v[h],r.v[p],r.o[h],r.i[p],d,i[o]);break}c+=i[o].addedLength,o+=1}return n||(n=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),n},vectorOnPath:function(e,t,r){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),a=this.pointOnPath(e+.001,t),i=a[0]-n[0],s=a[1]-n[1],o=Math.sqrt(Math.pow(i,2)+Math.pow(s,2));return 0===o?[0,0]:"tangent"===r?[i/o,s/o]:[-s/o,i/o]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],o),extendPrototype([c],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=e,this.interpolateShape(e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var h=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(e,t,r,n,a){var i=h(e,t,r,n,a);return i.propertyIndex=t.ix,i.lock=!1,3===r?expressionHelpers.searchExpressions(e,t.pt,i):4===r&&expressionHelpers.searchExpressions(e,t.ks,i),i.k&&e.addDynamicProperty(i),i}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(e,t){var r=this.calculateExpression(t);if(e.t!==r){var n={};return this.copyData(n,e),n.t=r.toString(),n.__complete=!1,n}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),t=this.searchExpressions();return this.kf=e||t,this.kf},TextProperty.prototype.searchExpressions=function(){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}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(e,t){var r,n,a=createNS("feMerge");for(a.setAttribute("result",e),n=0;n<t.length;n+=1)(r=createNS("feMergeNode")).setAttribute("in",t[n]),a.appendChild(r),a.appendChild(r);return a}};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(e,t,r,n,a){this.filterManager=t;var i=createNS("feColorMatrix");i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","linearRGB"),i.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=i,i.setAttribute("result",n+"_tint_1"),e.appendChild(i),(i=createNS("feColorMatrix")).setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),i.setAttribute("result",n+"_tint_2"),e.appendChild(i),this.matrixFilter=i;var s=this.createMergeNode(n,[a,n+"_tint_1",n+"_tint_2"]);e.appendChild(s)}function SVGFillFilter(e,t,r,n){this.filterManager=t;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),a.setAttribute("result",n),e.appendChild(a),this.matrixFilter=a}function SVGStrokeEffect(e,t,r){this.initialized=!1,this.filterManager=t,this.elem=r,this.paths=[]}function SVGTritoneFilter(e,t,r,n){this.filterManager=t;var a=createNS("feColorMatrix");a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","linearRGB"),a.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"),e.appendChild(a);var i=createNS("feComponentTransfer");i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("result",n),this.matrixFilter=i;var s=createNS("feFuncR");s.setAttribute("type","table"),i.appendChild(s),this.feFuncR=s;var o=createNS("feFuncG");o.setAttribute("type","table"),i.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),i.appendChild(l),this.feFuncB=l,e.appendChild(i)}function SVGProLevelsFilter(e,t,r,n){this.filterManager=t;var a=this.filterManager.effectElements,i=createNS("feComponentTransfer");(a[10].p.k||0!==a[10].p.v||a[11].p.k||1!==a[11].p.v||a[12].p.k||1!==a[12].p.v||a[13].p.k||0!==a[13].p.v||a[14].p.k||1!==a[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",i)),(a[17].p.k||0!==a[17].p.v||a[18].p.k||1!==a[18].p.v||a[19].p.k||1!==a[19].p.v||a[20].p.k||0!==a[20].p.v||a[21].p.k||1!==a[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",i)),(a[24].p.k||0!==a[24].p.v||a[25].p.k||1!==a[25].p.v||a[26].p.k||1!==a[26].p.v||a[27].p.k||0!==a[27].p.v||a[28].p.k||1!==a[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",i)),(a[31].p.k||0!==a[31].p.v||a[32].p.k||1!==a[32].p.v||a[33].p.k||1!==a[33].p.v||a[34].p.k||0!==a[34].p.v||a[35].p.k||1!==a[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",i)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(i.setAttribute("color-interpolation-filters","sRGB"),e.appendChild(i)),(a[3].p.k||0!==a[3].p.v||a[4].p.k||1!==a[4].p.v||a[5].p.k||1!==a[5].p.v||a[6].p.k||0!==a[6].p.v||a[7].p.k||1!==a[7].p.v)&&((i=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("result",n),e.appendChild(i),this.feFuncRComposed=this.createFeFunc("feFuncR",i),this.feFuncGComposed=this.createFeFunc("feFuncG",i),this.feFuncBComposed=this.createFeFunc("feFuncB",i))}function SVGDropShadowEffect(e,t,r,n,a){var i=t.container.globalData.renderConfig.filterSize,s=t.data.fs||i;e.setAttribute("x",s.x||i.x),e.setAttribute("y",s.y||i.y),e.setAttribute("width",s.width||i.width),e.setAttribute("height",s.height||i.height),this.filterManager=t;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",n+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,e.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,e.appendChild(l);var c=createNS("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=c,e.appendChild(c);var h=createNS("feComposite");h.setAttribute("in",n+"_drop_shadow_3"),h.setAttribute("in2",n+"_drop_shadow_2"),h.setAttribute("operator","in"),h.setAttribute("result",n+"_drop_shadow_4"),e.appendChild(h);var p=this.createMergeNode(n,[n+"_drop_shadow_4",a]);e.appendChild(p)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",r[0]-t[0]+" 0 0 0 "+t[0]+" "+(r[1]-t[1])+" 0 0 0 "+t[1]+" "+(r[2]-t[2])+" 0 0 0 "+t[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[2].p.v,r=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+t[0]+" 0 0 0 0 "+t[1]+" 0 0 0 0 "+t[2]+" 0 0 0 "+r+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var e,t,r,n,a=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,r=0):n=1+(r=this.filterManager.effectElements[0].p.v-1),(t=createNS("g")).setAttribute("fill","none"),t.setAttribute("stroke-linecap","round"),t.setAttribute("stroke-dashoffset",1);r<n;r+=1)e=createNS("path"),t.appendChild(e),this.paths.push({p:e,m:r});if(3===this.filterManager.effectElements[10].p.v){var i=createNS("mask"),s=createElementID();i.setAttribute("id",s),i.setAttribute("mask-type","alpha"),i.appendChild(t),this.elem.globalData.defs.appendChild(i);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+s+")");a[0];)o.appendChild(a[0]);this.elem.layerElement.appendChild(o),this.masker=i,t.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(a=this.elem.layerElement.children||this.elem.layerElement.childNodes;a.length;)this.elem.layerElement.removeChild(a[0]);this.elem.layerElement.appendChild(t),this.elem.layerElement.removeAttribute("mask"),t.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=t},SVGStrokeEffect.prototype.renderFrame=function(e){var t;this.initialized||this.initialize();var r,n,a=this.paths.length;for(t=0;t<a;t+=1)if(-1!==this.paths[t].m&&(r=this.elem.maskManager.viewData[this.paths[t].m],n=this.paths[t].p,(e||this.filterManager._mdf||r.prop._mdf)&&n.setAttribute("d",r.lastPath),e||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||r.prop._mdf)){var i;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var s=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=n.getTotalLength();i="0 0 0 "+l*s+" ";var c,h=l*(o-s),p=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,d=Math.floor(h/p);for(c=0;c<d;c+=1)i+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";i+="0 "+10*l+" 0 0"}else i="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;n.setAttribute("stroke-dasharray",i)}if((e||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(e||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(e||this.filterManager.effectElements[3].p._mdf)){var u=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*u[0])+","+bmFloor(255*u[1])+","+bmFloor(255*u[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,a=n[0]+" "+r[0]+" "+t[0],i=n[1]+" "+r[1]+" "+t[1],s=n[2]+" "+r[2]+" "+t[2];this.feFuncR.setAttribute("tableValues",a),this.feFuncG.setAttribute("tableValues",i),this.feFuncB.setAttribute("tableValues",s)}},SVGProLevelsFilter.prototype.createFeFunc=function(e,t){var r=createNS(e);return r.setAttribute("type","table"),t.appendChild(r),r},SVGProLevelsFilter.prototype.getTableValue=function(e,t,r,n,a){for(var i,s,o=0,l=Math.min(e,t),c=Math.max(e,t),h=Array.call(null,{length:256}),p=0,d=a-n,u=t-e;o<=256;)s=(i=o/256)<=l?u<0?a:n:i>=c?u<0?n:a:n+d*Math.pow((i-e)/u,1/r),h[p]=s,p+=1,o+=256/255;return h.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,a=r*Math.cos(n),i=r*Math.sin(n);this.feOffset.setAttribute("dx",a),this.feOffset.setAttribute("dy",i)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(e,t,r,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var a=createNS("feGaussianBlur");a.setAttribute("result",n),e.appendChild(a),this.feGaussianBlur=a}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t<r;){if(_svgMatteSymbols[t]===e)return _svgMatteSymbols[t];t+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(e,t){var r=e.layerElement.parentNode;if(r){for(var n,a=r.children,i=0,s=a.length;i<s&&a[i]!==e.layerElement;)i+=1;i<=s-2&&(n=a[i+1]);var o=createNS("use");o.setAttribute("href","#"+t),n?r.insertBefore(o,n):r.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(e,t){if(!this.findSymbol(t)){var r=createElementID(),n=createNS("mask");n.setAttribute("id",t.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(t);var a=e.globalData.defs;a.appendChild(n);var i=createNS("symbol");i.setAttribute("id",r),this.replaceInParent(t,r),i.appendChild(t.layerElement),a.appendChild(i);var s=createNS("use");s.setAttribute("href","#"+r),n.appendChild(s),t.data.hd=!1,t.show()}e.setMatte(t.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var e=this.filterManager.effectElements[0].p.v,t=this.elem.comp.elements,r=0,n=t.length;r<n;)t[r]&&t[r].data.ind===e&&this.setElementAsMask(this.elem,t[r]),r+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t=.3*this.filterManager.effectElements[0].p.v,r=this.filterManager.effectElements[1].p.v,n=3==r?0:t,a=2==r?0:t;this.feGaussianBlur.setAttribute("stdDeviation",n+" "+a);var i=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",i)}},TransformEffect.prototype.init=function(e){this.effectsManager=e,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(e){if(this._opMdf=!1,this._mdf=!1,e||this.effectsManager._mdf){var t=this.effectsManager.effectElements,r=t[0].p.v,n=t[1].p.v,a=1===t[2].p.v,i=t[3].p.v,s=a?i:t[4].p.v,o=t[5].p.v,l=t[6].p.v,c=t[7].p.v;this.matrix.reset(),this.matrix.translate(-r[0],-r[1],r[2]),this.matrix.scale(.01*s,.01*i,1),this.matrix.rotate(-c*degToRads),this.matrix.skewFromAxis(-o*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==t[8].p.v&&(this.opacity=t[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),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},module.exports=factory())}(lottie$2,lottie$2.exports)),lottie$2.exports}var lottieExports=requireLottie(),lottie=getDefaultExportFromCjs(lottieExports);const qontoLottiePlayerStyles=i$4`
174
174
  :host {
175
175
  display: block;
176
176
  }
@@ -504,7 +504,7 @@ const a=Symbol.for(""),o$1=e=>{if(e?.r===a)return e?._$litStatic$},s=e=>({_$litS
504
504
  </qonto-button>
505
505
  </div>
506
506
  ${environmentManager.isProductionEnvironment()?null:renderTestingScaHelper(this.networkCallDescriptor)}
507
- `}};async function getSepaTransfers(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetSepaTransfersCall({paginationSettings:a})),t=decodeNetworkResponse(await r(e)),n=t.body.transfers.map(serializeSepaTransfer),i=serializePaginationResponse(t.body.meta);return{transfers:n,...i?{meta:i}:{}}}{const e=n||validatePresenceOfAuthToken(),r=await getSepaTransfers$1({accessToken:e,stagingToken:t,paginationSettings:a}),i=r.transfers.map(serializeSepaTransfer),s=serializePaginationResponse(r.meta);return{transfers:i,...s?{meta:s}:{}}}}async function getSepaTransfer({sepaTransferSettings:e,operationSettings:t}){const r=validateGetSepaTransferParams(e?.sepaTransferId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetSepaTransferCall({sepaTransferId:r}));return serializeSepaTransfer(decodeNetworkResponse(await n(e)).body.transfer)}{const e=a||validatePresenceOfAuthToken();return serializeSepaTransfer(await getSepaTransfer$1({sepaTransferId:r,accessToken:e,stagingToken:i}))}}async function*createSepaTransfer({sepaTransferSettings:e,operationSettings:t}){const{proxyRequestFunction:r,accessToken:n,stagingToken:a}=validateOperationSettingsParams(t||{}),i=a||authManager.getStagingToken(),s=t?.idempotencyKey||v4();let o;validateTransferBeneficiaryParams(e);const l=await findBeneficiary({sepaTransferSettings:e,operationSettings:t}),c={name:l.name,iban:l.iban},h=await verifySepaPayee({sepaPayee:c,operationSettings:t}),p=yield serializeToVopVerificationResult(h);let d;if("string"==typeof p){if(p===VOP_DECISIONS.REJECT)return}else{if(p.vopDecision===VOP_DECISIONS.REJECT)return;d=p.sepaTransferSettings}const f={...e,...d};validateCreateSepaTransferParams(f);const u={...f,beneficiary:l};if(u.beneficiary?.trusted)if(r){const e=encodeNetworkCall(prepareCreateSepaTransferCall({transfer:u,vopProofToken:h.proof_token.token,idempotencyKey:s}));o=decodeNetworkResponse(await r(e)).body.transfer}else{const e=n||validatePresenceOfAuthToken();o=await createSepaTransfer$1({transfer:u,vopProofToken:h.proof_token.token,accessToken:e,stagingToken:i||void 0,idempotencyKey:s})}else{if(!isRunningInBrowser())throw new InvalidRuntimeError(RUNTIME_ENVIRONMENT.BROWSER);const{uiParentElementId:e,proxyRequestFunction:r,locale:a}=validateOperationSettingsParams(t,{requiresUI:!0}),l=n||validatePresenceOfAuthToken(),c=prepareCreateSepaTransferCall({transfer:u,vopProofToken:h.proof_token.token,accessToken:l,stagingToken:i||void 0,idempotencyKey:s});let p;try{await makeNetworkCall(c)}catch(e){if(!(e instanceof EmbedApiError&&e.code===HTTP_CODES.PRECONDITION_REQUIRED))throw e;p=serializePreconditionRequiredResponse(e.data).scaSessionToken}const d=createSepaTransferScaElement({networkCallDescriptor:c,scaSessionToken:p,operationSettings:{uiParentElementId:e,proxyRequestFunction:r,locale:a}});try{o=await waitForSepaTransferScaResult(d)}finally{d.remove()}}return serializeSepaTransfer(o)}async function cancelSepaTransfer({sepaTransferSettings:e,operationSettings:t}){const r=validateCancelSepaTransferParams(e?.sepaTransferId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareCancelSepaTransferCall({sepaTransferId:r}));decodeNetworkResponse(await n(e))}else{const e=a||validatePresenceOfAuthToken();await cancelSepaTransfer$1({sepaTransferId:r,accessToken:e,stagingToken:i})}}async function verifySepaPayee({sepaPayee:e,operationSettings:t}){const{proxyRequestFunction:r,accessToken:n,stagingToken:a}=validateOperationSettingsParams(t||{});if(r){const t=encodeNetworkCall(prepareVerifySepaPayeeCall({sepaPayee:e}));return decodeNetworkResponse(await r(t)).body}{const t=n||validatePresenceOfAuthToken();return await verifySepaPayee$1({sepaPayee:e,accessToken:t,stagingToken:a})}}async function getSepaTransferCreationFlowLink({sepaTransferSettings:e,operationSettings:t}){const r=validateGetSepaTransferCreationFlowLinkParams(e),{proxyRequestFunction:n,stagingToken:a,accessToken:i}=validateOperationSettingsParams(t||{}),s=n?{proxyRequestFunction:n}:{stagingToken:a,accessToken:i||validatePresenceOfAuthToken()},o=await authLinks.request({requestSettings:{action:AUTH_LINK_ACTIONS.SEPA_TRANSFER_CREATE,callbackUrl:r},operationSettings:s});return{...o,url:decorateUrlWithExtraParams(o.url,t)}}QontoScaPasskeyWaiting.styles=qontoScaPasskeyWaitingStyles,__decorate([n$3({type:String})],QontoScaPasskeyWaiting.prototype,"phoneLast4Digits",void 0),__decorate([n$3({type:Object})],QontoScaPasskeyWaiting.prototype,"networkCallDescriptor",void 0),__decorate([n$3({type:Object})],QontoScaPasskeyWaiting.prototype,"operationSettings",void 0),__decorate([r$1()],QontoScaPasskeyWaiting.prototype,"isResending",void 0),__decorate([r$1()],QontoScaPasskeyWaiting.prototype,"isLinkCopied",void 0),QontoScaPasskeyWaiting=__decorate([localized(),t$1("qonto-sca-passkey-waiting")],QontoScaPasskeyWaiting);const sepaTransfers$1={getSepaTransfers:getSepaTransfers,getSepaTransfer:getSepaTransfer,createSepaTransfer:createSepaTransfer,cancelSepaTransfer:cancelSepaTransfer,getSepaTransferCreationFlowLink:getSepaTransferCreationFlowLink,bulkTransfers:{getBulkTransfers:getBulkTransfers,getBulkTransfer:getBulkTransfer,createBulkTransfer:createBulkTransfer}},sepaTransfers=sepaTransfers$1,LINK_TYPES={GOOD:"good",SERVICE:"service"},CURRENCIES={AED:"AED",AUD:"AUD",BGN:"BGN",CAD:"CAD",CHF:"CHF",CNY:"CNY",CZK:"CZK",DKK:"DKK",EUR:"EUR",GBP:"GBP",GHS:"GHS",HKD:"HKD",HUF:"HUF",ILS:"ILS",INR:"INR",MXN:"MXN",NOK:"NOK",NZD:"NZD",PEN:"PEN",PLN:"PLN",RON:"RON",RSD:"RSD",SAR:"SAR",SEK:"SEK",SGD:"SGD",TRY:"TRY",USD:"USD",ZAR:"ZAR",ZMW:"ZMW"},isValidCurrency=e=>Object.values(CURRENCIES).includes(e),validateCurrency=e=>{if(!isValidCurrency(e))throw new InvalidParametersError(`currency ${e} is not valid, valid currencies are ${Object.values(CURRENCIES).join(", ")}`)},UNITS={UNIT:"unit",HOUR:"hour",DAY:"day",MONTH:"month",GRAM:"gram",KILOGRAM:"kilogram",LITER:"liter",METER:"meter",SQUARE_METER:"square_meter",CUBIC_METER:"cubic_meter",AMPERE:"ampere",NUMBER_OF_ARTICLES:"number_of_articles",CENTIMETER:"centimeter",CUBIC_METER_PER_HOUR:"cubic_meter_per_hour",GIGAJOULE:"gigajoule",GIGAWATT:"gigawatt",GIGAWATT_HOUR:"gigawatt_hour",HALF_YEAR:"half_year",JOULE:"joule",KILOJOULE:"kilojoule",KILOVAR:"kilovar",KILOWATT:"kilowatt",KILOWATT_HOUR:"kilowatt_hour",MEGAJOULE:"megajoule",MEGAWATT:"megawatt",MEGAWATT_HOUR:"megawatt_hour",MILLIGRAM:"milligram",MILLILITER:"milliliter",MILLIMETER:"millimeter",MINUTE:"minute",PAIR:"pair",QUARTER:"quarter",SECOND:"second",SET:"set",TON:"ton",TWO_WEEK:"two_week",WATT_HOUR:"watt_hour",WEEK:"week",YEAR:"year"},isValidUnit=e=>Object.values(UNITS).includes(e),validateUnit=e=>{if(!isValidUnit(e))throw new InvalidParametersError(`unit ${e} is not valid, valid units are ${Object.values(UNITS).join(", ")}`)},requiredCreatePaymentLinkParams=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],requiredPriceParams=[{name:"currency"},{name:"value"}];function validateItems(e){if(!e||!Array.isArray(e))return[];e.forEach((e=>{validatePresenceOfRequiredParams(e,requiredCreatePaymentLinkParams),validatePresenceOfRequiredParams(e.unitPrice,requiredPriceParams);const t=[...validateExpectedStringValues({id:e.id,title:e.title,vatRate:e.vatRate,currency:e.unitPrice.currency,measureUnit:e.measureUnit,unitPrice:e.unitPrice.value,...e.description?{description:e.description}:{}}),...validateExpectedNumericValues({quantity:e.quantity})].flat();if(t.length>0)throw new InvalidParametersError(t);validateType(e.type),validateCurrency(e.unitPrice.currency),validateUnit(e.measureUnit)}))}function validateAuthUrl(e){if(!e)throw new InvalidParametersError("authUrl is required for the called function");const t=validateExpectedStringValues({authUrl:e});if(t.length>0)throw new InvalidParametersError(t);try{new URL(e)}catch{throw new InvalidParametersError("authUrl is not a valid URL")}}const validateType=e=>{if(!Object.values(LINK_TYPES).includes(e))throw new InvalidParametersError(`type ${e} is not valid, valid types are ${Object.values(LINK_TYPES).join(", ")}`)},getPaymentLinkCreationFlowUrl=({paymentLinkSettings:e})=>{const{items:t,authUrl:r}=e;validateAuthUrl(r),validateItems(t);const n=new URLSearchParams({...t?{items:JSON.stringify(t)}:{}});return n.toString()?`${r}?${n.toString()}`:r},paymentLinks$1={getPaymentLinkCreationFlowUrl:getPaymentLinkCreationFlowUrl},paymentLinks=paymentLinks$1,ORGANIZATION_ENDPOINT="/v2/organization/",BANK_ACCOUNTS_ENDPOINT="/v2/bank_accounts/",prepareGetOrganization=({accessToken:e,stagingToken:t})=>({path:`${ORGANIZATION_ENDPOINT}`,options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),getOrganization$1=async({accessToken:e,stagingToken:t})=>{const r=prepareGetOrganization({accessToken:e,stagingToken:t});return await makeNetworkCall(r)},prepareGetBankAccounts=({accessToken:e,stagingToken:t})=>({path:`${BANK_ACCOUNTS_ENDPOINT}`,options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),getBankAccounts$1=async({accessToken:e,stagingToken:t})=>{const r=prepareGetBankAccounts({accessToken:e,stagingToken:t});return await makeNetworkCall(r)},serializeOrganization=e=>({id:e.id,slug:e.slug,legalName:e.legal_name,legalNumber:e.legal_number,legalSector:e.legal_sector,legalRegistrationDate:e.legal_registration_date,legalAddress:e.legal_address,legalForm:e.legal_form,legalCountry:e.legal_country,legalShareCapital:e.legal_share_capital,locale:e.locale,contractSignedAt:e.contract_signed_at,bankAccounts:e.bank_accounts.map(serializeBankAccount)}),serializeBankAccount=e=>({id:e?.id,slug:e.slug,iban:e.iban,bic:e.bic,currency:e.currency,balance:parseFloat(e.balance),balanceCents:e.balance_cents,authorizedBalance:e.authorized_balance,authorizedBalanceCents:e.authorized_balance_cents,name:e.name,updatedAt:new Date(e.updated_at),status:e.status,main:e.main}),getOrganization=async e=>{const{stagingToken:t,proxyRequestFunction:r}=validateOperationSettingsParams(e);if(r){const e=prepareGetOrganization({stagingToken:t}),n=await r(encodeNetworkCall(e)),{body:a}=decodeNetworkResponse(n);return serializeOrganization(a.organization)}{const r=e.accessToken||validatePresenceOfAuthToken(),n=await getOrganization$1({accessToken:r,stagingToken:t});return serializeOrganization(n.organization)}},getBankAccounts=async e=>{const{stagingToken:t,proxyRequestFunction:r}=validateOperationSettingsParams(e);if(r){const e=prepareGetBankAccounts({stagingToken:t}),n=await r(encodeNetworkCall(e)),{body:a}=decodeNetworkResponse(n);return a.bank_accounts.map(serializeBankAccount)}{const r=e.accessToken||validatePresenceOfAuthToken();return(await getBankAccounts$1({accessToken:r,stagingToken:t})).bank_accounts.map(serializeBankAccount)}},organizations$1={getOrganization:getOrganization,getBankAccounts:getBankAccounts},organizations=organizations$1,TRANSACTIONS_ENDPOINT="/v2/transactions";function prepareGetTransactionsCall({bankAccountId:e,iban:t,status:r,updatedAtFrom:n,updatedAtTo:a,emittedAtFrom:i,emittedAtTo:s,settledAtFrom:o,settledAtTo:l,side:c,operationType:h,withAttachments:p,paginationSettings:d,accessToken:f,stagingToken:u}){const m={method:"GET",headers:{accessToken:f,stagingToken:u}},g=new URLSearchParams;e&&g.append("bank_account_id",e),t&&g.append("iban",t),r&&g.append("status",r),n&&g.append("updated_at_from",n),a&&g.append("updated_at_to",a),i&&g.append("emitted_at_from",i),s&&g.append("emitted_at_to",s),o&&g.append("settled_at_from",o),l&&g.append("settled_at_to",l),c&&g.append("side",c),h&&g.append("operation_type",h),void 0!==p&&g.append("with_attachments",String(p));const y=buildPaginationParams(d);for(const[e,t]of y)g.append(e,t);const v=g.toString();return{path:`${TRANSACTIONS_ENDPOINT}${v?`?${v}`:""}`,options:m}}async function getTransactions$1(e){const t=prepareGetTransactionsCall(e),{transactions:r,meta:n}=await makeNetworkCall(t);return{transactions:r,meta:n}}function prepareGetTransactionCall({transactionId:e,accessToken:t,stagingToken:r}){return{path:`${TRANSACTIONS_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getTransaction$1(e){const t=prepareGetTransactionCall(e),{transaction:r}=await makeNetworkCall(t);return r}function serializeTransaction(e){return{transactionId:e.transaction_id,amount:e.amount,amountCents:e.amount_cents,settledBalance:e.settled_balance,settledBalanceCents:e.settled_balance_cents,attachmentIds:e.attachment_ids,localAmount:e.local_amount,localAmountCents:e.local_amount_cents,side:e.side,operationType:e.operation_type,currency:e.currency,localCurrency:e.local_currency,label:e.label,settledAt:new Date(e.settled_at),emittedAt:new Date(e.emitted_at),updatedAt:new Date(e.updated_at),status:e.status,note:e.note,reference:e.reference,vatAmount:e.vat_amount,vatAmountCents:e.vat_amount_cents,vatRate:e.vat_rate,initiatorId:e.initiator_id,labelIds:e.label_ids,attachmentLost:e.attachment_lost,attachmentRequired:e.attachment_required,cardLastDigits:e.card_last_digits,category:e.category,cashflowCategory:{name:e.cashflow_category?.name||""},cashflowSubcategory:{name:e.cashflow_subcategory?.name||""},id:e.id,subjectType:e.subject_type,...e.transfer?{transfer:{counterpartyAccountNumber:e.transfer.counterparty_account_number,counterpartyName:e.transfer.counterparty_name,counterpartyBic:e.transfer.counterparty_bic,counterpartyIban:e.transfer.counterparty_iban}}:{}}}function validateGetTransactionParams(e){if(!e)throw new InvalidParametersError("transactionSettings parameter is required for the called function");if(!e.transactionId)throw new InvalidParametersError("transactionSettings.transactionId parameter is required for the called function");if(e.transactionId&&"string"!=typeof e.transactionId)throw new InvalidParametersError("transactionSettings.transactionId must be a string.");return e}async function getTransactions(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{}),i={...e?.transactionSettings||{},paginationSettings:a};if(r){const e=encodeNetworkCall(prepareGetTransactionsCall(i)),t=decodeNetworkResponse(await r(e));return{transactions:t.body.transactions.map(serializeTransaction),meta:t.body.meta}}{const e=n||validatePresenceOfAuthToken(),r=await getTransactions$1({...i,accessToken:e,stagingToken:t});return{transactions:r.transactions.map(serializeTransaction),meta:r.meta}}}async function getTransaction({transactionSettings:e,operationSettings:t}){const{proxyRequestFunction:r,accessToken:n,stagingToken:a}=validateOperationSettingsParams(t||{}),{transactionId:i}=validateGetTransactionParams(e);if(r){const e=encodeNetworkCall(prepareGetTransactionCall({transactionId:i}));return serializeTransaction(decodeNetworkResponse(await r(e)).body.transaction)}{const e=n||validatePresenceOfAuthToken();return serializeTransaction(await getTransaction$1({transactionId:i,accessToken:e,stagingToken:a}))}}const transactions$1={getTransactions:getTransactions,getTransaction:getTransaction},transactions=transactions$1,UI_ELEMENT_NAMES={TRANSFER_LIST:"transfer-list"};function validateCreateUIElementParams(e){if(!e?.uiElementName)throw new InvalidParametersError("uiElementSettings.uiElementName is required when calling createUIElement");const t=Object.values(UI_ELEMENT_NAMES);if(!t.includes(e?.uiElementName))throw new InvalidParametersError(`uiElementSettings.uiElementName must be one of ${t.join(", ")}`);return{uiElementName:e.uiElementName}}const transferListStyles=i$4`
507
+ `}};async function getSepaTransfers(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{});if(r){const e=encodeNetworkCall(prepareGetSepaTransfersCall({paginationSettings:a})),t=decodeNetworkResponse(await r(e)),n=t.body.transfers.map(serializeSepaTransfer),i=serializePaginationResponse(t.body.meta);return{transfers:n,...i?{meta:i}:{}}}{const e=n||validatePresenceOfAuthToken(),r=await getSepaTransfers$1({accessToken:e,stagingToken:t,paginationSettings:a}),i=r.transfers.map(serializeSepaTransfer),s=serializePaginationResponse(r.meta);return{transfers:i,...s?{meta:s}:{}}}}async function getSepaTransfer({sepaTransferSettings:e,operationSettings:t}){const r=validateGetSepaTransferParams(e?.sepaTransferId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareGetSepaTransferCall({sepaTransferId:r}));return serializeSepaTransfer(decodeNetworkResponse(await n(e)).body.transfer)}{const e=a||validatePresenceOfAuthToken();return serializeSepaTransfer(await getSepaTransfer$1({sepaTransferId:r,accessToken:e,stagingToken:i}))}}async function*createSepaTransfer({sepaTransferSettings:e,operationSettings:t}){const{proxyRequestFunction:r,accessToken:n,stagingToken:a}=validateOperationSettingsParams(t||{}),i=a||authManager.getStagingToken(),s=t?.idempotencyKey||v4();let o;validateTransferBeneficiaryParams(e);const l=await findBeneficiary({sepaTransferSettings:e,operationSettings:t}),c={name:l.name,iban:l.iban},h=await verifySepaPayee({sepaPayee:c,operationSettings:t}),p=yield serializeToVopVerificationResult(h);let d;if("string"==typeof p){if(p===VOP_DECISIONS.REJECT)return}else{if(p.vopDecision===VOP_DECISIONS.REJECT)return;d=p.sepaTransferSettings}const u={...e,...d};validateCreateSepaTransferParams(u);const f={...u,beneficiary:l};if(f.beneficiary?.trusted)if(r){const e=encodeNetworkCall(prepareCreateSepaTransferCall({transfer:f,vopProofToken:h.proof_token.token,idempotencyKey:s}));o=decodeNetworkResponse(await r(e)).body.transfer}else{const e=n||validatePresenceOfAuthToken();o=await createSepaTransfer$1({transfer:f,vopProofToken:h.proof_token.token,accessToken:e,stagingToken:i||void 0,idempotencyKey:s})}else{if(!isRunningInBrowser())throw new InvalidRuntimeError(RUNTIME_ENVIRONMENT.BROWSER);const{uiParentElementId:e,proxyRequestFunction:r,locale:a}=validateOperationSettingsParams(t,{requiresUI:!0}),l=n||validatePresenceOfAuthToken(),c=prepareCreateSepaTransferCall({transfer:f,vopProofToken:h.proof_token.token,accessToken:l,stagingToken:i||void 0,idempotencyKey:s});let p;try{await makeNetworkCall(c)}catch(e){if(!(e instanceof EmbedApiError&&e.code===HTTP_CODES.PRECONDITION_REQUIRED))throw e;p=serializePreconditionRequiredResponse(e.data).scaSessionToken}const d=createSepaTransferScaElement({networkCallDescriptor:c,scaSessionToken:p,operationSettings:{uiParentElementId:e,proxyRequestFunction:r,locale:a}});try{o=await waitForSepaTransferScaResult(d)}finally{d.remove()}}return serializeSepaTransfer(o)}async function cancelSepaTransfer({sepaTransferSettings:e,operationSettings:t}){const r=validateCancelSepaTransferParams(e?.sepaTransferId),{proxyRequestFunction:n,accessToken:a,stagingToken:i}=validateOperationSettingsParams(t||{});if(n){const e=encodeNetworkCall(prepareCancelSepaTransferCall({sepaTransferId:r}));decodeNetworkResponse(await n(e))}else{const e=a||validatePresenceOfAuthToken();await cancelSepaTransfer$1({sepaTransferId:r,accessToken:e,stagingToken:i})}}async function verifySepaPayee({sepaPayee:e,operationSettings:t}){const{proxyRequestFunction:r,accessToken:n,stagingToken:a}=validateOperationSettingsParams(t||{});if(r){const t=encodeNetworkCall(prepareVerifySepaPayeeCall({sepaPayee:e}));return decodeNetworkResponse(await r(t)).body}{const t=n||validatePresenceOfAuthToken();return await verifySepaPayee$1({sepaPayee:e,accessToken:t,stagingToken:a})}}async function getSepaTransferCreationFlowLink({sepaTransferSettings:e,operationSettings:t}){const r=validateGetSepaTransferCreationFlowLinkParams(e),{proxyRequestFunction:n,stagingToken:a,accessToken:i}=validateOperationSettingsParams(t||{}),s=n?{proxyRequestFunction:n}:{stagingToken:a,accessToken:i||validatePresenceOfAuthToken()},o=await authLinks.request({requestSettings:{action:AUTH_LINK_ACTIONS.SEPA_TRANSFER_CREATE,callbackUrl:r},operationSettings:s});return{...o,url:decorateUrlWithExtraParams(o.url,t)}}QontoScaPasskeyWaiting.styles=qontoScaPasskeyWaitingStyles,__decorate([n$3({type:String})],QontoScaPasskeyWaiting.prototype,"phoneLast4Digits",void 0),__decorate([n$3({type:Object})],QontoScaPasskeyWaiting.prototype,"networkCallDescriptor",void 0),__decorate([n$3({type:Object})],QontoScaPasskeyWaiting.prototype,"operationSettings",void 0),__decorate([r$1()],QontoScaPasskeyWaiting.prototype,"isResending",void 0),__decorate([r$1()],QontoScaPasskeyWaiting.prototype,"isLinkCopied",void 0),QontoScaPasskeyWaiting=__decorate([localized(),t$1("qonto-sca-passkey-waiting")],QontoScaPasskeyWaiting);const sepaTransfers$1={getSepaTransfers:getSepaTransfers,getSepaTransfer:getSepaTransfer,createSepaTransfer:createSepaTransfer,cancelSepaTransfer:cancelSepaTransfer,getSepaTransferCreationFlowLink:getSepaTransferCreationFlowLink,bulkTransfers:{getBulkTransfers:getBulkTransfers,getBulkTransfer:getBulkTransfer,createBulkTransfer:createBulkTransfer}},sepaTransfers=sepaTransfers$1,LINK_TYPES={GOOD:"good",SERVICE:"service"},CURRENCIES={AED:"AED",AUD:"AUD",BGN:"BGN",CAD:"CAD",CHF:"CHF",CNY:"CNY",CZK:"CZK",DKK:"DKK",EUR:"EUR",GBP:"GBP",GHS:"GHS",HKD:"HKD",HUF:"HUF",ILS:"ILS",INR:"INR",MXN:"MXN",NOK:"NOK",NZD:"NZD",PEN:"PEN",PLN:"PLN",RON:"RON",RSD:"RSD",SAR:"SAR",SEK:"SEK",SGD:"SGD",TRY:"TRY",USD:"USD",ZAR:"ZAR",ZMW:"ZMW"},isValidCurrency=e=>Object.values(CURRENCIES).includes(e),validateCurrency=e=>{if(!isValidCurrency(e))throw new InvalidParametersError(`currency ${e} is not valid, valid currencies are ${Object.values(CURRENCIES).join(", ")}`)},UNITS={UNIT:"unit",HOUR:"hour",DAY:"day",MONTH:"month",GRAM:"gram",KILOGRAM:"kilogram",LITER:"liter",METER:"meter",SQUARE_METER:"square_meter",CUBIC_METER:"cubic_meter",AMPERE:"ampere",NUMBER_OF_ARTICLES:"number_of_articles",CENTIMETER:"centimeter",CUBIC_METER_PER_HOUR:"cubic_meter_per_hour",GIGAJOULE:"gigajoule",GIGAWATT:"gigawatt",GIGAWATT_HOUR:"gigawatt_hour",HALF_YEAR:"half_year",JOULE:"joule",KILOJOULE:"kilojoule",KILOVAR:"kilovar",KILOWATT:"kilowatt",KILOWATT_HOUR:"kilowatt_hour",MEGAJOULE:"megajoule",MEGAWATT:"megawatt",MEGAWATT_HOUR:"megawatt_hour",MILLIGRAM:"milligram",MILLILITER:"milliliter",MILLIMETER:"millimeter",MINUTE:"minute",PAIR:"pair",QUARTER:"quarter",SECOND:"second",SET:"set",TON:"ton",TWO_WEEK:"two_week",WATT_HOUR:"watt_hour",WEEK:"week",YEAR:"year"},isValidUnit=e=>Object.values(UNITS).includes(e),validateUnit=e=>{if(!isValidUnit(e))throw new InvalidParametersError(`unit ${e} is not valid, valid units are ${Object.values(UNITS).join(", ")}`)},requiredCreatePaymentLinkParams=[{name:"id"},{name:"title"},{name:"type"},{name:"quantity"},{name:"measureUnit"},{name:"unitPrice"},{name:"vatRate"}],requiredPriceParams=[{name:"currency"},{name:"value"}];function validateItems(e){if(!e||!Array.isArray(e))return[];e.forEach((e=>{validatePresenceOfRequiredParams(e,requiredCreatePaymentLinkParams),validatePresenceOfRequiredParams(e.unitPrice,requiredPriceParams);const t=[...validateExpectedStringValues({id:e.id,title:e.title,vatRate:e.vatRate,currency:e.unitPrice.currency,measureUnit:e.measureUnit,unitPrice:e.unitPrice.value,...e.description?{description:e.description}:{}}),...validateExpectedNumericValues({quantity:e.quantity})].flat();if(t.length>0)throw new InvalidParametersError(t);validateType(e.type),validateCurrency(e.unitPrice.currency),validateUnit(e.measureUnit)}))}const validateType=e=>{if(!Object.values(LINK_TYPES).includes(e))throw new InvalidParametersError(`type ${e} is not valid, valid types are ${Object.values(LINK_TYPES).join(", ")}`)};function validatePaymentLinkCreationFlowParams(e){if(!e?.callbackUrl)throw new InvalidParametersError("callbackUrl parameter is required for the payment link creation flow");if("string"!=typeof e.callbackUrl)throw new InvalidParametersError("callbackUrl must be a string");if(""===e.callbackUrl.trim())throw new InvalidParametersError("callbackUrl cannot be empty");return e.callbackUrl}const getPaymentLinkCreationFlowUrl=async({paymentLinkSettings:e,operationSettings:t})=>{const{items:r}=e;validateItems(r);const n=validatePaymentLinkCreationFlowParams(e),a=await request({requestSettings:{action:AUTH_LINK_ACTIONS.PAYMENT_LINK_CREATE,callbackUrl:n},operationSettings:t}),i=new URLSearchParams({...r?{items:JSON.stringify(r)}:{}});return i.toString()?`${a.url}?${i.toString()}`:a.url},paymentLinks$1={getPaymentLinkCreationFlowUrl:getPaymentLinkCreationFlowUrl},paymentLinks=paymentLinks$1,ORGANIZATION_ENDPOINT="/v2/organization/",BANK_ACCOUNTS_ENDPOINT="/v2/bank_accounts/",prepareGetOrganization=({accessToken:e,stagingToken:t})=>({path:`${ORGANIZATION_ENDPOINT}`,options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),getOrganization$1=async({accessToken:e,stagingToken:t})=>{const r=prepareGetOrganization({accessToken:e,stagingToken:t});return await makeNetworkCall(r)},prepareGetBankAccounts=({accessToken:e,stagingToken:t})=>({path:`${BANK_ACCOUNTS_ENDPOINT}`,options:{method:"GET",headers:{accessToken:e,stagingToken:t}}}),getBankAccounts$1=async({accessToken:e,stagingToken:t})=>{const r=prepareGetBankAccounts({accessToken:e,stagingToken:t});return await makeNetworkCall(r)},serializeOrganization=e=>({id:e.id,slug:e.slug,legalName:e.legal_name,legalNumber:e.legal_number,legalSector:e.legal_sector,legalRegistrationDate:e.legal_registration_date,legalAddress:e.legal_address,legalForm:e.legal_form,legalCountry:e.legal_country,legalShareCapital:e.legal_share_capital,locale:e.locale,contractSignedAt:e.contract_signed_at,bankAccounts:e.bank_accounts.map(serializeBankAccount)}),serializeBankAccount=e=>({id:e?.id,slug:e.slug,iban:e.iban,bic:e.bic,currency:e.currency,balance:parseFloat(e.balance),balanceCents:e.balance_cents,authorizedBalance:e.authorized_balance,authorizedBalanceCents:e.authorized_balance_cents,name:e.name,updatedAt:new Date(e.updated_at),status:e.status,main:e.main}),getOrganization=async e=>{const{stagingToken:t,proxyRequestFunction:r}=validateOperationSettingsParams(e);if(r){const e=prepareGetOrganization({stagingToken:t}),n=await r(encodeNetworkCall(e)),{body:a}=decodeNetworkResponse(n);return serializeOrganization(a.organization)}{const r=e.accessToken||validatePresenceOfAuthToken(),n=await getOrganization$1({accessToken:r,stagingToken:t});return serializeOrganization(n.organization)}},getBankAccounts=async e=>{const{stagingToken:t,proxyRequestFunction:r}=validateOperationSettingsParams(e);if(r){const e=prepareGetBankAccounts({stagingToken:t}),n=await r(encodeNetworkCall(e)),{body:a}=decodeNetworkResponse(n);return a.bank_accounts.map(serializeBankAccount)}{const r=e.accessToken||validatePresenceOfAuthToken();return(await getBankAccounts$1({accessToken:r,stagingToken:t})).bank_accounts.map(serializeBankAccount)}},organizations$1={getOrganization:getOrganization,getBankAccounts:getBankAccounts},organizations=organizations$1,TRANSACTIONS_ENDPOINT="/v2/transactions";function prepareGetTransactionsCall({bankAccountId:e,iban:t,status:r,updatedAtFrom:n,updatedAtTo:a,emittedAtFrom:i,emittedAtTo:s,settledAtFrom:o,settledAtTo:l,side:c,operationType:h,withAttachments:p,paginationSettings:d,accessToken:u,stagingToken:f}){const m={method:"GET",headers:{accessToken:u,stagingToken:f}},g=new URLSearchParams;e&&g.append("bank_account_id",e),t&&g.append("iban",t),r&&g.append("status",r),n&&g.append("updated_at_from",n),a&&g.append("updated_at_to",a),i&&g.append("emitted_at_from",i),s&&g.append("emitted_at_to",s),o&&g.append("settled_at_from",o),l&&g.append("settled_at_to",l),c&&g.append("side",c),h&&g.append("operation_type",h),void 0!==p&&g.append("with_attachments",String(p));const y=buildPaginationParams(d);for(const[e,t]of y)g.append(e,t);const v=g.toString();return{path:`${TRANSACTIONS_ENDPOINT}${v?`?${v}`:""}`,options:m}}async function getTransactions$1(e){const t=prepareGetTransactionsCall(e),{transactions:r,meta:n}=await makeNetworkCall(t);return{transactions:r,meta:n}}function prepareGetTransactionCall({transactionId:e,accessToken:t,stagingToken:r}){return{path:`${TRANSACTIONS_ENDPOINT}/${e}`,options:{method:"GET",headers:{accessToken:t,stagingToken:r}}}}async function getTransaction$1(e){const t=prepareGetTransactionCall(e),{transaction:r}=await makeNetworkCall(t);return r}function serializeTransaction(e){return{transactionId:e.transaction_id,amount:e.amount,amountCents:e.amount_cents,settledBalance:e.settled_balance,settledBalanceCents:e.settled_balance_cents,attachmentIds:e.attachment_ids,localAmount:e.local_amount,localAmountCents:e.local_amount_cents,side:e.side,operationType:e.operation_type,currency:e.currency,localCurrency:e.local_currency,label:e.label,settledAt:new Date(e.settled_at),emittedAt:new Date(e.emitted_at),updatedAt:new Date(e.updated_at),status:e.status,note:e.note,reference:e.reference,vatAmount:e.vat_amount,vatAmountCents:e.vat_amount_cents,vatRate:e.vat_rate,initiatorId:e.initiator_id,labelIds:e.label_ids,attachmentLost:e.attachment_lost,attachmentRequired:e.attachment_required,cardLastDigits:e.card_last_digits,category:e.category,cashflowCategory:{name:e.cashflow_category?.name||""},cashflowSubcategory:{name:e.cashflow_subcategory?.name||""},id:e.id,subjectType:e.subject_type,...e.transfer?{transfer:{counterpartyAccountNumber:e.transfer.counterparty_account_number,counterpartyName:e.transfer.counterparty_name,counterpartyBic:e.transfer.counterparty_bic,counterpartyIban:e.transfer.counterparty_iban}}:{}}}function validateGetTransactionParams(e){if(!e)throw new InvalidParametersError("transactionSettings parameter is required for the called function");if(!e.transactionId)throw new InvalidParametersError("transactionSettings.transactionId parameter is required for the called function");if(e.transactionId&&"string"!=typeof e.transactionId)throw new InvalidParametersError("transactionSettings.transactionId must be a string.");return e}async function getTransactions(e){const{stagingToken:t,proxyRequestFunction:r,accessToken:n,paginationSettings:a}=validateOperationSettingsParams(e?.operationSettings||{}),i={...e?.transactionSettings||{},paginationSettings:a};if(r){const e=encodeNetworkCall(prepareGetTransactionsCall(i)),t=decodeNetworkResponse(await r(e));return{transactions:t.body.transactions.map(serializeTransaction),meta:t.body.meta}}{const e=n||validatePresenceOfAuthToken(),r=await getTransactions$1({...i,accessToken:e,stagingToken:t});return{transactions:r.transactions.map(serializeTransaction),meta:r.meta}}}async function getTransaction({transactionSettings:e,operationSettings:t}){const{proxyRequestFunction:r,accessToken:n,stagingToken:a}=validateOperationSettingsParams(t||{}),{transactionId:i}=validateGetTransactionParams(e);if(r){const e=encodeNetworkCall(prepareGetTransactionCall({transactionId:i}));return serializeTransaction(decodeNetworkResponse(await r(e)).body.transaction)}{const e=n||validatePresenceOfAuthToken();return serializeTransaction(await getTransaction$1({transactionId:i,accessToken:e,stagingToken:a}))}}const transactions$1={getTransactions:getTransactions,getTransaction:getTransaction},transactions=transactions$1,UI_ELEMENT_NAMES={TRANSFER_LIST:"transfer-list"};function validateCreateUIElementParams(e){if(!e?.uiElementName)throw new InvalidParametersError("uiElementSettings.uiElementName is required when calling createUIElement");const t=Object.values(UI_ELEMENT_NAMES);if(!t.includes(e?.uiElementName))throw new InvalidParametersError(`uiElementSettings.uiElementName must be one of ${t.join(", ")}`);return{uiElementName:e.uiElementName}}const transferListStyles=i$4`
508
508
  :host {
509
509
  --default-table-border: 1px solid var(--border-tertiary);
510
510
 
@@ -663,7 +663,7 @@ const a=Symbol.for(""),o$1=e=>{if(e?.r===a)return e?._$litStatic$},s=e=>({_$litS
663
663
  display: flex;
664
664
  gap: 8px;
665
665
  }
666
- `,LOCALES_DEFINITION={EN:{name:"English",code:"en",locale:"en-US"},FR:{name:"Français",code:"fr",locale:"fr-FR"},IT:{name:"Italiano",code:"it",locale:"it-IT"},DE:{name:"Deutsch",code:"de",locale:"de-DE"},ES:{name:"Español",code:"es",locale:"es-ES"},PT:{name:"Português",code:"pt",locale:"pt-PT"},NL:{name:"Nederlands",code:"nl",locale:"nl-NL"}},LOCALES=Object.values(LOCALES_DEFINITION),LOCALE_CODES=LOCALES.map((e=>e.code)),FORMAT_OPTIONS={compact:{day:"2-digit",month:"2-digit",year:"numeric"},"date-s":{month:"short",day:"2-digit"},"month-year-l":{month:"long",year:"numeric"},"month-year-s":{month:"short",year:"numeric"},"date-year-s":{day:"2-digit",month:"short",year:"numeric"},"date-year-l":{day:"2-digit",month:"long",year:"numeric"},"week-date-l":{month:"long",weekday:"long",day:"2-digit"},"date-time-l":{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"},"date-time-s":{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"},"time-hm":{hour:"2-digit",minute:"2-digit"}},LOCALE_CUSTOM_FORMATS$1={en:{compact:([e,,t,,r])=>`${t?.value}-${e?.value}-${r?.value}`,"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},fr:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},de:{"date-time-l":e=>e.map((({value:e},t)=>[3,5].includes(t)?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},it:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},es:{compact:e=>e.map((({type:e,value:t})=>"literal"===e?"-":t)).join(""),"week-date-l":e=>e.map((({value:e},t)=>1===t?" ":e)).join("")},pt:{"date-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"month-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":e)).join(""),"date-time-s":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":"literal"===t&&" de "===e?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join("")},nl:{"date-s":e=>e.map((({value:e,type:t})=>"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).reverse().join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" om "===e?", ":e)).join(""),"week-date-l":e=>e.map((({value:e,type:t},r)=>1===r&&"literal"===t?", ":e)).join("")}},isLocaleCode=e=>LOCALE_CODES.includes(e),formatDate=({date:e,locale:t,token:r="compact"})=>{const n=Array.isArray(t)?t[0].toLocaleLowerCase():t.toLocaleLowerCase();if(!isLocaleCode(n))return"";const a=FORMAT_OPTIONS[r],i=LOCALE_CUSTOM_FORMATS$1[n][r],s=new Intl.DateTimeFormat(t,a);try{return i?.(s.formatToParts(new Date(e)))??s.format(new Date(e))}catch{return""}},MONEY_TOKENS={ISO:"money-iso",ISO_COMPACT:"money-iso-compact",ISO_SIGN_COMPACT:"money-iso-sign-compact",ISO_SIGN_DECIMAL:"money-iso-sign-decimal",SYMBOL:"money-symbol",SYMBOL_COMPACT:"money-symbol-compact",SYMBOL_SIGN_COMPACT:"money-symbol-sign-compact",SYMBOL_SIGN_DECIMAL:"money-symbol-sign-decimal"},MONEY_TOKEN_RULES={[MONEY_TOKENS.ISO]:{useSymbol:!1,sign:"auto",decimals:"always"},[MONEY_TOKENS.ISO_COMPACT]:{useSymbol:!1,sign:"auto",decimals:"if-needed"},[MONEY_TOKENS.ISO_SIGN_COMPACT]:{useSymbol:!1,sign:"always",decimals:"if-needed"},[MONEY_TOKENS.ISO_SIGN_DECIMAL]:{useSymbol:!1,sign:"always",decimals:"always"},[MONEY_TOKENS.SYMBOL]:{useSymbol:!0,sign:"auto",decimals:"always"},[MONEY_TOKENS.SYMBOL_COMPACT]:{useSymbol:!0,sign:"auto",decimals:"if-needed"},[MONEY_TOKENS.SYMBOL_SIGN_COMPACT]:{useSymbol:!0,sign:"always",decimals:"if-needed"},[MONEY_TOKENS.SYMBOL_SIGN_DECIMAL]:{useSymbol:!0,sign:"always",decimals:"always"}},LOCALE_CUSTOM_FORMATS={"pt-PT":(e,{amount:t})=>e.map((({type:e,value:r})=>"group"===e?Math.abs(t)>=1e4?r.replace(/\s/g,"."):r.replace(/\s/g,""):r)).join(""),"en-US":(e,{useSymbol:t})=>e.map((({type:e,value:r})=>t&&"literal"===e?r.replace(/\s/g,""):r)).join(""),"es-ES":e=>{const t=[];for(const r of e)if("integer"===r.type){const e=r.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(r.value);return t.join("")},"it-IT":e=>{const t=[];for(const r of e)if("integer"===r.type){const e=r.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(r.value);return t.join("")}};function formatMoney({amount:e,locale:t="en-US",currency:r="EUR",token:n=MONEY_TOKENS.ISO,placeholder:a="--",overrides:i={}}){const s=Number(e);if(!Number.isFinite(s))return a;const o=_normalizeLocale(t),{useSymbol:l,sign:c,decimals:h}=MONEY_TOKEN_RULES[n],p={style:"currency",currency:r,currencyDisplay:l?"symbol":"code",signDisplay:"always"===c&&0===s?"exceptZero":c,..."if-needed"!==h||s%1!=0?{}:{minimumFractionDigits:0,maximumFractionDigits:0},...i},d=new Intl.NumberFormat(o,p),f=LOCALE_CUSTOM_FORMATS[o];if(f){return f(d.formatToParts(s),{amount:s,useSymbol:l})}return d.format(s)}function _normalizeLocale(e){const t=LOCALES.find((t=>t.code===e));return t?.locale||e}class TransferSelectedEvent extends CustomEvent{constructor(e){super("transfer-selected",{detail:e,bubbles:!0,composed:!0})}}const iconInProgress=b`<svg
666
+ `,LOCALES_DEFINITION={EN:{name:"English",code:"en",locale:"en-US"},FR:{name:"Français",code:"fr",locale:"fr-FR"},IT:{name:"Italiano",code:"it",locale:"it-IT"},DE:{name:"Deutsch",code:"de",locale:"de-DE"},ES:{name:"Español",code:"es",locale:"es-ES"},PT:{name:"Português",code:"pt",locale:"pt-PT"},NL:{name:"Nederlands",code:"nl",locale:"nl-NL"}},LOCALES=Object.values(LOCALES_DEFINITION),LOCALE_CODES=LOCALES.map((e=>e.code)),FORMAT_OPTIONS={compact:{day:"2-digit",month:"2-digit",year:"numeric"},"date-s":{month:"short",day:"2-digit"},"month-year-l":{month:"long",year:"numeric"},"month-year-s":{month:"short",year:"numeric"},"date-year-s":{day:"2-digit",month:"short",year:"numeric"},"date-year-l":{day:"2-digit",month:"long",year:"numeric"},"week-date-l":{month:"long",weekday:"long",day:"2-digit"},"date-time-l":{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"},"date-time-s":{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"},"time-hm":{hour:"2-digit",minute:"2-digit"}},LOCALE_CUSTOM_FORMATS$1={en:{compact:([e,,t,,r])=>`${t?.value}-${e?.value}-${r?.value}`,"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},fr:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},de:{"date-time-l":e=>e.map((({value:e},t)=>[3,5].includes(t)?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},it:{"date-time-l":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join("")},es:{compact:e=>e.map((({type:e,value:t})=>"literal"===e?"-":t)).join(""),"week-date-l":e=>e.map((({value:e},t)=>1===t?" ":e)).join("")},pt:{"date-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"month-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-year-s":e=>e.map((({value:e,type:t})=>"literal"===t?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":e)).join(""),"date-time-s":e=>e.map((({value:e,type:t})=>"literal"===t&&" às "===e?", ":"literal"===t&&" de "===e?" ":"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).join("")},nl:{"date-s":e=>e.map((({value:e,type:t})=>"month"===t&&e.endsWith(".")?e.slice(0,-1):e)).reverse().join(""),"date-time-s":e=>e.map((({value:e},t)=>5===t?", ":e)).join(""),"date-time-l":e=>e.map((({value:e,type:t})=>"literal"===t&&" om "===e?", ":e)).join(""),"week-date-l":e=>e.map((({value:e,type:t},r)=>1===r&&"literal"===t?", ":e)).join("")}},isLocaleCode=e=>LOCALE_CODES.includes(e),formatDate=({date:e,locale:t,token:r="compact"})=>{const n=Array.isArray(t)?t[0].toLocaleLowerCase():t.toLocaleLowerCase();if(!isLocaleCode(n))return"";const a=FORMAT_OPTIONS[r],i=LOCALE_CUSTOM_FORMATS$1[n][r],s=new Intl.DateTimeFormat(t,a);try{return i?.(s.formatToParts(new Date(e)))??s.format(new Date(e))}catch{return""}},MONEY_TOKENS={ISO:"money-iso",ISO_COMPACT:"money-iso-compact",ISO_SIGN_COMPACT:"money-iso-sign-compact",ISO_SIGN_DECIMAL:"money-iso-sign-decimal",SYMBOL:"money-symbol",SYMBOL_COMPACT:"money-symbol-compact",SYMBOL_SIGN_COMPACT:"money-symbol-sign-compact",SYMBOL_SIGN_DECIMAL:"money-symbol-sign-decimal"},MONEY_TOKEN_RULES={[MONEY_TOKENS.ISO]:{useSymbol:!1,sign:"auto",decimals:"always"},[MONEY_TOKENS.ISO_COMPACT]:{useSymbol:!1,sign:"auto",decimals:"if-needed"},[MONEY_TOKENS.ISO_SIGN_COMPACT]:{useSymbol:!1,sign:"always",decimals:"if-needed"},[MONEY_TOKENS.ISO_SIGN_DECIMAL]:{useSymbol:!1,sign:"always",decimals:"always"},[MONEY_TOKENS.SYMBOL]:{useSymbol:!0,sign:"auto",decimals:"always"},[MONEY_TOKENS.SYMBOL_COMPACT]:{useSymbol:!0,sign:"auto",decimals:"if-needed"},[MONEY_TOKENS.SYMBOL_SIGN_COMPACT]:{useSymbol:!0,sign:"always",decimals:"if-needed"},[MONEY_TOKENS.SYMBOL_SIGN_DECIMAL]:{useSymbol:!0,sign:"always",decimals:"always"}},LOCALE_CUSTOM_FORMATS={"pt-PT":(e,{amount:t})=>e.map((({type:e,value:r})=>"group"===e?Math.abs(t)>=1e4?r.replace(/\s/g,"."):r.replace(/\s/g,""):r)).join(""),"en-US":(e,{useSymbol:t})=>e.map((({type:e,value:r})=>t&&"literal"===e?r.replace(/\s/g,""):r)).join(""),"es-ES":e=>{const t=[];for(const r of e)if("integer"===r.type){const e=r.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(r.value);return t.join("")},"it-IT":e=>{const t=[];for(const r of e)if("integer"===r.type){const e=r.value.replace(/\B(?=(?:\d{3})+(?!\d))/g,".");t.push(e)}else t.push(r.value);return t.join("")}};function formatMoney({amount:e,locale:t="en-US",currency:r="EUR",token:n=MONEY_TOKENS.ISO,placeholder:a="--",overrides:i={}}){const s=Number(e);if(!Number.isFinite(s))return a;const o=_normalizeLocale(t),{useSymbol:l,sign:c,decimals:h}=MONEY_TOKEN_RULES[n],p={style:"currency",currency:r,currencyDisplay:l?"symbol":"code",signDisplay:"always"===c&&0===s?"exceptZero":c,..."if-needed"!==h||s%1!=0?{}:{minimumFractionDigits:0,maximumFractionDigits:0},...i},d=new Intl.NumberFormat(o,p),u=LOCALE_CUSTOM_FORMATS[o];if(u){return u(d.formatToParts(s),{amount:s,useSymbol:l})}return d.format(s)}function _normalizeLocale(e){const t=LOCALES.find((t=>t.code===e));return t?.locale||e}class TransferSelectedEvent extends CustomEvent{constructor(e){super("transfer-selected",{detail:e,bubbles:!0,composed:!0})}}const iconInProgress=b`<svg
667
667
  fill="none"
668
668
  viewBox="0 0 12 12"
669
669
  xmlns="http://www.w3.org/2000/svg"