@curiouslearning/gdl-player-core 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Image-C1iSgNcV.js → Image-D8mWyc98.js} +2 -1
- package/dist/Image-DBMEc_qA.cjs +1 -0
- package/dist/{dolottie-NQiBiHTe.js → dolottie-BJIvntzd.js} +2 -1
- package/dist/{dolottie-C2YAu2UJ.cjs → dolottie-C7QXtKyz.cjs} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +3 -2
- package/dist/{utils-CYohLPB4.js → utils-B8vKMuMn.js} +1 -0
- package/dist/utils-Cu46IIpo.cjs +1 -0
- package/package.json +1 -1
- package/dist/Image-CJI9T-SB.cjs +0 -1
- package/dist/utils-DkVRHjf3.cjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("./utils-Cu46IIpo.cjs");let t=require("react/jsx-runtime");var n=({mediaItem:n})=>(0,t.jsx)(`img`,{src:e.n(e.a(),n),alt:``,loading:`lazy`,className:`max-w-full max-h-full w-full h-full -z-10`});exports.Image=n,exports.default=n;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as e, n as t } from "./utils-B8vKMuMn.js";
|
|
2
3
|
import n, { useCallback as r, useEffect as i, useRef as a } from "react";
|
|
3
4
|
import { Fragment as o, jsx as s } from "react/jsx-runtime";
|
|
4
5
|
//#region node_modules/@lottiefiles/dotlottie-web/dist/index.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./utils-DkVRHjf3.cjs");let t=require("react");t=e.o(t,1);let n=require("react/jsx-runtime");function r(e){"@babel/helpers - typeof";return r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},r(e)}function i(e,t){if(r(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||`default`);if(r(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function a(e){var t=i(e,`string`);return r(t)==`symbol`?t:t+``}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},c=class{constructor(){o(this,`_lastHandleId`,0),o(this,`_lastImmediate`,null)}requestAnimationFrame(e){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(performance.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},l=class{constructor(){o(this,`_strategy`,void 0),this._strategy=typeof requestAnimationFrame==`function`?new s:new c}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}},u=typeof window<`u`&&window.document!==void 0,d=new Uint8Array([80,75,3,4]),f=[`v`,`ip`,`op`,`layers`,`fr`,`w`,`h`],p=`0.74.0`,m=`@lottiefiles/dotlottie-web`,h,g=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&g.decode();var _=null;function v(){return(_===null||_.byteLength===0)&&(_=new Uint8Array(h.memory.buffer)),_}function y(e,t){return e>>>=0,g.decode(v().subarray(e,e+t))}function b(e){let t=h.__externref_table_alloc_command_export();return h.__wbindgen_export_3.set(t,e),t}function x(e,t){try{return e.apply(this,t)}catch(e){let t=b(e);h.__wbindgen_exn_store_command_export(t)}}var S=0,C=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},w=typeof C.encodeInto==`function`?function(e,t){return C.encodeInto(e,t)}:function(e,t){let n=C.encode(e);return t.set(n),{read:e.length,written:n.length}};function T(e,t,n){if(n===void 0){let n=C.encode(e),r=t(n.length,1)>>>0;return v().subarray(r,r+n.length).set(n),S=n.length,r}let r=e.length,i=t(r,1)>>>0,a=v(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=v().subarray(i+o,i+r),a=w(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return S=o,i}var E=null;function D(){return(E===null||E.buffer.detached===!0||E.buffer.detached===void 0&&E.buffer!==h.memory.buffer)&&(E=new DataView(h.memory.buffer)),E}function O(e){return e==null}var k=null;function A(){return(k===null||k.byteLength===0)&&(k=new Float32Array(h.memory.buffer)),k}function ee(e,t){let n=t(e.length*4,4)>>>0;return A().set(e,n/4),S=e.length,n}function j(e,t){let n=t(e.length*1,1)>>>0;return v().set(e,n/1),S=e.length,n}function te(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=b(e[t]);D().setUint32(n+4*t,r,!0)}return S=e.length,n}function ne(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=j(t,h.__wbindgen_malloc_command_export),a=S;return h.register_font(n,r,i,a)!==0}var M=Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>h.__wbg_dotlottieplayerwasm_free(e>>>0,1)),P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();h.__wbg_dotlottieplayerwasm_free(e,0)}clear_slot(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}is_playing(){return h.dotlottieplayerwasm_is_playing(this.__wbg_ptr)!==0}is_stopped(){return h.dotlottieplayerwasm_is_stopped(this.__wbg_ptr)!==0}layout_fit(){let e,t;try{let n=h.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}loop_count(){return h.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return h.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}set_layout(e,t,n){let r=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;return h.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}set_marker(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;h.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_slots(){return h.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return h.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}is_tweening(){return h.dotlottieplayerwasm_is_tweening(this.__wbg_ptr)!==0}reset_slots(){return h.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return h.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return h.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(e){return h.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}set_segment(e,t){return h.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}static unload_font(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_unload_font(t,n)!==0}animation_id(){let e=h.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}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(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}marker_names(){return h.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(e){h.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}set_slot_str(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=T(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}set_viewport(e,t,n,r){return h.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}total_frames(){return h.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return h.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return h.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=h.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}get_transform(){return h.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return h.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_text_slot(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=T(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_transform(e){let t=ee(e,h.__wbindgen_malloc_command_export),n=S;return h.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}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(e,t){h.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}animation_size(){return h.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let e=h.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}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(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_load_animation(this.__wbg_ptr,t,n)!==0}loop_animation(){return h.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(e,t,n,r){return h.dotlottieplayerwasm_set_background(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_loop_count(e){h.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}set_theme_data(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}sm_reset_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;h.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}manifest_string(){let e,t;try{let n=h.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}set_scalar_slot(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_vector_slot(e,t,n){let r=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;return h.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}setup_sw_target(e,t){return h.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,e,t)!==0}get_pixel_buffer(){return h.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}set_audio_volume(e){h.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,e)}sm_current_state(){let e,t;try{let n=h.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}state_machine_id(){let e=h.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}get_state_machine(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}set_position_slot(e,t,n){let r=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;return h.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}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(e,t){h.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}state_machine_load(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}load_dotlottie_data(e){let t=j(e,h.__wbindgen_malloc_command_export),n=S;return h.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,t,n)!==0}sm_get_string_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_string_input(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=T(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_boolean_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_get_numeric_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_post_pointer_down(e,t){h.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){h.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){h.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_set_boolean_input(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_set_numeric_input(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}state_machine_unload(){h.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(e,t){h.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}load_animation_from_id(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,t,n)!==0}sm_poll_internal_event(){return h.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return h.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){h.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}state_machine_load_from_id(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}set_use_frame_interpolation(e){h.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}constructor(){let e=h.dotlottieplayerwasm_new();return this.__wbg_ptr=e>>>0,N.register(this,this.__wbg_ptr,this),this}mode(){return h.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return h.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return h.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(e){return h.dotlottieplayerwasm_tick(this.__wbg_ptr,e)!==0}pause(){return h.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}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 h.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}markers(){return h.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_stop(){return h.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(e){return h.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,e)!==0}autoplay(){return h.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return h.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(e){h.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}set_mode(e){h.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}sm_start(e,t){let n=te(t,h.__wbindgen_malloc_command_export),r=S;return h.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}theme_id(){let e=h.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}is_loaded(){return h.dotlottieplayerwasm_is_loaded(this.__wbg_ptr)!==0}is_paused(){return h.dotlottieplayerwasm_is_paused(this.__wbg_ptr)!==0}load_font(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=j(t,h.__wbindgen_malloc_command_export),a=S;return h.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}set_frame(e){return h.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}set_speed(e){h.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}set_theme(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}sm_status(){let e,t;try{let n=h.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}};async function re(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.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",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function ie(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,r;try{n=e,r=t,console.error(y(e,t))}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_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},e.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(e){return new Float32Array(e>>>0)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return x(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){let n=t.stack,r=T(n,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;D().setInt32(e+4,i,!0),D().setInt32(e+0,r,!0)},e.wbg.__wbindgen_init_externref_table=function(){let e=h.__wbindgen_export_3,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e.wbg.__wbindgen_memory=function(){return h.memory},e.wbg.__wbindgen_number_new=function(e){return e},e.wbg.__wbindgen_string_get=function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=O(r)?0:T(r,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;D().setInt32(e+4,a,!0),D().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return y(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(y(e,t))},e}function ae(e,t){return h=e.exports,F.__wbindgen_wasm_module=t,E=null,k=null,_=null,h.__wbindgen_start(),h}async function F(e){if(h!==void 0)return h;if(e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0)throw Error(`WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().`);let t=ie();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await re(await e,t);return ae(n,r)}var I=class{constructor(){o(this,`_eventListeners`,new Map)}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){let n=this._eventListeners.get(e);n&&(t?(n.delete(t),n.size===0&&this._eventListeners.delete(e)):this._eventListeners.delete(e))}dispatch(e){this._eventListeners.get(e.type)?.forEach(t=>t(e))}removeAllEventListeners(){this._eventListeners.clear()}},L=class e{static _initializeObserver(){e._observer||=new IntersectionObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);n&&(t.isIntersecting?n.unfreeze():n.freeze())})},{threshold:0})}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,n),e._observer?.observe(t))}static unobserve(t){e._observer?.unobserve(t),e._observedCanvases.delete(t),e._observedCanvases.size===0&&(e._observer?.disconnect(),e._observer=null)}};o(L,`_observer`,null),o(L,`_observedCanvases`,new Map);var R=class e{static _initializeObserver(){e._observer||=new ResizeObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);if(!n)return;let[r,i]=n;clearTimeout(i);let a=setTimeout(()=>{r.resize()},100);e._observedCanvases.set(t.target,[r,a])})})}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,[n,0]),e._observer?.observe(t))}static unobserve(t){let n=e._observedCanvases.get(t);if(n){let e=n[1];e&&clearTimeout(e)}e._observer?.unobserve(t),e._observedCanvases.delete(t),!e._observedCanvases.size&&e._observer&&(e._observer.disconnect(),e._observer=null)}};o(R,`_observer`,null),o(R,`_observedCanvases`,new Map);function z(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function oe(e){if(!z(e))return[0,0,0,0];let t=e.replace(`#`,``);return t=t.length===6?`${t}ff`:t,[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255,parseInt(t.slice(6,8),16)/255]}function B(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e.slice(0,d.byteLength));for(let e=0;e<d.length;e+=1)if(d[e]!==t[e])return!1;return!0}function V(e){return f.every(t=>Object.hasOwn(e,t))}function H(e){if(typeof e==`string`)try{return V(JSON.parse(e))}catch{return!1}else return V(e)}function U(){return 1+((u?window.devicePixelRatio:1)-1)*.75}function W(e){let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(t.bottom<0||t.top>n||t.right<0||t.left>r)}function G(e){let t=e.target;if(t instanceof HTMLCanvasElement){let n=t.getBoundingClientRect();if(n.width===0||n.height===0||t.width===0||t.height===0)return null;let r=t.width/n.width,i=t.height/n.height,a=(e.clientX-n.left)*r,o=(e.clientY-n.top)*i;return!Number.isFinite(a)||!Number.isFinite(o)||Number.isNaN(a)||Number.isNaN(o)?null:{x:a,y:o}}return null}function K(e){let t=e.replace(`OpenUrl: `,``),n=t.indexOf(` | Target: `),r,i;n===-1?(r=t,i=`_blank`):(r=t.substring(0,n),i=t.substring(n+11)),window.open(r,i)}function se(e,t,n){let r=null,i=t;async function a(t){await e({module_or_path:t})}async function o(t){let n=await fetch(t);if(!n.ok)throw Error(`fetch ${t} responded with ${n.status} ${n.statusText}`);await e({module_or_path:await n.arrayBuffer()})}return{load(){if(!r){let e=i,t=n;r=(async()=>{let n,i;try{await a(e);return}catch(r){n=r,console.warn(`Primary WASM load failed from ${e}: ${r.message}`),console.warn(`Attempting to load WASM from backup URL: ${t}`)}try{await a(t);return}catch(e){i=e,console.warn(`Backup WASM load failed from ${t}: ${e.message}`)}console.warn(`Retrying WASM load with buffered instantiation`);try{await o(e);return}catch(t){console.warn(`Buffered WASM load from ${e} failed: ${t.message}`)}try{await o(t);return}catch(e){throw console.error(`Primary WASM URL failed: ${n.message}`),console.error(`Backup WASM URL failed: ${i.message}`),console.error(`Buffered fallback failed: ${e.message}`),r=null,Error(`WASM loading failed from all sources.`)}})()}return r},setWasmUrl(e){e!==i&&(i=e,r=null)}}}var q=se(F,`https://cdn.jsdelivr.net/npm/${m}@${p}/dist/dotlottie-player.wasm`,`https://unpkg.com/${m}@${p}/dist/dotlottie-player.wasm`),J=e=>{switch(e){case`reverse`:return M.Reverse;case`bounce`:return M.Bounce;case`reverse-bounce`:return M.ReverseBounce;default:return M.Forward}},Y=e=>{switch(e){case M.Reverse:return`reverse`;case M.Bounce:return`bounce`;case M.ReverseBounce:return`reverse-bounce`;default:return`forward`}},ce=e=>{switch(e){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`}},le=class{constructor(e){o(this,`_canvas`,null),o(this,`_pendingLoad`,null),o(this,`_context`,null),o(this,`_eventManager`,void 0),o(this,`_animationFrameId`,null),o(this,`_frameManager`,void 0),o(this,`_boundAnimationLoop`,void 0),o(this,`_dotLottieCore`,null),o(this,`_stateMachineId`,``),o(this,`_stateMachineConfig`,null),o(this,`_isStateMachineRunning`,!1),o(this,`_renderConfig`,{}),o(this,`_isFrozen`,!1),o(this,`_backgroundColor`,null),o(this,`_lastFrameTime`,null),o(this,`_boundOnClick`,null),o(this,`_boundOnPointerUp`,null),o(this,`_boundOnPointerDown`,null),o(this,`_boundOnPointerMove`,null),o(this,`_boundOnPointerEnter`,null),o(this,`_boundOnPointerLeave`,null),o(this,`_bufferMismatchCount`,0),o(this,`_lastExpectedBufferSize`,0),o(this,`_cachedImageData`,null),o(this,`_cachedImageDataBuffer`,null),o(this,`_cachedImageDataByteOffset`,0),o(this,`_marker`,``),o(this,`_segment`,null),this._canvas=e.canvas??null,this._eventManager=new I,this._frameManager=new l,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...e.renderConfig,devicePixelRatio:e.renderConfig?.devicePixelRatio||U(),freezeOnOffscreen:e.renderConfig?.freezeOnOffscreen??!0},this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(e.autoplay??!1),this._dotLottieCore.set_loop(e.loop??!1),this._dotLottieCore.set_loop_count(e.loopCount??0),this._dotLottieCore.set_mode(J(e.mode??`forward`)),this._dotLottieCore.set_speed(e.speed??1),this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation??!0),e.segment&&e.segment.length===2&&(this._segment=[e.segment[0],e.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=e.marker??``,this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(e.layout?.fit??`contain`,e.layout?.align?.[0]??.5,e.layout?.align?.[1]??.5),this._stateMachineId=e.stateMachineId??``,this._stateMachineConfig=e.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:`ready`}),e.data?this._canvas?this._loadFromData(e.data):this._pendingLoad={data:e.data}:e.src&&(this._canvas?this._loadFromSrc(e.src):this._pendingLoad={src:e.src}),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(e=>{console.error(`[dotlottie-web] Initialization failed:`,e),this._eventManager.dispatch({type:`loadError`,error:Error(`Failed to load wasm module: ${e}`)})})}async _initWasm(){return q.load()}_createCore(){return new P}_onCoreCreated(){}_setupTarget(e,t){return this._dotLottieCore?this._dotLottieCore.setup_sw_target(e,t):!1}_drainPlayerEvents({skipFrame:e=!1}={}){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.poll_event())!=null;){let n=t;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`:e||queueMicrotask(()=>this._eventManager.dispatch({type:`frame`,currentFrame:n.frameNo??0}));break;case`Render`:e||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`}));break;default:break}}}_drainSmEvents(){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.sm_poll_event())!=null;){let t=e;switch(t.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?.is_playing()||this._stopAnimationLoop()});break;case`CustomEvent`:this._eventManager.dispatch({type:`stateMachineCustomEvent`,eventName:t.message??``});break;case`BooleanInputChange`:this._eventManager.dispatch({type:`stateMachineBooleanInputValueChange`,inputName:t.name??``,newValue:t.newValue,oldValue:t.oldValue});break;case`NumericInputChange`:this._eventManager.dispatch({type:`stateMachineNumericInputValueChange`,inputName:t.name??``,newValue:t.newValue,oldValue:t.oldValue});break;case`StringInputChange`:this._eventManager.dispatch({type:`stateMachineStringInputValueChange`,inputName:t.name??``,newValue:t.newValue,oldValue:t.oldValue});break;case`InputFired`:this._eventManager.dispatch({type:`stateMachineInputFired`,inputName:t.name??``});break;case`Transition`:this._eventManager.dispatch({type:`stateMachineTransition`,fromState:t.previousState??``,toState:t.newState??``});break;case`StateEntered`:this._eventManager.dispatch({type:`stateMachineStateEntered`,state:t.state??``});break;case`StateExit`:this._eventManager.dispatch({type:`stateMachineStateExit`,state:t.state??``});break;case`Error`:this._eventManager.dispatch({type:`stateMachineError`,error:t.message??``});break;default:break}}let t;for(;(t=this._dotLottieCore.sm_poll_internal_event())!=null;){let e=t;if(e.type===`Message`){let t=e.message??``;u&&t.startsWith(`OpenUrl: `)?K(t):this._eventManager.dispatch({type:`stateMachineInternalMessage`,message:t})}}}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:`loadError`,error:Error(e)})}async _fetchData(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${t.status}: ${t.statusText}`);let n=await t.arrayBuffer();return B(n)?n:new TextDecoder().decode(n)}_loadFromData(e){if(this._dotLottieCore===null)return;if(!this._canvas){console.warn(`[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.`);return}let t=this._canvas.width,n=this._canvas.height;this._setupTarget(t,n);let r=!1;if(typeof e==`string`){if(!H(e)){this._dispatchError(`Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(e)}else if(e instanceof ArrayBuffer){if(!B(e)){this._dispatchError(`Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.`);return}r=this._dotLottieCore.load_dotlottie_data(new Uint8Array(e))}else if(typeof e==`object`){if(!H(e)){this._dispatchError(`Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(JSON.stringify(e))}else{this._dispatchError(`Unsupported data type for animation data. Expected:
|
|
1
|
+
"use client";const e=require("./utils-Cu46IIpo.cjs");let t=require("react");t=e.o(t,1);let n=require("react/jsx-runtime");function r(e){"@babel/helpers - typeof";return r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},r(e)}function i(e,t){if(r(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||`default`);if(r(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function a(e){var t=i(e,`string`);return r(t)==`symbol`?t:t+``}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},c=class{constructor(){o(this,`_lastHandleId`,0),o(this,`_lastImmediate`,null)}requestAnimationFrame(e){return this._lastHandleId>=2**53-1&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(performance.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},l=class{constructor(){o(this,`_strategy`,void 0),this._strategy=typeof requestAnimationFrame==`function`?new s:new c}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}},u=typeof window<`u`&&window.document!==void 0,d=new Uint8Array([80,75,3,4]),f=[`v`,`ip`,`op`,`layers`,`fr`,`w`,`h`],p=`0.74.0`,m=`@lottiefiles/dotlottie-web`,h,g=typeof TextDecoder<`u`?new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error(`TextDecoder not available`)}};typeof TextDecoder<`u`&&g.decode();var _=null;function v(){return(_===null||_.byteLength===0)&&(_=new Uint8Array(h.memory.buffer)),_}function y(e,t){return e>>>=0,g.decode(v().subarray(e,e+t))}function b(e){let t=h.__externref_table_alloc_command_export();return h.__wbindgen_export_3.set(t,e),t}function x(e,t){try{return e.apply(this,t)}catch(e){let t=b(e);h.__wbindgen_exn_store_command_export(t)}}var S=0,C=typeof TextEncoder<`u`?new TextEncoder(`utf-8`):{encode:()=>{throw Error(`TextEncoder not available`)}},w=typeof C.encodeInto==`function`?function(e,t){return C.encodeInto(e,t)}:function(e,t){let n=C.encode(e);return t.set(n),{read:e.length,written:n.length}};function T(e,t,n){if(n===void 0){let n=C.encode(e),r=t(n.length,1)>>>0;return v().subarray(r,r+n.length).set(n),S=n.length,r}let r=e.length,i=t(r,1)>>>0,a=v(),o=0;for(;o<r;o++){let t=e.charCodeAt(o);if(t>127)break;a[i+o]=t}if(o!==r){o!==0&&(e=e.slice(o)),i=n(i,r,r=o+e.length*3,1)>>>0;let t=v().subarray(i+o,i+r),a=w(e,t);o+=a.written,i=n(i,r,o,1)>>>0}return S=o,i}var E=null;function D(){return(E===null||E.buffer.detached===!0||E.buffer.detached===void 0&&E.buffer!==h.memory.buffer)&&(E=new DataView(h.memory.buffer)),E}function O(e){return e==null}var k=null;function A(){return(k===null||k.byteLength===0)&&(k=new Float32Array(h.memory.buffer)),k}function ee(e,t){let n=t(e.length*4,4)>>>0;return A().set(e,n/4),S=e.length,n}function j(e,t){let n=t(e.length*1,1)>>>0;return v().set(e,n/1),S=e.length,n}function te(e,t){let n=t(e.length*4,4)>>>0;for(let t=0;t<e.length;t++){let r=b(e[t]);D().setUint32(n+4*t,r,!0)}return S=e.length,n}function ne(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=j(t,h.__wbindgen_malloc_command_export),a=S;return h.register_font(n,r,i,a)!==0}var M=Object.freeze({Forward:0,0:`Forward`,Reverse:1,1:`Reverse`,Bounce:2,2:`Bounce`,ReverseBounce:3,3:`ReverseBounce`}),N=typeof FinalizationRegistry>`u`?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>h.__wbg_dotlottieplayerwasm_free(e>>>0,1)),P=class{__destroy_into_raw(){let e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){let e=this.__destroy_into_raw();h.__wbg_dotlottieplayerwasm_free(e,0)}clear_slot(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_clear_slot(this.__wbg_ptr,t,n)!==0}is_playing(){return h.dotlottieplayerwasm_is_playing(this.__wbg_ptr)!==0}is_stopped(){return h.dotlottieplayerwasm_is_stopped(this.__wbg_ptr)!==0}layout_fit(){let e,t;try{let n=h.dotlottieplayerwasm_layout_fit(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}loop_count(){return h.dotlottieplayerwasm_loop_count(this.__wbg_ptr)>>>0}poll_event(){return h.dotlottieplayerwasm_poll_event(this.__wbg_ptr)}reset_slot(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_reset_slot(this.__wbg_ptr,t,n)!==0}set_layout(e,t,n){let r=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;return h.dotlottieplayerwasm_set_layout(this.__wbg_ptr,r,i,t,n)!==0}set_marker(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;h.dotlottieplayerwasm_set_marker(this.__wbg_ptr,t,n)}clear_slots(){return h.dotlottieplayerwasm_clear_slots(this.__wbg_ptr)!==0}is_complete(){return h.dotlottieplayerwasm_is_complete(this.__wbg_ptr)!==0}is_tweening(){return h.dotlottieplayerwasm_is_tweening(this.__wbg_ptr)!==0}reset_slots(){return h.dotlottieplayerwasm_reset_slots(this.__wbg_ptr)!==0}reset_theme(){return h.dotlottieplayerwasm_reset_theme(this.__wbg_ptr)!==0}segment_end(){return h.dotlottieplayerwasm_segment_end(this.__wbg_ptr)}set_quality(e){return h.dotlottieplayerwasm_set_quality(this.__wbg_ptr,e)!==0}set_segment(e,t){return h.dotlottieplayerwasm_set_segment(this.__wbg_ptr,e,t)!==0}static unload_font(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_unload_font(t,n)!==0}animation_id(){let e=h.dotlottieplayerwasm_animation_id(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}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(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_get_slot_str(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}marker_names(){return h.dotlottieplayerwasm_marker_names(this.__wbg_ptr)}set_autoplay(e){h.dotlottieplayerwasm_set_autoplay(this.__wbg_ptr,e)}set_slot_str(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=T(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_set_slot_str(this.__wbg_ptr,n,r,i,a)!==0}set_viewport(e,t,n,r){return h.dotlottieplayerwasm_set_viewport(this.__wbg_ptr,e,t,n,r)!==0}total_frames(){return h.dotlottieplayerwasm_total_frames(this.__wbg_ptr)}clear_segment(){return h.dotlottieplayerwasm_clear_segment(this.__wbg_ptr)!==0}current_frame(){return h.dotlottieplayerwasm_current_frame(this.__wbg_ptr)}get_slot_type(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_get_slot_type(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}get_slots_str(){let e,t;try{let n=h.dotlottieplayerwasm_get_slots_str(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}get_transform(){return h.dotlottieplayerwasm_get_transform(this.__wbg_ptr)}segment_start(){return h.dotlottieplayerwasm_segment_start(this.__wbg_ptr)}set_slots_str(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_set_slots_str(this.__wbg_ptr,t,n)!==0}set_text_slot(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=T(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_set_text_slot(this.__wbg_ptr,n,r,i,a)!==0}set_transform(e){let t=ee(e,h.__wbindgen_malloc_command_export),n=S;return h.dotlottieplayerwasm_set_transform(this.__wbg_ptr,t,n)!==0}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(e,t){h.dotlottieplayerwasm_sm_post_click(this.__wbg_ptr,e,t)}animation_size(){return h.dotlottieplayerwasm_animation_size(this.__wbg_ptr)}current_marker(){let e=h.dotlottieplayerwasm_current_marker(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}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(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_load_animation(this.__wbg_ptr,t,n)!==0}loop_animation(){return h.dotlottieplayerwasm_loop_animation(this.__wbg_ptr)!==0}set_background(e,t,n,r){return h.dotlottieplayerwasm_set_background(this.__wbg_ptr,e,t,n,r)!==0}set_color_slot(e,t,n,r){let i=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_set_color_slot(this.__wbg_ptr,i,a,t,n,r)!==0}set_loop_count(e){h.dotlottieplayerwasm_set_loop_count(this.__wbg_ptr,e)}set_theme_data(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_set_theme_data(this.__wbg_ptr,t,n)!==0}sm_reset_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;h.dotlottieplayerwasm_sm_reset_input(this.__wbg_ptr,t,n)}manifest_string(){let e,t;try{let n=h.dotlottieplayerwasm_manifest_string(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}set_scalar_slot(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_set_scalar_slot(this.__wbg_ptr,n,r,t)!==0}set_vector_slot(e,t,n){let r=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;return h.dotlottieplayerwasm_set_vector_slot(this.__wbg_ptr,r,i,t,n)!==0}setup_sw_target(e,t){return h.dotlottieplayerwasm_setup_sw_target(this.__wbg_ptr,e,t)!==0}get_pixel_buffer(){return h.dotlottieplayerwasm_get_pixel_buffer(this.__wbg_ptr)}set_audio_volume(e){h.dotlottieplayerwasm_set_audio_volume(this.__wbg_ptr,e)}sm_current_state(){let e,t;try{let n=h.dotlottieplayerwasm_sm_current_state(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}state_machine_id(){let e=h.dotlottieplayerwasm_state_machine_id(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}get_state_machine(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_get_state_machine(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}set_position_slot(e,t,n){let r=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;return h.dotlottieplayerwasm_set_position_slot(this.__wbg_ptr,r,i,t,n)!==0}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(e,t){h.dotlottieplayerwasm_sm_post_pointer_up(this.__wbg_ptr,e,t)}state_machine_load(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_state_machine_load(this.__wbg_ptr,t,n)!==0}load_dotlottie_data(e){let t=j(e,h.__wbindgen_malloc_command_export),n=S;return h.dotlottieplayerwasm_load_dotlottie_data(this.__wbg_ptr,t,n)!==0}sm_get_string_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_sm_get_string_input(this.__wbg_ptr,t,n),i;return r[0]!==0&&(i=y(r[0],r[1]).slice(),h.__wbindgen_free_command_export(r[0],r[1]*1,1)),i}sm_set_string_input(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=T(t,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;return h.dotlottieplayerwasm_sm_set_string_input(this.__wbg_ptr,n,r,i,a)!==0}sm_get_boolean_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_sm_get_boolean_input(this.__wbg_ptr,t,n);return r===16777215?void 0:r!==0}sm_get_numeric_input(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S,r=h.dotlottieplayerwasm_sm_get_numeric_input(this.__wbg_ptr,t,n);return r===4294967297?void 0:r}sm_post_pointer_down(e,t){h.dotlottieplayerwasm_sm_post_pointer_down(this.__wbg_ptr,e,t)}sm_post_pointer_exit(e,t){h.dotlottieplayerwasm_sm_post_pointer_exit(this.__wbg_ptr,e,t)}sm_post_pointer_move(e,t){h.dotlottieplayerwasm_sm_post_pointer_move(this.__wbg_ptr,e,t)}sm_set_boolean_input(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_sm_set_boolean_input(this.__wbg_ptr,n,r,t)!==0}sm_set_numeric_input(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_sm_set_numeric_input(this.__wbg_ptr,n,r,t)!==0}state_machine_unload(){h.dotlottieplayerwasm_state_machine_unload(this.__wbg_ptr)}sm_post_pointer_enter(e,t){h.dotlottieplayerwasm_sm_post_pointer_enter(this.__wbg_ptr,e,t)}load_animation_from_id(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_load_animation_from_id(this.__wbg_ptr,t,n)!==0}sm_poll_internal_event(){return h.dotlottieplayerwasm_sm_poll_internal_event(this.__wbg_ptr)}use_frame_interpolation(){return h.dotlottieplayerwasm_use_frame_interpolation(this.__wbg_ptr)!==0}reset_current_loop_count(){h.dotlottieplayerwasm_reset_current_loop_count(this.__wbg_ptr)}sm_override_current_state(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S;return h.dotlottieplayerwasm_sm_override_current_state(this.__wbg_ptr,n,r,t)!==0}state_machine_load_from_id(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_state_machine_load_from_id(this.__wbg_ptr,t,n)!==0}set_use_frame_interpolation(e){h.dotlottieplayerwasm_set_use_frame_interpolation(this.__wbg_ptr,e)}constructor(){let e=h.dotlottieplayerwasm_new();return this.__wbg_ptr=e>>>0,N.register(this,this.__wbg_ptr,this),this}mode(){return h.dotlottieplayerwasm_mode(this.__wbg_ptr)}play(){return h.dotlottieplayerwasm_play(this.__wbg_ptr)!==0}stop(){return h.dotlottieplayerwasm_stop(this.__wbg_ptr)!==0}tick(e){return h.dotlottieplayerwasm_tick(this.__wbg_ptr,e)!==0}pause(){return h.dotlottieplayerwasm_pause(this.__wbg_ptr)!==0}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 h.dotlottieplayerwasm_render(this.__wbg_ptr)!==0}markers(){return h.dotlottieplayerwasm_markers(this.__wbg_ptr)}sm_fire(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_sm_fire(this.__wbg_ptr,t,n)!==0}sm_stop(){return h.dotlottieplayerwasm_sm_stop(this.__wbg_ptr)!==0}sm_tick(e){return h.dotlottieplayerwasm_sm_tick(this.__wbg_ptr,e)!==0}autoplay(){return h.dotlottieplayerwasm_autoplay(this.__wbg_ptr)!==0}duration(){return h.dotlottieplayerwasm_duration(this.__wbg_ptr)}set_loop(e){h.dotlottieplayerwasm_set_loop(this.__wbg_ptr,e)}set_mode(e){h.dotlottieplayerwasm_set_mode(this.__wbg_ptr,e)}sm_start(e,t){let n=te(t,h.__wbindgen_malloc_command_export),r=S;return h.dotlottieplayerwasm_sm_start(this.__wbg_ptr,e,n,r)!==0}theme_id(){let e=h.dotlottieplayerwasm_theme_id(this.__wbg_ptr),t;return e[0]!==0&&(t=y(e[0],e[1]).slice(),h.__wbindgen_free_command_export(e[0],e[1]*1,1)),t}is_loaded(){return h.dotlottieplayerwasm_is_loaded(this.__wbg_ptr)!==0}is_paused(){return h.dotlottieplayerwasm_is_paused(this.__wbg_ptr)!==0}load_font(e,t){let n=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),r=S,i=j(t,h.__wbindgen_malloc_command_export),a=S;return h.dotlottieplayerwasm_load_font(this.__wbg_ptr,n,r,i,a)!==0}set_frame(e){return h.dotlottieplayerwasm_set_frame(this.__wbg_ptr,e)!==0}set_speed(e){h.dotlottieplayerwasm_set_speed(this.__wbg_ptr,e)}set_theme(e){let t=T(e,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),n=S;return h.dotlottieplayerwasm_set_theme(this.__wbg_ptr,t,n)!==0}sm_status(){let e,t;try{let n=h.dotlottieplayerwasm_sm_status(this.__wbg_ptr);return e=n[0],t=n[1],y(n[0],n[1])}finally{h.__wbindgen_free_command_export(e,t,1)}}};async function re(e,t){if(typeof Response==`function`&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming==`function`)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(e.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",t);else throw t}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function ie(){let e={};return e.wbg={},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let n,r;try{n=e,r=t,console.error(y(e,t))}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_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,t,n){return new Uint8Array(e,t>>>0,n>>>0)},e.wbg.__wbg_newwithlength_5a5efe313cfd59f1=function(e){return new Float32Array(e>>>0)},e.wbg.__wbg_push_737cfc8c1432c2c6=function(e,t){return e.push(t)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return x(function(e,t,n){return Reflect.set(e,t,n)},arguments)},e.wbg.__wbg_setindex_4e73afdcd9bb95cd=function(e,t,n){e[t>>>0]=n},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){let n=t.stack,r=T(n,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),i=S;D().setInt32(e+4,i,!0),D().setInt32(e+0,r,!0)},e.wbg.__wbindgen_init_externref_table=function(){let e=h.__wbindgen_export_3,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e.wbg.__wbindgen_memory=function(){return h.memory},e.wbg.__wbindgen_number_new=function(e){return e},e.wbg.__wbindgen_string_get=function(e,t){let n=t,r=typeof n==`string`?n:void 0;var i=O(r)?0:T(r,h.__wbindgen_malloc_command_export,h.__wbindgen_realloc_command_export),a=S;D().setInt32(e+4,a,!0),D().setInt32(e+0,i,!0)},e.wbg.__wbindgen_string_new=function(e,t){return y(e,t)},e.wbg.__wbindgen_throw=function(e,t){throw Error(y(e,t))},e}function ae(e,t){return h=e.exports,F.__wbindgen_wasm_module=t,E=null,k=null,_=null,h.__wbindgen_start(),h}async function F(e){if(h!==void 0)return h;if(e!==void 0&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn(`using deprecated parameters for the initialization function; pass a single object instead`)),e===void 0)throw Error(`WASM module URL must be provided via DotLottieWasmLoader or setWasmUrl().`);let t=ie();(typeof e==`string`||typeof Request==`function`&&e instanceof Request||typeof URL==`function`&&e instanceof URL)&&(e=fetch(e));let{instance:n,module:r}=await re(await e,t);return ae(n,r)}var I=class{constructor(){o(this,`_eventListeners`,new Map)}addEventListener(e,t){let n=this._eventListeners.get(e);n||(n=new Set,this._eventListeners.set(e,n)),n.add(t)}removeEventListener(e,t){let n=this._eventListeners.get(e);n&&(t?(n.delete(t),n.size===0&&this._eventListeners.delete(e)):this._eventListeners.delete(e))}dispatch(e){this._eventListeners.get(e.type)?.forEach(t=>t(e))}removeAllEventListeners(){this._eventListeners.clear()}},L=class e{static _initializeObserver(){e._observer||=new IntersectionObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);n&&(t.isIntersecting?n.unfreeze():n.freeze())})},{threshold:0})}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,n),e._observer?.observe(t))}static unobserve(t){e._observer?.unobserve(t),e._observedCanvases.delete(t),e._observedCanvases.size===0&&(e._observer?.disconnect(),e._observer=null)}};o(L,`_observer`,null),o(L,`_observedCanvases`,new Map);var R=class e{static _initializeObserver(){e._observer||=new ResizeObserver(t=>{t.forEach(t=>{let n=e._observedCanvases.get(t.target);if(!n)return;let[r,i]=n;clearTimeout(i);let a=setTimeout(()=>{r.resize()},100);e._observedCanvases.set(t.target,[r,a])})})}static observe(t,n){e._initializeObserver(),!e._observedCanvases.has(t)&&(e._observedCanvases.set(t,[n,0]),e._observer?.observe(t))}static unobserve(t){let n=e._observedCanvases.get(t);if(n){let e=n[1];e&&clearTimeout(e)}e._observer?.unobserve(t),e._observedCanvases.delete(t),!e._observedCanvases.size&&e._observer&&(e._observer.disconnect(),e._observer=null)}};o(R,`_observer`,null),o(R,`_observedCanvases`,new Map);function z(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function oe(e){if(!z(e))return[0,0,0,0];let t=e.replace(`#`,``);return t=t.length===6?`${t}ff`:t,[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255,parseInt(t.slice(6,8),16)/255]}function B(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e.slice(0,d.byteLength));for(let e=0;e<d.length;e+=1)if(d[e]!==t[e])return!1;return!0}function V(e){return f.every(t=>Object.hasOwn(e,t))}function H(e){if(typeof e==`string`)try{return V(JSON.parse(e))}catch{return!1}else return V(e)}function U(){return 1+((u?window.devicePixelRatio:1)-1)*.75}function W(e){let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return!(t.bottom<0||t.top>n||t.right<0||t.left>r)}function G(e){let t=e.target;if(t instanceof HTMLCanvasElement){let n=t.getBoundingClientRect();if(n.width===0||n.height===0||t.width===0||t.height===0)return null;let r=t.width/n.width,i=t.height/n.height,a=(e.clientX-n.left)*r,o=(e.clientY-n.top)*i;return!Number.isFinite(a)||!Number.isFinite(o)||Number.isNaN(a)||Number.isNaN(o)?null:{x:a,y:o}}return null}function K(e){let t=e.replace(`OpenUrl: `,``),n=t.indexOf(` | Target: `),r,i;n===-1?(r=t,i=`_blank`):(r=t.substring(0,n),i=t.substring(n+11)),window.open(r,i)}function se(e,t,n){let r=null,i=t;async function a(t){await e({module_or_path:t})}async function o(t){let n=await fetch(t);if(!n.ok)throw Error(`fetch ${t} responded with ${n.status} ${n.statusText}`);await e({module_or_path:await n.arrayBuffer()})}return{load(){if(!r){let e=i,t=n;r=(async()=>{let n,i;try{await a(e);return}catch(r){n=r,console.warn(`Primary WASM load failed from ${e}: ${r.message}`),console.warn(`Attempting to load WASM from backup URL: ${t}`)}try{await a(t);return}catch(e){i=e,console.warn(`Backup WASM load failed from ${t}: ${e.message}`)}console.warn(`Retrying WASM load with buffered instantiation`);try{await o(e);return}catch(t){console.warn(`Buffered WASM load from ${e} failed: ${t.message}`)}try{await o(t);return}catch(e){throw console.error(`Primary WASM URL failed: ${n.message}`),console.error(`Backup WASM URL failed: ${i.message}`),console.error(`Buffered fallback failed: ${e.message}`),r=null,Error(`WASM loading failed from all sources.`)}})()}return r},setWasmUrl(e){e!==i&&(i=e,r=null)}}}var q=se(F,`https://cdn.jsdelivr.net/npm/${m}@${p}/dist/dotlottie-player.wasm`,`https://unpkg.com/${m}@${p}/dist/dotlottie-player.wasm`),J=e=>{switch(e){case`reverse`:return M.Reverse;case`bounce`:return M.Bounce;case`reverse-bounce`:return M.ReverseBounce;default:return M.Forward}},Y=e=>{switch(e){case M.Reverse:return`reverse`;case M.Bounce:return`bounce`;case M.ReverseBounce:return`reverse-bounce`;default:return`forward`}},ce=e=>{switch(e){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`}},le=class{constructor(e){o(this,`_canvas`,null),o(this,`_pendingLoad`,null),o(this,`_context`,null),o(this,`_eventManager`,void 0),o(this,`_animationFrameId`,null),o(this,`_frameManager`,void 0),o(this,`_boundAnimationLoop`,void 0),o(this,`_dotLottieCore`,null),o(this,`_stateMachineId`,``),o(this,`_stateMachineConfig`,null),o(this,`_isStateMachineRunning`,!1),o(this,`_renderConfig`,{}),o(this,`_isFrozen`,!1),o(this,`_backgroundColor`,null),o(this,`_lastFrameTime`,null),o(this,`_boundOnClick`,null),o(this,`_boundOnPointerUp`,null),o(this,`_boundOnPointerDown`,null),o(this,`_boundOnPointerMove`,null),o(this,`_boundOnPointerEnter`,null),o(this,`_boundOnPointerLeave`,null),o(this,`_bufferMismatchCount`,0),o(this,`_lastExpectedBufferSize`,0),o(this,`_cachedImageData`,null),o(this,`_cachedImageDataBuffer`,null),o(this,`_cachedImageDataByteOffset`,0),o(this,`_marker`,``),o(this,`_segment`,null),this._canvas=e.canvas??null,this._eventManager=new I,this._frameManager=new l,this._boundAnimationLoop=this._animationLoop.bind(this),this._renderConfig={...e.renderConfig,devicePixelRatio:e.renderConfig?.devicePixelRatio||U(),freezeOnOffscreen:e.renderConfig?.freezeOnOffscreen??!0},this._initWasm().then(()=>{this._dotLottieCore=this._createCore(),this._dotLottieCore.set_autoplay(e.autoplay??!1),this._dotLottieCore.set_loop(e.loop??!1),this._dotLottieCore.set_loop_count(e.loopCount??0),this._dotLottieCore.set_mode(J(e.mode??`forward`)),this._dotLottieCore.set_speed(e.speed??1),this._dotLottieCore.set_use_frame_interpolation(e.useFrameInterpolation??!0),e.segment&&e.segment.length===2&&(this._segment=[e.segment[0],e.segment[1]],this._dotLottieCore.set_segment(this._segment[0],this._segment[1])),this._marker=e.marker??``,this._marker&&this._dotLottieCore.set_marker(this._marker),this._dotLottieCore.set_layout(e.layout?.fit??`contain`,e.layout?.align?.[0]??.5,e.layout?.align?.[1]??.5),this._stateMachineId=e.stateMachineId??``,this._stateMachineConfig=e.stateMachineConfig??null,this._onCoreCreated(),this._eventManager.dispatch({type:`ready`}),e.data?this._canvas?this._loadFromData(e.data):this._pendingLoad={data:e.data}:e.src&&(this._canvas?this._loadFromSrc(e.src):this._pendingLoad={src:e.src}),e.backgroundColor&&this.setBackgroundColor(e.backgroundColor)}).catch(e=>{console.error(`[dotlottie-web] Initialization failed:`,e),this._eventManager.dispatch({type:`loadError`,error:Error(`Failed to load wasm module: ${e}`)})})}async _initWasm(){return q.load()}_createCore(){return new P}_onCoreCreated(){}_setupTarget(e,t){return this._dotLottieCore?this._dotLottieCore.setup_sw_target(e,t):!1}_drainPlayerEvents({skipFrame:e=!1}={}){if(!this._dotLottieCore)return;let t;for(;(t=this._dotLottieCore.poll_event())!=null;){let n=t;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`:e||queueMicrotask(()=>this._eventManager.dispatch({type:`frame`,currentFrame:n.frameNo??0}));break;case`Render`:e||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`}));break;default:break}}}_drainSmEvents(){if(!this._dotLottieCore)return;let e;for(;(e=this._dotLottieCore.sm_poll_event())!=null;){let t=e;switch(t.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?.is_playing()||this._stopAnimationLoop()});break;case`CustomEvent`:this._eventManager.dispatch({type:`stateMachineCustomEvent`,eventName:t.message??``});break;case`BooleanInputChange`:this._eventManager.dispatch({type:`stateMachineBooleanInputValueChange`,inputName:t.name??``,newValue:t.newValue,oldValue:t.oldValue});break;case`NumericInputChange`:this._eventManager.dispatch({type:`stateMachineNumericInputValueChange`,inputName:t.name??``,newValue:t.newValue,oldValue:t.oldValue});break;case`StringInputChange`:this._eventManager.dispatch({type:`stateMachineStringInputValueChange`,inputName:t.name??``,newValue:t.newValue,oldValue:t.oldValue});break;case`InputFired`:this._eventManager.dispatch({type:`stateMachineInputFired`,inputName:t.name??``});break;case`Transition`:this._eventManager.dispatch({type:`stateMachineTransition`,fromState:t.previousState??``,toState:t.newState??``});break;case`StateEntered`:this._eventManager.dispatch({type:`stateMachineStateEntered`,state:t.state??``});break;case`StateExit`:this._eventManager.dispatch({type:`stateMachineStateExit`,state:t.state??``});break;case`Error`:this._eventManager.dispatch({type:`stateMachineError`,error:t.message??``});break;default:break}}let t;for(;(t=this._dotLottieCore.sm_poll_internal_event())!=null;){let e=t;if(e.type===`Message`){let t=e.message??``;u&&t.startsWith(`OpenUrl: `)?K(t):this._eventManager.dispatch({type:`stateMachineInternalMessage`,message:t})}}}_dispatchError(e){console.error(e),this._eventManager.dispatch({type:`loadError`,error:Error(e)})}async _fetchData(e){let t=await fetch(e);if(!t.ok)throw Error(`Failed to fetch animation data from URL: ${e}. ${t.status}: ${t.statusText}`);let n=await t.arrayBuffer();return B(n)?n:new TextDecoder().decode(n)}_loadFromData(e){if(this._dotLottieCore===null)return;if(!this._canvas){console.warn(`[dotlottie-web] Cannot load animation without canvas. Call setCanvas() first.`);return}let t=this._canvas.width,n=this._canvas.height;this._setupTarget(t,n);let r=!1;if(typeof e==`string`){if(!H(e)){this._dispatchError(`Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(e)}else if(e instanceof ArrayBuffer){if(!B(e)){this._dispatchError(`Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.`);return}r=this._dotLottieCore.load_dotlottie_data(new Uint8Array(e))}else if(typeof e==`object`){if(!H(e)){this._dispatchError(`Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.`);return}r=this._dotLottieCore.load_animation(JSON.stringify(e))}else{this._dispatchError(`Unsupported data type for animation data. Expected:
|
|
2
2
|
- string (Lottie JSON),
|
|
3
3
|
- ArrayBuffer (dotLottie),
|
|
4
4
|
- object (Lottie JSON).
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-DkVRHjf3.cjs");let t=require("react");t=e.o(t,1);let n=require("swiper/react"),r=require("swiper/modules"),i=require("react/jsx-runtime");var a=`:root{--swiper-theme-color:#007aff}:host{z-index:1;margin-left:auto;margin-right:auto;display:block;position:relative}.swiper{z-index:1;margin-left:auto;margin-right:auto;padding:0;list-style:none;display:block;position:relative;overflow:hidden}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{z-index:1;width:100%;height:100%;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box;display:flex;position:relative}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translate(0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;transition-property:transform;display:block;position:relative}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{backface-visibility:hidden;transform:translateZ(0)}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{scrollbar-width:none;-ms-overflow-style:none;overflow:auto}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-slides-offset-before);scroll-margin-inline-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:last-child{margin-inline-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-slides-offset-before);scroll-margin-block-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:last-child{margin-block-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{pointer-events:none;z-index:10;width:100%;height:100%;position:absolute;top:0;left:0}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(270deg,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(90deg,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(#0000,#00000080)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(#00000080,#0000)}.swiper-lazy-preloader{z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-top-color:#0000;border-radius:50%;width:42px;height:42px;margin-top:-21px;margin-left:-21px;position:absolute;top:50%;left:50%}:is(.swiper:not(.swiper-watch-progress),.swiper-watch-progress .swiper-slide-visible) .swiper-lazy-preloader{animation:1s linear infinite swiper-preloader-spin}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-pagination{text-align:center;z-index:10;transition:opacity .3s;position:absolute;transform:translate(0,0)}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);width:100%;left:0}.swiper-pagination-bullets-dynamic{font-size:0;overflow:hidden}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{position:relative;transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity,.2);display:inline-block}button.swiper-pagination-bullet{box-shadow:none;appearance:none;border:none;margin:0;padding:0}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity,1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translateY(-50%)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets) .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{width:8px;top:50%;transform:translateY(-50%)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,top .2s;display:inline-block}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets) .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{white-space:nowrap;left:50%;transform:translate(-50%)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,left .2s}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,right .2s}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,#00000040);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));transform-origin:0 0;width:100%;height:100%;position:absolute;top:0;left:0;transform:scale(0)}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:100% 0}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);top:0;left:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size,4px);height:100%;top:0;left:0}.swiper-pagination-lock{display:none}:host,:root{all:initial;--player-font-family:"Quicksand";--swiper-theme-color:#007aff}*,:before,:after{box-sizing:border-box}html,body,div,span,object,iframe,figure,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,code,em,img,small,strike,strong,sub,sup,tt,b,u,i,ol,ul,li,fieldset,form,label,table,caption,tbody,tfoot,thead,tr,th,td,main,canvas,embed,footer,header,nav,section,video{font-size:100%;font:inherit;vertical-align:baseline;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;color:initial;border:0;margin:0;padding:0}footer,header,nav,section,main{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input{appearance:none;border-radius:0}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}*,:after,:before{box-sizing:border-box;border:0 solid #d7d8e4}.swiper{width:100%;height:100%}.swiper-slide{text-align:center;background:#fff;justify-content:center;align-items:center;font-size:18px;display:flex}.swiper-slide img{object-fit:cover;width:100%;height:100%;display:block}.player{height:100dvh;font-family:var(--player-font-family), sans-serif;background:#fff;font-style:normal;font-weight:700;line-height:1.5;position:relative;overflow:hidden}.player .view-box{align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.player .view-box .bg{object-fit:contain;place-self:center;max-width:100%;max-height:100%;display:flex}.player .view-box .pagetext-wrapper{opacity:.8;color:#161e33;z-index:999;background:#e7e9ff;flex-direction:row;justify-content:center;align-items:center;height:clamp(1.875rem,6.9231vw - .6635rem,4.875rem);min-height:max-content;font-size:clamp(1rem,.375rem + 2vw,1.5rem);line-height:1;display:flex;position:absolute;bottom:0;left:0;right:0}.worditem.HL .word{will-change:transform;color:#3345e0;border-color:#3345e0;animation:1s ease-in-out infinite alternate glow;transform:scale(1.15)}.worditem .word{cursor:pointer;letter-spacing:0;border-bottom:2px solid #dcdcdc00;margin:0 2px;padding:0 2px;transition:all .25s ease-in-out;display:inline-block}.worditem :hover{color:#3345e0;border-color:#3345e0;animation:1s ease-in-out infinite alternate glow}.cover-page{flex-direction:column;justify-content:center;align-items:center;height:100%;display:flex}.cover-page .cover-illustration{max-width:20rem;overflow:hidden}.cover-page .cover-illustration img{object-fit:cover;object-position:center}.cover-page .cover-text h1{color:#000;font-size:clamp(1rem,4vw - .25rem,1.75rem);font-weight:700}.cover-page .cover-text small{white-space:pre-wrap;font-size:clamp(.8rem,2vw - .2rem,1rem)}.credits-page{background-color:#f5f3ff;flex-direction:column;align-items:center;width:100%;height:100%;display:flex;overflow:auto}.credits-page .credits-page-inner{background-color:#fff;flex-flow:wrap;justify-content:center;align-items:center;gap:2rem;width:100%;padding:clamp(1.5rem,.25rem + 4vw,2.5rem) clamp(1rem,3vw,3rem);display:flex}.credits-page .credits-page-inner .logo-item{height:clamp(3rem,1.0916rem + 6.1069vw,5rem)}.credits-page .credits-page-inner .logo-item img{max-height:100%}.credits-page .credits-page-bottom{text-align:center;margin-top:.5rem;padding-left:clamp(2.5rem,16.7939vw - 2.7481rem,8rem);padding-right:clamp(2.5rem,16.7939vw - 2.7481rem,8rem)}.credits-page .credits-page-bottom h1{color:#000;padding-top:1rem;padding-bottom:1rem;font-size:clamp(1rem,4vw - .25rem,2rem);font-weight:700}.credits-page .credits-page-bottom small{white-space:pre-wrap;font-size:clamp(.8rem,2vw - .2rem,1rem)}.absolute{position:absolute}.mirror-item{transform:scaleX(-1)}.pageContentWrapper{width:100%;height:100%;display:flex;position:relative;overflow:hidden}.pageContentWrapper.layout-btm-aligned .textwrapper{width:100%;bottom:0%}.page-text-overlay{z-index:10;position:absolute}.textwrapper{text-align:center;z-index:10;font-weight:700;position:absolute;bottom:0;left:0;right:0}.textwrapper .textwrapper-inner{margin:0 auto;position:relative}.textwrapper .textwrapper-inner .textcontainer{display:flex}.background{width:100%;height:100%}.background img{object-fit:cover;width:100%;height:100%}.lazysvg{display:inline-block}.lazysvg img{z-index:-10;width:100%;max-width:100%;height:100%;max-height:100%}.ui.btn{z-index:50;border-radius:100%;justify-content:center;align-items:center;transition:background-color .1s linear;display:flex;position:absolute;box-shadow:0 12px 16px -8px #3f265833}.ui.btn.audioplay{color:#fff;background:#007737;width:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);height:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);top:1.5%;right:1.5%}.ui.btn.audioplay>svg{margin-left:.25rem}.ui.btn.audioplay:disabled{background:#d7d8e4}.ui.btn.audioplay:active{background:#018d41}.ui.btn.audioplay.playing{color:#9391ac;cursor:default}.ui.btn:active{box-shadow:none}.ui.btn.swipe{color:#5968ec;cursor:pointer;background:#f2f4ff;width:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);height:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);top:45%}.ui.btn.swipe:active{background-color:#dde0ff}.ui.btn:focus-visible{outline-color:#161e33}.ui.btn.swipe.prev{left:1%}.ui.btn.swipe.next{right:1%}.ui.btn.swipe:disabled{cursor:default;background-color:#d7d8e4;transition:background-color .1s linear}.ui.btn.swipe:disabled svg{stroke:#9391ac;fill:#9391ac}[dir=rtl] .ui.btn.audioplay{left:1.5%;right:auto}`,o=e=>e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`),s=(e=[],t)=>{if(!t||e.length===0)return e;let n=e.filter(e=>e.language&&e.language.includes(t));if(n.length>0)return n;let r=e.filter(e=>e.unicodeRange);return r.length>0?r:e},c=(e=[])=>e.map(e=>{let t=[`font-family: '${o(e.family)}';`,`src: url('${o(e.url)}');`,`font-display: swap;`];return e.weight&&t.push(`font-weight: ${e.weight};`),e.style&&t.push(`font-style: ${e.style};`),e.unicodeRange&&t.push(`unicode-range: ${e.unicodeRange};`),`@font-face {${t.join(``)}}`}).join(``),l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},u=t.default.createContext&&t.default.createContext(l),d=[`attr`,`size`,`title`];function f(e,t){if(e==null)return{};var n,r,i=p(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(null,arguments)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?h(Object(n),!0).forEach(function(t){_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=y(e,`string`);return typeof t==`symbol`?t:t+``}function y(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){return e&&e.map((e,n)=>t.default.createElement(e.tag,g({key:n},e.attr),b(e.child)))}function x(e){return n=>t.default.createElement(S,m({attr:g({},e.attr)},n),b(e.child))}function S(e){var n=n=>{var{attr:r,size:i,title:a}=e,o=f(e,d),s=i||n.size||`1em`,c;return n.className&&(c=n.className),e.className&&(c=(c?c+` `:``)+e.className),t.default.createElement(`svg`,m({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},n.attr,r,o,{className:c,style:g(g({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:`http://www.w3.org/2000/svg`}),a&&t.default.createElement(`title`,null,a),e.children)};return u===void 0?n(l):t.default.createElement(u.Consumer,null,e=>n(e))}function C(e){return x({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M284.9 412.6l138.1-134c6-5.8 9-13.7 9-22.4v-.4c0-8.7-3-16.6-9-22.4l-138.1-134c-12-12.5-31.3-12.5-43.2 0-11.9 12.5-11.9 32.7 0 45.2l83 79.4h-214c-17 0-30.7 14.3-30.7 32 0 18 13.7 32 30.6 32h214l-83 79.4c-11.9 12.5-11.9 32.7 0 45.2 12 12.5 31.3 12.5 43.3 0z`},child:[]}]})(e)}function w(e){return x({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M401.4 224h-214l83-79.4c11.9-12.5 11.9-32.7 0-45.2s-31.2-12.5-43.2 0L89 233.4c-6 5.8-9 13.7-9 22.4v.4c0 8.7 3 16.6 9 22.4l138.1 134c12 12.5 31.3 12.5 43.2 0 11.9-12.5 11.9-32.7 0-45.2l-83-79.4h214c16.9 0 30.6-14.3 30.6-32 .1-18-13.6-32-30.5-32z`},child:[]}]})(e)}var T=({isFirst:e,isLast:t,activeIndex:r,textDirection:a})=>{let o=(0,n.useSwiper)(),s=a===`RTL`;return(0,i.jsxs)(`div`,{className:`swipernavigation`,"data-index-id":r,children:[(0,i.jsx)(`button`,{className:`ui btn swipe prev ${(s?t:e)?` disabled`:``}`,disabled:s?t:e,"aria-label":s?`Next page`:`Previous page`,onClick:()=>{s?o.slideNext():o.slidePrev()},children:(0,i.jsx)(w,{size:`75%`})}),(0,i.jsx)(`button`,{disabled:s?e:t,"aria-label":s?`Previous page`:`Next page`,onClick:()=>{s?o.slidePrev():o.slideNext()},className:`ui btn swipe next ${(s?e:t)?` disabled`:``}`,children:(0,i.jsx)(C,{size:`75%`})})]})};function ee(e){return x({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z`},child:[]}]})(e)}var te=function(e){return e[e.BOTTOM=1]=`BOTTOM`,e[e.DYNAMIC=2]=`DYNAMIC`,e}({}),ne=t=>{let{background:n}=t,r=e.a();return(0,i.jsx)(`div`,{className:`background`,style:{backgroundColor:n.color??`transparent`},children:n.type===`image`&&n.url&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`img`,{src:e.n(r,n.crop?n.crop:n),alt:``,loading:`lazy`}),(0,i.jsx)(`div`,{className:`swiper-lazy-preloader`})]})})},E=t.default.memo(({segments:n,pageAudio:r,setIsPlaying:a,onWordSelect:o,highlightIds:s,ref:c,textDirection:l=`LTR`})=>{let u=(0,t.useRef)(null),[d,f]=(0,t.useState)(!1),p=(0,t.useRef)([]),m=e.a(),h=(0,t.useRef)(null),g=(0,t.useRef)(new Audio),_=(0,t.useRef)(null),v=()=>{h.current&&clearInterval(h.current);let e=()=>{g.current.pause(),g.current.src=``,f(!0),a(!1)};_.current?_.current.then(e).catch(()=>{}):e()},y=()=>{if(r&&u?.current){f(!1),a(!0);let t=Array.from(u.current.children);g.current.src=e.r(m,r),_.current=g.current.play(),_.current.catch(e=>{e.name!==`AbortError`&&console.log(`audio play error`,e)}),h.current=setInterval(()=>{let e=n.findIndex(e=>g.current.currentTime>=e.start&&g.current.currentTime<=e.end);if(e>-1){let r=t[e];if(r.tagName===`SPAN`){let t=(n[e].end-n[e].start+.1)*1e3;r.classList.add(`HL`),setTimeout(()=>{r.classList.remove(`HL`)},t)}}},40),g.current.onended=()=>{h.current&&clearInterval(h.current),t?.forEach(e=>{e.classList.remove(`HL`)}),f(!0),a(!1)}}};return(0,t.useEffect)(()=>()=>{clearInterval(h.current),g.current.pause(),g.current.src=``},[]),(0,t.useEffect)(()=>{s&&s?.length>0&&(p?.current[s[0]])?.play()},[s]),(0,t.useImperativeHandle)(c,()=>({onPlay:y,onAbortAudio:v})),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(`span`,{ref:u,dir:l.toLowerCase(),children:n&&n.map((t,r)=>t.word===`\\n`||t.word===`/
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./utils-Cu46IIpo.cjs");let t=require("react");t=e.o(t,1);let n=require("swiper/react"),r=require("swiper/modules"),i=require("react/jsx-runtime");var a=`:root{--swiper-theme-color:#007aff}:host{z-index:1;margin-left:auto;margin-right:auto;display:block;position:relative}.swiper{z-index:1;margin-left:auto;margin-right:auto;padding:0;list-style:none;display:block;position:relative;overflow:hidden}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{z-index:1;width:100%;height:100%;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);box-sizing:content-box;display:flex;position:relative}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translate(0,0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;transition-property:transform;display:block;position:relative}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{backface-visibility:hidden;transform:translateZ(0)}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{scrollbar-width:none;-ms-overflow-style:none;overflow:auto}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-slides-offset-before);scroll-margin-inline-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:last-child{margin-inline-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-slides-offset-before);scroll-margin-block-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:last-child{margin-block-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{pointer-events:none;z-index:10;width:100%;height:100%;position:absolute;top:0;left:0}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(270deg,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(90deg,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(#0000,#00000080)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(#00000080,#0000)}.swiper-lazy-preloader{z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-top-color:#0000;border-radius:50%;width:42px;height:42px;margin-top:-21px;margin-left:-21px;position:absolute;top:50%;left:50%}:is(.swiper:not(.swiper-watch-progress),.swiper-watch-progress .swiper-slide-visible) .swiper-lazy-preloader{animation:1s linear infinite swiper-preloader-spin}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-pagination{text-align:center;z-index:10;transition:opacity .3s;position:absolute;transform:translate(0,0)}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom,8px);top:var(--swiper-pagination-top,auto);width:100%;left:0}.swiper-pagination-bullets-dynamic{font-size:0;overflow:hidden}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{position:relative;transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));border-radius:var(--swiper-pagination-bullet-border-radius,50%);background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity,.2);display:inline-block}button.swiper-pagination-bullet{box-shadow:none;appearance:none;border:none;margin:0;padding:0}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity,1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right,8px);left:var(--swiper-pagination-left,auto);top:50%;transform:translateY(-50%)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets) .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{width:8px;top:50%;transform:translateY(-50%)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,top .2s;display:inline-block}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets) .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{white-space:nowrap;left:50%;transform:translate(-50%)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,left .2s}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,right .2s}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,#00000040);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));transform-origin:0 0;width:100%;height:100%;position:absolute;top:0;left:0;transform:scale(0)}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:100% 0}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size,4px);top:0;left:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size,4px);height:100%;top:0;left:0}.swiper-pagination-lock{display:none}:host,:root{all:initial;--player-font-family:"Quicksand";--swiper-theme-color:#007aff}*,:before,:after{box-sizing:border-box}html,body,div,span,object,iframe,figure,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,code,em,img,small,strike,strong,sub,sup,tt,b,u,i,ol,ul,li,fieldset,form,label,table,caption,tbody,tfoot,thead,tr,th,td,main,canvas,embed,footer,header,nav,section,video{font-size:100%;font:inherit;vertical-align:baseline;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;color:initial;border:0;margin:0;padding:0}footer,header,nav,section,main{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}input{appearance:none;border-radius:0}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}*,:after,:before{box-sizing:border-box;border:0 solid #d7d8e4}.swiper{width:100%;height:100%}.swiper-slide{text-align:center;background:#fff;justify-content:center;align-items:center;font-size:18px;display:flex}.swiper-slide img{object-fit:cover;width:100%;height:100%;display:block}.player{height:100dvh;font-family:var(--player-font-family), sans-serif;background:#fff;font-style:normal;font-weight:700;line-height:1.5;position:relative;overflow:hidden}.player .view-box{align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.player .view-box .bg{object-fit:contain;place-self:center;max-width:100%;max-height:100%;display:flex}.player .view-box .pagetext-wrapper{opacity:.8;color:#161e33;z-index:999;background:#e7e9ff;flex-direction:row;justify-content:center;align-items:center;height:clamp(1.875rem,6.9231vw - .6635rem,4.875rem);min-height:max-content;font-size:clamp(1rem,.375rem + 2vw,1.5rem);line-height:1;display:flex;position:absolute;bottom:0;left:0;right:0}.worditem.HL .word{will-change:transform;color:#3345e0;border-color:#3345e0;animation:1s ease-in-out infinite alternate glow;transform:scale(1.15)}.worditem .word{cursor:pointer;letter-spacing:0;border-bottom:2px solid #dcdcdc00;margin:0 2px;padding:0 2px;transition:all .25s ease-in-out;display:inline-block}.worditem :hover{color:#3345e0;border-color:#3345e0;animation:1s ease-in-out infinite alternate glow}.cover-page{flex-direction:column;justify-content:center;align-items:center;height:100%;display:flex}.cover-page .cover-illustration{max-width:20rem;overflow:hidden}.cover-page .cover-illustration img{object-fit:cover;object-position:center}.cover-page .cover-text h1{color:#000;font-size:clamp(1rem,4vw - .25rem,1.75rem);font-weight:700}.cover-page .cover-text small{white-space:pre-wrap;font-size:clamp(.8rem,2vw - .2rem,1rem)}.credits-page{background-color:#f5f3ff;flex-direction:column;align-items:center;width:100%;height:100%;display:flex;overflow:auto}.credits-page .credits-page-inner{background-color:#fff;flex-flow:wrap;justify-content:center;align-items:center;gap:2rem;width:100%;padding:clamp(1.5rem,.25rem + 4vw,2.5rem) clamp(1rem,3vw,3rem);display:flex}.credits-page .credits-page-inner .logo-item{height:clamp(3rem,1.0916rem + 6.1069vw,5rem)}.credits-page .credits-page-inner .logo-item img{max-height:100%}.credits-page .credits-page-bottom{text-align:center;margin-top:.5rem;padding-left:clamp(2.5rem,16.7939vw - 2.7481rem,8rem);padding-right:clamp(2.5rem,16.7939vw - 2.7481rem,8rem)}.credits-page .credits-page-bottom h1{color:#000;padding-top:1rem;padding-bottom:1rem;font-size:clamp(1rem,4vw - .25rem,2rem);font-weight:700}.credits-page .credits-page-bottom small{white-space:pre-wrap;font-size:clamp(.8rem,2vw - .2rem,1rem)}.absolute{position:absolute}.mirror-item{transform:scaleX(-1)}.pageContentWrapper{width:100%;height:100%;display:flex;position:relative;overflow:hidden}.pageContentWrapper.layout-btm-aligned .textwrapper{width:100%;bottom:0%}.page-text-overlay{z-index:10;position:absolute}.textwrapper{text-align:center;z-index:10;font-weight:700;position:absolute;bottom:0;left:0;right:0}.textwrapper .textwrapper-inner{margin:0 auto;position:relative}.textwrapper .textwrapper-inner .textcontainer{display:flex}.background{width:100%;height:100%}.background img{object-fit:cover;width:100%;height:100%}.lazysvg{display:inline-block}.lazysvg img{z-index:-10;width:100%;max-width:100%;height:100%;max-height:100%}.ui.btn{z-index:50;border-radius:100%;justify-content:center;align-items:center;transition:background-color .1s linear;display:flex;position:absolute;box-shadow:0 12px 16px -8px #3f265833}.ui.btn.audioplay{color:#fff;background:#007737;width:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);height:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);top:1.5%;right:1.5%}.ui.btn.audioplay>svg{margin-left:.25rem}.ui.btn.audioplay:disabled{background:#d7d8e4}.ui.btn.audioplay:active{background:#018d41}.ui.btn.audioplay.playing{color:#9391ac;cursor:default}.ui.btn:active{box-shadow:none}.ui.btn.swipe{color:#5968ec;cursor:pointer;background:#f2f4ff;width:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);height:clamp(2.25rem,.2188rem + 6.5vw,3.875rem);top:45%}.ui.btn.swipe:active{background-color:#dde0ff}.ui.btn:focus-visible{outline-color:#161e33}.ui.btn.swipe.prev{left:1%}.ui.btn.swipe.next{right:1%}.ui.btn.swipe:disabled{cursor:default;background-color:#d7d8e4;transition:background-color .1s linear}.ui.btn.swipe:disabled svg{stroke:#9391ac;fill:#9391ac}[dir=rtl] .ui.btn.audioplay{left:1.5%;right:auto}`,o=e=>e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`),s=(e=[],t)=>{if(!t||e.length===0)return e;let n=e.filter(e=>e.language&&e.language.includes(t));if(n.length>0)return n;let r=e.filter(e=>e.unicodeRange);return r.length>0?r:e},c=(e=[])=>e.map(e=>{let t=[`font-family: '${o(e.family)}';`,`src: url('${o(e.url)}');`,`font-display: swap;`];return e.weight&&t.push(`font-weight: ${e.weight};`),e.style&&t.push(`font-style: ${e.style};`),e.unicodeRange&&t.push(`unicode-range: ${e.unicodeRange};`),`@font-face {${t.join(``)}}`}).join(``),l={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},u=t.default.createContext&&t.default.createContext(l),d=[`attr`,`size`,`title`];function f(e,t){if(e==null)return{};var n,r,i=p(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(null,arguments)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?h(Object(n),!0).forEach(function(t){_(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=y(e,`string`);return typeof t==`symbol`?t:t+``}function y(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function b(e){return e&&e.map((e,n)=>t.default.createElement(e.tag,g({key:n},e.attr),b(e.child)))}function x(e){return n=>t.default.createElement(S,m({attr:g({},e.attr)},n),b(e.child))}function S(e){var n=n=>{var{attr:r,size:i,title:a}=e,o=f(e,d),s=i||n.size||`1em`,c;return n.className&&(c=n.className),e.className&&(c=(c?c+` `:``)+e.className),t.default.createElement(`svg`,m({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},n.attr,r,o,{className:c,style:g(g({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:`http://www.w3.org/2000/svg`}),a&&t.default.createElement(`title`,null,a),e.children)};return u===void 0?n(l):t.default.createElement(u.Consumer,null,e=>n(e))}function C(e){return x({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M284.9 412.6l138.1-134c6-5.8 9-13.7 9-22.4v-.4c0-8.7-3-16.6-9-22.4l-138.1-134c-12-12.5-31.3-12.5-43.2 0-11.9 12.5-11.9 32.7 0 45.2l83 79.4h-214c-17 0-30.7 14.3-30.7 32 0 18 13.7 32 30.6 32h214l-83 79.4c-11.9 12.5-11.9 32.7 0 45.2 12 12.5 31.3 12.5 43.3 0z`},child:[]}]})(e)}function w(e){return x({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M401.4 224h-214l83-79.4c11.9-12.5 11.9-32.7 0-45.2s-31.2-12.5-43.2 0L89 233.4c-6 5.8-9 13.7-9 22.4v.4c0 8.7 3 16.6 9 22.4l138.1 134c12 12.5 31.3 12.5 43.2 0 11.9-12.5 11.9-32.7 0-45.2l-83-79.4h214c16.9 0 30.6-14.3 30.6-32 .1-18-13.6-32-30.5-32z`},child:[]}]})(e)}var T=({isFirst:e,isLast:t,activeIndex:r,textDirection:a})=>{let o=(0,n.useSwiper)(),s=a===`RTL`;return(0,i.jsxs)(`div`,{className:`swipernavigation`,"data-index-id":r,children:[(0,i.jsx)(`button`,{className:`ui btn swipe prev ${(s?t:e)?` disabled`:``}`,disabled:s?t:e,"aria-label":s?`Next page`:`Previous page`,onClick:()=>{s?o.slideNext():o.slidePrev()},children:(0,i.jsx)(w,{size:`75%`})}),(0,i.jsx)(`button`,{disabled:s?e:t,"aria-label":s?`Previous page`:`Next page`,onClick:()=>{s?o.slidePrev():o.slideNext()},className:`ui btn swipe next ${(s?e:t)?` disabled`:``}`,children:(0,i.jsx)(C,{size:`75%`})})]})};function ee(e){return x({tag:`svg`,attr:{viewBox:`0 0 448 512`},child:[{tag:`path`,attr:{d:`M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z`},child:[]}]})(e)}var te=function(e){return e[e.BOTTOM=1]=`BOTTOM`,e[e.DYNAMIC=2]=`DYNAMIC`,e}({}),ne=t=>{let{background:n}=t,r=e.a();return(0,i.jsx)(`div`,{className:`background`,style:{backgroundColor:n.color??`transparent`},children:n.type===`image`&&n.url&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`img`,{src:e.n(r,n.crop?n.crop:n),alt:``,loading:`lazy`}),(0,i.jsx)(`div`,{className:`swiper-lazy-preloader`})]})})},E=t.default.memo(({segments:n,pageAudio:r,setIsPlaying:a,onWordSelect:o,highlightIds:s,ref:c,textDirection:l=`LTR`})=>{let u=(0,t.useRef)(null),[d,f]=(0,t.useState)(!1),p=(0,t.useRef)([]),m=e.a(),h=(0,t.useRef)(null),g=(0,t.useRef)(new Audio),_=(0,t.useRef)(null),v=()=>{h.current&&clearInterval(h.current);let e=()=>{g.current.pause(),g.current.src=``,f(!0),a(!1)};_.current?_.current.then(e).catch(()=>{}):e()},y=()=>{if(r&&u?.current){f(!1),a(!0);let t=Array.from(u.current.children);g.current.src=e.r(m,r),_.current=g.current.play(),_.current.catch(e=>{e.name!==`AbortError`&&console.log(`audio play error`,e)}),h.current=setInterval(()=>{let e=n.findIndex(e=>g.current.currentTime>=e.start&&g.current.currentTime<=e.end);if(e>-1){let r=t[e];if(r.tagName===`SPAN`){let t=(n[e].end-n[e].start+.1)*1e3;r.classList.add(`HL`),setTimeout(()=>{r.classList.remove(`HL`)},t)}}},40),g.current.onended=()=>{h.current&&clearInterval(h.current),t?.forEach(e=>{e.classList.remove(`HL`)}),f(!0),a(!1)}}};return(0,t.useEffect)(()=>()=>{clearInterval(h.current),g.current.pause(),g.current.src=``},[]),(0,t.useEffect)(()=>{s&&s?.length>0&&(p?.current[s[0]])?.play()},[s]),(0,t.useImperativeHandle)(c,()=>({onPlay:y,onAbortAudio:v})),(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(`span`,{ref:u,dir:l.toLowerCase(),children:n&&n.map((t,r)=>t.word===`\\n`||t.word===`/
|
|
2
2
|
`?(0,i.jsx)(`br`,{},r):(0,i.jsxs)(`span`,{className:`worditem ${s&&s.includes(r)?`HL`:``}`,onClick:()=>{o&&o(t),p?.current[r]?.play()},children:[t.word===`
|
|
3
|
-
`?(0,i.jsx)(`br`,{}):(0,i.jsx)(`span`,{className:`word`,children:t.word}),r<n.length-1&&(0,i.jsx)(i.Fragment,{children:` `}),t.mp3&&(0,i.jsx)(`audio`,{preload:`none`,ref:e=>{p.current[r]=e},children:(0,i.jsx)(`source`,{src:`${e.r(m,t)}`,type:`audio/mpeg`})})]},t.uid))})})}),D=e=>e/600*100,O=e=>e/1280*100,k=({item:e,screenScale:t,children:n,onActivate:r})=>{let{position:a,scaleSize:o}=e,{top:s,left:c}=a,l=!!e.effect?.type||e.mediaType===`lottie`;return(0,i.jsx)(`div`,{className:`absolute ${e.mirror?`mirror-item`:``}`,style:{zIndex:e.zIndex||10,width:`${e.width*o/100*t/100}px`,height:e.height===0?`auto`:`${e.height*o/100*t/100}px`,top:`${D(s)}%`,left:`${O(c)}%`},...l?{role:`button`,tabIndex:0,"aria-label":e.name,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r?.())}}:{"aria-hidden":!0},children:n&&n})};k.displayName=`MediaItemWrapper`;var re={display:`block`,width:`100%`,height:`100%`},ie=({item:e,children:n,effectCallback:r,onEffectEnd:a,onEffectStart:o,ref:s})=>{let[c,l]=(0,t.useState)(!1),u=(0,t.useRef)(!1),d=(t=!0)=>{!c&&!u.current&&(u.current=!0,l(!0),o&&o(),!t&&r&&r(e),u.current=!1,l(!1),a&&a())};return(0,t.useImperativeHandle)(s,()=>({triggerEffect:d,setBusy:l,busy:c}),[c]),(0,i.jsx)(`div`,{onClick:e=>{e.stopPropagation(),d(!1)},style:re,children:n})};function A(e){let n=(0,t.useRef)(null);return n.current===null&&(n.current=e()),n.current}function ae(e,t){e.indexOf(t)===-1&&e.push(t)}function oe(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var j=(e,t,n)=>n>t?t:n<e?e:n;function se(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var M=()=>{},N=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(M=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(se(t,n))},N=(e,t,n)=>{if(!e)throw Error(se(t,n))});var P={},ce=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),le=e=>typeof e==`object`&&!!e,ue=e=>/^0[^.\s]+$/u.test(e);function de(e){let t;return()=>(t===void 0&&(t=e()),t)}var F=e=>e,fe=(...e)=>e.reduce((e,t)=>n=>t(e(n))),pe=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},me=class{constructor(){this.subscriptions=[]}add(e){return ae(this.subscriptions,e),()=>oe(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},I=e=>e*1e3,L=e=>e/1e3,he=(e,t)=>t?1e3/t*e:0,ge=new Set;function _e(e,t,n){e||ge.has(t)||(console.warn(se(t,n)),ge.add(t))}var ve=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ye=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,be=1e-7,xe=12;function Se(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ye(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>be&&++s<xe);return o}function Ce(e,t,n,r){if(e===t&&n===r)return F;let i=t=>Se(t,0,1,e,n);return e=>e===0||e===1?e:ye(i(e),t,r)}var we=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Te=e=>t=>1-e(1-t),Ee=Ce(.33,1.53,.69,.99),De=Te(Ee),Oe=we(De),ke=e=>e>=1?1:(e*=2)<1?.5*De(e):.5*(2-2**(-10*(e-1))),Ae=e=>1-Math.sin(Math.acos(e)),je=Te(Ae),Me=we(Ae),Ne=Ce(.42,0,1,1),Pe=Ce(0,0,.58,1),Fe=Ce(.42,0,.58,1),Ie=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Le(e,t){return Ie(e)?e[ve(0,e.length,t)]:e}var Re=e=>Array.isArray(e)&&typeof e[0]==`number`,ze={linear:F,easeIn:Ne,easeInOut:Fe,easeOut:Pe,circIn:Ae,circInOut:Me,circOut:je,backIn:De,backInOut:Oe,backOut:Ee,anticipate:ke},Be=e=>typeof e==`string`,Ve=e=>{if(Re(e)){N(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Ce(t,n,r,i)}else if(Be(e))return N(ze[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),ze[e];return e},He=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Ue={value:null,addProjectionMetrics:null};function We(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Ue.value&&Ue.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ge=40;function Ke(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=He.reduce((e,n)=>(e[n]=We(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=P.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ge),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:He.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<He.length;t++)o[He[t]].cancel(e)},state:i,steps:o}}var{schedule:R,cancel:qe,state:Je,steps:Ye}=Ke(typeof requestAnimationFrame<`u`?requestAnimationFrame:F,!0),Xe;function Ze(){Xe=void 0}var z={now:()=>(Xe===void 0&&z.set(Je.isProcessing||P.useManualTiming?Je.timestamp:performance.now()),Xe),set:e=>{Xe=e,queueMicrotask(Ze)}},Qe={layout:0,mainThread:0,waapi:0},$e=e=>t=>typeof t==`string`&&t.startsWith(e),et=$e(`--`),tt=$e(`var(--`),nt=e=>tt(e)?rt.test(e.split(`/*`)[0].trim()):!1,rt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function it(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var B={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},at={...B,transform:e=>j(0,1,e)},ot={...B,default:1},st=e=>Math.round(e*1e5)/1e5,ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function lt(e){return e==null}var ut=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dt=(e,t)=>n=>!!(typeof n==`string`&&ut.test(n)&&n.startsWith(e)||t&&!lt(n)&&Object.prototype.hasOwnProperty.call(n,t)),ft=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ct);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},pt=e=>j(0,255,e),mt={...B,transform:e=>Math.round(pt(e))},V={test:dt(`rgb`,`red`),parse:ft(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+mt.transform(e)+`, `+mt.transform(t)+`, `+mt.transform(n)+`, `+st(at.transform(r))+`)`};function ht(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var gt={test:dt(`#`),parse:ht,transform:V.transform},_t=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),H=_t(`deg`),U=_t(`%`),W=_t(`px`),vt=_t(`vh`),yt=_t(`vw`),bt={...U,parse:e=>U.parse(e)/100,transform:e=>U.transform(e*100)},G={test:dt(`hsl`,`hue`),parse:ft(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+U.transform(st(t))+`, `+U.transform(st(n))+`, `+st(at.transform(r))+`)`},K={test:e=>V.test(e)||gt.test(e)||G.test(e),parse:e=>V.test(e)?V.parse(e):G.test(e)?G.parse(e):gt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?V.transform(e):G.transform(e),getAnimatableNone:e=>{let t=K.parse(e);return t.alpha=0,K.transform(t)}},xt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function St(e){return isNaN(e)&&typeof e==`string`&&(e.match(ct)?.length||0)+(e.match(xt)?.length||0)>0}var Ct=`number`,wt=`color`,Tt=`var`,Et=`var(`,Dt="${}",Ot=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function q(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ot,e=>(K.test(e)?(r.color.push(a),i.push(wt),n.push(K.parse(e))):e.startsWith(Et)?(r.var.push(a),i.push(Tt),n.push(e)):(r.number.push(a),i.push(Ct),n.push(parseFloat(e))),++a,Dt)).split(Dt),indexes:r,types:i}}function kt(e){return q(e).values}function At({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Ct?i+=st(r[a]):e===wt?i+=K.transform(r[a]):i+=r[a]}return i}}function jt(e){return At(q(e))}var Mt=e=>typeof e==`number`?0:K.test(e)?K.getAnimatableNone(e):e,Nt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Mt(e);function Pt(e){let t=q(e);return At(t)(t.values.map((e,n)=>Nt(e,t.split[n])))}var J={test:St,parse:kt,createTransformer:jt,getAnimatableNone:Pt};function Ft(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function It({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ft(s,r,e+1/3),a=Ft(s,r,e),o=Ft(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Lt(e,t){return n=>n>0?t:e}var Rt=(e,t,n)=>e+(t-e)*n,zt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Bt=[gt,V,G],Vt=e=>Bt.find(t=>t.test(e));function Ht(e){let t=Vt(e);if(M(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===G&&(n=It(n)),n}var Ut=(e,t)=>{let n=Ht(e),r=Ht(t);if(!n||!r)return Lt(e,t);let i={...n};return e=>(i.red=zt(n.red,r.red,e),i.green=zt(n.green,r.green,e),i.blue=zt(n.blue,r.blue,e),i.alpha=Rt(n.alpha,r.alpha,e),V.transform(i))},Wt=new Set([`none`,`hidden`]);function Gt(e,t){return Wt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Kt(e,t){return n=>Rt(e,t,n)}function qt(e){return typeof e==`number`?Kt:typeof e==`string`?nt(e)?Lt:K.test(e)?Ut:Zt:Array.isArray(e)?Jt:typeof e==`object`?K.test(e)?Ut:Yt:Lt}function Jt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>qt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Yt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Xt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Zt=(e,t)=>{let n=J.createTransformer(t),r=q(e),i=q(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Wt.has(e)&&!i.values.length||Wt.has(t)&&!r.values.length?Gt(e,t):fe(Jt(Xt(r,i),i.values),n):(M(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Lt(e,t))};function Qt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Rt(e,t,n):qt(e)(e,t)}var $t=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>R.update(t,e),stop:()=>qe(t),now:()=>Je.isProcessing?Je.timestamp:z.now()}},en=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},tn=2e4;function nn(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function rn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nn(r),tn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:L(i)}}var Y={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function an(e,t){return e*Math.sqrt(1-t*t)}var on=12;function sn(e,t,n){let r=n;for(let n=1;n<on;n++)r-=e(r)/t(r);return r}var cn=.001;function ln({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:r=Y.mass}){let i,a;M(e<=I(Y.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=j(Y.minDamping,Y.maxDamping,o),e=j(Y.minDuration,Y.maxDuration,L(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=an(t,o),c=Math.exp(-i);return cn-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=an(t**2,o);return(-i(t)+cn>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=sn(i,a,s);if(e=I(e),isNaN(c))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var un=[`duration`,`bounce`],dn=[`stiffness`,`damping`,`mass`];function fn(e,t){return t.some(t=>e[t]!==void 0)}function pn(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!fn(e,dn)&&fn(e,un))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*j(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Y.mass,stiffness:i,damping:a}}else{let n=ln({...e,velocity:0});t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function mn(e=Y.visualDuration,t=Y.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=pn({...n,velocity:-L(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=L(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Y.restSpeed.granular:Y.restSpeed.default,i||=v?Y.restDelta.granular:Y.restDelta.default;let y,b,x,S,C,w;if(h<1)x=an(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>I(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=I(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=I(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(nn(T),tn),t=en(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}mn.applyToOptions=e=>{let t=rn(e,100,mn);return e.ease=t.ease,e.duration=I(t.duration),e.type=`keyframes`,e};var hn=5;function gn(e,t,n){let r=Math.max(t-hn,0);return he(n-e(r),t-r)}function _n({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=mn({keyframes:[f.value,m(f.value)],velocity:gn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function vn(e,t,n){let r=[],i=n||P.mix||Qt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=fe(Array.isArray(t)?t[n]||F:t,a)),r.push(a)}return r}function yn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(N(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=vn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=pe(e[r],e[r+1],n);return s[r](i)};return n?t=>l(j(e[0],e[a-1],t)):l}function bn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=pe(0,t,r);e.push(Rt(n,1,i))}}function xn(e){let t=[0];return bn(t,e.length-1),t}function Sn(e,t){return e.map(e=>e*t)}function Cn(e,t){return e.map(()=>t||Fe).splice(0,e.length-1)}function wn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ie(r)?r.map(Ve):Ve(r),a={done:!1,value:t[0]},o=yn(Sn(n&&n.length===t.length?n:xn(t),e),t,{ease:Array.isArray(i)?i:Cn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Tn=e=>e!==null;function En(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Tn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Dn={decay:_n,inertia:_n,tween:wn,keyframes:wn,spring:mn};function On(e){typeof e.type==`string`&&(e.type=Dn[e.type])}var kn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},An=e=>e/100,jn=class extends kn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Qe.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;On(e);let{type:t=wn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||wn;process.env.NODE_ENV!==`production`&&s!==wn&&N(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==wn&&typeof o[0]!=`number`&&(this.mixKeyframes=fe(An,Qt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=nn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=j(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==_n&&(b.value=En(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return L(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+L(e)}get time(){return L(this.currentTime)}set time(e){e=I(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return gn(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=L(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=$t,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(z.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Qe.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Mn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var X=e=>e*180/Math.PI,Nn=e=>Fn(X(Math.atan2(e[1],e[0]))),Pn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Nn,rotateZ:Nn,skewX:e=>X(Math.atan(e[1])),skewY:e=>X(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Fn=e=>(e%=360,e<0&&(e+=360),e),In=Nn,Ln=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Rn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ln,scaleY:Rn,scale:e=>(Ln(e)+Rn(e))/2,rotateX:e=>Fn(X(Math.atan2(e[6],e[5]))),rotateY:e=>Fn(X(Math.atan2(-e[2],e[0]))),rotateZ:In,rotate:In,skewX:e=>X(Math.atan(e[4])),skewY:e=>X(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Bn(e){return+!!e.includes(`scale`)}function Vn(e,t){if(!e||e===`none`)return Bn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=zn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Pn,i=t}if(!i)return Bn(t);let a=r[t],o=i[1].split(`,`).map(Un);return typeof a==`function`?a(o):o[a]}var Hn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Vn(n,t)};function Un(e){return parseFloat(e.trim())}var Wn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Gn=new Set([...Wn,`pathRotation`]),Kn=e=>e===B||e===W,qn=new Set([`x`,`y`,`z`]),Jn=Wn.filter(e=>!qn.has(e));function Yn(e){let t=[];return Jn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var Z={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Vn(t,`x`),y:(e,{transform:t})=>Vn(t,`y`)};Z.translateX=Z.x,Z.translateY=Z.y;var Q=new Set,Xn=!1,Zn=!1,Qn=!1;function $n(){if(Zn){let e=Array.from(Q).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Yn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Zn=!1,Xn=!1,Q.forEach(e=>e.complete(Qn)),Q.clear()}function er(){Q.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zn=!0)})}function tr(){Qn=!0,er(),$n(),Qn=!1}var nr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Q.add(this),Xn||(Xn=!0,R.read(er),R.resolveKeyframes($n))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Mn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Q.delete(this)}cancel(){this.state===`scheduled`&&(Q.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},rr=e=>e.startsWith(`--`);function ir(e,t,n){rr(t)?e.style.setProperty(t,n):e.style[t]=n}var ar={};function or(e,t){let n=de(e);return()=>ar[t]??n()}var sr=or(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),cr=or(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),lr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ur={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:lr([0,.65,.55,1]),circOut:lr([.55,0,1,.45]),backIn:lr([.31,.01,.66,-.59]),backOut:lr([.33,1.53,.69,.99])};function dr(e,t){if(e)return typeof e==`function`?cr()?en(e,t):`ease-out`:Re(e)?lr(e):Array.isArray(e)?e.map(e=>dr(e,t)||ur.easeOut):ur[e]}function fr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=dr(s,i);Array.isArray(d)&&(u.easing=d),Ue.value&&Qe.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Ue.value&&p.finished.finally(()=>{Qe.waapi--}),p}function pr(e){return typeof e==`function`&&`applyToOptions`in e}function mr({type:e,...t}){return pr(e)&&cr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var hr=class extends kn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,N(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=mr(e);this.animation=fr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=En(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ir(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return L(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+L(e)}get time(){return L(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=I(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&sr()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),F):r(this)}},gr={anticipate:ke,backInOut:Oe,circInOut:Me};function _r(e){return e in gr}function vr(e){typeof e.ease==`string`&&_r(e.ease)&&(e.ease=gr[e.ease])}var yr=10,br=class extends hr{constructor(e){vr(e),On(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new jn({...a,autoplay:!1}),s=Math.max(yr,z.now()-this.startTime),c=j(0,yr,s-yr),l=o.sample(s).value,{name:u}=this.options;i&&u&&ir(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},xr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(J.test(e)||e===`0`)&&!e.startsWith(`url(`));function Sr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Cr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=xr(i,t),s=xr(a,t);return M(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Sr(e)||(n===`spring`||pr(n))&&r}function wr(e){e.duration=0,e.type=`keyframes`}var Tr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Er=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Dr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Er.test(e[t]))return!0;return!1}var Or=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),kr=de(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Ar(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return kr()&&n&&(Tr.has(n)||Or.has(n)&&Dr(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var jr=40,Mr=class extends kn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=z.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||nr;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=z.now();let u=!0;Cr(e,i,a,o)||(u=!1,(P.instantAnimations||!s)&&l?.(En(e,n,t)),e[0]=e[e.length-1],wr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>jr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Ar(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new br({...d,element:p})}catch{m=new jn(d)}else m=new jn(d);m.finished.then(()=>{this.notifyFinished()}).catch(F),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},Nr=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return Pr(this.animations,`duration`)}get iterationDuration(){return Pr(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function Pr(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var Fr=class extends Nr{then(e,t){return this.finished.finally(e).then(()=>{})}},Ir=30,Lr=e=>!isNaN(parseFloat(e)),Rr={current:void 0},zr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=z.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&_e(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new me);let n=this.events[e].add(t);return e===`change`?()=>{n(),R.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Rr.current&&Rr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ir)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Ir);return he(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Br(e,t){return new zr(e,t)}function Vr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Hr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Vr(n,e)}var Ur={type:`spring`,stiffness:500,damping:25,restSpeed:10},Wr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gr={type:`keyframes`,duration:.8},Kr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},qr=(e,{keyframes:t})=>t.length>2?Gr:Gn.has(e)?e.startsWith(`scale`)?Wr(t[1]):Ur:Kr,Jr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Yr(e){for(let t in e)if(!Jr.has(t))return!0;return!1}var Xr=(e,t,n,r={},i,a)=>o=>{let s=Hr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=I(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Yr(s)||Object.assign(u,qr(e,u)),u.duration&&=I(u.duration),u.repeatDelay&&=I(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(wr(u),u.delay===0&&(d=!0)),(P.instantAnimations||P.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,wr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=En(u.keyframes,s);if(e!==void 0){R.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new jn(u):new Mr(u)},Zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qr(e){let t=Zr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var $r=4;function ei(e,t,n=1){N(n<=$r,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Qr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ce(e)?parseFloat(e):e}return nt(i)?ei(i,t,n+1):i}function ti(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ni(e,t,n,r){if(typeof t==`function`){let[i,a]=ti(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ti(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ri(e,t,n){let r=e.getProps();return ni(r,t,n===void 0?r.custom:n,e)}var ii=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Wn]),ai=e=>Array.isArray(e);function oi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Br(n))}function si(e){return ai(e)?e[e.length-1]||0:e}function ci(e,t){let{transitionEnd:n={},transition:r={},...i}=ri(e,t)||{};i={...i,...n};for(let t in i)oi(e,t,si(i[t]))}var $=e=>!!(e&&e.getVelocity);function li(e){return!!($(e)&&e.add)}function ui(e,t){let n=e.getValue(`willChange`);if(li(n))return n.add(t);if(!n&&P.WillChange){let n=new P.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function di(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var fi=`data-`+di(`framerAppearId`);function pi(e){return e.props[fi]}function mi({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Vr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&mi(f,t))continue;let o={delay:n,...Hr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){R.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=pi(e);if(n){let e=window.MotionHandoffAnimation(n,t,R);e!==null&&(o.startTime=e,p=!0)}}ui(e,t);let m=l??e.shouldReduceMotion;r.start(Xr(t,r,i,m&&ii.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>R.update(()=>{o&&ci(e,o)});d.length?Promise.all(d).then(t):t()}return d}var gi={test:e=>e===`auto`,parse:e=>e},_i=e=>t=>t.test(e),vi=[B,W,U,H,yt,vt,gi],yi=e=>vi.find(_i(e));function bi(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ue(e)}var xi=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Si(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ct)||[];if(!r)return e;let i=n.replace(r,``),a=+!!xi.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ci=/\b([a-z-]*)\(.*?\)/gu,wi={...J,getAnimatableNone:e=>{let t=e.match(Ci);return t?t.map(Si).join(` `):e}},Ti={...J,getAnimatableNone:e=>{let t=J.parse(e);return J.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Ei={...B,transform:Math.round},Di={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:H,pathRotation:H,rotateX:H,rotateY:H,rotateZ:H,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:H,skewX:H,skewY:H,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:at,originX:bt,originY:bt,originZ:W,zIndex:Ei,fillOpacity:at,strokeOpacity:at,numOctaves:Ei},Oi={...Di,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:wi,WebkitFilter:wi,mask:Ti,WebkitMask:Ti},ki=e=>Oi[e],Ai=new Set([wi,Ti]);function ji(e,t){let n=ki(e);return Ai.has(n)||(n=J),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Mi=new Set([`auto`,`none`,`0`]);function Ni(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Mi.has(t)&&q(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=ji(n,i)}var Pi=class extends nr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),nt(r))){let i=ei(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ii.has(n)||e.length!==2)return;let[r,i]=e,a=yi(r),o=yi(i);if(it(r)!==it(i)&&Z[n]){this.needsMeasurement=!0;return}if(a!==o)if(Kn(a)&&Kn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Z[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||bi(e[t]))&&n.push(t);n.length&&Ni(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Z[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Z[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Fi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Ii=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:Li,cancel:Ri}=Ke(queueMicrotask,!1);function zi(e){return le(e)&&`ownerSVGElement`in e}function Bi(e){return zi(e)&&e.tagName===`svg`}var Vi=[...vi,K,J],Hi=e=>Vi.find(_i(e)),Ui=()=>({min:0,max:0}),Wi=()=>({x:Ui(),y:Ui()}),Gi=new WeakMap;function Ki(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function qi(e){return typeof e==`string`||Array.isArray(e)}var Ji=[`initial`,`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`];function Yi(e){return Ki(e.animate)||Ji.some(t=>qi(e[t]))}function Xi(e){return!!(Yi(e)||e.variants)}function Zi(e,t,n){for(let r in t){let i=t[r],a=n[r];if($(i))e.addValue(r,i);else if($(a))e.addValue(r,Br(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Br(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Qi={current:null},$i={current:!1},ea=typeof window<`u`;function ta(){if($i.current=!0,ea)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Qi.current=e.matches;e.addEventListener(`change`,t),t()}else Qi.current=!1}var na=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ra={},ia=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=nr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=z.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,R.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Yi(t),this.isVariantNode=Xi(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&$(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Gi.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:($i.current||ta(),this.shouldReduceMotion=Qi.current),process.env.NODE_ENV!==`production`&&_e(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),qe(this.notifyUpdate),qe(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Tr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new hr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:I(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Gn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&R.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ra){let t=ra[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wi()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<na.length;t++){let n=na[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Zi(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Br(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ce(n)||ue(n))?n=parseFloat(n):!Hi(n)&&J.test(t)&&(n=ji(e,t)),this.setBaseTarget(e,$(n)?n.get():n)),$(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=ni(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!$(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new me),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Li.render(this.render)}},aa=class extends ia{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;$(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function oa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sa(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ca(e,t){return oa(sa(e.getBoundingClientRect(),t))}var la={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ua=Wn.length;function da(e,t,n){let r=``,i=!0;for(let a=0;a<ua;a++){let o=Wn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Ii(s,Di[o]);if(!c){i=!1;let t=la[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Ii(a,Di.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function fa(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Gn.has(e)){o=!0;continue}else if(et(e)){i[e]=n;continue}else{let t=Ii(n,Di[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=da(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function pa(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function ma(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ha={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;return`${ma(e,t.target.x)}% ${ma(e,t.target.y)}%`}},ga={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=J.parse(e);if(i.length>5)return r;let a=J.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Rt(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},_a={borderRadius:{...ha,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:ha,borderTopRightRadius:ha,borderBottomLeftRadius:ha,borderBottomRightRadius:ha,boxShadow:ga};function va(e,{layout:t,layoutId:n}){return Gn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!_a[e]||e===`opacity`)}function ya(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)($(r[t])||i&&$(i[t])||va(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function ba(e){return window.getComputedStyle(e)}var xa=class extends aa{constructor(){super(...arguments),this.type=`html`,this.renderInstance=pa}readValueFromInstance(e,t){if(Gn.has(t))return this.projection?.isProjecting?Bn(t):Hn(e,t);{let n=ba(e),r=(et(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ca(e,t)}build(e,t,n){fa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ya(e,t,n)}};function Sa(e,t){return e in t}var Ca=class extends ia{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Sa(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Wi()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},wa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ta={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ea(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?wa:Ta;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Da=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Oa(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(fa(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Da)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ea(d,i,a,o,!1)}var ka=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Aa=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ja(e,t,n,r){pa(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ka.has(n)?n:di(n),t.attrs[n])}function Ma(e,t,n){let r=ya(e,t,n);for(let n in e)if($(e[n])||$(t[n])){let t=Wn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Na=class extends aa{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Wi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Gn.has(t)){let e=ki(t);return e&&e.default||0}return t=ka.has(t)?t:di(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ma(e,t,n)}build(e,t,n){Oa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ja(e,t,n,r)}mount(e){this.isSVGTag=Aa(e.tagName),super.mount(e)}};function Pa(e,t,n){let r=$(e)?e:Br(e);return r.start(Xr(``,r,t,n)),r.animation}var Fa=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Ia(e){return(0,t.useEffect)(()=>()=>e(),[])}function La(){!$i.current&&ta();let[e]=(0,t.useState)(Qi.current);return process.env.NODE_ENV!==`production`&&_e(e!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),e}function Ra(){let e=La(),{reducedMotion:n}=(0,t.useContext)(Fa);return n===`never`?!1:n===`always`?!0:e}function za(e){return typeof e==`object`&&!Array.isArray(e)}function Ba(e,t,n,r){return e==null?[]:typeof e==`string`&&za(t)?Fi(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Va(e,t,n){return e*(t+1)+n*t}function Ha(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Ua(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(oe(e,i),r--)}}function Wa(e,t,n,r,i,a){Ua(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Rt(i,a,r[o]),easing:Le(n,o)})}function Ga(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Ka(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var qa=`easeInOut`,Ja=20;function Ya(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,Ha(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Ha(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Qa(e),{delay:l=0,times:u=xn(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=pr(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&to(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=I(b));let r=rn(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&bn(u,T),c.length===1&&c.unshift(null),m&&M(m<Ja,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Ja} or apply repeat at the sequence level instead.`),m&&m<Ja){let e=b>0?_/b:0;b=Va(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?Te(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:Le(f,e-1))}Ga(u,m,e)}let ee=w+b;Wa(r,c,y,u,w,ee),g=Math.max(x+b,g),f=Math.max(ee,f)};if($(p)){let e=Xa(p,s);_(m,h,Za(`default`,e))}else{let e=Ba(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Xa(r,s);for(let e in m)_(m[e],$a(h,e),Za(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Ka);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(pe(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(qa)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Xa(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Za(e,t){return t[e]||(t[e]=[]),t[e]}function Qa(e){return Array.isArray(e)?e:[e]}function $a(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var eo=e=>typeof e==`number`,to=e=>e.every(eo);function no(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=zi(e)&&!Bi(e)?new Na(t):new xa(t);n.mount(e),Gi.set(e,n)}function ro(e){let t=new Ca({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Gi.set(e,t)}function io(e,t){return $(e)||typeof e==`number`||typeof e==`string`&&!za(t)}function ao(e,t,n,r){let i=[];if(io(e,t))i.push(Pa(e,za(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Ba(e,t,r),o=a.length;N(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?no:ro;Gi.has(r)||s(r);let c=Gi.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...hi(c,{...t,transition:l},{}))}}return i}function oo(e,t,n){let r=[];return Ya(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=Br(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:mn}).forEach(({keyframes:e,transition:t},n)=>{r.push(...ao(n,e,t))}),r}function so(e){return Array.isArray(e)&&e.some(Array.isArray)}function co(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),so(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=oo(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=ao(e,i,{...c,...r},t)}let l=new Fr(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{oe(t.animations,l)})),l}return i}co();function lo(){let e=A(()=>({current:null,animations:[]})),n=Ra()??void 0,{skipAnimations:r}=(0,t.useContext)(Fa),i=(0,t.useMemo)(()=>co({scope:e,reduceMotion:n,skipAnimations:r}),[e,n,r]);return Ia(()=>{e.animations.forEach(e=>e.stop()),e.animations.length=0}),[e,i]}var uo={display:`block`,width:`100%`,height:`100%`},fo=({item:e,children:n,effectCallback:r,onEffectStart:a,ref:o})=>{let[s,c]=lo(),[l,u]=(0,t.useState)(!1),d=(0,t.useRef)(!1),f=(t=!0)=>{if(!t&&r&&r(e),!l&&!d.current){if(!s.current)return;d.current=!0,u(!0),a&&a(),c(s.current,{y:[0,-55,0],scaleX:[1,1.15,.9,1]},{duration:.8,repeat:1,repeatType:`loop`}).then(()=>{u(!1),d.current=!1}).catch(()=>{u(!1),d.current=!1})}};return(0,t.useImperativeHandle)(o,()=>({triggerEffect:f,setBusy:u,busy:l}),[l]),(0,i.jsx)(`div`,{ref:s,onClick:e=>{e.stopPropagation(),f(!1)},style:uo,children:n})},po=({children:e,position:n={from:0,to:0},screenScale:r,settings:a,onEffectEnd:o,onEffectStart:s,ref:c})=>{let[l,u]=lo(),d=(0,t.useRef)(!1),f=()=>{if(!l.current)return;s&&s();let e=d.current?0:(n.to-n.from)*r/100;d.current=!d.current,u(l.current,{x:e},{duration:a.duration||2,delay:.1}).then(()=>{o&&o()}).catch(()=>{d.current=!d.current})};return(0,t.useImperativeHandle)(c,()=>({triggerEffect:f})),(0,i.jsx)(`div`,{ref:l,onClick:e=>{e.stopPropagation(),f()},children:e})},mo={display:`block`,width:`100%`,height:`100%`},ho=({item:e,children:n,effectCallback:r,onEffectEnd:a,onEffectStart:o,ref:s})=>{let[c,l]=lo(),[u,d]=(0,t.useState)(!1),f=(0,t.useRef)(!1),p=(t=!0)=>{if(!t&&r&&r(e),!u&&!f.current){if(!c.current)return;f.current=!0,d(!0),o&&o(),l(c.current,{boxShadow:[`0px 0px 20px 10px rgba(209, 174, 34, 0)`,`0px 0px 20px 10px rgba(209, 174, 34, 0.8)`,`0px 0px 20px 10px rgba(209, 174, 34, 0)`],scale:[1,1.1,.9,1]},{duration:1}).then(()=>{d(!1),f.current=!1,a&&a()}).catch(()=>{d(!1),f.current=!1})}};return(0,t.useImperativeHandle)(s,()=>({triggerEffect:p,setBusy:d,busy:u}),[u]),(0,i.jsx)(`div`,{ref:c,onClick:e=>{e.stopPropagation(),p(!1)},style:{...mo,borderRadius:`100%`},children:n})},go={display:`block`,width:`100%`,height:`100%`},_o=({item:e,screenScale:n,children:r,effectCallback:a,onEffectEnd:o,onEffectStart:s,ref:c})=>{let l=e.scaleSize/100*(n-10)/100,[u,d]=lo(),[f,p]=(0,t.useState)(!1),m=(0,t.useRef)(!1),h=(t=!0)=>{if(!t&&a&&a(e),!f&&!m.current){if(!u.current)return;m.current=!0,s&&s(),d(u.current,{rotate:[0,-1*l,1*l,0],x:[0,-2*l,-4*l,0],y:[0,-8*l,-4*l,0]},{repeat:4,duration:.15}).then(()=>{p(!1),m.current=!1,o&&o()}).catch(()=>{p(!1),m.current=!1})}};return(0,t.useImperativeHandle)(c,()=>({triggerEffect:h,setBusy:p,busy:f}),[f]),(0,i.jsx)(`div`,{ref:u,onClick:e=>{e.stopPropagation(),h(!1)},style:go,children:r})},vo={display:`block`,width:`100%`,height:`100%`},yo=({item:e,children:n,effectCallback:r,onEffectEnd:a,onEffectStart:o,ref:s})=>{let c=e.scaleSize/100,[l,u]=lo(),[d,f]=(0,t.useState)(!1),p=(0,t.useRef)(!1),m=(t=!0)=>{if(!t&&r&&r(e),!d&&!p.current){if(!l.current)return;p.current=!0,f(!0),o&&o(),u(l.current,{y:[0,-10*c,-30*c,-34*c,0],scaleY:[1,1.1,1.2,1.1,1]},{delay:.1,repeatType:`reverse`,duration:.5*c}).then(()=>{f(!1),p.current=!1,a&&a()}).catch(()=>{f(!1),p.current=!1})}};return(0,t.useImperativeHandle)(s,()=>({triggerEffect:m,setBusy:f,busy:d}),[d]),(0,i.jsx)(`div`,{ref:l,onClick:e=>{e.stopPropagation(),m(!1)},style:vo,children:n})},bo=t.default.lazy(()=>Promise.resolve().then(()=>require("./dolottie-C2YAu2UJ.cjs"))),xo=t.default.lazy(()=>Promise.resolve().then(()=>require("./Image-CJI9T-SB.cjs"))),So=({item:n,screenScale:r,onMediaClick:a,ref:o})=>{let{effect:s,mediaType:c}=n,[l,u]=(0,t.useState)(!1),[d,f]=(0,t.useState)(null),{bookId:p}=e.a(),m=(0,t.useCallback)(()=>{d&&!l&&(u(!0),d.setFrame(0),d.play())},[d,l,p]),h=(0,t.useCallback)(()=>{d&&l&&d.stop(),u(!1)},[d,l]);(0,t.useEffect)(()=>{let e=()=>{(!s||!s.type)&&u(!1)};return d&&d.addEventListener(`complete`,e),()=>{d&&d.removeEventListener(`complete`,e)}},[d,s]);let g=()=>c===`lottie`?(0,i.jsx)(bo,{item:n,play:l,setDotLottie:f}):(0,i.jsx)(xo,{mediaItem:n});return s?.type?s.type===`highlight`?(0,i.jsx)(ho,{item:n,ref:o,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`shake`?(0,i.jsx)(_o,{item:n,ref:o,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`bounce`?(0,i.jsx)(fo,{item:n,ref:o,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`jump`?(0,i.jsx)(yo,{item:n,ref:o,onEffectEnd:h,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`move`?(0,i.jsx)(po,{onEffectEnd:h,onEffectStart:m,ref:o,screenScale:r,position:{from:n.position.left,to:s.settings.to},settings:s.settings,children:g()}):null:(0,i.jsx)(ie,{onEffectEnd:h,onEffectStart:m,item:n,ref:o,screenScale:r,effectCallback:a,children:g()})};So.displayName=`Animation`;var Co=t.default.memo(So),wo=t.default.memo(({path:e,mediaType:t,...n})=>t&&t===`static`?(0,i.jsxs)(`span`,{className:`inline-flex`,children:[(0,i.jsx)(`img`,{src:`${e}`,alt:``,loading:`lazy`,className:`max-w-full max-h-full w-full h-full -z-10`}),(0,i.jsx)(`div`,{className:`swiper-lazy-preloader`})]}):null);wo.displayName=`LazySvg`;var To=t.default.memo(wo),Eo={left:0,top:480},Do=`clamp(18px, 3.8vmin, 34px)`,Oo=({page:r,screenScale:a,isActive:o,textDirection:s=`LTR`})=>{let c=(0,n.useSwiper)(),{bookId:l,slug:u,analytics:d}=e.a(),{audio:f,words:p,background:m,media:h=[],layoutStyle:g=te.BOTTOM,textPosition:_,textStyle:v}=r,y=g===te.BOTTOM?`layout-btm-aligned`:``,[b,x]=(0,t.useState)([]),S=(0,t.useRef)([]),C=(0,t.useRef)(null),[w,T]=(0,t.useState)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(!0),re=navigator?.userActivation.hasBeenActive,ie=c.activeIndex>(c.previousIndex??-1),A=(0,t.useMemo)(()=>f?.pageAudio?.segments?f.pageAudio.segments:p&&p.length>0?p:[],[f,p]);(0,t.useEffect)(()=>{let e=null;return o&&w===null&&re&&ie&&(e=setTimeout(()=>{j()},750)),!o&&w===!0&&(d?.onAudioPaused?.(l,r._id),C.current?.onAbortAudio()),()=>{e&&clearTimeout(e)}},[o,w,re,ie]),(0,t.useEffect)(()=>(O.current=!0,()=>{O.current=!1}),[]),(0,t.useEffect)(()=>{D.current===!0&&w===!1&&o&&d?.onAudioCompleted?.(l,r._id,f?.pageAudio?.mp3??r._id),D.current=w},[w]);let ae=(0,t.useCallback)(async t=>{d?.onWordTapped?.(l,r._id,t.word),S.current.forEach(e=>{e.mediaItem.effect?.timing?.forEach(n=>{t.word===n.word&&e.element.triggerEffect()})});let n=A.findIndex(e=>e.word===t.word&&e.start===t.start);if(n>-1){let t=A[n];x([n]),await e.t((t.end-t.start)*1e3+500),O.current&&x([])}},[d,l,r._id,A]),oe=(0,t.useCallback)(e=>{if(!e)return;d?.onAnimationTriggered?.(l,r._id,e._id,e.effect?.type);let{effect:t}=e,n=[],i=[];t?.timing?.forEach(e=>{let t=A.findIndex(t=>t.word===e.word&&t.start===e.start);t>-1&&(n.push(t),i.push({...e,index:t}),ae(e))})},[d,l,r._id,A,ae]),j=(0,t.useCallback)(async()=>{C.current?.isPlaying||(S.current.forEach(e=>{e.mediaItem?.effect?.timing?.forEach(t=>{setTimeout(()=>{e.element?.triggerEffect()},t.start*1e3)})}),C.current?.onPlay(),d?.onAudioPlayed?.(l,r._id,f?.pageAudio?.mp3??r._id))},[d,l,r._id,f]),se=_??Eo,M=se.left*a/100,N=se.top*a/100,P=1200*a/100,ce=A.length>0?g===te.DYNAMIC?(0,i.jsx)(`div`,{className:`page-text-overlay`,dir:s.toLowerCase(),style:{left:0,top:0,transform:`translate(${M}px, ${N}px)`,width:v?.textWidth?`${v.textWidth*a/100}px`:`fit-content`,maxWidth:`${P}px`},children:(0,i.jsx)(`div`,{style:{display:`inline-block`,width:v?.textWidth?`100%`:void 0,padding:`6px 8px`,fontSize:v?.fontSize??Do,lineHeight:1.2,backgroundColor:v?.background??`transparent`,color:v?.color??`inherit`,whiteSpace:v?.textWidth?`normal`:`nowrap`,wordBreak:v?.textWidth?`break-word`:void 0,boxSizing:`border-box`},children:(0,i.jsx)(E,{onWordSelect:ae,segments:A,pageAudio:f?.pageAudio?.path?f.pageAudio:null,ref:C,setIsPlaying:T,highlightIds:b,textDirection:s})})}):(0,i.jsx)(`div`,{className:`pagetext-wrapper`,children:(0,i.jsx)(`div`,{className:`textwrapper-inner`,children:(0,i.jsx)(`div`,{className:`textcontainer`,dir:s.toLowerCase(),children:(0,i.jsx)(E,{onWordSelect:ae,segments:A,pageAudio:f?.pageAudio?.path?f.pageAudio:null,ref:C,setIsPlaying:T,highlightIds:b,textDirection:s})})})}):null;return o?(0,i.jsxs)(`div`,{className:` pageContentWrapper ${y}`,dir:s.toLowerCase(),children:[m&&(0,i.jsx)(ne,{background:m}),f&&(0,i.jsx)(`button`,{disabled:w===!0,onClick:j,"aria-label":w?`Audio is playing`:`Play audio`,className:`ui btn audioplay ${w?`playing`:``}`,children:(0,i.jsx)(ee,{size:`50%`,className:`${w?`playing`:``}`})}),h&&h.map((e,t)=>e.effect?(0,i.jsx)(k,{item:e,screenScale:a,children:(0,i.jsx)(Co,{screenScale:a,item:e,onMediaClick:oe,ref:n=>{S.current[t]={element:n,mediaItem:e}}})},e.id):(0,i.jsxs)(k,{item:e,screenScale:a,children:[e.mediaType===`lottie`&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Co,{item:e,screenScale:a,onMediaClick:oe,ref:n=>{S.current[t]={element:n,mediaItem:e}}})}),e.mediaType!==`lottie`&&(0,i.jsx)(To,{path:e.path,mediaType:e.mediaType})]},e.id)),ce]}):(0,i.jsxs)(`div`,{className:`pageContentWrapper ${y}`,inert:!0,tabIndex:-1,"aria-hidden":`true`,children:[m&&(0,i.jsx)(ne,{background:m}),ce]})},ko=1280,Ao=600,jo=ko/Ao,Mo=({id:l,analytics:u,fonts:d=[],bookSource:f={type:`static`,staticFolder:`GDLBookContent`}})=>{let[p,m]=(0,t.useState)(null),[h,g]=(0,t.useState)(null),[_,v]=(0,t.useState)(null),[y,b]=(0,t.useState)(null),x=s(d,p?.language),S=c(x),C=x[0]?.family||`Quicksand`,w=p?.illustration&&p.illustration.path||p?.coverText&&p.coverText!==``,ee=p?.credits&&p.credits?.text||p?.credits?.logos&&p.credits?.logos.length>0,[te,ne]=(0,t.useState)({width:0,height:0}),{width:E,height:D}=te,O=p?.config.textDirection||`LTR`;(0,t.useEffect)(()=>{let e=()=>{ne({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]);let k=100,re={width:ko,height:Ao};return(E<ko||D<Ao)&&(Ao/D>ko/E?(re={height:D,width:D*jo},k=D/Ao*100):(re={width:E,height:E/jo},k=E/ko*100)),(0,t.useEffect)(()=>{!p&&l&&(async e=>{let t=f.type===`api`?`${f.apiHost}/api/book?slug=${e}`:`/${f.staticFolder}/${e}/content.json`;try{let n=await fetch(t,{cache:`no-store`});if(!n.ok)throw Error(`Error fetching data for (${e}): ${n.status}`);let r=await n.json();m(r),g(null),navigator.onLine&&u?.onBookOpened&&u.onBookOpened(r._id,r.title)}catch(t){console.error(t),m(null),g(`Error fetching data for (${e}): ${t instanceof Error?t.message:`Unknown error`}`)}})(l)},[l]),h?(0,i.jsxs)(`p`,{role:`alert`,className:`player`,children:[`Error: `,h]}):!p||!l?(0,i.jsx)(`p`,{role:`status`,className:`player`,children:`Loading...`}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`style`,{children:`:root, :host, .player { --player-font-family: '${o(C)}'; }${S}${a}`}),(0,i.jsx)(e.i,{bookId:p._id,slug:p.slug,assetConfig:f,analytics:u,children:(0,i.jsx)(`div`,{className:`player`,children:(0,i.jsx)(`div`,{className:`view-box`,children:(0,i.jsxs)(n.Swiper,{onSlideChange:e=>{v(e.activeIndex),p&&(u?.onPageTurned&&u.onPageTurned(p._id,e.activeIndex),e.isEnd&&u?.onBookCompleted&&u.onBookCompleted(p._id,p.title))},className:`mySwiper swiper-container`,speed:1200,dir:O.toLowerCase()??`ltr`,modules:[r.Pagination],pagination:{clickable:!1,type:`progressbar`},onSwiper:e=>{b(e)},style:{...re},a11y:{enabled:!0,prevSlideMessage:`Previous page`,nextSlideMessage:`Next page`},children:[w&&(0,i.jsx)(n.SwiperSlide,{"data-hash":`cover`,children:({isActive:t})=>(0,i.jsxs)(`div`,{className:`cover-page`,inert:t?void 0:!0,children:[(0,i.jsx)(`div`,{className:`cover-illustration`,children:p.illustration?.path&&(0,i.jsx)(`img`,{src:e.n({bookId:p._id,slug:p.slug,assetConfig:f},p.illustration),alt:p.title})}),(0,i.jsxs)(`div`,{className:`cover-text`,dir:O.toLowerCase()||`ltr`,children:[(0,i.jsx)(`h1`,{children:p.title}),p.coverText&&(0,i.jsx)(`small`,{children:p.coverText})]})]})}),p.body.map(e=>(0,i.jsx)(n.SwiperSlide,{className:`overflow-hidden`,"data-hash":e._id,children:({isActive:t})=>(0,i.jsx)(Oo,{screenScale:k,page:e,isActive:t,textDirection:O})},e._id)),ee&&(0,i.jsx)(n.SwiperSlide,{"data-hash":`credits`,children:({isActive:e})=>(0,i.jsxs)(`div`,{className:`credits-page`,inert:e?void 0:!0,children:[(0,i.jsx)(`div`,{className:`credits-page-inner`,children:p.credits?.logos.map(e=>(0,i.jsx)(`div`,{className:`logo-item`,children:(0,i.jsx)(`img`,{src:f.type===`api`?`${f.assetsHost}/logos/${e}.jpg`:`/${f.staticFolder}/${p.slug}/assets/${e}.jpg`,alt:e})},e))}),(0,i.jsxs)(`div`,{className:`credits-page-bottom`,dir:O.toLowerCase()||`ltr`,children:[(0,i.jsxs)(`h1`,{children:[`"`,p.title,`" credits`]}),p.credits?.text&&(0,i.jsx)(`small`,{children:p.credits.text})]})]})}),y&&y.slides.length>1&&(0,i.jsx)(T,{isFirst:y.isBeginning===!0,isLast:y.isEnd===!0,activeIndex:_,textDirection:O})]})})})})]})};exports.Player=Mo;
|
|
3
|
+
`?(0,i.jsx)(`br`,{}):(0,i.jsx)(`span`,{className:`word`,children:t.word}),r<n.length-1&&(0,i.jsx)(i.Fragment,{children:` `}),t.mp3&&(0,i.jsx)(`audio`,{preload:`none`,ref:e=>{p.current[r]=e},children:(0,i.jsx)(`source`,{src:`${e.r(m,t)}`,type:`audio/mpeg`})})]},t.uid))})})}),D=e=>e/600*100,O=e=>e/1280*100,k=({item:e,screenScale:t,children:n,onActivate:r})=>{let{position:a,scaleSize:o}=e,{top:s,left:c}=a,l=!!e.effect?.type||e.mediaType===`lottie`;return(0,i.jsx)(`div`,{className:`absolute ${e.mirror?`mirror-item`:``}`,style:{zIndex:e.zIndex||10,width:`${e.width*o/100*t/100}px`,height:e.height===0?`auto`:`${e.height*o/100*t/100}px`,top:`${D(s)}%`,left:`${O(c)}%`},...l?{role:`button`,tabIndex:0,"aria-label":e.name,onClick:r,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r?.())}}:{"aria-hidden":!0},children:n&&n})};k.displayName=`MediaItemWrapper`;var re={display:`block`,width:`100%`,height:`100%`},ie=({item:e,children:n,effectCallback:r,onEffectEnd:a,onEffectStart:o,ref:s})=>{let[c,l]=(0,t.useState)(!1),u=(0,t.useRef)(!1),d=(t=!0)=>{!c&&!u.current&&(u.current=!0,l(!0),o&&o(),!t&&r&&r(e),u.current=!1,l(!1),a&&a())};return(0,t.useImperativeHandle)(s,()=>({triggerEffect:d,setBusy:l,busy:c}),[c]),(0,i.jsx)(`div`,{onClick:e=>{e.stopPropagation(),d(!1)},style:re,children:n})};function A(e){let n=(0,t.useRef)(null);return n.current===null&&(n.current=e()),n.current}function ae(e,t){e.indexOf(t)===-1&&e.push(t)}function oe(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var j=(e,t,n)=>n>t?t:n<e?e:n;function se(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}var M=()=>{},N=()=>{};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(M=(e,t,n)=>{!e&&typeof console<`u`&&console.warn(se(t,n))},N=(e,t,n)=>{if(!e)throw Error(se(t,n))});var P={},ce=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),le=e=>typeof e==`object`&&!!e,ue=e=>/^0[^.\s]+$/u.test(e);function de(e){let t;return()=>(t===void 0&&(t=e()),t)}var F=e=>e,fe=(...e)=>e.reduce((e,t)=>n=>t(e(n))),pe=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},me=class{constructor(){this.subscriptions=[]}add(e){return ae(this.subscriptions,e),()=>oe(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},I=e=>e*1e3,L=e=>e/1e3,he=(e,t)=>t?1e3/t*e:0,ge=new Set;function _e(e,t,n){e||ge.has(t)||(console.warn(se(t,n)),ge.add(t))}var ve=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ye=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,be=1e-7,xe=12;function Se(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=ye(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>be&&++s<xe);return o}function Ce(e,t,n,r){if(e===t&&n===r)return F;let i=t=>Se(t,0,1,e,n);return e=>e===0||e===1?e:ye(i(e),t,r)}var we=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Te=e=>t=>1-e(1-t),Ee=Ce(.33,1.53,.69,.99),De=Te(Ee),Oe=we(De),ke=e=>e>=1?1:(e*=2)<1?.5*De(e):.5*(2-2**(-10*(e-1))),Ae=e=>1-Math.sin(Math.acos(e)),je=Te(Ae),Me=we(Ae),Ne=Ce(.42,0,1,1),Pe=Ce(0,0,.58,1),Fe=Ce(.42,0,.58,1),Ie=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Le(e,t){return Ie(e)?e[ve(0,e.length,t)]:e}var Re=e=>Array.isArray(e)&&typeof e[0]==`number`,ze={linear:F,easeIn:Ne,easeInOut:Fe,easeOut:Pe,circIn:Ae,circInOut:Me,circOut:je,backIn:De,backInOut:Oe,backOut:Ee,anticipate:ke},Be=e=>typeof e==`string`,Ve=e=>{if(Re(e)){N(e.length===4,`Cubic bezier arrays must contain four numerical values.`,`cubic-bezier-length`);let[t,n,r,i]=e;return Ce(t,n,r,i)}else if(Be(e))return N(ze[e]!==void 0,`Invalid easing type '${e}'`,`invalid-easing-type`),ze[e];return e},He=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Ue={value:null,addProjectionMetrics:null};function We(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Ue.value&&Ue.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ge=40;function Ke(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=He.reduce((e,n)=>(e[n]=We(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=P.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ge),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:He.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<He.length;t++)o[He[t]].cancel(e)},state:i,steps:o}}var{schedule:R,cancel:qe,state:Je,steps:Ye}=Ke(typeof requestAnimationFrame<`u`?requestAnimationFrame:F,!0),Xe;function Ze(){Xe=void 0}var z={now:()=>(Xe===void 0&&z.set(Je.isProcessing||P.useManualTiming?Je.timestamp:performance.now()),Xe),set:e=>{Xe=e,queueMicrotask(Ze)}},Qe={layout:0,mainThread:0,waapi:0},$e=e=>t=>typeof t==`string`&&t.startsWith(e),et=$e(`--`),tt=$e(`var(--`),nt=e=>tt(e)?rt.test(e.split(`/*`)[0].trim()):!1,rt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function it(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var B={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},at={...B,transform:e=>j(0,1,e)},ot={...B,default:1},st=e=>Math.round(e*1e5)/1e5,ct=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function lt(e){return e==null}var ut=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dt=(e,t)=>n=>!!(typeof n==`string`&&ut.test(n)&&n.startsWith(e)||t&&!lt(n)&&Object.prototype.hasOwnProperty.call(n,t)),ft=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(ct);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},pt=e=>j(0,255,e),mt={...B,transform:e=>Math.round(pt(e))},V={test:dt(`rgb`,`red`),parse:ft(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+mt.transform(e)+`, `+mt.transform(t)+`, `+mt.transform(n)+`, `+st(at.transform(r))+`)`};function ht(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var gt={test:dt(`#`),parse:ht,transform:V.transform},_t=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),H=_t(`deg`),U=_t(`%`),W=_t(`px`),vt=_t(`vh`),yt=_t(`vw`),bt={...U,parse:e=>U.parse(e)/100,transform:e=>U.transform(e*100)},G={test:dt(`hsl`,`hue`),parse:ft(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+U.transform(st(t))+`, `+U.transform(st(n))+`, `+st(at.transform(r))+`)`},K={test:e=>V.test(e)||gt.test(e)||G.test(e),parse:e=>V.test(e)?V.parse(e):G.test(e)?G.parse(e):gt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?V.transform(e):G.transform(e),getAnimatableNone:e=>{let t=K.parse(e);return t.alpha=0,K.transform(t)}},xt=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function St(e){return isNaN(e)&&typeof e==`string`&&(e.match(ct)?.length||0)+(e.match(xt)?.length||0)>0}var Ct=`number`,wt=`color`,Tt=`var`,Et=`var(`,Dt="${}",Ot=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function q(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Ot,e=>(K.test(e)?(r.color.push(a),i.push(wt),n.push(K.parse(e))):e.startsWith(Et)?(r.var.push(a),i.push(Tt),n.push(e)):(r.number.push(a),i.push(Ct),n.push(parseFloat(e))),++a,Dt)).split(Dt),indexes:r,types:i}}function kt(e){return q(e).values}function At({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===Ct?i+=st(r[a]):e===wt?i+=K.transform(r[a]):i+=r[a]}return i}}function jt(e){return At(q(e))}var Mt=e=>typeof e==`number`?0:K.test(e)?K.getAnimatableNone(e):e,Nt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Mt(e);function Pt(e){let t=q(e);return At(t)(t.values.map((e,n)=>Nt(e,t.split[n])))}var J={test:St,parse:kt,createTransformer:jt,getAnimatableNone:Pt};function Ft(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function It({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ft(s,r,e+1/3),a=Ft(s,r,e),o=Ft(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Lt(e,t){return n=>n>0?t:e}var Rt=(e,t,n)=>e+(t-e)*n,zt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Bt=[gt,V,G],Vt=e=>Bt.find(t=>t.test(e));function Ht(e){let t=Vt(e);if(M(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,`color-not-animatable`),!t)return!1;let n=t.parse(e);return t===G&&(n=It(n)),n}var Ut=(e,t)=>{let n=Ht(e),r=Ht(t);if(!n||!r)return Lt(e,t);let i={...n};return e=>(i.red=zt(n.red,r.red,e),i.green=zt(n.green,r.green,e),i.blue=zt(n.blue,r.blue,e),i.alpha=Rt(n.alpha,r.alpha,e),V.transform(i))},Wt=new Set([`none`,`hidden`]);function Gt(e,t){return Wt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Kt(e,t){return n=>Rt(e,t,n)}function qt(e){return typeof e==`number`?Kt:typeof e==`string`?nt(e)?Lt:K.test(e)?Ut:Zt:Array.isArray(e)?Jt:typeof e==`object`?K.test(e)?Ut:Yt:Lt}function Jt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>qt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Yt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=qt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Xt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Zt=(e,t)=>{let n=J.createTransformer(t),r=q(e),i=q(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Wt.has(e)&&!i.values.length||Wt.has(t)&&!r.values.length?Gt(e,t):fe(Jt(Xt(r,i),i.values),n):(M(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,`complex-values-different`),Lt(e,t))};function Qt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Rt(e,t,n):qt(e)(e,t)}var $t=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>R.update(t,e),stop:()=>qe(t),now:()=>Je.isProcessing?Je.timestamp:z.now()}},en=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},tn=2e4;function nn(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function rn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(nn(r),tn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:L(i)}}var Y={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function an(e,t){return e*Math.sqrt(1-t*t)}var on=12;function sn(e,t,n){let r=n;for(let n=1;n<on;n++)r-=e(r)/t(r);return r}var cn=.001;function ln({duration:e=Y.duration,bounce:t=Y.bounce,velocity:n=Y.velocity,mass:r=Y.mass}){let i,a;M(e<=I(Y.maxDuration),`Spring duration must be 10 seconds or less`,`spring-duration-limit`);let o=1-t;o=j(Y.minDamping,Y.maxDamping,o),e=j(Y.minDuration,Y.maxDuration,L(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=an(t,o),c=Math.exp(-i);return cn-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=an(t**2,o);return(-i(t)+cn>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=sn(i,a,s);if(e=I(e),isNaN(c))return{stiffness:Y.stiffness,damping:Y.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var un=[`duration`,`bounce`],dn=[`stiffness`,`damping`,`mass`];function fn(e,t){return t.some(t=>e[t]!==void 0)}function pn(e){let t={velocity:Y.velocity,stiffness:Y.stiffness,damping:Y.damping,mass:Y.mass,isResolvedFromDuration:!1,...e};if(!fn(e,dn)&&fn(e,un))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*j(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Y.mass,stiffness:i,damping:a}}else{let n=ln({...e,velocity:0});t={...t,...n,mass:Y.mass},t.isResolvedFromDuration=!0}return t}function mn(e=Y.visualDuration,t=Y.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=pn({...n,velocity:-L(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=L(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Y.restSpeed.granular:Y.restSpeed.default,i||=v?Y.restDelta.granular:Y.restDelta.default;let y,b,x,S,C,w;if(h<1)x=an(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>I(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=I(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=I(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(nn(T),tn),t=en(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}mn.applyToOptions=e=>{let t=rn(e,100,mn);return e.ease=t.ease,e.duration=I(t.duration),e.type=`keyframes`,e};var hn=5;function gn(e,t,n){let r=Math.max(t-hn,0);return he(n-e(r),t-r)}function _n({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=mn({keyframes:[f.value,m(f.value)],velocity:gn(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function vn(e,t,n){let r=[],i=n||P.mix||Qt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=fe(Array.isArray(t)?t[n]||F:t,a)),r.push(a)}return r}function yn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(N(a===t.length,`Both input and output ranges must be the same length`,`range-length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=vn(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=pe(e[r],e[r+1],n);return s[r](i)};return n?t=>l(j(e[0],e[a-1],t)):l}function bn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=pe(0,t,r);e.push(Rt(n,1,i))}}function xn(e){let t=[0];return bn(t,e.length-1),t}function Sn(e,t){return e.map(e=>e*t)}function Cn(e,t){return e.map(()=>t||Fe).splice(0,e.length-1)}function wn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Ie(r)?r.map(Ve):Ve(r),a={done:!1,value:t[0]},o=yn(Sn(n&&n.length===t.length?n:xn(t),e),t,{ease:Array.isArray(i)?i:Cn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Tn=e=>e!==null;function En(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(Tn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var Dn={decay:_n,inertia:_n,tween:wn,keyframes:wn,spring:mn};function On(e){typeof e.type==`string`&&(e.type=Dn[e.type])}var kn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},An=e=>e/100,jn=class extends kn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==z.now()&&this.tick(z.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Qe.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;On(e);let{type:t=wn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||wn;process.env.NODE_ENV!==`production`&&s!==wn&&N(o.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`,`spring-two-frames`),s!==wn&&typeof o[0]!=`number`&&(this.mixKeyframes=fe(An,Qt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=nn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=j(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==_n&&(b.value=En(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return L(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+L(e)}get time(){return L(this.currentTime)}set time(e){e=I(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return gn(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(z.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=L(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=$t,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(z.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Qe.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Mn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var X=e=>e*180/Math.PI,Nn=e=>Fn(X(Math.atan2(e[1],e[0]))),Pn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Nn,rotateZ:Nn,skewX:e=>X(Math.atan(e[1])),skewY:e=>X(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Fn=e=>(e%=360,e<0&&(e+=360),e),In=Nn,Ln=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Rn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ln,scaleY:Rn,scale:e=>(Ln(e)+Rn(e))/2,rotateX:e=>Fn(X(Math.atan2(e[6],e[5]))),rotateY:e=>Fn(X(Math.atan2(-e[2],e[0]))),rotateZ:In,rotate:In,skewX:e=>X(Math.atan(e[4])),skewY:e=>X(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Bn(e){return+!!e.includes(`scale`)}function Vn(e,t){if(!e||e===`none`)return Bn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=zn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Pn,i=t}if(!i)return Bn(t);let a=r[t],o=i[1].split(`,`).map(Un);return typeof a==`function`?a(o):o[a]}var Hn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Vn(n,t)};function Un(e){return parseFloat(e.trim())}var Wn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Gn=new Set([...Wn,`pathRotation`]),Kn=e=>e===B||e===W,qn=new Set([`x`,`y`,`z`]),Jn=Wn.filter(e=>!qn.has(e));function Yn(e){let t=[];return Jn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var Z={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Vn(t,`x`),y:(e,{transform:t})=>Vn(t,`y`)};Z.translateX=Z.x,Z.translateY=Z.y;var Q=new Set,Xn=!1,Zn=!1,Qn=!1;function $n(){if(Zn){let e=Array.from(Q).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Yn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Zn=!1,Xn=!1,Q.forEach(e=>e.complete(Qn)),Q.clear()}function er(){Q.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Zn=!0)})}function tr(){Qn=!0,er(),$n(),Qn=!1}var nr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Q.add(this),Xn||(Xn=!0,R.read(er),R.resolveKeyframes($n))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Mn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Q.delete(this)}cancel(){this.state===`scheduled`&&(Q.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},rr=e=>e.startsWith(`--`);function ir(e,t,n){rr(t)?e.style.setProperty(t,n):e.style[t]=n}var ar={};function or(e,t){let n=de(e);return()=>ar[t]??n()}var sr=or(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),cr=or(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),lr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ur={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:lr([0,.65,.55,1]),circOut:lr([.55,0,1,.45]),backIn:lr([.31,.01,.66,-.59]),backOut:lr([.33,1.53,.69,.99])};function dr(e,t){if(e)return typeof e==`function`?cr()?en(e,t):`ease-out`:Re(e)?lr(e):Array.isArray(e)?e.map(e=>dr(e,t)||ur.easeOut):ur[e]}function fr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=dr(s,i);Array.isArray(d)&&(u.easing=d),Ue.value&&Qe.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Ue.value&&p.finished.finally(()=>{Qe.waapi--}),p}function pr(e){return typeof e==`function`&&`applyToOptions`in e}function mr({type:e,...t}){return pr(e)&&cr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var hr=class extends kn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,N(typeof e.type!=`string`,`Mini animate() doesn't support "type" as a string.`,`mini-spring`);let c=mr(e);this.animation=fr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=En(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ir(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return L(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+L(e)}get time(){return L(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=I(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&sr()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),F):r(this)}},gr={anticipate:ke,backInOut:Oe,circInOut:Me};function _r(e){return e in gr}function vr(e){typeof e.ease==`string`&&_r(e.ease)&&(e.ease=gr[e.ease])}var yr=10,br=class extends hr{constructor(e){vr(e),On(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new jn({...a,autoplay:!1}),s=Math.max(yr,z.now()-this.startTime),c=j(0,yr,s-yr),l=o.sample(s).value,{name:u}=this.options;i&&u&&ir(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},xr=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(J.test(e)||e===`0`)&&!e.startsWith(`url(`));function Sr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Cr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=xr(i,t),s=xr(a,t);return M(o===s,`You are trying to animate ${t} from "${i}" to "${a}". "${o?a:i}" is not an animatable value.`,`value-not-animatable`),!o||!s?!1:Sr(e)||(n===`spring`||pr(n))&&r}function wr(e){e.duration=0,e.type=`keyframes`}var Tr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Er=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Dr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Er.test(e[t]))return!0;return!1}var Or=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),kr=de(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Ar(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return kr()&&n&&(Tr.has(n)||Or.has(n)&&Dr(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var jr=40,Mr=class extends kn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=z.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||nr;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=z.now();let u=!0;Cr(e,i,a,o)||(u=!1,(P.instantAnimations||!s)&&l?.(En(e,n,t)),e[0]=e[e.length-1],wr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>jr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Ar(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new br({...d,element:p})}catch{m=new jn(d)}else m=new jn(d);m.finished.then(()=>{this.notifyFinished()}).catch(F),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),tr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}},Nr=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return Pr(this.animations,`duration`)}get iterationDuration(){return Pr(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function Pr(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var Fr=class extends Nr{then(e,t){return this.finished.finally(e).then(()=>{})}},Ir=30,Lr=e=>!isNaN(parseFloat(e)),Rr={current:void 0},zr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=z.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!==`production`&&_e(!1,`value.onChange(callback) is deprecated. Switch to value.on("change", callback).`),this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new me);let n=this.events[e].add(t);return e===`change`?()=>{n(),R.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Rr.current&&Rr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ir)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Ir);return he(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Br(e,t){return new zr(e,t)}function Vr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Hr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Vr(n,e)}var Ur={type:`spring`,stiffness:500,damping:25,restSpeed:10},Wr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gr={type:`keyframes`,duration:.8},Kr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},qr=(e,{keyframes:t})=>t.length>2?Gr:Gn.has(e)?e.startsWith(`scale`)?Wr(t[1]):Ur:Kr,Jr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Yr(e){for(let t in e)if(!Jr.has(t))return!0;return!1}var Xr=(e,t,n,r={},i,a)=>o=>{let s=Hr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=I(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Yr(s)||Object.assign(u,qr(e,u)),u.duration&&=I(u.duration),u.repeatDelay&&=I(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(wr(u),u.delay===0&&(d=!0)),(P.instantAnimations||P.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,wr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=En(u.keyframes,s);if(e!==void 0){R.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new jn(u):new Mr(u)},Zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qr(e){let t=Zr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var $r=4;function ei(e,t,n=1){N(n<=$r,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,`max-css-var-depth`);let[r,i]=Qr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return ce(e)?parseFloat(e):e}return nt(i)?ei(i,t,n+1):i}function ti(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ni(e,t,n,r){if(typeof t==`function`){let[i,a]=ti(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ti(r);t=t(n===void 0?e.custom:n,i,a)}return t}function ri(e,t,n){let r=e.getProps();return ni(r,t,n===void 0?r.custom:n,e)}var ii=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Wn]),ai=e=>Array.isArray(e);function oi(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Br(n))}function si(e){return ai(e)?e[e.length-1]||0:e}function ci(e,t){let{transitionEnd:n={},transition:r={},...i}=ri(e,t)||{};i={...i,...n};for(let t in i)oi(e,t,si(i[t]))}var $=e=>!!(e&&e.getVelocity);function li(e){return!!($(e)&&e.add)}function ui(e,t){let n=e.getValue(`willChange`);if(li(n))return n.add(t);if(!n&&P.WillChange){let n=new P.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function di(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var fi=`data-`+di(`framerAppearId`);function pi(e){return e.props[fi]}function mi({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Vr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&mi(f,t))continue;let o={delay:n,...Hr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){R.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=pi(e);if(n){let e=window.MotionHandoffAnimation(n,t,R);e!==null&&(o.startTime=e,p=!0)}}ui(e,t);let m=l??e.shouldReduceMotion;r.start(Xr(t,r,i,m&&ii.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>R.update(()=>{o&&ci(e,o)});d.length?Promise.all(d).then(t):t()}return d}var gi={test:e=>e===`auto`,parse:e=>e},_i=e=>t=>t.test(e),vi=[B,W,U,H,yt,vt,gi],yi=e=>vi.find(_i(e));function bi(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||ue(e)}var xi=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Si(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(ct)||[];if(!r)return e;let i=n.replace(r,``),a=+!!xi.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Ci=/\b([a-z-]*)\(.*?\)/gu,wi={...J,getAnimatableNone:e=>{let t=e.match(Ci);return t?t.map(Si).join(` `):e}},Ti={...J,getAnimatableNone:e=>{let t=J.parse(e);return J.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Ei={...B,transform:Math.round},Di={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,rotate:H,pathRotation:H,rotateX:H,rotateY:H,rotateZ:H,scale:ot,scaleX:ot,scaleY:ot,scaleZ:ot,skew:H,skewX:H,skewY:H,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:at,originX:bt,originY:bt,originZ:W,zIndex:Ei,fillOpacity:at,strokeOpacity:at,numOctaves:Ei},Oi={...Di,color:K,backgroundColor:K,outlineColor:K,fill:K,stroke:K,borderColor:K,borderTopColor:K,borderRightColor:K,borderBottomColor:K,borderLeftColor:K,filter:wi,WebkitFilter:wi,mask:Ti,WebkitMask:Ti},ki=e=>Oi[e],Ai=new Set([wi,Ti]);function ji(e,t){let n=ki(e);return Ai.has(n)||(n=J),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Mi=new Set([`auto`,`none`,`0`]);function Ni(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Mi.has(t)&&q(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=ji(n,i)}var Pi=class extends nr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),nt(r))){let i=ei(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!ii.has(n)||e.length!==2)return;let[r,i]=e,a=yi(r),o=yi(i);if(it(r)!==it(i)&&Z[n]){this.needsMeasurement=!0;return}if(a!==o)if(Kn(a)&&Kn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Z[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||bi(e[t]))&&n.push(t);n.length&&Ni(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Z[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Z[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Fi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Ii=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:Li,cancel:Ri}=Ke(queueMicrotask,!1);function zi(e){return le(e)&&`ownerSVGElement`in e}function Bi(e){return zi(e)&&e.tagName===`svg`}var Vi=[...vi,K,J],Hi=e=>Vi.find(_i(e)),Ui=()=>({min:0,max:0}),Wi=()=>({x:Ui(),y:Ui()}),Gi=new WeakMap;function Ki(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function qi(e){return typeof e==`string`||Array.isArray(e)}var Ji=[`initial`,`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`];function Yi(e){return Ki(e.animate)||Ji.some(t=>qi(e[t]))}function Xi(e){return!!(Yi(e)||e.variants)}function Zi(e,t,n){for(let r in t){let i=t[r],a=n[r];if($(i))e.addValue(r,i);else if($(a))e.addValue(r,Br(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Br(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Qi={current:null},$i={current:!1},ea=typeof window<`u`;function ta(){if($i.current=!0,ea)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Qi.current=e.matches;e.addEventListener(`change`,t),t()}else Qi.current=!1}var na=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ra={},ia=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=nr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=z.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,R.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Yi(t),this.isVariantNode=Xi(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&$(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Gi.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:($i.current||ta(),this.shouldReduceMotion=Qi.current),process.env.NODE_ENV!==`production`&&_e(this.shouldReduceMotion!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),qe(this.notifyUpdate),qe(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Tr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new hr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:I(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Gn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&R.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ra){let t=ra[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wi()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<na.length;t++){let n=na[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Zi(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Br(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(ce(n)||ue(n))?n=parseFloat(n):!Hi(n)&&J.test(t)&&(n=ji(e,t)),this.setBaseTarget(e,$(n)?n.get():n)),$(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=ni(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!$(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new me),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Li.render(this.render)}},aa=class extends ia{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;$(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function oa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function sa(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function ca(e,t){return oa(sa(e.getBoundingClientRect(),t))}var la={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ua=Wn.length;function da(e,t,n){let r=``,i=!0;for(let a=0;a<ua;a++){let o=Wn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Ii(s,Di[o]);if(!c){i=!1;let t=la[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Ii(a,Di.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function fa(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Gn.has(e)){o=!0;continue}else if(et(e)){i[e]=n;continue}else{let t=Ii(n,Di[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=da(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function pa(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function ma(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ha={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(W.test(e))e=parseFloat(e);else return e;return`${ma(e,t.target.x)}% ${ma(e,t.target.y)}%`}},ga={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=J.parse(e);if(i.length>5)return r;let a=J.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Rt(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},_a={borderRadius:{...ha,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:ha,borderTopRightRadius:ha,borderBottomLeftRadius:ha,borderBottomRightRadius:ha,boxShadow:ga};function va(e,{layout:t,layoutId:n}){return Gn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!_a[e]||e===`opacity`)}function ya(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)($(r[t])||i&&$(i[t])||va(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function ba(e){return window.getComputedStyle(e)}var xa=class extends aa{constructor(){super(...arguments),this.type=`html`,this.renderInstance=pa}readValueFromInstance(e,t){if(Gn.has(t))return this.projection?.isProjecting?Bn(t):Hn(e,t);{let n=ba(e),r=(et(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ca(e,t)}build(e,t,n){fa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return ya(e,t,n)}};function Sa(e,t){return e in t}var Ca=class extends ia{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Sa(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Wi()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},wa={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ta={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ea(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?wa:Ta;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Da=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Oa(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(fa(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Da)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ea(d,i,a,o,!1)}var ka=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),Aa=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function ja(e,t,n,r){pa(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ka.has(n)?n:di(n),t.attrs[n])}function Ma(e,t,n){let r=ya(e,t,n);for(let n in e)if($(e[n])||$(t[n])){let t=Wn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Na=class extends aa{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Wi}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Gn.has(t)){let e=ki(t);return e&&e.default||0}return t=ka.has(t)?t:di(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Ma(e,t,n)}build(e,t,n){Oa(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){ja(e,t,n,r)}mount(e){this.isSVGTag=Aa(e.tagName),super.mount(e)}};function Pa(e,t,n){let r=$(e)?e:Br(e);return r.start(Xr(``,r,t,n)),r.animation}var Fa=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Ia(e){return(0,t.useEffect)(()=>()=>e(),[])}function La(){!$i.current&&ta();let[e]=(0,t.useState)(Qi.current);return process.env.NODE_ENV!==`production`&&_e(e!==!0,`You have Reduced Motion enabled on your device. Animations may not appear as expected.`,`reduced-motion-disabled`),e}function Ra(){let e=La(),{reducedMotion:n}=(0,t.useContext)(Fa);return n===`never`?!1:n===`always`?!0:e}function za(e){return typeof e==`object`&&!Array.isArray(e)}function Ba(e,t,n,r){return e==null?[]:typeof e==`string`&&za(t)?Fi(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Va(e,t,n){return e*(t+1)+n*t}function Ha(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Ua(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(oe(e,i),r--)}}function Wa(e,t,n,r,i,a){Ua(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Rt(i,a,r[o]),easing:Le(n,o)})}function Ga(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Ka(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var qa=`easeInOut`,Ja=20;function Ya(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,Ha(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Ha(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Qa(e),{delay:l=0,times:u=xn(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=pr(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&to(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=I(b));let r=rn(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&bn(u,T),c.length===1&&c.unshift(null),m&&M(m<Ja,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Ja} or apply repeat at the sequence level instead.`),m&&m<Ja){let e=b>0?_/b:0;b=Va(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?Te(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:Le(f,e-1))}Ga(u,m,e)}let ee=w+b;Wa(r,c,y,u,w,ee),g=Math.max(x+b,g),f=Math.max(ee,f)};if($(p)){let e=Xa(p,s);_(m,h,Za(`default`,e))}else{let e=Ba(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Xa(r,s);for(let e in m)_(m[e],$a(h,e),Za(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Ka);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(pe(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(qa)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Xa(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Za(e,t){return t[e]||(t[e]=[]),t[e]}function Qa(e){return Array.isArray(e)?e:[e]}function $a(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var eo=e=>typeof e==`number`,to=e=>e.every(eo);function no(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=zi(e)&&!Bi(e)?new Na(t):new xa(t);n.mount(e),Gi.set(e,n)}function ro(e){let t=new Ca({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Gi.set(e,t)}function io(e,t){return $(e)||typeof e==`number`||typeof e==`string`&&!za(t)}function ao(e,t,n,r){let i=[];if(io(e,t))i.push(Pa(e,za(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Ba(e,t,r),o=a.length;N(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?no:ro;Gi.has(r)||s(r);let c=Gi.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...hi(c,{...t,transition:l},{}))}}return i}function oo(e,t,n){let r=[];return Ya(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=Br(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:mn}).forEach(({keyframes:e,transition:t},n)=>{r.push(...ao(n,e,t))}),r}function so(e){return Array.isArray(e)&&e.some(Array.isArray)}function co(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),so(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=oo(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=ao(e,i,{...c,...r},t)}let l=new Fr(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{oe(t.animations,l)})),l}return i}co();function lo(){let e=A(()=>({current:null,animations:[]})),n=Ra()??void 0,{skipAnimations:r}=(0,t.useContext)(Fa),i=(0,t.useMemo)(()=>co({scope:e,reduceMotion:n,skipAnimations:r}),[e,n,r]);return Ia(()=>{e.animations.forEach(e=>e.stop()),e.animations.length=0}),[e,i]}var uo={display:`block`,width:`100%`,height:`100%`},fo=({item:e,children:n,effectCallback:r,onEffectStart:a,ref:o})=>{let[s,c]=lo(),[l,u]=(0,t.useState)(!1),d=(0,t.useRef)(!1),f=(t=!0)=>{if(!t&&r&&r(e),!l&&!d.current){if(!s.current)return;d.current=!0,u(!0),a&&a(),c(s.current,{y:[0,-55,0],scaleX:[1,1.15,.9,1]},{duration:.8,repeat:1,repeatType:`loop`}).then(()=>{u(!1),d.current=!1}).catch(()=>{u(!1),d.current=!1})}};return(0,t.useImperativeHandle)(o,()=>({triggerEffect:f,setBusy:u,busy:l}),[l]),(0,i.jsx)(`div`,{ref:s,onClick:e=>{e.stopPropagation(),f(!1)},style:uo,children:n})},po=({children:e,position:n={from:0,to:0},screenScale:r,settings:a,onEffectEnd:o,onEffectStart:s,ref:c})=>{let[l,u]=lo(),d=(0,t.useRef)(!1),f=()=>{if(!l.current)return;s&&s();let e=d.current?0:(n.to-n.from)*r/100;d.current=!d.current,u(l.current,{x:e},{duration:a.duration||2,delay:.1}).then(()=>{o&&o()}).catch(()=>{d.current=!d.current})};return(0,t.useImperativeHandle)(c,()=>({triggerEffect:f})),(0,i.jsx)(`div`,{ref:l,onClick:e=>{e.stopPropagation(),f()},children:e})},mo={display:`block`,width:`100%`,height:`100%`},ho=({item:e,children:n,effectCallback:r,onEffectEnd:a,onEffectStart:o,ref:s})=>{let[c,l]=lo(),[u,d]=(0,t.useState)(!1),f=(0,t.useRef)(!1),p=(t=!0)=>{if(!t&&r&&r(e),!u&&!f.current){if(!c.current)return;f.current=!0,d(!0),o&&o(),l(c.current,{boxShadow:[`0px 0px 20px 10px rgba(209, 174, 34, 0)`,`0px 0px 20px 10px rgba(209, 174, 34, 0.8)`,`0px 0px 20px 10px rgba(209, 174, 34, 0)`],scale:[1,1.1,.9,1]},{duration:1}).then(()=>{d(!1),f.current=!1,a&&a()}).catch(()=>{d(!1),f.current=!1})}};return(0,t.useImperativeHandle)(s,()=>({triggerEffect:p,setBusy:d,busy:u}),[u]),(0,i.jsx)(`div`,{ref:c,onClick:e=>{e.stopPropagation(),p(!1)},style:{...mo,borderRadius:`100%`},children:n})},go={display:`block`,width:`100%`,height:`100%`},_o=({item:e,screenScale:n,children:r,effectCallback:a,onEffectEnd:o,onEffectStart:s,ref:c})=>{let l=e.scaleSize/100*(n-10)/100,[u,d]=lo(),[f,p]=(0,t.useState)(!1),m=(0,t.useRef)(!1),h=(t=!0)=>{if(!t&&a&&a(e),!f&&!m.current){if(!u.current)return;m.current=!0,s&&s(),d(u.current,{rotate:[0,-1*l,1*l,0],x:[0,-2*l,-4*l,0],y:[0,-8*l,-4*l,0]},{repeat:4,duration:.15}).then(()=>{p(!1),m.current=!1,o&&o()}).catch(()=>{p(!1),m.current=!1})}};return(0,t.useImperativeHandle)(c,()=>({triggerEffect:h,setBusy:p,busy:f}),[f]),(0,i.jsx)(`div`,{ref:u,onClick:e=>{e.stopPropagation(),h(!1)},style:go,children:r})},vo={display:`block`,width:`100%`,height:`100%`},yo=({item:e,children:n,effectCallback:r,onEffectEnd:a,onEffectStart:o,ref:s})=>{let c=e.scaleSize/100,[l,u]=lo(),[d,f]=(0,t.useState)(!1),p=(0,t.useRef)(!1),m=(t=!0)=>{if(!t&&r&&r(e),!d&&!p.current){if(!l.current)return;p.current=!0,f(!0),o&&o(),u(l.current,{y:[0,-10*c,-30*c,-34*c,0],scaleY:[1,1.1,1.2,1.1,1]},{delay:.1,repeatType:`reverse`,duration:.5*c}).then(()=>{f(!1),p.current=!1,a&&a()}).catch(()=>{f(!1),p.current=!1})}};return(0,t.useImperativeHandle)(s,()=>({triggerEffect:m,setBusy:f,busy:d}),[d]),(0,i.jsx)(`div`,{ref:l,onClick:e=>{e.stopPropagation(),m(!1)},style:vo,children:n})},bo=t.default.lazy(()=>Promise.resolve().then(()=>require("./dolottie-C7QXtKyz.cjs"))),xo=t.default.lazy(()=>Promise.resolve().then(()=>require("./Image-DBMEc_qA.cjs"))),So=({item:n,screenScale:r,onMediaClick:a,ref:o})=>{let{effect:s,mediaType:c}=n,[l,u]=(0,t.useState)(!1),[d,f]=(0,t.useState)(null),{bookId:p}=e.a(),m=(0,t.useCallback)(()=>{d&&!l&&(u(!0),d.setFrame(0),d.play())},[d,l,p]),h=(0,t.useCallback)(()=>{d&&l&&d.stop(),u(!1)},[d,l]);(0,t.useEffect)(()=>{let e=()=>{(!s||!s.type)&&u(!1)};return d&&d.addEventListener(`complete`,e),()=>{d&&d.removeEventListener(`complete`,e)}},[d,s]);let g=()=>c===`lottie`?(0,i.jsx)(bo,{item:n,play:l,setDotLottie:f}):(0,i.jsx)(xo,{mediaItem:n});return s?.type?s.type===`highlight`?(0,i.jsx)(ho,{item:n,ref:o,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`shake`?(0,i.jsx)(_o,{item:n,ref:o,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`bounce`?(0,i.jsx)(fo,{item:n,ref:o,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`jump`?(0,i.jsx)(yo,{item:n,ref:o,onEffectEnd:h,onEffectStart:m,screenScale:r,effectCallback:a,children:g()}):s.type===`move`?(0,i.jsx)(po,{onEffectEnd:h,onEffectStart:m,ref:o,screenScale:r,position:{from:n.position.left,to:s.settings.to},settings:s.settings,children:g()}):null:(0,i.jsx)(ie,{onEffectEnd:h,onEffectStart:m,item:n,ref:o,screenScale:r,effectCallback:a,children:g()})};So.displayName=`Animation`;var Co=t.default.memo(So),wo=t.default.memo(({path:e,mediaType:t,...n})=>t&&t===`static`?(0,i.jsxs)(`span`,{className:`inline-flex`,children:[(0,i.jsx)(`img`,{src:`${e}`,alt:``,loading:`lazy`,className:`max-w-full max-h-full w-full h-full -z-10`}),(0,i.jsx)(`div`,{className:`swiper-lazy-preloader`})]}):null);wo.displayName=`LazySvg`;var To=t.default.memo(wo),Eo={left:0,top:480},Do=`clamp(18px, 3.8vmin, 34px)`,Oo=({page:r,screenScale:a,isActive:o,textDirection:s=`LTR`})=>{let c=(0,n.useSwiper)(),{bookId:l,slug:u,analytics:d}=e.a(),{audio:f,words:p,background:m,media:h=[],layoutStyle:g=te.BOTTOM,textPosition:_,textStyle:v}=r,y=g===te.BOTTOM?`layout-btm-aligned`:``,[b,x]=(0,t.useState)([]),S=(0,t.useRef)([]),C=(0,t.useRef)(null),[w,T]=(0,t.useState)(null),D=(0,t.useRef)(null),O=(0,t.useRef)(!0),re=navigator?.userActivation.hasBeenActive,ie=c.activeIndex>(c.previousIndex??-1),A=(0,t.useMemo)(()=>f?.pageAudio?.segments?f.pageAudio.segments:p&&p.length>0?p:[],[f,p]);(0,t.useEffect)(()=>{let e=null;return o&&w===null&&re&&ie&&(e=setTimeout(()=>{j()},750)),!o&&w===!0&&(d?.onAudioPaused?.(l,r._id),C.current?.onAbortAudio()),()=>{e&&clearTimeout(e)}},[o,w,re,ie]),(0,t.useEffect)(()=>(O.current=!0,()=>{O.current=!1}),[]),(0,t.useEffect)(()=>{D.current===!0&&w===!1&&o&&d?.onAudioCompleted?.(l,r._id,f?.pageAudio?.mp3??r._id),D.current=w},[w]);let ae=(0,t.useCallback)(async t=>{d?.onWordTapped?.(l,r._id,t.word),S.current.forEach(e=>{e.mediaItem.effect?.timing?.forEach(n=>{t.word===n.word&&e.element.triggerEffect()})});let n=A.findIndex(e=>e.word===t.word&&e.start===t.start);if(n>-1){let t=A[n];x([n]),await e.t((t.end-t.start)*1e3+500),O.current&&x([])}},[d,l,r._id,A]),oe=(0,t.useCallback)(e=>{if(!e)return;d?.onAnimationTriggered?.(l,r._id,e._id,e.effect?.type);let{effect:t}=e,n=[],i=[];t?.timing?.forEach(e=>{let t=A.findIndex(t=>t.word===e.word&&t.start===e.start);t>-1&&(n.push(t),i.push({...e,index:t}),ae(e))})},[d,l,r._id,A,ae]),j=(0,t.useCallback)(async()=>{C.current?.isPlaying||(S.current.forEach(e=>{e.mediaItem?.effect?.timing?.forEach(t=>{setTimeout(()=>{e.element?.triggerEffect()},t.start*1e3)})}),C.current?.onPlay(),d?.onAudioPlayed?.(l,r._id,f?.pageAudio?.mp3??r._id))},[d,l,r._id,f]),se=_??Eo,M=se.left*a/100,N=se.top*a/100,P=1200*a/100,ce=A.length>0?g===te.DYNAMIC?(0,i.jsx)(`div`,{className:`page-text-overlay`,dir:s.toLowerCase(),style:{left:0,top:0,transform:`translate(${M}px, ${N}px)`,width:v?.textWidth?`${v.textWidth*a/100}px`:`fit-content`,maxWidth:`${P}px`},children:(0,i.jsx)(`div`,{style:{display:`inline-block`,width:v?.textWidth?`100%`:void 0,padding:`6px 8px`,fontSize:v?.fontSize??Do,lineHeight:1.2,backgroundColor:v?.background??`transparent`,color:v?.color??`inherit`,whiteSpace:v?.textWidth?`normal`:`nowrap`,wordBreak:v?.textWidth?`break-word`:void 0,boxSizing:`border-box`},children:(0,i.jsx)(E,{onWordSelect:ae,segments:A,pageAudio:f?.pageAudio?.path?f.pageAudio:null,ref:C,setIsPlaying:T,highlightIds:b,textDirection:s})})}):(0,i.jsx)(`div`,{className:`pagetext-wrapper`,children:(0,i.jsx)(`div`,{className:`textwrapper-inner`,children:(0,i.jsx)(`div`,{className:`textcontainer`,dir:s.toLowerCase(),children:(0,i.jsx)(E,{onWordSelect:ae,segments:A,pageAudio:f?.pageAudio?.path?f.pageAudio:null,ref:C,setIsPlaying:T,highlightIds:b,textDirection:s})})})}):null;return o?(0,i.jsxs)(`div`,{className:` pageContentWrapper ${y}`,dir:s.toLowerCase(),children:[m&&(0,i.jsx)(ne,{background:m}),f&&(0,i.jsx)(`button`,{disabled:w===!0,onClick:j,"aria-label":w?`Audio is playing`:`Play audio`,className:`ui btn audioplay ${w?`playing`:``}`,children:(0,i.jsx)(ee,{size:`50%`,className:`${w?`playing`:``}`})}),h&&h.map((e,t)=>e.effect?(0,i.jsx)(k,{item:e,screenScale:a,children:(0,i.jsx)(Co,{screenScale:a,item:e,onMediaClick:oe,ref:n=>{S.current[t]={element:n,mediaItem:e}}})},e.id):(0,i.jsxs)(k,{item:e,screenScale:a,children:[e.mediaType===`lottie`&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(Co,{item:e,screenScale:a,onMediaClick:oe,ref:n=>{S.current[t]={element:n,mediaItem:e}}})}),e.mediaType!==`lottie`&&(0,i.jsx)(To,{path:e.path,mediaType:e.mediaType})]},e.id)),ce]}):(0,i.jsxs)(`div`,{className:`pageContentWrapper ${y}`,inert:!0,tabIndex:-1,"aria-hidden":`true`,children:[m&&(0,i.jsx)(ne,{background:m}),ce]})},ko=1280,Ao=600,jo=ko/Ao,Mo=({id:l,analytics:u,fonts:d=[],bookSource:f={type:`static`,staticFolder:`GDLBookContent`}})=>{let[p,m]=(0,t.useState)(null),[h,g]=(0,t.useState)(null),[_,v]=(0,t.useState)(null),[y,b]=(0,t.useState)(null),x=s(d,p?.language),S=c(x),C=x[0]?.family||`Quicksand`,w=p?.illustration&&p.illustration.path||p?.coverText&&p.coverText!==``,ee=p?.credits&&p.credits?.text||p?.credits?.logos&&p.credits?.logos.length>0,[te,ne]=(0,t.useState)({width:0,height:0}),{width:E,height:D}=te,O=p?.config.textDirection||`LTR`;(0,t.useEffect)(()=>{let e=()=>{ne({width:window.innerWidth,height:window.innerHeight})};return e(),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]);let k=100,re={width:ko,height:Ao};return(E<ko||D<Ao)&&(Ao/D>ko/E?(re={height:D,width:D*jo},k=D/Ao*100):(re={width:E,height:E/jo},k=E/ko*100)),(0,t.useEffect)(()=>{!p&&l&&(async e=>{let t=f.type===`api`?`${f.apiHost}/api/book?slug=${e}`:`/${f.staticFolder}/${e}/content.json`;try{let n=await fetch(t,{cache:`no-store`});if(!n.ok)throw Error(`Error fetching data for (${e}): ${n.status}`);let r=await n.json();m(r),g(null),navigator.onLine&&u?.onBookOpened&&u.onBookOpened(r._id,r.title)}catch(t){console.error(t),m(null),g(`Error fetching data for (${e}): ${t instanceof Error?t.message:`Unknown error`}`)}})(l)},[l]),h?(0,i.jsxs)(`p`,{role:`alert`,className:`player`,children:[`Error: `,h]}):!p||!l?(0,i.jsx)(`p`,{role:`status`,className:`player`,children:`Loading...`}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`style`,{children:`:root, :host, .player { --player-font-family: '${o(C)}'; }${S}${a}`}),(0,i.jsx)(e.i,{bookId:p._id,slug:p.slug,assetConfig:f,analytics:u,children:(0,i.jsx)(`div`,{className:`player`,children:(0,i.jsx)(`div`,{className:`view-box`,children:(0,i.jsxs)(n.Swiper,{onSlideChange:e=>{v(e.activeIndex),p&&(u?.onPageTurned&&u.onPageTurned(p._id,e.activeIndex),e.isEnd&&u?.onBookCompleted&&u.onBookCompleted(p._id,p.title))},className:`mySwiper swiper-container`,speed:1200,dir:O.toLowerCase()??`ltr`,modules:[r.Pagination],pagination:{clickable:!1,type:`progressbar`},onSwiper:e=>{b(e)},style:{...re},a11y:{enabled:!0,prevSlideMessage:`Previous page`,nextSlideMessage:`Next page`},children:[w&&(0,i.jsx)(n.SwiperSlide,{"data-hash":`cover`,children:({isActive:t})=>(0,i.jsxs)(`div`,{className:`cover-page`,inert:t?void 0:!0,children:[(0,i.jsx)(`div`,{className:`cover-illustration`,children:p.illustration?.path&&(0,i.jsx)(`img`,{src:e.n({bookId:p._id,slug:p.slug,assetConfig:f},p.illustration),alt:p.title})}),(0,i.jsxs)(`div`,{className:`cover-text`,dir:O.toLowerCase()||`ltr`,children:[(0,i.jsx)(`h1`,{children:p.title}),p.coverText&&(0,i.jsx)(`small`,{children:p.coverText})]})]})}),p.body.map(e=>(0,i.jsx)(n.SwiperSlide,{className:`overflow-hidden`,"data-hash":e._id,children:({isActive:t})=>(0,i.jsx)(Oo,{screenScale:k,page:e,isActive:t,textDirection:O})},e._id)),ee&&(0,i.jsx)(n.SwiperSlide,{"data-hash":`credits`,children:({isActive:e})=>(0,i.jsxs)(`div`,{className:`credits-page`,inert:e?void 0:!0,children:[(0,i.jsx)(`div`,{className:`credits-page-inner`,children:p.credits?.logos.map(e=>(0,i.jsx)(`div`,{className:`logo-item`,children:(0,i.jsx)(`img`,{src:f.type===`api`?`${f.assetsHost}/logos/${e}.jpg`:`/${f.staticFolder}/${p.slug}/assets/${e}.jpg`,alt:e})},e))}),(0,i.jsxs)(`div`,{className:`credits-page-bottom`,dir:O.toLowerCase()||`ltr`,children:[(0,i.jsxs)(`h1`,{children:[`"`,p.title,`" credits`]}),p.credits?.text&&(0,i.jsx)(`small`,{children:p.credits.text})]})]})}),y&&y.slides.length>1&&(0,i.jsx)(T,{isFirst:y.isBeginning===!0,isLast:y.isEnd===!0,activeIndex:_,textDirection:O})]})})})})]})};exports.Player=Mo;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as e, i as t, n, r, t as i } from "./utils-B8vKMuMn.js";
|
|
2
3
|
import a, { createContext as o, useCallback as s, useContext as c, useEffect as l, useImperativeHandle as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
3
4
|
import { Swiper as m, SwiperSlide as h, useSwiper as g } from "swiper/react";
|
|
4
5
|
import { Pagination as _ } from "swiper/modules";
|
|
@@ -3407,7 +3408,7 @@ var Do = {
|
|
|
3407
3408
|
style: Po,
|
|
3408
3409
|
children: t
|
|
3409
3410
|
});
|
|
3410
|
-
}, Io = a.lazy(() => import("./dolottie-
|
|
3411
|
+
}, Io = a.lazy(() => import("./dolottie-BJIvntzd.js")), Lo = a.lazy(() => import("./Image-D8mWyc98.js")), Ro = ({ item: t, screenScale: n, onMediaClick: r, ref: i }) => {
|
|
3411
3412
|
let { effect: a, mediaType: o } = t, [c, u] = p(!1), [d, f] = p(null), { bookId: m } = e(), h = s(() => {
|
|
3412
3413
|
d && !c && (u(!0), d.setFrame(0), d.play());
|
|
3413
3414
|
}, [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react");c=s(c,1);let l=require("react/jsx-runtime");var u=c.default.createContext({bookId:``,slug:``,assetConfig:{type:`static`,staticFolder:``},analytics:void 0}),d=({bookId:e,slug:t,assetConfig:n,analytics:r,children:i})=>(0,l.jsx)(u.Provider,{value:{bookId:e,slug:t,assetConfig:n,analytics:r},children:i}),f=()=>(0,c.useContext)(u),p=(e,t,n)=>{let r=n??e.assetConfig,i=(t?.path??t?.url??``).split(`/`).pop()||t?.filename||t?.name||``;return r.type===`api`?`${r.assetsHost}${t?.path??t?.url??``}`:`/${r.staticFolder}/${encodeURIComponent(e.slug)}/assets/${i}`},m=(e,t)=>{let n=e.assetConfig,r=t?.path??t?.mp3??``,i=r.split(`/`).pop()||t?.filename||t?.name||``;return n.type===`api`?`${n.assetsHost}${r}`:`/${n.staticFolder}/${encodeURIComponent(e.slug)}/audio/${i}`},h=e=>new Promise(t=>{setTimeout(t,e)});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curiouslearning/gdl-player-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Package containing the core player components for the GDL interactive books",
|
|
5
5
|
"homepage": "https://github.com/curiouslearning/gdl-player-core#readme",
|
|
6
6
|
"bugs": {
|
package/dist/Image-CJI9T-SB.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./utils-DkVRHjf3.cjs");let t=require("react/jsx-runtime");var n=({mediaItem:n})=>(0,t.jsx)(`img`,{src:e.n(e.a(),n),alt:``,loading:`lazy`,className:`max-w-full max-h-full w-full h-full -z-10`});exports.Image=n,exports.default=n;
|
package/dist/utils-DkVRHjf3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("react");c=s(c,1);let l=require("react/jsx-runtime");var u=c.default.createContext({bookId:``,slug:``,assetConfig:{type:`static`,staticFolder:``},analytics:void 0}),d=({bookId:e,slug:t,assetConfig:n,analytics:r,children:i})=>(0,l.jsx)(u.Provider,{value:{bookId:e,slug:t,assetConfig:n,analytics:r},children:i}),f=()=>(0,c.useContext)(u),p=(e,t,n)=>{let r=n??e.assetConfig,i=(t?.path??t?.url??``).split(`/`).pop()||t?.filename||t?.name||``;return r.type===`api`?`${r.assetsHost}${t?.path??t?.url??``}`:`/${r.staticFolder}/${encodeURIComponent(e.slug)}/assets/${i}`},m=(e,t)=>{let n=e.assetConfig,r=t?.path??t?.mp3??``,i=r.split(`/`).pop()||t?.filename||t?.name||``;return n.type===`api`?`${n.assetsHost}${r}`:`/${n.staticFolder}/${encodeURIComponent(e.slug)}/audio/${i}`},h=e=>new Promise(t=>{setTimeout(t,e)});Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|