Current section

Files

Jump to
live_motion priv static live_motion.min.js
Raw

priv/static/live_motion.min.js

var LiveMotion=(()=>{var Ke=Object.create;var k=Object.defineProperty,We=Object.defineProperties,Je=Object.getOwnPropertyDescriptor,Xe=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertyNames,Nt=Object.getOwnPropertySymbols,Qe=Object.getPrototypeOf,Bt=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable;var Ut=(t,e,o)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,qt=(t,e)=>{for(var o in e||(e={}))Bt.call(e,o)&&Ut(t,o,e[o]);if(Nt)for(var o of Nt(e))Ye.call(e,o)&&Ut(t,o,e[o]);return t},Ht=(t,e)=>We(t,Xe(e)),zt=t=>k(t,"__esModule",{value:!0});var tn=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),en=(t,e)=>{zt(t);for(var o in e)k(t,o,{get:e[o],enumerable:!0})},nn=(t,e,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ze(e))!Bt.call(t,n)&&n!=="default"&&k(t,n,{get:()=>e[n],enumerable:!(o=Je(e,n))||o.enumerable});return t},rn=t=>nn(zt(k(t!=null?Ke(Qe(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Te=tn((Ao,mt)=>{var ce,le,ue,fe,me,pe,de,ge,he,ut,Tt,ve,ye,_e,z,be,je,we,xe,Ee,Se,Oe,Ae,Me,ft;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){t(o(e,o(n)))}):typeof mt=="object"&&typeof mt.exports=="object"?t(o(e,o(mt.exports))):t(o(e));function o(n,r){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(i,s){return n[i]=r?r(i,s):s}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])};ce=function(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function i(){this.constructor=n}n.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)},le=Object.assign||function(n){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(n[c]=r[c])}return n},ue=function(n,r){var i={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&r.indexOf(s)<0&&(i[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,s=Object.getOwnPropertySymbols(n);c<s.length;c++)r.indexOf(s[c])<0&&Object.prototype.propertyIsEnumerable.call(n,s[c])&&(i[s[c]]=n[s[c]]);return i},fe=function(n,r,i,s){var c=arguments.length,a=c<3?r:s===null?s=Object.getOwnPropertyDescriptor(r,i):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(n,r,i,s);else for(var m=n.length-1;m>=0;m--)(l=n[m])&&(a=(c<3?l(a):c>3?l(r,i,a):l(r,i))||a);return c>3&&a&&Object.defineProperty(r,i,a),a},me=function(n,r){return function(i,s){r(i,s,n)}},pe=function(n,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,r)},de=function(n,r,i,s){function c(a){return a instanceof i?a:new i(function(l){l(a)})}return new(i||(i=Promise))(function(a,l){function m(g){try{u(s.next(g))}catch(v){l(v)}}function d(g){try{u(s.throw(g))}catch(v){l(v)}}function u(g){g.done?a(g.value):c(g.value).then(m,d)}u((s=s.apply(n,r||[])).next())})},ge=function(n,r){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,c,a,l;return l={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function m(u){return function(g){return d([u,g])}}function d(u){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,c&&(a=u[0]&2?c.return:u[0]?c.throw||((a=c.return)&&a.call(c),0):c.next)&&!(a=a.call(c,u[1])).done)return a;switch(c=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,c=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(u[0]===6&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=r.call(n,i)}catch(g){u=[6,g],c=0}finally{s=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},he=function(n,r){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(r,i)&&ft(r,n,i)},ft=Object.create?function(n,r,i,s){s===void 0&&(s=i);var c=Object.getOwnPropertyDescriptor(r,i);(!c||("get"in c?!r.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return r[i]}}),Object.defineProperty(n,s,c)}:function(n,r,i,s){s===void 0&&(s=i),n[s]=r[i]},ut=function(n){var r=typeof Symbol=="function"&&Symbol.iterator,i=r&&n[r],s=0;if(i)return i.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&s>=n.length&&(n=void 0),{value:n&&n[s++],done:!n}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},Tt=function(n,r){var i=typeof Symbol=="function"&&n[Symbol.iterator];if(!i)return n;var s=i.call(n),c,a=[],l;try{for(;(r===void 0||r-- >0)&&!(c=s.next()).done;)a.push(c.value)}catch(m){l={error:m}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(l)throw l.error}}return a},ve=function(){for(var n=[],r=0;r<arguments.length;r++)n=n.concat(Tt(arguments[r]));return n},ye=function(){for(var n=0,r=0,i=arguments.length;r<i;r++)n+=arguments[r].length;for(var s=Array(n),c=0,r=0;r<i;r++)for(var a=arguments[r],l=0,m=a.length;l<m;l++,c++)s[c]=a[l];return s},_e=function(n,r,i){if(i||arguments.length===2)for(var s=0,c=r.length,a;s<c;s++)(a||!(s in r))&&(a||(a=Array.prototype.slice.call(r,0,s)),a[s]=r[s]);return n.concat(a||Array.prototype.slice.call(r))},z=function(n){return this instanceof z?(this.v=n,this):new z(n)},be=function(n,r,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=i.apply(n,r||[]),c,a=[];return c={},l("next"),l("throw"),l("return"),c[Symbol.asyncIterator]=function(){return this},c;function l(p){s[p]&&(c[p]=function(h){return new Promise(function(_,x){a.push([p,h,_,x])>1||m(p,h)})})}function m(p,h){try{d(s[p](h))}catch(_){v(a[0][3],_)}}function d(p){p.value instanceof z?Promise.resolve(p.value.v).then(u,g):v(a[0][2],p)}function u(p){m("next",p)}function g(p){m("throw",p)}function v(p,h){p(h),a.shift(),a.length&&m(a[0][0],a[0][1])}},je=function(n){var r,i;return r={},s("next"),s("throw",function(c){throw c}),s("return"),r[Symbol.iterator]=function(){return this},r;function s(c,a){r[c]=n[c]?function(l){return(i=!i)?{value:z(n[c](l)),done:c==="return"}:a?a(l):l}:a}},we=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n[Symbol.asyncIterator],i;return r?r.call(n):(n=typeof ut=="function"?ut(n):n[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(a){i[a]=n[a]&&function(l){return new Promise(function(m,d){l=n[a](l),c(m,d,l.done,l.value)})}}function c(a,l,m,d){Promise.resolve(d).then(function(u){a({value:u,done:m})},l)}},xe=function(n,r){return Object.defineProperty?Object.defineProperty(n,"raw",{value:r}):n.raw=r,n};var o=Object.create?function(n,r){Object.defineProperty(n,"default",{enumerable:!0,value:r})}:function(n,r){n.default=r};Ee=function(n){if(n&&n.__esModule)return n;var r={};if(n!=null)for(var i in n)i!=="default"&&Object.prototype.hasOwnProperty.call(n,i)&&ft(r,n,i);return o(r,n),r},Se=function(n){return n&&n.__esModule?n:{default:n}},Oe=function(n,r,i,s){if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof r=="function"?n!==r||!s:!r.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?s:i==="a"?s.call(n):s?s.value:r.get(n)},Ae=function(n,r,i,s,c){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!c)throw new TypeError("Private accessor was defined without a setter");if(typeof r=="function"?n!==r||!c:!r.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?c.call(n,i):c?c.value=i:r.set(n,i),i},Me=function(n,r){if(r===null||typeof r!="object"&&typeof r!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?r===n:n.has(r)},t("__extends",ce),t("__assign",le),t("__rest",ue),t("__decorate",fe),t("__param",me),t("__metadata",pe),t("__awaiter",de),t("__generator",ge),t("__exportStar",he),t("__createBinding",ft),t("__values",ut),t("__read",Tt),t("__spread",ve),t("__spreadArrays",ye),t("__spreadArray",_e),t("__await",z),t("__asyncGenerator",be),t("__asyncDelegator",je),t("__asyncValues",we),t("__makeTemplateObject",xe),t("__importStar",Ee),t("__importDefault",Se),t("__classPrivateFieldGet",Oe),t("__classPrivateFieldSet",Ae),t("__classPrivateFieldIn",Me)})});var Cn={};en(Cn,{createLiveMotion:()=>Ln});function K(t,e){t.indexOf(e)===-1&&t.push(e)}function _t(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}var W=(t,e,o)=>Math.min(Math.max(o,t),e);var O={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var M=t=>typeof t=="number";var T=t=>Array.isArray(t)&&!M(t[0]);var $t=(t,e,o)=>{let n=e-t;return((o-t)%n+n)%n+t};function kt(t,e){return T(t)?t[$t(0,t.length,e)]:t}var nt=(t,e,o)=>-o*t+o*e+t;var J=()=>{},j=t=>t;var F=(t,e,o)=>e-t==0?1:(o-t)/(e-t);function bt(t,e){let o=t[t.length-1];for(let n=1;n<=e;n++){let r=F(0,e,n);t.push(nt(o,1,r))}}function Kt(t){let e=[0];return bt(e,t-1),e}function jt(t,e=Kt(t.length),o=j){let n=t.length,r=n-e.length;return r>0&&bt(e,r),i=>{let s=0;for(;s<n-2&&!(i<e[s+1]);s++);let c=W(0,1,F(e[s],e[s+1],i));return c=kt(o,s)(c),nt(t[s],t[s+1],c)}}var X=t=>Array.isArray(t)&&M(t[0]);var H=t=>typeof t=="object"&&Boolean(t.createAnimation);var D=t=>typeof t=="function";var Z=t=>typeof t=="string";var P={ms:t=>t*1e3,s:t=>t/1e3};function wt(t,e){return e?t*(1e3/e):0}var Wt=(t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,on=1e-7,sn=12;function an(t,e,o,n,r){let i,s,c=0;do s=e+(o-e)/2,i=Wt(s,n,r)-t,i>0?o=s:e=s;while(Math.abs(i)>on&&++c<sn);return s}function G(t,e,o,n){if(t===e&&o===n)return j;let r=i=>an(i,0,1,t,o);return i=>i===0||i===1?i:Wt(r(i),e,n)}var xt=(t,e="end")=>o=>{o=e==="end"?Math.min(o,.999):Math.max(o,.001);let n=o*t,r=e==="end"?Math.floor(n):Math.ceil(n);return W(0,1,r/t)};var Jt={ease:G(.25,.1,.25,1),"ease-in":G(.42,0,1,1),"ease-in-out":G(.42,0,.58,1),"ease-out":G(0,0,.58,1)},cn=/\((.*?)\)/;function Et(t){if(D(t))return t;if(X(t))return G(...t);if(Jt[t])return Jt[t];if(t.startsWith("steps")){let e=cn.exec(t);if(e){let o=e[1].split(",");return xt(parseFloat(o[0]),o[1].trim())}}return j}var rt=class{constructor(e,o=[0,1],{easing:n,duration:r=O.duration,delay:i=O.delay,endDelay:s=O.endDelay,repeat:c=O.repeat,offset:a,direction:l="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=j,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((d,u)=>{this.resolve=d,this.reject=u}),n=n||O.easing,H(n)){let d=n.createAnimation(o);n=d.easing,o=d.keyframes||o,r=d.duration||r}this.repeat=c,this.easing=T(n)?j:Et(n),this.updateDuration(r);let m=jt(o,a,T(n)?n.map(Et):j);this.tick=d=>{var u;i=i;let g=0;this.pauseTime!==void 0?g=this.pauseTime:g=(d-this.startTime)*this.rate,this.t=g,g/=1e3,g=Math.max(g-i,0),this.playState==="finished"&&this.pauseTime===void 0&&(g=this.totalDuration);let v=g/this.duration,p=Math.floor(v),h=v%1;!h&&v>=1&&(h=1),h===1&&p--;let _=p%2;(l==="reverse"||l==="alternate"&&_||l==="alternate-reverse"&&!_)&&(h=1-h);let x=g>=this.totalDuration?1:Math.min(h,1),b=m(this.easing(x));e(b),this.pauseTime===void 0&&(this.playState==="finished"||g>=this.totalDuration+s)?(this.playState="finished",(u=this.resolve)===null||u===void 0||u.call(this,b)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){let e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}};var ot=class{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var St=new WeakMap;function it(t){return St.has(t)||St.set(t,{transforms:[],values:new Map}),St.get(t)}function Xt(t,e){return t.has(e)||t.set(e,new ot),t.get(e)}var ln=["","X","Y","Z"],un=["translate","scale","rotate","skew"],Q={x:"translateX",y:"translateY",z:"translateZ"},Zt={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},fn={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Zt,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:j},skew:Zt},L=new Map,st=t=>`--motion-${t}`,at=["x","y","z"];un.forEach(t=>{ln.forEach(e=>{at.push(t+e),L.set(st(t+e),fn[t])})});var mn=(t,e)=>at.indexOf(t)-at.indexOf(e),pn=new Set(at),ct=t=>pn.has(t),Qt=(t,e)=>{Q[e]&&(e=Q[e]);let{transforms:o}=it(t);K(o,e),t.style.transform=dn(o)},dn=t=>t.sort(mn).reduce(gn,"").trim(),gn=(t,e)=>`${t} ${e}(var(${st(e)}))`;var Y=t=>t.startsWith("--"),Yt=new Set;function te(t){if(!Yt.has(t)){Yt.add(t);try{let{syntax:e,initialValue:o}=L.has(t)?L.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:o})}catch(e){}}}var Ot=(t,e)=>document.createElement("div").animate(t,e),ee={cssRegisterProperty:()=>typeof CSS!="undefined"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Ot({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(Ot({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{Ot({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},At={},R={};for(let t in ee)R[t]=()=>(At[t]===void 0&&(At[t]=ee[t]()),At[t]);var hn=.015,vn=(t,e)=>{let o="",n=Math.round(e/hn);for(let r=0;r<n;r++)o+=t(F(0,n-1,r))+", ";return o.substring(0,o.length-2)},Mt=(t,e)=>D(t)?R.linearEasing()?`linear(${vn(t,e)})`:O.easing:X(t)?yn(t):t,yn=([t,e,o,n])=>`cubic-bezier(${t}, ${e}, ${o}, ${n})`;function ne(t,e){for(let o=0;o<t.length;o++)t[o]===null&&(t[o]=o?t[o-1]:e());return t}var re=t=>Array.isArray(t)?t:[t];function N(t){return Q[t]&&(t=Q[t]),ct(t)?st(t):t}var B={get:(t,e)=>{e=N(e);let o=Y(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!o&&o!==0){let n=L.get(e);n&&(o=n.initialValue)}return o},set:(t,e,o)=>{e=N(e),Y(e)?t.style.setProperty(e,o):t.style[e]=o}};function oe(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(o){}}function lt(t,e){var o;let n=(e==null?void 0:e.toDefaultUnit)||j,r=t[t.length-1];if(Z(r)){let i=((o=r.match(/(-?[\d.]+)([a-z%]*)/))===null||o===void 0?void 0:o[2])||"";i&&(n=s=>s+i)}return n}function _n(){return window.__MOTION_DEV_TOOLS_RECORD}function ie(t,e,o,n={},r){let i=_n(),s=n.record!==!1&&i,c,{duration:a=O.duration,delay:l=O.delay,endDelay:m=O.endDelay,repeat:d=O.repeat,easing:u=O.easing,direction:g,offset:v,allowWebkitAcceleration:p=!1}=n,h=it(t),_=ct(e),x=R.waapi();_&&Qt(t,e);let b=N(e),S=Xt(h.values,b),E=L.get(b);return oe(S.animation,!(H(u)&&S.generator)&&n.record!==!1),()=>{let A=()=>{var y,$;return($=(y=B.get(t,b))!==null&&y!==void 0?y:E==null?void 0:E.initialValue)!==null&&$!==void 0?$:0},f=ne(re(o),A),w=lt(f,E);if(H(u)){let y=u.createAnimation(f,e!=="opacity",A,b,S);u=y.easing,f=y.keyframes||f,a=y.duration||a}if(Y(b)&&(R.cssRegisterProperty()?te(b):x=!1),_&&!R.linearEasing()&&(D(u)||T(u)&&u.some(D))&&(x=!1),x){E&&(f=f.map(V=>M(V)?E.toDefaultUnit(V):V)),f.length===1&&(!R.partialKeyframes()||s)&&f.unshift(A());let y={delay:P.ms(l),duration:P.ms(a),endDelay:P.ms(m),easing:T(u)?void 0:Mt(u,a),direction:g,iterations:d+1,fill:"both"};c=t.animate({[b]:f,offset:v,easing:T(u)?u.map(V=>Mt(V,a)):void 0},y),c.finished||(c.finished=new Promise((V,ke)=>{c.onfinish=V,c.oncancel=ke}));let $=f[f.length-1];c.finished.then(()=>{B.set(t,b,$),c.cancel()}).catch(J),p||(c.playbackRate=1.000001)}else if(r&&_)f=f.map(y=>typeof y=="string"?parseFloat(y):y),f.length===1&&f.unshift(parseFloat(A())),c=new r(y=>{B.set(t,b,w?w(y):y)},f,Object.assign(Object.assign({},n),{duration:a,easing:u}));else{let y=f[f.length-1];B.set(t,b,E&&M(y)?E.toDefaultUnit(y):y)}return s&&i(t,e,f,{duration:a,delay:l,easing:u,repeat:d,offset:v},"motion-one"),S.setAnimation(c),c}}var se=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function ae(t,e){var o;return typeof t=="string"?e?((o=e[t])!==null&&o!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var De=rn(Te()),{__extends:Mo,__assign:To,__rest:pt,__decorate:Do,__param:Lo,__metadata:Po,__awaiter:Ro,__generator:Co,__exportStar:Io,__createBinding:Vo,__values:Fo,__read:Go,__spread:No,__spreadArrays:Bo,__spreadArray:Uo,__await:qo,__asyncGenerator:Ho,__asyncDelegator:zo,__asyncValues:$o,__makeTemplateObject:ko,__importStar:Ko,__importDefault:Wo,__classPrivateFieldGet:Jo,__classPrivateFieldSet:Xo,__classPrivateFieldIn:Zo}=De.default;var Le=function(){};var bn=5;function U(t,e,o){let n=Math.max(e-bn,0);return wt(o-t(n),e-n)}var C={stiffness:100,damping:10,mass:1};var Pe=(t=C.stiffness,e=C.damping,o=C.mass)=>e/(2*Math.sqrt(t*o));function Re(t,e,o){return t<e&&o>=e||t>e&&o<=e}var tt=({stiffness:t=C.stiffness,damping:e=C.damping,mass:o=C.mass,from:n=0,to:r=1,velocity:i=0,restSpeed:s=2,restDistance:c=.5}={})=>{i=i?P.s(i):0;let a={done:!1,hasReachedTarget:!1,current:n,target:r},l=r-n,m=Math.sqrt(t/o)/1e3,d=Pe(t,e,o),u;if(d<1){let g=m*Math.sqrt(1-d*d);u=v=>r-Math.exp(-d*m*v)*((-i+d*m*l)/g*Math.sin(g*v)+l*Math.cos(g*v))}else u=g=>r-Math.exp(-m*g)*(l+(-i+m*l)*g);return g=>{a.current=u(g);let v=g===0?i:U(u,g,a.current),p=Math.abs(v)<=s,h=Math.abs(r-a.current)<=c;return a.done=p&&h,a.hasReachedTarget=Re(n,r,a.current),a}};var Dt=({from:t=0,velocity:e=0,power:o=.8,decay:n=.325,bounceDamping:r,bounceStiffness:i,changeTarget:s,min:c,max:a,restDistance:l=.5,restSpeed:m})=>{n=P.ms(n);let d={hasReachedTarget:!1,done:!1,current:t,target:t},u=f=>c!==void 0&&f<c||a!==void 0&&f>a,g=f=>c===void 0?a:a===void 0||Math.abs(c-f)<Math.abs(a-f)?c:a,v=o*e,p=t+v,h=s===void 0?p:s(p);d.target=h,h!==p&&(v=h-t);let _=f=>-v*Math.exp(-f/n),x=f=>h+_(f),b=f=>{let w=_(f),y=x(f);d.done=Math.abs(w)<=l,d.current=d.done?h:y},S,E,A=f=>{!u(d.current)||(S=f,E=tt({from:d.current,to:g(d.current),velocity:U(x,f,d.current),damping:r,stiffness:i,restDistance:l,restSpeed:m}))};return A(0),f=>{let w=!1;return!E&&S===void 0&&(w=!0,b(f),A(f)),S!==void 0&&f>S?(d.hasReachedTarget=!0,E(f-S)):(d.hasReachedTarget=!1,!w&&b(f),d)}};var Lt=10,jn=1e4;function Pt(t,e=j){let o,n=Lt,r=t(0),i=[e(r.current)];for(;!r.done&&n<jn;)r=t(n),i.push(e(r.done?r.target:r.current)),o===void 0&&r.hasReachedTarget&&(o=n),n+=Lt;let s=n-Lt;return i.length===1&&i.push(r.current),{keyframes:i,duration:s/1e3,overshootDuration:(o!=null?o:s)/1e3}}function Ce(t){return M(t)&&!isNaN(t)}function Rt(t){return Z(t)?parseFloat(t):t}function dt(t){let e=new WeakMap;return(o={})=>{let n=new Map,r=(s=0,c=100,a=0,l=!1)=>{let m=`${s}-${c}-${a}-${l}`;return n.has(m)||n.set(m,t(Object.assign({from:s,to:c,velocity:a,restSpeed:l?.05:2,restDistance:l?.01:.5},o))),n.get(m)},i=(s,c)=>(e.has(s)||e.set(s,Pt(s,c)),e.get(s));return{createAnimation:(s,c=!0,a,l,m)=>{let d,u,g,v=0,p=j,h=s.length;if(c){p=lt(s,l?L.get(N(l)):void 0);let _=s[h-1];if(g=Rt(_),h>1&&s[0]!==null)u=Rt(s[0]);else{let x=m==null?void 0:m.generator;if(x){let{animation:b,generatorStartTime:S}=m,E=(b==null?void 0:b.startTime)||S||0,A=(b==null?void 0:b.currentTime)||performance.now()-E,f=x(A).current;u=f,v=U(w=>x(w).current,A,f)}else a&&(u=Rt(a()))}}if(Ce(u)&&Ce(g)){let _=r(u,g,v,l==null?void 0:l.includes("scale"));d=Object.assign(Object.assign({},i(_,p)),{easing:"linear"}),m&&(m.generator=_,m.generatorStartTime=performance.now())}if(!d){let _=i(r(0,100));d={easing:"ease",duration:_.overshootDuration}}return d}}}}var gt=dt(tt);var ht=dt(Dt);var wn={any:0,all:1};function Ie(t,e,{root:o,margin:n,amount:r="any"}={}){if(typeof IntersectionObserver=="undefined")return()=>{};let i=ae(t),s=new WeakMap,c=l=>{l.forEach(m=>{let d=s.get(m.target);if(m.isIntersecting!==Boolean(d))if(m.isIntersecting){let u=e(m);D(u)?s.set(m.target,u):a.unobserve(m.target)}else d&&(d(m),s.delete(m.target))})},a=new IntersectionObserver(c,{root:o,rootMargin:n,threshold:typeof r=="number"?r:wn[r]});return i.forEach(l=>a.observe(l)),()=>a.disconnect()}function Ve(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!xn(t,e):t!==e}function xn(t,e){let o=e.length;if(o!==t.length)return!1;for(let n=0;n<o;n++)if(e[n]!==t[n])return!1;return!0}function Fe(t){return typeof t=="object"}function Ct(t,e){if(Fe(t))return t;if(t&&e)return e[t]}var I;function En(){if(!I)return;let t=I.sort(Sn).map(On);t.forEach(Ne),t.forEach(Ne),I=void 0}function vt(t){I?K(I,t):(I=[t],requestAnimationFrame(En))}function Ge(t){I&&_t(I,t)}var Sn=(t,e)=>t.getDepth()-e.getDepth(),On=t=>t.animateUpdates(),Ne=t=>t.next();var It=(t,e)=>new CustomEvent(t,{detail:{target:e}});function et(t,e,o){t.dispatchEvent(new CustomEvent(e,{detail:{originalEvent:o}}))}function Vt(t,e,o){t.dispatchEvent(new CustomEvent(e,{detail:{originalEntry:o}}))}var Be={isActive:t=>Boolean(t.inView),subscribe:(t,{enable:e,disable:o},{inViewOptions:n={}})=>{let{once:r}=n,i=pt(n,["once"]);return Ie(t,s=>{if(e(),Vt(t,"viewenter",s),!r)return c=>{o(),Vt(t,"viewleave",c)}},i)}};var Ue=(t,e,o)=>n=>{n.pointerType&&n.pointerType!=="mouse"||(o(),et(t,e,n))},qe={isActive:t=>Boolean(t.hover),subscribe:(t,{enable:e,disable:o})=>{let n=Ue(t,"hoverstart",e),r=Ue(t,"hoverend",o);return t.addEventListener("pointerenter",n),t.addEventListener("pointerleave",r),()=>{t.removeEventListener("pointerenter",n),t.removeEventListener("pointerleave",r)}}};var He={isActive:t=>Boolean(t.press),subscribe:(t,{enable:e,disable:o})=>{let n=i=>{o(),et(t,"pressend",i),window.removeEventListener("pointerup",n)},r=i=>{e(),et(t,"pressstart",i),window.addEventListener("pointerup",n)};return t.addEventListener("pointerdown",r),()=>{t.removeEventListener("pointerdown",r),window.removeEventListener("pointerup",n)}}};var yt={inView:Be,hover:qe,press:He},ze=["initial","animate",...Object.keys(yt),"exit"],Ft=new WeakMap;function Gt(t={},e){let o,n=e?e.getDepth()+1:0,r={initial:!0,animate:!0},i={},s={};for(let p of ze)s[p]=typeof t[p]=="string"?t[p]:e==null?void 0:e.getContext()[p];let c=t.initial===!1?"animate":"initial",a=Ct(t[c]||s[c],t.variants)||{},l=pt(a,["transition"]),m=Object.assign({},l);function*d(){var p,h;let _=l;l={};let x={};for(let f of ze){if(!r[f])continue;let w=Ct(t[f]);if(!!w)for(let y in w)y!=="transition"&&(l[y]=w[y],x[y]=se((h=(p=w.transition)!==null&&p!==void 0?p:t.transition)!==null&&h!==void 0?h:{},y))}let b=new Set([...Object.keys(l),...Object.keys(_)]),S=[];b.forEach(f=>{var w;l[f]===void 0&&(l[f]=m[f]),Ve(_[f],l[f])&&((w=m[f])!==null&&w!==void 0||(m[f]=B.get(o,f)),S.push(ie(o,f,l[f],x[f],rt)))}),yield;let E=S.map(f=>f()).filter(Boolean);if(!E.length)return;let A=l;o.dispatchEvent(It("motionstart",A)),Promise.all(E.map(f=>f.finished)).then(()=>{o.dispatchEvent(It("motioncomplete",A))}).catch(J)}let u=(p,h)=>()=>{r[p]=h,vt(v)},g=()=>{for(let p in yt){let h=yt[p].isActive(t),_=i[p];h&&!_?i[p]=yt[p].subscribe(o,{enable:u(p,!0),disable:u(p,!1)},t):!h&&_&&(_(),delete i[p])}},v={update:p=>{!o||(t=p,g(),vt(v))},setActive:(p,h)=>{!o||(r[p]=h,vt(v))},animateUpdates:d,getDepth:()=>n,getTarget:()=>l,getOptions:()=>t,getContext:()=>s,mount:p=>(Le(Boolean(p),"Animation state must be mounted with valid Element"),o=p,Ft.set(o,v),g(),()=>{Ft.delete(o),Ge(v);for(let h in i)i[h]()}),isMounted:()=>Boolean(o)};return v}function $e(t){return Object.entries(t).reduce((e,[o,n])=>(n!=null&&(e[o]=n),e),{})}var An=10*1e3,Mn=300,q=new WeakMap;function Tn(){function t(){let e=this.getConfig();this.eventHandlers={motionstart:()=>{liveSocket.execJS(this.el,e==null?void 0:e.on_motion_start)},motioncomplete:()=>{liveSocket.execJS(this.el,e==null?void 0:e.on_motion_complete)}},(e==null?void 0:e.on_motion_start)&&this.el.addEventListener("motionstart",this.eventHandlers.motionstart),(e==null?void 0:e.on_motion_complete)&&this.el.addEventListener("motioncomplete",this.eventHandlers.motioncomplete)}return{Motion:{getConfig(){return Rn(this.el)},getMotionOptions(){var i;let e=this.getConfig();if(!e)return;let o=()=>{let{transition:s}=e;if((s==null?void 0:s.easing)==="spring")return gt();if((s==null?void 0:s.easing)==="glide")return ht();if(typeof(s==null?void 0:s.easing)=="object"&&!Array.isArray(s.easing)){if(s.easing.spring)return gt(s.easing.spring);if(s.easing.glide)return ht(s.easing.glide)}return s==null?void 0:s.easing},n=((i=e.transition)==null?void 0:i.easing)?Ht(qt({},e.transition),{easing:o()}):e.transition,r={initial:e.initial,animate:e.animate,exit:e.exit,hover:e.hover,press:e.press,inView:e.in_view,inViewOptions:e.in_view_options,transition:n};return $e(r)},maybeAnimate(e){let{force:o=!1}=e||{},n=this.getConfig(),r=this.getMotionOptions();this.state&&r&&n&&(!(n==null?void 0:n.defer)||o)&&this.state.update(r)},mounted(){q.set(this.el,this),t.apply(this),this.state=Gt(this.getMotionOptions()),this.cleanup=this.state.mount(this.el),this.maybeAnimate()},destroyed(){var e;this.eventHandlers&&Object.entries(this.eventHandlers).forEach(([o,n])=>this.el.removeEventListener(o,n)),q.delete(this.el),(e=this.cleanup)==null||e.call(this)},updated(){this.maybeAnimate()}}}}function Dn(t,e){t.dataset.motion&&(t.getAttribute("style")===null?e.removeAttribute("style"):e.setAttribute("style",t.getAttribute("style")))}function Ln(){return window.addEventListener("live_motion:animate",t=>{let{target:e}=t,o=q.get(e);!o&&liveSocket.isDebugEnabled()&&console.warn("[LiveMotion] Motion element not found. Did you forget to make your target a LiveMotion.motion component?"),o&&o.maybeAnimate({force:!0})}),window.addEventListener("live_motion:hide",t=>{var n;let{target:e}=t,o=q.get(e);if(!o&&liveSocket.isDebugEnabled()&&console.warn("[LiveMotion] Motion element not found. Did you forget to make your target a LiveMotion.motion component?"),o){let r=Pn((n=o.getConfig())==null?void 0:n.transition);liveSocket.transition(r,()=>{var s;let i=q.get(e);i&&(i.el.addEventListener("motioncomplete",()=>i.el.style.display="none",{once:!0}),(s=i.state)==null||s.setActive("exit",!0))})}}),window.addEventListener("live_motion:show",t=>{var r,i,s;let{target:e,detail:o}=t,n=q.get(e);!n&&liveSocket.isDebugEnabled()&&console.warn("[LiveMotion] Motion element not found. Did you forget to make your target a LiveMotion.motion component?"),n&&(n.el.style.display=(r=o==null?void 0:o.display)!=null?r:"block",(i=n.state)==null||i.setActive("exit",!1),(s=n.state)==null||s.setActive("animate",!0))}),window.addEventListener("live_motion:toggle",t=>{var n,r;let{target:e}=t,o=q.get(e);if(!o&&liveSocket.isDebugEnabled()&&console.warn("[LiveMotion] Motion element not found. Did you forget to make your target a LiveMotion.motion component?"),o){let i=o.el.hasAttribute("data-motion-toggle")?o.el.dataset.motionToggle==="true":!((n=o.getConfig())==null?void 0:n.defer);o.el.dataset.motionToggle=String(!i),(r=o.state)==null||r.setActive("exit",i)}}),{hook:Tn(),handleMotionUpdates:Dn}}function Pn(t){let e=t&&(typeof t.easing=="object"&&!Array.isArray(t.easing)||t.easing==="spring"||t.easing==="glide");return e&&typeof(t==null?void 0:t.duration)!="undefined"?t.duration*1e3:e?An:typeof(t==null?void 0:t.duration)!="undefined"?t.duration*1e3:Mn}function Rn(t){return t.dataset.motion?JSON.parse(t.dataset.motion):void 0}return Cn;})();