PageSourceSearch

https://www.mobatrainer.com/_next/static/chunks/419.213c971e9a9798b7.js

js mobatrainer.com collected 2026-10-05 05:25:37 UTC 155,669 bytes, 5 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[419],{9419:(t,e,n)=>{function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e,n){var s;return(s=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var s=n.call(t,e||"default");if("object"!=r(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(e,"string"),(e="symbol"==r(s)?s:s+"")in t)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(e),n.d(e,{DotLottieReact:()=>to,DotLottieWorkerReact:()=>td,setWasmUrl:()=>tl});var i=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},a=class{constructor(){s(this,"_lastHandleId",0),s(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=0x20000000000000-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(performance.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},o=class{constructor(){s(this,"_strategy",void 0),this._strategy="function"==typeof requestAnimationFrame?new i:new a}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}};let _="u">typeof window&&void 0!==window.document,d=new Uint8Array([80,75,3,4]),l=["v","ip","op","layers","fr","w","h"],h,c=0,u=null;function m(){return(null===u||0===u.byteLength)&&(u=new Uint8Array(h.memory.buffer)),u}let p="u">typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},g="function"==typeof p.encodeInto?function(t,e){return p.encodeInto(t,e)}:function(t,e){let n=p.encode(t);return e.set(n),{read:t.length,written:n.length}};function w(t,e,n){if(void 0===n){let n=p.encode(t),r=e(n.length,1)>>>0;return m().subarray(r,r+n.length).set(n),c=n.length,r}let r=t.length,s=e(r,1)>>>0,i=m(),a=0;for(;a<r;a++){let e=t.charCodeAt(a);if(e>127)break;i[s+a]=e}if(a!==r){0!==a&&(t=t.slice(a)),s=n(s,r,r=a+3*t.length,1)>>>0;let e=g(t,m().subarray(s+a,s+r));a+=e.written,s=n(s,r,a,1)>>>0}return c=a,s}let f=null;function b(){return(null===f||!0===f.buffer.detached||void 0===f.buffer.detached&&f.buffer!==h.memory.buffer)&&(f=new DataView(h.memory.buffer)),f}function v(t){let e=h.__externref_table_alloc_command_export();return h.__wbindgen_export_4.set(e,t),e}function y(t,e){try{return t.apply(this,e)}catch(e){let t=v(e);h.__wbindgen_exn_store_command_export(t)}}let L="u">typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};function C(t,e){return t>>>=0,L.decode(m().subarray(t,t+e))}"u">typeof TextDecoder&&L.decode();let M=null;function I(t,e){let n=e(1*t.length,1)>>>0;return m().set(t,n/1),c=t.length,n}let S=Object.freeze({Forward:0,0:"Forward",Reverse:1,1:"Reverse",Bounce:2,2:"Bounce",ReverseBounce:3,3:"ReverseBounce"}),E=Object.freeze({Idle:0,0:"Idle",Playing:1,1:"Playing",Paused:2,2:"Paused",Stopped:3,3:"Stopped",Tweening:4,4:"Tweening"}),x=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(t=>h.__wbg_dotlottieplayerwasm_free(t>>>0,1));var k=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,x.unregister(this),t}free(){let t=this.__destroy_into_raw();h.__wbg_dotlottieplayerwasm_free(t,0)}clear_slot(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,e,n)}layout_fit(){let t,e;try{let n=h.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return t=n[0],e=n[1],C(n[0],n[1])}finally{h.__wbindgen_free_command_export(t,e,1)}}loop_count(){return h.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return h.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,e,n)}set_layout(t,e,n){let r=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),s=c;return 0!==h.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,s,e,n)}set_marker(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;h.dotlottieplayerwasm_set_marker(this.__wbg_ptr,e,n)}clear_slots(){return 0!==h.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)}is_complete(){return 0!==h.dotlottieplayerwasm_is_complete(this.__wbg_ptr)}reset_slots(){return 0!==h.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)}reset_theme(){return 0!==h.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)}segment_end(){return h.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(t){return 0!==h.dotlottieplayerwasm_set_quality(this.__wbg_ptr,t)}set_segment(t,e){return 0!==h.dotlottieplayerwasm_set_segment(this.__wbg_ptr,t,e)}sm_set_seed(t){return 0!==h.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,t)}static unload_font(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_unload_font(e,n)}animation_id(){let t=h.dotlottieplayerwasm_animation_id(this.__wbg_ptr),e;return 0!==t[0]&&(e=C(t[0],t[1]).slice(),h.__wbindgen_free_command_export(t[0],1*t[1],1)),e}audio_volume(){return h.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return h.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return h.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return h.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return h.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){h.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){h.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return h.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_str(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c,r=h.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,e,n),s;return 0!==r[0]&&(s=C(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],1*r[1],1)),s}marker_names(){return h.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(t){h.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,t)}set_slot_str(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c,s=w(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=c;return 0!==h.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,s,i)}set_viewport(t,e,n,r){return 0!==h.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,t,e,n,r)}total_frames(){return h.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return 0!==h.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)}current_frame(){return h.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c,r=h.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,e,n),s;return 0!==r[0]&&(s=C(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],1*r[1],1)),s}get_slots_str(){let t,e;try{let n=h.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return t=n[0],e=n[1],C(n[0],n[1])}finally{h.__wbindgen_free_command_export(t,e,1)}}get_transform(){return h.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return h.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,e,n)}set_text_slot(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c,s=w(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=c;return 0!==h.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,s,i)}set_transform(t){let e;let n=(e=(0,h.__wbindgen_malloc_command_export)(4*t.length,4)>>>
10,((null===M||0===M.byteLength)&&(M=new Float32Array(h.memory.buffer)),M).set(t,e/4),c=t.length,e),r=c;return 0!==h.dotlottieplayerwasm_set_transform(this.__wbg_ptr,n,r)}sm_get_inputs(){return h.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_poll_event(){return h.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_post_click(t,e){h.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,t,e)}animation_size(){return h.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let t=h.dotlottieplayerwasm_current_marker(this.__wbg_ptr),e;return 0!==t[0]&&(e=C(t[0],t[1]).slice(),h.__wbindgen_free_command_export(t[0],1*t[1],1)),e}layout_align_x(){return h.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return h.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_load_animation(this.__wbg_ptr,e,n)}loop_animation(){return 0!==h.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)}set_background(t,e,n,r){return 0!==h.dotlottieplayerwasm_set_background(this.__wbg_ptr,t,e,n,r)}set_color_slot(t,e,n,r){let s=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=c;return 0!==h.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,s,i,e,n,r)}set_image_slot(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c,s=w(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=c;return 0!==h.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,n,r,s,i)}set_loop_count(t){h.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,t)}set_theme_data(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,e,n)}sm_reset_input(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;h.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,e,n)}manifest_string(){let t,e;try{let n=h.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return t=n[0],e=n[1],C(n[0],n[1])}finally{h.__wbindgen_free_command_export(t,e,1)}}set_scalar_slot(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c;return 0!==h.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,e)}set_vector_slot(t,e,n){let r=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),s=c;return 0!==h.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,s,e,n)}setup_sw_target(t,e){return 0!==h.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,t,e)}get_pixel_buffer(){return h.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}set_audio_volume(t){h.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,t)}sm_current_state(){let t,e;try{let n=h.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return t=n[0],e=n[1],C(n[0],n[1])}finally{h.__wbindgen_free_command_export(t,e,1)}}state_machine_id(){let t=h.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),e;return 0!==t[0]&&(e=C(t[0],t[1]).slice(),h.__wbindgen_free_command_export(t[0],1*t[1],1)),e}get_state_machine(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c,r=h.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,e,n),s;return 0!==r[0]&&(s=C(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],1*r[1],1)),s}set_position_slot(t,e,n){let r=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),s=c;return 0!==h.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,s,e,n)}current_loop_count(){return h.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}sm_framework_setup(){return h.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_post_pointer_up(t,e){h.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,t,e)}state_machine_load(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,e,n)}load_dotlottie_data(t){let e=I(t,h.__wbindgen_malloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,e,n)}sm_get_string_input(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c,r=h.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,e,n),s;return 0!==r[0]&&(s=C(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],1*r[1],1)),s}sm_set_string_input(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c,s=w(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=c;return 0!==h.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,s,i)}sm_get_boolean_input(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c,r=h.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,e,n);return 0xffffff===r?void 0:0!==r}sm_get_numeric_input(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c,r=h.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,e,n);return 0x100000001===r?void 0:r}sm_post_pointer_down(t,e){h.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,t,e)}sm_post_pointer_exit(t,e){h.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,t,e)}sm_post_pointer_move(t,e){h.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,t,e)}sm_set_boolean_input(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c;return 0!==h.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,e)}sm_set_numeric_input(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c;return 0!==h.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,e)}state_machine_unload(){h.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(t,e){h.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,t,e)}load_animation_from_id(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,e,n)}sm_poll_internal_event(){return h.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return 0!==h.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)}reset_current_loop_count(){h.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c;return 0!==h.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,e)}state_machine_load_from_id(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,e,n)}set_use_frame_interpolation(t){h.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,t)}constructor(){let t=h.dotlottieplayerwasm_new();return this.__wbg_ptr=t>>>0,x.register(this,this.__wbg_ptr,this),this}mode(){return h.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return 0!==h.dotlottieplayerwasm_play(this.__wbg_ptr)}stop(){return 0!==h.dotlottieplayerwasm_stop(this.__wbg_ptr)}tick(t){return 0!==h.dotlottieplayerwasm_tick(this.__wbg_ptr,t)}pause(){return 0!==h.dotlottieplayerwasm_pause(this.__wbg_ptr)}speed(){return h.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return h.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return h.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return 0!==h.dotlottieplayerwasm_render(this.__wbg_ptr)}status(){return h.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return h.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,e,n)}sm_stop(){return 0!==h.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)}sm_tick(t){return 0!==h.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,t)}autoplay(){return 0!==h.dotlottieplayerwasm_autoplay(this.__wbg_ptr)}duration(){return h.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(t){h.dotlottieplayerwasm_set_loop(this.__wbg_ptr,t)}set_mode(t){h.dotlottieplayerwasm_set_mode(this.__wbg_ptr,t)}sm_start(t,e){let n=function(t,e){let n=e(4*t.length,4)>>>0;for(let e=0;e<t.length;e++){let r=v(t[e]);b().setUint32(n+4*e,r,!0)}return c=t.length,n}(e,h.__wbindgen_malloc_command_export),r=c;return 0!==h.dotlottieplayerwasm_sm_start(this.__wbg_ptr,t,n,r)}theme_id(){let t=h.dotlottieplayerwasm_theme_id(this.__wbg_ptr),e;return 0!==t[0]&&(e=C(t[0],t[1]).slice(),h.__wbindgen_free_command_export(t[0],1*t[1],1)),e}load_font(t,e){let n=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c,s=I(e,h.__wbindgen_malloc_command_export),i=c;return 0!==h.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,s,i)}set_frame(t){return 0!==h.dotlottieplayerwasm_set_frame(this.__wbg_ptr,t)}set_speed(t){h.dotlottieplayerwasm_set_speed(this.__wbg_ptr,t)}set_theme(t){let e=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=c;return 0!==h.dotlottieplayerwasm_set_theme(this.__wbg_ptr,e,n)}sm_status(){let t,e;try{let n=h.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return t=n[0],e=n[1],C(n[0],n[1])}finally{h.__wbindgen_free_command_export(t,e,1)}}};async function P(t,e){if("function"==typeof Response&&t instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(t,e)}catch(e){if("application/wasm"!=t.headers.get("Content-Type"))console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e);else throw e}let n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}{let n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}async function O(t){let e;if(void 0!==h)return h;if(void 0!==t&&(Object.getPrototypeOf(t)===Object.prototype?{module_or_path:t}=t:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===t)throw Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");let n=((e={}).wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer}
1,e.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return y(function(t,e){let n=w(URL.createObjectURL(e),h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c;b().setInt32(t+4,r,!0),b().setInt32(t+0,n,!0)},arguments)},e.wbg.__wbg_ended_b873fb75d0c13ca7=function(t){return t.ended},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let n,r;try{n=t,r=e,console.error(C(t,e))}finally{h.__wbindgen_free_command_export(n,r,1)}},e.wbg.__wbg_new_405e22f390576ce2=function(){return{}},e.wbg.__wbg_new_78feb108b6472713=function(){return[]},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return Error()},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,n){return new Uint8Array(t,e>>>0,n>>>0)},e.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(t){return new Float32Array(t>>>0)},e.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return y(function(t,e){return new Audio(C(t,e))},arguments)},e.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return y(function(t,e){return new Blob(t,e)},arguments)},e.wbg.__wbg_pause_b74c96d69f769518=function(){return y(function(t){t.pause()},arguments)},e.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return y(function(t){return t.play()},arguments)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(t,e){return t.push(e)},e.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return y(function(t,e){URL.revokeObjectURL(C(t,e))},arguments)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return y(function(t,e,n){return Reflect.set(t,e,n)},arguments)},e.wbg.__wbg_setcurrentTime_64727eddd3966512=function(t,e){t.currentTime=e},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(t,e,n){t[e>>>0]=n},e.wbg.__wbg_settype_39ed370d3edd403c=function(t,e,n){t.type=C(e,n)},e.wbg.__wbg_setvolume_3895e06a030ca4f7=function(t,e){t.volume=e},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){let n=w(e.stack,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=c;b().setInt32(t+4,r,!0),b().setInt32(t+0,n,!0)},e.wbg.__wbindgen_init_externref_table=function(){let t=h.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},e.wbg.__wbindgen_memory=function(){return h.memory},e.wbg.__wbindgen_number_new=function(t){return t},e.wbg.__wbindgen_string_get=function(t,e){let n="string"==typeof e?e:void 0;var r=null==n?0:w(n,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),s=c;b().setInt32(t+4,s,!0),b().setInt32(t+0,r,!0)}
1,e.wbg.__wbindgen_string_new=function(t,e){return C(t,e)},e.wbg.__wbindgen_throw=function(t,e){throw Error(C(t,e))},e);("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));let{instance:r,module:s}=await P(await t,n);return h=r.exports,O.__wbindgen_wasm_module=s,f=null,M=null,u=null,h.__wbindgen_start(),h}var F=class{constructor(){s(this,"_eventListeners",new Map)}addEventListener(t,e){let n=this._eventListeners.get(t);n||(n=new Set,this._eventListeners.set(t,n)),n.add(e)}removeEventListener(t,e){let n=this._eventListeners.get(t);n&&(e?(n.delete(e),0===n.size&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}dispatch(t){this._eventListeners.get(t.type)?.forEach(e=>e(t))}removeAllEventListeners(){this._eventListeners.clear()}},A=class t{static _initializeObserver(){t._observer||(t._observer=new IntersectionObserver(e=>{e.forEach(e=>{let n=t._observedCanvases.get(e.target);n&&(e.isIntersecting?n.unfreeze():n.freeze())})},{threshold:0}))}static observe(e,n){t._initializeObserver(),t._observedCanvases.has(e)||(t._observedCanvases.set(e,n),t._observer?.observe(e))}static unobserve(e){t._observer?.unobserve(e),t._observedCanvases.delete(e),0===t._observedCanvases.size&&(t._observer?.disconnect(),t._observer=null)}};s(A,"_observer",null),s(A,"_observedCanvases",new Map);var D=class t{static _initializeObserver(){t._observer||(t._observer=new ResizeObserver(e=>{e.forEach(e=>{let n=t._observedCanvases.get(e.target);if(!n)return;let[r,s]=n;clearTimeout(s);let i=setTimeout(()=>{r.resize()},100);t._observedCanvases.set(e.target,[r,i])})}))}static observe(e,n){t._initializeObserver(),t._observedCanvases.has(e)||(t._observedCanvases.set(e,[n,0]),t._observer?.observe(e))}static unobserve(e){let n=t._observedCanvases.get(e);if(n){let t=n[1];t&&clearTimeout(t)}t._observer?.unobserve(e),t._observedCanvases.delete(e),!t._observedCanvases.size&&t._observer&&(t._observer.disconnect(),t._observer=null)}};function T(t){if(t.byteLength<4)return!1;let e=new Uint8Array(t.slice(0,d.byteLength));for(let t=0;t<d.length;t+=1)if(d[t]!==e[t])return!1;return!0}function R(t){return"string"==typeof t?/^\s*\{/u.test(t)&&/\}\s*$/u.test(t):l.every(e=>Object.hasOwn(t,e))}function z(){return 1+((_?window.devicePixelRatio:1)-1)*.75}function $(t){let e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(e.bottom<0||e.top>n||e.right<0||e.left>r)}function U(t){let e=t.target;if(e instanceof HTMLCanvasElement){let n=e.getBoundingClientRect();if(0===n.width||0===n.height||0===e.width||0===e.height)return null;let r=e.width/n.width,s=e.height/n.height,i=(t.clientX-n.left)*r,a=(t.clientY-n.top)*s;return!Number.isFinite(i)||!Number.isFinite(a)||Number.isNaN(i)||Number.isNaN(a)?null:{x:i,y:a}}return null}async function B(t){var e;if(!/^https?:\/\//i.test(t))return t;let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch image slot source from URL: ${t}. ${n.status}: ${n.statusText}`);return e=await n.blob(),new Promise((t,n)=>{let r=new FileReader;r.onerror=()=>n(r.error??Error("Failed to read image slot source")),r.onload=()=>t(r.result),r.readAsDataURL(e)})}function N(t){let e=t.replace("OpenUrl: ",""),n=e.indexOf(" | Target: "),r,s;-1===n?(r=e,s="_blank"):(r=e.substring(0,n),s=e.substring(n+11)),window.open(r,s)}s(D,"_observer",null),s(D,"_observedCanvases",new Map);let W=null;function H(){return W??(W=function(t,e,n){let r=null,s=e;async function i(e){await t({module_or_path:e})}async function a(e){let n=await fetch(e);if(!n.ok)throw Error(`fetch ${e} responded with ${n.status} ${n.statusText}`);await t({module_or_path:await n.arrayBuffer()})}return{load(){if(!r){let t=s;r=(async()=>{let e,s;try{await i(t);return}catch(r){e=r,console.warn(`Primary WASM load failed from ${t}: ${r.message}`),console.warn(`Attempting to load WASM from backup URL: ${n}`)}try{await i(n);return}catch(t){s=t,console.warn(`Backup WASM load failed from ${n}: ${t.message}`)}console.warn("Retrying WASM load with buffered instantiation");try{await a(t);return}catch(e){console.warn(`Buffered WASM load from ${t} failed: ${e.message}`)}try{await a(n);return}catch(t){throw console.error(`Primary WASM URL failed: ${e.message}`),console.error(`Backup WASM URL failed: ${s.message}`),console.error(`Buffered fallback failed: ${t.message}`),r=null,Error("WASM loading failed from all sources.")}})()}return r},setWasmUrl(t){t!==s&&(s=t,r=null)}}}(O,"https://cdn.jsdelivr.net/npm/@lottiefiles/[email protected]/dist/dotlottie-player.wasm","https://unpkg.com/@lottiefiles/[email protected]/dist/dotlottie-player.wasm")),W}let q=t=>{switch(t){case"reverse":return S.Reverse;case"bounce":return S.Bounce;case"reverse-bounce":return S.ReverseBounce;default:return S.Forward}},G=t=>
1{switch(t){case S.Reverse:return"reverse";case S.Bounce:return"bounce";case S.ReverseBounce:return"reverse-bounce";default:return"forward"}},V=t=>{switch(t){case"contain":default:return"contain";case"cover":return"cover";case"fill":return"fill";case"fit-height":return"fit-height";case"fit-width":return"fit-width";case"none":return"none"}};var j=class{constructor(t){s(this,"_canvas",null),s(this,"_pendingLoad",null),s(this,"_srcFetchAbort",null),s(this,"_context",null),s(this,"_eventManager",void 0),s(this,"_animationFrameId",null),s(this,"_frameManager",void 0),s(this,"_boundAnimationLoop",void 0),s(this,"_dotLottieCore",null),s(this,"_stateMachineId",""),s(this,"_stateMachineConfig",null),s(this,"_isStateMachineRunning",!1),s(this,"_renderConfig",{}),s(this,"_isFrozen",!1),s(this,"_backgroundColor",null),s(this,"_lastFrameTime",null),s(this,"_boundOnClick",null),s(this,"_boundOnPointerUp",null),s(this,"_boundOnPointerDown",null),s(this,"_boundOnPointerMove",null),s(this,"_boundOnPointerEnter",null),s(this,"_boundOnPointerLeave",null),s(this,"_bufferMismatchCount",0),s(this,"_lastExpectedBufferSize",0),s(this,"_cachedImageData",null),s(this,"_cachedImageDataBuffer",null),s(this,"_cachedImageDataByteOffset",0),s(this,"_marker",""),s(this,"_segment",null),this._canvas=t.canvas??null,this._eventManager=new F,this._frameManager=new o,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||z(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0};let e=null;t.src&&!t.data&&(this._srcFetchAbort=new AbortController,(e=this._fetchData(t.src,this._srcFetchAbort.signal)).catch(()=>{})),this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(q(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length&&(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=t.marker??"",this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._stateMachineId=t.stateMachineId??"",this._stateMachineConfig=t.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:"ready"}),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src,e):this._pendingLoad={src:t.src,dataPromise:e}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(t=>{this._srcFetchAbort?.abort(),console.error("[dotlottie-web] Initialization failed:",t),this._eventManager.dispatch({type:"loadError",error:Error(`Failed to load wasm module: ${t}`)})})}async _initWasm(){return H().load()}_createCore(){return new k}_onCoreCreated(){}_setupTarget(t,e){return!!this._dotLottieCore&&this._dotLottieCore.setup_sw_target(t,e)}_drainPlayerEvents({skipFrame:t=!1}={}){let e;if(this._dotLottieCore)for(;null!=(e=this._dotLottieCore.poll_event());){let n=e;switch(n.type){case"Load":setTimeout(()=>this._eventManager.dispatch({type:"load"}),0);break;case"LoadError":setTimeout(()=>this._eventManager.dispatch({type:"loadError",error:Error("failed to load")}),0);break;case"Play":queueMicrotask(()=>this._eventManager.dispatch({type:"play"}));break;case"Pause":queueMicrotask(()=>this._eventManager.dispatch({type:"pause"}));break;case"Stop":queueMicrotask(()=>this._eventManager.dispatch({type:"stop"}));break;case"Frame":t||queueMicrotask(()=>this._eventManager.dispatch({type:"frame",currentFrame:n.frameNo??0}));break;case"Render":t||queueMicrotask(()=>this._eventManager.dispatch({type:"render",currentFrame:n.frameNo??0}));break;case"Loop":queueMicrotask(()=>this._eventManager.dispatch({type:"loop",loopCount:n.loopCount??0}));break;case"Complete":queueMicrotask(()=>this._eventManager.dispatch({type:"complete"}))}}}_discardPlayerEvents(){for(;this._dotLottieCore?.poll_event()!=null;);}_drainSmEvents(){let t,e;if(this._dotLottieCore){for(;null!=(t=this._dotLottieCore.sm_poll_event());){let e=t;switch(e.type){case"Start":queueMicrotask(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:"stateMachineStart"}),this._startAnimationLoop()});break;case"Stop":queueMicrotask(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:"stateMachineStop"}),this._dotLottieCore?.status()!==E.Playing&&this._stopAnimationLoop()});break;case"CustomEvent":this._eventManager.dispatch({type:"stateMachineCustomEvent",eventName:e.message??""});break;case"BooleanInputChange":this._eventManager.dispatch({type:"stateMachineBooleanInputValueChange",inputName:e.name??"",newValue:e.newValue,oldValue:e.oldValue});break;case"NumericInputChange":this._eventManager.dispatch({type:"stateMachineNumericInputValueChange",inputName:e.name??"",newValue:e.newValue,oldValue:e.oldValue});break;case"StringInputChange":this._eventManager.dispatch({type:"stateMachineStringInputValueChange",inputName:e.name??"",newValue:e.newValue,oldValue:e.oldValue});break;case"InputFired":this._eventManager.dispatch({type:"stateMachineInputFired",inputName:e.name??""});break;case"Transition":this._eventManager.dispatch({type:"stateMachineTransition",fromState:e.previousState??"",toState:e.newState??""});break;case"StateEntered":this._eventManager.dispatch({type:"stateMachineStateEntered",
1state:e.state??""});break;case"StateExit":this._eventManager.dispatch({type:"stateMachineStateExit",state:e.state??""});break;case"Error":this._eventManager.dispatch({type:"stateMachineError",error:e.message??""})}}for(;null!=(e=this._dotLottieCore.sm_poll_internal_event());){let t=e;if("Message"===t.type){let e=t.message??"";_&&e.startsWith("OpenUrl: ")?N(e):this._eventManager.dispatch({type:"stateMachineInternalMessage",message:e})}}}}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:Error(t)})}async _fetchData(t,e=null){let n=await fetch(t,{signal:e});if(!n.ok)throw Error(`Failed to fetch animation data from URL: ${t}. ${n.status}: ${n.statusText}`);let r=await n.arrayBuffer();return T(r)?r:new TextDecoder().decode(r)}_loadFromData(t){if(null===this._dotLottieCore)return;if(!this._canvas){console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.");return}this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height);let e=!1;if("string"==typeof t){if(!(e=this._dotLottieCore.load_animation(t))&&!R(t)){this._discardPlayerEvents(),this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}}else if(t instanceof ArrayBuffer){if(!T(t)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}e=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else if("object"==typeof t){if(!R(t)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}e=this._dotLottieCore.load_animation(JSON.stringify(t))}else{this._dispatchError(`Unsupported data type for animation data. Expected:
2          - string (Lottie JSON),
3          - ArrayBuffer (dotLottie),
4          - object (Lottie JSON).
5          Received: ${typeof t}`);return}if(e){if(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents({skipFrame:!!this._marker||!!this._segment}),this._marker&&this._dotLottieCore.set_marker(this._marker),this._segment){this._dotLottieCore.set_segment(this._segment[0],this._segment[1]);let t=G(this._dotLottieCore.mode()),e="reverse"===t||"reverse-bounce"===t?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(e)}setTimeout(()=>{this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.status()===E.Playing&&this._startAnimationLoop(),_&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(A.observe(this._canvas,this),$(this._canvas)||this.freeze()),this._renderConfig.autoResize&&D.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(t,e){(e??this._fetchData(t)).then(t=>this._loadFromData(t)).catch(e=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${e}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:V(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??""}get manifest(){try{let t=this._dotLottieCore?.manifest_string();if(null===this._dotLottieCore||!t)return null;let e=JSON.parse(t);return 0===Object.keys(e).length?null:e}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(this._dotLottieCore)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?G(this._dotLottieCore.mode()):"forward"}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return null!==this._dotLottieCore}get isLoaded(){return(this._dotLottieCore?.status()??E.Idle)!==E.Idle}get isPlaying(){return this._dotLottieCore?.status()===E.Playing}get isPaused(){return this._dotLottieCore?.status()===E.Paused}get isStopped(){return this._dotLottieCore?.status()===E.Stopped}get currentFrame(){return this._dotLottieCore?Math.round(100*this._dotLottieCore.current_frame())/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return(this._dotLottieCore?.duration()??0)/1e3}
5get canvas(){return this._canvas}load(t){null!==this._dotLottieCore&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(q(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&2===t.segment.length?(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,this._dotLottieCore.clear_segment()),this._marker=t.marker??"",this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src):this._pendingLoad={src:t.src}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor))}_draw(){if(null===this._dotLottieCore||null===this._canvas||(!this._context&&"getContext"in this._canvas&&"function"==typeof this._canvas.getContext&&(!_||"u">typeof HTMLCanvasElement&&this._canvas instanceof HTMLCanvasElement||"u">typeof OffscreenCanvas&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext("2d")),!this._context))return;let t=this._dotLottieCore.get_pixel_buffer(),e=this._canvas.width,n=this._canvas.height,r=e*n*4;if(t.byteLength!==r){this._lastExpectedBufferSize===r?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=r),10===this._bufferMismatchCount&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${r} bytes for canvas ${e}x${n}, but got ${t.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);return}this._bufferMismatchCount=0,this._lastExpectedBufferSize=r;let s=this._cachedImageData;if(!(null!==s&&s.width===e&&s.height===n&&s.data.byteLength===r&&this._cachedImageDataBuffer===t.buffer&&this._cachedImageDataByteOffset===t.byteOffset)){if(typeof ImageData>"u")this._cachedImageData=this._context.createImageData(e,n);else{let r=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(r,e,n)}this._cachedImageDataBuffer=t.buffer,this._cachedImageDataByteOffset=t.byteOffset}if(typeof ImageData>"u"){let e=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData.data.set(e)}this._context.putImageData(this._cachedImageData,0,0)}_cleanupCanvas(){this._canvas&&_&&this._canvas instanceof HTMLCanvasElement&&(A.unobserve(this._canvas),D.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&_&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(A.observe(this._canvas,this),$(this._canvas)||this.freeze()),this._renderConfig.autoResize&&D.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){null!==this._animationFrameId&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._lastFrameTime=null}_startAnimationLoop(){null===this._animationFrameId&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.status()===E.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(t){if(null===this._dotLottieCore||this._dotLottieCore.status()!==E.Playing&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let e=null===this._lastFrameTime?0:t-this._lastFrameTime;this._lastFrameTime=t;let n=this._isStateMachineRunning?this._dotLottieCore.sm_tick(e):this._dotLottieCore.tick(e);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),n&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop)}catch(t){console.error("Error in animation frame:",t),this._eventManager.dispatch({type:"renderError",error:t}),t instanceof WebAssembly.RuntimeError&&this.destroy()}}play(){if(null===this._dotLottieCore||!this.isLoaded)return;this._stopAnimationLoop();let t=this._dotLottieCore.play();this._drainPlayerEvents(),(t||this._dotLottieCore.status()===E.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&_&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!$(this._canvas)&&this.freeze()}pause(){null!==this._dotLottieCore&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(null===this._dotLottieCore)return;let t=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),t&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(t){if(null!==this._dotLottieCore&&this._dotLottieCore.set_frame(t)){let t=this._dotLottieCore.render();this._drainPlayerEvents(),t&&this._draw()}}setSpeed(t){null!==this._dotLottieCore&&this._dotLottieCore.set_speed(t)}
5setBackgroundColor(t){if(null!==this._dotLottieCore){if(_&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,n,r,s]=function(t){if(!/^#([\da-f]{6}|[\da-f]{8})$/iu.test(t))return[0,0,0,0];let e=t.replace("#","");return[parseInt((e=6===e.length?`${e}ff`:e).slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255,parseInt(e.slice(6,8),16)/255]}(t);this._dotLottieCore.set_background(e,n,r,s)}this._backgroundColor=t}}setLoop(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop(t)}setLoopCount(t){null!==this._dotLottieCore&&this._dotLottieCore.set_loop_count(t)}setUseFrameInterpolation(t){null!==this._dotLottieCore&&this._dotLottieCore.set_use_frame_interpolation(t)}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let t=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,t)try{t.free()}catch(t){console.warn("[dotlottie-web] Error freeing wasm core during destroy:",t)}this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){null!==this._animationFrameId&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){null===this._animationFrameId&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this._startAnimationLoop())}_syncCanvasSize(){if(!(_&&this._canvas instanceof HTMLCanvasElement))return;let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:e,width:n}=this._canvas.getBoundingClientRect();0!==e&&0!==n&&(this._canvas.width=n*t,this._canvas.height=e*t)}resize(){this._dotLottieCore&&this.isLoaded&&this._canvas&&(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw()))}setCanvas(t){if(!(!t||this._canvas===t)&&(this._canvas&&this._cleanupCanvas(),this._canvas=t,this._initializeCanvas(),this._pendingLoad)){let t=this._pendingLoad;this._pendingLoad=null,t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src,t.dataPromise)}}setTransform(t){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.set_transform(new Float32Array(t));return e&&this._dotLottieCore.render()&&this._draw(),e}getTransform(){if(this._dotLottieCore)return Array.from(this._dotLottieCore.get_transform())}setSegment(t,e){null!==this._dotLottieCore&&(this._segment=[t,e],this._dotLottieCore.set_segment(t,e))}resetSegment(){null!==this._dotLottieCore&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(t){null!==this._dotLottieCore&&this._dotLottieCore.set_mode(q(t))}setRenderConfig(t){let{devicePixelRatio:e,freezeOnOffscreen:n,quality:r,...s}=t;this._renderConfig={...this._renderConfig,...s,devicePixelRatio:e||z(),freezeOnOffscreen:n??!0,...void 0!==r&&{quality:r}},void 0!==r&&this._dotLottieCore&&this._dotLottieCore.set_quality(r),_&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?D.observe(this._canvas,this):D.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(A.observe(this._canvas,this),$(this._canvas)||this.freeze()):(A.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){null!==this._dotLottieCore&&this._dotLottieCore.animation_id()!==t&&this._canvas&&(this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(t)?(void 0!==this._renderConfig.quality&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${t}`))}setMarker(t){null!==this._dotLottieCore&&(this.markers().some(e=>e.name===t)?(this._marker=t,this._dotLottieCore.set_marker(t)):(this._marker="",this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment()))}markers(){let t=this._dotLottieCore?.markers();return t&&Array.isArray(t)?t:[]}setTheme(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.set_theme(t);return e&&(this._dotLottieCore.render(),this._draw()),e}resetTheme(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_theme();return t&&(this._dotLottieCore.render(),this._draw()),t}setThemeData(t){if(null===this._dotLottieCore)return!1;let e="string"==typeof t?t:JSON.stringify(t),n=this._dotLottieCore.set_theme_data(e);return n&&(this._dotLottieCore.render(),this._draw()),n}setSlots(t){null!==this._dotLottieCore&&this._dotLottieCore.set_slots_str(JSON.stringify(t))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(t){return Array.isArray(t)&&t.length>0&&"object"==typeof t[0]&&null!==t[0]&&"t"in t[0]&&"s"in t[0]}getSlotIds(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.get_slot_ids();return Array.isArray(t)?t:[]}getSlotType(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_type(t);if(e)return e}getSlot(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_str(t);if(e)try{return JSON.parse(e)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(t,e){if(null===this._dotLottieCore)return!1;let n=JSON.stringify({a:+!!this._isKeyframeArray(e),k:e}),r=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),r}setScalarSlot(t,e){if(null===this._dotLottieCore)return!1;let n=JSON.stringify({a:"number"==typeof e?0:1,k:e}),r=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),r}setVectorSlot(t,e){if(null===this._dotLottieCore)return!1;let n=JSON.stringify({a:+!!this._isKeyframeArray(e),k:e}),r=this._dotLottieCore.set_slot_str(t,n);return this._dotLottieCore.render(),this._draw(),r}setGradientSlot(t,e,n){if(null===this._dotLottieCore)return!1;let r=JSON.stringify({k:{a:+!!this._isKeyframeArray(e),k:e},p:n}),s=this._dotLottieCore.set_slot_str(t,r);return this._dotLottieCore.render(),this._draw(),s}setTextSlot(t,e){if(null===this._dotLottieCore)return!1;let n=this._dotLottieCore.get_slot_str(t),r=e;if(n){let t=JSON.parse(n);if(t&&"k"in t&&Array.isArray(t.k)){let n=t.k[0];"s"in n&&"object"==typeof n.s&&(r={...n.s,...e})}}let s=JSON.stringify({a:0,k:[{t:0,s:r}]}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}async setImageSlot(t,e){if(null===this._dotLottieCore)return!1;let n=await B(e);if(null===this._dotLottieCore)return!1;let r=this._dotLottieCore.set_image_slot(t,n);return this._dotLottieCore.render(),this._draw(),r}resetSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.reset_slot(t);return this._dotLottieCore.render(),this._draw(),e}clearSlot(t){if(null===this._dotLottieCore)return!1;let e=this._dotLottieCore.clear_slot(t);return this._dotLottieCore.render(),this._draw(),e}resetSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),t}clearSlots(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),t}setLayout(t){null!==this._dotLottieCore&&this._dotLottieCore.set_layout(t.fit??"contain",t.align?.[0]??.5,t.align?.[1]??.5)}setViewport(t,e,n,r){return null!==this._dotLottieCore&&this._dotLottieCore.set_viewport(t,e,n,r)}static setWasmUrl(t){H().setWasmUrl(t)}static preload(){return H().load()}static async registerFont(t,e){try{var n;let r,s,i,a,o;if(await H().load(),"string"==typeof e){let t=await fetch(e);if(!t.ok)return console.error(`Failed to fetch font from URL: ${e}. Status: ${t.status}`),!1;r=new Uint8Array(await t.arrayBuffer())}else r=e instanceof Uint8Array?e:new Uint8Array(e);let _=(n=r,s=w(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=c,a=I(n,h.__wbindgen_malloc_command_export),o=c,0!==h.register_font(s,i,a,o));return _||console.error(`Failed to register font "${t}". Font data may be invalid.`),_}catch(e){return console.error(`Error registering font "${t}":`,e),!1}}animationSize(){let t=this._dotLottieCore?.animation_size();return{width:t?.[0]??0,height:t?.[1]??0}}stateMachineLoad(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load_from_id(t)}stateMachineLoadData(t){return!!this._dotLottieCore&&this._dotLottieCore.state_machine_load(t)}stateMachineSetConfig(t){this._stateMachineConfig=t}
vendor: 5,940 bytes, line 5
5stateMachineStart(){if(null===this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),t&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),t}stateMachineStop(){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_stop();return this._drainSmEvents(),t&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.status()!==E.Playing&&this._stopAnimationLoop()),t}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??""}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??""}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??""}stateMachineOverrideState(t,e=!1){return this._dotLottieCore?.sm_override_current_state(t,e)??!1}stateMachineSetSeed(t){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(t)))??!1}stateMachineGet(t){return this._dotLottieCore?.get_state_machine(t)??""}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_framework_setup();return Array.isArray(t)?t:[]}stateMachineSetBooleanInput(t,e){return this._dotLottieCore?.sm_set_boolean_input(t,e)??!1}stateMachineSetNumericInput(t,e){return this._dotLottieCore?.sm_set_numeric_input(t,e)??!1}stateMachineSetStringInput(t,e){return this._dotLottieCore?.sm_set_string_input(t,e)??!1}stateMachineGetBooleanInput(t){return this._dotLottieCore?.sm_get_boolean_input(t)??void 0}stateMachineGetNumericInput(t){return this._dotLottieCore?.sm_get_numeric_input(t)??void 0}stateMachineGetStringInput(t){return this._dotLottieCore?.sm_get_string_input(t)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_get_inputs();return Array.isArray(t)?t:[]}stateMachineFireEvent(t){this._dotLottieCore?.sm_fire(t)}stateMachinePostClickEvent(t,e){this._dotLottieCore?.sm_post_click(t,e)}stateMachinePostPointerUpEvent(t,e){this._dotLottieCore?.sm_post_pointer_up(t,e)}stateMachinePostPointerDownEvent(t,e){this._dotLottieCore?.sm_post_pointer_down(t,e)}stateMachinePostPointerMoveEvent(t,e){this._dotLottieCore?.sm_post_pointer_move(t,e)}stateMachinePostPointerEnterEvent(t,e){this._dotLottieCore?.sm_post_pointer_enter(t,e)}stateMachinePostPointerExitEvent(t,e){this._dotLottieCore?.sm_post_pointer_exit(t,e)}_onClick(t){let e=U(t);e&&this.stateMachinePostClickEvent(e.x,e.y)}_onPointerUp(t){let e=U(t);e&&this.stateMachinePostPointerUpEvent(e.x,e.y)}_onPointerDown(t){let e=U(t);e&&this.stateMachinePostPointerDownEvent(e.x,e.y)}_onPointerMove(t){let e=U(t);e&&this.stateMachinePostPointerMoveEvent(e.x,e.y)}_onPointerEnter(t){let e=U(t);e&&this.stateMachinePostPointerEnterEvent(e.x,e.y)}_onPointerLeave(t){let e=U(t);e&&this.stateMachinePostPointerExitEvent(e.x,e.y)}_setupStateMachineListeners(){if(_&&this._canvas instanceof HTMLCanvasElement&&null!==this._dotLottieCore&&this.isLoaded){let t=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){_&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}},J=class{constructor(){if(typeof Worker>"u")throw Error("Worker is not supported in this environment.");let t=new Blob(['"use strict";(()=>{var lt=Object.defineProperty;var pt=(n,t,e)=>t in n?lt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var l=(n,t,e)=>pt(n,typeof t!="symbol"?t+"":t,e);var z=class{requestAnimationFrame(t){return requestAnimationFrame(t)}cancelAnimationFrame(t){cancelAnimationFrame(t)}},V=class{constructor(){l(this,"_lastHandleId",0);l(this,"_lastImmediate",null)}requestAnimationFrame(t){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{t(performance.now())}),this._lastHandleId}cancelAnimationFrame(t){this._lastImmediate&&clearImmediate(this._lastImmediate)}},A=class{constructor(){l(this,"_strategy");this._strategy=typeof requestAnimationFrame=="function"?new z:new V}requestAnimationFrame(t){return this._strategy.requestAnimationFrame(t)}cancelAnimationFrame(t){this._strategy.cancelAnimationFrame(t)}};var g=typeof window<"u"&&typeof window.document<"u";
5var F=new Uint8Array([80,75,3,4]),X=["v","ip","op","layers","fr","w","h"],U="0.78.2",N="@lottiefiles/dotlottie-web",Z=.75,Q=4;var o,c=0,x=null;function P(){return(x===null||x.byteLength===0)&&(x=new Uint8Array(o.memory.buffer)),x}var O=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},ut=typeof O.encodeInto=="function"?function(n,t){return O.encodeInto(n,t)}:function(n,t){let e=O.encode(n);return t.set(e),{read:n.length,written:e.length}};function p(n,t,e){if(e===void 0){let d=O.encode(n),u=t(d.length,1)>>>0;return P().subarray(u,u+d.length).set(d),c=d.length,u}let r=n.length,s=t(r,1)>>>0,i=P(),_=0;for(;_<r;_++){let d=n.charCodeAt(_);if(d>127)break;i[s+_]=d}if(_!==r){_!==0&&(n=n.slice(_)),s=e(s,r,r=_+n.length*3,1)>>>0;let d=P().subarray(s+_,s+r),u=ut(n,d);_+=u.written,s=e(s,r,_,1)>>>0}return c=_,s}var C=null;function L(){return(C===null||C.buffer.detached===!0||C.buffer.detached===void 0&&C.buffer!==o.memory.buffer)&&(C=new DataView(o.memory.buffer)),C}function tt(n){let t=o.__externref_table_alloc_command_export();return o.__wbindgen_export_4.set(t,n),t}function M(n,t){try{return n.apply(this,t)}catch(e){let r=tt(e);o.__wbindgen_exn_store_command_export(r)}}var et=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&et.decode();function h(n,t){return n=n>>>0,et.decode(P().subarray(n,n+t))}function ht(n){return n==null}var R=null;function mt(){return(R===null||R.byteLength===0)&&(R=new Float32Array(o.memory.buffer)),R}function ft(n,t){let e=t(n.length*4,4)>>>0;return mt().set(n,e/4),c=n.length,e}function W(n,t){let e=t(n.length*1,1)>>>0;return P().set(n,e/1),c=n.length,e}function gt(n,t){let e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){let s=tt(n[r]);L().setUint32(e+4*r,s,!0)}return c=n.length,e}function nt(n,t){let e=p(n,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=W(t,o.__wbindgen_malloc_command_export),i=c;return o.register_font(e,r,s,i)!==0}var b=Object.freeze({Forward:0,0:"Forward",Reverse:1,1:"Reverse",Bounce:2,2:"Bounce",ReverseBounce:3,3:"ReverseBounce"}),w=Object.freeze({Idle:0,0:"Idle",Playing:1,1:"Playing",Paused:2,2:"Paused",Stopped:3,3:"Stopped",Tweening:4,4:"Tweening"}),q=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>o.__wbg_dotlottieplayerwasm_free(n>>>0,1)),B=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),t}free(){let t=this.__destroy_into_raw();o.__wbg_dotlottieplayerwasm_free(t,0)}clear_slot(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,e,r)!==0}layout_fit(){let t,e;try{let r=o.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return t=r[0],e=r[1],h(r[0],r[1])}finally{o.__wbindgen_free_command_export(t,e,1)}}loop_count(){return o.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return o.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,e,r)!==0}set_layout(t,e,r){let s=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),i=c;return o.dotlottieplayerwasm_set_layout(this.__wbg_ptr,s,i,e,r)!==0}set_marker(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;o.dotlottieplayerwasm_set_marker(this.__wbg_ptr,e,r)}clear_slots(){return o.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return o.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}reset_slots(){return o.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return o.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return o.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(t){return o.dotlottieplayerwasm_set_quality(this.__wbg_ptr,t)!==0}set_segment(t,e){return o.dotlottieplayerwasm_set_segment(this.__wbg_ptr,t,e)!==0}sm_set_seed(t){return o.dotlottieplayerwasm_sm_set_seed(this.__wbg_ptr,t)!==0}static unload_font(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_unload_font(e,r)!==0}
5animation_id(){let t=o.dotlottieplayerwasm_animation_id(this.__wbg_ptr),e;return t[0]!==0&&(e=h(t[0],t[1]).slice(),o.__wbindgen_free_command_export(t[0],t[1]*1,1)),e}audio_volume(){return o.dotlottieplayerwasm_audio_volume(this.__wbg_ptr)}background_a(){return o.dotlottieplayerwasm_background_a(this.__wbg_ptr)}background_b(){return o.dotlottieplayerwasm_background_b(this.__wbg_ptr)}background_g(){return o.dotlottieplayerwasm_background_g(this.__wbg_ptr)}background_r(){return o.dotlottieplayerwasm_background_r(this.__wbg_ptr)}clear_marker(){o.dotlottieplayerwasm_clear_marker(this.__wbg_ptr)}emit_on_loop(){o.dotlottieplayerwasm_emit_on_loop(this.__wbg_ptr)}get_slot_ids(){return o.dotlottieplayerwasm_get_slot_ids(this.__wbg_ptr)}get_slot_str(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=o.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,e,r),i;return s[0]!==0&&(i=h(s[0],s[1]).slice(),o.__wbindgen_free_command_export(s[0],s[1]*1,1)),i}marker_names(){return o.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(t){o.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,t)}set_slot_str(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c,i=p(e,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),_=c;return o.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,r,s,i,_)!==0}set_viewport(t,e,r,s){return o.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,t,e,r,s)!==0}total_frames(){return o.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return o.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return o.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=o.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,e,r),i;return s[0]!==0&&(i=h(s[0],s[1]).slice(),o.__wbindgen_free_command_export(s[0],s[1]*1,1)),i}get_slots_str(){let t,e;try{let r=o.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return t=r[0],e=r[1],h(r[0],r[1])}finally{o.__wbindgen_free_command_export(t,e,1)}}get_transform(){return o.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return o.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,e,r)!==0}set_text_slot(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c,i=p(e,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),_=c;return o.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,r,s,i,_)!==0}set_transform(t){let e=ft(t,o.__wbindgen_malloc_command_export),r=c;return o.dotlottieplayerwasm_set_transform(this.__wbg_ptr,e,r)!==0}sm_get_inputs(){return o.dotlottieplayerwasm_sm_get_inputs(this.__wbg_ptr)}sm_poll_event(){return o.dotlottieplayerwasm_sm_poll_event(this.__wbg_ptr)}sm_post_click(t,e){o.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,t,e)}animation_size(){return o.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}
5current_marker(){let t=o.dotlottieplayerwasm_current_marker(this.__wbg_ptr),e;return t[0]!==0&&(e=h(t[0],t[1]).slice(),o.__wbindgen_free_command_export(t[0],t[1]*1,1)),e}layout_align_x(){return o.dotlottieplayerwasm_layout_align_x(this.__wbg_ptr)}layout_align_y(){return o.dotlottieplayerwasm_layout_align_y(this.__wbg_ptr)}load_animation(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_load_animation(this.__wbg_ptr,e,r)!==0}loop_animation(){return o.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(t,e,r,s){return o.dotlottieplayerwasm_set_background(this.__wbg_ptr,t,e,r,s)!==0}set_color_slot(t,e,r,s){let i=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),_=c;return o.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,_,e,r,s)!==0}set_image_slot(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c,i=p(e,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),_=c;return o.dotlottieplayerwasm_set_image_slot(this.__wbg_ptr,r,s,i,_)!==0}set_loop_count(t){o.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,t)}set_theme_data(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,e,r)!==0}sm_reset_input(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;o.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,e,r)}manifest_string(){let t,e;try{let r=o.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return t=r[0],e=r[1],h(r[0],r[1])}finally{o.__wbindgen_free_command_export(t,e,1)}}set_scalar_slot(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c;return o.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,r,s,e)!==0}set_vector_slot(t,e,r){let s=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),i=c;return o.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,s,i,e,r)!==0}setup_sw_target(t,e){return o.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,t,e)!==0}get_pixel_buffer(){return o.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}set_audio_volume(t){o.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,t)}sm_current_state(){let t,e;try{let r=o.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return t=r[0],e=r[1],h(r[0],r[1])}finally{o.__wbindgen_free_command_export(t,e,1)}}state_machine_id(){let t=o.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),e;return t[0]!==0&&(e=h(t[0],t[1]).slice(),o.__wbindgen_free_command_export(t[0],t[1]*1,1)),e}get_state_machine(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=o.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,e,r),i;return s[0]!==0&&(i=h(s[0],s[1]).slice(),o.__wbindgen_free_command_export(s[0],s[1]*1,1)),i}set_position_slot(t,e,r){let s=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),i=c;return o.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,s,i,e,r)!==0}current_loop_count(){return o.dotlottieplayerwasm_current_loop_count(this.__wbg_ptr)>>>0}sm_framework_setup(){return o.dotlottieplayerwasm_sm_framework_setup(this.__wbg_ptr)}sm_post_pointer_up(t,e){o.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,t,e)}state_machine_load(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,e,r)!==0}load_dotlottie_data(t){let e=W(t,o.__wbindgen_malloc_command_export),r=c;return o.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,e,r)!==0}sm_get_string_input(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=o.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,e,r),i;return s[0]!==0&&(i=h(s[0],s[1]).slice(),o.__wbindgen_free_command_export(s[0],s[1]*1,1)),i}sm_set_string_input(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c,i=p(e,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),_=c;return o.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,r,s,i,_)!==0}sm_get_boolean_input(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=o.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,e,r);return s===16777215?void 0:s!==0}sm_get_numeric_input(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c,s=o.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,e,r);return s===4294967297?void 0:s}sm_post_pointer_down(t,e){o.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,t,e)}sm_post_pointer_exit(t,e){o.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,t,e)}sm_post_pointer_move(t,e){o.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,t,e)}sm_set_boolean_input(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c;return o.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,r,s,e)!==0}sm_set_numeric_input(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c;return o.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,r,s,e)!==0}state_machine_unload(){o.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(t,e){o.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,t,e)}load_animation_from_id(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,e,r)!==0}sm_poll_internal_event(){return o.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return o.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){o.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c;return o.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,r,s,e)!==0}state_machine_load_from_id(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,e,r)!==0}set_use_frame_interpolation(t){o.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,t)}
5constructor(){let t=o.dotlottieplayerwasm_new();return this.__wbg_ptr=t>>>0,q.register(this,this.__wbg_ptr,this),this}mode(){return o.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return o.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return o.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(t){return o.dotlottieplayerwasm_tick(this.__wbg_ptr,t)!==0}pause(){return o.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}speed(){return o.dotlottieplayerwasm_speed(this.__wbg_ptr)}width(){return o.dotlottieplayerwasm_width(this.__wbg_ptr)>>>0}height(){return o.dotlottieplayerwasm_height(this.__wbg_ptr)>>>0}render(){return o.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}status(){return o.dotlottieplayerwasm_status(this.__wbg_ptr)}markers(){return o.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,e,r)!==0}sm_stop(){return o.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(t){return o.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,t)!==0}autoplay(){return o.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return o.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(t){o.dotlottieplayerwasm_set_loop(this.__wbg_ptr,t)}set_mode(t){o.dotlottieplayerwasm_set_mode(this.__wbg_ptr,t)}sm_start(t,e){let r=gt(e,o.__wbindgen_malloc_command_export),s=c;return o.dotlottieplayerwasm_sm_start(this.__wbg_ptr,t,r,s)!==0}theme_id(){let t=o.dotlottieplayerwasm_theme_id(this.__wbg_ptr),e;return t[0]!==0&&(e=h(t[0],t[1]).slice(),o.__wbindgen_free_command_export(t[0],t[1]*1,1)),e}load_font(t,e){let r=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),s=c,i=W(e,o.__wbindgen_malloc_command_export),_=c;return o.dotlottieplayerwasm_load_font(this.__wbg_ptr,r,s,i,_)!==0}set_frame(t){return o.dotlottieplayerwasm_set_frame(this.__wbg_ptr,t)!==0}set_speed(t){o.dotlottieplayerwasm_set_speed(this.__wbg_ptr,t)}set_theme(t){let e=p(t,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),r=c;return o.dotlottieplayerwasm_set_theme(this.__wbg_ptr,e,r)!==0}sm_status(){let t,e;try{let r=o.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return t=r[0],e=r[1],h(r[0],r[1])}finally{o.__wbindgen_free_command_export(t,e,1)}}};async function wt(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n",r);else throw r}let e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{let e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function vt(){let n={};return n.wbg={},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_createObjectURL_6e98d2f9c7bd9764=function(){return M(function(t,e){let r=URL.createObjectURL(e),s=p(r,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),i=c;L().setInt32(t+4,i,!0),L().setInt32(t+0,s,!0)},arguments)},n.wbg.__wbg_ended_b873fb75d0c13ca7=function(t){return t.ended},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,s;try{r=t,s=e,console.error(h(t,e))}finally{o.__wbindgen_free_command_export(r,s,1)}},n.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},n.wbg.__wbg_new_78feb108b6472713=function(){return new Array},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(t){return new Float32Array(t>>>0)},n.wbg.__wbg_newwithsrc_20307ca7e8762a81=function(){return M(function(t,e){return new Audio(h(t,e))},arguments)},n.wbg.__wbg_newwithu8arraysequenceandoptions_068570c487f69127=function(){return M(function(t,e){return new Blob(t,e)},arguments)},n.wbg.__wbg_pause_b74c96d69f769518=function(){return M(function(t){t.pause()},arguments)},n.wbg.__wbg_play_f6ec5fc4e84b0d26=function(){return M(function(t){return t.play()},arguments)},n.wbg.__wbg_push_737cfc8c1432c2c6=function(t,e){return t.push(e)},n.wbg.__wbg_revokeObjectURL_27267efebeb457c7=function(){return M(function(t,e){URL.revokeObjectURL(h(t,e))},arguments)},n.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return M(function(t,e,r){return Reflect.set(t,e,r)},arguments)},n.wbg.__wbg_setcurrentTime_64727eddd3966512=function(t,e){t.currentTime=e},n.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(t,e,r){t[e>>>0]=r},n.wbg.__wbg_settype_39ed370d3edd403c=function(t,e,r){t.type=h(e,r)},n.wbg.__wbg_setvolume_3895e06a030ca4f7=function(t,e){t.volume=e},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){let r=e.stack,s=p(r,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),i=c;L().setInt32(t+4,i,!0),L().setInt32(t+0,s,!0)}
5,n.wbg.__wbindgen_init_externref_table=function(){let t=o.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_memory=function(){return o.memory},n.wbg.__wbindgen_number_new=function(t){return t},n.wbg.__wbindgen_string_get=function(t,e){let r=e,s=typeof r=="string"?r:void 0;var i=ht(s)?0:p(s,o.__wbindgen_malloc_command_export,o.__wbindgen_realloc_command_export),_=c;L().setInt32(t+4,_,!0),L().setInt32(t+0,i,!0)},n.wbg.__wbindgen_string_new=function(t,e){return h(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(h(t,e))},n}function bt(n,t){return o=n.exports,rt.__wbindgen_wasm_module=t,C=null,R=null,x=null,o.__wbindgen_start(),o}async function rt(n){if(o!==void 0)return o;if(typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u")throw new Error("WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().");let t=vt();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));let{instance:e,module:r}=await wt(await n,t);return bt(e,r)}var ot=rt;var $=class{constructor(){l(this,"_eventListeners",new Map)}addEventListener(t,e){let r=this._eventListeners.get(t);r||(r=new Set,this._eventListeners.set(t,r)),r.add(e)}removeEventListener(t,e){let r=this._eventListeners.get(t);r&&(e?(r.delete(e),r.size===0&&this._eventListeners.delete(t)):this._eventListeners.delete(t))}dispatch(t){this._eventListeners.get(t.type)?.forEach(r=>r(t))}removeAllEventListeners(){this._eventListeners.clear()}};var f=class f{static _initializeObserver(){if(f._observer)return;let t=e=>{e.forEach(r=>{let s=f._observedCanvases.get(r.target);s&&(r.isIntersecting?s.unfreeze():s.freeze())})};f._observer=new IntersectionObserver(t,{threshold:0})}static observe(t,e){f._initializeObserver(),!f._observedCanvases.has(t)&&(f._observedCanvases.set(t,e),f._observer?.observe(t))}static unobserve(t){f._observer?.unobserve(t),f._observedCanvases.delete(t),f._observedCanvases.size===0&&(f._observer?.disconnect(),f._observer=null)}};l(f,"_observer",null),l(f,"_observedCanvases",new Map);var y=f;var m=class m{static _initializeObserver(){if(m._observer)return;let t=e=>{e.forEach(r=>{let s=m._observedCanvases.get(r.target);if(!s)return;let[i,_]=s;clearTimeout(_);let d=setTimeout(()=>{i.resize()},100);m._observedCanvases.set(r.target,[i,d])})};m._observer=new ResizeObserver(t)}static observe(t,e){m._initializeObserver(),!m._observedCanvases.has(t)&&(m._observedCanvases.set(t,[e,0]),m._observer?.observe(t))}static unobserve(t){let e=m._observedCanvases.get(t);if(e){let r=e[1];r&&clearTimeout(r)}m._observer?.unobserve(t),m._observedCanvases.delete(t),!m._observedCanvases.size&&m._observer&&(m._observer.disconnect(),m._observer=null)}};l(m,"_observer",null),l(m,"_observedCanvases",new Map);var E=m;function yt(n){return/^#([\\da-f]{6}|[\\da-f]{8})$/iu.test(n)}function st(n){if(!yt(n))return[0,0,0,0];let t=n.replace("#","");t=t.length===6?`${t}ff`:t;let e=parseInt(t.slice(0,2),16)/255,r=parseInt(t.slice(2,4),16)/255,s=parseInt(t.slice(4,6),16)/255,i=parseInt(t.slice(6,8),16)/255;return[e,r,s,i]}function G(n){if(n.byteLength<4)return!1;let t=new Uint8Array(n.slice(0,F.byteLength));for(let e=0;e<F.length;e+=1)if(F[e]!==t[e])return!1;return!0}function Et(n){return X.every(t=>Object.hasOwn(n,t))}function H(n){return typeof n=="string"?/^\\s*\\{/u.test(n)&&/\\}\\s*$/u.test(n):Et(n)}function J(){return 1+((g?window.devicePixelRatio:1)-1)*Z}function k(n){let t=n.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(t.bottom<0||t.top>e||t.right<0||t.left>r)}function I(n){let t=n.target;if(t instanceof HTMLCanvasElement){let e=t.getBoundingClientRect();if(e.width===0||e.height===0||t.width===0||t.height===0)return null;let r=t.width/e.width,s=t.height/e.height,i=(n.clientX-e.left)*r,_=(n.clientY-e.top)*s;return!Number.isFinite(i)||!Number.isFinite(_)||Number.isNaN(i)||Number.isNaN(_)?null:{x:i,y:_}}return null}function Mt(n){return new Promise((t,e)=>{let r=new FileReader;r.onerror=()=>e(r.error??new Error("Failed to read image slot source")),r.onload=()=>
5t(r.result),r.readAsDataURL(n)})}async function it(n){if(!/^https?:\\/\\//i.test(n))return n;let t=await fetch(n);if(!t.ok)throw new Error(`Failed to fetch image slot source from URL: ${n}. ${t.status}: ${t.statusText}`);return Mt(await t.blob())}function at(n){let t=n.replace("OpenUrl: ",""),e=t.indexOf(" | Target: "),r,s;e===-1?(r=t,s="_blank"):(r=t.substring(0,e),s=t.substring(e+11)),window.open(r,s)}function ct(n,t,e){let r=null,s=t;async function i(d){await n({module_or_path:d})}async function _(d){let u=await fetch(d);if(!u.ok)throw new Error(`fetch ${d} responded with ${u.status} ${u.statusText}`);let T=await u.arrayBuffer();await n({module_or_path:T})}return{load(){if(!r){let d=s,u=e;r=(async()=>{let T,Y;try{await i(d);return}catch(v){T=v,console.warn(`Primary WASM load failed from ${d}: ${v.message}`),console.warn(`Attempting to load WASM from backup URL: ${u}`)}try{await i(u);return}catch(v){Y=v,console.warn(`Backup WASM load failed from ${u}: ${v.message}`)}console.warn("Retrying WASM load with buffered instantiation");try{await _(d);return}catch(v){console.warn(`Buffered WASM load from ${d} failed: ${v.message}`)}try{await _(u);return}catch(v){throw console.error(`Primary WASM URL failed: ${T.message}`),console.error(`Backup WASM URL failed: ${Y.message}`),console.error(`Buffered fallback failed: ${v.message}`),r=null,new Error("WASM loading failed from all sources.")}})()}return r},setWasmUrl(d){d!==s&&(s=d,r=null)}}}var _t=null;function D(){return _t??(_t=ct(ot,`https://cdn.jsdelivr.net/npm/${N}@${U}/dist/dotlottie-player.wasm`,`https://unpkg.com/${N}@${U}/dist/dotlottie-player.wasm`)),_t}var j=n=>{switch(n){case"reverse":return b.Reverse;case"bounce":return b.Bounce;case"reverse-bounce":return b.ReverseBounce;default:return b.Forward}},dt=n=>{switch(n){case b.Reverse:return"reverse";case b.Bounce:return"bounce";case b.ReverseBounce:return"reverse-bounce";default:return"forward"}},Ct=n=>{switch(n){case"contain":return"contain";case"cover":return"cover";case"fill":return"fill";case"fit-height":return"fit-height";case"fit-width":return"fit-width";case"none":return"none";default:return"contain"}},S=class{constructor(t){l(this,"_canvas",null);l(this,"_pendingLoad",null);l(this,"_srcFetchAbort",null);l(this,"_context",null);l(this,"_eventManager");l(this,"_animationFrameId",null);l(this,"_frameManager");l(this,"_boundAnimationLoop");l(this,"_dotLottieCore",null);l(this,"_stateMachineId","");l(this,"_stateMachineConfig",null);l(this,"_isStateMachineRunning",!1);l(this,"_renderConfig",{});l(this,"_isFrozen",!1);l(this,"_backgroundColor",null);l(this,"_lastFrameTime",null);l(this,"_boundOnClick",null);l(this,"_boundOnPointerUp",null);l(this,"_boundOnPointerDown",null);l(this,"_boundOnPointerMove",null);l(this,"_boundOnPointerEnter",null);l(this,"_boundOnPointerLeave",null);l(this,"_bufferMismatchCount",0);l(this,"_lastExpectedBufferSize",0);l(this,"_cachedImageData",null);l(this,"_cachedImageDataBuffer",null);l(this,"_cachedImageDataByteOffset",0);l(this,"_marker","");l(this,"_segment",null);this._canvas=t.canvas??null,this._eventManager=new $,this._frameManager=new A,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||J(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0};let e=null;t.src&&!t.data&&(this._srcFetchAbort=new AbortController,e=this._fetchData(t.src,this._srcFetchAbort.signal),e.catch(()=>{})),this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(j(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&t.segment.length===2&&(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=t.marker??"",this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),this._stateMachineId=t.stateMachineId??"",this._stateMachineConfig=t.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:"ready"}
5),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src,e):this._pendingLoad={src:t.src,dataPromise:e}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(r=>{this._srcFetchAbort?.abort(),console.error("[dotlottie-web] Initialization failed:",r),this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${r}`)})})}async _initWasm(){return D().load()}_createCore(){return new B}_onCoreCreated(){}_setupTarget(t,e){return this._dotLottieCore?this._dotLottieCore.setup_sw_target(t,e):!1}_drainPlayerEvents({skipFrame:t=!1}={}){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.poll_event())!==null&&e!==void 0;){let r=e;switch(r.type){case"Load":setTimeout(()=>this._eventManager.dispatch({type:"load"}),0);break;case"LoadError":setTimeout(()=>this._eventManager.dispatch({type:"loadError",error:new Error("failed to load")}),0);break;case"Play":queueMicrotask(()=>this._eventManager.dispatch({type:"play"}));break;case"Pause":queueMicrotask(()=>this._eventManager.dispatch({type:"pause"}));break;case"Stop":queueMicrotask(()=>this._eventManager.dispatch({type:"stop"}));break;case"Frame":t||queueMicrotask(()=>this._eventManager.dispatch({type:"frame",currentFrame:r.frameNo??0}));break;case"Render":t||queueMicrotask(()=>this._eventManager.dispatch({type:"render",currentFrame:r.frameNo??0}));break;case"Loop":queueMicrotask(()=>this._eventManager.dispatch({type:"loop",loopCount:r.loopCount??0}));break;case"Complete":queueMicrotask(()=>this._eventManager.dispatch({type:"complete"}));break;default:break}}}_discardPlayerEvents(){for(;this._dotLottieCore?.poll_event()!=null;);}_drainSmEvents(){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.sm_poll_event())!==null&&t!==void 0;){let r=t;switch(r.type){case"Start":queueMicrotask(()=>{this._isStateMachineRunning=!0,this._eventManager.dispatch({type:"stateMachineStart"}),this._startAnimationLoop()});break;case"Stop":queueMicrotask(()=>{this._isStateMachineRunning=!1,this._eventManager.dispatch({type:"stateMachineStop"}),this._dotLottieCore?.status()!==w.Playing&&this._stopAnimationLoop()});break;case"CustomEvent":this._eventManager.dispatch({type:"stateMachineCustomEvent",eventName:r.message??""});break;case"BooleanInputChange":this._eventManager.dispatch({type:"stateMachineBooleanInputValueChange",inputName:r.name??"",newValue:r.newValue,oldValue:r.oldValue});break;case"NumericInputChange":this._eventManager.dispatch({type:"stateMachineNumericInputValueChange",inputName:r.name??"",newValue:r.newValue,oldValue:r.oldValue});break;case"StringInputChange":this._eventManager.dispatch({type:"stateMachineStringInputValueChange",inputName:r.name??"",newValue:r.newValue,oldValue:r.oldValue});break;case"InputFired":this._eventManager.dispatch({type:"stateMachineInputFired",inputName:r.name??""});break;case"Transition":this._eventManager.dispatch({type:"stateMachineTransition",fromState:r.previousState??"",toState:r.newState??""});break;case"StateEntered":this._eventManager.dispatch({type:"stateMachineStateEntered",state:r.state??""});break;case"StateExit":this._eventManager.dispatch({type:"stateMachineStateExit",state:r.state??""});break;case"Error":this._eventManager.dispatch({type:"stateMachineError",error:r.message??""});break;default:break}}let e;for(;(e=this._dotLottieCore.sm_poll_internal_event())!==null&&e!==void 0;){let r=e;if(r.type==="Message"){let s=r.message??"";g&&s.startsWith("OpenUrl: ")?at(s):this._eventManager.dispatch({type:"stateMachineInternalMessage",message:s})}}}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:new Error(t)})}async _fetchData(t,e=null){let r=await fetch(t,{signal:e});if(!r.ok)throw new Error(`Failed to fetch animation data from URL: ${t}. ${r.status}: ${r.statusText}`);let s=await r.arrayBuffer();return G(s)?s:new TextDecoder().decode(s)}_loadFromData(t){if(this._dotLottieCore===null)return;if(!this._canvas){console.warn("[dotlottie-web] Cannot load animation without canvas. Call setCanvas() f
5irst.");return}this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height);let e=!1;if(typeof t=="string"){if(e=this._dotLottieCore.load_animation(t),!e&&!H(t)){this._discardPlayerEvents(),this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}}else if(t instanceof ArrayBuffer){if(!G(t)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}e=this._dotLottieCore.load_dotlottie_data(new Uint8Array(t))}else if(typeof t=="object"){if(!H(t)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}e=this._dotLottieCore.load_animation(JSON.stringify(t))}else{this._dispatchError(`Unsupported data type for animation data. Expected:\n          - string (Lottie JSON),\n          - ArrayBuffer (dotLottie),\n          - object (Lottie JSON).\n          Received: ${typeof t}`);return}if(e){if(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents({skipFrame:!!this._marker||!!this._segment}),this._marker&&this._dotLottieCore.set_marker(this._marker),this._segment){this._dotLottieCore.set_segment(this._segment[0],this._segment[1]);let r=dt(this._dotLottieCore.mode()),s=r==="reverse"||r==="reverse-bounce"?this._segment[1]:this._segment[0];this._dotLottieCore.set_frame(s)}setTimeout(()=>{this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame})},0),this._dotLottieCore.render(),this._drainPlayerEvents(),this._draw(),this._stateMachineId?this.stateMachineLoad(this._stateMachineId)&&this.stateMachineStart()&&this._startAnimationLoop():this._dotLottieCore.status()===w.Playing&&this._startAnimationLoop(),g&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&(y.observe(this._canvas,this),k(this._canvas)||this.freeze()),this._renderConfig.autoResize&&E.observe(this._canvas,this))}else this._drainPlayerEvents()}_loadFromSrc(t,e){(e??this._fetchData(t)).then(r=>this._loadFromData(r)).catch(r=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${r}`))}get buffer(){return this._dotLottieCore?this._dotLottieCore.get_pixel_buffer():null}get activeAnimationId(){return this._dotLottieCore?.animation_id()??void 0}get activeThemeId(){return this._dotLottieCore?.theme_id()??void 0}get layout(){if(this._dotLottieCore)return{align:[this._dotLottieCore.layout_align_x(),this._dotLottieCore.layout_align_y()],fit:Ct(this._dotLottieCore.layout_fit())}}get marker(){return this._dotLottieCore?.current_marker()??""}get manifest(){try{let t=this._dotLottieCore?.manifest_string();if(this._dotLottieCore===null||!t)return null;let e=JSON.parse(t);return Object.keys(e).length===0?null:e}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){if(this._dotLottieCore)return[this._dotLottieCore.segment_start(),this._dotLottieCore.segment_end()]}get loop(){return this._dotLottieCore?.loop_animation()??!1}get mode(){return this._dotLottieCore?dt(this._dotLottieCore.mode()):"forward"}get isFrozen(){return this._isFrozen}get isStateMachineRunning(){return this._isStateMachineRunning}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.autoplay()??!1}get useFrameInterpolation(){return this._dotLottieCore?.use_frame_interpolation()??!1}get speed(){return this._dotLottieCore?.speed()??0}get isReady(){return this._dotLottieCore!==null}get isLoaded(){return(this._dotLottieCore?.status()??w.Idle)!==w.Idle}get isPlaying(){return this._dotLottieCore?.status()===w.Playing}get isPaused(){return this._dotLottieCore?.status()===w.Paused}get isStopped(){return this._dotLottieCore?.status()===w.Stopped}get currentFrame(){return this._dotLottieCore?Math.round(this._dotLottieCore.current_frame()*100)/100:0}get loopCount(){return this._dotLottieCore?.current_loop_count()??0}get totalFrames(){return this._dotLottieCore?.total_frames()??0}get duration(){return(this._dotLottieCore?.duration()??0)/1e3}
vendor: 5,490 bytes, line 5
5get canvas(){return this._canvas}load(t){this._dotLottieCore!==null&&(this._stopAnimationLoop(),this._cleanupCanvas(),this._isFrozen=!1,this._dotLottieCore.set_autoplay(t.autoplay??!1),this._dotLottieCore.set_loop(t.loop??!1),this._dotLottieCore.set_loop_count(t.loopCount??0),this._dotLottieCore.set_mode(j(t.mode??"forward")),this._dotLottieCore.set_speed(t.speed??1),this._dotLottieCore.set_use_frame_interpolation(t.useFrameInterpolation??!0),t.segment&&t.segment.length===2?(this._segment=[t.segment[0],t.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])):(this._segment=null,this._dotLottieCore.clear_segment()),this._marker=t.marker??"",this._marker?this._dotLottieCore.set_marker(this._marker):this._dotLottieCore.clear_marker(),this._dotLottieCore.set_layout(t.layout?.fit??"contain",t.layout?.align?.[0]??.5,t.layout?.align?.[1]??.5),t.data?this._canvas?this._loadFromData(t.data):this._pendingLoad={data:t.data}:t.src&&(this._canvas?this._loadFromSrc(t.src):this._pendingLoad={src:t.src}),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor))}_draw(){if(this._dotLottieCore===null||this._canvas===null||(!this._context&&"getContext"in this._canvas&&typeof this._canvas.getContext=="function"&&(!g||typeof HTMLCanvasElement<"u"&&this._canvas instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&this._canvas instanceof OffscreenCanvas)&&(this._context=this._canvas.getContext("2d")),!this._context))return;let t=this._dotLottieCore.get_pixel_buffer(),e=this._canvas.width,r=this._canvas.height,s=e*r*Q;if(t.byteLength!==s){this._lastExpectedBufferSize===s?this._bufferMismatchCount+=1:(this._bufferMismatchCount=1,this._lastExpectedBufferSize=s),this._bufferMismatchCount===10&&console.warn(`[dotlottie-web] Persistent buffer size mismatch detected. Expected ${s} bytes for canvas ${e}x${r}, but got ${t.byteLength} bytes. This may indicate a WASM memory allocation issue or invalid canvas dimensions.`);return}this._bufferMismatchCount=0,this._lastExpectedBufferSize=s;let i=this._cachedImageData;if(!(i!==null&&i.width===e&&i.height===r&&i.data.byteLength===s&&this._cachedImageDataBuffer===t.buffer&&this._cachedImageDataByteOffset===t.byteOffset)){if(typeof ImageData>"u")this._cachedImageData=this._context.createImageData(e,r);else{let d=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData=new ImageData(d,e,r)}this._cachedImageDataBuffer=t.buffer,this._cachedImageDataByteOffset=t.byteOffset}if(typeof ImageData>"u"){let d=new Uint8ClampedArray(t.buffer,t.byteOffset,t.byteLength);this._cachedImageData.data.set(d)}this._context.putImageData(this._cachedImageData,0,0)}_cleanupCanvas(){this._canvas&&g&&this._canvas instanceof HTMLCanvasElement&&(y.unobserve(this._canvas),E.unobserve(this._canvas),this._cleanupStateMachineListeners())}_initializeCanvas(){this._setupRendererOnCanvas(),this._canvas&&g&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded&&(this._renderConfig.freezeOnOffscreen&&(y.observe(this._canvas,this),k(this._canvas)||this.freeze()),this._renderConfig.autoResize&&E.observe(this._canvas,this),this._isStateMachineRunning&&this._setupStateMachineListeners()),this._canvas&&this._dotLottieCore&&this.isLoaded&&this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}_setupRendererOnCanvas(){this._context=null}_stopAnimationLoop(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._lastFrameTime=null}_startAnimationLoop(){this._animationFrameId===null&&this._dotLottieCore&&!this._isFrozen&&(this._dotLottieCore.status()===w.Playing||this._isStateMachineRunning)&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop))}_animationLoop(t){if(this._dotLottieCore===null){this._stopAnimationLoop();return}if(this._dotLottieCore.status()!==w.Playing&&!this._isStateMachineRunning){this._stopAnimationLoop();return}try{let e=this._lastFrameTime!==null?t-this._lastFrameTime:0;this._lastFrameTime=t;let r=this._isStateMachineRunning?this._dotLottieCore.sm_tick(e):this._dotLottieCore.tick(e);this._isStateMachineRunning?this._drainSmEvents():this._drainPlayerEvents(),r&&this._draw(),this._animationFrameId=this._frameManager.requestAnimationFrame(this._boundAnimationLoop)}catch(e){console.error("Error in animation frame:",e),this._eventManager.dispatch({type:"renderError",error:e}),e instanceof WebAssembly.RuntimeError&&this.destroy()}}play(){if(this._dotLottieCore===null||!this.isLoaded)return;this._stopAnimationLoop();let t=this._dotLottieCore.play();this._drainPlayerEvents(),(t||this._dotLottieCore.status()===w.Playing)&&(this._isFrozen=!1,this._startAnimationLoop()),this._canvas&&g&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!k(this._canvas)&&this.freeze()}pause(){this._dotLottieCore!==null&&(this._dotLottieCore.pause(),this._drainPlayerEvents(),this._stopAnimationLoop())}stop(){if(this._dotLottieCore===null)return;let t=this._dotLottieCore.stop();this._drainPlayerEvents(),this._stopAnimationLoop(),t&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._dotLottieCore.render(),this._draw())}setFrame(t){if(this._dotLottieCore===null)return;if(this._dotLottieCore.set_frame(t)){let r=this._dotLottieCore.render();this._drainPlayerEvents(),r&&this._draw()}}setSpeed(t){this._dotLottieCore!==null&&this._dotLottieCore.set_speed(t)}
vendor: 6,482 bytes, line 5
5setBackgroundColor(t){if(this._dotLottieCore!==null){if(g&&this._canvas instanceof HTMLCanvasElement)this._canvas.style.backgroundColor=t;else{let[e,r,s,i]=st(t);this._dotLottieCore.set_background(e,r,s,i)}this._backgroundColor=t}}setLoop(t){this._dotLottieCore!==null&&this._dotLottieCore.set_loop(t)}setLoopCount(t){this._dotLottieCore!==null&&this._dotLottieCore.set_loop_count(t)}setUseFrameInterpolation(t){this._dotLottieCore!==null&&this._dotLottieCore.set_use_frame_interpolation(t)}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}destroy(){this._stopAnimationLoop(),this._isStateMachineRunning=!1,this._cleanupCanvas(),this._srcFetchAbort?.abort(),this._srcFetchAbort=null,this._pendingLoad=null;let t=this._dotLottieCore;if(this._dotLottieCore=null,this._context=null,t)try{t.free()}catch(e){console.warn("[dotlottie-web] Error freeing wasm core during destroy:",e)}this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){this._animationFrameId!==null&&(this._stopAnimationLoop(),this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){this._animationFrameId===null&&(this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}),this._startAnimationLoop())}_syncCanvasSize(){if(!(g&&this._canvas instanceof HTMLCanvasElement))return;let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:e,width:r}=this._canvas.getBoundingClientRect();e!==0&&r!==0&&(this._canvas.width=r*t,this._canvas.height=e*t)}resize(){if(!this._dotLottieCore||!this.isLoaded||!this._canvas)return;this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height)&&(this._dotLottieCore.render(),this._draw())}setCanvas(t){if(!(!t||this._canvas===t)&&(this._canvas&&this._cleanupCanvas(),this._canvas=t,this._initializeCanvas(),this._pendingLoad)){let e=this._pendingLoad;this._pendingLoad=null,e.data?this._loadFromData(e.data):e.src&&this._loadFromSrc(e.src,e.dataPromise)}}setTransform(t){if(!this._dotLottieCore)return!1;let e=this._dotLottieCore.set_transform(new Float32Array(t));return e&&this._dotLottieCore.render()&&this._draw(),e}getTransform(){if(!this._dotLottieCore)return;let t=this._dotLottieCore.get_transform();return Array.from(t)}setSegment(t,e){this._dotLottieCore!==null&&(this._segment=[t,e],this._dotLottieCore.set_segment(t,e))}resetSegment(){this._dotLottieCore!==null&&(this._segment=null,this._dotLottieCore.clear_segment())}setMode(t){this._dotLottieCore!==null&&this._dotLottieCore.set_mode(j(t))}setRenderConfig(t){let{devicePixelRatio:e,freezeOnOffscreen:r,quality:s,...i}=t;this._renderConfig={...this._renderConfig,...i,devicePixelRatio:e||J(),freezeOnOffscreen:r??!0,...s!==void 0&&{quality:s}},s!==void 0&&this._dotLottieCore&&this._dotLottieCore.set_quality(s),g&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?E.observe(this._canvas,this):E.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?(y.observe(this._canvas,this),k(this._canvas)||this.freeze()):(y.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){if(this._dotLottieCore===null||this._dotLottieCore.animation_id()===t||!this._canvas)return;this._syncCanvasSize(),this._setupTarget(this._canvas.width,this._canvas.height),this._dotLottieCore.load_animation_from_id(t)?(this._renderConfig.quality!==void 0&&this._dotLottieCore.set_quality(this._renderConfig.quality),this._drainPlayerEvents(),this._dotLottieCore.render(),this._draw()):this._dispatchError(`Failed to load animation with id: ${t}`)}setMarker(t){if(this._dotLottieCore===null)return;this.markers().some(s=>s.name===t)?(this._marker=t,this._dotLottieCore.set_marker(t)):(this._marker="",this._segment=null,this._dotLottieCore.clear_marker(),this._dotLottieCore.clear_segment())}markers(){let t=this._dotLottieCore?.markers();return t&&Array.isArray(t)?t:[]}setTheme(t){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.set_theme(t);return e&&(this._dotLottieCore.render(),this._draw()),e}resetTheme(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.reset_theme();return t&&(this._dotLottieCore.render(),this._draw()),t}setThemeData(t){if(this._dotLottieCore===null)return!1;let e=typeof t=="string"?t:JSON.stringify(t),r=this._dotLottieCore.set_theme_data(e);return r&&(this._dotLottieCore.render(),this._draw()),r}setSlots(t){this._dotLottieCore!==null&&this._dotLottieCore.set_slots_str(JSON.stringify(t))&&(this._dotLottieCore.render(),this._draw())}_isKeyframeArray(t){return Array.isArray(t)&&t.length>0&&typeof t[0]=="object"&&t[0]!==null&&"t"in t[0]&&"s"in t[0]}getSlotIds(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.get_slot_ids();return Array.isArray(t)?t:[]}getSlotType(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_type(t);if(e)return e}getSlot(t){if(!this._dotLottieCore)return;let e=this._dotLottieCore.get_slot_str(t);if(e)try{return JSON.parse(e)}catch{return}}getSlots(){if(!this._dotLottieCore)return{};try{return JSON.parse(this._dotLottieCore.get_slots_str())}catch{return{}}}setColorSlot(t,e){if(this._dotLottieCore===null)return!1;let r=this._isKeyframeArray(e),s=JSON.stringify({a:r?1:0,k:e}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}setScalarSlot(t,e){if(this._dotLottieCore===null)return!1;let s=JSON.stringify({a:typeof e!="number"?1:0,k:e}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}setVectorSlot(t,e){if(this._dotLottieCore===null)return!1;let r=this._isKeyframeArray(e),s=JSON.stringify({a:r?1:0,k:e}),i=this._dotLottieCore.set_slot_str(t,s);return this._dotLottieCore.render(),this._draw(),i}setGradientSlot(t,e,r){if(this._dotLottieCore===null)return!1;let s=this._isKeyframeArray(e),i=JSON.stringify({k:{a:s?1:0,k:e},p:r}),_=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),_}setTextSlot(t,e){if(this._dotLottieCore===null)return!1;let r=this._dotLottieCore.get_slot_str(t),s=e;if(r){let d=JSON.parse(r);if(d&&"k"in d&&Array.isArray(d.k)){let u=d.k[0];"s"in u&&typeof u.s=="object"&&(s={...u.s,...e})}}let i=JSON.stringify({a:0,k:[{t:0,s}]}),_=this._dotLottieCore.set_slot_str(t,i);return this._dotLottieCore.render(),this._draw(),_}async setImageSlot(t,e){if(this._dotLottieCore===null)return!1;let r=await it(e);
vendor: 6,693 bytes, line 5
5if(this._dotLottieCore===null)return!1;let s=this._dotLottieCore.set_image_slot(t,r);return this._dotLottieCore.render(),this._draw(),s}resetSlot(t){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.reset_slot(t);return this._dotLottieCore.render(),this._draw(),e}clearSlot(t){if(this._dotLottieCore===null)return!1;let e=this._dotLottieCore.clear_slot(t);return this._dotLottieCore.render(),this._draw(),e}resetSlots(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.reset_slots();return this._dotLottieCore.render(),this._draw(),t}clearSlots(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.clear_slots();return this._dotLottieCore.render(),this._draw(),t}setLayout(t){this._dotLottieCore!==null&&this._dotLottieCore.set_layout(t.fit??"contain",t.align?.[0]??.5,t.align?.[1]??.5)}setViewport(t,e,r,s){return this._dotLottieCore===null?!1:this._dotLottieCore.set_viewport(t,e,r,s)}static setWasmUrl(t){D().setWasmUrl(t)}static preload(){return D().load()}static async registerFont(t,e){try{await D().load();let r;if(typeof e=="string"){let i=await fetch(e);if(!i.ok)return console.error(`Failed to fetch font from URL: ${e}. Status: ${i.status}`),!1;r=new Uint8Array(await i.arrayBuffer())}else e instanceof Uint8Array?r=e:r=new Uint8Array(e);let s=nt(t,r);return s||console.error(`Failed to register font "${t}". Font data may be invalid.`),s}catch(r){return console.error(`Error registering font "${t}":`,r),!1}}animationSize(){let t=this._dotLottieCore?.animation_size();return{width:t?.[0]??0,height:t?.[1]??0}}stateMachineLoad(t){return this._dotLottieCore?this._dotLottieCore.state_machine_load_from_id(t):!1}stateMachineLoadData(t){return this._dotLottieCore?this._dotLottieCore.state_machine_load(t):!1}stateMachineSetConfig(t){this._stateMachineConfig=t}stateMachineStart(){if(this._dotLottieCore===null)return!1;let t=this._dotLottieCore.sm_start(this._stateMachineConfig?.openUrlPolicy?.requireUserInteraction??!0,this._stateMachineConfig?.openUrlPolicy?.whitelist??[]);return this._drainSmEvents(),t&&(this._isStateMachineRunning=!0,this._setupStateMachineListeners(),this._startAnimationLoop()),t}stateMachineStop(){if(!this._dotLottieCore)return!1;let t=this._dotLottieCore.sm_stop();return this._drainSmEvents(),t&&(this._isStateMachineRunning=!1,this._cleanupStateMachineListeners(),this._dotLottieCore.status()!==w.Playing&&this._stopAnimationLoop()),t}stateMachineGetStatus(){return this._dotLottieCore?.sm_status()??""}stateMachineGetCurrentState(){return this._dotLottieCore?.sm_current_state()??""}stateMachineGetActiveId(){return this._dotLottieCore?.state_machine_id()??""}stateMachineOverrideState(t,e=!1){return this._dotLottieCore?.sm_override_current_state(t,e)??!1}stateMachineSetSeed(t){return this._dotLottieCore?.sm_set_seed(BigInt(Math.trunc(t)))??!1}stateMachineGet(t){return this._dotLottieCore?.get_state_machine(t)??""}stateMachineGetListeners(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_framework_setup();return Array.isArray(t)?t:[]}stateMachineSetBooleanInput(t,e){return this._dotLottieCore?.sm_set_boolean_input(t,e)??!1}stateMachineSetNumericInput(t,e){return this._dotLottieCore?.sm_set_numeric_input(t,e)??!1}stateMachineSetStringInput(t,e){return this._dotLottieCore?.sm_set_string_input(t,e)??!1}stateMachineGetBooleanInput(t){return this._dotLottieCore?.sm_get_boolean_input(t)??void 0}stateMachineGetNumericInput(t){return this._dotLottieCore?.sm_get_numeric_input(t)??void 0}stateMachineGetStringInput(t){return this._dotLottieCore?.sm_get_string_input(t)??void 0}stateMachineGetInputs(){if(!this._dotLottieCore)return[];let t=this._dotLottieCore.sm_get_inputs();return Array.isArray(t)?t:[]}stateMachineFireEvent(t){this._dotLottieCore?.sm_fire(t)}stateMachinePostClickEvent(t,e){this._dotLottieCore?.sm_post_click(t,e)}stateMachinePostPointerUpEvent(t,e){this._dotLottieCore?.sm_post_pointer_up(t,e)}stateMachinePostPointerDownEvent(t,e){this._dotLottieCore?.sm_post_pointer_down(t,e)}stateMachinePostPointerMoveEvent(t,e){this._dotLottieCore?.sm_post_pointer_move(t,e)}stateMachinePostPointerEnterEvent(t,e){this._dotLottieCore?.sm_post_pointer_enter(t,e)}stateMachinePostPointerExitEvent(t,e){this._dotLottieCore?.sm_post_pointer_exit(t,e)}_onClick(t){let e=I(t);e&&this.stateMachinePostClickEvent(e.x,e.y)}_onPointerUp(t){let e=I(t);e&&this.stateMachinePostPointerUpEvent(e.x,e.y)}_onPointerDown(t){let e=I(t);e&&this.stateMachinePostPointerDownEvent(e.x,e.y)}_onPointerMove(t){let e=I(t);e&&this.stateMachinePostPointerMoveEvent(e.x,e.y)}_onPointerEnter(t){let e=I(t);e&&this.stateMachinePostPointerEnterEvent(e.x,e.y)}_onPointerLeave(t){let e=I(t);e&&this.stateMachinePostPointerExitEvent(e.x,e.y)}_setupStateMachineListeners(){if(g&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieCore!==null&&this.isLoaded){let t=this.stateMachineGetListeners();this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave))}}_cleanupStateMachineListeners(){g&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}};var a=new Map,Lt={ready:n=>
5t=>{let e={id:"",method:"onReady",result:{instanceId:n,event:t}};self.postMessage(e)},complete:n=>t=>{let e={id:"",method:"onComplete",result:{instanceId:n,event:t}};self.postMessage(e)},load:n=>t=>{let r={id:"",method:"onLoad",result:{instanceId:n,event:t}};self.postMessage(r)},loadError:n=>t=>{let r={id:"",method:"onLoadError",result:{instanceId:n,event:t}};self.postMessage(r)},renderError:n=>t=>{let r={id:"",method:"onRenderError",result:{instanceId:n,event:t}};self.postMessage(r)},loop:n=>t=>{let r={id:"",method:"onLoop",result:{instanceId:n,event:t}};self.postMessage(r)},play:n=>t=>{let r={id:"",method:"onPlay",result:{instanceId:n,event:t}};self.postMessage(r)},pause:n=>t=>{let r={id:"",method:"onPause",result:{instanceId:n,event:t}};self.postMessage(r)},stop:n=>t=>{let r={id:"",method:"onStop",result:{instanceId:n,event:t}};self.postMessage(r)},frame:n=>t=>{let r={id:"",method:"onFrame",result:{instanceId:n,event:t}};self.postMessage(r)},render:n=>t=>{let r={id:"",method:"onRender",result:{instanceId:n,event:t}};self.postMessage(r)},freeze:n=>t=>{let r={id:"",method:"onFreeze",result:{instanceId:n,event:t}};self.postMessage(r)},unfreeze:n=>t=>{let r={id:"",method:"onUnfreeze",result:{instanceId:n,event:t}};self.postMessage(r)},destroy:n=>t=>{let r={id:"",method:"onDestroy",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStart:n=>t=>{let r={id:"",method:"onStateMachineStart",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStop:n=>t=>{let r={id:"",method:"onStateMachineStop",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineTransition:n=>t=>{let r={id:"",method:"onStateMachineTransition",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStateEntered:n=>t=>{let r={id:"",method:"onStateMachineStateEntered",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStateExit:n=>t=>{let r={id:"",method:"onStateMachineStateExit",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineCustomEvent:n=>t=>{let r={id:"",method:"onStateMachineCustomEvent",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineError:n=>t=>{let r={id:"",method:"onStateMachineError",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineBooleanInputValueChange:n=>t=>{let r={id:"",method:"onStateMachineBooleanInputValueChange",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineNumericInputValueChange:n=>t=>{let r={id:"",method:"onStateMachineNumericInputValueChange",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineStringInputValueChange:n=>t=>{let r={id:"",method:"onStateMachineStringInputValueChange",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineInputFired:n=>t=>{let r={id:"",method:"onStateMachineInputFired",result:{instanceId:n,event:t}};self.postMessage(r)},stateMachineInternalMessage:n=>t=>{let r={id:"",method:"onStateMachineInternalMessage",result:{instanceId:n,event:t}};self.postMessage(r)}},K
vendor: 6,128 bytes, line 5
5={setTransform(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setTransform(n.params.transform)},getTransform(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getTransform()},getDotLottieInstanceState(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return{state:{loopCount:e.loopCount,isLoaded:e.isLoaded,isPaused:e.isPaused,isPlaying:e.isPlaying,isStopped:e.isStopped,isFrozen:e.isFrozen,loop:e.loop,mode:e.mode,speed:e.speed,currentFrame:e.currentFrame,totalFrames:e.totalFrames,duration:e.duration,useFrameInterpolation:e.useFrameInterpolation,renderConfig:e.renderConfig,marker:e.marker,backgroundColor:e.backgroundColor,markers:e.markers(),activeAnimationId:e.activeAnimationId,activeThemeId:e.activeThemeId,autoplay:e.autoplay,segment:e.segment,layout:e.layout,isReady:e.isReady,manifest:e.manifest}}},setLayout(n){let t=n.params.instanceId,e=n.params.layout,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setLayout(e)},stateMachineGetListeners(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetListeners()},stateMachineStart(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineStart()},stateMachineStop(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineStop()},stateMachineLoad(n){let t=n.params.instanceId,e=n.params.stateMachineId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineLoad(e)},stateMachineLoadData(n){let t=n.params.instanceId,e=n.params.stateMachineData,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineLoadData(e)},stateMachinePostClickEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostClickEvent(e,r)},stateMachinePostPointerUpEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerUpEvent(e,r)},stateMachinePostPointerDownEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerDownEvent(e,r)},stateMachinePostPointerMoveEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerMoveEvent(e,r)},stateMachinePostPointerEnterEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerEnterEvent(e,r)},stateMachinePostPointerExitEvent(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachinePostPointerExitEvent(e,r)},stateMachineSetNumericInput:n=>{let t=n.params.instanceId,e=n.params.name,r=n.params.value,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineSetNumericInput(e,r)},stateMachineSetBooleanInput:n=>{let t=n.params.instanceId,e=n.params.name,r=n.params.value,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineSetBooleanInput(e,r)},stateMachineSetConfig:n=>{let t=n.params.instanceId,e=n.params.config,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.stateMachineSetConfig(e)},stateMachineSetStringInput:n=>{let t=n.params.instanceId,e=n.params.name,r=n.params.value,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineSetStringInput(e,r)},stateMachineGetNumericInput:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGetNumericInput(e)},stateMachineGetBooleanInput:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGetBooleanInput(e)},stateMachineGetStringInput:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGetStringInput(e)},stateMachineGetInputs:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetInputs()},stateMachineFireEvent:n=>{let t=n.params.instanceId,e=n.params.name,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineFireEvent(e)},stateMachineGetStatus:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetStatus()},stateMachineGetCurrentState:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetCurrentState()},stateMachineGetActiveId:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.stateMachineGetActiveId()},stateMachineOverrideState:n=>{let t=n.params.instanceId,e=n.params.state,r=n.params.immediate,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);return s.stateMachineOverrideState(e,r)},stateMachineSetSeed:n=>{let t=n.params.instanceId,e=n.params.seed,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineSetSeed(e)},stateMachineGet:n=>{let t=n.params.instanceId,e=n.params.stateMachineId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.stateMachineGet(e)},create:n=>{let t=n.params.instanceId,e=n.params.config,r=n.params.width,s=n.params.height;if(a.has(t))throw new Error(`Instance with id ${t} already exists.`);let i=new 
5S(e);return i.canvas&&(i.canvas.height=s,i.canvas.width=r),a.set(t,i),["complete","frame","load","loadError","renderError","loop","pause","play","stop","destroy","freeze","unfreeze","render","ready","stateMachineStart","stateMachineStop","stateMachineTransition","stateMachineStateEntered","stateMachineStateExit","stateMachineCustomEvent","stateMachineError","stateMachineBooleanInputValueChange","stateMachineNumericInputValueChange","stateMachineStringInputValueChange","stateMachineInputFired","stateMachineInternalMessage"].forEach(d=>{i.addEventListener(d,Lt[d](t))}),{instanceId:t}},destroy:n=>{let t=n.params.instanceId,e=a.get(t);e&&(e.destroy(),a.delete(t))},freeze:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.freeze()},load:n=>{let t=n.params.instanceId,e=n.params.config,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.load(e)},loadAnimation:n=>{let t=n.params.instanceId,e=n.params.animationId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.loadAnimation(e)},setTheme:n=>{let t=n.params.instanceId,e=n.params.themeId,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.setTheme(e)},setThemeData:n=>{let t=n.params.instanceId,e=n.params.themeData,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);return r.setThemeData(e)},pause:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.pause()},play:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.play()},registerFont:async n=>{let{fontName:t,fontSource:e}=n.params;return S.registerFont(t,e)},resize:n=>{let t=n.params.instanceId,e=n.params.width,r=n.params.height,s=a.get(t);if(!s)throw new Error(`Instance with id ${t} does not exist.`);s.canvas&&(s.canvas.height=r,s.canvas.width=e),s.resize()},setBackgroundColor:n=>{let t=n.params.instanceId,e=n.params.backgroundColor,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setBackgroundColor(e)},setSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.setSlots(n.params.slots)},getSlotIds:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlotIds()},getSlotType:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlotType(n.params.slotId)},getSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlot(n.params.slotId)},getSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.getSlots()},setColorSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setColorSlot(n.params.slotId,n.params.value)},setScalarSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setScalarSlot(n.params.slotId,n.params.value)},setVectorSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setVectorSlot(n.params.slotId,n.params.value)},setGradientSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setGradientSlot(n.params.slotId,n.params.value,n.params.colorStopCount)},setTextSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setTextSlot(n.params.slotId,n.params.value)},setImageSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.setImageSlot(n.params.slotId,n.params.src)},resetSlot:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.resetSlot(n.params.slotId)},clearSlot:n=>{let t=n.params.instanceId,e=a.get(t);
5if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.clearSlot(n.params.slotId)},resetSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.resetSlots()},clearSlots:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);return e.clearSlots()},setFrame:n=>{let t=n.params.instanceId,e=n.params.frame,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setFrame(e)},setMode:n=>{let t=n.params.instanceId,e=n.params.mode,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setMode(e)},setRenderConfig:n=>{let t=n.params.instanceId,e=n.params.renderConfig,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setRenderConfig(e)},setSegment:n=>{let t=n.params.instanceId,e=n.params.segment,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setSegment(e[0],e[1])},resetSegment:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.resetSegment()},setSpeed:n=>{let t=n.params.instanceId,e=n.params.speed,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setSpeed(e)},setUseFrameInterpolation:n=>{let t=n.params.instanceId,e=n.params.useFrameInterpolation,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setUseFrameInterpolation(e)},setWasmUrl:n=>{S.setWasmUrl(n.params.url)},stop:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.stop()},unfreeze:n=>{let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);e.unfreeze()},setViewport(n){let t=n.params.instanceId,e=n.params.x,r=n.params.y,s=n.params.width,i=n.params.height,_=a.get(t);if(!_)throw new Error(`Instance with id ${t} does not exist.`);return _.setViewport(e,r,s,i)},animationSize(n){let t=n.params.instanceId,e=a.get(t);if(!e)throw new Error(`Instance with id ${t} does not exist.`);let{height:r,width:s}=e.animationSize();return{height:r,width:s}},setMarker(n){let t=n.params.instanceId,e=n.params.marker,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setMarker(e)},setLoop(n){let t=n.params.instanceId,e=n.params.loop,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setLoop(e)},setLoopCount(n){let t=n.params.instanceId,e=n.params.loopCount,r=a.get(t);if(!r)throw new Error(`Instance with id ${t} does not exist.`);r.setLoopCount(e)}};function It(n){let t=n.method;if(Object.hasOwn(K,t)&&typeof K[t]=="function")return K[t](n);throw new Error(`Method ${String(t)} is not implemented in commands.`)}self.onmessage=async n=>{try{let t=await It(n.data),e={id:n.data.id,method:n.data.method,result:t};self.postMessage(e)}catch(t){let e={id:n.data.id,method:n.data.method,error:t.message};self.postMessage(e)}};var St="",qt=St;})();\n'],{type:"application/javascript"}),e=URL.createObjectURL(t),n=new Worker(e);return URL.revokeObjectURL(e),n}},K=class{constructor(){s(this,"_workers",new Map),s(this,"_animationWorkerMap",new Map),s(this,"_eventHandlers",new Map),s(this,"_rpcHandlers",new Map),s(this,"_routeMessage",t=>{let e=t.data;if(e.id){let n=this._rpcHandlers.get(e.id);n&&n(t);return}let n=e.result?.instanceId;if(n){let e=this._eventHandlers.get(n);e&&e(t)}
5})}getWorker(t){let e=this._workers.get(t);return e||((e=new J).addEventListener("message",this._routeMessage),this._workers.set(t,e)),e}assignAnimationToWorker(t,e){this._animationWorkerMap.set(t,e)}unassignAnimationFromWorker(t){this._animationWorkerMap.delete(t)}sendMessage(t,e,n){this.getWorker(t).postMessage(e,n||[])}broadcastMessage(t,e){this._workers.forEach(n=>{n.postMessage(t,e||[])})}terminateWorker(t){let e=this._workers.get(t);e&&(e.removeEventListener("message",this._routeMessage),e.terminate(),this._workers.delete(t))}registerEventHandler(t,e){this._eventHandlers.set(t,e)}unregisterEventHandler(t){this._eventHandlers.delete(t)}registerRpcReplyHandler(t,e){this._rpcHandlers.set(t,e)}unregisterRpcReplyHandler(t){this._rpcHandlers.delete(t)}};function X(t,e){if("u">typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement){let{height:n,width:r}=t.getBoundingClientRect();if(0!==n&&0!==r)return{width:r*e,height:n*e}}return{width:t.width,height:t.height}}function Y(){return Date.now().toString(36)+Math.random().toString(36).substr(2,9)}let Q=null;function Z(){return Q??(Q=new K),Q}let tt="",te=new Map;var tn=class{constructor(t){if(s(this,"_eventManager",new F),s(this,"_id",void 0),s(this,"_workerId",void 0),s(this,"_worker",void 0),s(this,"_canvas",void 0),s(this,"_dotLottieInstanceState",{loopCount:0,markers:[],autoplay:!1,backgroundColor:"",currentFrame:0,duration:0,loop:!1,mode:"forward",segment:[0,0],speed:1,totalFrames:0,isLoaded:!1,isPlaying:!1,isPaused:!1,isStopped:!0,isFrozen:!1,useFrameInterpolation:!1,renderConfig:{devicePixelRatio:z()},activeAnimationId:"",activeThemeId:"",layout:void 0,marker:"",isReady:!1,manifest:null}),s(this,"_created",!1),s(this,"_retired",!1),s(this,"_boundOnClick",null),s(this,"_boundOnPointerUp",null),s(this,"_boundOnPointerDown",null),s(this,"_boundOnPointerMove",null),s(this,"_boundOnPointerEnter",null),s(this,"_boundOnPointerLeave",null),s(this,"_pendingConfig",null),t.canvas){let e="u">typeof HTMLCanvasElement&&t.canvas instanceof HTMLCanvasElement,n="u">typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas;if(!e&&!n)throw Error("Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas")}this._canvas=t.canvas??null,this._id=`dotlottie-${Y()}`,this._workerId=t.workerId||"defaultWorker",this._worker=Z().getWorker(this._workerId),Z().assignAnimationToWorker(this._id,this._workerId),tt&&this._sendMessage("setWasmUrl",{url:tt});let e={...t,renderConfig:{...t.renderConfig,devicePixelRatio:t.renderConfig?.devicePixelRatio||z(),freezeOnOffscreen:t.renderConfig?.freezeOnOffscreen??!0}};this._pendingConfig=e,this._canvas&&(this._create(e),this._pendingConfig=null),Z().registerEventHandler(this._id,this._handleWorkerEvent.bind(this))}async _handleWorkerEvent(t){let e=t.data;if(!e.id&&("onLoad"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event),_&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&(A.observe(this._canvas,this),$(this._canvas)||await this.freeze()),this._dotLottieInstanceState.renderConfig.autoResize&&D.observe(this._canvas,this))),"onComplete"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onDestroy"===e.method&&e.result.instanceId===this._id&&this._eventManager.dispatch(e.result.event),"onUnfreeze"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._dotLottieInstanceState.isFrozen=!1,this._eventManager.dispatch(e.result.event)),"onFrame"===e.method&&e.result.instanceId===this._id&&(this._dotLottieInstanceState.currentFrame=e.result.event.currentFrame,this._eventManager.dispatch(e.result.event)),"onRender"===e.method&&e.result.instanceId===this._id&&this._eventManager.dispatch(e.result.event),"onFreeze"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onPause"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onPlay"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStop"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onLoadError"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onRenderError"===e.method&&e.result.instanceId===this._id&&this._eventManager.dispatch(e.result.event),"onReady"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onLoop"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStart"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._setupStateMachineListeners(),this._eventManager.dispatch(e.result.event)),"onStateMachineStop"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._cleanupStateMachineListeners(),this._eventManager.dispatch(e.result.event)),"onStateMachineTransition"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStateEntered"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStateExit"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineCustomEvent"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineError"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineBooleanInputValueChange"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineNumericInputValueChange"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineStringInputValueChange"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineInputFired"===e.method&&e.result.instanceId===this._id&&(await this._updateDotLottieInstanceState(),this._eventManager.dispatch(e.result.event)),"onStateMachineInternalMessage"===e.method&&e.result.instanceId===this._id)){await this._updateDotLottieInstanceState();let t=e.result.event;t.message.startsWith("OpenUrl: ")&&N(t.message)}}async _create(t){let e;if(!this._canvas)return;if(this._canvas instanceof HTMLCanvasElement){let n=te.get(this._canvas);if(n&&n.workerId===this._workerId){await this._adopt(n,t);return}e=this._canvas.transferControlToOffscreen(),te.set(this._canvas,{destroyTimer:null,facade:this,instanceId:this._id,workerId:this._workerId})}else e=this._canvas;let{instanceId:n}=await this._sendMessage("create",{instanceId:this._id,config:{...t,canvas:e},...X(this._canvas,t.renderConfig?.devicePixelRatio||z())},[e]);if(n!==this._id)throw Error("Instance ID mismatch");this._retired||(this._created=!0,await this._updateDotLottieInstanceState())}async _adopt(t,e){null===t.destroyTimer?t.facade._retire():(clearTimeout(t.destroyTimer),t.destroyTimer=null),Z().unassignAnimationFromWorker(this._id),this._id=t.instanceId,Z().assignAnimationToWorker(this._id,this._workerId),t.facade=this,this._created=!0;let{canvas:n,...r}=e;await this._sendMessage("load",{config:r,instanceId:this._id}),await this._updateDotLottieInstanceState()}_retire(){this._retired=!0,this._created&&(this._created=!1,this._cleanupStateMachineListeners(),this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),_&&this._canvas instanceof HTMLCanvasElement&&(A.unobserve(this._canvas),D.unobserve(this._canvas)))}get loopCount(){return this._dotLottieInstanceState.loopCount}get isLoaded(){return this._dotLottieInstanceState.isLoaded}get isPlaying(){return this._dotLottieInstanceState.isPlaying}
5get isPaused(){return this._dotLottieInstanceState.isPaused}get isStopped(){return this._dotLottieInstanceState.isStopped}get currentFrame(){return this._dotLottieInstanceState.currentFrame}get isFrozen(){return this._dotLottieInstanceState.isFrozen}get totalFrames(){return this._dotLottieInstanceState.totalFrames}get segment(){return this._dotLottieInstanceState.segment}get speed(){return this._dotLottieInstanceState.speed}get duration(){return this._dotLottieInstanceState.duration}get isReady(){return this._dotLottieInstanceState.isReady}get mode(){return this._dotLottieInstanceState.mode}get canvas(){return this._canvas}async setCanvas(t){let e="u">typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement,n="u">typeof OffscreenCanvas&&t instanceof OffscreenCanvas;if(!e&&!n)throw Error("Worker-based DotLottie requires HTMLCanvasElement or OffscreenCanvas");if(this._canvas!==t){if(this._created&&null!==this._canvas)throw Error("Cannot change canvas after worker instance is already created with a different canvas.");this._canvas=t,!this._created&&this._pendingConfig&&(await this._create(this._pendingConfig),this._pendingConfig=null)}}get autoplay(){return this._dotLottieInstanceState.autoplay}get backgroundColor(){return this._dotLottieInstanceState.backgroundColor}get loop(){return this._dotLottieInstanceState.loop}get useFrameInterpolation(){return this._dotLottieInstanceState.useFrameInterpolation}get renderConfig(){return this._dotLottieInstanceState.renderConfig}get manifest(){return this._dotLottieInstanceState.manifest}get activeAnimationId(){return this._dotLottieInstanceState.activeAnimationId}get marker(){return this._dotLottieInstanceState.marker}get activeThemeId(){return this._dotLottieInstanceState.activeThemeId}get layout(){return this._dotLottieInstanceState.layout}async play(){this._created&&(await this._sendMessage("play",{instanceId:this._id}),await this._updateDotLottieInstanceState(),_&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&!$(this._canvas)&&await this.freeze())}async pause(){this._created&&(await this._sendMessage("pause",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async stop(){this._created&&(await this._sendMessage("stop",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setSpeed(t){this._created&&(await this._sendMessage("setSpeed",{instanceId:this._id,speed:t}),await this._updateDotLottieInstanceState())}async setMode(t){this._created&&(await this._sendMessage("setMode",{instanceId:this._id,mode:t}),await this._updateDotLottieInstanceState())}async setFrame(t){this._created&&(await this._sendMessage("setFrame",{frame:t,instanceId:this._id}),await this._updateDotLottieInstanceState())}async setSegment(t,e){this._created&&(await this._sendMessage("setSegment",{instanceId:this._id,segment:[t,e]}),await this._updateDotLottieInstanceState())}async resetSegment(){this._created&&(await this._sendMessage("resetSegment",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setRenderConfig(t){if(!this._created)return;let{devicePixelRatio:e,freezeOnOffscreen:n,quality:r,...s}=t;await this._sendMessage("setRenderConfig",{instanceId:this._id,renderConfig:{...this._dotLottieInstanceState.renderConfig,...s,devicePixelRatio:e||z(),freezeOnOffscreen:n??!0,...void 0!==r&&{quality:r}}}),await this._updateDotLottieInstanceState(),_&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.autoResize?D.observe(this._canvas,this):D.unobserve(this._canvas),this._dotLottieInstanceState.renderConfig.freezeOnOffscreen?(A.observe(this._canvas,this),$(this._canvas)||await this.freeze()):(A.unobserve(this._canvas),this._dotLottieInstanceState.isFrozen&&await this.unfreeze()))}async setUseFrameInterpolation(t){this._created&&(await this._sendMessage("setUseFrameInterpolation",{instanceId:this._id,useFrameInterpolation:t}),await this._updateDotLottieInstanceState())}async setTheme(t){if(!this._created)return!1;let e=await this._sendMessage("setTheme",{instanceId:this._id,themeId:t});return await this._updateDotLottieInstanceState(),e}
5async load(t){if(!this._created){this._pendingConfig&&(this._pendingConfig={...this._pendingConfig,...t});return}await this._sendMessage("load",{config:t,instanceId:this._id}),await this._updateDotLottieInstanceState()}async setLoop(t){this._created&&(await this._sendMessage("setLoop",{instanceId:this._id,loop:t}),await this._updateDotLottieInstanceState())}async setLoopCount(t){this._created&&(await this._sendMessage("setLoopCount",{instanceId:this._id,loopCount:t}),await this._updateDotLottieInstanceState())}async resize(){if(!this._created||!this._canvas)return;let{height:t,width:e}=X(this._canvas,this._dotLottieInstanceState.renderConfig.devicePixelRatio||z());await this._sendMessage("resize",{height:t,instanceId:this._id,width:e}),await this._updateDotLottieInstanceState()}async destroy(){if(!this._created)return;let t=this._canvas,e=t instanceof HTMLCanvasElement?te.get(t):void 0;this._retire(),e&&e.facade===this?e.destroyTimer=setTimeout(()=>{te.delete(t),this._finalizeDestroy()},0):await this._finalizeDestroy()}async _finalizeDestroy(){Z().unregisterEventHandler(this._id),Z().unassignAnimationFromWorker(this._id),await this._sendMessage("destroy",{instanceId:this._id})}async freeze(){this._created&&(await this._sendMessage("freeze",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async unfreeze(){this._created&&(await this._sendMessage("unfreeze",{instanceId:this._id}),await this._updateDotLottieInstanceState())}async setBackgroundColor(t){this._created&&(await this._sendMessage("setBackgroundColor",{instanceId:this._id,backgroundColor:t}),await this._updateDotLottieInstanceState())}async loadAnimation(t){this._created&&(await this._sendMessage("loadAnimation",{animationId:t,instanceId:this._id}),await this._updateDotLottieInstanceState())}async setLayout(t){this._created&&(await this._sendMessage("setLayout",{instanceId:this._id,layout:t}),await this._updateDotLottieInstanceState())}async setSlots(t){this._created&&await this._sendMessage("setSlots",{instanceId:this._id,slots:t})}async getSlotIds(){return this._created?this._sendMessage("getSlotIds",{instanceId:this._id}):[]}async getSlotType(t){if(this._created)return this._sendMessage("getSlotType",{instanceId:this._id,slotId:t})}async getSlot(t){if(this._created)return this._sendMessage("getSlot",{instanceId:this._id,slotId:t})}async getSlots(){return this._created?this._sendMessage("getSlots",{instanceId:this._id}):{}}async setColorSlot(t,e){return!!this._created&&this._sendMessage("setColorSlot",{instanceId:this._id,slotId:t,value:e})}async setScalarSlot(t,e){return!!this._created&&this._sendMessage("setScalarSlot",{instanceId:this._id,slotId:t,value:e})}async setVectorSlot(t,e){return!!this._created&&this._sendMessage("setVectorSlot",{instanceId:this._id,slotId:t,value:e})}async setGradientSlot(t,e,n){return!!this._created&&this._sendMessage("setGradientSlot",{instanceId:this._id,slotId:t,value:e,colorStopCount:n})}async setTextSlot(t,e){return!!this._created&&this._sendMessage("setTextSlot",{instanceId:this._id,slotId:t,value:e})}async setImageSlot(t,e){if(!this._created)return!1;let n=await B(e);return this._sendMessage("setImageSlot",{instanceId:this._id,slotId:t,src:n})}async resetSlot(t){return!!this._created&&this._sendMessage("resetSlot",{instanceId:this._id,slotId:t})}async clearSlot(t){return!!this._created&&this._sendMessage("clearSlot",{instanceId:this._id,slotId:t})}async resetSlots(){return!!this._created&&this._sendMessage("resetSlots",{instanceId:this._id})}async clearSlots(){return!!this._created&&this._sendMessage("clearSlots",{instanceId:this._id})}async _updateDotLottieInstanceState(){if(!this._created)return;let t=await this._sendMessage("getDotLottieInstanceState",{instanceId:this._id});this._dotLottieInstanceState=t.state}markers(){return this._dotLottieInstanceState.markers}async setMarker(t){this._created&&(await this._sendMessage("setMarker",{instanceId:this._id,marker:t}),await this._updateDotLottieInstanceState())}async setThemeData(t){if(!this._created)return!1;let e=await this._sendMessage("setThemeData",{instanceId:this._id,themeData:t});return await this._updateDotLottieInstanceState(),e}async setViewport(t,e,n,r){return!!this._created&&this._sendMessage("setViewport",{x:t,y:e,width:n,height:r,instanceId:this._id})}async animationSize(){return this._created?this._sendMessage("animationSize",{instanceId:this._id}):{height:0,width:0}}async setTransform(t){return!!this._created&&this._sendMessage("setTransform",{instanceId:this._id,transform:t})}async getTransform(){if(this._created)return this._sendMessage("getTransform",{instanceId:this._id})}async _sendMessage(t,e,n){let r={id:`dotlottie-request-${Y()}`,method:t,params:e};return new Promise((e,s)=>
5{Z().registerRpcReplyHandler(r.id,n=>{Z().unregisterRpcReplyHandler(r.id);let i=n.data;i.error?s(Error(`Failed to execute method ${t}: ${i.error}`)):e(i.result)}),this._worker.postMessage(r,n||[])})}addEventListener(t,e){this._eventManager.addEventListener(t,e)}removeEventListener(t,e){this._eventManager.removeEventListener(t,e)}static setWasmUrl(t){tt=t}static async registerFont(t,e){try{let n=Y();return Z().broadcastMessage({id:n,method:"registerFont",params:{fontName:t,fontSource:e}}),!0}catch(e){return console.error(`Error broadcasting registerFont for "${t}":`,e),!1}}async stateMachineLoad(t){if(!this._created)return!1;let e=await this._sendMessage("stateMachineLoad",{instanceId:this._id,stateMachineId:t});return await this._updateDotLottieInstanceState(),e}async stateMachineLoadData(t){if(!this._created)return!1;let e=await this._sendMessage("stateMachineLoadData",{instanceId:this._id,stateMachineData:t});return await this._updateDotLottieInstanceState(),e}async stateMachineStart(){if(!this._created)return!1;let t=await this._sendMessage("stateMachineStart",{instanceId:this._id});return t&&(this._setupStateMachineListeners(),await this._updateDotLottieInstanceState()),t}async stateMachineStop(){return!!this._created&&(this._cleanupStateMachineListeners(),this._sendMessage("stateMachineStop",{instanceId:this._id}))}async stateMachineSetNumericInput(t,e){return!!this._created&&this._sendMessage("stateMachineSetNumericInput",{instanceId:this._id,name:t,value:e})}async stateMachineSetBooleanInput(t,e){return!!this._created&&this._sendMessage("stateMachineSetBooleanInput",{instanceId:this._id,name:t,value:e})}async stateMachineSetConfig(t){this._created&&this._sendMessage("stateMachineSetConfig",{instanceId:this._id,config:t})}async stateMachineSetStringInput(t,e){return!!this._created&&this._sendMessage("stateMachineSetStringInput",{instanceId:this._id,name:t,value:e})}async stateMachineGetNumericInput(t){if(this._created)return this._sendMessage("stateMachineGetNumericInput",{instanceId:this._id,name:t})}async stateMachineGetBooleanInput(t){if(this._created)return this._sendMessage("stateMachineGetBooleanInput",{instanceId:this._id,name:t})}async stateMachineGetStringInput(t){if(this._created)return this._sendMessage("stateMachineGetStringInput",{instanceId:this._id,name:t})}async stateMachineGetInputs(){if(this._created)return this._sendMessage("stateMachineGetInputs",{instanceId:this._id})}async stateMachineFireEvent(t){this._created&&this._sendMessage("stateMachineFireEvent",{instanceId:this._id,name:t})}async stateMachineGetStatus(){return this._created?this._sendMessage("stateMachineGetStatus",{instanceId:this._id}):""}async stateMachineGetCurrentState(){return this._created?this._sendMessage("stateMachineGetCurrentState",{instanceId:this._id}):""}async stateMachineGetActiveId(){return this._created?this._sendMessage("stateMachineGetActiveId",{instanceId:this._id}):""}async stateMachineOverrideState(t,e=!1){return!!this._created&&this._sendMessage("stateMachineOverrideState",{instanceId:this._id,state:t,immediate:e})}async stateMachineSetSeed(t){return!!this._created&&this._sendMessage("stateMachineSetSeed",{instanceId:this._id,seed:t})}async stateMachineGet(t){return this._created?this._sendMessage("stateMachineGet",{instanceId:this._id,stateMachineId:t}):""}async stateMachineGetListeners(){return this._created?this._sendMessage("stateMachineGetListeners",{instanceId:this._id}):[]}async stateMachinePostClickEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostClickEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerUpEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerUpEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerDownEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerDownEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerMoveEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerMoveEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerEnterEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerEnterEvent",{instanceId:this._id,x:t,y:e})}async stateMachinePostPointerExitEvent(t,e){if(this._created)return this._sendMessage("stateMachinePostPointerExitEvent",{instanceId:this._id,x:t,y:e})}_onClick(t){let e=U(t);e&&this._sendMessage("stateMachinePostClickEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerUp(t){let e=U(t);e&&this._sendMessage("stateMachinePostPointerUpEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerDown(t){let e=U(t);e&&this._sendMessage("stateMachinePostPointerDownEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerMove(t){let e=U(t);e&&this._sendMessage("stateMachinePostPointerMoveEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerEnter(t){let e=U(t);e&&this._sendMessage("stateMachinePostPointerEnterEvent",{instanceId:this._id,x:e.x,y:e.y})}_onPointerLeave(t){let e=U(t);e&&this._sendMessage("stateMachinePostPointerExitEvent",{instanceId:this._id,x:e.x,y:e.y})}async _setupStateMachineListeners(){if(_&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded){let t=await this._sendMessage("stateMachineGetListeners",{instanceId:this._id});0!==t.length&&(this._cleanupStateMachineListeners(),t.includes("Click")&&(this._boundOnClick=this._onClick.bind(this),this._canvas.addEventListener("click",this._boundOnClick)),t.includes("PointerUp")&&(this._boundOnPointerUp=this._onPointerUp.bind(this),this._canvas.addEventListener("pointerup",this._boundOnPointerUp)),t.includes("PointerDown")&&(this._boundOnPointerDown=this._onPointerDown.bind(this),this._canvas.addEventListener("pointerdown",this._boundOnPointerDown)),t.includes("PointerMove")&&(this._boundOnPointerMove=this._onPointerMove.bind(this),this._canvas.addEventListener("pointermove",this._boundOnPointerMove)),t.includes("PointerEnter")&&(this._boundOnPointerEnter=this._onPointerEnter.bind(this),this._canvas.addEventListener("pointerenter",this._boundOnPointerEnter)),t.includes("PointerExit")&&(this._boundOnPointerLeave=this._onPointerLeave.bind(this),this._canvas.addEventListener("pointerleave",this._boundOnPointerLeave)))}}_cleanupStateMachineListeners(){_&&this._canvas instanceof HTMLCanvasElement&&(this._boundOnClick&&(this._canvas.removeEventListener("click",this._boundOnClick),this._boundOnClick=null),this._boundOnPointerUp&&(this._canvas.removeEventListener("pointerup",this._boundOnPointerUp),this._boundOnPointerUp=null),this._boundOnPointerDown&&(this._canvas.removeEventListener("pointerdown",this._boundOnPointerDown),this._boundOnPointerDown=null),this._boundOnPointerMove&&(this._canvas.removeEventListener("pointermove",this._boundOnPointerMove),this._boundOnPointerMove=null),this._boundOnPointerEnter&&(this._canvas.removeEventListener("pointerenter",this._boundOnPointerEnter),this._boundOnPointerEnter=null),this._boundOnPointerLeave&&(this._canvas.removeEventListener("pointerleave",this._boundOnPointerLeave),this._boundOnPointerLeave=null))}},tr=n(758),ts=n(6070);
5let ti=({animationId:t,autoplay:e,backgroundColor:n,className:r,createDotLottie:s,data:i,dotLottieRefCallback:a,layout:o,loop:_,loopCount:d,mode:l,playOnHover:h,renderConfig:c,segment:u,speed:m,src:p,stateMachineConfig:g,stateMachineId:w,style:f,themeData:b,themeId:v,useFrameInterpolation:y,workerId:L,...C})=>{let M=(0,tr.useRef)(null),I=(0,tr.useRef)(null),S=(0,tr.useRef)(a),E=(0,tr.useRef)(null),x={speed:m,mode:l,loop:_,loopCount:d,useFrameInterpolation:y,segment:u,backgroundColor:n,autoplay:e,themeId:v,workerId:L,src:p,data:i,layout:o,renderConfig:c,animationId:t,stateMachineConfig:g,stateMachineId:w},k=(0,tr.useRef)(x);S.current=a,k.current=x;let P=(0,tr.useCallback)(t=>{if(I.current=t,t){let e=E.current;e&&e.canvas===t?(clearTimeout(e.timer),E.current=null,M.current=e.instance):M.current?.canvas!==t&&(M.current=s({...k.current,canvas:t}))}else if(M.current){let t=M.current,e=t.canvas;M.current=null,e instanceof HTMLCanvasElement?E.current={canvas:e,instance:t,timer:setTimeout(()=>{E.current?.instance===t&&(E.current=null),t.destroy()},0)}:t.destroy()}S.current?.(M.current)},[]);return(0,tr.useEffect)(()=>{let t=t=>{h&&("mouseenter"===t.type&&M.current?.play(),"mouseleave"===t.type&&M.current?.pause())};return I.current?.addEventListener("mouseenter",t),I.current?.addEventListener("mouseleave",t),()=>{I.current?.removeEventListener("mouseenter",t),I.current?.removeEventListener("mouseleave",t)}},[h]),(0,tr.useEffect)(()=>{M.current?.setSpeed(m??1)},[m]),(0,tr.useEffect)(()=>{M.current?.setMode(l??"forward")},[l]),(0,tr.useEffect)(()=>{M.current?.setLoop(_??!1)},[_]),(0,tr.useEffect)(()=>{M.current?.setLoopCount(d??0)},[d]),(0,tr.useEffect)(()=>{M.current?.setUseFrameInterpolation(y??!0)},[y]),(0,tr.useEffect)(()=>{"number"==typeof u?.[0]&&"number"==typeof u[1]?M.current?.setSegment(u[0],u[1]):M.current?.resetSegment()},[u]),(0,tr.useEffect)(()=>{M.current?.setBackgroundColor(n??"")},[n]),(0,tr.useEffect)(()=>{M.current?.setRenderConfig(c??{})},[JSON.stringify(c)]),(0,tr.useEffect)(()=>{"string"!=typeof i&&"object"!=typeof i||M.current?.load({data:i,...k.current})},[i]),(0,tr.useEffect)(()=>{"string"==typeof p&&M.current?.load({src:p,...k.current})},[p]),(0,tr.useEffect)(()=>{M.current?.setMarker(C.marker??"")},[C.marker]),(0,tr.useEffect)(()=>{M.current?.isLoaded&&M.current.activeAnimationId!==t&&M.current.loadAnimation(t??"")},[t]),(0,tr.useEffect)(()=>{"string"==typeof v&&M.current?.setTheme(v)},[v]),(0,tr.useEffect)(()=>{M.current?.setThemeData(b??"")},[b]),(0,tr.useEffect)(()=>{M.current?.setLayout(o??{})},[o?.fit,o?.align?.[0],o?.align?.[1]]),(0,tr.useEffect)(()=>{M.current?.isLoaded&&("string"==typeof w&&w?M.current.stateMachineLoad(w)&&M.current.stateMachineStart():M.current.stateMachineStop())},[w]),(0,tr.useEffect)(()=>{M.current?.stateMachineSetConfig(g??null)},[g]),(0,ts.jsx)("div",{className:r,...!r&&{style:{width:"100%",height:"100%",lineHeight:0,...f}},children:(0,ts.jsx)("canvas",{ref:P,style:{width:"100%",height:"100%"},...C})})},ta=t=>new j(t),to=t=>(0,ts.jsx)(ti,{...t,createDotLottie:ta}),t_=t=>new tn(t),td=t=>(0,ts.jsx)(ti,{...t,createDotLottie:t_}),tl=t=>{tn.setWasmUrl(t),j.setWasmUrl(t)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.