react-motion-modal 1.2.0 → 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/CHANGELOG.md +15 -0
- package/dist/index.d.ts +155 -4
- package/dist/index.js +1056 -1053
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-font-weight:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-semibold:600;--radius-md:.375rem;--radius-xl:.75rem;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.right-0{right:calc(var(--spacing)*0)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.flex{display:flex}.max-h-screen{max-height:100vh}.max-w-screen{max-width:100vw}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-white{background-color:var(--color-white)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-2{padding-block:calc(var(--spacing)*2)}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-all{word-break:break-all}.text-blue-500{color:var(--color-blue-500)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\\:opacity-80:hover{opacity:.8}}@media (min-width:64rem){.lg\\:left-1\\/2{left:50%}.lg\\:-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import * as
|
|
3
|
-
import fe, { createContext as Ot, useRef as ut, useLayoutEffect as
|
|
4
|
-
import { jsx as Q, Fragment as
|
|
5
|
-
import { createPortal as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-800:oklch(27.8% .033 256.848);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-semibold:600;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.right-0{right:calc(var(--spacing)*0)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.flex{display:flex}.max-h-screen{max-height:100vh}.max-w-screen{max-width:100vw}.max-w-sm{max-width:var(--container-sm)}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-end{justify-content:flex-end}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-white{background-color:var(--color-white)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-2{padding-block:calc(var(--spacing)*2)}.py-10{padding-block:calc(var(--spacing)*10)}.text-center{text-align:center}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.break-all{word-break:break-all}.text-blue-500{color:var(--color-blue-500)}.text-gray-600{color:var(--color-gray-600)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media (hover:hover){.hover\\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\\:bg-gray-600:hover{background-color:var(--color-gray-600)}.hover\\:text-gray-800:hover{color:var(--color-gray-800)}.hover\\:opacity-80:hover{opacity:.8}}@media (min-width:64rem){.lg\\:left-1\\/2{left:50%}.lg\\:-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import * as Dn from "react";
|
|
3
|
+
import fe, { createContext as Ot, useRef as ut, useLayoutEffect as _o, useEffect as Re, useId as Rn, useContext as G, useInsertionEffect as Ui, useMemo as At, useCallback as zi, Children as Bo, isValidElement as Oo, useState as gs, Fragment as $i, createElement as Fo, forwardRef as jo, Component as No } from "react";
|
|
4
|
+
import { jsx as Q, Fragment as Uo, jsxs as Gi } from "react/jsx-runtime";
|
|
5
|
+
import { createPortal as zo } from "react-dom";
|
|
6
6
|
const pe = {
|
|
7
7
|
TOP: "top",
|
|
8
8
|
CENTER: "center",
|
|
@@ -10,30 +10,30 @@ const pe = {
|
|
|
10
10
|
}, z = [];
|
|
11
11
|
for (let t = 0; t < 256; ++t)
|
|
12
12
|
z.push((t + 256).toString(16).slice(1));
|
|
13
|
-
function
|
|
13
|
+
function $o(t, e = 0) {
|
|
14
14
|
return (z[t[e + 0]] + z[t[e + 1]] + z[t[e + 2]] + z[t[e + 3]] + "-" + z[t[e + 4]] + z[t[e + 5]] + "-" + z[t[e + 6]] + z[t[e + 7]] + "-" + z[t[e + 8]] + z[t[e + 9]] + "-" + z[t[e + 10]] + z[t[e + 11]] + z[t[e + 12]] + z[t[e + 13]] + z[t[e + 14]] + z[t[e + 15]]).toLowerCase();
|
|
15
15
|
}
|
|
16
16
|
let Fe;
|
|
17
|
-
const
|
|
18
|
-
function
|
|
17
|
+
const Go = new Uint8Array(16);
|
|
18
|
+
function Wo() {
|
|
19
19
|
if (!Fe) {
|
|
20
20
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
21
21
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
22
22
|
Fe = crypto.getRandomValues.bind(crypto);
|
|
23
23
|
}
|
|
24
|
-
return Fe(
|
|
24
|
+
return Fe(Go);
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
26
|
+
const Ho = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ys = { randomUUID: Ho };
|
|
27
|
+
function Xo(t, e, n) {
|
|
28
|
+
if (ys.randomUUID && !t)
|
|
29
|
+
return ys.randomUUID();
|
|
30
30
|
t = t || {};
|
|
31
|
-
const s = t.random ?? t.rng?.() ??
|
|
31
|
+
const s = t.random ?? t.rng?.() ?? Wo();
|
|
32
32
|
if (s.length < 16)
|
|
33
33
|
throw new Error("Random bytes length must be >= 16");
|
|
34
|
-
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128,
|
|
34
|
+
return s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, $o(s);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const bs = (t) => {
|
|
37
37
|
let e;
|
|
38
38
|
const n = /* @__PURE__ */ new Set(), s = (u, c) => {
|
|
39
39
|
const f = typeof u == "function" ? u(e) : u;
|
|
@@ -43,8 +43,8 @@ const gs = (t) => {
|
|
|
43
43
|
}
|
|
44
44
|
}, i = () => e, a = { setState: s, getState: i, getInitialState: () => l, subscribe: (u) => (n.add(u), () => n.delete(u)) }, l = e = t(s, i, a);
|
|
45
45
|
return a;
|
|
46
|
-
},
|
|
47
|
-
function
|
|
46
|
+
}, Yo = (t) => t ? bs(t) : bs, qo = (t) => t;
|
|
47
|
+
function Zo(t, e = qo) {
|
|
48
48
|
const n = fe.useSyncExternalStore(
|
|
49
49
|
t.subscribe,
|
|
50
50
|
fe.useCallback(() => e(t.getState()), [t, e]),
|
|
@@ -52,17 +52,17 @@ function qo(t, e = Yo) {
|
|
|
52
52
|
);
|
|
53
53
|
return fe.useDebugValue(n), n;
|
|
54
54
|
}
|
|
55
|
-
const
|
|
56
|
-
const e =
|
|
55
|
+
const vs = (t) => {
|
|
56
|
+
const e = Yo(t), n = (s) => Zo(e, s);
|
|
57
57
|
return Object.assign(n, e), n;
|
|
58
|
-
},
|
|
58
|
+
}, Jo = (t) => t ? vs(t) : vs, ke = Jo((t, e) => ({
|
|
59
59
|
modals: [],
|
|
60
60
|
openModal(n, s) {
|
|
61
61
|
const o = {
|
|
62
62
|
...s,
|
|
63
63
|
closeModal: () => e().closeModal(n)
|
|
64
64
|
}, r = {
|
|
65
|
-
id:
|
|
65
|
+
id: Xo(),
|
|
66
66
|
name: n,
|
|
67
67
|
params: o
|
|
68
68
|
}, a = [...e().modals, r];
|
|
@@ -89,65 +89,65 @@ const ys = (t) => {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
}));
|
|
92
|
-
function
|
|
92
|
+
function Wi(t) {
|
|
93
93
|
var e, n, s = "";
|
|
94
94
|
if (typeof t == "string" || typeof t == "number") s += t;
|
|
95
95
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
96
96
|
var i = t.length;
|
|
97
|
-
for (e = 0; e < i; e++) t[e] && (n =
|
|
97
|
+
for (e = 0; e < i; e++) t[e] && (n = Wi(t[e])) && (s && (s += " "), s += n);
|
|
98
98
|
} else for (n in t) t[n] && (s && (s += " "), s += n);
|
|
99
99
|
return s;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
102
|
-
for (var t, e, n = 0, s = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e =
|
|
101
|
+
function je() {
|
|
102
|
+
for (var t, e, n = 0, s = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = Wi(t)) && (s && (s += " "), s += e);
|
|
103
103
|
return s;
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
function
|
|
105
|
+
const Ln = Ot({});
|
|
106
|
+
function Kn(t) {
|
|
107
107
|
const e = ut(null);
|
|
108
108
|
return e.current === null && (e.current = t()), e.current;
|
|
109
109
|
}
|
|
110
|
-
const
|
|
111
|
-
function
|
|
110
|
+
const In = typeof window < "u", Hi = In ? _o : Re, Le = /* @__PURE__ */ Ot(null);
|
|
111
|
+
function _n(t, e) {
|
|
112
112
|
t.indexOf(e) === -1 && t.push(e);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Bn(t, e) {
|
|
115
115
|
const n = t.indexOf(e);
|
|
116
116
|
n > -1 && t.splice(n, 1);
|
|
117
117
|
}
|
|
118
118
|
const dt = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
119
|
-
function
|
|
119
|
+
function on(t, e) {
|
|
120
120
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
121
121
|
}
|
|
122
122
|
let Ft = () => {
|
|
123
123
|
}, ht = () => {
|
|
124
124
|
};
|
|
125
125
|
process.env.NODE_ENV !== "production" && (Ft = (t, e, n) => {
|
|
126
|
-
!t && typeof console < "u" && console.warn(
|
|
126
|
+
!t && typeof console < "u" && console.warn(on(e, n));
|
|
127
127
|
}, ht = (t, e, n) => {
|
|
128
128
|
if (!t)
|
|
129
|
-
throw new Error(
|
|
129
|
+
throw new Error(on(e, n));
|
|
130
130
|
});
|
|
131
|
-
const ft = {},
|
|
132
|
-
function
|
|
131
|
+
const ft = {}, Xi = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
132
|
+
function Yi(t) {
|
|
133
133
|
return typeof t == "object" && t !== null;
|
|
134
134
|
}
|
|
135
|
-
const
|
|
135
|
+
const qi = (t) => /^0[^.\s]+$/u.test(t);
|
|
136
136
|
// @__NO_SIDE_EFFECTS__
|
|
137
|
-
function
|
|
137
|
+
function On(t) {
|
|
138
138
|
let e;
|
|
139
139
|
return () => (e === void 0 && (e = t()), e);
|
|
140
140
|
}
|
|
141
|
-
const st = /* @__NO_SIDE_EFFECTS__ */ (t) => t,
|
|
141
|
+
const st = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Qo = (t, e) => (n) => e(t(n)), ie = (...t) => t.reduce(Qo), Jt = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
142
142
|
const s = e - t;
|
|
143
143
|
return s === 0 ? 1 : (n - t) / s;
|
|
144
144
|
};
|
|
145
|
-
class
|
|
145
|
+
class Fn {
|
|
146
146
|
constructor() {
|
|
147
147
|
this.subscriptions = [];
|
|
148
148
|
}
|
|
149
149
|
add(e) {
|
|
150
|
-
return
|
|
150
|
+
return _n(this.subscriptions, e), () => Bn(this.subscriptions, e);
|
|
151
151
|
}
|
|
152
152
|
notify(e, n, s) {
|
|
153
153
|
const i = this.subscriptions.length;
|
|
@@ -168,46 +168,46 @@ class Bn {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
const rt = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, ot = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
|
|
171
|
-
function
|
|
171
|
+
function Zi(t, e) {
|
|
172
172
|
return e ? t * (1e3 / e) : 0;
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
function
|
|
176
|
-
t ||
|
|
174
|
+
const xs = /* @__PURE__ */ new Set();
|
|
175
|
+
function jn(t, e, n) {
|
|
176
|
+
t || xs.has(e) || (console.warn(on(e, n)), xs.add(e));
|
|
177
177
|
}
|
|
178
|
-
const
|
|
179
|
-
function
|
|
178
|
+
const Ji = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, ta = 1e-7, ea = 12;
|
|
179
|
+
function na(t, e, n, s, i) {
|
|
180
180
|
let o, r, a = 0;
|
|
181
181
|
do
|
|
182
|
-
r = e + (n - e) / 2, o =
|
|
183
|
-
while (Math.abs(o) >
|
|
182
|
+
r = e + (n - e) / 2, o = Ji(r, s, i) - t, o > 0 ? n = r : e = r;
|
|
183
|
+
while (Math.abs(o) > ta && ++a < ea);
|
|
184
184
|
return r;
|
|
185
185
|
}
|
|
186
186
|
function re(t, e, n, s) {
|
|
187
187
|
if (t === e && n === s)
|
|
188
188
|
return st;
|
|
189
|
-
const i = (o) =>
|
|
190
|
-
return (o) => o === 0 || o === 1 ? o :
|
|
189
|
+
const i = (o) => na(o, 0, 1, t, n);
|
|
190
|
+
return (o) => o === 0 || o === 1 ? o : Ji(i(o), e, s);
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const Qi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, tr = (t) => (e) => 1 - t(1 - e), er = /* @__PURE__ */ re(0.33, 1.53, 0.69, 0.99), Nn = /* @__PURE__ */ tr(er), nr = /* @__PURE__ */ Qi(Nn), sr = (t) => (t *= 2) < 1 ? 0.5 * Nn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Un = (t) => 1 - Math.sin(Math.acos(t)), ir = tr(Un), rr = Qi(Un), sa = /* @__PURE__ */ re(0.42, 0, 1, 1), ia = /* @__PURE__ */ re(0, 0, 0.58, 1), or = /* @__PURE__ */ re(0.42, 0, 0.58, 1), ra = (t) => Array.isArray(t) && typeof t[0] != "number", ar = (t) => Array.isArray(t) && typeof t[0] == "number", ws = {
|
|
193
193
|
linear: st,
|
|
194
|
-
easeIn:
|
|
195
|
-
easeInOut:
|
|
196
|
-
easeOut:
|
|
197
|
-
circIn:
|
|
198
|
-
circInOut:
|
|
199
|
-
circOut:
|
|
200
|
-
backIn:
|
|
201
|
-
backInOut:
|
|
202
|
-
backOut:
|
|
203
|
-
anticipate:
|
|
204
|
-
},
|
|
205
|
-
if (
|
|
194
|
+
easeIn: sa,
|
|
195
|
+
easeInOut: or,
|
|
196
|
+
easeOut: ia,
|
|
197
|
+
circIn: Un,
|
|
198
|
+
circInOut: rr,
|
|
199
|
+
circOut: ir,
|
|
200
|
+
backIn: Nn,
|
|
201
|
+
backInOut: nr,
|
|
202
|
+
backOut: er,
|
|
203
|
+
anticipate: sr
|
|
204
|
+
}, oa = (t) => typeof t == "string", Ts = (t) => {
|
|
205
|
+
if (ar(t)) {
|
|
206
206
|
ht(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
207
207
|
const [e, n, s, i] = t;
|
|
208
208
|
return re(e, n, s, i);
|
|
209
|
-
} else if (
|
|
210
|
-
return ht(
|
|
209
|
+
} else if (oa(t))
|
|
210
|
+
return ht(ws[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), ws[t];
|
|
211
211
|
return t;
|
|
212
212
|
}, me = [
|
|
213
213
|
"setup",
|
|
@@ -227,7 +227,7 @@ const Ji = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Qi
|
|
|
227
227
|
"postRender"
|
|
228
228
|
// Compute
|
|
229
229
|
];
|
|
230
|
-
function
|
|
230
|
+
function aa(t, e) {
|
|
231
231
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, o = !1;
|
|
232
232
|
const r = /* @__PURE__ */ new WeakSet();
|
|
233
233
|
let a = {
|
|
@@ -265,16 +265,16 @@ function oa(t, e) {
|
|
|
265
265
|
};
|
|
266
266
|
return u;
|
|
267
267
|
}
|
|
268
|
-
const
|
|
269
|
-
function
|
|
268
|
+
const la = 40;
|
|
269
|
+
function lr(t, e) {
|
|
270
270
|
let n = !1, s = !0;
|
|
271
271
|
const i = {
|
|
272
272
|
delta: 0,
|
|
273
273
|
timestamp: 0,
|
|
274
274
|
isProcessing: !1
|
|
275
|
-
}, o = () => n = !0, r = me.reduce((d, p) => (d[p] =
|
|
275
|
+
}, o = () => n = !0, r = me.reduce((d, p) => (d[p] = aa(o), d), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: f, preRender: m, render: v, postRender: w } = r, C = () => {
|
|
276
276
|
const d = ft.useManualTiming ? i.timestamp : performance.now();
|
|
277
|
-
n = !1, ft.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(d - i.timestamp,
|
|
277
|
+
n = !1, ft.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(d - i.timestamp, la), 1)), i.timestamp = d, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), f.process(i), m.process(i), v.process(i), w.process(i), i.isProcessing = !1, n && e && (s = !1, t(C));
|
|
278
278
|
}, P = () => {
|
|
279
279
|
n = !0, s = !0, i.isProcessing || t(C);
|
|
280
280
|
};
|
|
@@ -286,17 +286,17 @@ function ar(t, e) {
|
|
|
286
286
|
r[me[p]].cancel(d);
|
|
287
287
|
}, state: i, steps: r };
|
|
288
288
|
}
|
|
289
|
-
const { schedule: K, cancel: yt, state: $, steps:
|
|
289
|
+
const { schedule: K, cancel: yt, state: $, steps: Ne } = /* @__PURE__ */ lr(typeof requestAnimationFrame < "u" ? requestAnimationFrame : st, !0);
|
|
290
290
|
let we;
|
|
291
|
-
function
|
|
291
|
+
function ca() {
|
|
292
292
|
we = void 0;
|
|
293
293
|
}
|
|
294
294
|
const Y = {
|
|
295
295
|
now: () => (we === void 0 && Y.set($.isProcessing || ft.useManualTiming ? $.timestamp : performance.now()), we),
|
|
296
296
|
set: (t) => {
|
|
297
|
-
we = t, queueMicrotask(
|
|
297
|
+
we = t, queueMicrotask(ca);
|
|
298
298
|
}
|
|
299
|
-
},
|
|
299
|
+
}, cr = (t) => (e) => typeof e == "string" && e.startsWith(t), zn = /* @__PURE__ */ cr("--"), ua = /* @__PURE__ */ cr("var(--"), $n = (t) => ua(t) ? da.test(t.split("/*")[0].trim()) : !1, da = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, jt = {
|
|
300
300
|
test: (t) => typeof t == "number",
|
|
301
301
|
parse: parseFloat,
|
|
302
302
|
transform: (t) => t
|
|
@@ -306,29 +306,29 @@ const Y = {
|
|
|
306
306
|
}, ge = {
|
|
307
307
|
...jt,
|
|
308
308
|
default: 1
|
|
309
|
-
}, Xt = (t) => Math.round(t * 1e5) / 1e5,
|
|
310
|
-
function
|
|
309
|
+
}, Xt = (t) => Math.round(t * 1e5) / 1e5, Gn = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
310
|
+
function ha(t) {
|
|
311
311
|
return t == null;
|
|
312
312
|
}
|
|
313
|
-
const
|
|
313
|
+
const fa = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Wn = (t, e) => (n) => !!(typeof n == "string" && fa.test(n) && n.startsWith(t) || e && !ha(n) && Object.prototype.hasOwnProperty.call(n, e)), ur = (t, e, n) => (s) => {
|
|
314
314
|
if (typeof s != "string")
|
|
315
315
|
return s;
|
|
316
|
-
const [i, o, r, a] = s.match(
|
|
316
|
+
const [i, o, r, a] = s.match(Gn);
|
|
317
317
|
return {
|
|
318
318
|
[t]: parseFloat(i),
|
|
319
319
|
[e]: parseFloat(o),
|
|
320
320
|
[n]: parseFloat(r),
|
|
321
321
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
322
322
|
};
|
|
323
|
-
},
|
|
323
|
+
}, pa = (t) => dt(0, 255, t), Ue = {
|
|
324
324
|
...jt,
|
|
325
|
-
transform: (t) => Math.round(
|
|
325
|
+
transform: (t) => Math.round(pa(t))
|
|
326
326
|
}, Ct = {
|
|
327
|
-
test: /* @__PURE__ */
|
|
328
|
-
parse: /* @__PURE__ */
|
|
329
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" +
|
|
327
|
+
test: /* @__PURE__ */ Wn("rgb", "red"),
|
|
328
|
+
parse: /* @__PURE__ */ ur("red", "green", "blue"),
|
|
329
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Ue.transform(t) + ", " + Ue.transform(e) + ", " + Ue.transform(n) + ", " + Xt(Qt.transform(s)) + ")"
|
|
330
330
|
};
|
|
331
|
-
function
|
|
331
|
+
function ma(t) {
|
|
332
332
|
let e = "", n = "", s = "", i = "";
|
|
333
333
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
|
|
334
334
|
red: parseInt(e, 16),
|
|
@@ -337,35 +337,35 @@ function pa(t) {
|
|
|
337
337
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
const
|
|
341
|
-
test: /* @__PURE__ */
|
|
342
|
-
parse:
|
|
340
|
+
const an = {
|
|
341
|
+
test: /* @__PURE__ */ Wn("#"),
|
|
342
|
+
parse: ma,
|
|
343
343
|
transform: Ct.transform
|
|
344
344
|
}, oe = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
345
345
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
346
346
|
parse: parseFloat,
|
|
347
347
|
transform: (e) => `${e}${t}`
|
|
348
|
-
}), gt = /* @__PURE__ */ oe("deg"), at = /* @__PURE__ */ oe("%"), M = /* @__PURE__ */ oe("px"),
|
|
348
|
+
}), gt = /* @__PURE__ */ oe("deg"), at = /* @__PURE__ */ oe("%"), M = /* @__PURE__ */ oe("px"), ga = /* @__PURE__ */ oe("vh"), ya = /* @__PURE__ */ oe("vw"), Cs = {
|
|
349
349
|
...at,
|
|
350
350
|
parse: (t) => at.parse(t) / 100,
|
|
351
351
|
transform: (t) => at.transform(t * 100)
|
|
352
352
|
}, Vt = {
|
|
353
|
-
test: /* @__PURE__ */
|
|
354
|
-
parse: /* @__PURE__ */
|
|
353
|
+
test: /* @__PURE__ */ Wn("hsl", "hue"),
|
|
354
|
+
parse: /* @__PURE__ */ ur("hue", "saturation", "lightness"),
|
|
355
355
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + at.transform(Xt(e)) + ", " + at.transform(Xt(n)) + ", " + Xt(Qt.transform(s)) + ")"
|
|
356
356
|
}, F = {
|
|
357
|
-
test: (t) => Ct.test(t) ||
|
|
358
|
-
parse: (t) => Ct.test(t) ? Ct.parse(t) : Vt.test(t) ? Vt.parse(t) :
|
|
357
|
+
test: (t) => Ct.test(t) || an.test(t) || Vt.test(t),
|
|
358
|
+
parse: (t) => Ct.test(t) ? Ct.parse(t) : Vt.test(t) ? Vt.parse(t) : an.parse(t),
|
|
359
359
|
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? Ct.transform(t) : Vt.transform(t),
|
|
360
360
|
getAnimatableNone: (t) => {
|
|
361
361
|
const e = F.parse(t);
|
|
362
362
|
return e.alpha = 0, F.transform(e);
|
|
363
363
|
}
|
|
364
|
-
},
|
|
365
|
-
function
|
|
366
|
-
return isNaN(t) && typeof t == "string" && (t.match(
|
|
364
|
+
}, ba = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
365
|
+
function va(t) {
|
|
366
|
+
return isNaN(t) && typeof t == "string" && (t.match(Gn)?.length || 0) + (t.match(ba)?.length || 0) > 0;
|
|
367
367
|
}
|
|
368
|
-
const
|
|
368
|
+
const dr = "number", hr = "color", xa = "var", wa = "var(", Ps = "${}", Ta = /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;
|
|
369
369
|
function te(t) {
|
|
370
370
|
const e = t.toString(), n = [], s = {
|
|
371
371
|
color: [],
|
|
@@ -373,46 +373,46 @@ function te(t) {
|
|
|
373
373
|
var: []
|
|
374
374
|
}, i = [];
|
|
375
375
|
let o = 0;
|
|
376
|
-
const a = e.replace(
|
|
376
|
+
const a = e.replace(Ta, (l) => (F.test(l) ? (s.color.push(o), i.push(hr), n.push(F.parse(l))) : l.startsWith(wa) ? (s.var.push(o), i.push(xa), n.push(l)) : (s.number.push(o), i.push(dr), n.push(parseFloat(l))), ++o, Ps)).split(Ps);
|
|
377
377
|
return { values: n, split: a, indexes: s, types: i };
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function fr(t) {
|
|
380
380
|
return te(t).values;
|
|
381
381
|
}
|
|
382
|
-
function
|
|
382
|
+
function pr(t) {
|
|
383
383
|
const { split: e, types: n } = te(t), s = e.length;
|
|
384
384
|
return (i) => {
|
|
385
385
|
let o = "";
|
|
386
386
|
for (let r = 0; r < s; r++)
|
|
387
387
|
if (o += e[r], i[r] !== void 0) {
|
|
388
388
|
const a = n[r];
|
|
389
|
-
a ===
|
|
389
|
+
a === dr ? o += Xt(i[r]) : a === hr ? o += F.transform(i[r]) : o += i[r];
|
|
390
390
|
}
|
|
391
391
|
return o;
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
const
|
|
395
|
-
function
|
|
396
|
-
const e =
|
|
397
|
-
return
|
|
394
|
+
const Ca = (t) => typeof t == "number" ? 0 : F.test(t) ? F.getAnimatableNone(t) : t;
|
|
395
|
+
function Pa(t) {
|
|
396
|
+
const e = fr(t);
|
|
397
|
+
return pr(t)(e.map(Ca));
|
|
398
398
|
}
|
|
399
399
|
const bt = {
|
|
400
|
-
test:
|
|
401
|
-
parse:
|
|
402
|
-
createTransformer:
|
|
403
|
-
getAnimatableNone:
|
|
400
|
+
test: va,
|
|
401
|
+
parse: fr,
|
|
402
|
+
createTransformer: pr,
|
|
403
|
+
getAnimatableNone: Pa
|
|
404
404
|
};
|
|
405
|
-
function
|
|
405
|
+
function ze(t, e, n) {
|
|
406
406
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Sa({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
409
409
|
t /= 360, e /= 100, n /= 100;
|
|
410
410
|
let i = 0, o = 0, r = 0;
|
|
411
411
|
if (!e)
|
|
412
412
|
i = o = r = n;
|
|
413
413
|
else {
|
|
414
414
|
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
415
|
-
i =
|
|
415
|
+
i = ze(l, a, t + 1 / 3), o = ze(l, a, t), r = ze(l, a, t - 1 / 3);
|
|
416
416
|
}
|
|
417
417
|
return {
|
|
418
418
|
red: Math.round(i * 255),
|
|
@@ -424,52 +424,52 @@ function Pa({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
424
424
|
function Ae(t, e) {
|
|
425
425
|
return (n) => n > 0 ? e : t;
|
|
426
426
|
}
|
|
427
|
-
const _ = (t, e, n) => t + (e - t) * n,
|
|
427
|
+
const _ = (t, e, n) => t + (e - t) * n, $e = (t, e, n) => {
|
|
428
428
|
const s = t * t, i = n * (e * e - s) + s;
|
|
429
429
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
430
|
-
},
|
|
431
|
-
function
|
|
432
|
-
const e =
|
|
430
|
+
}, ka = [an, Ct, Vt], Aa = (t) => ka.find((e) => e.test(t));
|
|
431
|
+
function Ss(t) {
|
|
432
|
+
const e = Aa(t);
|
|
433
433
|
if (Ft(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
434
434
|
return !1;
|
|
435
435
|
let n = e.parse(t);
|
|
436
|
-
return e === Vt && (n =
|
|
436
|
+
return e === Vt && (n = Sa(n)), n;
|
|
437
437
|
}
|
|
438
|
-
const
|
|
439
|
-
const n =
|
|
438
|
+
const ks = (t, e) => {
|
|
439
|
+
const n = Ss(t), s = Ss(e);
|
|
440
440
|
if (!n || !s)
|
|
441
441
|
return Ae(t, e);
|
|
442
442
|
const i = { ...n };
|
|
443
|
-
return (o) => (i.red =
|
|
444
|
-
},
|
|
445
|
-
function Aa(t, e) {
|
|
446
|
-
return on.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
447
|
-
}
|
|
443
|
+
return (o) => (i.red = $e(n.red, s.red, o), i.green = $e(n.green, s.green, o), i.blue = $e(n.blue, s.blue, o), i.alpha = _(n.alpha, s.alpha, o), Ct.transform(i));
|
|
444
|
+
}, ln = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
448
445
|
function Ma(t, e) {
|
|
446
|
+
return ln.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
447
|
+
}
|
|
448
|
+
function Va(t, e) {
|
|
449
449
|
return (n) => _(t, e, n);
|
|
450
450
|
}
|
|
451
|
-
function
|
|
452
|
-
return typeof t == "number" ?
|
|
451
|
+
function Hn(t) {
|
|
452
|
+
return typeof t == "number" ? Va : typeof t == "string" ? $n(t) ? Ae : F.test(t) ? ks : Ra : Array.isArray(t) ? mr : typeof t == "object" ? F.test(t) ? ks : Ea : Ae;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
455
|
-
const n = [...t], s = n.length, i = t.map((o, r) =>
|
|
454
|
+
function mr(t, e) {
|
|
455
|
+
const n = [...t], s = n.length, i = t.map((o, r) => Hn(o)(o, e[r]));
|
|
456
456
|
return (o) => {
|
|
457
457
|
for (let r = 0; r < s; r++)
|
|
458
458
|
n[r] = i[r](o);
|
|
459
459
|
return n;
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Ea(t, e) {
|
|
463
463
|
const n = { ...t, ...e }, s = {};
|
|
464
464
|
for (const i in n)
|
|
465
|
-
t[i] !== void 0 && e[i] !== void 0 && (s[i] =
|
|
465
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = Hn(t[i])(t[i], e[i]));
|
|
466
466
|
return (i) => {
|
|
467
467
|
for (const o in s)
|
|
468
468
|
n[o] = s[o](i);
|
|
469
469
|
return n;
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Da(t, e) {
|
|
473
473
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
474
474
|
for (let i = 0; i < e.values.length; i++) {
|
|
475
475
|
const o = e.types[i], r = t.indexes[o][s[o]], a = t.values[r] ?? 0;
|
|
@@ -477,14 +477,14 @@ function Ea(t, e) {
|
|
|
477
477
|
}
|
|
478
478
|
return n;
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const Ra = (t, e) => {
|
|
481
481
|
const n = bt.createTransformer(e), s = te(t), i = te(e);
|
|
482
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
482
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? ln.has(t) && !i.values.length || ln.has(e) && !s.values.length ? Ma(t, e) : ie(mr(Da(s, i), i.values), n) : (Ft(!0, `Complex values '${t}' and '${e}' 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"), Ae(t, e));
|
|
483
483
|
};
|
|
484
|
-
function
|
|
485
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? _(t, e, n) :
|
|
484
|
+
function gr(t, e, n) {
|
|
485
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? _(t, e, n) : Hn(t)(t, e);
|
|
486
486
|
}
|
|
487
|
-
const
|
|
487
|
+
const La = (t) => {
|
|
488
488
|
const e = ({ timestamp: n }) => t(n);
|
|
489
489
|
return {
|
|
490
490
|
start: (n = !0) => K.update(e, n),
|
|
@@ -495,14 +495,14 @@ const Ra = (t) => {
|
|
|
495
495
|
*/
|
|
496
496
|
now: () => $.isProcessing ? $.timestamp : Y.now()
|
|
497
497
|
};
|
|
498
|
-
},
|
|
498
|
+
}, yr = (t, e, n = 10) => {
|
|
499
499
|
let s = "";
|
|
500
500
|
const i = Math.max(Math.round(e / n), 2);
|
|
501
501
|
for (let o = 0; o < i; o++)
|
|
502
502
|
s += Math.round(t(o / (i - 1)) * 1e4) / 1e4 + ", ";
|
|
503
503
|
return `linear(${s.substring(0, s.length - 2)})`;
|
|
504
504
|
}, Me = 2e4;
|
|
505
|
-
function
|
|
505
|
+
function Xn(t) {
|
|
506
506
|
let e = 0;
|
|
507
507
|
const n = 50;
|
|
508
508
|
let s = t.next(e);
|
|
@@ -510,18 +510,18 @@ function Wn(t) {
|
|
|
510
510
|
e += n, s = t.next(e);
|
|
511
511
|
return e >= Me ? 1 / 0 : e;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
514
|
-
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(
|
|
513
|
+
function Ka(t, e = 100, n) {
|
|
514
|
+
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(Xn(s), Me);
|
|
515
515
|
return {
|
|
516
516
|
type: "keyframes",
|
|
517
517
|
ease: (o) => s.next(i * o).value / e,
|
|
518
518
|
duration: /* @__PURE__ */ ot(i)
|
|
519
519
|
};
|
|
520
520
|
}
|
|
521
|
-
const
|
|
522
|
-
function
|
|
523
|
-
const s = Math.max(e -
|
|
524
|
-
return
|
|
521
|
+
const Ia = 5;
|
|
522
|
+
function br(t, e, n) {
|
|
523
|
+
const s = Math.max(e - Ia, 0);
|
|
524
|
+
return Zi(n - t(s), e - s);
|
|
525
525
|
}
|
|
526
526
|
const I = {
|
|
527
527
|
// Default spring physics
|
|
@@ -551,25 +551,25 @@ const I = {
|
|
|
551
551
|
// in seconds
|
|
552
552
|
minDamping: 0.05,
|
|
553
553
|
maxDamping: 1
|
|
554
|
-
},
|
|
555
|
-
function
|
|
554
|
+
}, Ge = 1e-3;
|
|
555
|
+
function _a({ duration: t = I.duration, bounce: e = I.bounce, velocity: n = I.velocity, mass: s = I.mass }) {
|
|
556
556
|
let i, o;
|
|
557
557
|
Ft(t <= /* @__PURE__ */ rt(I.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
558
558
|
let r = 1 - e;
|
|
559
559
|
r = dt(I.minDamping, I.maxDamping, r), t = dt(I.minDuration, I.maxDuration, /* @__PURE__ */ ot(t)), r < 1 ? (i = (u) => {
|
|
560
|
-
const c = u * r, f = c * t, m = c - n, v =
|
|
561
|
-
return
|
|
560
|
+
const c = u * r, f = c * t, m = c - n, v = cn(u, r), w = Math.exp(-f);
|
|
561
|
+
return Ge - m / v * w;
|
|
562
562
|
}, o = (u) => {
|
|
563
|
-
const f = u * r * t, m = f * n + n, v = Math.pow(r, 2) * Math.pow(u, 2) * t, w = Math.exp(-f), C =
|
|
564
|
-
return (-i(u) +
|
|
563
|
+
const f = u * r * t, m = f * n + n, v = Math.pow(r, 2) * Math.pow(u, 2) * t, w = Math.exp(-f), C = cn(Math.pow(u, 2), r);
|
|
564
|
+
return (-i(u) + Ge > 0 ? -1 : 1) * ((m - v) * w) / C;
|
|
565
565
|
}) : (i = (u) => {
|
|
566
566
|
const c = Math.exp(-u * t), f = (u - n) * t + 1;
|
|
567
|
-
return
|
|
567
|
+
return -Ge + c * f;
|
|
568
568
|
}, o = (u) => {
|
|
569
569
|
const c = Math.exp(-u * t), f = (n - u) * (t * t);
|
|
570
570
|
return c * f;
|
|
571
571
|
});
|
|
572
|
-
const a = 5 / t, l =
|
|
572
|
+
const a = 5 / t, l = Oa(i, o, a);
|
|
573
573
|
if (t = /* @__PURE__ */ rt(t), isNaN(l))
|
|
574
574
|
return {
|
|
575
575
|
stiffness: I.stiffness,
|
|
@@ -585,21 +585,21 @@ function Ia({ duration: t = I.duration, bounce: e = I.bounce, velocity: n = I.ve
|
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
588
|
+
const Ba = 12;
|
|
589
|
+
function Oa(t, e, n) {
|
|
590
590
|
let s = n;
|
|
591
|
-
for (let i = 1; i <
|
|
591
|
+
for (let i = 1; i < Ba; i++)
|
|
592
592
|
s = s - t(s) / e(s);
|
|
593
593
|
return s;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function cn(t, e) {
|
|
596
596
|
return t * Math.sqrt(1 - e * e);
|
|
597
597
|
}
|
|
598
|
-
const
|
|
599
|
-
function
|
|
598
|
+
const Fa = ["duration", "bounce"], ja = ["stiffness", "damping", "mass"];
|
|
599
|
+
function As(t, e) {
|
|
600
600
|
return e.some((n) => t[n] !== void 0);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function Na(t) {
|
|
603
603
|
let e = {
|
|
604
604
|
velocity: I.velocity,
|
|
605
605
|
stiffness: I.stiffness,
|
|
@@ -608,7 +608,7 @@ function ja(t) {
|
|
|
608
608
|
isResolvedFromDuration: !1,
|
|
609
609
|
...t
|
|
610
610
|
};
|
|
611
|
-
if (!
|
|
611
|
+
if (!As(t, ja) && As(t, Fa))
|
|
612
612
|
if (t.visualDuration) {
|
|
613
613
|
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * dt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
614
614
|
e = {
|
|
@@ -618,7 +618,7 @@ function ja(t) {
|
|
|
618
618
|
damping: o
|
|
619
619
|
};
|
|
620
620
|
} else {
|
|
621
|
-
const n =
|
|
621
|
+
const n = _a(t);
|
|
622
622
|
e = {
|
|
623
623
|
...e,
|
|
624
624
|
...n,
|
|
@@ -634,14 +634,14 @@ function Ve(t = I.visualDuration, e = I.bounce) {
|
|
|
634
634
|
bounce: e
|
|
635
635
|
} : t;
|
|
636
636
|
let { restSpeed: s, restDelta: i } = n;
|
|
637
|
-
const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: f, velocity: m, isResolvedFromDuration: v } =
|
|
637
|
+
const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: f, velocity: m, isResolvedFromDuration: v } = Na({
|
|
638
638
|
...n,
|
|
639
639
|
velocity: -/* @__PURE__ */ ot(n.velocity || 0)
|
|
640
640
|
}), w = m || 0, C = u / (2 * Math.sqrt(l * c)), P = r - o, h = /* @__PURE__ */ ot(Math.sqrt(l / c)), y = Math.abs(P) < 5;
|
|
641
641
|
s || (s = y ? I.restSpeed.granular : I.restSpeed.default), i || (i = y ? I.restDelta.granular : I.restDelta.default);
|
|
642
642
|
let d;
|
|
643
643
|
if (C < 1) {
|
|
644
|
-
const g =
|
|
644
|
+
const g = cn(h, C);
|
|
645
645
|
d = (x) => {
|
|
646
646
|
const T = Math.exp(-C * h * x);
|
|
647
647
|
return r - T * ((w + C * h * P) / g * Math.sin(g * x) + P * Math.cos(g * x));
|
|
@@ -663,14 +663,14 @@ function Ve(t = I.visualDuration, e = I.bounce) {
|
|
|
663
663
|
a.done = g >= f;
|
|
664
664
|
else {
|
|
665
665
|
let T = g === 0 ? w : 0;
|
|
666
|
-
C < 1 && (T = g === 0 ? /* @__PURE__ */ rt(w) :
|
|
666
|
+
C < 1 && (T = g === 0 ? /* @__PURE__ */ rt(w) : br(d, g, x));
|
|
667
667
|
const b = Math.abs(T) <= s, V = Math.abs(r - x) <= i;
|
|
668
668
|
a.done = b && V;
|
|
669
669
|
}
|
|
670
670
|
return a.value = a.done ? r : x, a;
|
|
671
671
|
},
|
|
672
672
|
toString: () => {
|
|
673
|
-
const g = Math.min(
|
|
673
|
+
const g = Math.min(Xn(p), Me), x = yr((T) => p.next(g * T).value, g, 30);
|
|
674
674
|
return g + "ms " + x;
|
|
675
675
|
},
|
|
676
676
|
toTransition: () => {
|
|
@@ -679,10 +679,10 @@ function Ve(t = I.visualDuration, e = I.bounce) {
|
|
|
679
679
|
return p;
|
|
680
680
|
}
|
|
681
681
|
Ve.applyToOptions = (t) => {
|
|
682
|
-
const e =
|
|
682
|
+
const e = Ka(t, 100, Ve);
|
|
683
683
|
return t.ease = e.ease, t.duration = /* @__PURE__ */ rt(e.duration), t.type = "keyframes", t;
|
|
684
684
|
};
|
|
685
|
-
function
|
|
685
|
+
function un({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
686
686
|
const f = t[0], m = {
|
|
687
687
|
done: !1,
|
|
688
688
|
value: f
|
|
@@ -698,7 +698,7 @@ function ln({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
698
698
|
const T = (b) => {
|
|
699
699
|
v(m.value) && (g = b, x = Ve({
|
|
700
700
|
keyframes: [m.value, w(m.value)],
|
|
701
|
-
velocity:
|
|
701
|
+
velocity: br(d, b, m.value),
|
|
702
702
|
// TODO: This should be passing * 1000
|
|
703
703
|
damping: i,
|
|
704
704
|
stiffness: o,
|
|
@@ -714,8 +714,8 @@ function ln({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
716
|
}
|
|
717
|
-
function
|
|
718
|
-
const s = [], i = n || ft.mix ||
|
|
717
|
+
function Ua(t, e, n) {
|
|
718
|
+
const s = [], i = n || ft.mix || gr, o = t.length - 1;
|
|
719
719
|
for (let r = 0; r < o; r++) {
|
|
720
720
|
let a = i(t[r], t[r + 1]);
|
|
721
721
|
if (e) {
|
|
@@ -726,7 +726,7 @@ function Na(t, e, n) {
|
|
|
726
726
|
}
|
|
727
727
|
return s;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
729
|
+
function za(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
730
730
|
const o = t.length;
|
|
731
731
|
if (ht(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
|
|
732
732
|
return () => e[0];
|
|
@@ -734,7 +734,7 @@ function Ua(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
734
734
|
return () => e[1];
|
|
735
735
|
const r = t[0] === t[1];
|
|
736
736
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
737
|
-
const a =
|
|
737
|
+
const a = Ua(e, s, i), l = a.length, u = (c) => {
|
|
738
738
|
if (r && c < t[0])
|
|
739
739
|
return e[0];
|
|
740
740
|
let f = 0;
|
|
@@ -746,56 +746,56 @@ function Ua(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
746
746
|
};
|
|
747
747
|
return n ? (c) => u(dt(t[0], t[o - 1], c)) : u;
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function $a(t, e) {
|
|
750
750
|
const n = t[t.length - 1];
|
|
751
751
|
for (let s = 1; s <= e; s++) {
|
|
752
752
|
const i = /* @__PURE__ */ Jt(0, e, s);
|
|
753
753
|
t.push(_(n, 1, i));
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Ga(t) {
|
|
757
757
|
const e = [0];
|
|
758
|
-
return
|
|
758
|
+
return $a(e, t.length - 1), e;
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function Wa(t, e) {
|
|
761
761
|
return t.map((n) => n * e);
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
return t.map(() => e ||
|
|
763
|
+
function Ha(t, e) {
|
|
764
|
+
return t.map(() => e || or).splice(0, t.length - 1);
|
|
765
765
|
}
|
|
766
766
|
function Et({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
767
|
-
const i =
|
|
767
|
+
const i = ra(s) ? s.map(Ts) : Ts(s), o = {
|
|
768
768
|
done: !1,
|
|
769
769
|
value: e[0]
|
|
770
|
-
}, r =
|
|
770
|
+
}, r = Wa(
|
|
771
771
|
// Only use the provided offsets if they're the correct length
|
|
772
772
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
773
|
-
n && n.length === e.length ? n :
|
|
773
|
+
n && n.length === e.length ? n : Ga(e),
|
|
774
774
|
t
|
|
775
|
-
), a =
|
|
776
|
-
ease: Array.isArray(i) ? i :
|
|
775
|
+
), a = za(r, e, {
|
|
776
|
+
ease: Array.isArray(i) ? i : Ha(e, i)
|
|
777
777
|
});
|
|
778
778
|
return {
|
|
779
779
|
calculatedDuration: t,
|
|
780
780
|
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
781
781
|
};
|
|
782
782
|
}
|
|
783
|
-
const
|
|
784
|
-
function
|
|
785
|
-
const o = t.filter(
|
|
783
|
+
const Xa = (t) => t !== null;
|
|
784
|
+
function Yn(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
|
|
785
|
+
const o = t.filter(Xa), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
|
|
786
786
|
return !a || s === void 0 ? o[a] : s;
|
|
787
787
|
}
|
|
788
|
-
const
|
|
789
|
-
decay:
|
|
790
|
-
inertia:
|
|
788
|
+
const Ya = {
|
|
789
|
+
decay: un,
|
|
790
|
+
inertia: un,
|
|
791
791
|
tween: Et,
|
|
792
792
|
keyframes: Et,
|
|
793
793
|
spring: Ve
|
|
794
794
|
};
|
|
795
|
-
function
|
|
796
|
-
typeof t.type == "string" && (t.type =
|
|
795
|
+
function vr(t) {
|
|
796
|
+
typeof t.type == "string" && (t.type = Ya[t.type]);
|
|
797
797
|
}
|
|
798
|
-
class
|
|
798
|
+
class qn {
|
|
799
799
|
constructor() {
|
|
800
800
|
this.updateFinished();
|
|
801
801
|
}
|
|
@@ -819,8 +819,8 @@ class Xn {
|
|
|
819
819
|
return this.finished.then(e, n);
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
|
-
const
|
|
823
|
-
class
|
|
822
|
+
const qa = (t) => t / 100;
|
|
823
|
+
class Zn extends qn {
|
|
824
824
|
constructor(e) {
|
|
825
825
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
826
826
|
const { motionValue: n } = this.options;
|
|
@@ -829,17 +829,17 @@ class Yn extends Xn {
|
|
|
829
829
|
}
|
|
830
830
|
initAnimation() {
|
|
831
831
|
const { options: e } = this;
|
|
832
|
-
|
|
832
|
+
vr(e);
|
|
833
833
|
const { type: n = Et, repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = e;
|
|
834
834
|
let { keyframes: a } = e;
|
|
835
835
|
const l = n || Et;
|
|
836
|
-
process.env.NODE_ENV !== "production" && l !== Et && ht(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== Et && typeof a[0] != "number" && (this.mixKeyframes = ie(
|
|
836
|
+
process.env.NODE_ENV !== "production" && l !== Et && ht(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== Et && typeof a[0] != "number" && (this.mixKeyframes = ie(qa, gr(a[0], a[1])), a = [0, 100]);
|
|
837
837
|
const u = l({ ...e, keyframes: a });
|
|
838
838
|
o === "mirror" && (this.mirroredGenerator = l({
|
|
839
839
|
...e,
|
|
840
840
|
keyframes: [...a].reverse(),
|
|
841
841
|
velocity: -r
|
|
842
|
-
})), u.calculatedDuration === null && (u.calculatedDuration =
|
|
842
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = Xn(u));
|
|
843
843
|
const { calculatedDuration: c } = u;
|
|
844
844
|
this.calculatedDuration = c, this.resolvedDuration = c + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = u;
|
|
845
845
|
}
|
|
@@ -866,7 +866,7 @@ class Yn extends Xn {
|
|
|
866
866
|
let { done: x } = g;
|
|
867
867
|
!y && l !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
868
868
|
const T = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
|
|
869
|
-
return T && w !==
|
|
869
|
+
return T && w !== un && (g.value = Yn(c, this.options, P, this.speed)), C && C(g.value), T && this.finish(), g;
|
|
870
870
|
}
|
|
871
871
|
/**
|
|
872
872
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -896,7 +896,7 @@ class Yn extends Xn {
|
|
|
896
896
|
play() {
|
|
897
897
|
if (this.isStopped)
|
|
898
898
|
return;
|
|
899
|
-
const { driver: e =
|
|
899
|
+
const { driver: e = La, startTime: n } = this.options;
|
|
900
900
|
this.driver || (this.driver = e((i) => this.tick(i))), this.options.onPlay?.();
|
|
901
901
|
const s = this.driver.now();
|
|
902
902
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -926,14 +926,14 @@ class Yn extends Xn {
|
|
|
926
926
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
|
|
927
927
|
}
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function Za(t) {
|
|
930
930
|
for (let e = 1; e < t.length; e++)
|
|
931
931
|
t[e] ?? (t[e] = t[e - 1]);
|
|
932
932
|
}
|
|
933
|
-
const Pt = (t) => t * 180 / Math.PI,
|
|
933
|
+
const Pt = (t) => t * 180 / Math.PI, dn = (t) => {
|
|
934
934
|
const e = Pt(Math.atan2(t[1], t[0]));
|
|
935
|
-
return
|
|
936
|
-
},
|
|
935
|
+
return hn(e);
|
|
936
|
+
}, Ja = {
|
|
937
937
|
x: 4,
|
|
938
938
|
y: 5,
|
|
939
939
|
translateX: 4,
|
|
@@ -941,53 +941,53 @@ const Pt = (t) => t * 180 / Math.PI, cn = (t) => {
|
|
|
941
941
|
scaleX: 0,
|
|
942
942
|
scaleY: 3,
|
|
943
943
|
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
944
|
-
rotate:
|
|
945
|
-
rotateZ:
|
|
944
|
+
rotate: dn,
|
|
945
|
+
rotateZ: dn,
|
|
946
946
|
skewX: (t) => Pt(Math.atan(t[1])),
|
|
947
947
|
skewY: (t) => Pt(Math.atan(t[2])),
|
|
948
948
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
949
|
-
},
|
|
949
|
+
}, hn = (t) => (t = t % 360, t < 0 && (t += 360), t), Ms = dn, Vs = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Es = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Qa = {
|
|
950
950
|
x: 12,
|
|
951
951
|
y: 13,
|
|
952
952
|
z: 14,
|
|
953
953
|
translateX: 12,
|
|
954
954
|
translateY: 13,
|
|
955
955
|
translateZ: 14,
|
|
956
|
-
scaleX:
|
|
957
|
-
scaleY:
|
|
958
|
-
scale: (t) => (
|
|
959
|
-
rotateX: (t) =>
|
|
960
|
-
rotateY: (t) =>
|
|
961
|
-
rotateZ:
|
|
962
|
-
rotate:
|
|
956
|
+
scaleX: Vs,
|
|
957
|
+
scaleY: Es,
|
|
958
|
+
scale: (t) => (Vs(t) + Es(t)) / 2,
|
|
959
|
+
rotateX: (t) => hn(Pt(Math.atan2(t[6], t[5]))),
|
|
960
|
+
rotateY: (t) => hn(Pt(Math.atan2(-t[2], t[0]))),
|
|
961
|
+
rotateZ: Ms,
|
|
962
|
+
rotate: Ms,
|
|
963
963
|
skewX: (t) => Pt(Math.atan(t[4])),
|
|
964
964
|
skewY: (t) => Pt(Math.atan(t[1])),
|
|
965
965
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
966
966
|
};
|
|
967
|
-
function
|
|
967
|
+
function fn(t) {
|
|
968
968
|
return t.includes("scale") ? 1 : 0;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function pn(t, e) {
|
|
971
971
|
if (!t || t === "none")
|
|
972
|
-
return
|
|
972
|
+
return fn(e);
|
|
973
973
|
const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
974
974
|
let s, i;
|
|
975
975
|
if (n)
|
|
976
|
-
s =
|
|
976
|
+
s = Qa, i = n;
|
|
977
977
|
else {
|
|
978
978
|
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
979
|
-
s =
|
|
979
|
+
s = Ja, i = a;
|
|
980
980
|
}
|
|
981
981
|
if (!i)
|
|
982
|
-
return
|
|
983
|
-
const o = s[e], r = i[1].split(",").map(
|
|
982
|
+
return fn(e);
|
|
983
|
+
const o = s[e], r = i[1].split(",").map(el);
|
|
984
984
|
return typeof o == "function" ? o(r) : r[o];
|
|
985
985
|
}
|
|
986
|
-
const
|
|
986
|
+
const tl = (t, e) => {
|
|
987
987
|
const { transform: n = "none" } = getComputedStyle(t);
|
|
988
|
-
return
|
|
988
|
+
return pn(n, e);
|
|
989
989
|
};
|
|
990
|
-
function
|
|
990
|
+
function el(t) {
|
|
991
991
|
return parseFloat(t.trim());
|
|
992
992
|
}
|
|
993
993
|
const Nt = [
|
|
@@ -1008,10 +1008,10 @@ const Nt = [
|
|
|
1008
1008
|
"skew",
|
|
1009
1009
|
"skewX",
|
|
1010
1010
|
"skewY"
|
|
1011
|
-
], Ut = new Set(Nt),
|
|
1012
|
-
function
|
|
1011
|
+
], Ut = new Set(Nt), Ds = (t) => t === jt || t === M, nl = /* @__PURE__ */ new Set(["x", "y", "z"]), sl = Nt.filter((t) => !nl.has(t));
|
|
1012
|
+
function il(t) {
|
|
1013
1013
|
const e = [];
|
|
1014
|
-
return
|
|
1014
|
+
return sl.forEach((n) => {
|
|
1015
1015
|
const s = t.getValue(n);
|
|
1016
1016
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
1017
1017
|
}), e;
|
|
@@ -1025,18 +1025,18 @@ const St = {
|
|
|
1025
1025
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1026
1026
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1027
1027
|
// Transform
|
|
1028
|
-
x: (t, { transform: e }) =>
|
|
1029
|
-
y: (t, { transform: e }) =>
|
|
1028
|
+
x: (t, { transform: e }) => pn(e, "x"),
|
|
1029
|
+
y: (t, { transform: e }) => pn(e, "y")
|
|
1030
1030
|
};
|
|
1031
1031
|
St.translateX = St.x;
|
|
1032
1032
|
St.translateY = St.y;
|
|
1033
1033
|
const kt = /* @__PURE__ */ new Set();
|
|
1034
|
-
let
|
|
1035
|
-
function
|
|
1036
|
-
if (
|
|
1034
|
+
let mn = !1, gn = !1, yn = !1;
|
|
1035
|
+
function xr() {
|
|
1036
|
+
if (gn) {
|
|
1037
1037
|
const t = Array.from(kt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
1038
1038
|
e.forEach((s) => {
|
|
1039
|
-
const i =
|
|
1039
|
+
const i = il(s);
|
|
1040
1040
|
i.length && (n.set(s, i), s.render());
|
|
1041
1041
|
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
1042
1042
|
s.render();
|
|
@@ -1048,22 +1048,22 @@ function vr() {
|
|
|
1048
1048
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1051
|
+
gn = !1, mn = !1, kt.forEach((t) => t.complete(yn)), kt.clear();
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function wr() {
|
|
1054
1054
|
kt.forEach((t) => {
|
|
1055
|
-
t.readKeyframes(), t.needsMeasurement && (
|
|
1055
|
+
t.readKeyframes(), t.needsMeasurement && (gn = !0);
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1059
|
-
|
|
1058
|
+
function rl() {
|
|
1059
|
+
yn = !0, wr(), xr(), yn = !1;
|
|
1060
1060
|
}
|
|
1061
|
-
class
|
|
1061
|
+
class Jn {
|
|
1062
1062
|
constructor(e, n, s, i, o, r = !1) {
|
|
1063
1063
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
|
|
1064
1064
|
}
|
|
1065
1065
|
scheduleResolve() {
|
|
1066
|
-
this.state = "scheduled", this.isAsync ? (kt.add(this),
|
|
1066
|
+
this.state = "scheduled", this.isAsync ? (kt.add(this), mn || (mn = !0, K.read(wr), K.resolveKeyframes(xr))) : (this.readKeyframes(), this.complete());
|
|
1067
1067
|
}
|
|
1068
1068
|
readKeyframes() {
|
|
1069
1069
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -1077,7 +1077,7 @@ class qn {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
e[0] === void 0 && (e[0] = r), i && o === void 0 && i.set(e[0]);
|
|
1079
1079
|
}
|
|
1080
|
-
|
|
1080
|
+
Za(e);
|
|
1081
1081
|
}
|
|
1082
1082
|
setFinalKeyframe() {
|
|
1083
1083
|
}
|
|
@@ -1097,23 +1097,23 @@ class qn {
|
|
|
1097
1097
|
this.state === "pending" && this.scheduleResolve();
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
const
|
|
1101
|
-
function
|
|
1102
|
-
|
|
1100
|
+
const ol = (t) => t.startsWith("--");
|
|
1101
|
+
function al(t, e, n) {
|
|
1102
|
+
ol(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
1103
1103
|
}
|
|
1104
|
-
const
|
|
1105
|
-
function
|
|
1106
|
-
const n = /* @__PURE__ */
|
|
1107
|
-
return () =>
|
|
1104
|
+
const ll = /* @__PURE__ */ On(() => window.ScrollTimeline !== void 0), cl = {};
|
|
1105
|
+
function ul(t, e) {
|
|
1106
|
+
const n = /* @__PURE__ */ On(t);
|
|
1107
|
+
return () => cl[e] ?? n();
|
|
1108
1108
|
}
|
|
1109
|
-
const
|
|
1109
|
+
const Tr = /* @__PURE__ */ ul(() => {
|
|
1110
1110
|
try {
|
|
1111
1111
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1112
1112
|
} catch {
|
|
1113
1113
|
return !1;
|
|
1114
1114
|
}
|
|
1115
1115
|
return !0;
|
|
1116
|
-
}, "linearEasing"), Ht = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`,
|
|
1116
|
+
}, "linearEasing"), Ht = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Rs = {
|
|
1117
1117
|
linear: "linear",
|
|
1118
1118
|
ease: "ease",
|
|
1119
1119
|
easeIn: "ease-in",
|
|
@@ -1124,16 +1124,16 @@ const wr = /* @__PURE__ */ cl(() => {
|
|
|
1124
1124
|
backIn: /* @__PURE__ */ Ht([0.31, 0.01, 0.66, -0.59]),
|
|
1125
1125
|
backOut: /* @__PURE__ */ Ht([0.33, 1.53, 0.69, 0.99])
|
|
1126
1126
|
};
|
|
1127
|
-
function
|
|
1127
|
+
function Cr(t, e) {
|
|
1128
1128
|
if (t)
|
|
1129
|
-
return typeof t == "function" ?
|
|
1129
|
+
return typeof t == "function" ? Tr() ? yr(t, e) : "ease-out" : ar(t) ? Ht(t) : Array.isArray(t) ? t.map((n) => Cr(n, e) || Rs.easeOut) : Rs[t];
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function dl(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
|
|
1132
1132
|
const c = {
|
|
1133
1133
|
[e]: n
|
|
1134
1134
|
};
|
|
1135
1135
|
l && (c.offset = l);
|
|
1136
|
-
const f =
|
|
1136
|
+
const f = Cr(a, i);
|
|
1137
1137
|
Array.isArray(f) && (c.easing = f);
|
|
1138
1138
|
const m = {
|
|
1139
1139
|
delay: s,
|
|
@@ -1145,23 +1145,23 @@ function ul(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatTyp
|
|
|
1145
1145
|
};
|
|
1146
1146
|
return u && (m.pseudoElement = u), t.animate(c, m);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1148
|
+
function Pr(t) {
|
|
1149
1149
|
return typeof t == "function" && "applyToOptions" in t;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1151
|
+
function hl({ type: t, ...e }) {
|
|
1152
|
+
return Pr(t) && Tr() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1153
1153
|
}
|
|
1154
|
-
class
|
|
1154
|
+
class fl extends qn {
|
|
1155
1155
|
constructor(e) {
|
|
1156
1156
|
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
1157
1157
|
return;
|
|
1158
1158
|
const { element: n, name: s, keyframes: i, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
|
|
1159
1159
|
this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, ht(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1160
|
-
const u =
|
|
1161
|
-
this.animation =
|
|
1160
|
+
const u = hl(e);
|
|
1161
|
+
this.animation = dl(n, s, i, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1162
1162
|
if (this.finishedTime = this.time, !o) {
|
|
1163
|
-
const c =
|
|
1164
|
-
this.updateMotionValue ? this.updateMotionValue(c) :
|
|
1163
|
+
const c = Yn(i, this.options, a, this.speed);
|
|
1164
|
+
this.updateMotionValue ? this.updateMotionValue(c) : al(n, s, c), this.animation.cancel();
|
|
1165
1165
|
}
|
|
1166
1166
|
l?.(), this.notifyFinished();
|
|
1167
1167
|
};
|
|
@@ -1236,24 +1236,24 @@ class hl extends Xn {
|
|
|
1236
1236
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1237
1237
|
*/
|
|
1238
1238
|
attachTimeline({ timeline: e, observe: n }) {
|
|
1239
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e &&
|
|
1239
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && ll() ? (this.animation.timeline = e, st) : n(this);
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
|
-
const
|
|
1243
|
-
anticipate:
|
|
1244
|
-
backInOut:
|
|
1245
|
-
circInOut:
|
|
1242
|
+
const Sr = {
|
|
1243
|
+
anticipate: sr,
|
|
1244
|
+
backInOut: nr,
|
|
1245
|
+
circInOut: rr
|
|
1246
1246
|
};
|
|
1247
|
-
function fl(t) {
|
|
1248
|
-
return t in Pr;
|
|
1249
|
-
}
|
|
1250
1247
|
function pl(t) {
|
|
1251
|
-
|
|
1248
|
+
return t in Sr;
|
|
1252
1249
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1250
|
+
function ml(t) {
|
|
1251
|
+
typeof t.ease == "string" && pl(t.ease) && (t.ease = Sr[t.ease]);
|
|
1252
|
+
}
|
|
1253
|
+
const Ls = 10;
|
|
1254
|
+
class gl extends fl {
|
|
1255
1255
|
constructor(e) {
|
|
1256
|
-
|
|
1256
|
+
ml(e), vr(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
|
|
1257
1257
|
}
|
|
1258
1258
|
/**
|
|
1259
1259
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -1271,17 +1271,17 @@ class ml extends hl {
|
|
|
1271
1271
|
n.set(e);
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
|
-
const a = new
|
|
1274
|
+
const a = new Zn({
|
|
1275
1275
|
...r,
|
|
1276
1276
|
autoplay: !1
|
|
1277
1277
|
}), l = /* @__PURE__ */ rt(this.finishedTime ?? this.time);
|
|
1278
|
-
n.setWithVelocity(a.sample(l -
|
|
1278
|
+
n.setWithVelocity(a.sample(l - Ls).value, a.sample(l).value, Ls), a.stop();
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
|
-
const
|
|
1281
|
+
const Ks = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1282
1282
|
(bt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1283
1283
|
!t.startsWith("url("));
|
|
1284
|
-
function
|
|
1284
|
+
function yl(t) {
|
|
1285
1285
|
const e = t[0];
|
|
1286
1286
|
if (t.length === 1)
|
|
1287
1287
|
return !0;
|
|
@@ -1289,39 +1289,39 @@ function gl(t) {
|
|
|
1289
1289
|
if (t[n] !== e)
|
|
1290
1290
|
return !0;
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function bl(t, e, n, s) {
|
|
1293
1293
|
const i = t[0];
|
|
1294
1294
|
if (i === null)
|
|
1295
1295
|
return !1;
|
|
1296
1296
|
if (e === "display" || e === "visibility")
|
|
1297
1297
|
return !0;
|
|
1298
|
-
const o = t[t.length - 1], r =
|
|
1299
|
-
return Ft(r === a, `You are trying to animate ${e} from "${i}" to "${o}". "${r ? o : i}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 :
|
|
1298
|
+
const o = t[t.length - 1], r = Ks(i, e), a = Ks(o, e);
|
|
1299
|
+
return Ft(r === a, `You are trying to animate ${e} from "${i}" to "${o}". "${r ? o : i}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : yl(t) || (n === "spring" || Pr(n)) && s;
|
|
1300
1300
|
}
|
|
1301
|
-
function
|
|
1301
|
+
function bn(t) {
|
|
1302
1302
|
t.duration = 0, t.type;
|
|
1303
1303
|
}
|
|
1304
|
-
const
|
|
1304
|
+
const vl = /* @__PURE__ */ new Set([
|
|
1305
1305
|
"opacity",
|
|
1306
1306
|
"clipPath",
|
|
1307
1307
|
"filter",
|
|
1308
1308
|
"transform"
|
|
1309
1309
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1310
1310
|
// "background-color"
|
|
1311
|
-
]),
|
|
1312
|
-
function
|
|
1311
|
+
]), xl = /* @__PURE__ */ On(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1312
|
+
function wl(t) {
|
|
1313
1313
|
const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: o, type: r } = t;
|
|
1314
1314
|
if (!(e?.owner?.current instanceof HTMLElement))
|
|
1315
1315
|
return !1;
|
|
1316
1316
|
const { onUpdate: l, transformTemplate: u } = e.owner.getProps();
|
|
1317
|
-
return
|
|
1317
|
+
return xl() && n && vl.has(n) && (n !== "transform" || !u) && /**
|
|
1318
1318
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1319
1319
|
* no way to read the value from WAAPI every frame.
|
|
1320
1320
|
*/
|
|
1321
1321
|
!l && !s && i !== "mirror" && o !== 0 && r !== "inertia";
|
|
1322
1322
|
}
|
|
1323
|
-
const
|
|
1324
|
-
class
|
|
1323
|
+
const Tl = 40;
|
|
1324
|
+
class Cl extends qn {
|
|
1325
1325
|
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...f }) {
|
|
1326
1326
|
super(), this.stop = () => {
|
|
1327
1327
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
@@ -1337,22 +1337,22 @@ class Tl extends Xn {
|
|
|
1337
1337
|
motionValue: u,
|
|
1338
1338
|
element: c,
|
|
1339
1339
|
...f
|
|
1340
|
-
}, v = c?.KeyframeResolver ||
|
|
1340
|
+
}, v = c?.KeyframeResolver || Jn;
|
|
1341
1341
|
this.keyframeResolver = new v(a, (w, C, P) => this.onKeyframesResolved(w, C, m, !P), l, u, c), this.keyframeResolver?.scheduleResolve();
|
|
1342
1342
|
}
|
|
1343
1343
|
onKeyframesResolved(e, n, s, i) {
|
|
1344
1344
|
this.keyframeResolver = void 0;
|
|
1345
1345
|
const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
|
|
1346
|
-
this.resolvedAt = Y.now(),
|
|
1346
|
+
this.resolvedAt = Y.now(), bl(e, o, r, a) || ((ft.instantAnimations || !l) && c?.(Yn(e, s, n)), e[0] = e[e.length - 1], bn(s), s.repeat = 0);
|
|
1347
1347
|
const m = {
|
|
1348
|
-
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
1348
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Tl ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1349
1349
|
finalKeyframe: n,
|
|
1350
1350
|
...s,
|
|
1351
1351
|
keyframes: e
|
|
1352
|
-
}, v = !u &&
|
|
1352
|
+
}, v = !u && wl(m) ? new gl({
|
|
1353
1353
|
...m,
|
|
1354
1354
|
element: m.motionValue.owner.current
|
|
1355
|
-
}) : new
|
|
1355
|
+
}) : new Zn(m);
|
|
1356
1356
|
v.finished.then(() => this.notifyFinished()).catch(st), this.pendingTimeline && (this.stopTimeline = v.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = v;
|
|
1357
1357
|
}
|
|
1358
1358
|
get finished() {
|
|
@@ -1363,7 +1363,7 @@ class Tl extends Xn {
|
|
|
1363
1363
|
});
|
|
1364
1364
|
}
|
|
1365
1365
|
get animation() {
|
|
1366
|
-
return this._animation || (this.keyframeResolver?.resume(),
|
|
1366
|
+
return this._animation || (this.keyframeResolver?.resume(), rl()), this._animation;
|
|
1367
1367
|
}
|
|
1368
1368
|
get duration() {
|
|
1369
1369
|
return this.animation.duration;
|
|
@@ -1402,34 +1402,34 @@ class Tl extends Xn {
|
|
|
1402
1402
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
|
-
const
|
|
1405
|
+
const Pl = (
|
|
1406
1406
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1407
1407
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1408
1408
|
);
|
|
1409
|
-
function
|
|
1410
|
-
const e =
|
|
1409
|
+
function Sl(t) {
|
|
1410
|
+
const e = Pl.exec(t);
|
|
1411
1411
|
if (!e)
|
|
1412
1412
|
return [,];
|
|
1413
1413
|
const [, n, s, i] = e;
|
|
1414
1414
|
return [`--${n ?? s}`, i];
|
|
1415
1415
|
}
|
|
1416
|
-
const
|
|
1417
|
-
function
|
|
1418
|
-
ht(n <=
|
|
1419
|
-
const [s, i] =
|
|
1416
|
+
const kl = 4;
|
|
1417
|
+
function kr(t, e, n = 1) {
|
|
1418
|
+
ht(n <= kl, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1419
|
+
const [s, i] = Sl(t);
|
|
1420
1420
|
if (!s)
|
|
1421
1421
|
return;
|
|
1422
1422
|
const o = window.getComputedStyle(e).getPropertyValue(s);
|
|
1423
1423
|
if (o) {
|
|
1424
1424
|
const r = o.trim();
|
|
1425
|
-
return
|
|
1425
|
+
return Xi(r) ? parseFloat(r) : r;
|
|
1426
1426
|
}
|
|
1427
|
-
return
|
|
1427
|
+
return $n(i) ? kr(i, e, n + 1) : i;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function Qn(t, e) {
|
|
1430
1430
|
return t?.[e] ?? t?.default ?? t;
|
|
1431
1431
|
}
|
|
1432
|
-
const
|
|
1432
|
+
const Ar = /* @__PURE__ */ new Set([
|
|
1433
1433
|
"width",
|
|
1434
1434
|
"height",
|
|
1435
1435
|
"top",
|
|
@@ -1437,35 +1437,35 @@ const kr = /* @__PURE__ */ new Set([
|
|
|
1437
1437
|
"right",
|
|
1438
1438
|
"bottom",
|
|
1439
1439
|
...Nt
|
|
1440
|
-
]),
|
|
1440
|
+
]), Al = {
|
|
1441
1441
|
test: (t) => t === "auto",
|
|
1442
1442
|
parse: (t) => t
|
|
1443
|
-
},
|
|
1444
|
-
function
|
|
1445
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1443
|
+
}, Mr = (t) => (e) => e.test(t), Vr = [jt, M, at, gt, ya, ga, Al], Is = (t) => Vr.find(Mr(t));
|
|
1444
|
+
function Ml(t) {
|
|
1445
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || qi(t) : !0;
|
|
1446
1446
|
}
|
|
1447
|
-
const
|
|
1448
|
-
function
|
|
1447
|
+
const Vl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1448
|
+
function El(t) {
|
|
1449
1449
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1450
1450
|
if (e === "drop-shadow")
|
|
1451
1451
|
return t;
|
|
1452
|
-
const [s] = n.match(
|
|
1452
|
+
const [s] = n.match(Gn) || [];
|
|
1453
1453
|
if (!s)
|
|
1454
1454
|
return t;
|
|
1455
1455
|
const i = n.replace(s, "");
|
|
1456
|
-
let o =
|
|
1456
|
+
let o = Vl.has(e) ? 1 : 0;
|
|
1457
1457
|
return s !== n && (o *= 100), e + "(" + o + i + ")";
|
|
1458
1458
|
}
|
|
1459
|
-
const
|
|
1459
|
+
const Dl = /\b([a-z-]*)\(.*?\)/gu, vn = {
|
|
1460
1460
|
...bt,
|
|
1461
1461
|
getAnimatableNone: (t) => {
|
|
1462
|
-
const e = t.match(
|
|
1463
|
-
return e ? e.map(
|
|
1462
|
+
const e = t.match(Dl);
|
|
1463
|
+
return e ? e.map(El).join(" ") : t;
|
|
1464
1464
|
}
|
|
1465
|
-
},
|
|
1465
|
+
}, _s = {
|
|
1466
1466
|
...jt,
|
|
1467
1467
|
transform: Math.round
|
|
1468
|
-
},
|
|
1468
|
+
}, Rl = {
|
|
1469
1469
|
rotate: gt,
|
|
1470
1470
|
rotateX: gt,
|
|
1471
1471
|
rotateY: gt,
|
|
@@ -1487,10 +1487,10 @@ const El = /\b([a-z-]*)\(.*?\)/gu, yn = {
|
|
|
1487
1487
|
perspective: M,
|
|
1488
1488
|
transformPerspective: M,
|
|
1489
1489
|
opacity: Qt,
|
|
1490
|
-
originX:
|
|
1491
|
-
originY:
|
|
1490
|
+
originX: Cs,
|
|
1491
|
+
originY: Cs,
|
|
1492
1492
|
originZ: M
|
|
1493
|
-
},
|
|
1493
|
+
}, ts = {
|
|
1494
1494
|
// Border props
|
|
1495
1495
|
borderWidth: M,
|
|
1496
1496
|
borderTopWidth: M,
|
|
@@ -1526,14 +1526,14 @@ const El = /\b([a-z-]*)\(.*?\)/gu, yn = {
|
|
|
1526
1526
|
// Misc
|
|
1527
1527
|
backgroundPositionX: M,
|
|
1528
1528
|
backgroundPositionY: M,
|
|
1529
|
-
...
|
|
1530
|
-
zIndex:
|
|
1529
|
+
...Rl,
|
|
1530
|
+
zIndex: _s,
|
|
1531
1531
|
// SVG
|
|
1532
1532
|
fillOpacity: Qt,
|
|
1533
1533
|
strokeOpacity: Qt,
|
|
1534
|
-
numOctaves:
|
|
1535
|
-
},
|
|
1536
|
-
...
|
|
1534
|
+
numOctaves: _s
|
|
1535
|
+
}, Ll = {
|
|
1536
|
+
...ts,
|
|
1537
1537
|
// Color props
|
|
1538
1538
|
color: F,
|
|
1539
1539
|
backgroundColor: F,
|
|
@@ -1546,25 +1546,25 @@ const El = /\b([a-z-]*)\(.*?\)/gu, yn = {
|
|
|
1546
1546
|
borderRightColor: F,
|
|
1547
1547
|
borderBottomColor: F,
|
|
1548
1548
|
borderLeftColor: F,
|
|
1549
|
-
filter:
|
|
1550
|
-
WebkitFilter:
|
|
1551
|
-
},
|
|
1552
|
-
function
|
|
1553
|
-
let n =
|
|
1554
|
-
return n !==
|
|
1555
|
-
}
|
|
1556
|
-
const
|
|
1557
|
-
function
|
|
1549
|
+
filter: vn,
|
|
1550
|
+
WebkitFilter: vn
|
|
1551
|
+
}, Er = (t) => Ll[t];
|
|
1552
|
+
function Dr(t, e) {
|
|
1553
|
+
let n = Er(t);
|
|
1554
|
+
return n !== vn && (n = bt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1555
|
+
}
|
|
1556
|
+
const Kl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1557
|
+
function Il(t, e, n) {
|
|
1558
1558
|
let s = 0, i;
|
|
1559
1559
|
for (; s < t.length && !i; ) {
|
|
1560
1560
|
const o = t[s];
|
|
1561
|
-
typeof o == "string" && !
|
|
1561
|
+
typeof o == "string" && !Kl.has(o) && te(o).values.length && (i = t[s]), s++;
|
|
1562
1562
|
}
|
|
1563
1563
|
if (i && n)
|
|
1564
1564
|
for (const o of e)
|
|
1565
|
-
t[o] =
|
|
1565
|
+
t[o] = Dr(n, i);
|
|
1566
1566
|
}
|
|
1567
|
-
class
|
|
1567
|
+
class _l extends Jn {
|
|
1568
1568
|
constructor(e, n, s, i, o) {
|
|
1569
1569
|
super(e, n, s, i, o, !0);
|
|
1570
1570
|
}
|
|
@@ -1575,16 +1575,16 @@ class Il extends qn {
|
|
|
1575
1575
|
super.readKeyframes();
|
|
1576
1576
|
for (let l = 0; l < e.length; l++) {
|
|
1577
1577
|
let u = e[l];
|
|
1578
|
-
if (typeof u == "string" && (u = u.trim(),
|
|
1579
|
-
const c =
|
|
1578
|
+
if (typeof u == "string" && (u = u.trim(), $n(u))) {
|
|
1579
|
+
const c = kr(u, n.current);
|
|
1580
1580
|
c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
|
-
if (this.resolveNoneKeyframes(), !
|
|
1583
|
+
if (this.resolveNoneKeyframes(), !Ar.has(s) || e.length !== 2)
|
|
1584
1584
|
return;
|
|
1585
|
-
const [i, o] = e, r =
|
|
1585
|
+
const [i, o] = e, r = Is(i), a = Is(o);
|
|
1586
1586
|
if (r !== a)
|
|
1587
|
-
if (
|
|
1587
|
+
if (Ds(r) && Ds(a))
|
|
1588
1588
|
for (let l = 0; l < e.length; l++) {
|
|
1589
1589
|
const u = e[l];
|
|
1590
1590
|
typeof u == "string" && (e[l] = parseFloat(u));
|
|
@@ -1594,8 +1594,8 @@ class Il extends qn {
|
|
|
1594
1594
|
resolveNoneKeyframes() {
|
|
1595
1595
|
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
1596
1596
|
for (let i = 0; i < e.length; i++)
|
|
1597
|
-
(e[i] === null ||
|
|
1598
|
-
s.length &&
|
|
1597
|
+
(e[i] === null || Ml(e[i])) && s.push(i);
|
|
1598
|
+
s.length && Il(e, s, n);
|
|
1599
1599
|
}
|
|
1600
1600
|
measureInitialState() {
|
|
1601
1601
|
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
@@ -1617,7 +1617,7 @@ class Il extends qn {
|
|
|
1617
1617
|
}), this.resolveNoneKeyframes();
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1620
|
+
function Bl(t, e, n) {
|
|
1621
1621
|
if (t instanceof EventTarget)
|
|
1622
1622
|
return [t];
|
|
1623
1623
|
if (typeof t == "string") {
|
|
@@ -1627,12 +1627,12 @@ function _l(t, e, n) {
|
|
|
1627
1627
|
}
|
|
1628
1628
|
return Array.from(t);
|
|
1629
1629
|
}
|
|
1630
|
-
const
|
|
1631
|
-
function
|
|
1632
|
-
return
|
|
1630
|
+
const Rr = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
1631
|
+
function Lr(t) {
|
|
1632
|
+
return Yi(t) && "offsetHeight" in t;
|
|
1633
1633
|
}
|
|
1634
|
-
const
|
|
1635
|
-
class
|
|
1634
|
+
const Bs = 30, Ol = (t) => !isNaN(parseFloat(t));
|
|
1635
|
+
class Fl {
|
|
1636
1636
|
/**
|
|
1637
1637
|
* @param init - The initiating value
|
|
1638
1638
|
* @param config - Optional configuration options
|
|
@@ -1648,7 +1648,7 @@ class Ol {
|
|
|
1648
1648
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
1649
1649
|
}
|
|
1650
1650
|
setCurrent(e) {
|
|
1651
|
-
this.current = e, this.updatedAt = Y.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity =
|
|
1651
|
+
this.current = e, this.updatedAt = Y.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Ol(this.current));
|
|
1652
1652
|
}
|
|
1653
1653
|
setPrevFrameValue(e = this.current) {
|
|
1654
1654
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1694,10 +1694,10 @@ class Ol {
|
|
|
1694
1694
|
* @deprecated
|
|
1695
1695
|
*/
|
|
1696
1696
|
onChange(e) {
|
|
1697
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1697
|
+
return process.env.NODE_ENV !== "production" && jn(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
1698
1698
|
}
|
|
1699
1699
|
on(e, n) {
|
|
1700
|
-
this.events[e] || (this.events[e] = new
|
|
1700
|
+
this.events[e] || (this.events[e] = new Fn());
|
|
1701
1701
|
const s = this.events[e].add(n);
|
|
1702
1702
|
return e === "change" ? () => {
|
|
1703
1703
|
s(), K.read(() => {
|
|
@@ -1777,10 +1777,10 @@ class Ol {
|
|
|
1777
1777
|
*/
|
|
1778
1778
|
getVelocity() {
|
|
1779
1779
|
const e = Y.now();
|
|
1780
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
1780
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Bs)
|
|
1781
1781
|
return 0;
|
|
1782
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1783
|
-
return
|
|
1782
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Bs);
|
|
1783
|
+
return Zi(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1784
1784
|
}
|
|
1785
1785
|
/**
|
|
1786
1786
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -1832,42 +1832,42 @@ class Ol {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
1834
|
function _t(t, e) {
|
|
1835
|
-
return new
|
|
1835
|
+
return new Fl(t, e);
|
|
1836
1836
|
}
|
|
1837
|
-
const { schedule:
|
|
1837
|
+
const { schedule: es } = /* @__PURE__ */ lr(queueMicrotask, !1), it = {
|
|
1838
1838
|
x: !1,
|
|
1839
1839
|
y: !1
|
|
1840
1840
|
};
|
|
1841
|
-
function
|
|
1841
|
+
function Kr() {
|
|
1842
1842
|
return it.x || it.y;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function jl(t) {
|
|
1845
1845
|
return t === "x" || t === "y" ? it[t] ? null : (it[t] = !0, () => {
|
|
1846
1846
|
it[t] = !1;
|
|
1847
1847
|
}) : it.x || it.y ? null : (it.x = it.y = !0, () => {
|
|
1848
1848
|
it.x = it.y = !1;
|
|
1849
1849
|
});
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1852
|
-
const n =
|
|
1851
|
+
function Ir(t, e) {
|
|
1852
|
+
const n = Bl(t), s = new AbortController(), i = {
|
|
1853
1853
|
passive: !0,
|
|
1854
1854
|
...e,
|
|
1855
1855
|
signal: s.signal
|
|
1856
1856
|
};
|
|
1857
1857
|
return [n, i, () => s.abort()];
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1860
|
-
return !(t.pointerType === "touch" ||
|
|
1859
|
+
function Os(t) {
|
|
1860
|
+
return !(t.pointerType === "touch" || Kr());
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1863
|
-
const [s, i, o] =
|
|
1864
|
-
if (!
|
|
1862
|
+
function Nl(t, e, n = {}) {
|
|
1863
|
+
const [s, i, o] = Ir(t, n), r = (a) => {
|
|
1864
|
+
if (!Os(a))
|
|
1865
1865
|
return;
|
|
1866
1866
|
const { target: l } = a, u = e(l, a);
|
|
1867
1867
|
if (typeof u != "function" || !l)
|
|
1868
1868
|
return;
|
|
1869
1869
|
const c = (f) => {
|
|
1870
|
-
|
|
1870
|
+
Os(f) && (u(f), l.removeEventListener("pointerleave", c));
|
|
1871
1871
|
};
|
|
1872
1872
|
l.addEventListener("pointerleave", c, i);
|
|
1873
1873
|
};
|
|
@@ -1875,78 +1875,78 @@ function jl(t, e, n = {}) {
|
|
|
1875
1875
|
a.addEventListener("pointerenter", r, i);
|
|
1876
1876
|
}), o;
|
|
1877
1877
|
}
|
|
1878
|
-
const
|
|
1878
|
+
const _r = (t, e) => e ? t === e ? !0 : _r(t, e.parentElement) : !1, ns = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, Ul = /* @__PURE__ */ new Set([
|
|
1879
1879
|
"BUTTON",
|
|
1880
1880
|
"INPUT",
|
|
1881
1881
|
"SELECT",
|
|
1882
1882
|
"TEXTAREA",
|
|
1883
1883
|
"A"
|
|
1884
1884
|
]);
|
|
1885
|
-
function
|
|
1886
|
-
return
|
|
1885
|
+
function zl(t) {
|
|
1886
|
+
return Ul.has(t.tagName) || t.tabIndex !== -1;
|
|
1887
1887
|
}
|
|
1888
1888
|
const Te = /* @__PURE__ */ new WeakSet();
|
|
1889
|
-
function
|
|
1889
|
+
function Fs(t) {
|
|
1890
1890
|
return (e) => {
|
|
1891
1891
|
e.key === "Enter" && t(e);
|
|
1892
1892
|
};
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1894
|
+
function We(t, e) {
|
|
1895
1895
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1896
1896
|
}
|
|
1897
|
-
const
|
|
1897
|
+
const $l = (t, e) => {
|
|
1898
1898
|
const n = t.currentTarget;
|
|
1899
1899
|
if (!n)
|
|
1900
1900
|
return;
|
|
1901
|
-
const s =
|
|
1901
|
+
const s = Fs(() => {
|
|
1902
1902
|
if (Te.has(n))
|
|
1903
1903
|
return;
|
|
1904
|
-
|
|
1905
|
-
const i =
|
|
1906
|
-
|
|
1907
|
-
}), o = () =>
|
|
1904
|
+
We(n, "down");
|
|
1905
|
+
const i = Fs(() => {
|
|
1906
|
+
We(n, "up");
|
|
1907
|
+
}), o = () => We(n, "cancel");
|
|
1908
1908
|
n.addEventListener("keyup", i, e), n.addEventListener("blur", o, e);
|
|
1909
1909
|
});
|
|
1910
1910
|
n.addEventListener("keydown", s, e), n.addEventListener("blur", () => n.removeEventListener("keydown", s), e);
|
|
1911
1911
|
};
|
|
1912
|
-
function
|
|
1913
|
-
return
|
|
1912
|
+
function js(t) {
|
|
1913
|
+
return ns(t) && !Kr();
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1916
|
-
const [s, i, o] =
|
|
1915
|
+
function Gl(t, e, n = {}) {
|
|
1916
|
+
const [s, i, o] = Ir(t, n), r = (a) => {
|
|
1917
1917
|
const l = a.currentTarget;
|
|
1918
|
-
if (!
|
|
1918
|
+
if (!js(a))
|
|
1919
1919
|
return;
|
|
1920
1920
|
Te.add(l);
|
|
1921
1921
|
const u = e(l, a), c = (v, w) => {
|
|
1922
|
-
window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", m), Te.has(l) && Te.delete(l),
|
|
1922
|
+
window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", m), Te.has(l) && Te.delete(l), js(v) && typeof u == "function" && u(v, { success: w });
|
|
1923
1923
|
}, f = (v) => {
|
|
1924
|
-
c(v, l === window || l === document || n.useGlobalTarget ||
|
|
1924
|
+
c(v, l === window || l === document || n.useGlobalTarget || _r(l, v.target));
|
|
1925
1925
|
}, m = (v) => {
|
|
1926
1926
|
c(v, !1);
|
|
1927
1927
|
};
|
|
1928
1928
|
window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", m, i);
|
|
1929
1929
|
};
|
|
1930
1930
|
return s.forEach((a) => {
|
|
1931
|
-
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i),
|
|
1931
|
+
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), Lr(a) && (a.addEventListener("focus", (u) => $l(u, i)), !zl(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1932
1932
|
}), o;
|
|
1933
1933
|
}
|
|
1934
|
-
function
|
|
1935
|
-
return
|
|
1934
|
+
function Br(t) {
|
|
1935
|
+
return Yi(t) && "ownerSVGElement" in t;
|
|
1936
1936
|
}
|
|
1937
|
-
function
|
|
1938
|
-
return
|
|
1937
|
+
function Wl(t) {
|
|
1938
|
+
return Br(t) && t.tagName === "svg";
|
|
1939
1939
|
}
|
|
1940
|
-
const W = (t) => !!(t && t.getVelocity),
|
|
1940
|
+
const W = (t) => !!(t && t.getVelocity), Hl = [...Vr, F, bt], Xl = (t) => Hl.find(Mr(t)), ss = Ot({
|
|
1941
1941
|
transformPagePoint: (t) => t,
|
|
1942
1942
|
isStatic: !1,
|
|
1943
1943
|
reducedMotion: "never"
|
|
1944
1944
|
});
|
|
1945
|
-
class
|
|
1945
|
+
class Yl extends Dn.Component {
|
|
1946
1946
|
getSnapshotBeforeUpdate(e) {
|
|
1947
1947
|
const n = this.props.childRef.current;
|
|
1948
1948
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
1949
|
-
const s = n.offsetParent, i =
|
|
1949
|
+
const s = n.offsetParent, i = Lr(s) && s.offsetWidth || 0, o = this.props.sizeRef.current;
|
|
1950
1950
|
o.height = n.offsetHeight || 0, o.width = n.offsetWidth || 0, o.top = n.offsetTop, o.left = n.offsetLeft, o.right = i - o.width - o.left;
|
|
1951
1951
|
}
|
|
1952
1952
|
return null;
|
|
@@ -1960,15 +1960,15 @@ class Xl extends Vn.Component {
|
|
|
1960
1960
|
return this.props.children;
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
function
|
|
1964
|
-
const i =
|
|
1963
|
+
function ql({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
1964
|
+
const i = Rn(), o = ut(null), r = ut({
|
|
1965
1965
|
width: 0,
|
|
1966
1966
|
height: 0,
|
|
1967
1967
|
top: 0,
|
|
1968
1968
|
left: 0,
|
|
1969
1969
|
right: 0
|
|
1970
|
-
}), { nonce: a } = G(
|
|
1971
|
-
return
|
|
1970
|
+
}), { nonce: a } = G(ss);
|
|
1971
|
+
return Ui(() => {
|
|
1972
1972
|
const { width: l, height: u, top: c, left: f, right: m } = r.current;
|
|
1973
1973
|
if (e || !o.current || !l || !u)
|
|
1974
1974
|
return;
|
|
@@ -1988,10 +1988,10 @@ function Yl({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
|
1988
1988
|
`), () => {
|
|
1989
1989
|
C.contains(w) && C.removeChild(w);
|
|
1990
1990
|
};
|
|
1991
|
-
}, [e]), Q(
|
|
1991
|
+
}, [e]), Q(Yl, { isPresent: e, childRef: o, sizeRef: r, children: Dn.cloneElement(t, { ref: o }) });
|
|
1992
1992
|
}
|
|
1993
|
-
const
|
|
1994
|
-
const u =
|
|
1993
|
+
const Zl = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: o, mode: r, anchorX: a, root: l }) => {
|
|
1994
|
+
const u = Kn(Jl), c = Rn();
|
|
1995
1995
|
let f = !0, m = At(() => (f = !1, {
|
|
1996
1996
|
id: c,
|
|
1997
1997
|
initial: e,
|
|
@@ -2008,35 +2008,35 @@ const ql = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
2008
2008
|
}), [n, u, s]);
|
|
2009
2009
|
return o && f && (m = { ...m }), At(() => {
|
|
2010
2010
|
u.forEach((v, w) => u.set(w, !1));
|
|
2011
|
-
}, [n]),
|
|
2011
|
+
}, [n]), Dn.useEffect(() => {
|
|
2012
2012
|
!n && !u.size && s && s();
|
|
2013
|
-
}, [n]), r === "popLayout" && (t = Q(
|
|
2013
|
+
}, [n]), r === "popLayout" && (t = Q(ql, { isPresent: n, anchorX: a, root: l, children: t })), Q(Le.Provider, { value: m, children: t });
|
|
2014
2014
|
};
|
|
2015
|
-
function
|
|
2015
|
+
function Jl() {
|
|
2016
2016
|
return /* @__PURE__ */ new Map();
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2018
|
+
function Or(t = !0) {
|
|
2019
2019
|
const e = G(Le);
|
|
2020
2020
|
if (e === null)
|
|
2021
2021
|
return [!0, null];
|
|
2022
|
-
const { isPresent: n, onExitComplete: s, register: i } = e, o =
|
|
2022
|
+
const { isPresent: n, onExitComplete: s, register: i } = e, o = Rn();
|
|
2023
2023
|
Re(() => {
|
|
2024
2024
|
if (t)
|
|
2025
2025
|
return i(o);
|
|
2026
2026
|
}, [t]);
|
|
2027
|
-
const r =
|
|
2027
|
+
const r = zi(() => t && s && s(o), [o, s, t]);
|
|
2028
2028
|
return !n && s ? [!1, r] : [!0];
|
|
2029
2029
|
}
|
|
2030
2030
|
const ye = (t) => t.key || "";
|
|
2031
|
-
function
|
|
2031
|
+
function Ns(t) {
|
|
2032
2032
|
const e = [];
|
|
2033
|
-
return
|
|
2034
|
-
|
|
2033
|
+
return Bo.forEach(t, (n) => {
|
|
2034
|
+
Oo(n) && e.push(n);
|
|
2035
2035
|
}), e;
|
|
2036
2036
|
}
|
|
2037
|
-
const
|
|
2038
|
-
const [u, c] =
|
|
2039
|
-
|
|
2037
|
+
const Ql = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", root: l }) => {
|
|
2038
|
+
const [u, c] = Or(r), f = At(() => Ns(t), [t]), m = r && !u ? [] : f.map(ye), v = ut(!0), w = ut(f), C = Kn(() => /* @__PURE__ */ new Map()), [P, h] = gs(f), [y, d] = gs(f);
|
|
2039
|
+
Hi(() => {
|
|
2040
2040
|
v.current = !1, w.current = f;
|
|
2041
2041
|
for (let x = 0; x < y.length; x++) {
|
|
2042
2042
|
const T = ye(y[x]);
|
|
@@ -2050,11 +2050,11 @@ const Jl = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
2050
2050
|
const b = y[T], V = ye(b);
|
|
2051
2051
|
m.includes(V) || (x.splice(T, 0, b), p.push(b));
|
|
2052
2052
|
}
|
|
2053
|
-
return o === "wait" && p.length && (x = p), d(
|
|
2053
|
+
return o === "wait" && p.length && (x = p), d(Ns(x)), h(f), null;
|
|
2054
2054
|
}
|
|
2055
2055
|
process.env.NODE_ENV !== "production" && o === "wait" && y.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
2056
|
-
const { forceRender: g } = G(
|
|
2057
|
-
return Q(
|
|
2056
|
+
const { forceRender: g } = G(Ln);
|
|
2057
|
+
return Q(Uo, { children: y.map((x) => {
|
|
2058
2058
|
const T = ye(x), b = r && !u ? !1 : f === y || m.includes(T), V = () => {
|
|
2059
2059
|
if (C.has(T))
|
|
2060
2060
|
C.set(T, !0);
|
|
@@ -2065,9 +2065,9 @@ const Jl = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
2065
2065
|
L || (E = !1);
|
|
2066
2066
|
}), E && (g?.(), d(w.current), r && c?.(), s && s());
|
|
2067
2067
|
};
|
|
2068
|
-
return Q(
|
|
2068
|
+
return Q(Zl, { isPresent: b, initial: !v.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: o, root: l, onExitComplete: b ? void 0 : V, anchorX: a, children: x }, T);
|
|
2069
2069
|
}) });
|
|
2070
|
-
},
|
|
2070
|
+
}, Fr = Ot({ strict: !1 }), Us = {
|
|
2071
2071
|
animation: [
|
|
2072
2072
|
"animate",
|
|
2073
2073
|
"variants",
|
|
@@ -2087,18 +2087,18 @@ const Jl = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
2087
2087
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2088
2088
|
layout: ["layout", "layoutId"]
|
|
2089
2089
|
}, Bt = {};
|
|
2090
|
-
for (const t in
|
|
2090
|
+
for (const t in Us)
|
|
2091
2091
|
Bt[t] = {
|
|
2092
|
-
isEnabled: (e) =>
|
|
2092
|
+
isEnabled: (e) => Us[t].some((n) => !!e[n])
|
|
2093
2093
|
};
|
|
2094
|
-
function
|
|
2094
|
+
function tc(t) {
|
|
2095
2095
|
for (const e in t)
|
|
2096
2096
|
Bt[e] = {
|
|
2097
2097
|
...Bt[e],
|
|
2098
2098
|
...t[e]
|
|
2099
2099
|
};
|
|
2100
2100
|
}
|
|
2101
|
-
const
|
|
2101
|
+
const ec = /* @__PURE__ */ new Set([
|
|
2102
2102
|
"animate",
|
|
2103
2103
|
"exit",
|
|
2104
2104
|
"variants",
|
|
@@ -2131,20 +2131,20 @@ const tc = /* @__PURE__ */ new Set([
|
|
|
2131
2131
|
"viewport"
|
|
2132
2132
|
]);
|
|
2133
2133
|
function Ee(t) {
|
|
2134
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
2134
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || ec.has(t);
|
|
2135
2135
|
}
|
|
2136
|
-
let
|
|
2137
|
-
function
|
|
2138
|
-
typeof t == "function" && (
|
|
2136
|
+
let jr = (t) => !Ee(t);
|
|
2137
|
+
function nc(t) {
|
|
2138
|
+
typeof t == "function" && (jr = (e) => e.startsWith("on") ? !Ee(e) : t(e));
|
|
2139
2139
|
}
|
|
2140
2140
|
try {
|
|
2141
|
-
|
|
2141
|
+
nc(require("@emotion/is-prop-valid").default);
|
|
2142
2142
|
} catch {
|
|
2143
2143
|
}
|
|
2144
|
-
function
|
|
2144
|
+
function sc(t, e, n) {
|
|
2145
2145
|
const s = {};
|
|
2146
2146
|
for (const i in t)
|
|
2147
|
-
i === "values" && typeof t.values == "object" || (
|
|
2147
|
+
i === "values" && typeof t.values == "object" || (jr(i) || n === !0 && Ee(i) || !e && !Ee(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
2148
2148
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
2149
2149
|
return s;
|
|
2150
2150
|
}
|
|
@@ -2155,7 +2155,7 @@ function Ie(t) {
|
|
|
2155
2155
|
function ee(t) {
|
|
2156
2156
|
return typeof t == "string" || Array.isArray(t);
|
|
2157
2157
|
}
|
|
2158
|
-
const
|
|
2158
|
+
const is = [
|
|
2159
2159
|
"animate",
|
|
2160
2160
|
"whileInView",
|
|
2161
2161
|
"whileFocus",
|
|
@@ -2163,14 +2163,14 @@ const ns = [
|
|
|
2163
2163
|
"whileTap",
|
|
2164
2164
|
"whileDrag",
|
|
2165
2165
|
"exit"
|
|
2166
|
-
],
|
|
2166
|
+
], rs = ["initial", ...is];
|
|
2167
2167
|
function _e(t) {
|
|
2168
|
-
return Ie(t.animate) ||
|
|
2168
|
+
return Ie(t.animate) || rs.some((e) => ee(t[e]));
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2170
|
+
function Nr(t) {
|
|
2171
2171
|
return !!(_e(t) || t.variants);
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function ic(t, e) {
|
|
2174
2174
|
if (_e(t)) {
|
|
2175
2175
|
const { initial: n, animate: s } = t;
|
|
2176
2176
|
return {
|
|
@@ -2180,39 +2180,39 @@ function sc(t, e) {
|
|
|
2180
2180
|
}
|
|
2181
2181
|
return t.inherit !== !1 ? e : {};
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2184
|
-
const { initial: e, animate: n } =
|
|
2185
|
-
return At(() => ({ initial: e, animate: n }), [
|
|
2183
|
+
function rc(t) {
|
|
2184
|
+
const { initial: e, animate: n } = ic(t, G(Ke));
|
|
2185
|
+
return At(() => ({ initial: e, animate: n }), [zs(e), zs(n)]);
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function zs(t) {
|
|
2188
2188
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
2189
2189
|
}
|
|
2190
2190
|
const ne = {};
|
|
2191
|
-
function
|
|
2191
|
+
function oc(t) {
|
|
2192
2192
|
for (const e in t)
|
|
2193
|
-
ne[e] = t[e],
|
|
2193
|
+
ne[e] = t[e], zn(e) && (ne[e].isCSSVariable = !0);
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2195
|
+
function Ur(t, { layout: e, layoutId: n }) {
|
|
2196
2196
|
return Ut.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ne[t] || t === "opacity");
|
|
2197
2197
|
}
|
|
2198
|
-
const
|
|
2198
|
+
const ac = {
|
|
2199
2199
|
x: "translateX",
|
|
2200
2200
|
y: "translateY",
|
|
2201
2201
|
z: "translateZ",
|
|
2202
2202
|
transformPerspective: "perspective"
|
|
2203
|
-
},
|
|
2204
|
-
function
|
|
2203
|
+
}, lc = Nt.length;
|
|
2204
|
+
function cc(t, e, n) {
|
|
2205
2205
|
let s = "", i = !0;
|
|
2206
|
-
for (let o = 0; o <
|
|
2206
|
+
for (let o = 0; o < lc; o++) {
|
|
2207
2207
|
const r = Nt[o], a = t[r];
|
|
2208
2208
|
if (a === void 0)
|
|
2209
2209
|
continue;
|
|
2210
2210
|
let l = !0;
|
|
2211
2211
|
if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
2212
|
-
const u =
|
|
2212
|
+
const u = Rr(a, ts[r]);
|
|
2213
2213
|
if (!l) {
|
|
2214
2214
|
i = !1;
|
|
2215
|
-
const c =
|
|
2215
|
+
const c = ac[r] || r;
|
|
2216
2216
|
s += `${c}(${u}) `;
|
|
2217
2217
|
}
|
|
2218
2218
|
n && (e[r] = u);
|
|
@@ -2220,7 +2220,7 @@ function lc(t, e, n) {
|
|
|
2220
2220
|
}
|
|
2221
2221
|
return s = s.trim(), n ? s = n(e, i ? "" : s) : i && (s = "none"), s;
|
|
2222
2222
|
}
|
|
2223
|
-
function
|
|
2223
|
+
function os(t, e, n) {
|
|
2224
2224
|
const { style: s, vars: i, transformOrigin: o } = t;
|
|
2225
2225
|
let r = !1, a = !1;
|
|
2226
2226
|
for (const l in e) {
|
|
@@ -2228,58 +2228,58 @@ function is(t, e, n) {
|
|
|
2228
2228
|
if (Ut.has(l)) {
|
|
2229
2229
|
r = !0;
|
|
2230
2230
|
continue;
|
|
2231
|
-
} else if (
|
|
2231
|
+
} else if (zn(l)) {
|
|
2232
2232
|
i[l] = u;
|
|
2233
2233
|
continue;
|
|
2234
2234
|
} else {
|
|
2235
|
-
const c =
|
|
2235
|
+
const c = Rr(u, ts[l]);
|
|
2236
2236
|
l.startsWith("origin") ? (a = !0, o[l] = c) : s[l] = c;
|
|
2237
2237
|
}
|
|
2238
2238
|
}
|
|
2239
|
-
if (e.transform || (r || n ? s.transform =
|
|
2239
|
+
if (e.transform || (r || n ? s.transform = cc(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2240
2240
|
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
|
|
2241
2241
|
s.transformOrigin = `${l} ${u} ${c}`;
|
|
2242
2242
|
}
|
|
2243
2243
|
}
|
|
2244
|
-
const
|
|
2244
|
+
const as = () => ({
|
|
2245
2245
|
style: {},
|
|
2246
2246
|
transform: {},
|
|
2247
2247
|
transformOrigin: {},
|
|
2248
2248
|
vars: {}
|
|
2249
2249
|
});
|
|
2250
|
-
function
|
|
2250
|
+
function zr(t, e, n) {
|
|
2251
2251
|
for (const s in e)
|
|
2252
|
-
!W(e[s]) && !
|
|
2252
|
+
!W(e[s]) && !Ur(s, n) && (t[s] = e[s]);
|
|
2253
2253
|
}
|
|
2254
|
-
function
|
|
2254
|
+
function uc({ transformTemplate: t }, e) {
|
|
2255
2255
|
return At(() => {
|
|
2256
|
-
const n =
|
|
2257
|
-
return
|
|
2256
|
+
const n = as();
|
|
2257
|
+
return os(n, e, t), Object.assign({}, n.vars, n.style);
|
|
2258
2258
|
}, [e]);
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function dc(t, e) {
|
|
2261
2261
|
const n = t.style || {}, s = {};
|
|
2262
|
-
return
|
|
2262
|
+
return zr(s, n, t), Object.assign(s, uc(t, e)), s;
|
|
2263
2263
|
}
|
|
2264
|
-
function
|
|
2265
|
-
const n = {}, s =
|
|
2264
|
+
function hc(t, e) {
|
|
2265
|
+
const n = {}, s = dc(t, e);
|
|
2266
2266
|
return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
2267
2267
|
}
|
|
2268
|
-
const
|
|
2268
|
+
const fc = {
|
|
2269
2269
|
offset: "stroke-dashoffset",
|
|
2270
2270
|
array: "stroke-dasharray"
|
|
2271
|
-
},
|
|
2271
|
+
}, pc = {
|
|
2272
2272
|
offset: "strokeDashoffset",
|
|
2273
2273
|
array: "strokeDasharray"
|
|
2274
2274
|
};
|
|
2275
|
-
function
|
|
2275
|
+
function mc(t, e, n = 1, s = 0, i = !0) {
|
|
2276
2276
|
t.pathLength = 1;
|
|
2277
|
-
const o = i ?
|
|
2277
|
+
const o = i ? fc : pc;
|
|
2278
2278
|
t[o.offset] = M.transform(-s);
|
|
2279
2279
|
const r = M.transform(e), a = M.transform(n);
|
|
2280
2280
|
t[o.array] = `${r} ${a}`;
|
|
2281
2281
|
}
|
|
2282
|
-
function
|
|
2282
|
+
function $r(t, {
|
|
2283
2283
|
attrX: e,
|
|
2284
2284
|
attrY: n,
|
|
2285
2285
|
attrScale: s,
|
|
@@ -2289,33 +2289,33 @@ function zr(t, {
|
|
|
2289
2289
|
// This is object creation, which we try to avoid per-frame.
|
|
2290
2290
|
...a
|
|
2291
2291
|
}, l, u, c) {
|
|
2292
|
-
if (
|
|
2292
|
+
if (os(t, a, u), l) {
|
|
2293
2293
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2294
2294
|
return;
|
|
2295
2295
|
}
|
|
2296
2296
|
t.attrs = t.style, t.style = {};
|
|
2297
2297
|
const { attrs: f, style: m } = t;
|
|
2298
|
-
f.transform && (m.transform = f.transform, delete f.transform), (m.transform || f.transformOrigin) && (m.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), m.transform && (m.transformBox = c?.transformBox ?? "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 &&
|
|
2298
|
+
f.transform && (m.transform = f.transform, delete f.transform), (m.transform || f.transformOrigin) && (m.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), m.transform && (m.transformBox = c?.transformBox ?? "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 && mc(f, i, o, r, !1);
|
|
2299
2299
|
}
|
|
2300
|
-
const
|
|
2301
|
-
...
|
|
2300
|
+
const Gr = () => ({
|
|
2301
|
+
...as(),
|
|
2302
2302
|
attrs: {}
|
|
2303
|
-
}),
|
|
2304
|
-
function
|
|
2303
|
+
}), Wr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2304
|
+
function gc(t, e, n, s) {
|
|
2305
2305
|
const i = At(() => {
|
|
2306
|
-
const o =
|
|
2307
|
-
return
|
|
2306
|
+
const o = Gr();
|
|
2307
|
+
return $r(o, e, Wr(s), t.transformTemplate, t.style), {
|
|
2308
2308
|
...o.attrs,
|
|
2309
2309
|
style: { ...o.style }
|
|
2310
2310
|
};
|
|
2311
2311
|
}, [e]);
|
|
2312
2312
|
if (t.style) {
|
|
2313
2313
|
const o = {};
|
|
2314
|
-
|
|
2314
|
+
zr(o, t.style, t), i.style = { ...o, ...i.style };
|
|
2315
2315
|
}
|
|
2316
2316
|
return i;
|
|
2317
2317
|
}
|
|
2318
|
-
const
|
|
2318
|
+
const yc = [
|
|
2319
2319
|
"animate",
|
|
2320
2320
|
"circle",
|
|
2321
2321
|
"defs",
|
|
@@ -2342,7 +2342,7 @@ const gc = [
|
|
|
2342
2342
|
"use",
|
|
2343
2343
|
"view"
|
|
2344
2344
|
];
|
|
2345
|
-
function
|
|
2345
|
+
function ls(t) {
|
|
2346
2346
|
return (
|
|
2347
2347
|
/**
|
|
2348
2348
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -2355,33 +2355,33 @@ function os(t) {
|
|
|
2355
2355
|
/**
|
|
2356
2356
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
2357
2357
|
*/
|
|
2358
|
-
!!(
|
|
2358
|
+
!!(yc.indexOf(t) > -1 || /**
|
|
2359
2359
|
* If it contains a capital letter, it's an SVG component
|
|
2360
2360
|
*/
|
|
2361
2361
|
/[A-Z]/u.test(t))
|
|
2362
2362
|
)
|
|
2363
2363
|
);
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2366
|
-
const a = (
|
|
2367
|
-
return
|
|
2365
|
+
function bc(t, e, n, { latestValues: s }, i, o = !1) {
|
|
2366
|
+
const a = (ls(t) ? gc : hc)(e, s, i, t), l = sc(e, typeof t == "string", o), u = t !== $i ? { ...l, ...a, ref: n } : {}, { children: c } = e, f = At(() => W(c) ? c.get() : c, [c]);
|
|
2367
|
+
return Fo(t, {
|
|
2368
2368
|
...u,
|
|
2369
2369
|
children: f
|
|
2370
2370
|
});
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2372
|
+
function $s(t) {
|
|
2373
2373
|
const e = [{}, {}];
|
|
2374
2374
|
return t?.values.forEach((n, s) => {
|
|
2375
2375
|
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
2376
2376
|
}), e;
|
|
2377
2377
|
}
|
|
2378
|
-
function
|
|
2378
|
+
function cs(t, e, n, s) {
|
|
2379
2379
|
if (typeof e == "function") {
|
|
2380
|
-
const [i, o] =
|
|
2380
|
+
const [i, o] = $s(s);
|
|
2381
2381
|
e = e(n !== void 0 ? n : t.custom, i, o);
|
|
2382
2382
|
}
|
|
2383
2383
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
2384
|
-
const [i, o] =
|
|
2384
|
+
const [i, o] = $s(s);
|
|
2385
2385
|
e = e(n !== void 0 ? n : t.custom, i, o);
|
|
2386
2386
|
}
|
|
2387
2387
|
return e;
|
|
@@ -2389,18 +2389,18 @@ function as(t, e, n, s) {
|
|
|
2389
2389
|
function Ce(t) {
|
|
2390
2390
|
return W(t) ? t.get() : t;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function vc({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
2393
2393
|
return {
|
|
2394
|
-
latestValues:
|
|
2394
|
+
latestValues: xc(n, s, i, t),
|
|
2395
2395
|
renderState: e()
|
|
2396
2396
|
};
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function xc(t, e, n, s) {
|
|
2399
2399
|
const i = {}, o = s(t, {});
|
|
2400
2400
|
for (const m in o)
|
|
2401
2401
|
i[m] = Ce(o[m]);
|
|
2402
2402
|
let { initial: r, animate: a } = t;
|
|
2403
|
-
const l = _e(t), u =
|
|
2403
|
+
const l = _e(t), u = Nr(t);
|
|
2404
2404
|
e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
2405
2405
|
let c = n ? n.initial === !1 : !1;
|
|
2406
2406
|
c = c || r === !1;
|
|
@@ -2408,7 +2408,7 @@ function vc(t, e, n, s) {
|
|
|
2408
2408
|
if (f && typeof f != "boolean" && !Ie(f)) {
|
|
2409
2409
|
const m = Array.isArray(f) ? f : [f];
|
|
2410
2410
|
for (let v = 0; v < m.length; v++) {
|
|
2411
|
-
const w =
|
|
2411
|
+
const w = cs(t, m[v]);
|
|
2412
2412
|
if (w) {
|
|
2413
2413
|
const { transitionEnd: C, transition: P, ...h } = w;
|
|
2414
2414
|
for (const y in h) {
|
|
@@ -2426,22 +2426,22 @@ function vc(t, e, n, s) {
|
|
|
2426
2426
|
}
|
|
2427
2427
|
return i;
|
|
2428
2428
|
}
|
|
2429
|
-
const
|
|
2430
|
-
const s = G(Ke), i = G(Le), o = () =>
|
|
2431
|
-
return n ? o() :
|
|
2429
|
+
const Hr = (t) => (e, n) => {
|
|
2430
|
+
const s = G(Ke), i = G(Le), o = () => vc(t, e, s, i);
|
|
2431
|
+
return n ? o() : Kn(o);
|
|
2432
2432
|
};
|
|
2433
|
-
function
|
|
2433
|
+
function us(t, e, n) {
|
|
2434
2434
|
const { style: s } = t, i = {};
|
|
2435
2435
|
for (const o in s)
|
|
2436
|
-
(W(s[o]) || e.style && W(e.style[o]) ||
|
|
2436
|
+
(W(s[o]) || e.style && W(e.style[o]) || Ur(o, t) || n?.getValue(o)?.liveStyle !== void 0) && (i[o] = s[o]);
|
|
2437
2437
|
return i;
|
|
2438
2438
|
}
|
|
2439
|
-
const
|
|
2440
|
-
scrapeMotionValuesFromProps:
|
|
2441
|
-
createRenderState:
|
|
2439
|
+
const wc = /* @__PURE__ */ Hr({
|
|
2440
|
+
scrapeMotionValuesFromProps: us,
|
|
2441
|
+
createRenderState: as
|
|
2442
2442
|
});
|
|
2443
|
-
function
|
|
2444
|
-
const s =
|
|
2443
|
+
function Xr(t, e, n) {
|
|
2444
|
+
const s = us(t, e, n);
|
|
2445
2445
|
for (const i in t)
|
|
2446
2446
|
if (W(t[i]) || W(e[i])) {
|
|
2447
2447
|
const o = Nt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
@@ -2449,15 +2449,15 @@ function Hr(t, e, n) {
|
|
|
2449
2449
|
}
|
|
2450
2450
|
return s;
|
|
2451
2451
|
}
|
|
2452
|
-
const
|
|
2453
|
-
scrapeMotionValuesFromProps:
|
|
2454
|
-
createRenderState:
|
|
2455
|
-
}),
|
|
2452
|
+
const Tc = /* @__PURE__ */ Hr({
|
|
2453
|
+
scrapeMotionValuesFromProps: Xr,
|
|
2454
|
+
createRenderState: Gr
|
|
2455
|
+
}), Cc = Symbol.for("motionComponentSymbol");
|
|
2456
2456
|
function Dt(t) {
|
|
2457
2457
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
2458
2458
|
}
|
|
2459
|
-
function
|
|
2460
|
-
return
|
|
2459
|
+
function Pc(t, e, n) {
|
|
2460
|
+
return zi(
|
|
2461
2461
|
(s) => {
|
|
2462
2462
|
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Dt(n) && (n.current = s));
|
|
2463
2463
|
},
|
|
@@ -2469,9 +2469,9 @@ function Cc(t, e, n) {
|
|
|
2469
2469
|
[e]
|
|
2470
2470
|
);
|
|
2471
2471
|
}
|
|
2472
|
-
const
|
|
2473
|
-
function
|
|
2474
|
-
const { visualElement: o } = G(Ke), r = G(
|
|
2472
|
+
const ds = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Sc = "framerAppearId", Yr = "data-" + ds(Sc), qr = Ot({});
|
|
2473
|
+
function kc(t, e, n, s, i) {
|
|
2474
|
+
const { visualElement: o } = G(Ke), r = G(Fr), a = G(Le), l = G(ss).reducedMotion, u = ut(null);
|
|
2475
2475
|
s = s || r.renderer, !u.current && s && (u.current = s(t, {
|
|
2476
2476
|
visualState: e,
|
|
2477
2477
|
parent: o,
|
|
@@ -2480,14 +2480,14 @@ function Sc(t, e, n, s, i) {
|
|
|
2480
2480
|
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
2481
2481
|
reducedMotionConfig: l
|
|
2482
2482
|
}));
|
|
2483
|
-
const c = u.current, f = G(
|
|
2484
|
-
c && !c.projection && i && (c.type === "html" || c.type === "svg") &&
|
|
2483
|
+
const c = u.current, f = G(qr);
|
|
2484
|
+
c && !c.projection && i && (c.type === "html" || c.type === "svg") && Ac(u.current, n, i, f);
|
|
2485
2485
|
const m = ut(!1);
|
|
2486
|
-
|
|
2486
|
+
Ui(() => {
|
|
2487
2487
|
c && m.current && c.update(n, a);
|
|
2488
2488
|
});
|
|
2489
|
-
const v = n[
|
|
2490
|
-
return
|
|
2489
|
+
const v = n[Yr], w = ut(!!v && !window.MotionHandoffIsComplete?.(v) && window.MotionHasOptimisedAnimation?.(v));
|
|
2490
|
+
return Hi(() => {
|
|
2491
2491
|
c && (m.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), c.scheduleRenderMicrotask(), w.current && c.animationState && c.animationState.animateChanges());
|
|
2492
2492
|
}), Re(() => {
|
|
2493
2493
|
c && (!w.current && c.animationState && c.animationState.animateChanges(), w.current && (queueMicrotask(() => {
|
|
@@ -2495,9 +2495,9 @@ function Sc(t, e, n, s, i) {
|
|
|
2495
2495
|
}), w.current = !1), c.enteringChildren = void 0);
|
|
2496
2496
|
}), c;
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function Ac(t, e, n, s) {
|
|
2499
2499
|
const { layoutId: i, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = e;
|
|
2500
|
-
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 :
|
|
2500
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Zr(t.parent)), t.projection.setOptions({
|
|
2501
2501
|
layoutId: i,
|
|
2502
2502
|
layout: o,
|
|
2503
2503
|
alwaysMeasureLayout: !!r || a && Dt(a),
|
|
@@ -2516,43 +2516,43 @@ function kc(t, e, n, s) {
|
|
|
2516
2516
|
layoutRoot: u
|
|
2517
2517
|
});
|
|
2518
2518
|
}
|
|
2519
|
-
function
|
|
2519
|
+
function Zr(t) {
|
|
2520
2520
|
if (t)
|
|
2521
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
2521
|
+
return t.options.allowProjection !== !1 ? t.projection : Zr(t.parent);
|
|
2522
2522
|
}
|
|
2523
|
-
function
|
|
2524
|
-
n &&
|
|
2525
|
-
const i =
|
|
2523
|
+
function He(t, { forwardMotionProps: e = !1 } = {}, n, s) {
|
|
2524
|
+
n && tc(n);
|
|
2525
|
+
const i = ls(t) ? Tc : wc;
|
|
2526
2526
|
function o(a, l) {
|
|
2527
2527
|
let u;
|
|
2528
2528
|
const c = {
|
|
2529
|
-
...G(
|
|
2529
|
+
...G(ss),
|
|
2530
2530
|
...a,
|
|
2531
|
-
layoutId:
|
|
2532
|
-
}, { isStatic: f } = c, m =
|
|
2533
|
-
if (!f &&
|
|
2534
|
-
|
|
2535
|
-
const w =
|
|
2536
|
-
u = w.MeasureLayout, m.visualElement =
|
|
2531
|
+
layoutId: Mc(a)
|
|
2532
|
+
}, { isStatic: f } = c, m = rc(a), v = i(a, f);
|
|
2533
|
+
if (!f && In) {
|
|
2534
|
+
Vc(c, n);
|
|
2535
|
+
const w = Ec(c);
|
|
2536
|
+
u = w.MeasureLayout, m.visualElement = kc(t, v, c, s, w.ProjectionNode);
|
|
2537
2537
|
}
|
|
2538
|
-
return
|
|
2538
|
+
return Gi(Ke.Provider, { value: m, children: [u && m.visualElement ? Q(u, { visualElement: m.visualElement, ...c }) : null, bc(t, a, Pc(v, m.visualElement, l), v, f, e)] });
|
|
2539
2539
|
}
|
|
2540
2540
|
o.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
2541
|
-
const r =
|
|
2542
|
-
return r[
|
|
2541
|
+
const r = jo(o);
|
|
2542
|
+
return r[Cc] = t, r;
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2545
|
-
const e = G(
|
|
2544
|
+
function Mc({ layoutId: t }) {
|
|
2545
|
+
const e = G(Ln).id;
|
|
2546
2546
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
2547
2547
|
}
|
|
2548
|
-
function
|
|
2549
|
-
const n = G(
|
|
2548
|
+
function Vc(t, e) {
|
|
2549
|
+
const n = G(Fr).strict;
|
|
2550
2550
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
2551
2551
|
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
2552
2552
|
t.ignoreStrict ? Ft(!1, s, "lazy-strict-mode") : ht(!1, s, "lazy-strict-mode");
|
|
2553
2553
|
}
|
|
2554
2554
|
}
|
|
2555
|
-
function
|
|
2555
|
+
function Ec(t) {
|
|
2556
2556
|
const { drag: e, layout: n } = Bt;
|
|
2557
2557
|
if (!e && !n)
|
|
2558
2558
|
return {};
|
|
@@ -2562,29 +2562,29 @@ function Vc(t) {
|
|
|
2562
2562
|
ProjectionNode: s.ProjectionNode
|
|
2563
2563
|
};
|
|
2564
2564
|
}
|
|
2565
|
-
function
|
|
2565
|
+
function Dc(t, e) {
|
|
2566
2566
|
if (typeof Proxy > "u")
|
|
2567
|
-
return
|
|
2568
|
-
const n = /* @__PURE__ */ new Map(), s = (o, r) =>
|
|
2567
|
+
return He;
|
|
2568
|
+
const n = /* @__PURE__ */ new Map(), s = (o, r) => He(o, r, t, e), i = (o, r) => (process.env.NODE_ENV !== "production" && jn(!1, "motion() is deprecated. Use motion.create() instead."), s(o, r));
|
|
2569
2569
|
return new Proxy(i, {
|
|
2570
2570
|
/**
|
|
2571
2571
|
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
2572
2572
|
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
2573
2573
|
* DOM component with that name.
|
|
2574
2574
|
*/
|
|
2575
|
-
get: (o, r) => r === "create" ? s : (n.has(r) || n.set(r,
|
|
2575
|
+
get: (o, r) => r === "create" ? s : (n.has(r) || n.set(r, He(r, void 0, t, e)), n.get(r))
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
|
-
function
|
|
2578
|
+
function Jr({ top: t, left: e, right: n, bottom: s }) {
|
|
2579
2579
|
return {
|
|
2580
2580
|
x: { min: e, max: n },
|
|
2581
2581
|
y: { min: t, max: s }
|
|
2582
2582
|
};
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2584
|
+
function Rc({ x: t, y: e }) {
|
|
2585
2585
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function Lc(t, e) {
|
|
2588
2588
|
if (!e)
|
|
2589
2589
|
return t;
|
|
2590
2590
|
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
@@ -2595,36 +2595,36 @@ function Rc(t, e) {
|
|
|
2595
2595
|
right: s.x
|
|
2596
2596
|
};
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Xe(t) {
|
|
2599
2599
|
return t === void 0 || t === 1;
|
|
2600
2600
|
}
|
|
2601
|
-
function
|
|
2602
|
-
return !
|
|
2601
|
+
function xn({ scale: t, scaleX: e, scaleY: n }) {
|
|
2602
|
+
return !Xe(t) || !Xe(e) || !Xe(n);
|
|
2603
2603
|
}
|
|
2604
2604
|
function Tt(t) {
|
|
2605
|
-
return
|
|
2605
|
+
return xn(t) || Qr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2606
2606
|
}
|
|
2607
|
-
function
|
|
2608
|
-
return
|
|
2607
|
+
function Qr(t) {
|
|
2608
|
+
return Gs(t.x) || Gs(t.y);
|
|
2609
2609
|
}
|
|
2610
|
-
function
|
|
2610
|
+
function Gs(t) {
|
|
2611
2611
|
return t && t !== "0%";
|
|
2612
2612
|
}
|
|
2613
2613
|
function De(t, e, n) {
|
|
2614
2614
|
const s = t - n, i = e * s;
|
|
2615
2615
|
return n + i;
|
|
2616
2616
|
}
|
|
2617
|
-
function
|
|
2617
|
+
function Ws(t, e, n, s, i) {
|
|
2618
2618
|
return i !== void 0 && (t = De(t, i, s)), De(t, n, s) + e;
|
|
2619
2619
|
}
|
|
2620
|
-
function
|
|
2621
|
-
t.min =
|
|
2620
|
+
function wn(t, e = 0, n = 1, s, i) {
|
|
2621
|
+
t.min = Ws(t.min, e, n, s, i), t.max = Ws(t.max, e, n, s, i);
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2624
|
-
|
|
2623
|
+
function to(t, { x: e, y: n }) {
|
|
2624
|
+
wn(t.x, e.translate, e.scale, e.originPoint), wn(t.y, n.translate, n.scale, n.originPoint);
|
|
2625
2625
|
}
|
|
2626
|
-
const
|
|
2627
|
-
function
|
|
2626
|
+
const Hs = 0.999999999999, Xs = 1.0000000000001;
|
|
2627
|
+
function Kc(t, e, n, s = !1) {
|
|
2628
2628
|
const i = n.length;
|
|
2629
2629
|
if (!i)
|
|
2630
2630
|
return;
|
|
@@ -2636,49 +2636,49 @@ function Lc(t, e, n, s = !1) {
|
|
|
2636
2636
|
l && l.props.style && l.props.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && Lt(t, {
|
|
2637
2637
|
x: -o.scroll.offset.x,
|
|
2638
2638
|
y: -o.scroll.offset.y
|
|
2639
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale,
|
|
2639
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, to(t, r)), s && Tt(o.latestValues) && Lt(t, o.latestValues));
|
|
2640
2640
|
}
|
|
2641
|
-
e.x <
|
|
2641
|
+
e.x < Xs && e.x > Hs && (e.x = 1), e.y < Xs && e.y > Hs && (e.y = 1);
|
|
2642
2642
|
}
|
|
2643
2643
|
function Rt(t, e) {
|
|
2644
2644
|
t.min = t.min + e, t.max = t.max + e;
|
|
2645
2645
|
}
|
|
2646
|
-
function
|
|
2646
|
+
function Ys(t, e, n, s, i = 0.5) {
|
|
2647
2647
|
const o = _(t.min, t.max, i);
|
|
2648
|
-
|
|
2648
|
+
wn(t, e, n, o, s);
|
|
2649
2649
|
}
|
|
2650
2650
|
function Lt(t, e) {
|
|
2651
|
-
|
|
2651
|
+
Ys(t.x, e.x, e.scaleX, e.scale, e.originX), Ys(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
2652
2652
|
}
|
|
2653
|
-
function
|
|
2654
|
-
return
|
|
2653
|
+
function eo(t, e) {
|
|
2654
|
+
return Jr(Lc(t.getBoundingClientRect(), e));
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2657
|
-
const s =
|
|
2656
|
+
function Ic(t, e, n) {
|
|
2657
|
+
const s = eo(t, n), { scroll: i } = e;
|
|
2658
2658
|
return i && (Rt(s.x, i.offset.x), Rt(s.y, i.offset.y)), s;
|
|
2659
2659
|
}
|
|
2660
|
-
const
|
|
2660
|
+
const qs = () => ({
|
|
2661
2661
|
translate: 0,
|
|
2662
2662
|
scale: 1,
|
|
2663
2663
|
origin: 0,
|
|
2664
2664
|
originPoint: 0
|
|
2665
2665
|
}), Kt = () => ({
|
|
2666
|
-
x: Ys(),
|
|
2667
|
-
y: Ys()
|
|
2668
|
-
}), qs = () => ({ min: 0, max: 0 }), O = () => ({
|
|
2669
2666
|
x: qs(),
|
|
2670
2667
|
y: qs()
|
|
2671
|
-
}),
|
|
2672
|
-
|
|
2673
|
-
|
|
2668
|
+
}), Zs = () => ({ min: 0, max: 0 }), O = () => ({
|
|
2669
|
+
x: Zs(),
|
|
2670
|
+
y: Zs()
|
|
2671
|
+
}), Tn = { current: null }, no = { current: !1 };
|
|
2672
|
+
function _c() {
|
|
2673
|
+
if (no.current = !0, !!In)
|
|
2674
2674
|
if (window.matchMedia) {
|
|
2675
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () =>
|
|
2675
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Tn.current = t.matches;
|
|
2676
2676
|
t.addEventListener("change", e), e();
|
|
2677
2677
|
} else
|
|
2678
|
-
|
|
2678
|
+
Tn.current = !1;
|
|
2679
2679
|
}
|
|
2680
|
-
const
|
|
2681
|
-
function
|
|
2680
|
+
const Bc = /* @__PURE__ */ new WeakMap();
|
|
2681
|
+
function Oc(t, e, n) {
|
|
2682
2682
|
for (const s in e) {
|
|
2683
2683
|
const i = e[s], o = n[s];
|
|
2684
2684
|
if (W(i))
|
|
@@ -2698,7 +2698,7 @@ function Bc(t, e, n) {
|
|
|
2698
2698
|
e[s] === void 0 && t.removeValue(s);
|
|
2699
2699
|
return e;
|
|
2700
2700
|
}
|
|
2701
|
-
const
|
|
2701
|
+
const Js = [
|
|
2702
2702
|
"AnimationStart",
|
|
2703
2703
|
"AnimationComplete",
|
|
2704
2704
|
"Update",
|
|
@@ -2707,7 +2707,7 @@ const Zs = [
|
|
|
2707
2707
|
"LayoutAnimationStart",
|
|
2708
2708
|
"LayoutAnimationComplete"
|
|
2709
2709
|
];
|
|
2710
|
-
class
|
|
2710
|
+
class Fc {
|
|
2711
2711
|
/**
|
|
2712
2712
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
2713
2713
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -2719,14 +2719,14 @@ class Oc {
|
|
|
2719
2719
|
return {};
|
|
2720
2720
|
}
|
|
2721
2721
|
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
2722
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2722
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Jn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2723
2723
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2724
2724
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2725
2725
|
const m = Y.now();
|
|
2726
2726
|
this.renderScheduledAt < m && (this.renderScheduledAt = m, K.render(this.render, !1, !0));
|
|
2727
2727
|
};
|
|
2728
2728
|
const { latestValues: l, renderState: u } = r;
|
|
2729
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = _e(n), this.isVariantNode =
|
|
2729
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = _e(n), this.isVariantNode = Nr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
2730
2730
|
const { willChange: c, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
2731
2731
|
for (const m in f) {
|
|
2732
2732
|
const v = f[m];
|
|
@@ -2734,7 +2734,7 @@ class Oc {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
}
|
|
2736
2736
|
mount(e) {
|
|
2737
|
-
this.current = e,
|
|
2737
|
+
this.current = e, Bc.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((n, s) => this.bindToMotionValue(s, n)), no.current || _c(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Tn.current, process.env.NODE_ENV !== "production" && jn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
|
|
2738
2738
|
}
|
|
2739
2739
|
unmount() {
|
|
2740
2740
|
this.projection && this.projection.unmount(), yt(this.notifyUpdate), yt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
@@ -2803,13 +2803,13 @@ class Oc {
|
|
|
2803
2803
|
*/
|
|
2804
2804
|
update(e, n) {
|
|
2805
2805
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
2806
|
-
for (let s = 0; s <
|
|
2807
|
-
const i =
|
|
2806
|
+
for (let s = 0; s < Js.length; s++) {
|
|
2807
|
+
const i = Js[s];
|
|
2808
2808
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
2809
2809
|
const o = "on" + i, r = e[o];
|
|
2810
2810
|
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
2811
2811
|
}
|
|
2812
|
-
this.prevMotionValues =
|
|
2812
|
+
this.prevMotionValues = Oc(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
2813
2813
|
}
|
|
2814
2814
|
getProps() {
|
|
2815
2815
|
return this.props;
|
|
@@ -2874,7 +2874,7 @@ class Oc {
|
|
|
2874
2874
|
*/
|
|
2875
2875
|
readValue(e, n) {
|
|
2876
2876
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
2877
|
-
return s != null && (typeof s == "string" && (
|
|
2877
|
+
return s != null && (typeof s == "string" && (Xi(s) || qi(s)) ? s = parseFloat(s) : !Xl(s) && bt.test(n) && (s = Dr(e, n)), this.setBaseTarget(e, W(s) ? s.get() : s)), W(s) ? s.get() : s;
|
|
2878
2878
|
}
|
|
2879
2879
|
/**
|
|
2880
2880
|
* Set the base target to later animate back to. This is currently
|
|
@@ -2891,7 +2891,7 @@ class Oc {
|
|
|
2891
2891
|
const { initial: n } = this.props;
|
|
2892
2892
|
let s;
|
|
2893
2893
|
if (typeof n == "string" || typeof n == "object") {
|
|
2894
|
-
const o =
|
|
2894
|
+
const o = cs(this.props, n, this.presenceContext?.custom);
|
|
2895
2895
|
o && (s = o[e]);
|
|
2896
2896
|
}
|
|
2897
2897
|
if (n && s !== void 0)
|
|
@@ -2900,18 +2900,18 @@ class Oc {
|
|
|
2900
2900
|
return i !== void 0 && !W(i) ? i : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
2901
2901
|
}
|
|
2902
2902
|
on(e, n) {
|
|
2903
|
-
return this.events[e] || (this.events[e] = new
|
|
2903
|
+
return this.events[e] || (this.events[e] = new Fn()), this.events[e].add(n);
|
|
2904
2904
|
}
|
|
2905
2905
|
notify(e, ...n) {
|
|
2906
2906
|
this.events[e] && this.events[e].notify(...n);
|
|
2907
2907
|
}
|
|
2908
2908
|
scheduleRenderMicrotask() {
|
|
2909
|
-
|
|
2909
|
+
es.render(this.render);
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
class
|
|
2912
|
+
class so extends Fc {
|
|
2913
2913
|
constructor() {
|
|
2914
|
-
super(...arguments), this.KeyframeResolver =
|
|
2914
|
+
super(...arguments), this.KeyframeResolver = _l;
|
|
2915
2915
|
}
|
|
2916
2916
|
sortInstanceNodePosition(e, n) {
|
|
2917
2917
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -2930,7 +2930,7 @@ class no extends Oc {
|
|
|
2930
2930
|
}));
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
function
|
|
2933
|
+
function io(t, { style: e, vars: n }, s, i) {
|
|
2934
2934
|
const o = t.style;
|
|
2935
2935
|
let r;
|
|
2936
2936
|
for (r in e)
|
|
@@ -2939,32 +2939,32 @@ function so(t, { style: e, vars: n }, s, i) {
|
|
|
2939
2939
|
for (r in n)
|
|
2940
2940
|
o.setProperty(r, n[r]);
|
|
2941
2941
|
}
|
|
2942
|
-
function
|
|
2942
|
+
function jc(t) {
|
|
2943
2943
|
return window.getComputedStyle(t);
|
|
2944
2944
|
}
|
|
2945
|
-
class
|
|
2945
|
+
class Nc extends so {
|
|
2946
2946
|
constructor() {
|
|
2947
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2947
|
+
super(...arguments), this.type = "html", this.renderInstance = io;
|
|
2948
2948
|
}
|
|
2949
2949
|
readValueFromInstance(e, n) {
|
|
2950
2950
|
if (Ut.has(n))
|
|
2951
|
-
return this.projection?.isProjecting ?
|
|
2951
|
+
return this.projection?.isProjecting ? fn(n) : tl(e, n);
|
|
2952
2952
|
{
|
|
2953
|
-
const s =
|
|
2953
|
+
const s = jc(e), i = (zn(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
2954
2954
|
return typeof i == "string" ? i.trim() : i;
|
|
2955
2955
|
}
|
|
2956
2956
|
}
|
|
2957
2957
|
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
2958
|
-
return
|
|
2958
|
+
return eo(e, n);
|
|
2959
2959
|
}
|
|
2960
2960
|
build(e, n, s) {
|
|
2961
|
-
|
|
2961
|
+
os(e, n, s.transformTemplate);
|
|
2962
2962
|
}
|
|
2963
2963
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
2964
|
-
return
|
|
2964
|
+
return us(e, n, s);
|
|
2965
2965
|
}
|
|
2966
2966
|
}
|
|
2967
|
-
const
|
|
2967
|
+
const ro = /* @__PURE__ */ new Set([
|
|
2968
2968
|
"baseFrequency",
|
|
2969
2969
|
"diffuseConstant",
|
|
2970
2970
|
"kernelMatrix",
|
|
@@ -2989,12 +2989,12 @@ const io = /* @__PURE__ */ new Set([
|
|
|
2989
2989
|
"textLength",
|
|
2990
2990
|
"lengthAdjust"
|
|
2991
2991
|
]);
|
|
2992
|
-
function
|
|
2993
|
-
|
|
2992
|
+
function Uc(t, e, n, s) {
|
|
2993
|
+
io(t, e, void 0, s);
|
|
2994
2994
|
for (const i in e.attrs)
|
|
2995
|
-
t.setAttribute(
|
|
2995
|
+
t.setAttribute(ro.has(i) ? i : ds(i), e.attrs[i]);
|
|
2996
2996
|
}
|
|
2997
|
-
class
|
|
2997
|
+
class zc extends so {
|
|
2998
2998
|
constructor() {
|
|
2999
2999
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = O;
|
|
3000
3000
|
}
|
|
@@ -3003,90 +3003,90 @@ class Uc extends no {
|
|
|
3003
3003
|
}
|
|
3004
3004
|
readValueFromInstance(e, n) {
|
|
3005
3005
|
if (Ut.has(n)) {
|
|
3006
|
-
const s =
|
|
3006
|
+
const s = Er(n);
|
|
3007
3007
|
return s && s.default || 0;
|
|
3008
3008
|
}
|
|
3009
|
-
return n =
|
|
3009
|
+
return n = ro.has(n) ? n : ds(n), e.getAttribute(n);
|
|
3010
3010
|
}
|
|
3011
3011
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
3012
|
-
return
|
|
3012
|
+
return Xr(e, n, s);
|
|
3013
3013
|
}
|
|
3014
3014
|
build(e, n, s) {
|
|
3015
|
-
|
|
3015
|
+
$r(e, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
3016
3016
|
}
|
|
3017
3017
|
renderInstance(e, n, s, i) {
|
|
3018
|
-
|
|
3018
|
+
Uc(e, n, s, i);
|
|
3019
3019
|
}
|
|
3020
3020
|
mount(e) {
|
|
3021
|
-
this.isSVGTag =
|
|
3021
|
+
this.isSVGTag = Wr(e.tagName), super.mount(e);
|
|
3022
3022
|
}
|
|
3023
3023
|
}
|
|
3024
|
-
const
|
|
3025
|
-
allowProjection: t !==
|
|
3024
|
+
const $c = (t, e) => ls(t) ? new zc(e) : new Nc(e, {
|
|
3025
|
+
allowProjection: t !== $i
|
|
3026
3026
|
});
|
|
3027
3027
|
function It(t, e, n) {
|
|
3028
3028
|
const s = t.getProps();
|
|
3029
|
-
return
|
|
3029
|
+
return cs(s, e, n !== void 0 ? n : s.custom, t);
|
|
3030
3030
|
}
|
|
3031
|
-
const
|
|
3032
|
-
function
|
|
3031
|
+
const Cn = (t) => Array.isArray(t);
|
|
3032
|
+
function Gc(t, e, n) {
|
|
3033
3033
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, _t(n));
|
|
3034
3034
|
}
|
|
3035
|
-
function
|
|
3036
|
-
return
|
|
3035
|
+
function Wc(t) {
|
|
3036
|
+
return Cn(t) ? t[t.length - 1] || 0 : t;
|
|
3037
3037
|
}
|
|
3038
|
-
function
|
|
3038
|
+
function Hc(t, e) {
|
|
3039
3039
|
const n = It(t, e);
|
|
3040
3040
|
let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
|
|
3041
3041
|
o = { ...o, ...s };
|
|
3042
3042
|
for (const r in o) {
|
|
3043
|
-
const a =
|
|
3044
|
-
|
|
3043
|
+
const a = Wc(o[r]);
|
|
3044
|
+
Gc(t, r, a);
|
|
3045
3045
|
}
|
|
3046
3046
|
}
|
|
3047
|
-
function
|
|
3047
|
+
function Xc(t) {
|
|
3048
3048
|
return !!(W(t) && t.add);
|
|
3049
3049
|
}
|
|
3050
|
-
function
|
|
3050
|
+
function Pn(t, e) {
|
|
3051
3051
|
const n = t.getValue("willChange");
|
|
3052
|
-
if (
|
|
3052
|
+
if (Xc(n))
|
|
3053
3053
|
return n.add(e);
|
|
3054
3054
|
if (!n && ft.WillChange) {
|
|
3055
3055
|
const s = new ft.WillChange("auto");
|
|
3056
3056
|
t.addValue("willChange", s), s.add(e);
|
|
3057
3057
|
}
|
|
3058
3058
|
}
|
|
3059
|
-
function
|
|
3060
|
-
return t.props[
|
|
3059
|
+
function oo(t) {
|
|
3060
|
+
return t.props[Yr];
|
|
3061
3061
|
}
|
|
3062
|
-
const
|
|
3063
|
-
function
|
|
3064
|
-
const i = t.filter(
|
|
3062
|
+
const Yc = (t) => t !== null;
|
|
3063
|
+
function qc(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
3064
|
+
const i = t.filter(Yc), o = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
3065
3065
|
return i[o];
|
|
3066
3066
|
}
|
|
3067
|
-
const
|
|
3067
|
+
const Zc = {
|
|
3068
3068
|
type: "spring",
|
|
3069
3069
|
stiffness: 500,
|
|
3070
3070
|
damping: 25,
|
|
3071
3071
|
restSpeed: 10
|
|
3072
|
-
},
|
|
3072
|
+
}, Jc = (t) => ({
|
|
3073
3073
|
type: "spring",
|
|
3074
3074
|
stiffness: 550,
|
|
3075
3075
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
3076
3076
|
restSpeed: 10
|
|
3077
|
-
}),
|
|
3077
|
+
}), Qc = {
|
|
3078
3078
|
type: "keyframes",
|
|
3079
3079
|
duration: 0.8
|
|
3080
|
-
},
|
|
3080
|
+
}, tu = {
|
|
3081
3081
|
type: "keyframes",
|
|
3082
3082
|
ease: [0.25, 0.1, 0.35, 1],
|
|
3083
3083
|
duration: 0.3
|
|
3084
|
-
},
|
|
3085
|
-
function
|
|
3084
|
+
}, eu = (t, { keyframes: e }) => e.length > 2 ? Qc : Ut.has(t) ? t.startsWith("scale") ? Jc(e[1]) : Zc : tu;
|
|
3085
|
+
function nu({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
3086
3086
|
return !!Object.keys(c).length;
|
|
3087
3087
|
}
|
|
3088
|
-
const
|
|
3089
|
-
const a =
|
|
3088
|
+
const hs = (t, e, n, s = {}, i, o) => (r) => {
|
|
3089
|
+
const a = Qn(s, t) || {}, l = a.delay || s.delay || 0;
|
|
3090
3090
|
let { elapsed: u = 0 } = s;
|
|
3091
3091
|
u = u - /* @__PURE__ */ rt(l);
|
|
3092
3092
|
const c = {
|
|
@@ -3105,10 +3105,10 @@ const us = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
3105
3105
|
motionValue: e,
|
|
3106
3106
|
element: o ? void 0 : i
|
|
3107
3107
|
};
|
|
3108
|
-
|
|
3108
|
+
nu(a) || Object.assign(c, eu(t, c)), c.duration && (c.duration = /* @__PURE__ */ rt(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ rt(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
3109
3109
|
let f = !1;
|
|
3110
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (
|
|
3111
|
-
const m =
|
|
3110
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (bn(c), c.delay === 0 && (f = !0)), (ft.instantAnimations || ft.skipAnimations) && (f = !0, bn(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, f && !o && e.get() !== void 0) {
|
|
3111
|
+
const m = qc(c.keyframes, a);
|
|
3112
3112
|
if (m !== void 0) {
|
|
3113
3113
|
K.update(() => {
|
|
3114
3114
|
c.onUpdate(m), c.onComplete();
|
|
@@ -3116,55 +3116,55 @@ const us = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
3116
3116
|
return;
|
|
3117
3117
|
}
|
|
3118
3118
|
}
|
|
3119
|
-
return a.isSync ? new
|
|
3119
|
+
return a.isSync ? new Zn(c) : new Cl(c);
|
|
3120
3120
|
};
|
|
3121
|
-
function
|
|
3121
|
+
function su({ protectedKeys: t, needsAnimating: e }, n) {
|
|
3122
3122
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
3123
3123
|
return e[n] = !1, s;
|
|
3124
3124
|
}
|
|
3125
|
-
function
|
|
3125
|
+
function ao(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
3126
3126
|
let { transition: o = t.getDefaultTransition(), transitionEnd: r, ...a } = e;
|
|
3127
3127
|
s && (o = s);
|
|
3128
3128
|
const l = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
3129
3129
|
for (const c in a) {
|
|
3130
3130
|
const f = t.getValue(c, t.latestValues[c] ?? null), m = a[c];
|
|
3131
|
-
if (m === void 0 || u &&
|
|
3131
|
+
if (m === void 0 || u && su(u, c))
|
|
3132
3132
|
continue;
|
|
3133
3133
|
const v = {
|
|
3134
3134
|
delay: n,
|
|
3135
|
-
...
|
|
3135
|
+
...Qn(o || {}, c)
|
|
3136
3136
|
}, w = f.get();
|
|
3137
3137
|
if (w !== void 0 && !f.isAnimating && !Array.isArray(m) && m === w && !v.velocity)
|
|
3138
3138
|
continue;
|
|
3139
3139
|
let C = !1;
|
|
3140
3140
|
if (window.MotionHandoffAnimation) {
|
|
3141
|
-
const h =
|
|
3141
|
+
const h = oo(t);
|
|
3142
3142
|
if (h) {
|
|
3143
3143
|
const y = window.MotionHandoffAnimation(h, c, K);
|
|
3144
3144
|
y !== null && (v.startTime = y, C = !0);
|
|
3145
3145
|
}
|
|
3146
3146
|
}
|
|
3147
|
-
|
|
3147
|
+
Pn(t, c), f.start(hs(c, f, m, t.shouldReduceMotion && Ar.has(c) ? { type: !1 } : v, t, C));
|
|
3148
3148
|
const P = f.animation;
|
|
3149
3149
|
P && l.push(P);
|
|
3150
3150
|
}
|
|
3151
3151
|
return r && Promise.all(l).then(() => {
|
|
3152
3152
|
K.update(() => {
|
|
3153
|
-
r &&
|
|
3153
|
+
r && Hc(t, r);
|
|
3154
3154
|
});
|
|
3155
3155
|
}), l;
|
|
3156
3156
|
}
|
|
3157
|
-
function
|
|
3157
|
+
function lo(t, e, n, s = 0, i = 1) {
|
|
3158
3158
|
const o = Array.from(t).sort((u, c) => u.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * s;
|
|
3159
3159
|
return typeof n == "function" ? n(o, r) : i === 1 ? o * s : a - o * s;
|
|
3160
3160
|
}
|
|
3161
|
-
function
|
|
3161
|
+
function Sn(t, e, n = {}) {
|
|
3162
3162
|
const s = It(t, e, n.type === "exit" ? t.presenceContext?.custom : void 0);
|
|
3163
3163
|
let { transition: i = t.getDefaultTransition() || {} } = s || {};
|
|
3164
3164
|
n.transitionOverride && (i = n.transitionOverride);
|
|
3165
|
-
const o = s ? () => Promise.all(
|
|
3165
|
+
const o = s ? () => Promise.all(ao(t, s, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
3166
3166
|
const { delayChildren: u = 0, staggerChildren: c, staggerDirection: f } = i;
|
|
3167
|
-
return
|
|
3167
|
+
return iu(t, e, l, u, c, f, n);
|
|
3168
3168
|
} : () => Promise.resolve(), { when: a } = i;
|
|
3169
3169
|
if (a) {
|
|
3170
3170
|
const [l, u] = a === "beforeChildren" ? [o, r] : [r, o];
|
|
@@ -3172,32 +3172,32 @@ function Cn(t, e, n = {}) {
|
|
|
3172
3172
|
} else
|
|
3173
3173
|
return Promise.all([o(), r(n.delay)]);
|
|
3174
3174
|
}
|
|
3175
|
-
function
|
|
3175
|
+
function iu(t, e, n = 0, s = 0, i = 0, o = 1, r) {
|
|
3176
3176
|
const a = [];
|
|
3177
3177
|
for (const l of t.variantChildren)
|
|
3178
|
-
l.notify("AnimationStart", e), a.push(
|
|
3178
|
+
l.notify("AnimationStart", e), a.push(Sn(l, e, {
|
|
3179
3179
|
...r,
|
|
3180
|
-
delay: n + (typeof s == "function" ? 0 : s) +
|
|
3180
|
+
delay: n + (typeof s == "function" ? 0 : s) + lo(t.variantChildren, l, s, i, o)
|
|
3181
3181
|
}).then(() => l.notify("AnimationComplete", e)));
|
|
3182
3182
|
return Promise.all(a);
|
|
3183
3183
|
}
|
|
3184
|
-
function
|
|
3184
|
+
function ru(t, e, n = {}) {
|
|
3185
3185
|
t.notify("AnimationStart", e);
|
|
3186
3186
|
let s;
|
|
3187
3187
|
if (Array.isArray(e)) {
|
|
3188
|
-
const i = e.map((o) =>
|
|
3188
|
+
const i = e.map((o) => Sn(t, o, n));
|
|
3189
3189
|
s = Promise.all(i);
|
|
3190
3190
|
} else if (typeof e == "string")
|
|
3191
|
-
s =
|
|
3191
|
+
s = Sn(t, e, n);
|
|
3192
3192
|
else {
|
|
3193
3193
|
const i = typeof e == "function" ? It(t, e, n.custom) : e;
|
|
3194
|
-
s = Promise.all(
|
|
3194
|
+
s = Promise.all(ao(t, i, n));
|
|
3195
3195
|
}
|
|
3196
3196
|
return s.then(() => {
|
|
3197
3197
|
t.notify("AnimationComplete", e);
|
|
3198
3198
|
});
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3200
|
+
function co(t, e) {
|
|
3201
3201
|
if (!Array.isArray(e))
|
|
3202
3202
|
return !1;
|
|
3203
3203
|
const n = e.length;
|
|
@@ -3208,27 +3208,27 @@ function lo(t, e) {
|
|
|
3208
3208
|
return !1;
|
|
3209
3209
|
return !0;
|
|
3210
3210
|
}
|
|
3211
|
-
const
|
|
3212
|
-
function
|
|
3211
|
+
const ou = rs.length;
|
|
3212
|
+
function uo(t) {
|
|
3213
3213
|
if (!t)
|
|
3214
3214
|
return;
|
|
3215
3215
|
if (!t.isControllingVariants) {
|
|
3216
|
-
const n = t.parent ?
|
|
3216
|
+
const n = t.parent ? uo(t.parent) || {} : {};
|
|
3217
3217
|
return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
|
|
3218
3218
|
}
|
|
3219
3219
|
const e = {};
|
|
3220
|
-
for (let n = 0; n <
|
|
3221
|
-
const s =
|
|
3220
|
+
for (let n = 0; n < ou; n++) {
|
|
3221
|
+
const s = rs[n], i = t.props[s];
|
|
3222
3222
|
(ee(i) || i === !1) && (e[s] = i);
|
|
3223
3223
|
}
|
|
3224
3224
|
return e;
|
|
3225
3225
|
}
|
|
3226
|
-
const
|
|
3227
|
-
function lu(t) {
|
|
3228
|
-
return (e) => Promise.all(e.map(({ animation: n, options: s }) => iu(t, n, s)));
|
|
3229
|
-
}
|
|
3226
|
+
const au = [...is].reverse(), lu = is.length;
|
|
3230
3227
|
function cu(t) {
|
|
3231
|
-
|
|
3228
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => ru(t, n, s)));
|
|
3229
|
+
}
|
|
3230
|
+
function uu(t) {
|
|
3231
|
+
let e = cu(t), n = Qs(), s = !0;
|
|
3232
3232
|
const i = (l) => (u, c) => {
|
|
3233
3233
|
const f = It(t, c, l === "exit" ? t.presenceContext?.custom : void 0);
|
|
3234
3234
|
if (f) {
|
|
@@ -3241,10 +3241,10 @@ function cu(t) {
|
|
|
3241
3241
|
e = l(t);
|
|
3242
3242
|
}
|
|
3243
3243
|
function r(l) {
|
|
3244
|
-
const { props: u } = t, c =
|
|
3244
|
+
const { props: u } = t, c = uo(t.parent) || {}, f = [], m = /* @__PURE__ */ new Set();
|
|
3245
3245
|
let v = {}, w = 1 / 0;
|
|
3246
|
-
for (let P = 0; P <
|
|
3247
|
-
const h =
|
|
3246
|
+
for (let P = 0; P < lu; P++) {
|
|
3247
|
+
const h = au[P], y = n[h], d = u[h] !== void 0 ? u[h] : c[h], p = ee(d), g = h === l ? y.isActive : null;
|
|
3248
3248
|
g === !1 && (w = P);
|
|
3249
3249
|
let x = d === c[h] && d !== u[h] && p;
|
|
3250
3250
|
if (x && s && t.manuallyAnimateOnMount && (x = !1), y.protectedKeys = { ...v }, // If it isn't active and hasn't *just* been set as inactive
|
|
@@ -3252,7 +3252,7 @@ function cu(t) {
|
|
|
3252
3252
|
!d && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3253
3253
|
Ie(d) || typeof d == "boolean")
|
|
3254
3254
|
continue;
|
|
3255
|
-
const T =
|
|
3255
|
+
const T = du(y.prevProp, d);
|
|
3256
3256
|
let b = T || // If we're making this variant active, we want to always make it active
|
|
3257
3257
|
h === l && y.isActive && !x && p || // If we removed a higher-priority variant (i is in reverse order)
|
|
3258
3258
|
P > w && p, V = !1;
|
|
@@ -3272,7 +3272,7 @@ function cu(t) {
|
|
|
3272
3272
|
if (v.hasOwnProperty(R))
|
|
3273
3273
|
continue;
|
|
3274
3274
|
let lt = !1;
|
|
3275
|
-
|
|
3275
|
+
Cn(A) && Cn(tt) ? lt = !co(A, tt) : lt = A !== tt, lt ? A != null ? q(R) : m.add(R) : A !== void 0 && m.has(R) ? q(R) : y.protectedKeys[R] = !0;
|
|
3276
3276
|
}
|
|
3277
3277
|
y.prevProp = d, y.prevResolvedValues = L, y.isActive && (v = { ...v, ...L }), s && t.blockInitialAnimation && (b = !1);
|
|
3278
3278
|
const Z = x && T;
|
|
@@ -3282,7 +3282,7 @@ function cu(t) {
|
|
|
3282
3282
|
const { parent: tt } = t, lt = It(tt, R);
|
|
3283
3283
|
if (tt.enteringChildren && lt) {
|
|
3284
3284
|
const { delayChildren: le } = lt.transition || {};
|
|
3285
|
-
A.delay =
|
|
3285
|
+
A.delay = lo(tt.enteringChildren, t, le);
|
|
3286
3286
|
}
|
|
3287
3287
|
}
|
|
3288
3288
|
return {
|
|
@@ -3320,12 +3320,12 @@ function cu(t) {
|
|
|
3320
3320
|
setAnimateFunction: o,
|
|
3321
3321
|
getState: () => n,
|
|
3322
3322
|
reset: () => {
|
|
3323
|
-
n =
|
|
3323
|
+
n = Qs(), s = !0;
|
|
3324
3324
|
}
|
|
3325
3325
|
};
|
|
3326
3326
|
}
|
|
3327
|
-
function
|
|
3328
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
3327
|
+
function du(t, e) {
|
|
3328
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !co(e, t) : !1;
|
|
3329
3329
|
}
|
|
3330
3330
|
function xt(t = !1) {
|
|
3331
3331
|
return {
|
|
@@ -3335,7 +3335,7 @@ function xt(t = !1) {
|
|
|
3335
3335
|
prevResolvedValues: {}
|
|
3336
3336
|
};
|
|
3337
3337
|
}
|
|
3338
|
-
function
|
|
3338
|
+
function Qs() {
|
|
3339
3339
|
return {
|
|
3340
3340
|
animate: xt(!0),
|
|
3341
3341
|
whileInView: xt(),
|
|
@@ -3353,14 +3353,14 @@ class vt {
|
|
|
3353
3353
|
update() {
|
|
3354
3354
|
}
|
|
3355
3355
|
}
|
|
3356
|
-
class
|
|
3356
|
+
class hu extends vt {
|
|
3357
3357
|
/**
|
|
3358
3358
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3359
3359
|
* to the underlying animation library. We only want to load that if we load this,
|
|
3360
3360
|
* so people can optionally code split it out using the `m` component.
|
|
3361
3361
|
*/
|
|
3362
3362
|
constructor(e) {
|
|
3363
|
-
super(e), e.animationState || (e.animationState =
|
|
3363
|
+
super(e), e.animationState || (e.animationState = uu(e));
|
|
3364
3364
|
}
|
|
3365
3365
|
updateAnimationControlsSubscription() {
|
|
3366
3366
|
const { animate: e } = this.node.getProps();
|
|
@@ -3380,10 +3380,10 @@ class du extends vt {
|
|
|
3380
3380
|
this.node.animationState.reset(), this.unmountControls?.();
|
|
3381
3381
|
}
|
|
3382
3382
|
}
|
|
3383
|
-
let
|
|
3384
|
-
class
|
|
3383
|
+
let fu = 0;
|
|
3384
|
+
class pu extends vt {
|
|
3385
3385
|
constructor() {
|
|
3386
|
-
super(...arguments), this.id =
|
|
3386
|
+
super(...arguments), this.id = fu++;
|
|
3387
3387
|
}
|
|
3388
3388
|
update() {
|
|
3389
3389
|
if (!this.node.presenceContext)
|
|
@@ -3403,12 +3403,12 @@ class fu extends vt {
|
|
|
3403
3403
|
unmount() {
|
|
3404
3404
|
}
|
|
3405
3405
|
}
|
|
3406
|
-
const
|
|
3406
|
+
const mu = {
|
|
3407
3407
|
animation: {
|
|
3408
|
-
Feature:
|
|
3408
|
+
Feature: hu
|
|
3409
3409
|
},
|
|
3410
3410
|
exit: {
|
|
3411
|
-
Feature:
|
|
3411
|
+
Feature: pu
|
|
3412
3412
|
}
|
|
3413
3413
|
};
|
|
3414
3414
|
function se(t, e, n, s = { passive: !0 }) {
|
|
@@ -3422,49 +3422,49 @@ function ae(t) {
|
|
|
3422
3422
|
}
|
|
3423
3423
|
};
|
|
3424
3424
|
}
|
|
3425
|
-
const
|
|
3425
|
+
const gu = (t) => (e) => ns(e) && t(e, ae(e));
|
|
3426
3426
|
function Yt(t, e, n, s) {
|
|
3427
|
-
return se(t, e,
|
|
3427
|
+
return se(t, e, gu(n), s);
|
|
3428
3428
|
}
|
|
3429
|
-
const
|
|
3429
|
+
const ho = 1e-4, yu = 1 - ho, bu = 1 + ho, fo = 0.01, vu = 0 - fo, xu = 0 + fo;
|
|
3430
3430
|
function X(t) {
|
|
3431
3431
|
return t.max - t.min;
|
|
3432
3432
|
}
|
|
3433
|
-
function
|
|
3433
|
+
function wu(t, e, n) {
|
|
3434
3434
|
return Math.abs(t - e) <= n;
|
|
3435
3435
|
}
|
|
3436
|
-
function
|
|
3437
|
-
t.origin = s, t.originPoint = _(e.min, e.max, t.origin), t.scale = X(n) / X(e), t.translate = _(n.min, n.max, t.origin) - t.originPoint, (t.scale >=
|
|
3436
|
+
function ti(t, e, n, s = 0.5) {
|
|
3437
|
+
t.origin = s, t.originPoint = _(e.min, e.max, t.origin), t.scale = X(n) / X(e), t.translate = _(n.min, n.max, t.origin) - t.originPoint, (t.scale >= yu && t.scale <= bu || isNaN(t.scale)) && (t.scale = 1), (t.translate >= vu && t.translate <= xu || isNaN(t.translate)) && (t.translate = 0);
|
|
3438
3438
|
}
|
|
3439
3439
|
function qt(t, e, n, s) {
|
|
3440
|
-
|
|
3440
|
+
ti(t.x, e.x, n.x, s ? s.originX : void 0), ti(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3441
3441
|
}
|
|
3442
|
-
function
|
|
3442
|
+
function ei(t, e, n) {
|
|
3443
3443
|
t.min = n.min + e.min, t.max = t.min + X(e);
|
|
3444
3444
|
}
|
|
3445
|
-
function
|
|
3446
|
-
|
|
3445
|
+
function Tu(t, e, n) {
|
|
3446
|
+
ei(t.x, e.x, n.x), ei(t.y, e.y, n.y);
|
|
3447
3447
|
}
|
|
3448
|
-
function
|
|
3448
|
+
function ni(t, e, n) {
|
|
3449
3449
|
t.min = e.min - n.min, t.max = t.min + X(e);
|
|
3450
3450
|
}
|
|
3451
3451
|
function Zt(t, e, n) {
|
|
3452
|
-
|
|
3452
|
+
ni(t.x, e.x, n.x), ni(t.y, e.y, n.y);
|
|
3453
3453
|
}
|
|
3454
3454
|
function nt(t) {
|
|
3455
3455
|
return [t("x"), t("y")];
|
|
3456
3456
|
}
|
|
3457
|
-
const
|
|
3458
|
-
function
|
|
3459
|
-
const n =
|
|
3457
|
+
const po = ({ current: t }) => t ? t.ownerDocument.defaultView : null, si = (t, e) => Math.abs(t - e);
|
|
3458
|
+
function Cu(t, e) {
|
|
3459
|
+
const n = si(t.x, e.x), s = si(t.y, e.y);
|
|
3460
3460
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
3461
3461
|
}
|
|
3462
|
-
class
|
|
3462
|
+
class mo {
|
|
3463
3463
|
constructor(e, n, { transformPagePoint: s, contextWindow: i = window, dragSnapToOrigin: o = !1, distanceThreshold: r = 3 } = {}) {
|
|
3464
3464
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3465
3465
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3466
3466
|
return;
|
|
3467
|
-
const m =
|
|
3467
|
+
const m = qe(this.lastMoveEventInfo, this.history), v = this.startEvent !== null, w = Cu(m.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
3468
3468
|
if (!v && !w)
|
|
3469
3469
|
return;
|
|
3470
3470
|
const { point: C } = m, { timestamp: P } = $;
|
|
@@ -3472,21 +3472,21 @@ class po {
|
|
|
3472
3472
|
const { onStart: h, onMove: y } = this.handlers;
|
|
3473
3473
|
v || (h && h(this.lastMoveEvent, m), this.startEvent = this.lastMoveEvent), y && y(this.lastMoveEvent, m);
|
|
3474
3474
|
}, this.handlePointerMove = (m, v) => {
|
|
3475
|
-
this.lastMoveEvent = m, this.lastMoveEventInfo =
|
|
3475
|
+
this.lastMoveEvent = m, this.lastMoveEventInfo = Ye(v, this.transformPagePoint), K.update(this.updatePoint, !0);
|
|
3476
3476
|
}, this.handlePointerUp = (m, v) => {
|
|
3477
3477
|
this.end();
|
|
3478
3478
|
const { onEnd: w, onSessionEnd: C, resumeAnimation: P } = this.handlers;
|
|
3479
3479
|
if (this.dragSnapToOrigin && P && P(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3480
3480
|
return;
|
|
3481
|
-
const h =
|
|
3481
|
+
const h = qe(m.type === "pointercancel" ? this.lastMoveEventInfo : Ye(v, this.transformPagePoint), this.history);
|
|
3482
3482
|
this.startEvent && w && w(m, h), C && C(m, h);
|
|
3483
|
-
}, !
|
|
3483
|
+
}, !ns(e))
|
|
3484
3484
|
return;
|
|
3485
3485
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.distanceThreshold = r, this.contextWindow = i || window;
|
|
3486
|
-
const a = ae(e), l =
|
|
3486
|
+
const a = ae(e), l = Ye(a, this.transformPagePoint), { point: u } = l, { timestamp: c } = $;
|
|
3487
3487
|
this.history = [{ ...u, timestamp: c }];
|
|
3488
3488
|
const { onSessionStart: f } = n;
|
|
3489
|
-
f && f(e,
|
|
3489
|
+
f && f(e, qe(l, this.history)), this.removeListeners = ie(Yt(this.contextWindow, "pointermove", this.handlePointerMove), Yt(this.contextWindow, "pointerup", this.handlePointerUp), Yt(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3490
3490
|
}
|
|
3491
3491
|
updateHandlers(e) {
|
|
3492
3492
|
this.handlers = e;
|
|
@@ -3495,31 +3495,31 @@ class po {
|
|
|
3495
3495
|
this.removeListeners && this.removeListeners(), yt(this.updatePoint);
|
|
3496
3496
|
}
|
|
3497
3497
|
}
|
|
3498
|
-
function
|
|
3498
|
+
function Ye(t, e) {
|
|
3499
3499
|
return e ? { point: e(t.point) } : t;
|
|
3500
3500
|
}
|
|
3501
|
-
function
|
|
3501
|
+
function ii(t, e) {
|
|
3502
3502
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3503
3503
|
}
|
|
3504
|
-
function
|
|
3504
|
+
function qe({ point: t }, e) {
|
|
3505
3505
|
return {
|
|
3506
3506
|
point: t,
|
|
3507
|
-
delta:
|
|
3508
|
-
offset:
|
|
3509
|
-
velocity:
|
|
3507
|
+
delta: ii(t, go(e)),
|
|
3508
|
+
offset: ii(t, Pu(e)),
|
|
3509
|
+
velocity: Su(e, 0.1)
|
|
3510
3510
|
};
|
|
3511
3511
|
}
|
|
3512
|
-
function
|
|
3512
|
+
function Pu(t) {
|
|
3513
3513
|
return t[0];
|
|
3514
3514
|
}
|
|
3515
|
-
function
|
|
3515
|
+
function go(t) {
|
|
3516
3516
|
return t[t.length - 1];
|
|
3517
3517
|
}
|
|
3518
|
-
function
|
|
3518
|
+
function Su(t, e) {
|
|
3519
3519
|
if (t.length < 2)
|
|
3520
3520
|
return { x: 0, y: 0 };
|
|
3521
3521
|
let n = t.length - 1, s = null;
|
|
3522
|
-
const i =
|
|
3522
|
+
const i = go(t);
|
|
3523
3523
|
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > /* @__PURE__ */ rt(e))); )
|
|
3524
3524
|
n--;
|
|
3525
3525
|
if (!s)
|
|
@@ -3533,58 +3533,58 @@ function Pu(t, e) {
|
|
|
3533
3533
|
};
|
|
3534
3534
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
3535
3535
|
}
|
|
3536
|
-
function
|
|
3536
|
+
function ku(t, { min: e, max: n }, s) {
|
|
3537
3537
|
return e !== void 0 && t < e ? t = s ? _(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? _(n, t, s.max) : Math.min(t, n)), t;
|
|
3538
3538
|
}
|
|
3539
|
-
function
|
|
3539
|
+
function ri(t, e, n) {
|
|
3540
3540
|
return {
|
|
3541
3541
|
min: e !== void 0 ? t.min + e : void 0,
|
|
3542
3542
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
3543
3543
|
};
|
|
3544
3544
|
}
|
|
3545
|
-
function
|
|
3545
|
+
function Au(t, { top: e, left: n, bottom: s, right: i }) {
|
|
3546
3546
|
return {
|
|
3547
|
-
x:
|
|
3548
|
-
y:
|
|
3547
|
+
x: ri(t.x, n, i),
|
|
3548
|
+
y: ri(t.y, e, s)
|
|
3549
3549
|
};
|
|
3550
3550
|
}
|
|
3551
|
-
function
|
|
3551
|
+
function oi(t, e) {
|
|
3552
3552
|
let n = e.min - t.min, s = e.max - t.max;
|
|
3553
3553
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
3554
3554
|
}
|
|
3555
|
-
function
|
|
3555
|
+
function Mu(t, e) {
|
|
3556
3556
|
return {
|
|
3557
|
-
x:
|
|
3558
|
-
y:
|
|
3557
|
+
x: oi(t.x, e.x),
|
|
3558
|
+
y: oi(t.y, e.y)
|
|
3559
3559
|
};
|
|
3560
3560
|
}
|
|
3561
|
-
function
|
|
3561
|
+
function Vu(t, e) {
|
|
3562
3562
|
let n = 0.5;
|
|
3563
3563
|
const s = X(t), i = X(e);
|
|
3564
3564
|
return i > s ? n = /* @__PURE__ */ Jt(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ Jt(t.min, t.max - i, e.min)), dt(0, 1, n);
|
|
3565
3565
|
}
|
|
3566
|
-
function
|
|
3566
|
+
function Eu(t, e) {
|
|
3567
3567
|
const n = {};
|
|
3568
3568
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3569
3569
|
}
|
|
3570
|
-
const
|
|
3571
|
-
function
|
|
3572
|
-
return t === !1 ? t = 0 : t === !0 && (t =
|
|
3573
|
-
x:
|
|
3574
|
-
y:
|
|
3570
|
+
const kn = 0.35;
|
|
3571
|
+
function Du(t = kn) {
|
|
3572
|
+
return t === !1 ? t = 0 : t === !0 && (t = kn), {
|
|
3573
|
+
x: ai(t, "left", "right"),
|
|
3574
|
+
y: ai(t, "top", "bottom")
|
|
3575
3575
|
};
|
|
3576
3576
|
}
|
|
3577
|
-
function
|
|
3577
|
+
function ai(t, e, n) {
|
|
3578
3578
|
return {
|
|
3579
|
-
min:
|
|
3580
|
-
max:
|
|
3579
|
+
min: li(t, e),
|
|
3580
|
+
max: li(t, n)
|
|
3581
3581
|
};
|
|
3582
3582
|
}
|
|
3583
|
-
function
|
|
3583
|
+
function li(t, e) {
|
|
3584
3584
|
return typeof t == "number" ? t : t[e] || 0;
|
|
3585
3585
|
}
|
|
3586
|
-
const
|
|
3587
|
-
class
|
|
3586
|
+
const Ru = /* @__PURE__ */ new WeakMap();
|
|
3587
|
+
class Lu {
|
|
3588
3588
|
constructor(e) {
|
|
3589
3589
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = O(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
|
|
3590
3590
|
}
|
|
@@ -3597,7 +3597,7 @@ class Ru {
|
|
|
3597
3597
|
m ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(ae(f).point);
|
|
3598
3598
|
}, r = (f, m) => {
|
|
3599
3599
|
const { drag: v, dragPropagation: w, onDragStart: C } = this.getProps();
|
|
3600
|
-
if (v && !w && (this.openDragLock && this.openDragLock(), this.openDragLock =
|
|
3600
|
+
if (v && !w && (this.openDragLock && this.openDragLock(), this.openDragLock = jl(v), !this.openDragLock))
|
|
3601
3601
|
return;
|
|
3602
3602
|
this.latestPointerEvent = f, this.latestPanInfo = m, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((h) => {
|
|
3603
3603
|
let y = this.getAxisMotionValue(h).get() || 0;
|
|
@@ -3609,7 +3609,7 @@ class Ru {
|
|
|
3609
3609
|
}
|
|
3610
3610
|
}
|
|
3611
3611
|
this.originPoint[h] = y;
|
|
3612
|
-
}), C && K.postRender(() => C(f, m)),
|
|
3612
|
+
}), C && K.postRender(() => C(f, m)), Pn(this.visualElement, "transform");
|
|
3613
3613
|
const { animationState: P } = this.visualElement;
|
|
3614
3614
|
P && P.setActive("whileDrag", !0);
|
|
3615
3615
|
}, a = (f, m) => {
|
|
@@ -3619,14 +3619,14 @@ class Ru {
|
|
|
3619
3619
|
return;
|
|
3620
3620
|
const { offset: h } = m;
|
|
3621
3621
|
if (w && this.currentDirection === null) {
|
|
3622
|
-
this.currentDirection =
|
|
3622
|
+
this.currentDirection = Ku(h), this.currentDirection !== null && C && C(this.currentDirection);
|
|
3623
3623
|
return;
|
|
3624
3624
|
}
|
|
3625
3625
|
this.updateAxis("x", m.point, h), this.updateAxis("y", m.point, h), this.visualElement.render(), P && P(f, m);
|
|
3626
3626
|
}, l = (f, m) => {
|
|
3627
3627
|
this.latestPointerEvent = f, this.latestPanInfo = m, this.stop(f, m), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
3628
3628
|
}, u = () => nt((f) => this.getAnimationState(f) === "paused" && this.getAxisMotionValue(f).animation?.play()), { dragSnapToOrigin: c } = this.getProps();
|
|
3629
|
-
this.panSession = new
|
|
3629
|
+
this.panSession = new mo(e, {
|
|
3630
3630
|
onSessionStart: o,
|
|
3631
3631
|
onStart: r,
|
|
3632
3632
|
onMove: a,
|
|
@@ -3636,7 +3636,7 @@ class Ru {
|
|
|
3636
3636
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
3637
3637
|
dragSnapToOrigin: c,
|
|
3638
3638
|
distanceThreshold: s,
|
|
3639
|
-
contextWindow:
|
|
3639
|
+
contextWindow: po(this.visualElement)
|
|
3640
3640
|
});
|
|
3641
3641
|
}
|
|
3642
3642
|
/**
|
|
@@ -3667,12 +3667,12 @@ class Ru {
|
|
|
3667
3667
|
return;
|
|
3668
3668
|
const o = this.getAxisMotionValue(e);
|
|
3669
3669
|
let r = this.originPoint[e] + s[e];
|
|
3670
|
-
this.constraints && this.constraints[e] && (r =
|
|
3670
|
+
this.constraints && this.constraints[e] && (r = ku(r, this.constraints[e], this.elastic[e])), o.set(r);
|
|
3671
3671
|
}
|
|
3672
3672
|
resolveConstraints() {
|
|
3673
3673
|
const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, i = this.constraints;
|
|
3674
|
-
e && Dt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints =
|
|
3675
|
-
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] =
|
|
3674
|
+
e && Dt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = Au(s.layoutBox, e) : this.constraints = !1, this.elastic = Du(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && nt((o) => {
|
|
3675
|
+
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = Eu(s.layoutBox[o], this.constraints[o]));
|
|
3676
3676
|
});
|
|
3677
3677
|
}
|
|
3678
3678
|
resolveRefConstraints() {
|
|
@@ -3684,11 +3684,11 @@ class Ru {
|
|
|
3684
3684
|
const { projection: i } = this.visualElement;
|
|
3685
3685
|
if (!i || !i.layout)
|
|
3686
3686
|
return !1;
|
|
3687
|
-
const o =
|
|
3688
|
-
let r =
|
|
3687
|
+
const o = Ic(s, i.root, this.visualElement.getTransformPagePoint());
|
|
3688
|
+
let r = Mu(i.layout.layoutBox, o);
|
|
3689
3689
|
if (n) {
|
|
3690
|
-
const a = n(
|
|
3691
|
-
this.hasMutatedConstraints = !!a, a && (r =
|
|
3690
|
+
const a = n(Rc(r));
|
|
3691
|
+
this.hasMutatedConstraints = !!a, a && (r = Jr(a));
|
|
3692
3692
|
}
|
|
3693
3693
|
return r;
|
|
3694
3694
|
}
|
|
@@ -3715,7 +3715,7 @@ class Ru {
|
|
|
3715
3715
|
}
|
|
3716
3716
|
startAxisValueAnimation(e, n) {
|
|
3717
3717
|
const s = this.getAxisMotionValue(e);
|
|
3718
|
-
return
|
|
3718
|
+
return Pn(this.visualElement, e), s.start(hs(e, s, 0, n, this.visualElement, !1));
|
|
3719
3719
|
}
|
|
3720
3720
|
stopAnimation() {
|
|
3721
3721
|
nt((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3765,7 +3765,7 @@ class Ru {
|
|
|
3765
3765
|
const a = this.getAxisMotionValue(r);
|
|
3766
3766
|
if (a && this.constraints !== !1) {
|
|
3767
3767
|
const l = a.get();
|
|
3768
|
-
i[r] =
|
|
3768
|
+
i[r] = Vu({ min: l, max: l }, this.constraints[r]);
|
|
3769
3769
|
}
|
|
3770
3770
|
});
|
|
3771
3771
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
@@ -3779,7 +3779,7 @@ class Ru {
|
|
|
3779
3779
|
addListeners() {
|
|
3780
3780
|
if (!this.visualElement.current)
|
|
3781
3781
|
return;
|
|
3782
|
-
|
|
3782
|
+
Ru.set(this.visualElement, this);
|
|
3783
3783
|
const e = this.visualElement.current, n = Yt(e, "pointerdown", (l) => {
|
|
3784
3784
|
const { drag: u, dragListener: c = !0 } = this.getProps();
|
|
3785
3785
|
u && c && this.start(l);
|
|
@@ -3799,7 +3799,7 @@ class Ru {
|
|
|
3799
3799
|
};
|
|
3800
3800
|
}
|
|
3801
3801
|
getProps() {
|
|
3802
|
-
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: o = !1, dragElastic: r =
|
|
3802
|
+
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: o = !1, dragElastic: r = kn, dragMomentum: a = !0 } = e;
|
|
3803
3803
|
return {
|
|
3804
3804
|
...e,
|
|
3805
3805
|
drag: n,
|
|
@@ -3814,13 +3814,13 @@ class Ru {
|
|
|
3814
3814
|
function be(t, e, n) {
|
|
3815
3815
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
3816
3816
|
}
|
|
3817
|
-
function
|
|
3817
|
+
function Ku(t, e = 10) {
|
|
3818
3818
|
let n = null;
|
|
3819
3819
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3820
3820
|
}
|
|
3821
|
-
class
|
|
3821
|
+
class Iu extends vt {
|
|
3822
3822
|
constructor(e) {
|
|
3823
|
-
super(e), this.removeGroupControls = st, this.removeListeners = st, this.controls = new
|
|
3823
|
+
super(e), this.removeGroupControls = st, this.removeListeners = st, this.controls = new Lu(e);
|
|
3824
3824
|
}
|
|
3825
3825
|
mount() {
|
|
3826
3826
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -3830,24 +3830,24 @@ class Ku extends vt {
|
|
|
3830
3830
|
this.removeGroupControls(), this.removeListeners();
|
|
3831
3831
|
}
|
|
3832
3832
|
}
|
|
3833
|
-
const
|
|
3833
|
+
const ci = (t) => (e, n) => {
|
|
3834
3834
|
t && K.postRender(() => t(e, n));
|
|
3835
3835
|
};
|
|
3836
|
-
class
|
|
3836
|
+
class _u extends vt {
|
|
3837
3837
|
constructor() {
|
|
3838
3838
|
super(...arguments), this.removePointerDownListener = st;
|
|
3839
3839
|
}
|
|
3840
3840
|
onPointerDown(e) {
|
|
3841
|
-
this.session = new
|
|
3841
|
+
this.session = new mo(e, this.createPanHandlers(), {
|
|
3842
3842
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
3843
|
-
contextWindow:
|
|
3843
|
+
contextWindow: po(this.node)
|
|
3844
3844
|
});
|
|
3845
3845
|
}
|
|
3846
3846
|
createPanHandlers() {
|
|
3847
3847
|
const { onPanSessionStart: e, onPanStart: n, onPan: s, onPanEnd: i } = this.node.getProps();
|
|
3848
3848
|
return {
|
|
3849
|
-
onSessionStart:
|
|
3850
|
-
onStart:
|
|
3849
|
+
onSessionStart: ci(e),
|
|
3850
|
+
onStart: ci(n),
|
|
3851
3851
|
onMove: s,
|
|
3852
3852
|
onEnd: (o, r) => {
|
|
3853
3853
|
delete this.session, i && K.postRender(() => i(o, r));
|
|
@@ -3876,7 +3876,7 @@ const Pe = {
|
|
|
3876
3876
|
*/
|
|
3877
3877
|
hasEverUpdated: !1
|
|
3878
3878
|
};
|
|
3879
|
-
function
|
|
3879
|
+
function ui(t, e) {
|
|
3880
3880
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
3881
3881
|
}
|
|
3882
3882
|
const Gt = {
|
|
@@ -3888,10 +3888,10 @@ const Gt = {
|
|
|
3888
3888
|
t = parseFloat(t);
|
|
3889
3889
|
else
|
|
3890
3890
|
return t;
|
|
3891
|
-
const n =
|
|
3891
|
+
const n = ui(t, e.target.x), s = ui(t, e.target.y);
|
|
3892
3892
|
return `${n}% ${s}%`;
|
|
3893
3893
|
}
|
|
3894
|
-
},
|
|
3894
|
+
}, Bu = {
|
|
3895
3895
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3896
3896
|
const s = t, i = bt.parse(t);
|
|
3897
3897
|
if (i.length > 5)
|
|
@@ -3902,8 +3902,8 @@ const Gt = {
|
|
|
3902
3902
|
return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
|
|
3903
3903
|
}
|
|
3904
3904
|
};
|
|
3905
|
-
let
|
|
3906
|
-
class
|
|
3905
|
+
let Ze = !1;
|
|
3906
|
+
class Ou extends No {
|
|
3907
3907
|
/**
|
|
3908
3908
|
* This only mounts projection nodes for components that
|
|
3909
3909
|
* need measuring, we might want to do it for all components
|
|
@@ -3911,7 +3911,7 @@ class Bu extends jo {
|
|
|
3911
3911
|
*/
|
|
3912
3912
|
componentDidMount() {
|
|
3913
3913
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
|
|
3914
|
-
|
|
3914
|
+
oc(Fu), o && (n.group && n.group.add(o), s && s.register && i && s.register(o), Ze && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
3915
3915
|
this.safeToRemove();
|
|
3916
3916
|
}), o.setOptions({
|
|
3917
3917
|
...o.options,
|
|
@@ -3920,20 +3920,20 @@ class Bu extends jo {
|
|
|
3920
3920
|
}
|
|
3921
3921
|
getSnapshotBeforeUpdate(e) {
|
|
3922
3922
|
const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, { projection: r } = s;
|
|
3923
|
-
return r && (r.isPresent = o,
|
|
3923
|
+
return r && (r.isPresent = o, Ze = !0, i || e.layoutDependency !== n || n === void 0 || e.isPresent !== o ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || K.postRender(() => {
|
|
3924
3924
|
const a = r.getStack();
|
|
3925
3925
|
(!a || !a.members.length) && this.safeToRemove();
|
|
3926
3926
|
}))), null;
|
|
3927
3927
|
}
|
|
3928
3928
|
componentDidUpdate() {
|
|
3929
3929
|
const { projection: e } = this.props.visualElement;
|
|
3930
|
-
e && (e.root.didUpdate(),
|
|
3930
|
+
e && (e.root.didUpdate(), es.postRender(() => {
|
|
3931
3931
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
3932
3932
|
}));
|
|
3933
3933
|
}
|
|
3934
3934
|
componentWillUnmount() {
|
|
3935
3935
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s } = this.props, { projection: i } = e;
|
|
3936
|
-
|
|
3936
|
+
Ze = !0, i && (i.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(i), s && s.deregister && s.deregister(i));
|
|
3937
3937
|
}
|
|
3938
3938
|
safeToRemove() {
|
|
3939
3939
|
const { safeToRemove: e } = this.props;
|
|
@@ -3943,11 +3943,11 @@ class Bu extends jo {
|
|
|
3943
3943
|
return null;
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
|
-
function
|
|
3947
|
-
const [e, n] =
|
|
3948
|
-
return Q(
|
|
3946
|
+
function yo(t) {
|
|
3947
|
+
const [e, n] = Or(), s = G(Ln);
|
|
3948
|
+
return Q(Ou, { ...t, layoutGroup: s, switchLayoutGroup: G(qr), isPresent: e, safeToRemove: n });
|
|
3949
3949
|
}
|
|
3950
|
-
const
|
|
3950
|
+
const Fu = {
|
|
3951
3951
|
borderRadius: {
|
|
3952
3952
|
...Gt,
|
|
3953
3953
|
applyTo: [
|
|
@@ -3961,111 +3961,111 @@ const Ou = {
|
|
|
3961
3961
|
borderTopRightRadius: Gt,
|
|
3962
3962
|
borderBottomLeftRadius: Gt,
|
|
3963
3963
|
borderBottomRightRadius: Gt,
|
|
3964
|
-
boxShadow:
|
|
3964
|
+
boxShadow: Bu
|
|
3965
3965
|
};
|
|
3966
|
-
function
|
|
3966
|
+
function ju(t, e, n) {
|
|
3967
3967
|
const s = W(t) ? t : _t(t);
|
|
3968
|
-
return s.start(
|
|
3968
|
+
return s.start(hs("", s, e, n)), s.animation;
|
|
3969
3969
|
}
|
|
3970
|
-
const
|
|
3971
|
-
class
|
|
3970
|
+
const Nu = (t, e) => t.depth - e.depth;
|
|
3971
|
+
class Uu {
|
|
3972
3972
|
constructor() {
|
|
3973
3973
|
this.children = [], this.isDirty = !1;
|
|
3974
3974
|
}
|
|
3975
3975
|
add(e) {
|
|
3976
|
-
|
|
3976
|
+
_n(this.children, e), this.isDirty = !0;
|
|
3977
3977
|
}
|
|
3978
3978
|
remove(e) {
|
|
3979
|
-
|
|
3979
|
+
Bn(this.children, e), this.isDirty = !0;
|
|
3980
3980
|
}
|
|
3981
3981
|
forEach(e) {
|
|
3982
|
-
this.isDirty && this.children.sort(
|
|
3982
|
+
this.isDirty && this.children.sort(Nu), this.isDirty = !1, this.children.forEach(e);
|
|
3983
3983
|
}
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function zu(t, e) {
|
|
3986
3986
|
const n = Y.now(), s = ({ timestamp: i }) => {
|
|
3987
3987
|
const o = i - n;
|
|
3988
3988
|
o >= e && (yt(s), t(o - e));
|
|
3989
3989
|
};
|
|
3990
3990
|
return K.setup(s, !0), () => yt(s);
|
|
3991
3991
|
}
|
|
3992
|
-
const
|
|
3993
|
-
function
|
|
3994
|
-
i ? (t.opacity = _(0, n.opacity ?? 1,
|
|
3995
|
-
for (let r = 0; r <
|
|
3996
|
-
const a = `border${
|
|
3997
|
-
let l =
|
|
3992
|
+
const bo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], $u = bo.length, di = (t) => typeof t == "string" ? parseFloat(t) : t, hi = (t) => typeof t == "number" || M.test(t);
|
|
3993
|
+
function Gu(t, e, n, s, i, o) {
|
|
3994
|
+
i ? (t.opacity = _(0, n.opacity ?? 1, Wu(s)), t.opacityExit = _(e.opacity ?? 1, 0, Hu(s))) : o && (t.opacity = _(e.opacity ?? 1, n.opacity ?? 1, s));
|
|
3995
|
+
for (let r = 0; r < $u; r++) {
|
|
3996
|
+
const a = `border${bo[r]}Radius`;
|
|
3997
|
+
let l = fi(e, a), u = fi(n, a);
|
|
3998
3998
|
if (l === void 0 && u === void 0)
|
|
3999
3999
|
continue;
|
|
4000
|
-
l || (l = 0), u || (u = 0), l === 0 || u === 0 ||
|
|
4000
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || hi(l) === hi(u) ? (t[a] = Math.max(_(di(l), di(u), s), 0), (at.test(u) || at.test(l)) && (t[a] += "%")) : t[a] = u;
|
|
4001
4001
|
}
|
|
4002
4002
|
(e.rotate || n.rotate) && (t.rotate = _(e.rotate || 0, n.rotate || 0, s));
|
|
4003
4003
|
}
|
|
4004
|
-
function
|
|
4004
|
+
function fi(t, e) {
|
|
4005
4005
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4006
4006
|
}
|
|
4007
|
-
const
|
|
4008
|
-
function
|
|
4007
|
+
const Wu = /* @__PURE__ */ vo(0, 0.5, ir), Hu = /* @__PURE__ */ vo(0.5, 0.95, st);
|
|
4008
|
+
function vo(t, e, n) {
|
|
4009
4009
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ Jt(t, e, s));
|
|
4010
4010
|
}
|
|
4011
|
-
function
|
|
4011
|
+
function pi(t, e) {
|
|
4012
4012
|
t.min = e.min, t.max = e.max;
|
|
4013
4013
|
}
|
|
4014
4014
|
function et(t, e) {
|
|
4015
|
-
|
|
4015
|
+
pi(t.x, e.x), pi(t.y, e.y);
|
|
4016
4016
|
}
|
|
4017
|
-
function
|
|
4017
|
+
function mi(t, e) {
|
|
4018
4018
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4019
4019
|
}
|
|
4020
|
-
function
|
|
4020
|
+
function gi(t, e, n, s, i) {
|
|
4021
4021
|
return t -= e, t = De(t, 1 / n, s), i !== void 0 && (t = De(t, 1 / i, s)), t;
|
|
4022
4022
|
}
|
|
4023
|
-
function
|
|
4023
|
+
function Xu(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
|
|
4024
4024
|
if (at.test(e) && (e = parseFloat(e), e = _(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4025
4025
|
return;
|
|
4026
4026
|
let a = _(o.min, o.max, s);
|
|
4027
|
-
t === o && (a -= e), t.min =
|
|
4027
|
+
t === o && (a -= e), t.min = gi(t.min, e, n, a, i), t.max = gi(t.max, e, n, a, i);
|
|
4028
4028
|
}
|
|
4029
|
-
function
|
|
4030
|
-
|
|
4029
|
+
function yi(t, e, [n, s, i], o, r) {
|
|
4030
|
+
Xu(t, e[n], e[s], e[i], e.scale, o, r);
|
|
4031
4031
|
}
|
|
4032
|
-
const
|
|
4033
|
-
function
|
|
4034
|
-
|
|
4032
|
+
const Yu = ["x", "scaleX", "originX"], qu = ["y", "scaleY", "originY"];
|
|
4033
|
+
function bi(t, e, n, s) {
|
|
4034
|
+
yi(t.x, e, Yu, n ? n.x : void 0, s ? s.x : void 0), yi(t.y, e, qu, n ? n.y : void 0, s ? s.y : void 0);
|
|
4035
4035
|
}
|
|
4036
|
-
function
|
|
4036
|
+
function vi(t) {
|
|
4037
4037
|
return t.translate === 0 && t.scale === 1;
|
|
4038
4038
|
}
|
|
4039
|
-
function
|
|
4040
|
-
return
|
|
4039
|
+
function xo(t) {
|
|
4040
|
+
return vi(t.x) && vi(t.y);
|
|
4041
4041
|
}
|
|
4042
|
-
function
|
|
4042
|
+
function xi(t, e) {
|
|
4043
4043
|
return t.min === e.min && t.max === e.max;
|
|
4044
4044
|
}
|
|
4045
|
-
function
|
|
4046
|
-
return
|
|
4045
|
+
function Zu(t, e) {
|
|
4046
|
+
return xi(t.x, e.x) && xi(t.y, e.y);
|
|
4047
4047
|
}
|
|
4048
|
-
function
|
|
4048
|
+
function wi(t, e) {
|
|
4049
4049
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
4050
4050
|
}
|
|
4051
|
-
function
|
|
4052
|
-
return
|
|
4051
|
+
function wo(t, e) {
|
|
4052
|
+
return wi(t.x, e.x) && wi(t.y, e.y);
|
|
4053
4053
|
}
|
|
4054
|
-
function
|
|
4054
|
+
function Ti(t) {
|
|
4055
4055
|
return X(t.x) / X(t.y);
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4057
|
+
function Ci(t, e) {
|
|
4058
4058
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
4059
4059
|
}
|
|
4060
|
-
class
|
|
4060
|
+
class Ju {
|
|
4061
4061
|
constructor() {
|
|
4062
4062
|
this.members = [];
|
|
4063
4063
|
}
|
|
4064
4064
|
add(e) {
|
|
4065
|
-
|
|
4065
|
+
_n(this.members, e), e.scheduleRender();
|
|
4066
4066
|
}
|
|
4067
4067
|
remove(e) {
|
|
4068
|
-
if (
|
|
4068
|
+
if (Bn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
4069
4069
|
const n = this.members[this.members.length - 1];
|
|
4070
4070
|
n && this.promote(n);
|
|
4071
4071
|
}
|
|
@@ -4111,7 +4111,7 @@ class Zu {
|
|
|
4111
4111
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
4112
4112
|
}
|
|
4113
4113
|
}
|
|
4114
|
-
function
|
|
4114
|
+
function Qu(t, e, n) {
|
|
4115
4115
|
let s = "";
|
|
4116
4116
|
const i = t.x.translate / e.x, o = t.y.translate / e.y, r = n?.z || 0;
|
|
4117
4117
|
if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
@@ -4121,40 +4121,40 @@ function Ju(t, e, n) {
|
|
|
4121
4121
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4122
4122
|
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
4123
4123
|
}
|
|
4124
|
-
const
|
|
4125
|
-
let
|
|
4126
|
-
function
|
|
4124
|
+
const Je = ["", "X", "Y", "Z"], td = 1e3;
|
|
4125
|
+
let ed = 0;
|
|
4126
|
+
function Qe(t, e, n, s) {
|
|
4127
4127
|
const { latestValues: i } = e;
|
|
4128
4128
|
i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
|
|
4129
4129
|
}
|
|
4130
|
-
function
|
|
4130
|
+
function To(t) {
|
|
4131
4131
|
if (t.hasCheckedOptimisedAppear = !0, t.root === t)
|
|
4132
4132
|
return;
|
|
4133
4133
|
const { visualElement: e } = t.options;
|
|
4134
4134
|
if (!e)
|
|
4135
4135
|
return;
|
|
4136
|
-
const n =
|
|
4136
|
+
const n = oo(e);
|
|
4137
4137
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
4138
4138
|
const { layout: i, layoutId: o } = t.options;
|
|
4139
4139
|
window.MotionCancelOptimisedAnimation(n, "transform", K, !(i || o));
|
|
4140
4140
|
}
|
|
4141
4141
|
const { parent: s } = t;
|
|
4142
|
-
s && !s.hasCheckedOptimisedAppear &&
|
|
4142
|
+
s && !s.hasCheckedOptimisedAppear && To(s);
|
|
4143
4143
|
}
|
|
4144
|
-
function
|
|
4144
|
+
function Co({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
4145
4145
|
return class {
|
|
4146
4146
|
constructor(r = {}, a = e?.()) {
|
|
4147
|
-
this.id =
|
|
4147
|
+
this.id = ed++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
4148
4148
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4149
4149
|
}, this.updateProjection = () => {
|
|
4150
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(
|
|
4150
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(id), this.nodes.forEach(ld), this.nodes.forEach(cd), this.nodes.forEach(rd);
|
|
4151
4151
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4152
4152
|
for (let l = 0; l < this.path.length; l++)
|
|
4153
4153
|
this.path[l].shouldResetTransform = !0;
|
|
4154
|
-
this.root === this && (this.nodes = new
|
|
4154
|
+
this.root === this && (this.nodes = new Uu());
|
|
4155
4155
|
}
|
|
4156
4156
|
addEventListener(r, a) {
|
|
4157
|
-
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new
|
|
4157
|
+
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new Fn()), this.eventHandlers.get(r).add(a);
|
|
4158
4158
|
}
|
|
4159
4159
|
notifyListeners(r, ...a) {
|
|
4160
4160
|
const l = this.eventHandlers.get(r);
|
|
@@ -4169,7 +4169,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4169
4169
|
mount(r) {
|
|
4170
4170
|
if (this.instance)
|
|
4171
4171
|
return;
|
|
4172
|
-
this.isSVG =
|
|
4172
|
+
this.isSVG = Br(r) && !Wl(r), this.instance = r;
|
|
4173
4173
|
const { layoutId: a, layout: l, visualElement: u } = this.options;
|
|
4174
4174
|
if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
4175
4175
|
let c, f = 0;
|
|
@@ -4178,7 +4178,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4178
4178
|
f = window.innerWidth;
|
|
4179
4179
|
}), t(r, () => {
|
|
4180
4180
|
const v = window.innerWidth;
|
|
4181
|
-
v !== f && (f = v, this.root.updateBlockedByResize = !0, c && c(), c =
|
|
4181
|
+
v !== f && (f = v, this.root.updateBlockedByResize = !0, c && c(), c = zu(m, 250), Pe.hasAnimatedSinceResize && (Pe.hasAnimatedSinceResize = !1, this.nodes.forEach(ki)));
|
|
4182
4182
|
});
|
|
4183
4183
|
}
|
|
4184
4184
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: f, hasRelativeLayoutChanged: m, layout: v }) => {
|
|
@@ -4186,17 +4186,17 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4186
4186
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4187
4187
|
return;
|
|
4188
4188
|
}
|
|
4189
|
-
const w = this.options.transition || u.getDefaultTransition() ||
|
|
4189
|
+
const w = this.options.transition || u.getDefaultTransition() || pd, { onLayoutAnimationStart: C, onLayoutAnimationComplete: P } = u.getProps(), h = !this.targetLayout || !wo(this.targetLayout, v), y = !f && m;
|
|
4190
4190
|
if (this.options.layoutRoot || this.resumeFrom || y || f && (h || !this.currentAnimation)) {
|
|
4191
4191
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
4192
4192
|
const d = {
|
|
4193
|
-
...
|
|
4193
|
+
...Qn(w, "layout"),
|
|
4194
4194
|
onPlay: C,
|
|
4195
4195
|
onComplete: P
|
|
4196
4196
|
};
|
|
4197
4197
|
(u.shouldReduceMotion || this.options.layoutRoot) && (d.delay = 0, d.type = !1), this.startAnimation(d), this.setAnimationOrigin(c, y);
|
|
4198
4198
|
} else
|
|
4199
|
-
f ||
|
|
4199
|
+
f || ki(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4200
4200
|
this.targetLayout = v;
|
|
4201
4201
|
});
|
|
4202
4202
|
}
|
|
@@ -4220,7 +4220,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4220
4220
|
}
|
|
4221
4221
|
// Note: currently only running on root node
|
|
4222
4222
|
startUpdate() {
|
|
4223
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
4223
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(ud), this.animationId++);
|
|
4224
4224
|
}
|
|
4225
4225
|
getTransformTemplate() {
|
|
4226
4226
|
const { visualElement: r } = this.options;
|
|
@@ -4231,7 +4231,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4231
4231
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
4232
4232
|
return;
|
|
4233
4233
|
}
|
|
4234
|
-
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear &&
|
|
4234
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && To(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
4235
4235
|
return;
|
|
4236
4236
|
this.isLayoutDirty = !0;
|
|
4237
4237
|
for (let c = 0; c < this.path.length; c++) {
|
|
@@ -4246,22 +4246,22 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4246
4246
|
}
|
|
4247
4247
|
update() {
|
|
4248
4248
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4249
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
4249
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Pi);
|
|
4250
4250
|
return;
|
|
4251
4251
|
}
|
|
4252
4252
|
if (this.animationId <= this.animationCommitId) {
|
|
4253
|
-
this.nodes.forEach(
|
|
4253
|
+
this.nodes.forEach(Si);
|
|
4254
4254
|
return;
|
|
4255
4255
|
}
|
|
4256
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(
|
|
4256
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(ad), this.nodes.forEach(nd), this.nodes.forEach(sd)) : this.nodes.forEach(Si), this.clearAllSnapshots();
|
|
4257
4257
|
const a = Y.now();
|
|
4258
|
-
$.delta = dt(0, 1e3 / 60, a - $.timestamp), $.timestamp = a, $.isProcessing = !0,
|
|
4258
|
+
$.delta = dt(0, 1e3 / 60, a - $.timestamp), $.timestamp = a, $.isProcessing = !0, Ne.update.process($), Ne.preRender.process($), Ne.render.process($), $.isProcessing = !1;
|
|
4259
4259
|
}
|
|
4260
4260
|
didUpdate() {
|
|
4261
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
4261
|
+
this.updateScheduled || (this.updateScheduled = !0, es.read(this.scheduleUpdate));
|
|
4262
4262
|
}
|
|
4263
4263
|
clearAllSnapshots() {
|
|
4264
|
-
this.nodes.forEach(
|
|
4264
|
+
this.nodes.forEach(od), this.sharedNodes.forEach(dd);
|
|
4265
4265
|
}
|
|
4266
4266
|
scheduleUpdateProjection() {
|
|
4267
4267
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, K.preRender(this.updateProjection, !1, !0));
|
|
@@ -4304,13 +4304,13 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4304
4304
|
resetTransform() {
|
|
4305
4305
|
if (!i)
|
|
4306
4306
|
return;
|
|
4307
|
-
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !
|
|
4307
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !xo(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
|
|
4308
4308
|
r && this.instance && (a || Tt(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4309
4309
|
}
|
|
4310
4310
|
measure(r = !0) {
|
|
4311
4311
|
const a = this.measurePageBox();
|
|
4312
4312
|
let l = this.removeElementScroll(a);
|
|
4313
|
-
return r && (l = this.removeTransform(l)),
|
|
4313
|
+
return r && (l = this.removeTransform(l)), md(l), {
|
|
4314
4314
|
animationId: this.root.animationId,
|
|
4315
4315
|
measuredBox: a,
|
|
4316
4316
|
layoutBox: l,
|
|
@@ -4323,7 +4323,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4323
4323
|
if (!r)
|
|
4324
4324
|
return O();
|
|
4325
4325
|
const a = r.measureViewportBox();
|
|
4326
|
-
if (!(this.scroll?.wasRoot || this.path.some(
|
|
4326
|
+
if (!(this.scroll?.wasRoot || this.path.some(gd))) {
|
|
4327
4327
|
const { scroll: u } = this.root;
|
|
4328
4328
|
u && (Rt(a.x, u.offset.x), Rt(a.y, u.offset.y));
|
|
4329
4329
|
}
|
|
@@ -4358,11 +4358,11 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4358
4358
|
const u = this.path[l];
|
|
4359
4359
|
if (!u.instance || !Tt(u.latestValues))
|
|
4360
4360
|
continue;
|
|
4361
|
-
|
|
4361
|
+
xn(u.latestValues) && u.updateSnapshot();
|
|
4362
4362
|
const c = O(), f = u.measurePageBox();
|
|
4363
|
-
et(c, f),
|
|
4363
|
+
et(c, f), bi(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
4364
4364
|
}
|
|
4365
|
-
return Tt(this.latestValues) &&
|
|
4365
|
+
return Tt(this.latestValues) && bi(a, this.latestValues), a;
|
|
4366
4366
|
}
|
|
4367
4367
|
setTargetDelta(r) {
|
|
4368
4368
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4392,7 +4392,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4392
4392
|
const m = this.getClosestProjectingParent();
|
|
4393
4393
|
m && m.layout && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = O(), this.relativeTargetOrigin = O(), Zt(this.relativeTargetOrigin, this.layout.layoutBox, m.layout.layoutBox), et(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4394
4394
|
}
|
|
4395
|
-
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = O(), this.targetWithTransforms = O()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
4395
|
+
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = O(), this.targetWithTransforms = O()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Tu(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : et(this.target, this.layout.layoutBox), to(this.target, this.targetDelta)) : et(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
|
|
4396
4396
|
this.attemptToResolveRelativeTarget = !1;
|
|
4397
4397
|
const m = this.getClosestProjectingParent();
|
|
4398
4398
|
m && !!m.resumingFrom == !!this.resumingFrom && !m.options.layoutScroll && m.target && this.animationProgress !== 1 ? (this.relativeParent = m, this.forceRelativeParentToResolveTarget(), this.relativeTarget = O(), this.relativeTargetOrigin = O(), Zt(this.relativeTargetOrigin, this.target, m.target), et(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -4400,7 +4400,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4400
4400
|
}
|
|
4401
4401
|
}
|
|
4402
4402
|
getClosestProjectingParent() {
|
|
4403
|
-
if (!(!this.parent ||
|
|
4403
|
+
if (!(!this.parent || xn(this.parent.latestValues) || Qr(this.parent.latestValues)))
|
|
4404
4404
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
4405
4405
|
}
|
|
4406
4406
|
isProjecting() {
|
|
@@ -4416,13 +4416,13 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4416
4416
|
return;
|
|
4417
4417
|
et(this.layoutCorrected, this.layout.layoutBox);
|
|
4418
4418
|
const f = this.treeScale.x, m = this.treeScale.y;
|
|
4419
|
-
|
|
4419
|
+
Kc(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = O());
|
|
4420
4420
|
const { target: v } = r;
|
|
4421
4421
|
if (!v) {
|
|
4422
4422
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4423
4423
|
return;
|
|
4424
4424
|
}
|
|
4425
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4425
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (mi(this.prevProjectionDelta.x, this.projectionDelta.x), mi(this.prevProjectionDelta.y, this.projectionDelta.y)), qt(this.projectionDelta, this.layoutCorrected, v, this.latestValues), (this.treeScale.x !== f || this.treeScale.y !== m || !Ci(this.projectionDelta.x, this.prevProjectionDelta.x) || !Ci(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", v));
|
|
4426
4426
|
}
|
|
4427
4427
|
hide() {
|
|
4428
4428
|
this.isVisible = !1;
|
|
@@ -4443,17 +4443,17 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4443
4443
|
setAnimationOrigin(r, a = !1) {
|
|
4444
4444
|
const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, f = Kt();
|
|
4445
4445
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4446
|
-
const m = O(), v = l ? l.source : void 0, w = this.layout ? this.layout.source : void 0, C = v !== w, P = this.getStack(), h = !P || P.members.length <= 1, y = !!(C && !h && this.options.crossfade === !0 && !this.path.some(
|
|
4446
|
+
const m = O(), v = l ? l.source : void 0, w = this.layout ? this.layout.source : void 0, C = v !== w, P = this.getStack(), h = !P || P.members.length <= 1, y = !!(C && !h && this.options.crossfade === !0 && !this.path.some(fd));
|
|
4447
4447
|
this.animationProgress = 0;
|
|
4448
4448
|
let d;
|
|
4449
4449
|
this.mixTargetDelta = (p) => {
|
|
4450
4450
|
const g = p / 1e3;
|
|
4451
|
-
|
|
4451
|
+
Ai(f.x, r.x, g), Ai(f.y, r.y, g), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Zt(m, this.layout.layoutBox, this.relativeParent.layout.layoutBox), hd(this.relativeTarget, this.relativeTargetOrigin, m, g), d && Zu(this.relativeTarget, d) && (this.isProjectionDirty = !1), d || (d = O()), et(d, this.relativeTarget)), C && (this.animationValues = c, Gu(c, u, this.latestValues, g, y, h)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = g;
|
|
4452
4452
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4453
4453
|
}
|
|
4454
4454
|
startAnimation(r) {
|
|
4455
4455
|
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (yt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = K.update(() => {
|
|
4456
|
-
Pe.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = _t(0)), this.currentAnimation =
|
|
4456
|
+
Pe.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = _t(0)), this.currentAnimation = ju(this.motionValue, [0, 1e3], {
|
|
4457
4457
|
...r,
|
|
4458
4458
|
velocity: 0,
|
|
4459
4459
|
isSync: !0,
|
|
@@ -4474,13 +4474,13 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4474
4474
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4475
4475
|
}
|
|
4476
4476
|
finishAnimation() {
|
|
4477
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4477
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(td), this.currentAnimation.stop()), this.completeAnimation();
|
|
4478
4478
|
}
|
|
4479
4479
|
applyTransformsToTarget() {
|
|
4480
4480
|
const r = this.getLead();
|
|
4481
4481
|
let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
|
|
4482
4482
|
if (!(!a || !l || !u)) {
|
|
4483
|
-
if (this !== r && this.layout && u &&
|
|
4483
|
+
if (this !== r && this.layout && u && Po(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
4484
4484
|
l = this.target || O();
|
|
4485
4485
|
const f = X(this.layout.layoutBox.x);
|
|
4486
4486
|
l.x.min = r.target.x.min, l.x.max = l.x.min + f;
|
|
@@ -4491,7 +4491,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4491
4491
|
}
|
|
4492
4492
|
}
|
|
4493
4493
|
registerSharedNode(r, a) {
|
|
4494
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
4494
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new Ju()), this.sharedNodes.get(r).add(a);
|
|
4495
4495
|
const u = a.options.initialPromotionConfig;
|
|
4496
4496
|
a.promote({
|
|
4497
4497
|
transition: u ? u.transition : void 0,
|
|
@@ -4532,9 +4532,9 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4532
4532
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
4533
4533
|
return;
|
|
4534
4534
|
const u = {};
|
|
4535
|
-
l.z &&
|
|
4536
|
-
for (let c = 0; c <
|
|
4537
|
-
|
|
4535
|
+
l.z && Qe("z", r, u, this.animationValues);
|
|
4536
|
+
for (let c = 0; c < Je.length; c++)
|
|
4537
|
+
Qe(`rotate${Je[c]}`, r, u, this.animationValues), Qe(`skew${Je[c]}`, r, u, this.animationValues);
|
|
4538
4538
|
r.render();
|
|
4539
4539
|
for (const c in u)
|
|
4540
4540
|
r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
|
|
@@ -4560,7 +4560,7 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4560
4560
|
r.visibility = "";
|
|
4561
4561
|
const c = u.animationValues || u.latestValues;
|
|
4562
4562
|
this.applyTransformsToTarget();
|
|
4563
|
-
let f =
|
|
4563
|
+
let f = Qu(this.projectionDeltaWithTransform, this.treeScale, c);
|
|
4564
4564
|
l && (f = l(c, f)), r.transform = f;
|
|
4565
4565
|
const { x: m, y: v } = this.projectionDelta;
|
|
4566
4566
|
r.transformOrigin = `${m.origin * 100}% ${v.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
@@ -4582,21 +4582,21 @@ function To({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4582
4582
|
}
|
|
4583
4583
|
// Only run on root
|
|
4584
4584
|
resetTree() {
|
|
4585
|
-
this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(
|
|
4585
|
+
this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(Pi), this.root.sharedNodes.clear();
|
|
4586
4586
|
}
|
|
4587
4587
|
};
|
|
4588
4588
|
}
|
|
4589
|
-
function
|
|
4589
|
+
function nd(t) {
|
|
4590
4590
|
t.updateLayout();
|
|
4591
4591
|
}
|
|
4592
|
-
function
|
|
4592
|
+
function sd(t) {
|
|
4593
4593
|
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
4594
4594
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
4595
4595
|
const { layoutBox: n, measuredBox: s } = t.layout, { animationType: i } = t.options, o = e.source !== t.layout.source;
|
|
4596
4596
|
i === "size" ? nt((c) => {
|
|
4597
4597
|
const f = o ? e.measuredBox[c] : e.layoutBox[c], m = X(f);
|
|
4598
4598
|
f.min = n[c].min, f.max = f.min + m;
|
|
4599
|
-
}) :
|
|
4599
|
+
}) : Po(i, e.layoutBox, n) && nt((c) => {
|
|
4600
4600
|
const f = o ? e.measuredBox[c] : e.layoutBox[c], m = X(n[c]);
|
|
4601
4601
|
f.max = f.min + m, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[c].max = t.relativeTarget[c].min + m);
|
|
4602
4602
|
});
|
|
@@ -4604,7 +4604,7 @@ function nd(t) {
|
|
|
4604
4604
|
qt(r, n, e.layoutBox);
|
|
4605
4605
|
const a = Kt();
|
|
4606
4606
|
o ? qt(a, t.applyTransform(s, !0), e.measuredBox) : qt(a, n, e.layoutBox);
|
|
4607
|
-
const l = !
|
|
4607
|
+
const l = !xo(r);
|
|
4608
4608
|
let u = !1;
|
|
4609
4609
|
if (!t.resumeFrom) {
|
|
4610
4610
|
const c = t.getClosestProjectingParent();
|
|
@@ -4614,7 +4614,7 @@ function nd(t) {
|
|
|
4614
4614
|
const v = O();
|
|
4615
4615
|
Zt(v, e.layoutBox, f.layoutBox);
|
|
4616
4616
|
const w = O();
|
|
4617
|
-
Zt(w, n, m.layoutBox),
|
|
4617
|
+
Zt(w, n, m.layoutBox), wo(v, w) || (u = !0), c.options.layoutRoot && (t.relativeTarget = w, t.relativeTargetOrigin = v, t.relativeParent = c);
|
|
4618
4618
|
}
|
|
4619
4619
|
}
|
|
4620
4620
|
}
|
|
@@ -4632,118 +4632,118 @@ function nd(t) {
|
|
|
4632
4632
|
}
|
|
4633
4633
|
t.options.transition = void 0;
|
|
4634
4634
|
}
|
|
4635
|
-
function
|
|
4635
|
+
function id(t) {
|
|
4636
4636
|
t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4637
4637
|
}
|
|
4638
|
-
function
|
|
4638
|
+
function rd(t) {
|
|
4639
4639
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4640
4640
|
}
|
|
4641
|
-
function
|
|
4641
|
+
function od(t) {
|
|
4642
4642
|
t.clearSnapshot();
|
|
4643
4643
|
}
|
|
4644
|
-
function
|
|
4644
|
+
function Pi(t) {
|
|
4645
4645
|
t.clearMeasurements();
|
|
4646
4646
|
}
|
|
4647
|
-
function
|
|
4647
|
+
function Si(t) {
|
|
4648
4648
|
t.isLayoutDirty = !1;
|
|
4649
4649
|
}
|
|
4650
|
-
function
|
|
4650
|
+
function ad(t) {
|
|
4651
4651
|
const { visualElement: e } = t.options;
|
|
4652
4652
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4653
4653
|
}
|
|
4654
|
-
function
|
|
4654
|
+
function ki(t) {
|
|
4655
4655
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4656
4656
|
}
|
|
4657
|
-
function
|
|
4657
|
+
function ld(t) {
|
|
4658
4658
|
t.resolveTargetDelta();
|
|
4659
4659
|
}
|
|
4660
|
-
function
|
|
4660
|
+
function cd(t) {
|
|
4661
4661
|
t.calcProjection();
|
|
4662
4662
|
}
|
|
4663
|
-
function
|
|
4663
|
+
function ud(t) {
|
|
4664
4664
|
t.resetSkewAndRotation();
|
|
4665
4665
|
}
|
|
4666
|
-
function
|
|
4666
|
+
function dd(t) {
|
|
4667
4667
|
t.removeLeadSnapshot();
|
|
4668
4668
|
}
|
|
4669
|
-
function
|
|
4669
|
+
function Ai(t, e, n) {
|
|
4670
4670
|
t.translate = _(e.translate, 0, n), t.scale = _(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4671
4671
|
}
|
|
4672
|
-
function
|
|
4672
|
+
function Mi(t, e, n, s) {
|
|
4673
4673
|
t.min = _(e.min, n.min, s), t.max = _(e.max, n.max, s);
|
|
4674
4674
|
}
|
|
4675
|
-
function
|
|
4676
|
-
|
|
4675
|
+
function hd(t, e, n, s) {
|
|
4676
|
+
Mi(t.x, e.x, n.x, s), Mi(t.y, e.y, n.y, s);
|
|
4677
4677
|
}
|
|
4678
|
-
function
|
|
4678
|
+
function fd(t) {
|
|
4679
4679
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4680
4680
|
}
|
|
4681
|
-
const
|
|
4681
|
+
const pd = {
|
|
4682
4682
|
duration: 0.45,
|
|
4683
4683
|
ease: [0.4, 0, 0.1, 1]
|
|
4684
|
-
},
|
|
4685
|
-
function
|
|
4686
|
-
t.min =
|
|
4684
|
+
}, Vi = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Ei = Vi("applewebkit/") && !Vi("chrome/") ? Math.round : st;
|
|
4685
|
+
function Di(t) {
|
|
4686
|
+
t.min = Ei(t.min), t.max = Ei(t.max);
|
|
4687
4687
|
}
|
|
4688
|
-
function
|
|
4689
|
-
|
|
4688
|
+
function md(t) {
|
|
4689
|
+
Di(t.x), Di(t.y);
|
|
4690
4690
|
}
|
|
4691
|
-
function
|
|
4692
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
4691
|
+
function Po(t, e, n) {
|
|
4692
|
+
return t === "position" || t === "preserve-aspect" && !wu(Ti(e), Ti(n), 0.2);
|
|
4693
4693
|
}
|
|
4694
|
-
function
|
|
4694
|
+
function gd(t) {
|
|
4695
4695
|
return t !== t.root && t.scroll?.wasRoot;
|
|
4696
4696
|
}
|
|
4697
|
-
const
|
|
4697
|
+
const yd = Co({
|
|
4698
4698
|
attachResizeListener: (t, e) => se(t, "resize", e),
|
|
4699
4699
|
measureScroll: () => ({
|
|
4700
4700
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
4701
4701
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
4702
4702
|
}),
|
|
4703
4703
|
checkIsScrollRoot: () => !0
|
|
4704
|
-
}),
|
|
4704
|
+
}), tn = {
|
|
4705
4705
|
current: void 0
|
|
4706
|
-
},
|
|
4706
|
+
}, So = Co({
|
|
4707
4707
|
measureScroll: (t) => ({
|
|
4708
4708
|
x: t.scrollLeft,
|
|
4709
4709
|
y: t.scrollTop
|
|
4710
4710
|
}),
|
|
4711
4711
|
defaultParent: () => {
|
|
4712
|
-
if (!
|
|
4713
|
-
const t = new
|
|
4714
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
4712
|
+
if (!tn.current) {
|
|
4713
|
+
const t = new yd({});
|
|
4714
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), tn.current = t;
|
|
4715
4715
|
}
|
|
4716
|
-
return
|
|
4716
|
+
return tn.current;
|
|
4717
4717
|
},
|
|
4718
4718
|
resetTransform: (t, e) => {
|
|
4719
4719
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4720
4720
|
},
|
|
4721
4721
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4722
|
-
}),
|
|
4722
|
+
}), bd = {
|
|
4723
4723
|
pan: {
|
|
4724
|
-
Feature:
|
|
4724
|
+
Feature: _u
|
|
4725
4725
|
},
|
|
4726
4726
|
drag: {
|
|
4727
|
-
Feature:
|
|
4728
|
-
ProjectionNode:
|
|
4729
|
-
MeasureLayout:
|
|
4727
|
+
Feature: Iu,
|
|
4728
|
+
ProjectionNode: So,
|
|
4729
|
+
MeasureLayout: yo
|
|
4730
4730
|
}
|
|
4731
4731
|
};
|
|
4732
|
-
function
|
|
4732
|
+
function Ri(t, e, n) {
|
|
4733
4733
|
const { props: s } = t;
|
|
4734
4734
|
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
4735
4735
|
const i = "onHover" + n, o = s[i];
|
|
4736
4736
|
o && K.postRender(() => o(e, ae(e)));
|
|
4737
4737
|
}
|
|
4738
|
-
class
|
|
4738
|
+
class vd extends vt {
|
|
4739
4739
|
mount() {
|
|
4740
4740
|
const { current: e } = this.node;
|
|
4741
|
-
e && (this.unmount =
|
|
4741
|
+
e && (this.unmount = Nl(e, (n, s) => (Ri(this.node, s, "Start"), (i) => Ri(this.node, i, "End"))));
|
|
4742
4742
|
}
|
|
4743
4743
|
unmount() {
|
|
4744
4744
|
}
|
|
4745
4745
|
}
|
|
4746
|
-
class
|
|
4746
|
+
class xd extends vt {
|
|
4747
4747
|
constructor() {
|
|
4748
4748
|
super(...arguments), this.isActive = !1;
|
|
4749
4749
|
}
|
|
@@ -4765,7 +4765,7 @@ class vd extends vt {
|
|
|
4765
4765
|
unmount() {
|
|
4766
4766
|
}
|
|
4767
4767
|
}
|
|
4768
|
-
function
|
|
4768
|
+
function Li(t, e, n) {
|
|
4769
4769
|
const { props: s } = t;
|
|
4770
4770
|
if (t.current instanceof HTMLButtonElement && t.current.disabled)
|
|
4771
4771
|
return;
|
|
@@ -4773,37 +4773,37 @@ function Ri(t, e, n) {
|
|
|
4773
4773
|
const i = "onTap" + (n === "End" ? "" : n), o = s[i];
|
|
4774
4774
|
o && K.postRender(() => o(e, ae(e)));
|
|
4775
4775
|
}
|
|
4776
|
-
class
|
|
4776
|
+
class wd extends vt {
|
|
4777
4777
|
mount() {
|
|
4778
4778
|
const { current: e } = this.node;
|
|
4779
|
-
e && (this.unmount =
|
|
4779
|
+
e && (this.unmount = Gl(e, (n, s) => (Li(this.node, s, "Start"), (i, { success: o }) => Li(this.node, i, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
4780
4780
|
}
|
|
4781
4781
|
unmount() {
|
|
4782
4782
|
}
|
|
4783
4783
|
}
|
|
4784
|
-
const
|
|
4785
|
-
const e =
|
|
4784
|
+
const An = /* @__PURE__ */ new WeakMap(), en = /* @__PURE__ */ new WeakMap(), Td = (t) => {
|
|
4785
|
+
const e = An.get(t.target);
|
|
4786
4786
|
e && e(t);
|
|
4787
|
-
},
|
|
4788
|
-
t.forEach(
|
|
4787
|
+
}, Cd = (t) => {
|
|
4788
|
+
t.forEach(Td);
|
|
4789
4789
|
};
|
|
4790
|
-
function
|
|
4790
|
+
function Pd({ root: t, ...e }) {
|
|
4791
4791
|
const n = t || document;
|
|
4792
|
-
|
|
4793
|
-
const s =
|
|
4794
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
4795
|
-
}
|
|
4796
|
-
function
|
|
4797
|
-
const s =
|
|
4798
|
-
return
|
|
4799
|
-
|
|
4792
|
+
en.has(n) || en.set(n, {});
|
|
4793
|
+
const s = en.get(n), i = JSON.stringify(e);
|
|
4794
|
+
return s[i] || (s[i] = new IntersectionObserver(Cd, { root: t, ...e })), s[i];
|
|
4795
|
+
}
|
|
4796
|
+
function Sd(t, e, n) {
|
|
4797
|
+
const s = Pd(e);
|
|
4798
|
+
return An.set(t, n), s.observe(t), () => {
|
|
4799
|
+
An.delete(t), s.unobserve(t);
|
|
4800
4800
|
};
|
|
4801
4801
|
}
|
|
4802
|
-
const
|
|
4802
|
+
const kd = {
|
|
4803
4803
|
some: 0,
|
|
4804
4804
|
all: 1
|
|
4805
4805
|
};
|
|
4806
|
-
class
|
|
4806
|
+
class Ad extends vt {
|
|
4807
4807
|
constructor() {
|
|
4808
4808
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
4809
4809
|
}
|
|
@@ -4812,7 +4812,7 @@ class kd extends vt {
|
|
|
4812
4812
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
|
|
4813
4813
|
root: n ? n.current : void 0,
|
|
4814
4814
|
rootMargin: s,
|
|
4815
|
-
threshold: typeof i == "number" ? i :
|
|
4815
|
+
threshold: typeof i == "number" ? i : kd[i]
|
|
4816
4816
|
}, a = (l) => {
|
|
4817
4817
|
const { isIntersecting: u } = l;
|
|
4818
4818
|
if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
|
|
@@ -4821,7 +4821,7 @@ class kd extends vt {
|
|
|
4821
4821
|
const { onViewportEnter: c, onViewportLeave: f } = this.node.getProps(), m = u ? c : f;
|
|
4822
4822
|
m && m(l);
|
|
4823
4823
|
};
|
|
4824
|
-
return
|
|
4824
|
+
return Sd(this.node.current, r, a);
|
|
4825
4825
|
}
|
|
4826
4826
|
mount() {
|
|
4827
4827
|
this.startObserver();
|
|
@@ -4830,71 +4830,71 @@ class kd extends vt {
|
|
|
4830
4830
|
if (typeof IntersectionObserver > "u")
|
|
4831
4831
|
return;
|
|
4832
4832
|
const { props: e, prevProps: n } = this.node;
|
|
4833
|
-
["amount", "margin", "root"].some(
|
|
4833
|
+
["amount", "margin", "root"].some(Md(e, n)) && this.startObserver();
|
|
4834
4834
|
}
|
|
4835
4835
|
unmount() {
|
|
4836
4836
|
}
|
|
4837
4837
|
}
|
|
4838
|
-
function
|
|
4838
|
+
function Md({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
4839
4839
|
return (n) => t[n] !== e[n];
|
|
4840
4840
|
}
|
|
4841
|
-
const
|
|
4841
|
+
const Vd = {
|
|
4842
4842
|
inView: {
|
|
4843
|
-
Feature:
|
|
4843
|
+
Feature: Ad
|
|
4844
4844
|
},
|
|
4845
4845
|
tap: {
|
|
4846
|
-
Feature:
|
|
4846
|
+
Feature: wd
|
|
4847
4847
|
},
|
|
4848
4848
|
focus: {
|
|
4849
|
-
Feature:
|
|
4849
|
+
Feature: xd
|
|
4850
4850
|
},
|
|
4851
4851
|
hover: {
|
|
4852
|
-
Feature:
|
|
4853
|
-
}
|
|
4854
|
-
}, Vd = {
|
|
4855
|
-
layout: {
|
|
4856
|
-
ProjectionNode: Po,
|
|
4857
|
-
MeasureLayout: go
|
|
4852
|
+
Feature: vd
|
|
4858
4853
|
}
|
|
4859
4854
|
}, Ed = {
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
}, Dd =
|
|
4865
|
-
|
|
4855
|
+
layout: {
|
|
4856
|
+
ProjectionNode: So,
|
|
4857
|
+
MeasureLayout: yo
|
|
4858
|
+
}
|
|
4859
|
+
}, Dd = {
|
|
4860
|
+
...mu,
|
|
4861
|
+
...Vd,
|
|
4862
|
+
...bd,
|
|
4863
|
+
...Ed
|
|
4864
|
+
}, Rd = /* @__PURE__ */ Dc(Dd, $c), fs = "-", Ld = (t) => {
|
|
4865
|
+
const e = Id(t), {
|
|
4866
4866
|
conflictingClassGroups: n,
|
|
4867
4867
|
conflictingClassGroupModifiers: s
|
|
4868
4868
|
} = t;
|
|
4869
4869
|
return {
|
|
4870
4870
|
getClassGroupId: (r) => {
|
|
4871
|
-
const a = r.split(
|
|
4872
|
-
return a[0] === "" && a.length !== 1 && a.shift(),
|
|
4871
|
+
const a = r.split(fs);
|
|
4872
|
+
return a[0] === "" && a.length !== 1 && a.shift(), ko(a, e) || Kd(r);
|
|
4873
4873
|
},
|
|
4874
4874
|
getConflictingClassGroupIds: (r, a) => {
|
|
4875
4875
|
const l = n[r] || [];
|
|
4876
4876
|
return a && s[r] ? [...l, ...s[r]] : l;
|
|
4877
4877
|
}
|
|
4878
4878
|
};
|
|
4879
|
-
},
|
|
4879
|
+
}, ko = (t, e) => {
|
|
4880
4880
|
if (t.length === 0)
|
|
4881
4881
|
return e.classGroupId;
|
|
4882
|
-
const n = t[0], s = e.nextPart.get(n), i = s ?
|
|
4882
|
+
const n = t[0], s = e.nextPart.get(n), i = s ? ko(t.slice(1), s) : void 0;
|
|
4883
4883
|
if (i)
|
|
4884
4884
|
return i;
|
|
4885
4885
|
if (e.validators.length === 0)
|
|
4886
4886
|
return;
|
|
4887
|
-
const o = t.join(
|
|
4887
|
+
const o = t.join(fs);
|
|
4888
4888
|
return e.validators.find(({
|
|
4889
4889
|
validator: r
|
|
4890
4890
|
}) => r(o))?.classGroupId;
|
|
4891
|
-
},
|
|
4892
|
-
if (
|
|
4893
|
-
const e =
|
|
4891
|
+
}, Ki = /^\[(.+)\]$/, Kd = (t) => {
|
|
4892
|
+
if (Ki.test(t)) {
|
|
4893
|
+
const e = Ki.exec(t)[1], n = e?.substring(0, e.indexOf(":"));
|
|
4894
4894
|
if (n)
|
|
4895
4895
|
return "arbitrary.." + n;
|
|
4896
4896
|
}
|
|
4897
|
-
},
|
|
4897
|
+
}, Id = (t) => {
|
|
4898
4898
|
const {
|
|
4899
4899
|
theme: e,
|
|
4900
4900
|
classGroups: n
|
|
@@ -4903,18 +4903,18 @@ const Md = {
|
|
|
4903
4903
|
validators: []
|
|
4904
4904
|
};
|
|
4905
4905
|
for (const i in n)
|
|
4906
|
-
|
|
4906
|
+
Mn(n[i], s, i, e);
|
|
4907
4907
|
return s;
|
|
4908
|
-
},
|
|
4908
|
+
}, Mn = (t, e, n, s) => {
|
|
4909
4909
|
t.forEach((i) => {
|
|
4910
4910
|
if (typeof i == "string") {
|
|
4911
|
-
const o = i === "" ? e :
|
|
4911
|
+
const o = i === "" ? e : Ii(e, i);
|
|
4912
4912
|
o.classGroupId = n;
|
|
4913
4913
|
return;
|
|
4914
4914
|
}
|
|
4915
4915
|
if (typeof i == "function") {
|
|
4916
|
-
if (
|
|
4917
|
-
|
|
4916
|
+
if (_d(i)) {
|
|
4917
|
+
Mn(i(s), e, n, s);
|
|
4918
4918
|
return;
|
|
4919
4919
|
}
|
|
4920
4920
|
e.validators.push({
|
|
@@ -4924,18 +4924,18 @@ const Md = {
|
|
|
4924
4924
|
return;
|
|
4925
4925
|
}
|
|
4926
4926
|
Object.entries(i).forEach(([o, r]) => {
|
|
4927
|
-
|
|
4927
|
+
Mn(r, Ii(e, o), n, s);
|
|
4928
4928
|
});
|
|
4929
4929
|
});
|
|
4930
|
-
},
|
|
4930
|
+
}, Ii = (t, e) => {
|
|
4931
4931
|
let n = t;
|
|
4932
|
-
return e.split(
|
|
4932
|
+
return e.split(fs).forEach((s) => {
|
|
4933
4933
|
n.nextPart.has(s) || n.nextPart.set(s, {
|
|
4934
4934
|
nextPart: /* @__PURE__ */ new Map(),
|
|
4935
4935
|
validators: []
|
|
4936
4936
|
}), n = n.nextPart.get(s);
|
|
4937
4937
|
}), n;
|
|
4938
|
-
},
|
|
4938
|
+
}, _d = (t) => t.isThemeGetter, Bd = (t) => {
|
|
4939
4939
|
if (t < 1)
|
|
4940
4940
|
return {
|
|
4941
4941
|
get: () => {
|
|
@@ -4959,7 +4959,7 @@ const Md = {
|
|
|
4959
4959
|
n.has(o) ? n.set(o, r) : i(o, r);
|
|
4960
4960
|
}
|
|
4961
4961
|
};
|
|
4962
|
-
},
|
|
4962
|
+
}, Vn = "!", En = ":", Od = En.length, Fd = (t) => {
|
|
4963
4963
|
const {
|
|
4964
4964
|
prefix: e,
|
|
4965
4965
|
experimentalParseClassName: n
|
|
@@ -4970,8 +4970,8 @@ const Md = {
|
|
|
4970
4970
|
for (let w = 0; w < i.length; w++) {
|
|
4971
4971
|
let C = i[w];
|
|
4972
4972
|
if (r === 0 && a === 0) {
|
|
4973
|
-
if (C ===
|
|
4974
|
-
o.push(i.slice(l, w)), l = w +
|
|
4973
|
+
if (C === En) {
|
|
4974
|
+
o.push(i.slice(l, w)), l = w + Od;
|
|
4975
4975
|
continue;
|
|
4976
4976
|
}
|
|
4977
4977
|
if (C === "/") {
|
|
@@ -4981,7 +4981,7 @@ const Md = {
|
|
|
4981
4981
|
}
|
|
4982
4982
|
C === "[" ? r++ : C === "]" ? r-- : C === "(" ? a++ : C === ")" && a--;
|
|
4983
4983
|
}
|
|
4984
|
-
const c = o.length === 0 ? i : i.substring(l), f =
|
|
4984
|
+
const c = o.length === 0 ? i : i.substring(l), f = jd(c), m = f !== c, v = u && u > l ? u - l : void 0;
|
|
4985
4985
|
return {
|
|
4986
4986
|
modifiers: o,
|
|
4987
4987
|
hasImportantModifier: m,
|
|
@@ -4990,7 +4990,7 @@ const Md = {
|
|
|
4990
4990
|
};
|
|
4991
4991
|
};
|
|
4992
4992
|
if (e) {
|
|
4993
|
-
const i = e +
|
|
4993
|
+
const i = e + En, o = s;
|
|
4994
4994
|
s = (r) => r.startsWith(i) ? o(r.substring(i.length)) : {
|
|
4995
4995
|
isExternal: !0,
|
|
4996
4996
|
modifiers: [],
|
|
@@ -5007,7 +5007,7 @@ const Md = {
|
|
|
5007
5007
|
});
|
|
5008
5008
|
}
|
|
5009
5009
|
return s;
|
|
5010
|
-
},
|
|
5010
|
+
}, jd = (t) => t.endsWith(Vn) ? t.substring(0, t.length - 1) : t.startsWith(Vn) ? t.substring(1) : t, Nd = (t) => {
|
|
5011
5011
|
const e = Object.fromEntries(t.orderSensitiveModifiers.map((s) => [s, !0]));
|
|
5012
5012
|
return (s) => {
|
|
5013
5013
|
if (s.length <= 1)
|
|
@@ -5018,18 +5018,18 @@ const Md = {
|
|
|
5018
5018
|
r[0] === "[" || e[r] ? (i.push(...o.sort(), r), o = []) : o.push(r);
|
|
5019
5019
|
}), i.push(...o.sort()), i;
|
|
5020
5020
|
};
|
|
5021
|
-
},
|
|
5022
|
-
cache:
|
|
5023
|
-
parseClassName:
|
|
5024
|
-
sortModifiers:
|
|
5025
|
-
...
|
|
5026
|
-
}),
|
|
5021
|
+
}, Ud = (t) => ({
|
|
5022
|
+
cache: Bd(t.cacheSize),
|
|
5023
|
+
parseClassName: Fd(t),
|
|
5024
|
+
sortModifiers: Nd(t),
|
|
5025
|
+
...Ld(t)
|
|
5026
|
+
}), zd = /\s+/, $d = (t, e) => {
|
|
5027
5027
|
const {
|
|
5028
5028
|
parseClassName: n,
|
|
5029
5029
|
getClassGroupId: s,
|
|
5030
5030
|
getConflictingClassGroupIds: i,
|
|
5031
5031
|
sortModifiers: o
|
|
5032
|
-
} = e, r = [], a = t.trim().split(
|
|
5032
|
+
} = e, r = [], a = t.trim().split(zd);
|
|
5033
5033
|
let l = "";
|
|
5034
5034
|
for (let u = a.length - 1; u >= 0; u -= 1) {
|
|
5035
5035
|
const c = a[u], {
|
|
@@ -5055,7 +5055,7 @@ const Md = {
|
|
|
5055
5055
|
}
|
|
5056
5056
|
P = !1;
|
|
5057
5057
|
}
|
|
5058
|
-
const y = o(m).join(":"), d = v ? y +
|
|
5058
|
+
const y = o(m).join(":"), d = v ? y + Vn : y, p = d + h;
|
|
5059
5059
|
if (r.includes(p))
|
|
5060
5060
|
continue;
|
|
5061
5061
|
r.push(p);
|
|
@@ -5068,52 +5068,52 @@ const Md = {
|
|
|
5068
5068
|
}
|
|
5069
5069
|
return l;
|
|
5070
5070
|
};
|
|
5071
|
-
function
|
|
5071
|
+
function Gd() {
|
|
5072
5072
|
let t = 0, e, n, s = "";
|
|
5073
5073
|
for (; t < arguments.length; )
|
|
5074
|
-
(e = arguments[t++]) && (n =
|
|
5074
|
+
(e = arguments[t++]) && (n = Ao(e)) && (s && (s += " "), s += n);
|
|
5075
5075
|
return s;
|
|
5076
5076
|
}
|
|
5077
|
-
const
|
|
5077
|
+
const Ao = (t) => {
|
|
5078
5078
|
if (typeof t == "string")
|
|
5079
5079
|
return t;
|
|
5080
5080
|
let e, n = "";
|
|
5081
5081
|
for (let s = 0; s < t.length; s++)
|
|
5082
|
-
t[s] && (e =
|
|
5082
|
+
t[s] && (e = Ao(t[s])) && (n && (n += " "), n += e);
|
|
5083
5083
|
return n;
|
|
5084
5084
|
};
|
|
5085
|
-
function
|
|
5085
|
+
function Wd(t, ...e) {
|
|
5086
5086
|
let n, s, i, o = r;
|
|
5087
5087
|
function r(l) {
|
|
5088
5088
|
const u = e.reduce((c, f) => f(c), t());
|
|
5089
|
-
return n =
|
|
5089
|
+
return n = Ud(u), s = n.cache.get, i = n.cache.set, o = a, a(l);
|
|
5090
5090
|
}
|
|
5091
5091
|
function a(l) {
|
|
5092
5092
|
const u = s(l);
|
|
5093
5093
|
if (u)
|
|
5094
5094
|
return u;
|
|
5095
|
-
const c =
|
|
5095
|
+
const c = $d(l, n);
|
|
5096
5096
|
return i(l, c), c;
|
|
5097
5097
|
}
|
|
5098
5098
|
return function() {
|
|
5099
|
-
return o(
|
|
5099
|
+
return o(Gd.apply(null, arguments));
|
|
5100
5100
|
};
|
|
5101
5101
|
}
|
|
5102
5102
|
const j = (t) => {
|
|
5103
5103
|
const e = (n) => n[t] || [];
|
|
5104
5104
|
return e.isThemeGetter = !0, e;
|
|
5105
|
-
},
|
|
5105
|
+
}, Mo = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Vo = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Hd = /^\d+\/\d+$/, Xd = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Yd = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, qd = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Zd = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Jd = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Mt = (t) => Hd.test(t), D = (t) => !!t && !Number.isNaN(Number(t)), mt = (t) => !!t && Number.isInteger(Number(t)), nn = (t) => t.endsWith("%") && D(t.slice(0, -1)), ct = (t) => Xd.test(t), Qd = () => !0, th = (t) => (
|
|
5106
5106
|
// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
|
5107
5107
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
5108
5108
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
5109
|
-
|
|
5110
|
-
),
|
|
5111
|
-
const s =
|
|
5109
|
+
Yd.test(t) && !qd.test(t)
|
|
5110
|
+
), Eo = () => !1, eh = (t) => Zd.test(t), nh = (t) => Jd.test(t), sh = (t) => !S(t) && !k(t), ih = (t) => zt(t, Lo, Eo), S = (t) => Mo.test(t), wt = (t) => zt(t, Ko, th), sn = (t) => zt(t, ch, D), _i = (t) => zt(t, Do, Eo), rh = (t) => zt(t, Ro, nh), ve = (t) => zt(t, Io, eh), k = (t) => Vo.test(t), Wt = (t) => $t(t, Ko), oh = (t) => $t(t, uh), Bi = (t) => $t(t, Do), ah = (t) => $t(t, Lo), lh = (t) => $t(t, Ro), xe = (t) => $t(t, Io, !0), zt = (t, e, n) => {
|
|
5111
|
+
const s = Mo.exec(t);
|
|
5112
5112
|
return s ? s[1] ? e(s[1]) : n(s[2]) : !1;
|
|
5113
5113
|
}, $t = (t, e, n = !1) => {
|
|
5114
|
-
const s =
|
|
5114
|
+
const s = Vo.exec(t);
|
|
5115
5115
|
return s ? s[1] ? e(s[1]) : n : !1;
|
|
5116
|
-
},
|
|
5116
|
+
}, Do = (t) => t === "position" || t === "percentage", Ro = (t) => t === "image" || t === "url", Lo = (t) => t === "length" || t === "size" || t === "bg-size", Ko = (t) => t === "length", ch = (t) => t === "number", uh = (t) => t === "family-name", Io = (t) => t === "shadow", dh = () => {
|
|
5117
5117
|
const t = j("color"), e = j("font"), n = j("text"), s = j("font-weight"), i = j("tracking"), o = j("leading"), r = j("breakpoint"), a = j("container"), l = j("spacing"), u = j("radius"), c = j("shadow"), f = j("inset-shadow"), m = j("text-shadow"), v = j("drop-shadow"), w = j("blur"), C = j("perspective"), P = j("aspect"), h = j("ease"), y = j("animate"), d = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], p = () => [
|
|
5118
5118
|
"center",
|
|
5119
5119
|
"top",
|
|
@@ -5134,13 +5134,13 @@ const j = (t) => {
|
|
|
5134
5134
|
"left-bottom"
|
|
5135
5135
|
], g = () => [...p(), k, S], x = () => ["auto", "hidden", "clip", "visible", "scroll"], T = () => ["auto", "contain", "none"], b = () => [k, S, l], V = () => [Mt, "full", "auto", ...b()], E = () => [mt, "none", "subgrid", k, S], L = () => ["auto", {
|
|
5136
5136
|
span: ["full", mt, k, S]
|
|
5137
|
-
}, mt, k, S], N = () => [mt, "auto", k, S], pt = () => ["auto", "min", "max", "fr", k, S], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Z = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], B = () => ["auto", ...b()], R = () => [Mt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...b()], A = () => [t, k, S], tt = () => [...p(),
|
|
5137
|
+
}, mt, k, S], N = () => [mt, "auto", k, S], pt = () => ["auto", "min", "max", "fr", k, S], q = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Z = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], B = () => ["auto", ...b()], R = () => [Mt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...b()], A = () => [t, k, S], tt = () => [...p(), Bi, _i, {
|
|
5138
5138
|
position: [k, S]
|
|
5139
5139
|
}], lt = () => ["no-repeat", {
|
|
5140
5140
|
repeat: ["", "x", "y", "space", "round"]
|
|
5141
|
-
}], le = () => ["auto", "cover", "contain",
|
|
5141
|
+
}], le = () => ["auto", "cover", "contain", ah, ih, {
|
|
5142
5142
|
size: [k, S]
|
|
5143
|
-
}], Be = () => [
|
|
5143
|
+
}], Be = () => [nn, Wt, wt], H = () => [
|
|
5144
5144
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5145
5145
|
"",
|
|
5146
5146
|
"none",
|
|
@@ -5148,7 +5148,7 @@ const j = (t) => {
|
|
|
5148
5148
|
u,
|
|
5149
5149
|
k,
|
|
5150
5150
|
S
|
|
5151
|
-
], J = () => ["", D, Wt, wt], ce = () => ["solid", "dashed", "dotted", "double"],
|
|
5151
|
+
], J = () => ["", D, Wt, wt], ce = () => ["solid", "dashed", "dotted", "double"], ps = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], U = () => [D, nn, Bi, _i], ms = () => [
|
|
5152
5152
|
// Deprecated since Tailwind CSS v4.0.0
|
|
5153
5153
|
"",
|
|
5154
5154
|
"none",
|
|
@@ -5163,11 +5163,11 @@ const j = (t) => {
|
|
|
5163
5163
|
aspect: ["video"],
|
|
5164
5164
|
blur: [ct],
|
|
5165
5165
|
breakpoint: [ct],
|
|
5166
|
-
color: [
|
|
5166
|
+
color: [Qd],
|
|
5167
5167
|
container: [ct],
|
|
5168
5168
|
"drop-shadow": [ct],
|
|
5169
5169
|
ease: ["in", "out", "in-out"],
|
|
5170
|
-
font: [
|
|
5170
|
+
font: [sh],
|
|
5171
5171
|
"font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
|
|
5172
5172
|
"inset-shadow": [ct],
|
|
5173
5173
|
leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
|
|
@@ -5865,21 +5865,21 @@ const j = (t) => {
|
|
|
5865
5865
|
* @see https://tailwindcss.com/docs/font-weight
|
|
5866
5866
|
*/
|
|
5867
5867
|
"font-weight": [{
|
|
5868
|
-
font: [s, k,
|
|
5868
|
+
font: [s, k, sn]
|
|
5869
5869
|
}],
|
|
5870
5870
|
/**
|
|
5871
5871
|
* Font Stretch
|
|
5872
5872
|
* @see https://tailwindcss.com/docs/font-stretch
|
|
5873
5873
|
*/
|
|
5874
5874
|
"font-stretch": [{
|
|
5875
|
-
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded",
|
|
5875
|
+
"font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", nn, S]
|
|
5876
5876
|
}],
|
|
5877
5877
|
/**
|
|
5878
5878
|
* Font Family
|
|
5879
5879
|
* @see https://tailwindcss.com/docs/font-family
|
|
5880
5880
|
*/
|
|
5881
5881
|
"font-family": [{
|
|
5882
|
-
font: [
|
|
5882
|
+
font: [oh, S, e]
|
|
5883
5883
|
}],
|
|
5884
5884
|
/**
|
|
5885
5885
|
* Font Variant Numeric
|
|
@@ -5923,7 +5923,7 @@ const j = (t) => {
|
|
|
5923
5923
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
5924
5924
|
*/
|
|
5925
5925
|
"line-clamp": [{
|
|
5926
|
-
"line-clamp": [D, "none", k,
|
|
5926
|
+
"line-clamp": [D, "none", k, sn]
|
|
5927
5927
|
}],
|
|
5928
5928
|
/**
|
|
5929
5929
|
* Line Height
|
|
@@ -6134,7 +6134,7 @@ const j = (t) => {
|
|
|
6134
6134
|
}, mt, k, S],
|
|
6135
6135
|
radial: ["", k, S],
|
|
6136
6136
|
conic: [mt, k, S]
|
|
6137
|
-
},
|
|
6137
|
+
}, lh, rh]
|
|
6138
6138
|
}],
|
|
6139
6139
|
/**
|
|
6140
6140
|
* Background Color
|
|
@@ -6609,14 +6609,14 @@ const j = (t) => {
|
|
|
6609
6609
|
* @see https://tailwindcss.com/docs/mix-blend-mode
|
|
6610
6610
|
*/
|
|
6611
6611
|
"mix-blend": [{
|
|
6612
|
-
"mix-blend": [...
|
|
6612
|
+
"mix-blend": [...ps(), "plus-darker", "plus-lighter"]
|
|
6613
6613
|
}],
|
|
6614
6614
|
/**
|
|
6615
6615
|
* Background Blend Mode
|
|
6616
6616
|
* @see https://tailwindcss.com/docs/background-blend-mode
|
|
6617
6617
|
*/
|
|
6618
6618
|
"bg-blend": [{
|
|
6619
|
-
"bg-blend":
|
|
6619
|
+
"bg-blend": ps()
|
|
6620
6620
|
}],
|
|
6621
6621
|
/**
|
|
6622
6622
|
* Mask Clip
|
|
@@ -6835,7 +6835,7 @@ const j = (t) => {
|
|
|
6835
6835
|
* @see https://tailwindcss.com/docs/blur
|
|
6836
6836
|
*/
|
|
6837
6837
|
blur: [{
|
|
6838
|
-
blur:
|
|
6838
|
+
blur: ms()
|
|
6839
6839
|
}],
|
|
6840
6840
|
/**
|
|
6841
6841
|
* Brightness
|
|
@@ -6925,7 +6925,7 @@ const j = (t) => {
|
|
|
6925
6925
|
* @see https://tailwindcss.com/docs/backdrop-blur
|
|
6926
6926
|
*/
|
|
6927
6927
|
"backdrop-blur": [{
|
|
6928
|
-
"backdrop-blur":
|
|
6928
|
+
"backdrop-blur": ms()
|
|
6929
6929
|
}],
|
|
6930
6930
|
/**
|
|
6931
6931
|
* Backdrop Brightness
|
|
@@ -7508,7 +7508,7 @@ const j = (t) => {
|
|
|
7508
7508
|
* @see https://tailwindcss.com/docs/stroke-width
|
|
7509
7509
|
*/
|
|
7510
7510
|
"stroke-w": [{
|
|
7511
|
-
stroke: [D, Wt, wt,
|
|
7511
|
+
stroke: [D, Wt, wt, sn]
|
|
7512
7512
|
}],
|
|
7513
7513
|
/**
|
|
7514
7514
|
* Stroke
|
|
@@ -7583,55 +7583,58 @@ const j = (t) => {
|
|
|
7583
7583
|
},
|
|
7584
7584
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
7585
7585
|
};
|
|
7586
|
-
},
|
|
7587
|
-
const i = e[t.name], o = t.params
|
|
7588
|
-
return /* @__PURE__ */
|
|
7589
|
-
|
|
7586
|
+
}, Oi = /* @__PURE__ */ Wd(dh), rn = 1e3, hh = ({ data: t, modals: e, index: n, initialParams: s }) => {
|
|
7587
|
+
const i = e[t.name], o = t.params ?? s, r = o?.animate ?? s?.animate, a = o?.blur ?? s?.blur ?? !0, l = o?.onClose ?? s?.onClose, u = o?.backdrop ?? s?.backdrop, c = o?.body ?? s?.body, f = o?.position ?? s?.position ?? pe.CENTER, m = o?.closeOnClickOutside ?? s?.closeOnClickOutside, v = ke((C) => C.active), w = ke((C) => C.closeModal);
|
|
7588
|
+
return /* @__PURE__ */ Gi(
|
|
7589
|
+
Rd.div,
|
|
7590
7590
|
{
|
|
7591
7591
|
exit: r?.exit ?? { opacity: 0 },
|
|
7592
7592
|
initial: r?.exit ?? { opacity: 0 },
|
|
7593
7593
|
animate: r?.animate ?? { opacity: 1 },
|
|
7594
7594
|
layout: !0,
|
|
7595
|
+
className: je("fixed top-0 left-0 right-0 bottom-0", {
|
|
7596
|
+
"backdrop-blur-sm": a
|
|
7597
|
+
}),
|
|
7598
|
+
style: {
|
|
7599
|
+
zIndex: rn + n
|
|
7600
|
+
},
|
|
7595
7601
|
children: [
|
|
7596
7602
|
/* @__PURE__ */ Q(
|
|
7597
7603
|
"div",
|
|
7598
7604
|
{
|
|
7599
|
-
className:
|
|
7600
|
-
|
|
7601
|
-
"
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
}
|
|
7605
|
-
),
|
|
7606
|
-
l?.className
|
|
7605
|
+
className: Oi(
|
|
7606
|
+
je("absolute top-0 left-0 right-0 bottom-0 bg-black/40", {
|
|
7607
|
+
"react-motion-modal__active": v?.id === t.id
|
|
7608
|
+
}),
|
|
7609
|
+
u?.className
|
|
7607
7610
|
),
|
|
7608
7611
|
style: {
|
|
7609
|
-
zIndex: n
|
|
7612
|
+
zIndex: rn + n
|
|
7610
7613
|
},
|
|
7611
7614
|
onClick: () => {
|
|
7612
|
-
|
|
7615
|
+
m && (w(), l?.());
|
|
7613
7616
|
}
|
|
7614
7617
|
}
|
|
7615
7618
|
),
|
|
7616
7619
|
/* @__PURE__ */ Q(
|
|
7617
7620
|
"div",
|
|
7618
7621
|
{
|
|
7619
|
-
className:
|
|
7620
|
-
|
|
7622
|
+
className: Oi(
|
|
7623
|
+
je(
|
|
7621
7624
|
"p-5 absolute max-h-screen max-w-screen overflow-hidden left-0 right-0",
|
|
7622
7625
|
{
|
|
7623
|
-
"overflow-auto":
|
|
7624
|
-
"top-1/2 -translate-y-1/2 lg:left-1/2 lg:-translate-x-1/2":
|
|
7625
|
-
"top-0 lg:left-1/2 lg:-translate-x-1/2":
|
|
7626
|
-
"bottom-0 lg:left-1/2 lg:-translate-x-1/2":
|
|
7626
|
+
"overflow-auto": v?.id === t.id,
|
|
7627
|
+
"top-1/2 -translate-y-1/2 lg:left-1/2 lg:-translate-x-1/2": f === pe.CENTER,
|
|
7628
|
+
"top-0 lg:left-1/2 lg:-translate-x-1/2": f === pe.TOP,
|
|
7629
|
+
"bottom-0 lg:left-1/2 lg:-translate-x-1/2": f === pe.BOTTOM
|
|
7627
7630
|
}
|
|
7628
7631
|
),
|
|
7629
|
-
|
|
7632
|
+
c?.className
|
|
7630
7633
|
),
|
|
7631
7634
|
style: {
|
|
7632
|
-
zIndex: n + 1
|
|
7635
|
+
zIndex: rn + n + 1
|
|
7633
7636
|
},
|
|
7634
|
-
onClick: (
|
|
7637
|
+
onClick: (C) => C.stopPropagation(),
|
|
7635
7638
|
children: /* @__PURE__ */ Q(i, { ...o })
|
|
7636
7639
|
}
|
|
7637
7640
|
)
|
|
@@ -7639,16 +7642,16 @@ const j = (t) => {
|
|
|
7639
7642
|
}
|
|
7640
7643
|
);
|
|
7641
7644
|
};
|
|
7642
|
-
var
|
|
7643
|
-
function
|
|
7645
|
+
var Fi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
7646
|
+
function fh(t) {
|
|
7644
7647
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
7645
7648
|
}
|
|
7646
|
-
var Se = { exports: {} },
|
|
7647
|
-
function
|
|
7648
|
-
return
|
|
7649
|
+
var Se = { exports: {} }, ph = Se.exports, ji;
|
|
7650
|
+
function mh() {
|
|
7651
|
+
return ji || (ji = 1, function(t, e) {
|
|
7649
7652
|
(function(n, s) {
|
|
7650
7653
|
t.exports = s();
|
|
7651
|
-
})(
|
|
7654
|
+
})(ph, function() {
|
|
7652
7655
|
function n(h) {
|
|
7653
7656
|
"@babel/helpers - typeof";
|
|
7654
7657
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? n = function(y) {
|
|
@@ -7975,7 +7978,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7975
7978
|
value: function(d, p, g, x) {
|
|
7976
7979
|
var T = this;
|
|
7977
7980
|
this.stop();
|
|
7978
|
-
var b = typeof globalThis < "u" ? globalThis : typeof
|
|
7981
|
+
var b = typeof globalThis < "u" ? globalThis : typeof Fi < "u" ? Fi : typeof window < "u" ? window : {};
|
|
7979
7982
|
if (!d) {
|
|
7980
7983
|
if (!b.addEventListener && !b.attachEvent) {
|
|
7981
7984
|
if (this._currentContext === "global")
|
|
@@ -8124,8 +8127,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8124
8127
|
});
|
|
8125
8128
|
}(Se)), Se.exports;
|
|
8126
8129
|
}
|
|
8127
|
-
var
|
|
8128
|
-
const
|
|
8130
|
+
var gh = mh();
|
|
8131
|
+
const Ni = /* @__PURE__ */ fh(gh), wh = ({ modals: t, initialParams: e }) => {
|
|
8129
8132
|
const n = ke((o) => o.modals), s = ke((o) => o.closeModal), i = ut(null);
|
|
8130
8133
|
return Re(() => {
|
|
8131
8134
|
if (i.current = document.body, n?.length === 0 || !n[n.length - 1].params?.closeOnPressEsc && !e?.closeOnPressEsc)
|
|
@@ -8133,10 +8136,10 @@ const ji = /* @__PURE__ */ hh(mh), xh = ({ modals: t, initialParams: e }) => {
|
|
|
8133
8136
|
const o = () => {
|
|
8134
8137
|
s();
|
|
8135
8138
|
};
|
|
8136
|
-
return
|
|
8137
|
-
}, [n, s, e?.closeOnPressEsc]), i.current &&
|
|
8138
|
-
/* @__PURE__ */ Q("div", { className: "react-motion-modal", children: /* @__PURE__ */ Q(
|
|
8139
|
-
|
|
8139
|
+
return Ni.bind(["escape"], o), () => Ni.unbind(["escape"], o);
|
|
8140
|
+
}, [n, s, e?.closeOnPressEsc]), i.current && zo(
|
|
8141
|
+
/* @__PURE__ */ Q("div", { className: "react-motion-modal", children: /* @__PURE__ */ Q(Ql, { initial: !0, mode: "sync", children: n?.map((o, r) => /* @__PURE__ */ Q(
|
|
8142
|
+
hh,
|
|
8140
8143
|
{
|
|
8141
8144
|
data: o,
|
|
8142
8145
|
index: r,
|
|
@@ -8150,6 +8153,6 @@ const ji = /* @__PURE__ */ hh(mh), xh = ({ modals: t, initialParams: e }) => {
|
|
|
8150
8153
|
};
|
|
8151
8154
|
export {
|
|
8152
8155
|
pe as MODAL_POSITIONS,
|
|
8153
|
-
|
|
8156
|
+
wh as ModalProvider,
|
|
8154
8157
|
ke as useModal
|
|
8155
8158
|
};
|