(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[208],{28814:function(e,t,i){"use strict";i.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.356.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,i(70843).Z)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},43081:function(e,t,i){"use strict";i.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.356.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,i(70843).Z)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},18314:function(e,t,i){"use strict";var r=i(41811);function n(){}function a(){}a.resetWarningCache=n,e.exports=function(){function e(e,t,i,n,a,s){if(s!==r){var o=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var i={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:n};return i.PropTypes=i,i}},74404:function(e,t,i){"use strict";e.exports=i(18314)()},41811:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},86149:function(e,t,i){"use strict";t.J=void 0;var r=i(8580);Object.defineProperty(t,"J",{enumerable:!0,get:function(){return r.useTimer}})},25557:function(e,t){"use strict";var i=function(){return(i=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(t.type){case"advanceTime":var r=t.payload.timeToAdd;return i(i({},e),{time:"DECREMENTAL"===e.timerType?e.time-r:e.time+r});case"pause":return i(i({},e),{status:"PAUSED"});case"reset":return i(i({},e),{status:"STOPPED",time:t.payload.initialTime});case"set":return i(i({},e),{time:t.payload.newTime});case"start":var n=t.payload.initialTime;return i(i({},e),{status:"RUNNING",time:"STOPPED"===e.status?n:e.time});case"stop":return i(i({},e),{status:"STOPPED"});default:return e}}},8580:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTimer=void 0;var r,n=i(64090),a=(r=i(25557))&&r.__esModule?r:{default:r};t.useTimer=function(e){var t=void 0===e?{}:e,i=t.autostart,r=void 0!==i&&i,s=t.endTime,o=t.initialTime,l=void 0===o?0:o,u=t.interval,d=void 0===u?1e3:u,c=t.onTimeOver,h=t.onTimeUpdate,p=t.step,m=void 0===p?1:p,f=t.timerType,v=void 0===f?"INCREMENTAL":f,y=n.useReducer(a.default,{status:"STOPPED",time:l,timerType:v}),g=y[0],b=y[1],T=g.status,w=g.time,E=n.useCallback(function(e){b({type:"advanceTime",payload:{timeToAdd:e}})},[]),x=n.useCallback(function(){b({type:"pause"})},[]),k=n.useCallback(function(){b({type:"reset",payload:{initialTime:l}})},[l]),P=n.useCallback(function(){b({type:"start",payload:{initialTime:l}})},[]);return n.useEffect(function(){r&&b({type:"start",payload:{initialTime:l}})},[r]),n.useEffect(function(){"function"==typeof h&&h(w)},[w]),n.useEffect(function(){"STOPPED"!==T&&w===s&&(b({type:"stop"}),"function"==typeof c&&c())},[s,c,w,T]),n.useEffect(function(){var e=null;return"RUNNING"===T?e=setInterval(function(){b({type:"set",payload:{newTime:"DECREMENTAL"===v?w-m:w+m}})},d):e&&clearInterval(e),function(){e&&clearInterval(e)}},[T,m,v,d,w]),{advanceTime:E,pause:x,reset:k,start:P,status:T,time:w}}},63894:function(e){e.exports={style:{fontFamily:"'__Montserrat_7b5804', '__Montserrat_Fallback_7b5804'",fontStyle:"normal"},className:"__className_7b5804"}},10941:function(e){e.exports={style:{fontFamily:"'__Montserrat_1dec39', '__Montserrat_Fallback_1dec39'",fontStyle:"normal"},className:"__className_1dec39"}},59463:function(e){e.exports={style:{fontFamily:"'__Montserrat_bfa41c', '__Montserrat_Fallback_bfa41c'",fontStyle:"normal"},className:"__className_bfa41c"}},93684:function(e){e.exports={style:{fontFamily:"'__Montserrat_5fb2b8', '__Montserrat_Fallback_5fb2b8'",fontStyle:"normal"},className:"__className_5fb2b8"}},34235:function(e,t,i){"use strict";i.d(t,{Z:function(){return i1}});var r=i(64090),n=i(74404),a=Object.create,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,u=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,c=function(e,t){return function(){return e&&(t=e(e=0)),t}},h=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},p=function(e,t,i,r){if(t&&"object"==typeof t||"function"==typeof t)for(var n,a=l(t),u=0,c=a.length;u<c;u++)n=a[u],d.call(e,n)||n===i||s(e,n,{get:(function(e){return t[e]}).bind(null,n),enumerable:!(r=o(t,n))||r.enumerable});return e},m=function(e,t,i){return i=null!=e?a(u(e)):{},p(!t&&e&&e.__esModule?i:s(i,"default",{value:e,enumerable:!0}),e)},f=h(function(e,t){var i;i=window,t.exports=i});function v(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):v(e,t)}var y=c(function(){y()});function g(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var b=c(function(){}),T=h(function(e,t){var i=Array.prototype.slice;t.exports=function(e,t){for(("length"in e)||(e=[e]),e=i.call(e);e.length;){var r=e.shift(),n=t(r);if(n)return n;r.childNodes&&r.childNodes.length&&(e=i.call(r.childNodes).concat(e))}}}),w=h(function(e,t){function i(e,t){if(!v(this,i))return new i(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}y(),t.exports=i,i.prototype.nodeType=8,i.prototype.nodeName="#comment",i.prototype.toString=function(){return"[object Comment]"}}),E=h(function(e,t){function i(e,t){if(!v(this,i))return new i(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}y(),t.exports=i,i.prototype.type="DOMTextNode",i.prototype.nodeType=3,i.prototype.nodeName="#text",i.prototype.toString=function(){return this.data},i.prototype.replaceData=function(e,t,i){var r=this.data,n=r.substring(0,e),a=r.substring(e+t,r.length);this.data=n+i+a,this.length=this.data.length}}),x=h(function(e,t){t.exports=function(e){var t=this,i=e.type;e.target||(e.target=t),t.listeners||(t.listeners={});var r=t.listeners[i];if(r)return r.forEach(function(i){e.currentTarget=t,"function"==typeof i?i(e):i.handleEvent(e)});t.parentNode&&t.parentNode.dispatchEvent(e)}}),k=h(function(e,t){t.exports=function(e,t){this.listeners||(this.listeners={}),this.listeners[e]||(this.listeners[e]=[]),-1===this.listeners[e].indexOf(t)&&this.listeners[e].push(t)}}),P=h(function(e,t){t.exports=function(e,t){if(this.listeners&&this.listeners[e]){var i=this.listeners[e],r=i.indexOf(t);-1!==r&&i.splice(r,1)}}}),A=h(function(e,t){b(),t.exports=function e(t){switch(t.nodeType){case 3:return n(t.data);case 8:return"<!--"+t.data+"-->";default:var a,s;return a=[],s=t.tagName,"http://www.w3.org/1999/xhtml"===t.namespaceURI&&(s=s.toLowerCase()),a.push("<"+s+function(e){var t=[];for(var i in e)(function(e,t){var i=g(e[t]);return"style"===t&&Object.keys(e.style).length>0||e.hasOwnProperty(t)&&("string"===i||"boolean"===i||"number"===i)&&"nodeName"!==t&&"className"!==t&&"tagName"!==t&&"textContent"!==t&&"innerText"!==t&&"namespaceURI"!==t&&"innerHTML"!==t})(e,i)&&t.push({name:i,value:e[i]});for(var n in e._attributes)for(var a in e._attributes[n]){var s=e._attributes[n][a],o=(s.prefix?s.prefix+":":"")+a;t.push({name:o,value:s.value})}return e.className&&t.push({name:"class",value:e.className}),t.length?r(t):""}(t)+function(e){var t=e.dataset,i=[];for(var n in t)i.push({name:"data-"+n,value:t[n]});return i.length?r(i):""}(t)),i.indexOf(s)>-1?a.push(" />"):(a.push(">"),t.childNodes.length?a.push.apply(a,t.childNodes.map(e)):t.textContent||t.innerText?a.push(n(t.textContent||t.innerText)):t.innerHTML&&a.push(t.innerHTML),a.push("</"+s+">")),a.join("")}};var i=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function r(e){var t=[];return e.forEach(function(e){var i=e.name,r=e.value;"style"===i&&(r=function(e){if("string"==typeof e)return e;var t="";return Object.keys(e).forEach(function(i){var r=e[i];i=i.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}),t+=i+":"+r+";"}),t}(r)),t.push(i+'="'+n(r).replace(/"/g,"&quot;")+'"')}),t.length?" "+t.join(" "):""}function n(e){var t="";return"string"==typeof e?t=e:e&&(t=e.toString()),t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}}),S=h(function(e,t){y();var i=T(),r=x(),n=k(),a=P(),s=A(),o="http://www.w3.org/1999/xhtml";function l(e,t,i){if(!v(this,l))return new l(e);var r=void 0===i?o:i||null;this.tagName=r===o?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=r,this._attributes={},"INPUT"===this.tagName&&(this.type="text")}t.exports=l,l.prototype.type="DOMElement",l.prototype.nodeType=1,l.prototype.appendChild=function(e){return e.parentNode&&e.parentNode.removeChild(e),this.childNodes.push(e),e.parentNode=this,e},l.prototype.replaceChild=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=this.childNodes.indexOf(t);return t.parentNode=null,this.childNodes[i]=e,e.parentNode=this,t},l.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);return this.childNodes.splice(t,1),e.parentNode=null,e},l.prototype.insertBefore=function(e,t){e.parentNode&&e.parentNode.removeChild(e);var i=null==t?-1:this.childNodes.indexOf(t);return i>-1?this.childNodes.splice(i,0,e):this.childNodes.push(e),e.parentNode=this,e},l.prototype.setAttributeNS=function(e,t,i){var r=null,n=t,a=t.indexOf(":");(a>-1&&(r=t.substr(0,a),n=t.substr(a+1)),"INPUT"===this.tagName&&"type"===t)?this.type=i:(this._attributes[e]||(this._attributes[e]={}))[n]={value:i,prefix:r}},l.prototype.getAttributeNS=function(e,t){var i=this._attributes[e],r=i&&i[t]&&i[t].value;return"INPUT"===this.tagName&&"type"===t?this.type:"string"!=typeof r?null:r},l.prototype.removeAttributeNS=function(e,t){var i=this._attributes[e];i&&delete i[t]},l.prototype.hasAttributeNS=function(e,t){var i=this._attributes[e];return!!i&&t in i},l.prototype.setAttribute=function(e,t){return this.setAttributeNS(null,e,t)},l.prototype.getAttribute=function(e){return this.getAttributeNS(null,e)},l.prototype.removeAttribute=function(e){return this.removeAttributeNS(null,e)},l.prototype.hasAttribute=function(e){return this.hasAttributeNS(null,e)},l.prototype.removeEventListener=a,l.prototype.addEventListener=n,l.prototype.dispatchEvent=r,l.prototype.focus=function(){},l.prototype.toString=function(){return s(this)},l.prototype.getElementsByClassName=function(e){var t=e.split(" "),r=[];return i(this,function(e){if(1===e.nodeType){var i=(e.className||"").split(" ");t.every(function(e){return -1!==i.indexOf(e)})&&r.push(e)}}),r},l.prototype.getElementsByTagName=function(e){e=e.toLowerCase();var t=[];return i(this.childNodes,function(i){1===i.nodeType&&("*"===e||i.tagName.toLowerCase()===e)&&t.push(i)}),t},l.prototype.contains=function(e){return i(this,function(t){return e===t})||!1}}),D=h(function(e,t){y();var i=S();function r(e){if(!v(this,r))return new r;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}t.exports=r,r.prototype.type="DocumentFragment",r.prototype.nodeType=11,r.prototype.nodeName="#document-fragment",r.prototype.appendChild=i.prototype.appendChild,r.prototype.replaceChild=i.prototype.replaceChild,r.prototype.removeChild=i.prototype.removeChild,r.prototype.toString=function(){return this.childNodes.map(function(e){return String(e)}).join("")}}),R=h(function(e,t){function i(e){}t.exports=i,i.prototype.initEvent=function(e,t,i){this.type=e,this.bubbles=t,this.cancelable=i},i.prototype.preventDefault=function(){}}),O=h(function(e,t){y();var i=T(),r=w(),n=E(),a=S(),s=D(),o=R(),l=x(),u=k(),d=P();function c(){if(!v(this,c))return new c;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}t.exports=c;var h=c.prototype;h.createTextNode=function(e){return new n(e,this)},h.createElementNS=function(e,t){return new a(t,this,null===e?null:String(e))},h.createElement=function(e){return new a(e,this)},h.createDocumentFragment=function(){return new s(this)},h.createEvent=function(e){return new o(e)},h.createComment=function(e){return new r(e,this)},h.getElementById=function(e){return e=String(e),i(this.childNodes,function(t){if(String(t.id)===e)return t})||null},h.getElementsByClassName=a.prototype.getElementsByClassName,h.getElementsByTagName=a.prototype.getElementsByTagName,h.contains=a.prototype.contains,h.removeEventListener=d,h.addEventListener=u,h.dispatchEvent=l}),C=h(function(e,t){var i=O();t.exports=new i}),L=h(function(e,t){var i,r="undefined"!=typeof global?global:window,n=C();"undefined"!=typeof document?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"])||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=n),t.exports=i});function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}function M(e,t){if(e){if("string"==typeof e)return N(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(i);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return N(e,t)}}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=i){var r,n,a=[],s=!0,o=!1;try{for(i=i.call(e);!(s=(r=i.next()).done)&&(a.push(r.value),!(t&&a.length===t));s=!0);}catch(e){o=!0,n=e}finally{try{s||null==i.return||i.return()}finally{if(o)throw n}}return a}}(e,t)||M(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var V=m(f()),q=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},j=function(){return("000000"+(2176782336*Math.random()<<0).toString(36)).slice(-6)},F=function(e){var t;if(e&&void 0!==e.nodeName)return e.muxId||(e.muxId=j()),e.muxId;try{t=document.querySelector(e)}catch(e){}return t&&!t.muxId&&(t.muxId=e),(null==t?void 0:t.muxId)||e},B=function(e){e&&void 0!==e.nodeName?e=F(t=e):t=document.querySelector(e);var t,i=t&&t.nodeName?t.nodeName.toLowerCase():"";return[t,e,i]};function U(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var H={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},W=function(e){var t,i,r,n,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,o=e?[console,e]:[console],l=(t=console.trace).bind.apply(t,U(o)),u=(i=console.info).bind.apply(i,U(o)),d=(r=console.debug).bind.apply(r,U(o)),c=(n=console.warn).bind.apply(n,U(o)),h=(a=console.error).bind.apply(a,U(o)),p=s;return{trace:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>H.TRACE))return l.apply(void 0,U(t))},debug:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>H.DEBUG))return d.apply(void 0,U(t))},info:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>H.INFO))return u.apply(void 0,U(t))},warn:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>H.WARN))return c.apply(void 0,U(t))},error:function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];if(!(p>H.ERROR))return h.apply(void 0,U(t))},get level(){return p},set level(_){_!==this.level&&(p=null!=_?_:s)}}}("[mux]"),G=m(f());function K(){return"1"===(G.default.doNotTrack||G.default.navigator&&G.default.navigator.doNotTrack)}var z=m(f()),Y={now:function(){var e=z.default.performance,t=e&&e.timing,i=t&&t.navigationStart;return Math.round("number"==typeof i&&"function"==typeof e.now?i+e.now():Date.now())}};function X(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e,t){if(!v(e,t))throw TypeError("Cannot call a class as a function")}function J(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t,i){return t&&J(e.prototype,t),i&&J(e,i),e}function $(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}y(),b();var ei=function(e){return er(e)[0]},er=function(e){if("string"!=typeof e||""===e)return["localhost"];var t,i=(e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/)||[])[4];return i&&(t=(i.match(/[^\.]+\.[^\.]+$/)||[])[0]),[i,t]},en=m(f()),ea={exists:function(){var e=en.default.performance;return void 0!==(e&&e.timing)},domContentLoadedEventEnd:function(){var e=en.default.performance,t=e&&e.timing;return t&&t.domContentLoadedEventEnd},navigationStart:function(){var e=en.default.performance,t=e&&e.timing;return t&&t.navigationStart}};function es(e,t,i){i=void 0===i?1:i,e[t]=e[t]||0,e[t]+=i}function eo(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},r=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),r.forEach(function(t){$(e,t,i[t])})}return e}function el(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);i.push.apply(i,r)}return i})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}var eu=["x-request-id","cf-ray","x-amz-cf-id","x-akamai-request-id"],ed=["x-cdn","content-type"].concat(eu);function ec(e){var t={};return(e=e||"").trim().split(/[\r\n]+/).forEach(function(e){if(e){var i=e.split(": "),r=i.shift();r&&(ed.indexOf(r.toLowerCase())>=0||0===r.toLowerCase().indexOf("x-litix-"))&&(t[r]=i.join(": "))}}),t}function eh(e){if(e){var t=eu.find(function(t){return void 0!==e[t]});return t?e[t]:void 0}}var ep=function(e){var t={};for(var i in e){var r=e[i];-1!==r["DATA-ID"].search("io.litix.data.")&&(t[r["DATA-ID"].replace("io.litix.data.","")]=r.VALUE)}return t},em=function(e){if(!e)return{};var t=ea.navigationStart(),i=e.loading,r=i?i.start:e.trequest,n=i?i.first:e.tfirst,a=i?i.end:e.tload;return{bytesLoaded:e.total,requestStart:Math.round(t+r),responseStart:Math.round(t+n),responseEnd:Math.round(t+a)}},ef=function(e){if(!(!e||"function"!=typeof e.getAllResponseHeaders))return ec(e.getAllResponseHeaders())},ev=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=arguments.length>4?arguments[4]:void 0,n=e.log,a=e.utils.secondsToMs,s=function(e){var t,i=parseInt(r.version);return 1===i&&null!==e.programDateTime&&(t=e.programDateTime),0===i&&null!==e.pdt&&(t=e.pdt),t};if(!ea.exists()){n.warn("performance timing not supported. Not tracking HLS.js.");return}var o=function(i,r){return e.emit(t,i,r)},l=function(e,t){var i=t.levels,r=t.audioTracks,n=t.url,a=t.stats,s=t.networkDetails,l=t.sessionData,u={},d={};i.forEach(function(e,t){u[t]={width:e.width,height:e.height,bitrate:e.bitrate,attrs:e.attrs}}),r.forEach(function(e,t){d[t]={name:e.name,language:e.lang,bitrate:e.bitrate}});var c=em(a),h=c.bytesLoaded,p=c.requestStart,m=c.responseStart,f=c.responseEnd;o("requestcompleted",el(eo({},ep(l)),{request_event_type:e,request_bytes_loaded:h,request_start:p,request_response_start:m,request_response_end:f,request_type:"manifest",request_hostname:ei(n),request_response_headers:ef(s),request_rendition_lists:{media:u,audio:d,video:{}}}))};i.on(r.Events.MANIFEST_LOADED,l);var u=function(e,t){var i=t.details,r=t.level,n=t.networkDetails,l=em(t.stats),u=l.bytesLoaded,d=l.requestStart,c=l.responseStart,h=l.responseEnd,p=i.fragments[i.fragments.length-1],m=s(p)+a(p.duration);o("requestcompleted",{request_event_type:e,request_bytes_loaded:u,request_start:d,request_response_start:c,request_response_end:h,request_current_level:r,request_type:"manifest",request_hostname:ei(i.url),request_response_headers:ef(n),video_holdback:i.holdBack&&a(i.holdBack),video_part_holdback:i.partHoldBack&&a(i.partHoldBack),video_part_target_duration:i.partTarget&&a(i.partTarget),video_target_duration:i.targetduration&&a(i.targetduration),video_source_is_live:i.live,player_manifest_newest_program_time:isNaN(m)?void 0:m})};i.on(r.Events.LEVEL_LOADED,u);var d=function(e,t){var i=t.details,r=t.networkDetails,n=em(t.stats);o("requestcompleted",{request_event_type:e,request_bytes_loaded:n.bytesLoaded,request_start:n.requestStart,request_response_start:n.responseStart,request_response_end:n.responseEnd,request_type:"manifest",request_hostname:ei(i.url),request_response_headers:ef(r)})};i.on(r.Events.AUDIO_TRACK_LOADED,d);var c=function(e,t){var r=t.stats,n=t.networkDetails,a=t.frag,s=em(r=r||a.stats),l=s.bytesLoaded,u=s.requestStart,d=s.responseStart,c=s.responseEnd,h=n?ef(n):void 0,p={request_event_type:e,request_bytes_loaded:l,request_start:u,request_response_start:d,request_response_end:c,request_hostname:n?ei(n.responseURL):void 0,request_id:h?eh(h):void 0,request_response_headers:h,request_media_duration:a.duration,request_url:null==n?void 0:n.responseURL};"main"===a.type?(p.request_type="media",p.request_current_level=a.level,p.request_video_width=(i.levels[a.level]||{}).width,p.request_video_height=(i.levels[a.level]||{}).height,p.request_labeled_bitrate=(i.levels[a.level]||{}).bitrate):p.request_type=a.type,o("requestcompleted",p)};i.on(r.Events.FRAG_LOADED,c);var h=function(e,t){var i=t.frag,r=i.start;o("fragmentchange",{currentFragmentPDT:s(i),currentFragmentStart:a(r)})};i.on(r.Events.FRAG_CHANGED,h);var p=function(e,t){var i,n=t.type,a=t.details,s=t.response,l=t.fatal,u=t.frag,d=t.networkDetails,c=(null==u?void 0:u.url)||t.url||"",h=d?ef(d):void 0;(a===r.ErrorDetails.MANIFEST_LOAD_ERROR||a===r.ErrorDetails.MANIFEST_LOAD_TIMEOUT||a===r.ErrorDetails.FRAG_LOAD_ERROR||a===r.ErrorDetails.FRAG_LOAD_TIMEOUT||a===r.ErrorDetails.LEVEL_LOAD_ERROR||a===r.ErrorDetails.LEVEL_LOAD_TIMEOUT||a===r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||a===r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT||a===r.ErrorDetails.SUBTITLE_LOAD_ERROR||a===r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT||a===r.ErrorDetails.KEY_LOAD_ERROR||a===r.ErrorDetails.KEY_LOAD_TIMEOUT)&&o("requestfailed",{request_error:a,request_url:c,request_hostname:ei(c),request_id:h?eh(h):void 0,request_type:a===r.ErrorDetails.FRAG_LOAD_ERROR||a===r.ErrorDetails.FRAG_LOAD_TIMEOUT?"media":a===r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR||a===r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT?"audio":a===r.ErrorDetails.SUBTITLE_LOAD_ERROR||a===r.ErrorDetails.SUBTITLE_LOAD_TIMEOUT?"subtitle":a===r.ErrorDetails.KEY_LOAD_ERROR||a===r.ErrorDetails.KEY_LOAD_TIMEOUT?"encryption":"manifest",request_error_code:null==s?void 0:s.code,request_error_text:null==s?void 0:s.text}),l&&o("error",{player_error_code:n,player_error_message:a,player_error_context:"".concat(c?"url: ".concat(c,"\n"):"")+"".concat(s&&(s.code||s.text)?"response: ".concat(s.code,", ").concat(s.text,"\n"):"")+"".concat(t.reason?"failure reason: ".concat(t.reason,"\n"):"")+"".concat(t.level?"level: ".concat(t.level,"\n"):"")+"".concat(t.parent?"parent stream controller: ".concat(t.parent,"\n"):"")+"".concat(t.buffer?"buffer length: ".concat(t.buffer,"\n"):"")+"".concat(t.error?"error: ".concat(t.error,"\n"):"")+"".concat(t.event?"event: ".concat(t.event,"\n"):"")+"".concat(t.err?"error message: ".concat(null===(i=t.err)||void 0===i?void 0:i.message,"\n"):"")})};i.on(r.Events.ERROR,p);var m=function(e,t){var i=t.frag,r=i&&i._url||"";o("requestcanceled",{request_event_type:e,request_url:r,request_type:"media",request_hostname:ei(r)})};i.on(r.Events.FRAG_LOAD_EMERGENCY_ABORTED,m);var f=function(e,t){var r=t.level,a=i.levels[r];if(a&&a.attrs&&a.attrs.BANDWIDTH){var s,l=a.attrs.BANDWIDTH,u=parseFloat(a.attrs["FRAME-RATE"]);isNaN(u)||(s=u),l?o("renditionchange",{video_source_fps:s,video_source_bitrate:l,video_source_width:a.width,video_source_height:a.height,video_source_rendition_name:a.name,video_source_codec:null==a?void 0:a.videoCodec}):n.warn("missing BANDWIDTH from HLS manifest parsed by HLS.js")}};i.on(r.Events.LEVEL_SWITCHED,f),i._stopMuxMonitor=function(){i.off(r.Events.MANIFEST_LOADED,l),i.off(r.Events.LEVEL_LOADED,u),i.off(r.Events.AUDIO_TRACK_LOADED,d),i.off(r.Events.FRAG_LOADED,c),i.off(r.Events.FRAG_CHANGED,h),i.off(r.Events.ERROR,p),i.off(r.Events.FRAG_LOAD_EMERGENCY_ABORTED,m),i.off(r.Events.LEVEL_SWITCHED,f),i.off(r.Events.DESTROYING,i._stopMuxMonitor),delete i._stopMuxMonitor},i.on(r.Events.DESTROYING,i._stopMuxMonitor)},ey=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},eg=function(e,t){if(!e||!e.requestEndDate)return{};var i,r=ei(e.url),n=e.url,a=e.bytesLoaded,s=new Date(e.requestStartDate).getTime(),o=new Date(e.firstByteDate).getTime(),l=new Date(e.requestEndDate).getTime(),u=isNaN(e.duration)?0:e.duration,d="function"==typeof t.getMetricsFor?t.getMetricsFor(e.mediaType).HttpList:t.getDashMetrics().getHttpRequests(e.mediaType);d.length>0&&(i=ec(d[d.length-1]._responseHeaders||""));var c=i?eh(i):void 0;return{requestStart:s,requestResponseStart:o,requestResponseEnd:l,requestBytesLoaded:a,requestResponseHeaders:i,requestMediaDuration:u,requestHostname:r,requestUrl:n,requestId:c}},e_=function(e,t){var i=t.getQualityFor(e),r=t.getCurrentTrackFor(e).bitrateList;return r?{currentLevel:i,renditionWidth:r[i].width||null,renditionHeight:r[i].height||null,renditionBitrate:r[i].bandwidth}:{}},eb=function(e){var t;return null===(t=e.match(/.*codecs\*?="(.*)"/))||void 0===t?void 0:t[1]},eT=function(e){try{var t,i;return null===(i=e.getVersion)||void 0===i||null===(t=i.call(e))||void 0===t?void 0:t.split(".").map(function(e){return parseInt(e)})[0]}catch(e){return!1}},ew=function(e,t,i){arguments.length>3&&void 0!==arguments[3]&&arguments[3];var r=e.log;if(!i||!i.on){r.warn("Invalid dash.js player reference. Monitoring blocked.");return}var n=eT(i),a=function(i,r){return e.emit(t,i,r)},s=function(e){var t=e.type,i=(e.data||{}).url;a("requestcompleted",{request_event_type:t,request_start:0,request_response_start:0,request_response_end:0,request_bytes_loaded:-1,request_type:"manifest",request_hostname:ei(i),request_url:i})};i.on("manifestLoaded",s);var o={},l=function(e){if("function"!=typeof e.getRequests)return null;var t=e.getRequests({state:"executed"});return 0===t.length?null:t[t.length-1]},u=function(e){var t=e.type,r=e.chunk,n=e.request,s=(r||{}).mediaInfo||{},l=s.type,u=s.bitrateList,d={};(u=u||[]).forEach(function(e,t){d[t]={},d[t].width=e.width,d[t].height=e.height,d[t].bitrate=e.bandwidth,d[t].attrs={}}),"video"===l?o.video=d:"audio"===l?o.audio=d:o.media=d;var c=eg(n,i),h=c.requestStart,p=c.requestResponseStart,m=c.requestResponseEnd,f=c.requestResponseHeaders,v=c.requestMediaDuration,y=c.requestHostname,g=c.requestUrl;a("requestcompleted",{request_event_type:t,request_start:h,request_response_start:p,request_response_end:m,request_bytes_loaded:-1,request_type:l+"_init",request_response_headers:f,request_hostname:y,request_id:c.requestId,request_url:g,request_media_duration:v,request_rendition_lists:o})};n>=4?i.on("initFragmentLoaded",u):i.on("initFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,r=e.chunk;u({type:t,request:l(i),chunk:r})});var d=function(e){var t=e.type,r=e.chunk,n=e.request,s=r||{},o=s.mediaInfo,l=s.start,u=(o||{}).type,d=eg(n,i),c=d.requestStart,h=d.requestResponseStart,p=d.requestResponseEnd,m=d.requestBytesLoaded,f=d.requestResponseHeaders,v=d.requestMediaDuration,y=d.requestHostname,g=d.requestUrl,b=d.requestId,T=e_(u,i),w=T.currentLevel,E=T.renditionWidth,x=T.renditionHeight;a("requestcompleted",{request_event_type:t,request_start:c,request_response_start:h,request_response_end:p,request_bytes_loaded:m,request_type:u,request_response_headers:f,request_hostname:y,request_id:b,request_url:g,request_media_start_time:l,request_media_duration:v,request_current_level:w,request_labeled_bitrate:T.renditionBitrate,request_video_width:E,request_video_height:x})};n>=4?i.on("mediaFragmentLoaded",d):i.on("mediaFragmentLoaded",function(e){var t=e.type,i=e.fragmentModel,r=e.chunk;d({type:t,request:l(i),chunk:r})});var c={video:void 0,audio:void 0,totalBitrate:void 0},h=function(){if(c.video&&"number"==typeof c.video.bitrate){if(!(c.video.width&&c.video.height)){r.warn("have bitrate info for video but missing width/height");return}var e=c.video.bitrate;if(c.audio&&"number"==typeof c.audio.bitrate&&(e+=c.audio.bitrate),e!==c.totalBitrate)return c.totalBitrate=e,{video_source_bitrate:e,video_source_height:c.video.height,video_source_width:c.video.width,video_source_codec:eb(c.video.codec)}}},p=function(e,t,n){if("number"!=typeof e.newQuality){r.warn("missing evt.newQuality in qualityChangeRendered event",e);return}var s=e.mediaType;if("audio"===s||"video"===s){var o=i.getBitrateInfoListFor(s).find(function(t){return t.qualityIndex===e.newQuality});if(!(o&&"number"==typeof o.bitrate)){r.warn("missing bitrate info for ".concat(s));return}c[s]=el(eo({},o),{codec:i.getCurrentTrackFor(s).codec});var l=h();l&&a("renditionchange",l)}};i.on("qualityChangeRendered",p);var m=function(e){var t=e.request,i=e.mediaType;a("requestcanceled",{request_event_type:(t=t||{}).type+"_"+t.action,request_url:t.url,request_type:i,request_hostname:ei(t.url)})};i.on("fragmentLoadingAbandoned",m);var f=function(e){var t,i,r=e.error,n=(null==r||null===(t=r.data)||void 0===t?void 0:t.request)||{},s=(null==r||null===(i=r.data)||void 0===i?void 0:i.response)||{};(null==r?void 0:r.code)===27&&a("requestfailed",{request_error:n.type+"_"+n.action,request_url:n.url,request_hostname:ei(n.url),request_type:n.mediaType,request_error_code:s.status,request_error_text:s.statusText});var o="".concat(null!=n&&n.url?"url: ".concat(n.url,"\n"):"")+"".concat(null!=s&&s.status||null!=s&&s.statusText?"response: ".concat(null==s?void 0:s.status,", ").concat(null==s?void 0:s.statusText,"\n"):"");a("error",{player_error_code:null==r?void 0:r.code,player_error_message:null==r?void 0:r.message,player_error_context:o})};i.on("error",f),i._stopMuxMonitor=function(){i.off("manifestLoaded",s),i.off("initFragmentLoaded",u),i.off("mediaFragmentLoaded",d),i.off("qualityChangeRendered",p),i.off("error",f),i.off("fragmentLoadingAbandoned",m),delete i._stopMuxMonitor}},eE=function(e){e&&"function"==typeof e._stopMuxMonitor&&e._stopMuxMonitor()},ex=0,ek=function(){function e(){Q(this,e),$(this,"_listeners",void 0)}return Z(e,[{key:"on",value:function(e,t,i){return t._eventEmitterGuid=t._eventEmitterGuid||++ex,this._listeners=this._listeners||{},this._listeners[e]=this._listeners[e]||[],i&&(t=t.bind(i)),this._listeners[e].push(t),t}},{key:"off",value:function(e,t){var i=this._listeners&&this._listeners[e];i&&i.forEach(function(e,r){e._eventEmitterGuid===t._eventEmitterGuid&&i.splice(r,1)})}},{key:"one",value:function(e,t,i){var r=this;t._eventEmitterGuid=t._eventEmitterGuid||++ex;var n=function(){r.off(e,n),t.apply(i||this,arguments)};n._eventEmitterGuid=t._eventEmitterGuid,this.on(e,n)}},{key:"emit",value:function(e,t){var i=this;if(this._listeners){t=t||{};var r=this._listeners["before*"]||[],n=this._listeners[e]||[],a=this._listeners["after"+e]||[],s=function(t,r){(t=t.slice()).forEach(function(t){t.call(i,{type:e},r)})};s(r,t),s(n,t),s(a,t)}}}]),e}(),eP=m(f()),eA=function(){function e(t){var i=this;Q(this,e),$(this,"_playbackHeartbeatInterval",void 0),$(this,"_playheadShouldBeProgressing",void 0),$(this,"pm",void 0),this.pm=t,this._playbackHeartbeatInterval=null,this._playheadShouldBeProgressing=!1,t.on("playing",function(){i._playheadShouldBeProgressing=!0}),t.on("play",this._startPlaybackHeartbeatInterval.bind(this)),t.on("playing",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adbreakstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplay",this._startPlaybackHeartbeatInterval.bind(this)),t.on("adplaying",this._startPlaybackHeartbeatInterval.bind(this)),t.on("devicewake",this._startPlaybackHeartbeatInterval.bind(this)),t.on("viewstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("rebufferstart",this._startPlaybackHeartbeatInterval.bind(this)),t.on("pause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("ended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("viewend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("error",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("aderror",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adpause",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adended",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("adbreakend",this._stopPlaybackHeartbeatInterval.bind(this)),t.on("seeked",function(){t.data.player_is_paused?i._stopPlaybackHeartbeatInterval():i._startPlaybackHeartbeatInterval()}),t.on("timeupdate",function(){null!==i._playbackHeartbeatInterval&&t.emit("playbackheartbeat")}),t.on("devicesleep",function(e,r){null!==i._playbackHeartbeatInterval&&(eP.default.clearInterval(i._playbackHeartbeatInterval),t.emit("playbackheartbeatend",{viewer_time:r.viewer_time}),i._playbackHeartbeatInterval=null)})}return Z(e,[{key:"_startPlaybackHeartbeatInterval",value:function(){var e=this;null===this._playbackHeartbeatInterval&&(this.pm.emit("playbackheartbeat"),this._playbackHeartbeatInterval=eP.default.setInterval(function(){e.pm.emit("playbackheartbeat")},this.pm.playbackHeartbeatTime))}},{key:"_stopPlaybackHeartbeatInterval",value:function(){this._playheadShouldBeProgressing=!1,null!==this._playbackHeartbeatInterval&&(eP.default.clearInterval(this._playbackHeartbeatInterval),this.pm.emit("playbackheartbeatend"),this._playbackHeartbeatInterval=null)}}]),e}(),eS=function e(t){var i=this;Q(this,e),$(this,"viewErrored",void 0),t.on("viewinit",function(){i.viewErrored=!1}),t.on("error",function(e,r){try{var n=t.errorTranslator({player_error_code:r.player_error_code,player_error_message:r.player_error_message,player_error_context:r.player_error_context,player_error_severity:r.player_error_severity,player_error_business_exception:r.player_error_business_exception});n&&(t.data.player_error_code=n.player_error_code||r.player_error_code,t.data.player_error_message=n.player_error_message||r.player_error_message,t.data.player_error_context=n.player_error_context||r.player_error_context,t.data.player_error_severity=n.player_error_severity||r.player_error_severity,t.data.player_error_business_exception=n.player_error_business_exception||r.player_error_business_exception,i.viewErrored=!0)}catch(e){t.mux.log.warn("Exception in error translator callback.",e),i.viewErrored=!0}}),t.on("aftererror",function(){var e,i,r,n,a;null===(e=t.data)||void 0===e||delete e.player_error_code,null===(i=t.data)||void 0===i||delete i.player_error_message,null===(r=t.data)||void 0===r||delete r.player_error_context,null===(n=t.data)||void 0===n||delete n.player_error_severity,null===(a=t.data)||void 0===a||delete a.player_error_business_exception})},eD=function(){function e(t){Q(this,e),$(this,"_watchTimeTrackerLastCheckedTime",void 0),$(this,"pm",void 0),this.pm=t,this._watchTimeTrackerLastCheckedTime=null,t.on("playbackheartbeat",this._updateWatchTime.bind(this)),t.on("playbackheartbeatend",this._clearWatchTimeState.bind(this))}return Z(e,[{key:"_updateWatchTime",value:function(e,t){var i=t.viewer_time;null===this._watchTimeTrackerLastCheckedTime&&(this._watchTimeTrackerLastCheckedTime=i),es(this.pm.data,"view_watch_time",i-this._watchTimeTrackerLastCheckedTime),this._watchTimeTrackerLastCheckedTime=i}},{key:"_clearWatchTimeState",value:function(e,t){this._updateWatchTime(e,t),this._watchTimeTrackerLastCheckedTime=null}}]),e}(),eR=function(){function e(t){var i=this;Q(this,e),$(this,"_playbackTimeTrackerLastPlayheadPosition",void 0),$(this,"_lastTime",void 0),$(this,"_isAdPlaying",void 0),$(this,"_callbackUpdatePlaybackTime",void 0),$(this,"pm",void 0),this.pm=t,this._playbackTimeTrackerLastPlayheadPosition=-1,this._lastTime=Y.now(),this._isAdPlaying=!1,this._callbackUpdatePlaybackTime=null;var r=this._startPlaybackTimeTracking.bind(this);t.on("playing",r),t.on("adplaying",r),t.on("seeked",r);var n=this._stopPlaybackTimeTracking.bind(this);t.on("playbackheartbeatend",n),t.on("seeking",n),t.on("adplaying",function(){i._isAdPlaying=!0}),t.on("adended",function(){i._isAdPlaying=!1}),t.on("adpause",function(){i._isAdPlaying=!1}),t.on("adbreakstart",function(){i._isAdPlaying=!1}),t.on("adbreakend",function(){i._isAdPlaying=!1}),t.on("adplay",function(){i._isAdPlaying=!1}),t.on("viewinit",function(){i._playbackTimeTrackerLastPlayheadPosition=-1,i._lastTime=Y.now(),i._isAdPlaying=!1,i._callbackUpdatePlaybackTime=null})}return Z(e,[{key:"_startPlaybackTimeTracking",value:function(){null===this._callbackUpdatePlaybackTime&&(this._callbackUpdatePlaybackTime=this._updatePlaybackTime.bind(this),this._playbackTimeTrackerLastPlayheadPosition=this.pm.data.player_playhead_time,this.pm.on("playbackheartbeat",this._callbackUpdatePlaybackTime))}},{key:"_stopPlaybackTimeTracking",value:function(){this._callbackUpdatePlaybackTime&&(this._updatePlaybackTime(),this.pm.off("playbackheartbeat",this._callbackUpdatePlaybackTime),this._callbackUpdatePlaybackTime=null,this._playbackTimeTrackerLastPlayheadPosition=-1)}},{key:"_updatePlaybackTime",value:function(){var e=this.pm.data.player_playhead_time,t=Y.now(),i=-1;this._playbackTimeTrackerLastPlayheadPosition>=0&&e>this._playbackTimeTrackerLastPlayheadPosition?i=e-this._playbackTimeTrackerLastPlayheadPosition:this._isAdPlaying&&(i=t-this._lastTime),i>0&&i<=1e3&&es(this.pm.data,"view_content_playback_time",i),this._playbackTimeTrackerLastPlayheadPosition=e,this._lastTime=t}}]),e}(),eO=function(){function e(t){Q(this,e),$(this,"pm",void 0),this.pm=t;var i=this._updatePlayheadTime.bind(this);t.on("playbackheartbeat",i),t.on("playbackheartbeatend",i),t.on("timeupdate",i),t.on("destroy",function(){t.off("timeupdate",i)})}return Z(e,[{key:"_updateMaxPlayheadPosition",value:function(){this.pm.data.view_max_playhead_position=void 0===this.pm.data.view_max_playhead_position?this.pm.data.player_playhead_time:Math.max(this.pm.data.view_max_playhead_position,this.pm.data.player_playhead_time)}},{key:"_updatePlayheadTime",value:function(e,t){var i=this,r=function(){i.pm.currentFragmentPDT&&i.pm.currentFragmentStart&&(i.pm.data.player_program_time=i.pm.currentFragmentPDT+i.pm.data.player_playhead_time-i.pm.currentFragmentStart)};if(t&&t.player_playhead_time)this.pm.data.player_playhead_time=t.player_playhead_time,r(),this._updateMaxPlayheadPosition();else if(this.pm.getPlayheadTime){var n=this.pm.getPlayheadTime();void 0!==n&&(this.pm.data.player_playhead_time=n,r(),this._updateMaxPlayheadPosition())}}}]),e}(),eC=function e(t){if(Q(this,e),!t.disableRebufferTracking){var i,r=function(e,t){n(t),i=void 0},n=function(e){if(i){var r=e.viewer_time-i;es(t.data,"view_rebuffer_duration",r),i=e.viewer_time,t.data.view_rebuffer_duration>3e5&&(t.emit("viewend"),t.send("viewend"),t.mux.log.warn("Ending view after rebuffering for longer than ".concat(3e5,"ms, future events will be ignored unless a programchange or videochange occurs.")))}t.data.view_watch_time>=0&&t.data.view_rebuffer_count>0&&(t.data.view_rebuffer_frequency=t.data.view_rebuffer_count/t.data.view_watch_time,t.data.view_rebuffer_percentage=t.data.view_rebuffer_duration/t.data.view_watch_time)};t.on("playbackheartbeat",function(e,t){return n(t)}),t.on("rebufferstart",function(e,n){i||(es(t.data,"view_rebuffer_count",1),i=n.viewer_time,t.one("rebufferend",r))}),t.on("viewinit",function(){i=void 0,t.off("rebufferend",r)})}},eL=function(){function e(t){var i=this;Q(this,e),$(this,"_lastCheckedTime",void 0),$(this,"_lastPlayheadTime",void 0),$(this,"_lastPlayheadTimeUpdatedTime",void 0),$(this,"_rebuffering",void 0),$(this,"pm",void 0),this.pm=t,t.disableRebufferTracking||t.disablePlayheadRebufferTracking||(this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null,t.on("playbackheartbeat",this._checkIfRebuffering.bind(this)),t.on("playbackheartbeatend",this._cleanupRebufferTracker.bind(this)),t.on("seeking",function(){i._cleanupRebufferTracker(null,{viewer_time:Y.now()})}))}return Z(e,[{key:"_checkIfRebuffering",value:function(e,t){if(this.pm.seekingTracker.isSeeking||this.pm.adTracker.isAdBreak||!this.pm.playbackHeartbeat._playheadShouldBeProgressing){this._cleanupRebufferTracker(e,t);return}if(null===this._lastCheckedTime){this._prepareRebufferTrackerState(t.viewer_time);return}if(this._lastPlayheadTime!==this.pm.data.player_playhead_time){this._cleanupRebufferTracker(e,t,!0);return}var i=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.sustainedRebufferThreshold&&i>=this.pm.sustainedRebufferThreshold&&(this._rebuffering||(this._rebuffering=!0,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}))),this._lastCheckedTime=t.viewer_time}},{key:"_clearRebufferTrackerState",value:function(){this._lastCheckedTime=null,this._lastPlayheadTime=null,this._lastPlayheadTimeUpdatedTime=null}},{key:"_prepareRebufferTrackerState",value:function(e){this._lastCheckedTime=e,this._lastPlayheadTime=this.pm.data.player_playhead_time,this._lastPlayheadTimeUpdatedTime=e}},{key:"_cleanupRebufferTracker",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this._rebuffering)this._rebuffering=!1,this.pm.emit("rebufferend",{viewer_time:t.viewer_time});else{if(null===this._lastCheckedTime)return;var r=this.pm.data.player_playhead_time-this._lastPlayheadTime,n=t.viewer_time-this._lastPlayheadTimeUpdatedTime;"number"==typeof this.pm.minimumRebufferDuration&&r>0&&n-r>this.pm.minimumRebufferDuration&&(this._lastCheckedTime=null,this.pm.emit("rebufferstart",{viewer_time:this._lastPlayheadTimeUpdatedTime}),this.pm.emit("rebufferend",{viewer_time:this._lastPlayheadTimeUpdatedTime+n-r}))}i?this._prepareRebufferTrackerState(t.viewer_time):this._clearRebufferTrackerState()}}]),e}(),eN=function(){function e(t){var i=this;Q(this,e),$(this,"NAVIGATION_START",void 0),$(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){var e=t.data,r=e.view_id;if(!e.view_program_changed){var n=function(e,n){var a=n.viewer_time;"playing"===e.type&&void 0===t.data.view_time_to_first_frame?i.calculateTimeToFirstFrame(a||Y.now(),r):"adplaying"===e.type&&(void 0===t.data.view_time_to_first_frame||i._inPrerollPosition())&&i.calculateTimeToFirstFrame(a||Y.now(),r)};t.one("playing",n),t.one("adplaying",n),t.one("viewend",function(){t.off("playing",n),t.off("adplaying",n)})}})}return Z(e,[{key:"_inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"calculateTimeToFirstFrame",value:function(e,t){t===this.pm.data.view_id&&(this.pm.watchTimeTracker._updateWatchTime(null,{viewer_time:e}),this.pm.data.view_time_to_first_frame=this.pm.data.view_watch_time,(this.pm.data.player_autoplay_on||this.pm.data.video_is_autoplay)&&this.NAVIGATION_START&&(this.pm.data.view_aggregate_startup_time=this.pm.data.view_start+this.pm.data.view_watch_time-this.NAVIGATION_START))}}]),e}(),eM=function e(t){var i=this;Q(this,e),$(this,"_lastPlayerHeight",void 0),$(this,"_lastPlayerWidth",void 0),$(this,"_lastPlayheadPosition",void 0),$(this,"_lastSourceHeight",void 0),$(this,"_lastSourceWidth",void 0),t.on("viewinit",function(){i._lastPlayheadPosition=-1}),["pause","rebufferstart","seeking","error","adbreakstart","hb"].forEach(function(e){t.on(e,function(){if(i._lastPlayheadPosition>=0&&t.data.player_playhead_time>=0&&i._lastPlayerWidth>=0&&i._lastSourceWidth>0&&i._lastPlayerHeight>=0&&i._lastSourceHeight>0){var e=t.data.player_playhead_time-i._lastPlayheadPosition;if(e<0){i._lastPlayheadPosition=-1;return}var r=Math.min(i._lastPlayerWidth/i._lastSourceWidth,i._lastPlayerHeight/i._lastSourceHeight),n=Math.max(0,r-1),a=Math.max(0,1-r);t.data.view_max_upscale_percentage=Math.max(t.data.view_max_upscale_percentage||0,n),t.data.view_max_downscale_percentage=Math.max(t.data.view_max_downscale_percentage||0,a),es(t.data,"view_total_content_playback_time",e),es(t.data,"view_total_upscaling",n*e),es(t.data,"view_total_downscaling",a*e)}i._lastPlayheadPosition=-1})}),["playing","hb"].forEach(function(e){t.on(e,function(){i._lastPlayheadPosition=t.data.player_playhead_time,i._lastPlayerWidth=t.data.player_width,i._lastPlayerHeight=t.data.player_height,i._lastSourceWidth=t.data.video_source_width,i._lastSourceHeight=t.data.video_source_height})})},eI=function e(t){var i=this;Q(this,e),$(this,"isSeeking",void 0),this.isSeeking=!1;var r=-1,n=function(){var e=Y.now(),n=(t.data.viewer_time||e)-(r||e);es(t.data,"view_seek_duration",n),t.data.view_max_seek_time=Math.max(t.data.view_max_seek_time||0,n),i.isSeeking=!1,r=-1};t.on("seeking",function(e,a){if(Object.assign(t.data,a),i.isSeeking&&a.viewer_time-r<=2e3){r=a.viewer_time;return}i.isSeeking&&n(),i.isSeeking=!0,r=a.viewer_time,es(t.data,"view_seek_count",1),t.send("seeking")}),t.on("seeked",function(){n()}),t.on("viewend",function(){i.isSeeking&&(n(),t.send("seeked")),i.isSeeking=!1,r=-1})},eV=function(e,t){e.push(t),e.sort(function(e,t){return e.viewer_time-t.viewer_time})},eq=["adbreakstart","adrequest","adresponse","adplay","adplaying","adpause","adended","adbreakend","aderror","adclicked","adskipped"],ej=function(){function e(t){var i=this;Q(this,e),$(this,"_adHasPlayed",void 0),$(this,"_adRequests",void 0),$(this,"_adResponses",void 0),$(this,"_currentAdRequestNumber",void 0),$(this,"_currentAdResponseNumber",void 0),$(this,"_prerollPlayTime",void 0),$(this,"_wouldBeNewAdPlay",void 0),$(this,"isAdBreak",void 0),$(this,"pm",void 0),this.pm=t,t.on("viewinit",function(){i.isAdBreak=!1,i._currentAdRequestNumber=0,i._currentAdResponseNumber=0,i._adRequests=[],i._adResponses=[],i._adHasPlayed=!1,i._wouldBeNewAdPlay=!0,i._prerollPlayTime=void 0}),eq.forEach(function(e){return t.on(e,i._updateAdData.bind(i))});var r=function(){i.isAdBreak=!1};t.on("adbreakstart",function(){i.isAdBreak=!0}),t.on("play",r),t.on("playing",r),t.on("viewend",r),t.on("adrequest",function(e,r){r=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdRequestNumber++},r),eV(i._adRequests,r),es(t.data,"view_ad_request_count"),i.inPrerollPosition()&&(t.data.view_preroll_requested=!0,i._adHasPlayed||es(t.data,"view_preroll_request_count"))}),t.on("adresponse",function(e,r){r=Object.assign({ad_request_id:"generatedAdRequestId"+i._currentAdResponseNumber++},r),eV(i._adResponses,r);var n=i.findAdRequest(r.ad_request_id);n&&es(t.data,"view_ad_request_time",Math.max(0,r.viewer_time-n.viewer_time))}),t.on("adplay",function(e,r){i._adHasPlayed=!0,i._wouldBeNewAdPlay&&(i._wouldBeNewAdPlay=!1,es(t.data,"view_ad_played_count")),i.inPrerollPosition()&&!t.data.view_preroll_played&&(t.data.view_preroll_played=!0,i._adRequests.length>0&&(t.data.view_preroll_request_time=Math.max(0,r.viewer_time-i._adRequests[0].viewer_time)),t.data.view_start&&(t.data.view_startup_preroll_request_time=Math.max(0,r.viewer_time-t.data.view_start)),i._prerollPlayTime=r.viewer_time)}),t.on("adplaying",function(e,r){i.inPrerollPosition()&&void 0===t.data.view_preroll_load_time&&void 0!==i._prerollPlayTime&&(t.data.view_preroll_load_time=r.viewer_time-i._prerollPlayTime,t.data.view_startup_preroll_load_time=r.viewer_time-i._prerollPlayTime)}),t.on("adclicked",function(e,r){i._wouldBeNewAdPlay||es(t.data,"view_ad_clicked_count")}),t.on("adskipped",function(e,r){i._wouldBeNewAdPlay||es(t.data,"view_ad_skipped_count")}),t.on("adended",function(){i._wouldBeNewAdPlay=!0}),t.on("aderror",function(){i._wouldBeNewAdPlay=!0})}return Z(e,[{key:"inPrerollPosition",value:function(){return void 0===this.pm.data.view_content_playback_time||this.pm.data.view_content_playback_time<=1e3}},{key:"findAdRequest",value:function(e){for(var t=0;t<this._adRequests.length;t++)if(this._adRequests[t].ad_request_id===e)return this._adRequests[t]}},{key:"_updateAdData",value:function(e,t){if(this.inPrerollPosition()){if(!this.pm.data.view_preroll_ad_tag_hostname&&t.ad_tag_url){var i=I(er(t.ad_tag_url),2),r=i[0],n=i[1];this.pm.data.view_preroll_ad_tag_domain=n,this.pm.data.view_preroll_ad_tag_hostname=r}if(!this.pm.data.view_preroll_ad_asset_hostname&&t.ad_asset_url){var a=I(er(t.ad_asset_url),2),s=a[0],o=a[1];this.pm.data.view_preroll_ad_asset_domain=o,this.pm.data.view_preroll_ad_asset_hostname=s}}this.pm.data.ad_asset_url=null==t?void 0:t.ad_asset_url,this.pm.data.ad_tag_url=null==t?void 0:t.ad_tag_url,this.pm.data.ad_creative_id=null==t?void 0:t.ad_creative_id,this.pm.data.ad_id=null==t?void 0:t.ad_id,this.pm.data.ad_universal_id=null==t?void 0:t.ad_universal_id}}]),e}(),eF=m(f()),eB=function e(t){Q(this,e);var i,r,n=function(){t.disableRebufferTracking||(es(t.data,"view_waiting_rebuffer_count",1),i=Y.now(),r=eF.default.setInterval(function(){if(i){var e=Y.now();es(t.data,"view_waiting_rebuffer_duration",e-i),i=e}},250))},a=function(){t.disableRebufferTracking||i&&(es(t.data,"view_waiting_rebuffer_duration",Y.now()-i),i=!1,eF.default.clearInterval(r))},s=!1,o=function(){s=!0},l=function(){s=!1,a()};t.on("waiting",function(){s&&n()}),t.on("playing",function(){a(),o()}),t.on("pause",l),t.on("seeking",l)},eU=function e(t){var i=this;Q(this,e),$(this,"lastWallClockTime",void 0);var r=function(){i.lastWallClockTime=Y.now(),t.on("before*",n)},n=function(e){var r=Y.now(),n=i.lastWallClockTime;i.lastWallClockTime=r,r-n>3e4&&(t.emit("devicesleep",{viewer_time:n}),Object.assign(t.data,{viewer_time:n}),t.send("devicesleep"),t.emit("devicewake",{viewer_time:r}),Object.assign(t.data,{viewer_time:r}),t.send("devicewake"))};t.one("playbackheartbeat",r),t.on("playbackheartbeatend",function(){t.off("before*",n),t.one("playbackheartbeat",r)})},eH=m(f()),eW=(tl=function(){for(var e=0,t={};e<arguments.length;e++){var i=arguments[e];for(var r in i)t[r]=i[r]}return t},function e(t){function i(e,r,n){var a;if("undefined"!=typeof document){if(arguments.length>1){if("number"==typeof(n=tl({path:"/"},i.defaults,n)).expires){var s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*n.expires),n.expires=s}try{a=JSON.stringify(r),/^[\{\[]/.test(a)&&(r=a)}catch(e){}return r=t.write?t.write(r,e):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",r,n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}e||(a={});for(var o=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,u=0;u<o.length;u++){var d=o[u].split("="),c=d.slice(1).join("=");'"'===c.charAt(0)&&(c=c.slice(1,-1));try{var h=d[0].replace(l,decodeURIComponent);if(c=t.read?t.read(c,h):t(c,h)||c.replace(l,decodeURIComponent),this.json)try{c=JSON.parse(c)}catch(e){}if(e===h){a=c;break}e||(a[h]=c)}catch(e){}}return a}}return i.set=i,i.get=function(e){return i.call(i,e)},i.getJSON=function(){return i.apply({json:!0},[].slice.call(arguments))},i.defaults={},i.remove=function(e,t){i(e,"",tl(t,{expires:-1}))},i.withConverter=e,i}(function(){})),eG="muxData",eK=function(){var e;try{e=(eW.get(eG)||"").split("&").reduce(function(e,t){var i=I(t.split("="),2),r=i[0],n=i[1],a=+n;return e[r]=n&&a==n?a:n,e},{})}catch(t){e={}}return e},ez=function(e){try{eW.set(eG,Object.entries(e).map(function(e){var t=I(e,2),i=t[0],r=t[1];return"".concat(i,"=").concat(r)}).join("&"),{expires:365})}catch(e){}},eY=function(){var e=eK();return e.mux_viewer_id=e.mux_viewer_id||q(),e.msn=e.msn||Math.random(),ez(e),{mux_viewer_id:e.mux_viewer_id,mux_sample_number:e.msn}},eX=function(){var e=eK(),t=Y.now();return e.session_start&&(e.sst=e.session_start,delete e.session_start),e.session_id&&(e.sid=e.session_id,delete e.session_id),e.session_expires&&(e.sex=e.session_expires,delete e.session_expires),(!e.sex||e.sex<t)&&(e.sid=q(),e.sst=t),e.sex=t+15e5,ez(e),{session_id:e.sid,session_start:e.sst,session_expires:e.sex}},eQ=m(f()),eJ=function(){var e;switch(eZ()){case"cellular":e="cellular";break;case"ethernet":e="wired";break;case"wifi":e="wifi";break;case void 0:break;default:e="other"}return e},eZ=function(){var e=eQ.default.navigator,t=e&&(e.connection||e.mozConnection||e.webkitConnection);return t&&t.type};eJ.getConnectionFromAPI=eZ;var e$=e1({a:"env",b:"beacon",c:"custom",d:"ad",e:"event",f:"experiment",i:"internal",m:"mux",n:"response",p:"player",q:"request",r:"retry",s:"session",t:"timestamp",u:"viewer",v:"video",w:"page",x:"view",y:"sub"}),e0=e1({ad:"ad",ag:"aggregate",ap:"api",al:"application",ar:"architecture",as:"asset",au:"autoplay",av:"average",bi:"bitrate",br:"break",bw:"browser",by:"bytes",bz:"business",ca:"cached",cb:"cancel",cc:"codec",cd:"code",cg:"category",ch:"changed",ck:"clicked",cl:"canceled",cn:"config",co:"count",ce:"counter",cp:"complete",cr:"creative",ct:"content",cu:"current",cx:"connection",cz:"context",dg:"downscaling",dm:"domain",dn:"cdn",do:"downscale",dr:"drm",dp:"dropped",du:"duration",dv:"device",ec:"encoding",ed:"edge",en:"end",eg:"engine",em:"embed",er:"error",ep:"experiments",es:"errorcode",et:"errortext",ee:"event",ev:"events",ex:"expires",ez:"exception",fa:"failed",fi:"first",fm:"family",ft:"format",fp:"fps",fq:"frequency",fr:"frame",fs:"fullscreen",ha:"has",hb:"holdback",he:"headers",ho:"host",hn:"hostname",ht:"height",id:"id",ii:"init",in:"instance",ip:"ip",is:"is",ke:"key",la:"language",lb:"labeled",le:"level",li:"live",ld:"loaded",lo:"load",ls:"lists",lt:"latency",ma:"max",md:"media",me:"message",mf:"manifest",mi:"mime",ml:"midroll",mm:"min",mn:"manufacturer",mo:"model",mx:"mux",ne:"newest",nm:"name",no:"number",on:"on",os:"os",pa:"paused",pb:"playback",pd:"producer",pe:"percentage",pf:"played",pg:"program",ph:"playhead",pi:"plugin",pl:"preroll",pn:"playing",po:"poster",pr:"preload",ps:"position",pt:"part",py:"property",ra:"rate",rd:"requested",re:"rebuffer",rf:"rendition",rm:"remote",ro:"ratio",rp:"response",rq:"request",rs:"requests",sa:"sample",sd:"skipped",se:"session",sk:"seek",sm:"stream",so:"source",sq:"sequence",sr:"series",st:"start",su:"startup",sv:"server",sw:"software",sy:"severity",ta:"tag",tc:"tech",te:"text",tg:"target",th:"throughput",ti:"time",tl:"total",to:"to",tt:"title",ty:"type",ug:"upscaling",un:"universal",up:"upscale",ur:"url",us:"user",va:"variant",vd:"viewed",vi:"video",ve:"version",vw:"view",vr:"viewer",wd:"width",wa:"watch",wt:"waiting"});function e1(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[e[i]]=i);return t}function e2(e){var t={},i={};return Object.keys(e).forEach(function(r){var n=!1;if(e.hasOwnProperty(r)&&void 0!==e[r]){var a=r.split("_"),s=a[0],o=e$[s];o||(W.info("Data key word `"+a[0]+"` not expected in "+r),o=s+"_"),a.splice(1).forEach(function(e){"url"===e&&(n=!0),e0[e]?o+=e0[e]:Number(e)&&Math.floor(Number(e))===Number(e)?o+=e:(W.info("Data key word `"+e+"` not expected in "+r),o+="_"+e+"_")}),n?i[o]=e[r]:t[o]=e[r]}}),Object.assign(t,i)}var e3=m(f()),e5={maxBeaconSize:300,maxQueueLength:3600,baseTimeBetweenBeacons:1e4,maxPayloadKBSize:500},e4=["hb","requestcompleted","requestfailed","requestcanceled"],e9=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._beaconUrl=e||"https://img.litix.io",this._eventQueue=[],this._postInFlight=!1,this._failureCount=0,this._sendTimeout=!1,this._options=Object.assign({},e5,t)};e9.prototype.queueEvent=function(e,t){var i=Object.assign({},t);return(this._eventQueue.length<=this._options.maxQueueLength||"eventrateexceeded"===e)&&(this._eventQueue.push(i),this._sendTimeout||this._startBeaconSending(),this._eventQueue.length<=this._options.maxQueueLength)},e9.prototype.flushEvents=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&1===this._eventQueue.length){this._eventQueue.pop();return}this._eventQueue.length&&this._sendBeaconQueue(),this._startBeaconSending()},e9.prototype.destroy=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.destroyed=!0,e?this._clearBeaconQueue():this.flushEvents(),e3.default.clearTimeout(this._sendTimeout)},e9.prototype._clearBeaconQueue=function(){var e=this._eventQueue.length>this._options.maxBeaconSize?this._eventQueue.length-this._options.maxBeaconSize:0,t=this._eventQueue.slice(e);e>0&&Object.assign(t[t.length-1],e2({mux_view_message:"event queue truncated"}));var i=this._createPayload(t);e8(this._beaconUrl,i,!0,function(){})},e9.prototype._sendBeaconQueue=function(){var e=this;if(!this._postInFlight){var t=this._eventQueue.slice(0,this._options.maxBeaconSize);this._eventQueue=this._eventQueue.slice(this._options.maxBeaconSize),this._postInFlight=!0;var i=this._createPayload(t),r=Y.now();e8(this._beaconUrl,i,!1,function(i,n){n?(e._eventQueue=t.concat(e._eventQueue),e._failureCount+=1,W.info("Error sending beacon: "+n)):e._failureCount=0,e._roundTripTime=Y.now()-r,e._postInFlight=!1})}},e9.prototype._getNextBeaconTime=function(){if(!this._failureCount)return this._options.baseTimeBetweenBeacons;var e=Math.pow(2,this._failureCount-1);return(1+(e*=Math.random()))*this._options.baseTimeBetweenBeacons},e9.prototype._startBeaconSending=function(){var e=this;e3.default.clearTimeout(this._sendTimeout),this.destroyed||(this._sendTimeout=e3.default.setTimeout(function(){e._eventQueue.length&&e._sendBeaconQueue(),e._startBeaconSending()},this._getNextBeaconTime()))},e9.prototype._createPayload=function(e){var t=this,i={transmission_timestamp:Math.round(Y.now())};this._roundTripTime&&(i.rtt_ms=Math.round(this._roundTripTime));var r,n,a,s=function(){a=(r=JSON.stringify({metadata:i,events:n||e})).length/1024},o=function(){return a<=t._options.maxPayloadKBSize};return s(),o()||(W.info("Payload size is too big ("+a+" kb). Removing unnecessary events."),n=e.filter(function(e){return -1===e4.indexOf(e.e)}),s()),o()||(W.info("Payload size still too big ("+a+" kb). Cropping fields.."),n.forEach(function(e){for(var t in e){var i=e[t];"string"==typeof i&&i.length>51200&&(e[t]=i.substring(0,51200))}}),s()),r};var e8=function(e,t,i,r){if(i&&navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,t)){r();return}if(e3.default.fetch){e3.default.fetch(e,{method:"POST",body:t,headers:{"Content-Type":"text/plain"},keepalive:t.length<=57344}).then(function(e){return r(null,e.ok?null:"Error")}).catch(function(e){return r(null,e)});return}if(e3.default.XMLHttpRequest){var n=new e3.default.XMLHttpRequest;n.onreadystatechange=function(){if(4===n.readyState)return r(null,200!==n.status?"error":void 0)},n.open("POST",e),n.setRequestHeader("Content-Type","text/plain"),n.send(t);return}r()},e6=["env_key","view_id","view_sequence_number","player_sequence_number","beacon_domain","player_playhead_time","viewer_time","mux_api_version","event","video_id","player_instance_id","player_error_code","player_error_message","player_error_context","player_error_severity","player_error_business_exception"],e7=["adplay","adplaying","adpause","adfirstquartile","admidpoint","adthirdquartile","adended","adresponse","adrequest"],te=["ad_id","ad_creative_id","ad_universal_id"],tt=["viewstart","error","ended","viewend"],ti=function(){function e(t,i){var r,n,a,s,o,l,u,d,c,h,p,m,f,v,y,g,b,T,w,E=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Q(this,e),$(this,"mux",void 0),$(this,"envKey",void 0),$(this,"options",void 0),$(this,"eventQueue",void 0),$(this,"sampleRate",void 0),$(this,"disableCookies",void 0),$(this,"respectDoNotTrack",void 0),$(this,"previousBeaconData",void 0),$(this,"lastEventTime",void 0),$(this,"rateLimited",void 0),$(this,"pageLevelData",void 0),$(this,"viewerData",void 0),this.mux=t,this.envKey=i,this.options=E,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.eventQueue=new e9((r=this.envKey,a=(n=this.options).beaconCollectionDomain,s=n.beaconDomain,a?"https://"+a:(r=r||"inferred").match(/^[a-z0-9]+$/)?"https://"+r+"."+(s||"litix.io"):"https://img.litix.io/a.gif")),this.sampleRate=null!==(b=this.options.sampleRate)&&void 0!==b?b:1,this.disableCookies=null!==(T=this.options.disableCookies)&&void 0!==T&&T,this.respectDoNotTrack=null!==(w=this.options.respectDoNotTrack)&&void 0!==w&&w,this.previousBeaconData=null,this.lastEventTime=0,this.rateLimited=!1,this.pageLevelData={mux_api_version:this.mux.API_VERSION,mux_embed:this.mux.NAME,mux_embed_version:this.mux.VERSION,viewer_application_name:null===(o=this.options.platform)||void 0===o?void 0:o.name,viewer_application_version:null===(l=this.options.platform)||void 0===l?void 0:l.version,viewer_application_engine:null===(u=this.options.platform)||void 0===u?void 0:u.layout,viewer_device_name:null===(d=this.options.platform)||void 0===d?void 0:d.product,viewer_device_category:"",viewer_device_manufacturer:null===(c=this.options.platform)||void 0===c?void 0:c.manufacturer,viewer_os_family:null===(p=this.options.platform)||void 0===p||null===(h=p.os)||void 0===h?void 0:h.family,viewer_os_architecture:null===(f=this.options.platform)||void 0===f||null===(m=f.os)||void 0===m?void 0:m.architecture,viewer_os_version:null===(y=this.options.platform)||void 0===y||null===(v=y.os)||void 0===v?void 0:v.version,viewer_connection_type:eJ(),page_url:null===eH.default||void 0===eH.default||null===(g=eH.default.location)||void 0===g?void 0:g.href},this.viewerData=this.disableCookies?{}:eY()}return Z(e,[{key:"send",value:function(e,t){if(!(!e||!(null!=t&&t.view_id))){if(this.respectDoNotTrack&&K())return W.info("Not sending `"+e+"` because Do Not Track is enabled");if(!t||"object"!=typeof t)return W.error("A data object was expected in send() but was not provided");var i=this.disableCookies?{}:eX(),r=el(eo({},this.pageLevelData,t,i,this.viewerData),{event:e,env_key:this.envKey});r.user_id&&(r.viewer_user_id=r.user_id,delete r.user_id);var n,a=(null!==(n=r.mux_sample_number)&&void 0!==n?n:0)>=this.sampleRate,s=e2(this._deduplicateBeaconData(e,r));if(this.lastEventTime=this.mux.utils.now(),a)return W.info("Not sending event due to sample rate restriction",e,r,s);if(this.envKey||W.info("Missing environment key (envKey) - beacons will be dropped if the video source is not a valid mux video URL",e,r,s),!this.rateLimited){if(W.info("Sending event",e,r,s),this.rateLimited=!this.eventQueue.queueEvent(e,s),this.mux.WINDOW_UNLOADING&&"viewend"===e)this.eventQueue.destroy(!0);else if(this.mux.WINDOW_HIDDEN&&"hb"===e?this.eventQueue.flushEvents(!0):tt.indexOf(e)>=0&&this.eventQueue.flushEvents(),this.rateLimited)return r.event="eventrateexceeded",s=e2(r),this.eventQueue.queueEvent(r.event,s),W.error("Beaconing disabled due to rate limit.")}}}},{key:"destroy",value:function(){this.eventQueue.destroy(!1)}},{key:"_deduplicateBeaconData",value:function(e,t){var i=this,r={},n=t.view_id;if("-1"===n||"viewstart"===e||"viewend"===e||!this.previousBeaconData||this.mux.utils.now()-this.lastEventTime>=6e5)r=eo({},t),n&&(this.previousBeaconData=r),n&&"viewend"===e&&(this.previousBeaconData=null);else{var a=0===e.indexOf("request");Object.entries(t).forEach(function(t){var n=I(t,2),s=n[0],o=n[1];i.previousBeaconData&&(o!==i.previousBeaconData[s]||e6.indexOf(s)>-1||i.objectHasChanged(a,s,o,i.previousBeaconData[s])||i.eventRequiresKey(e,s))&&(r[s]=o,i.previousBeaconData[s]=o)})}return r}},{key:"objectHasChanged",value:function(e,t,i,r){return!!e&&0===t.indexOf("request_")&&("request_response_headers"===t||"object"!=typeof i||"object"!=typeof r||Object.keys(i||{}).length!==Object.keys(r||{}).length)}},{key:"eventRequiresKey",value:function(e,t){return!!("renditionchange"===e&&0===t.indexOf("video_source_")||te.includes(t)&&e7.includes(e))}}]),e}(),tr=function e(t){Q(this,e);var i=0,r=0,n=0,a=0,s=0,o=0,l=0;t.on("requestcompleted",function(e,o){var l,u,d=o.request_start,c=o.request_response_start,h=o.request_response_end,p=o.request_bytes_loaded;if(a++,c?(l=c-(null!=d?d:0),u=(null!=h?h:0)-c):u=(null!=h?h:0)-(null!=d?d:0),u>0&&p&&p>0){var m=p/u*8e3;s++,r+=p,n+=u,t.data.view_min_request_throughput=Math.min(t.data.view_min_request_throughput||1/0,m),t.data.view_average_request_throughput=r/n*8e3,t.data.view_request_count=a,l>0&&(i+=l,t.data.view_max_request_latency=Math.max(t.data.view_max_request_latency||0,l),t.data.view_average_request_latency=i/s)}}),t.on("requestfailed",function(e,i){a++,o++,t.data.view_request_count=a,t.data.view_request_failed_count=o}),t.on("requestcanceled",function(e,i){a++,l++,t.data.view_request_count=a,t.data.view_request_canceled_count=l})},tn=function e(t){var i=this;Q(this,e),$(this,"_lastEventTime",void 0),t.on("before*",function(e,r){var n=r.viewer_time,a=Y.now(),s=i._lastEventTime;if(i._lastEventTime=a,s&&a-s>36e5){var o=Object.keys(t.data).reduce(function(e,i){return 0===i.indexOf("video_")?Object.assign(e,$({},i,t.data[i])):e},{});t.mux.log.info("Received event after at least an hour inactivity, creating a new view"),t.emit("viewinit",Object.assign({viewer_time:n},o)),t.playbackHeartbeat._playheadShouldBeProgressing&&"play"!==e.type&&"adbreakstart"!==e.type&&(t.emit("play",{viewer_time:n}),"playing"!==e.type&&t.emit("playing",{viewer_time:n}))}})},ta=["viewstart","ended","loadstart","pause","play","playing","ratechange","waiting","adplay","adpause","adended","aderror","adplaying","adrequest","adresponse","adbreakstart","adbreakend","adfirstquartile","admidpoint","adthirdquartile","rebufferstart","rebufferend","seeked","error","hb","requestcompleted","requestfailed","requestcanceled","renditionchange"],ts=new Set(["requestcompleted","requestfailed","requestcanceled"]),to=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ee(e,t)}(r,e);var t,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,i,n=et(r);if(t){var a=et(this).constructor;i=Reflect.construct(n,arguments,a)}else i=n.apply(this,arguments);return(e=i)&&("object"===g(e)||"function"==typeof e)?e:X(this)});function r(e,t,n){Q(this,r),$(X(a=i.call(this)),"DOM_CONTENT_LOADED_EVENT_END",void 0),$(X(a),"NAVIGATION_START",void 0),$(X(a),"_destroyed",void 0),$(X(a),"_heartBeatTimeout",void 0),$(X(a),"adTracker",void 0),$(X(a),"dashjs",void 0),$(X(a),"data",void 0),$(X(a),"disablePlayheadRebufferTracking",void 0),$(X(a),"disableRebufferTracking",void 0),$(X(a),"errorTracker",void 0),$(X(a),"errorTranslator",void 0),$(X(a),"getAdData",void 0),$(X(a),"getPlayheadTime",void 0),$(X(a),"getStateData",void 0),$(X(a),"hlsjs",void 0),$(X(a),"id",void 0),$(X(a),"longResumeTracker",void 0),$(X(a),"minimumRebufferDuration",void 0),$(X(a),"mux",void 0),$(X(a),"oldEmit",void 0),$(X(a),"playbackEventDispatcher",void 0),$(X(a),"playbackHeartbeat",void 0),$(X(a),"playbackHeartbeatTime",void 0),$(X(a),"playheadTime",void 0),$(X(a),"seekingTracker",void 0),$(X(a),"sustainedRebufferThreshold",void 0),$(X(a),"watchTimeTracker",void 0),$(X(a),"currentFragmentPDT",void 0),$(X(a),"currentFragmentStart",void 0),a.DOM_CONTENT_LOADED_EVENT_END=ea.domContentLoadedEventEnd(),a.NAVIGATION_START=ea.navigationStart(),a.mux=e,a.id=t,null!=n&&n.beaconDomain&&a.mux.log.warn("The `beaconDomain` setting has been deprecated in favor of `beaconCollectionDomain`. Please change your integration to use `beaconCollectionDomain` instead of `beaconDomain`."),(n=Object.assign({debug:!1,minimumRebufferDuration:250,sustainedRebufferThreshold:1e3,playbackHeartbeatTime:25,beaconDomain:"litix.io",sampleRate:1,disableCookies:!1,respectDoNotTrack:!1,disableRebufferTracking:!1,disablePlayheadRebufferTracking:!1,errorTranslator:function(e){return e}},n)).data=n.data||{},n.data.property_key&&(n.data.env_key=n.data.property_key,delete n.data.property_key),W.level=n.debug?H.DEBUG:H.WARN,a.getPlayheadTime=n.getPlayheadTime,a.getStateData=n.getStateData||function(){return{}},a.getAdData=n.getAdData||function(){},a.minimumRebufferDuration=n.minimumRebufferDuration,a.sustainedRebufferThreshold=n.sustainedRebufferThreshold,a.playbackHeartbeatTime=n.playbackHeartbeatTime,a.disableRebufferTracking=n.disableRebufferTracking,a.disableRebufferTracking&&a.mux.log.warn("Disabling rebuffer tracking. This should only be used in specific circumstances as a last resort when your player is known to unreliably track rebuffering."),a.disablePlayheadRebufferTracking=n.disablePlayheadRebufferTracking,a.errorTranslator=n.errorTranslator,a.playbackEventDispatcher=new ti(e,n.data.env_key,n),a.data={player_instance_id:q(),mux_sample_rate:n.sampleRate,beacon_domain:n.beaconCollectionDomain||n.beaconDomain},a.data.view_sequence_number=1,a.data.player_sequence_number=1,a.oldEmit=a.emit,a.emit=function(e,t){t=Object.assign({viewer_time:this.mux.utils.now()},t),this.oldEmit(e,t)};var a,s=(function(){void 0===this.data.view_start&&(this.data.view_start=this.mux.utils.now(),this.emit("viewstart"))}).bind(X(a));a.on("viewinit",function(e,t){this._resetVideoData(),this._resetViewData(),this._resetErrorData(),this._updateStateData(),Object.assign(this.data,t),this._initializeViewData(),this.one("play",s),this.one("adbreakstart",s)});var o=(function(e){this.emit("viewend"),this.send("viewend"),this.emit("viewinit",e)}).bind(X(a));if(a.on("videochange",function(e,t){o(t)}),a.on("programchange",function(e,t){this.data.player_is_paused&&this.mux.log.warn("The `programchange` event is intended to be used when the content changes mid playback without the video source changing, however the video is not currently playing. If the video source is changing please use the videochange event otherwise you will lose startup time information."),o(Object.assign(t,{view_program_changed:!0})),s(),this.emit("play"),this.emit("playing")}),a.on("fragmentchange",function(e,t){this.currentFragmentPDT=t.currentFragmentPDT,this.currentFragmentStart=t.currentFragmentStart}),a.on("destroy",a.destroy),"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var l=function(){var e=void 0!==a.data.view_start;a.mux.WINDOW_HIDDEN="hidden"===document.visibilityState,e&&a.mux.WINDOW_HIDDEN&&(a.data.player_is_paused||a.emit("hb"))};window.addEventListener("visibilitychange",l,!1);var u=function(e){e.persisted||a.destroy()};window.addEventListener("pagehide",u,!1),a.on("destroy",function(){window.removeEventListener("visibilitychange",l),window.removeEventListener("pagehide",u)})}return a.on("playerready",function(e,t){Object.assign(this.data,t)}),ta.forEach(function(e){a.on(e,function(t,i){0!==e.indexOf("ad")&&this._updateStateData(),Object.assign(this.data,i),this._sanitizeData()}),a.on("after"+e,function(){("error"!==e||this.errorTracker.viewErrored)&&this.send(e)})}),a.on("viewend",function(e,t){Object.assign(a.data,t)}),a.one("playerready",function(e){var t=this.mux.utils.now();this.data.player_init_time&&(this.data.player_startup_time=t-this.data.player_init_time),!this.mux.PLAYER_TRACKED&&this.NAVIGATION_START&&(this.mux.PLAYER_TRACKED=!0,(this.data.player_init_time||this.DOM_CONTENT_LOADED_EVENT_END)&&(this.data.page_load_time=Math.min(this.data.player_init_time||1/0,this.DOM_CONTENT_LOADED_EVENT_END||1/0)-this.NAVIGATION_START)),this.send("playerready"),delete this.data.player_startup_time,delete this.data.page_load_time}),a.longResumeTracker=new tn(X(a)),a.errorTracker=new eS(X(a)),new eU(X(a)),a.seekingTracker=new eI(X(a)),a.playheadTime=new eO(X(a)),a.playbackHeartbeat=new eA(X(a)),new eM(X(a)),a.watchTimeTracker=new eD(X(a)),new eR(X(a)),a.adTracker=new ej(X(a)),new eL(X(a)),new eC(X(a)),new eN(X(a)),new eB(X(a)),new tr(X(a)),n.hlsjs&&a.addHLSJS(n),n.dashjs&&a.addDashJS(n),a.emit("viewinit",n.data),a}return Z(r,[{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,void 0!==this.data.view_start&&(this.emit("viewend"),this.send("viewend")),this.playbackEventDispatcher.destroy(),this.removeHLSJS(),this.removeDashJS(),window.clearTimeout(this._heartBeatTimeout))}},{key:"send",value:function(e){if(this.data.view_id){var t=Object.assign({},this.data);if(void 0===t.video_source_is_live&&(t.player_source_duration===1/0||t.video_source_duration===1/0?t.video_source_is_live=!0:(t.player_source_duration>0||t.video_source_duration>0)&&(t.video_source_is_live=!1)),t.video_source_is_live||["player_program_time","player_manifest_newest_program_time","player_live_edge_program_time","player_program_time","video_holdback","video_part_holdback","video_target_duration","video_part_target_duration"].forEach(function(e){t[e]=void 0}),t.video_source_url=t.video_source_url||t.player_source_url,t.video_source_url){var i=I(er(t.video_source_url),2),r=i[0],n=i[1];t.video_source_domain=n,t.video_source_hostname=r}delete t.ad_request_id,this.playbackEventDispatcher.send(e,t),this.data.view_sequence_number++,this.data.player_sequence_number++,ts.has(e)||this._restartHeartBeat(),"viewend"===e&&delete this.data.view_id}}},{key:"_updateStateData",value:function(){Object.assign(this.data,this.getStateData()),this.playheadTime._updatePlayheadTime(),this._sanitizeData()}},{key:"_sanitizeData",value:function(){var e=this;["player_width","player_height","video_source_width","video_source_height","player_playhead_time","video_source_bitrate"].forEach(function(t){var i=parseInt(e.data[t],10);e.data[t]=isNaN(i)?void 0:i}),["player_source_url","video_source_url"].forEach(function(t){if(e.data[t]){var i=e.data[t].toLowerCase();(0===i.indexOf("data:")||0===i.indexOf("blob:"))&&(e.data[t]="MSE style URL")}})}},{key:"_resetVideoData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("video_")&&delete e.data[t]})}},{key:"_resetViewData",value:function(){var e=this;Object.keys(this.data).forEach(function(t){0===t.indexOf("view_")&&delete e.data[t]}),this.data.view_sequence_number=1}},{key:"_resetErrorData",value:function(){delete this.data.player_error_code,delete this.data.player_error_message,delete this.data.player_error_context,delete this.data.player_error_severity,delete this.data.player_error_business_exception}},{key:"_initializeViewData",value:function(){var e=this,t=this.data.view_id=q(),i=function(){t===e.data.view_id&&es(e.data,"player_view_count",1)};this.data.player_is_paused?this.one("play",i):i()}},{key:"_restartHeartBeat",value:function(){var e=this;window.clearTimeout(this._heartBeatTimeout),this._heartBeatTimeout=window.setTimeout(function(){e.data.player_is_paused||e.emit("hb")},1e4)}},{key:"addHLSJS",value:function(e){if(!e.hlsjs){this.mux.log.warn("You must pass a valid hlsjs instance in order to track it.");return}if(this.hlsjs){this.mux.log.warn("An instance of HLS.js is already being monitored for this player.");return}this.hlsjs=e.hlsjs,ev(this.mux,this.id,e.hlsjs,{},e.Hls||window.Hls)}},{key:"removeHLSJS",value:function(){this.hlsjs&&(ey(this.hlsjs),this.hlsjs=void 0)}},{key:"addDashJS",value:function(e){if(!e.dashjs){this.mux.log.warn("You must pass a valid dashjs instance in order to track it.");return}if(this.dashjs){this.mux.log.warn("An instance of Dash.js is already being monitored for this player.");return}this.dashjs=e.dashjs,ew(this.mux,this.id,e.dashjs)}},{key:"removeDashJS",value:function(){this.dashjs&&(eE(this.dashjs),this.dashjs=void 0)}}]),r}(ek);b();var tl,tu,td=m(L()),tc=["loadstart","pause","play","playing","seeking","seeked","timeupdate","ratechange","stalled","waiting","error","ended"],th={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},tp=m(f());tp.default&&tp.default.WeakMap&&(tu=new WeakMap);var tm={TARGET_DURATION:"#EXT-X-TARGETDURATION",PART_INF:"#EXT-X-PART-INF",SERVER_CONTROL:"#EXT-X-SERVER-CONTROL",INF:"#EXTINF",PROGRAM_DATE_TIME:"#EXT-X-PROGRAM-DATE-TIME",VERSION:"#EXT-X-VERSION",SESSION_DATA:"#EXT-X-SESSION-DATA"},tf=function(e){return this.buffer="",this.manifest={segments:[],serverControl:{},sessionData:{}},this.currentUri={},this.process(e),this.manifest};tf.prototype.process=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf("\n");t>-1;t=this.buffer.indexOf("\n"))this.processLine(this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},tf.prototype.processLine=function(e){var t=e.indexOf(":"),i=tw(e,t),r=i[0],n=2===i.length?tg(i[1]):void 0;if("#"!==r[0])this.currentUri.uri=r,this.manifest.segments.push(this.currentUri),!this.manifest.targetDuration||"duration"in this.currentUri||(this.currentUri.duration=this.manifest.targetDuration),this.currentUri={};else switch(r){case tm.TARGET_DURATION:if(!isFinite(n)||n<0)return;this.manifest.targetDuration=n,this.setHoldBack();break;case tm.PART_INF:tv(this.manifest,i),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),this.setHoldBack();break;case tm.SERVER_CONTROL:tv(this.manifest,i),this.setHoldBack();break;case tm.INF:0===n?this.currentUri.duration=.01:n>0&&(this.currentUri.duration=n);break;case tm.PROGRAM_DATE_TIME:var a=new Date(n);this.manifest.dateTimeString||(this.manifest.dateTimeString=n,this.manifest.dateTimeObject=a),this.currentUri.dateTimeString=n,this.currentUri.dateTimeObject=a;break;case tm.VERSION:tv(this.manifest,i);break;case tm.SESSION_DATA:var s=ep(tE(i[1]));Object.assign(this.manifest.sessionData,s)}},tf.prototype.setHoldBack=function(){var e=this.manifest,t=e.serverControl,i=e.targetDuration,r=e.partTargetDuration;if(t){var n="holdBack",a="partHoldBack",s=i&&3*i,o=r&&2*r;i&&!t.hasOwnProperty(n)&&(t[n]=s),s&&t[n]<s&&(t[n]=s),r&&!t.hasOwnProperty(a)&&(t[a]=3*r),r&&t[a]<o&&(t[a]=o)}};var tv=function(e,t){var i,r=ty(t[0].replace("#EXT-X-",""));tT(t[1])?(i={},i=Object.assign(tb(t[1]),i)):i=tg(t[1]),e[r]=i},ty=function(e){return e.toLowerCase().replace(/-(\w)/g,function(e){return e[1].toUpperCase()})},tg=function(e){if("yes"===e.toLowerCase()||"no"===e.toLowerCase())return"yes"===e.toLowerCase();var t=-1!==e.indexOf(":")?e:parseFloat(e);return isNaN(t)?e:t},t_=function(e){var t={},i=e.split("=");return i.length>1&&(t[ty(i[0])]=tg(i[1])),t},tb=function(e){for(var t=e.split(","),i={},r=0;t.length>r;r++)i=Object.assign(t_(t[r]),i);return i},tT=function(e){return e.indexOf("=")>-1},tw=function(e,t){return -1===t?[e]:[e.substring(0,t),e.substring(t+1)]},tE=function(e){var t={};if(e){var i=e.search(",");return[e.slice(0,i),e.slice(i+1)].forEach(function(e,i){for(var r=e.replace(/['"]+/g,"").split("="),n=0;n<r.length;n++)"DATA-ID"===r[n]&&(t["DATA-ID"]=r[1-n]),"VALUE"===r[n]&&(t.VALUE=r[1-n])}),{data:t}}},tx={safeCall:function(e,t,i,r){var n=r;if(e&&"function"==typeof e[t])try{n=e[t].apply(e,i)}catch(e){W.info("safeCall error",e)}return n},safeIncrement:es,getComputedStyle:function(e,t){var i;return e&&t&&tp.default&&"function"==typeof tp.default.getComputedStyle?(tu&&tu.has(e)&&(i=tu.get(e)),i||(i=tp.default.getComputedStyle(e,null),tu&&tu.set(e,i)),i.getPropertyValue(t)):""},secondsToMs:function(e){return Math.floor(1e3*e)},assign:Object.assign,headersStringToObject:ec,cdnHeadersToRequestId:eh,extractHostnameAndDomain:er,extractHostname:ei,manifestParser:tf,generateShortID:j,generateUUID:q,now:Y.now},tk={},tP=function(e){var t=arguments;"string"==typeof e?tP.hasOwnProperty(e)?V.default.setTimeout(function(){t=Array.prototype.splice.call(t,1),tP[e].apply(null,t)},0):W.warn("`"+e+"` is an unknown task"):"function"==typeof e?V.default.setTimeout(function(){e(tP)},0):W.warn("`"+e+"` is invalid.")},tA={loaded:Y.now(),NAME:"mux-embed",VERSION:"5.3.1",API_VERSION:"2.1",PLAYER_TRACKED:!1,monitor:function(e,t){return function(e,t,i){var r=I(B(t),3),n=r[0],a=r[1],s=r[2],o=e.log,l=e.utils.getComputedStyle,u=e.utils.secondsToMs;if(!n)return o.error("No element was found with the `"+a+"` query selector.");if("video"!==s&&"audio"!==s)return o.error("The element of `"+a+"` was not a media element.");n.mux&&(n.mux.destroy(),delete n.mux,o.warn("Already monitoring this video element, replacing existing event listeners")),(i=Object.assign({automaticErrorTracking:!0},i)).data=Object.assign({player_software:"HTML5 Video Element",player_mux_plugin_name:"VideoElementMonitor",player_mux_plugin_version:e.VERSION},i.data),i.getPlayheadTime=function(){return u(n.currentTime)},i.getStateData=function(){var e,t=this.hlsjs&&this.hlsjs.url,r=this.dashjs&&g("function"===this.dashjs.getSource)&&this.dashjs.getSource(),a={player_is_paused:n.paused,player_playhead_time:u(n.currentTime),player_width:parseInt(l(n,"width")),player_height:parseInt(l(n,"height")),player_autoplay_on:n.autoplay,player_preload_on:n.preload,player_language_code:n.lang,player_is_fullscreen:td.default&&!!(td.default.fullscreenElement||td.default.webkitFullscreenElement||td.default.mozFullScreenElement||td.default.msFullscreenElement),video_poster_url:n.poster,video_source_url:t||r||n.currentSrc,video_source_duration:u(n.duration),video_source_height:n.videoHeight,video_source_width:n.videoWidth,view_dropped_frame_count:null==n||null===(e=n.getVideoPlaybackQuality)||void 0===e?void 0:e.call(n).droppedVideoFrames},s=i.getPlayheadTime();if(n.getStartDate&&s>0){var o=n.getStartDate();if(o&&"function"==typeof o.getTime&&o.getTime()){var d=o.getTime();if(a.player_program_time=d+s,n.seekable.length>0){var c=d+n.seekable.end(n.seekable.length-1);a.player_live_edge_program_time=c}}}return a},n.mux=n.mux||{},n.mux.deleted=!1,n.mux.emit=function(t,i){e.emit(a,t,i)};var d=function(){o.error("The monitor for this video element has already been destroyed.")};n.mux.destroy=function(){Object.keys(n.mux.listeners).forEach(function(e){n.removeEventListener(e,n.mux.listeners[e],!1)}),delete n.mux.listeners,n.mux.destroy=d,n.mux.swapElement=d,n.mux.emit=d,n.mux.addHLSJS=d,n.mux.addDashJS=d,n.mux.removeHLSJS=d,n.mux.removeDashJS=d,n.mux.deleted=!0,e.emit(a,"destroy")},n.mux.swapElement=function(t){var i=I(B(t),3),r=i[0],a=i[1],s=i[2];return r?"video"!==s&&"audio"!==s?e.log.error("The element of `"+a+"` was not a media element."):void(r.muxId=n.muxId,delete n.muxId,r.mux=r.mux||{},r.mux.listeners=Object.assign({},n.mux.listeners),delete n.mux.listeners,Object.keys(r.mux.listeners).forEach(function(e){n.removeEventListener(e,r.mux.listeners[e],!1),r.addEventListener(e,r.mux.listeners[e],!1)}),r.mux.swapElement=n.mux.swapElement,r.mux.destroy=n.mux.destroy,delete n.mux,n=r):e.log.error("No element was found with the `"+a+"` query selector.")},n.mux.addHLSJS=function(t){e.addHLSJS(a,t)},n.mux.addDashJS=function(t){e.addDashJS(a,t)},n.mux.removeHLSJS=function(){e.removeHLSJS(a)},n.mux.removeDashJS=function(){e.removeDashJS(a)},e.init(a,i),e.emit(a,"playerready"),n.paused||(e.emit(a,"play"),n.readyState>2&&e.emit(a,"playing")),n.mux.listeners={},tc.forEach(function(t){("error"!==t||i.automaticErrorTracking)&&(n.mux.listeners[t]=function(){var i={};if("error"===t){if(!n.error||1===n.error.code)return;i.player_error_code=n.error.code,i.player_error_message=th[n.error.code]||n.error.message}e.emit(a,t,i)},n.addEventListener(t,n.mux.listeners[t],!1))})}(tP,e,t)},destroyMonitor:function(e){var t=I(B(e),1)[0];t&&t.mux&&"function"==typeof t.mux.destroy?t.mux.destroy():W.error("A video element monitor for `"+e+"` has not been initialized via `mux.monitor`.")},addHLSJS:function(e,t){var i=F(e);tk[i]?tk[i].addHLSJS(t):W.error("A monitor for `"+i+"` has not been initialized.")},addDashJS:function(e,t){var i=F(e);tk[i]?tk[i].addDashJS(t):W.error("A monitor for `"+i+"` has not been initialized.")},removeHLSJS:function(e){var t=F(e);tk[t]?tk[t].removeHLSJS():W.error("A monitor for `"+t+"` has not been initialized.")},removeDashJS:function(e){var t=F(e);tk[t]?tk[t].removeDashJS():W.error("A monitor for `"+t+"` has not been initialized.")},init:function(e,t){K()&&t&&t.respectDoNotTrack&&W.info("The browser's Do Not Track flag is enabled - Mux beaconing is disabled.");var i=F(e);tk[i]=new to(tP,i,t)},emit:function(e,t,i){var r=F(e);tk[r]?(tk[r].emit(t,i),"destroy"===t&&delete tk[r]):W.error("A monitor for `"+r+"` has not been initialized.")},checkDoNotTrack:K,log:W,utils:tx,events:{PLAYER_READY:"playerready",VIEW_INIT:"viewinit",VIDEO_CHANGE:"videochange",PLAY:"play",PAUSE:"pause",PLAYING:"playing",TIME_UPDATE:"timeupdate",SEEKING:"seeking",SEEKED:"seeked",REBUFFER_START:"rebufferstart",REBUFFER_END:"rebufferend",ERROR:"error",ENDED:"ended",RENDITION_CHANGE:"renditionchange",ORIENTATION_CHANGE:"orientationchange",AD_REQUEST:"adrequest",AD_RESPONSE:"adresponse",AD_BREAK_START:"adbreakstart",AD_PLAY:"adplay",AD_PLAYING:"adplaying",AD_PAUSE:"adpause",AD_FIRST_QUARTILE:"adfirstquartile",AD_MID_POINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",AD_ENDED:"adended",AD_BREAK_END:"adbreakend",AD_ERROR:"aderror",REQUEST_COMPLETED:"requestcompleted",REQUEST_FAILED:"requestfailed",REQUEST_CANCELLED:"requestcanceled"},WINDOW_HIDDEN:!1,WINDOW_UNLOADING:!1};Object.assign(tP,tA),void 0!==V.default&&"function"==typeof V.default.addEventListener&&V.default.addEventListener("pagehide",function(e){e.persisted||(tP.WINDOW_UNLOADING=!0)},!1);var tS=i(33061).ZP,tD=class e extends Error{constructor(t,i=e.MEDIA_ERR_CUSTOM,r,n){var a;super(t),this.name="MediaError",this.code=i,this.context=n,this.fatal=null!=r?r:i>=e.MEDIA_ERR_NETWORK&&i<=e.MEDIA_ERR_ENCRYPTED,this.message||(this.message=null!=(a=e.defaultMessages[this.code])?a:"")}};tD.MEDIA_ERR_ABORTED=1,tD.MEDIA_ERR_NETWORK=2,tD.MEDIA_ERR_DECODE=3,tD.MEDIA_ERR_SRC_NOT_SUPPORTED=4,tD.MEDIA_ERR_ENCRYPTED=5,tD.MEDIA_ERR_CUSTOM=100,tD.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail.",3:"A media error caused playback to be aborted. The media could be corrupt or your browser does not support this format.",4:"An unsupported error occurred. The server or network failed, or your browser does not support this format.",5:"The media is encrypted and there are no keys to decrypt it."};var tR=e=>null==e,tO=(e,t)=>!tR(t)&&e in t,tC={ANY:"any",MUTED:"muted"},tL={ON_DEMAND:"on-demand",LIVE:"live",UNKNOWN:"unknown"},tN={MSE:"mse",NATIVE:"native"},tM={HEADER:"header",QUERY:"query",NONE:"none"},tI=(Object.values(tM),{M3U8:"application/vnd.apple.mpegurl",MP4:"video/mp4"}),tV={HLS:tI.M3U8},tq=(Object.keys(tV),[...Object.values(tI),"hls","HLS"]),tj=function(e,t,i,r){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e;n.addEventListener(t,i,r),e.addEventListener("teardown",()=>{n.removeEventListener(t,i)},{once:!0})},tF=e=>{let t=e.indexOf("?");return t<0?[e]:[e.slice(0,t),e.slice(t)]},tB=e=>{let t=e.type;if(t){let e=t.toUpperCase();return tO(e,tV)?tV[e]:t}let{src:i}=e;return i?tW(i):""},tU=e=>"VOD"===e?tL.ON_DEMAND:tL.LIVE,tH=e=>"EVENT"===e?Number.POSITIVE_INFINITY:"VOD"===e?Number.NaN:0,tW=e=>{let t="";try{t=new URL(e).pathname}catch(e){console.error("invalid url")}let i=t.lastIndexOf(".");if(i<0)return"";let r=t.slice(i+1).toUpperCase();return tO(r,tI)?tI[r]:""},tG=Object.values(tC),tK=e=>"boolean"==typeof e||"string"==typeof e&&tG.includes(e),tz=(e,t,i)=>{let{autoplay:r}=e,n=!1,a=!1,s=tK(r)?r:!!r,o=()=>{n||tj(t,"playing",()=>{n=!0},{once:!0})};if(o(),tj(t,"loadstart",()=>{n=!1,o(),tY(t,s)},{once:!0}),tj(t,"loadstart",()=>{i||(a=e.streamType&&e.streamType!==tL.UNKNOWN?e.streamType===tL.LIVE:!Number.isFinite(t.duration)),tY(t,s)},{once:!0}),i&&i.once(tS.Events.LEVEL_LOADED,(t,i)=>{var r;a=e.streamType&&e.streamType!==tL.UNKNOWN?e.streamType===tL.LIVE:null!=(r=i.details.live)&&r}),!s){let r=()=>{!a||Number.isFinite(e.startTime)||(null!=i&&i.liveSyncPosition?t.currentTime=i.liveSyncPosition:Number.isFinite(t.seekable.end(0))&&(t.currentTime=t.seekable.end(0)))};i&&tj(t,"play",()=>{"metadata"===t.preload?i.once(tS.Events.LEVEL_UPDATED,r):r()},{once:!0})}return e=>{n||tY(t,s=tK(e)?e:!!e)}},tY=(e,t)=>{if(!t)return;let i=e.muted,r=()=>e.muted=i;switch(t){case tC.ANY:e.play().catch(()=>{e.muted=!0,e.play().catch(r)});break;case tC.MUTED:e.muted=!0,e.play().catch(r);break;default:e.play().catch(()=>{})}},tX=(e,t,i)=>{let{preload:r,src:n}=e,a=e=>{null!=e&&["","none","metadata","auto"].includes(e)?t.setAttribute("preload",e):t.removeAttribute("preload")};if(!i)return a(r),a;let s=!1,o=!1,l=i.config.maxBufferLength,u=i.config.maxBufferSize,d=e=>{a(e);let r=null!=e?e:t.preload;o||"none"===r||("metadata"===r?(i.config.maxBufferLength=1,i.config.maxBufferSize=1):(i.config.maxBufferLength=l,i.config.maxBufferSize=u),c())},c=()=>{!s&&n&&(s=!0,i.loadSource(n))};return tj(t,"play",()=>{o=!0,i.config.maxBufferLength=l,i.config.maxBufferSize=u,c()},{once:!0}),d(r),d},tQ=e=>"time"in e?e.time:e.startTime;function tJ(e,t,i,r,n){let a=document.createElement("track");return a.kind=t,a.label=i,r&&(a.srclang=r),n&&(a.id=n),a.track.mode=["subtitles","captions"].includes(t)?"disabled":"hidden",a.setAttribute("data-removeondestroy",""),e.append(a),a.track}function tZ(e,t,i){var r;return null==(r=Array.from(e.querySelectorAll("track")).find(e=>e.track.label===t&&e.track.kind===i))?void 0:r.track}async function t$(e,t,i,r){let n=tZ(e,i,r);return n||((n=tJ(e,r,i)).mode="hidden",await new Promise(e=>setTimeout(()=>e(void 0),0))),"hidden"!==n.mode&&(n.mode="hidden"),[...t].sort((e,t)=>tQ(t)-tQ(e)).forEach(t=>{var i,a;let s=t.value,o=tQ(t);if("endTime"in t&&null!=t.endTime)null==n||n.addCue(new VTTCue(o,t.endTime,"chapters"===r?s:JSON.stringify(null!=s?s:null)));else{let t=Array.prototype.findIndex.call(null==n?void 0:n.cues,e=>e.startTime>=o),l=null==(i=null==n?void 0:n.cues)?void 0:i[t],u=l?l.startTime:Number.isFinite(e.duration)?e.duration:Number.MAX_SAFE_INTEGER,d=null==(a=null==n?void 0:n.cues)?void 0:a[t-1];d&&(d.endTime=o),null==n||n.addCue(new VTTCue(o,u,"chapters"===r?s:JSON.stringify(null!=s?s:null)))}}),e.textTracks.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),n}var t0="cuepoints",t1=Object.freeze({label:t0});async function t2(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t1;return t$(e,t,i.label,"metadata")}var t3=e=>({time:e.startTime,value:JSON.parse(e.text)});async function t5(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t1;return new Promise(i=>{tj(e,"loadstart",async()=>{let r=await t2(e,[],t);tj(e,"cuechange",()=>{let t=function(e){var t,i;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:t0},n=tZ(e,r.label,"metadata");if(!(null!=(t=null==n?void 0:n.activeCues)&&t.length))return;if(1===n.activeCues.length)return t3(n.activeCues[0]);let{currentTime:a}=e;return t3(Array.prototype.find.call(null!=(i=n.activeCues)?i:[],e=>{let{startTime:t,endTime:i}=e;return t<=a&&i>a})||n.activeCues[0])}(e);if(t){let i=new CustomEvent("cuepointchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},r),i(r)})})}var t4="chapters",t9=Object.freeze({label:t4}),t8=e=>({startTime:e.startTime,endTime:e.endTime,value:e.text});async function t6(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t9;return t$(e,t,i.label,"chapters")}async function t7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t9;return new Promise(i=>{tj(e,"loadstart",async()=>{let r=await t6(e,[],t);tj(e,"cuechange",()=>{let t=function(e){var t,i;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{label:t4},n=tZ(e,r.label,"chapters");if(!(null!=(t=null==n?void 0:n.activeCues)&&t.length))return;if(1===n.activeCues.length)return t8(n.activeCues[0]);let{currentTime:a}=e;return t8(Array.prototype.find.call(null!=(i=n.activeCues)?i:[],e=>{let{startTime:t,endTime:i}=e;return t<=a&&i>a})||n.activeCues[0])}(e);if(t){let i=new CustomEvent("chapterchange",{composed:!0,bubbles:!0,detail:t});e.dispatchEvent(i)}},{},r),i(r)})})}var ie,it,ii,ir,ia,is,io={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine"},il=e=>e.includes("fps")?io.FAIRPLAY:e.includes("playready")?io.PLAYREADY:e.includes("widevine")?io.WIDEVINE:void 0,iu=async e=>fetch(e).then(e=>e.text()).then(e=>{let t=e.split("\n").find((e,t,i)=>t&&i[t-1].startsWith("#EXT-X-STREAM-INF"));return fetch(t).then(e=>e.text()).then(e=>e.split("\n"))}),id=e=>{var t,i,r;let n=null==(i=(null!=(t=e.find(e=>e.startsWith("#EXT-X-PLAYLIST-TYPE")))?t:"").split(":")[1])?void 0:i.trim(),a=tU(n),s=tH(n),o;if(a===tL.LIVE){let t=e.find(e=>e.startsWith("#EXT-X-PART-INF"));if(t)o=2*+t.split(":")[1].split("=")[1];else{let t=e.find(e=>e.startsWith("#EXT-X-TARGETDURATION")),i=null==(r=null==t?void 0:t.split(":"))?void 0:r[1];o=3*+(null!=i?i:6)}}return{streamType:a,targetLiveWindow:s,liveEdgeStartOffset:o}},ic=async(e,t)=>t===tI.MP4?{streamType:tL.ON_DEMAND,targetLiveWindow:Number.NaN,liveEdgeStartOffset:void 0}:t===tI.M3U8?id(await iu(e)):(console.error("Media type ".concat(t," is an unrecognized or unsupported type for src ").concat(e,".")),{streamType:void 0,targetLiveWindow:void 0,liveEdgeStartOffset:void 0}),ih=async function(e,t){var i,r,n;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tB({src:e}),{streamType:s,targetLiveWindow:o,liveEdgeStartOffset:l}=await ic(e,a);(null!=(i=i_.get(t))?i:{}).liveEdgeStartOffset=l,(null!=(r=i_.get(t))?r:{}).targetLiveWindow=o,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(n=i_.get(t))?n:{}).streamType=s,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},ip=e=>{var t;let i=e.type,r=tU(i),n=tH(i),a,s=!!(null!=(t=e.partList)&&t.length);return r===tL.LIVE&&(a=s?2*e.partTarget:3*e.targetduration),{streamType:r,targetLiveWindow:n,liveEdgeStartOffset:a,lowLatency:s}},im=(e,t,i)=>{var r,n,a,s,o,l,u,d;let{streamType:c,targetLiveWindow:h,liveEdgeStartOffset:p,lowLatency:m}=ip(e);if(c===tL.LIVE){m?(i.config.backBufferLength=null!=(r=i.userConfig.backBufferLength)?r:4,i.config.maxFragLookUpTolerance=null!=(n=i.userConfig.maxFragLookUpTolerance)?n:.001,i.config.abrBandWidthUpFactor=null!=(a=i.userConfig.abrBandWidthUpFactor)?a:i.config.abrBandWidthFactor):i.config.backBufferLength=null!=(s=i.userConfig.backBufferLength)?s:8;let e=Object.freeze({get length(){return t.seekable.length},start:e=>t.seekable.start(e),end(e){var r;return e>this.length||e<0||Number.isFinite(t.duration)?t.seekable.end(e):null!=(r=i.liveSyncPosition)?r:t.seekable.end(e)}});(null!=(o=i_.get(t))?o:{}).seekable=e}(null!=(l=i_.get(t))?l:{}).liveEdgeStartOffset=p,(null!=(u=i_.get(t))?u:{}).targetLiveWindow=h,t.dispatchEvent(new CustomEvent("targetlivewindowchange",{composed:!0,bubbles:!0})),(null!=(d=i_.get(t))?d:{}).streamType=c,t.dispatchEvent(new CustomEvent("streamtypechange",{composed:!0,bubbles:!0}))},iv=null!=(it=null==(ie=null==globalThis?void 0:globalThis.navigator)?void 0:ie.userAgent)?it:"",iy=null!=(ia=null==(ir=null==(ii=null==globalThis?void 0:globalThis.navigator)?void 0:ii.userAgentData)?void 0:ir.platform)?ia:"",ig=iv.toLowerCase().includes("android")||["x11","android"].some(e=>iy.toLowerCase().includes(e)),i_=new WeakMap,ib="mux.com",iT=null==(is=tS.isSupported)?void 0:is.call(tS),iw=()=>tP.utils.now(),iE=tP.utils.generateUUID,ix=function(){let{playbackId:e,customDomain:t=ib,maxResolution:i,minResolution:r,renditionOrder:n,programStartTime:a,programEndTime:s,tokens:{playback:o}={},extraSourceParams:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e)return;let[u,d=""]=tF(e),c=new URL("https://stream.".concat(t,"/").concat(u,".m3u8").concat(d));return o||c.searchParams.has("token")?(c.searchParams.forEach((e,t)=>{"token"!=t&&c.searchParams.delete(t)}),o&&c.searchParams.set("token",o)):(i&&c.searchParams.set("max_resolution",i),r&&(c.searchParams.set("min_resolution",r),i&&+i.slice(0,-1)<+r.slice(0,-1)&&console.error("minResolution must be <= maxResolution","minResolution",r,"maxResolution",i)),n&&c.searchParams.set("rendition_order",n),a&&c.searchParams.set("program_start_time","".concat(a)),s&&c.searchParams.set("program_end_time","".concat(s)),Object.entries(l).forEach(e=>{let[t,i]=e;null!=i&&c.searchParams.set(t,i)})),c.toString()},ik=e=>{if(!e)return;let[t]=e.split("?");return t||void 0},iP=e=>{if(!e||!e.startsWith("https://stream."))return;let[t]=new URL(e).pathname.slice(1).split(".m3u8");return t||void 0},iA=e=>{var t,i,r;return null!=(t=null==e?void 0:e.metadata)&&t.video_id?e.metadata.video_id:iK(e)&&null!=(r=null!=(i=ik(e.playbackId))?i:iP(e.src))?r:e.src},iS=e=>{var t,i;return null!=(i=null==(t=i_.get(e))?void 0:t.streamType)?i:tL.UNKNOWN},iD=e=>{var t,i;return null!=(i=null==(t=i_.get(e))?void 0:t.seekable)?i:e.seekable},iR=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.034;return Math.abs(e-t)<=i},iO=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.034;return e>t||iR(e,t,i)},iC=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.034;return e.paused&&iO(e.currentTime,e.duration,t)},iL=(e,t)=>{var i,r,n;if(!t||!e.buffered.length)return;if(e.readyState>2)return!1;let a=t.currentLevel>=0?null==(r=null==(i=t.levels)?void 0:i[t.currentLevel])?void 0:r.details:null==(n=t.levels.find(e=>!!e.details))?void 0:n.details;if(!a||a.live)return;let{fragments:s}=a;if(!(null!=s&&s.length))return;if(e.currentTime<e.duration-(a.targetduration+.5))return!1;let o=s[s.length-1];if(e.currentTime<=o.start)return!1;let l=o.start+o.duration/2,u=e.buffered.start(e.buffered.length-1),d=e.buffered.end(e.buffered.length-1);return l>u&&l<d},iN=(e,t)=>e.ended||e.loop?e.ended:!!(t&&iL(e,t))||iC(e),iM=(e,t,i)=>{iI(t,i);let{metadata:r={}}=e,{view_session_id:n=iE()}=r,a=iA(e);r.view_session_id=n,r.video_id=a,e.metadata=r,e.drmTypeCb=e=>{var i;null==(i=t.mux)||i.emit("hb",{view_drm_type:e})},i_.set(t,{});let s=iq(e,t),o=tX(e,t,s);iz(e,t,s),iY(e,t,s),t5(t),t7(t);let l=tz(e,t,s);return{engine:s,setAutoplay:l,setPreload:o}},iI=(e,t)=>{let i=null==t?void 0:t.engine;i&&(i.detachMedia(),i.destroy()),null!=e&&e.mux&&!e.mux.deleted&&(e.mux.destroy(),delete e.mux),e&&(e.removeAttribute("src"),e.load(),e.removeEventListener("error",iQ),e.removeEventListener("error",iJ),e.removeEventListener("durationchange",iX),i_.delete(e),e.dispatchEvent(new Event("teardown")))};function iV(e,t){var i;let r=tB(e);if(r!==tI.M3U8)return!0;let n=!r||null==(i=t.canPlayType(r))||i,{preferPlayback:a}=e,s=a===tN.MSE,o=a===tN.NATIVE;return n&&(o||!(iT&&(s||ig)))}var iq=(e,t)=>{let{debug:i,streamType:r,startTime:n=-1,metadata:a,preferCmcd:s,_hlsConfig:o={}}=e,l=tB(e)===tI.M3U8,u=iV(e,t);if(l&&!u&&iT){let t=ij(r),l=iF(e);return new tS({debug:i,startPosition:n,cmcd:s!==tM.NONE?{useHeaders:s===tM.HEADER,sessionId:null==a?void 0:a.view_session_id,contentId:null==a?void 0:a.video_id}:void 0,xhrSetup:(e,t)=>{var i,r;if(s&&s!==tM.QUERY)return;let n=new URL(t);if(!n.searchParams.has("CMCD"))return;let a=(null!=(r=null==(i=n.searchParams.get("CMCD"))?void 0:i.split(","))?r:[]).filter(e=>e.startsWith("sid")||e.startsWith("cid")).join(",");n.searchParams.set("CMCD",a),e.open("GET",n)},backBufferLength:30,renderTextTracksNatively:!1,liveDurationInfinity:!0,capLevelToPlayerSize:!0,capLevelOnFPSDrop:!0,...t,...l,...o})}},ij=e=>e===tL.LIVE?{backBufferLength:8}:{},iF=e=>{let{drmToken:t,src:i,playbackId:r=iP(i),drmTypeCb:n}=e;return t&&r?{emeEnabled:!0,drmSystems:{"com.apple.fps":{licenseUrl:iW(e,"fairplay"),serverCertificateUrl:iG(e,"fairplay")},"com.widevine.alpha":{licenseUrl:iW(e,"widevine")},"com.microsoft.playready":{licenseUrl:iW(e,"playready")}},requestMediaKeySystemAccessFunc:(e,t)=>("com.widevine.alpha"===e&&(t=[...t.map(e=>{var t;let i=null==(t=e.videoCapabilities)?void 0:t.map(e=>({...e,robustness:"HW_SECURE_ALL"}));return{...e,videoCapabilities:i}}),...t]),navigator.requestMediaKeySystemAccess(e,t).then(t=>{let i=il(e);return null==n||n(i),t}))}:{}},iB=async e=>await (await fetch(e)).arrayBuffer(),iU=async(e,t)=>{let i=await (await fetch(t,{method:"POST",headers:{"Content-type":"application/octet-stream"},body:e})).arrayBuffer();return new Uint8Array(i)},iH=(e,t)=>{tj(t,"encrypted",async i=>{try{let r=i.initDataType;if("skd"!==r){console.error('Received unexpected initialization data type "'.concat(r,'"'));return}if(!t.mediaKeys){let i=await (await navigator.requestMediaKeySystemAccess("com.apple.fps",[{initDataTypes:[r],videoCapabilities:[{contentType:"application/vnd.apple.mpegurl",robustness:""}],distinctiveIdentifier:"not-allowed",persistentState:"not-allowed",sessionTypes:["temporary"]}]).then(t=>{var i;return null==(i=e.drmTypeCb)||i.call(e,io.FAIRPLAY),t})).createMediaKeys(),n=await iB(iG(e,"fairplay"));await i.setServerCertificate(n),await t.setMediaKeys(i)}let n=i.initData;if(null==n){console.error("Could not start encrypted playback due to missing initData in ".concat(i.type," event"));return}let a=t.mediaKeys.createSession();a.generateRequest(r,n);let s=await new Promise(e=>{a.addEventListener("message",t=>{e(t.message)},{once:!0})}),o=await iU(s,iW(e,"fairplay"));return await a.update(o),a}catch(e){console.error('Could not start encrypted playback due to exception "'.concat(e,'"'))}})},iW=(e,t)=>{let{playbackId:i,drmToken:r,customDomain:n=ib}=e;return"https://license.".concat(n.toLocaleLowerCase().endsWith(ib)?n:ib,"/license/").concat(t,"/").concat(i,"?token=").concat(r)},iG=(e,t)=>{let{playbackId:i,drmToken:r,customDomain:n=ib}=e;return"https://license.".concat(n.toLocaleLowerCase().endsWith(ib)?n:ib,"/appcert/").concat(t,"/").concat(i,"?token=").concat(r)},iK=e=>{let{playbackId:t,src:i,customDomain:r}=e;if(t)return!0;if("string"!=typeof i)return!1;let n=null==window?void 0:window.location.href,a=new URL(i,n).hostname.toLocaleLowerCase();return a.includes(ib)||!!r&&a.includes(r.toLocaleLowerCase())},iz=(e,t,i)=>{var r;let{envKey:n,disableTracking:a}=e,s=iK(e);if(!a&&(n||s)){let{playerInitTime:a,playerSoftwareName:s,playerSoftwareVersion:o,beaconCollectionDomain:l,debug:u,disableCookies:d}=e,c={...e.metadata,video_title:(null==(r=null==e?void 0:e.metadata)?void 0:r.video_title)||void 0};tP.monitor(t,{debug:u,beaconCollectionDomain:l,hlsjs:i,Hls:i?tS:void 0,automaticErrorTracking:!1,errorTranslator:t=>"string"!=typeof t.player_error_code&&("function"==typeof e.errorTranslator?e.errorTranslator(t):t),disableCookies:d,data:{...n?{env_key:n}:{},player_software_name:s,player_software:s,player_software_version:o,player_init_time:a,...c}})}},iY=(e,t,i)=>{var r;let n=iV(e,t),{src:a}=e,s=()=>{t.ended||!iN(t,i)||(iL(t,i)?t.currentTime=t.buffered.end(t.buffered.length-1):t.dispatchEvent(new Event("ended")))},o,l,u=()=>{var e,i;let r=null==(e=iD(t))?void 0:e.start(0),n=null==(i=iD(t))?void 0:i.end(0);(l!==n||o!==r)&&t.dispatchEvent(new CustomEvent("seekablechange",{composed:!0})),o=r,l=n};if(tj(t,"durationchange",u),t&&n){let i=tB(e);if("string"==typeof a){let n=()=>{if(iS(t)!==tL.LIVE||Number.isFinite(t.duration))return;let e=setInterval(u,1e3);t.addEventListener("teardown",()=>{clearInterval(e)},{once:!0}),tj(t,"durationchange",()=>{Number.isFinite(t.duration)&&clearInterval(e)})};if("none"===t.preload){let e=()=>{ih(a,t,i).then(n),t.removeEventListener("loadedmetadata",r)},r=()=>{ih(a,t,i).then(n),t.removeEventListener("play",e)};tj(t,"play",e,{once:!0}),tj(t,"loadedmetadata",r,{once:!0})}else ih(a,t,i).then(n);e.drmToken&&iH(e,t),t.setAttribute("src",a),e.startTime&&((null!=(r=i_.get(t))?r:{}).startTime=e.startTime,t.addEventListener("durationchange",iX,{once:!0}))}else t.removeAttribute("src");t.addEventListener("error",iQ),t.addEventListener("error",iJ),t.addEventListener("emptied",()=>{t.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})},{once:!0}),tj(t,"pause",s),tj(t,"seeked",s),tj(t,"play",()=>{t.ended||iO(t.currentTime,t.duration)&&(t.currentTime=t.seekable.length?t.seekable.start(0):0)})}else i&&a?(i.once(tS.Events.LEVEL_LOADED,(e,r)=>{im(r.details,t,i),u(),iS(t)!==tL.LIVE||Number.isFinite(t.duration)||(i.on(tS.Events.LEVEL_UPDATED,u),tj(t,"durationchange",()=>{Number.isFinite(t.duration)&&i.off(tS.Events.LEVELS_UPDATED,u)}))}),i.on(tS.Events.ERROR,(e,i)=>{let r={[tS.ErrorTypes.NETWORK_ERROR]:tD.MEDIA_ERR_NETWORK,[tS.ErrorTypes.MEDIA_ERROR]:tD.MEDIA_ERR_DECODE},n=new tD("",r[i.type]);n.fatal=i.fatal,n.data=i,t.dispatchEvent(new CustomEvent("error",{detail:n}))}),t.addEventListener("error",iJ),tj(t,"waiting",s),function(e,t){var i;if(!("videoTracks"in e))return;let r=new WeakMap;t.on(tS.Events.MANIFEST_PARSED,function(t,i){o();let n=e.addVideoTrack("main");for(let[e,t]of(n.selected=!0,i.levels.entries())){let i=n.addRendition(t.url[0],t.width,t.height,t.videoCodec,t.bitrate);r.set(t,"".concat(e)),i.id="".concat(e)}}),t.on(tS.Events.AUDIO_TRACKS_UPDATED,function(t,i){for(let t of(s(),i.audioTracks)){let i=t.default?"main":"alternative",r=e.addAudioTrack(i,t.name,t.lang);r.id="".concat(t.id),t.default&&(r.enabled=!0)}}),e.audioTracks.addEventListener("change",()=>{var i;let r=+(null==(i=[...e.audioTracks].find(e=>e.enabled))?void 0:i.id),n=t.audioTracks.map(e=>e.id);r!=t.audioTrack&&n.includes(r)&&(t.audioTrack=r)}),t.on(tS.Events.LEVELS_UPDATED,function(t,i){var n;let a=e.videoTracks[null!=(n=e.videoTracks.selectedIndex)?n:0];if(!a)return;let s=i.levels.map(e=>r.get(e));for(let t of e.videoRenditions)t.id&&!s.includes(t.id)&&a.removeRendition(t)});let n=i=>{let r=e.currentTime,n=!1,a=(e,t)=>{n||(n=!Number.isFinite(t.endOffset))};t.on(tS.Events.BUFFER_FLUSHING,a),t.nextLevel=i,t.off(tS.Events.BUFFER_FLUSHING,a),n||t.trigger(tS.Events.BUFFER_FLUSHING,{startOffset:r+10,endOffset:1/0,type:"video"})};null==(i=e.videoRenditions)||i.addEventListener("change",e=>{let i=e.target.selectedIndex;i!=t.nextLevel&&n(i)});let a=()=>{for(let t of e.videoTracks)e.removeVideoTrack(t)},s=()=>{for(let t of e.audioTracks)e.removeAudioTrack(t)},o=()=>{a(),s()};t.once(tS.Events.DESTROYING,o)}(e,i),function(e,t){t.on(tS.Events.NON_NATIVE_TEXT_TRACKS_FOUND,(i,r)=>{let{tracks:n}=r;n.forEach(i=>{var r;let n=null!=(r=i.subtitleTrack)?r:i.closedCaptions,a=t.subtitleTracks.findIndex(e=>{let{lang:t,name:r,type:a}=e;return t==(null==n?void 0:n.lang)&&r===i.label&&a.toLowerCase()===i.kind});tJ(e,i.kind,i.label,null==n?void 0:n.lang,"".concat(i.kind).concat(a))})});let i=()=>{var i;if(!t.subtitleTracks.length)return;let r=Array.from(e.textTracks).find(e=>e.id&&"showing"===e.mode&&["subtitles","captions"].includes(e.kind)),n="".concat(null==(i=t.subtitleTracks[t.subtitleTrack])?void 0:i.type.toLowerCase()).concat(t.subtitleTrack);if(r&&(t.subtitleTrack<0||(null==r?void 0:r.id)!==n)){let e=t.subtitleTracks.findIndex(e=>{let{lang:t,name:i,type:n}=e;return t==r.language&&i===r.label&&n.toLowerCase()===r.kind});t.subtitleTrack=e}r&&(null==r?void 0:r.id)===n&&r.cues&&Array.from(r.cues).forEach(e=>{r.addCue(e)})};e.textTracks.addEventListener("change",i),t.on(tS.Events.CUES_PARSED,(t,i)=>{let{track:r,cues:n}=i,a=e.textTracks.getTrackById(r);if(!a)return;let s="disabled"===a.mode;s&&(a.mode="hidden"),n.forEach(e=>{var t;null!=(t=a.cues)&&t.getCueById(e.id)||a.addCue(e)}),s&&(a.mode="disabled")}),t.once(tS.Events.DESTROYING,()=>{e.textTracks.removeEventListener("change",i),e.querySelectorAll("track[data-removeondestroy]").forEach(e=>{e.remove()})});let r=()=>{Array.from(e.textTracks).forEach(t=>{var i,r;if(!["subtitles","caption"].includes(t.kind)&&"thumbnails"===t.label){if(!(null!=(i=t.cues)&&i.length)){let t=e.querySelector('track[label="thumbnails"]'),i=null!=(r=null==t?void 0:t.getAttribute("src"))?r:"";null==t||t.removeAttribute("src"),setTimeout(()=>{null==t||t.setAttribute("src",i)},0)}"hidden"!==t.mode&&(t.mode="hidden")}})};t.once(tS.Events.MANIFEST_LOADED,r),t.once(tS.Events.MEDIA_ATTACHED,r)}(t,i),i.attachMedia(t)):console.error("It looks like the video you're trying to play will not work on this system! If possible, try upgrading to the newest versions of your browser or software.")};function iX(e){var t;let i=e.target,r=null==(t=i_.get(i))?void 0:t.startTime;if(r&&function(e,t,i){t&&i>t&&(i=t);for(let t=0;t<e.length;t++)if(e.start(t)<=i&&e.end(t)>=i)return!0;return!1}(i.seekable,i.duration,r)){let e="auto"===i.preload;e&&(i.preload="none"),i.currentTime=r,e&&(i.preload="auto")}}async function iQ(e){if(!e.isTrusted)return;e.stopImmediatePropagation();let t=e.target;if(!(null!=t&&t.error))return;let{message:i,code:r}=t.error,n=new tD(i,r);if(t.src&&(r!==tD.MEDIA_ERR_DECODE||void 0!==r))try{let{status:e}=await fetch(t.src);n.data={response:{code:e}}}catch(e){}t.dispatchEvent(new CustomEvent("error",{detail:n}))}function iJ(e){var t,i;if(!(e instanceof CustomEvent)||!(e.detail instanceof tD))return;let r=e.target,n=e.detail;n&&n.fatal&&((null!=(t=i_.get(r))?t:{}).error=n,null==(i=r.mux)||i.emit("error",{player_error_code:n.code,player_error_message:n.message,player_error_context:n.context}))}var iZ=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];let n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{t.forEach(e=>{e&&("function"==typeof e?e(n.current):e.current=n.current)})},[t]),n},i$=(()=>{try{return"0.11.4"}catch(e){}return"UNKNOWN"})(),i0=r.forwardRef((e,t)=>{var i;let{playbackId:n,src:a,children:s,autoPlay:o,preload:l,...u}=e,d=Object.fromEntries(Object.entries(u).filter(e=>{let[t]=e;return!Object.keys(i0.propTypes).includes(t)})),[c]=(0,r.useState)(iw()),[h,p]=(0,r.useState)(null!=(i=ix(e))?i:a),m=(0,r.useRef)(void 0),f=iZ((0,r.useRef)(null),t);return(0,r.useEffect)(()=>{var t;p(null!=(t=ix(e))?t:a)},[a,n]),(0,r.useEffect)(()=>{let t={...e,src:h,playerInitTime:c,playerSoftwareName:"mux-video-react",playerSoftwareVersion:i$,autoplay:o},i=f.current;return i&&(m.current=iM(t,i,m.current)),()=>{iI(i,m.current),i=void 0,m.current=void 0}},[h]),(0,r.useEffect)(()=>{var e;null==(e=m.current)||e.setAutoplay(o)},[o]),(0,r.useEffect)(()=>{var e;null==(e=m.current)||e.setPreload(l)},[l]),r.createElement("video",{ref:f,...d},s)});i0.propTypes={_hlsConfig:n.any,beaconCollectionDomain:n.string,customDomain:n.string,debug:n.bool,disableCookies:n.bool,disableTracking:n.bool,envKey:n.string,errorTranslator:n.any,liveEdgeStart:n.number,maxResolution:n.oneOf(["720p","1080p","1440p","2160p"]),metadata:n.any,minResolution:n.oneOf(["480p","540p","720p","1080p","1440p","2160p"]),playbackId:n.string,playerInitTime:n.number,preferCmcd:n.oneOf(Object.values(tM)),preferPlayback:n.oneOf(Object.values(tN)),programStartTime:n.number,programEndTime:n.number,renditionOrder:n.oneOf(["desc"]),startTime:n.number,streamType:n.oneOf(Object.values(tL)),targetLiveWindow:n.number,tokens:n.any,type:n.oneOf(tq)};var i1=i0},64500:function(e,t,i){"use strict";let r;i.d(t,{E:function(){return al}});var n,a=i(3827),s=i(64090);let o=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),l=(0,s.createContext)({}),u=(0,s.createContext)(null),d=s.useLayoutEffect,c=(0,s.createContext)({strict:!1}),h=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),p="data-"+h("framerAppearId"),m={skipAnimations:!1,useManualTiming:!1},f=["read","resolveKeyframes","update","preRender","render","postRender"];function v(e,t){let i=!1,r=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>i=!0,s=f.reduce((e,t)=>(e[t]=function(e){let t=new Set,i=new Set,r=!1,n=!1,a=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function o(t){a.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=s&&r?t:i;return n&&a.add(e),o.has(e)||o.add(e),e},cancel:e=>{i.delete(e),a.delete(e)},process:e=>{if(s=e,r){n=!0;return}r=!0,[t,i]=[i,t],i.clear(),t.forEach(o),r=!1,n&&(n=!1,l.process(e))}};return l}(a),e),{}),{read:o,resolveKeyframes:l,update:u,preRender:d,render:c,postRender:h}=s,p=()=>{let a=m.useManualTiming?n.timestamp:performance.now();i=!1,n.delta=r?1e3/60:Math.max(Math.min(a-n.timestamp,40),1),n.timestamp=a,n.isProcessing=!0,o.process(n),l.process(n),u.process(n),d.process(n),c.process(n),h.process(n),n.isProcessing=!1,i&&t&&(r=!1,e(p))},v=()=>{i=!0,r=!0,n.isProcessing||e(p)};return{schedule:f.reduce((e,t)=>{let r=s[t];return e[t]=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return i||v(),r.schedule(e,t,n)},e},{}),cancel:e=>{for(let t=0;t<f.length;t++)s[f[t]].cancel(e)},state:n,steps:s}}let{schedule:y,cancel:g}=v(queueMicrotask,!1);function b(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}let T=(0,s.createContext)({}),w=!1;function E(){window.MotionHandoffIsComplete=!0}function x(e){return"string"==typeof e||Array.isArray(e)}function k(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}let P=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],A=["initial",...P];function S(e){return k(e.animate)||A.some(t=>x(e[t]))}function D(e){return!!(S(e)||e.variants)}function R(e){return Array.isArray(e)?e.join(" "):e}let O={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},C={};for(let e in O)C[e]={isEnabled:t=>O[e].some(e=>!!t[e])};let L=(0,s.createContext)({}),N=Symbol.for("motionComponentSymbol"),M=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function I(e){if("string"!=typeof e||e.includes("-"));else if(M.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}let V={},q=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],j=new Set(q);function F(e,t){let{layout:i,layoutId:r}=t;return j.has(e)||e.startsWith("origin")||(i||void 0!==r)&&(!!V[e]||"opacity"===e)}let B=e=>!!(e&&e.getVelocity),U=(e,t)=>t&&"number"==typeof e?t.transform(e):e,H=(e,t,i)=>i>t?t:i<e?e:i,W={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},G={...W,transform:e=>H(0,1,e)},K={...W,default:1},z=e=>Math.round(1e5*e)/1e5,Y=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,X=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Q=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function J(e){return"string"==typeof e}let Z=e=>({test:t=>J(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),$=Z("deg"),ee=Z("%"),et=Z("px"),ei=Z("vh"),er=Z("vw"),en={...ee,parse:e=>ee.parse(e)/100,transform:e=>ee.transform(100*e)},ea={...W,transform:Math.round},es={borderWidth:et,borderTopWidth:et,borderRightWidth:et,borderBottomWidth:et,borderLeftWidth:et,borderRadius:et,radius:et,borderTopLeftRadius:et,borderTopRightRadius:et,borderBottomRightRadius:et,borderBottomLeftRadius:et,width:et,maxWidth:et,height:et,maxHeight:et,size:et,top:et,right:et,bottom:et,left:et,padding:et,paddingTop:et,paddingRight:et,paddingBottom:et,paddingLeft:et,margin:et,marginTop:et,marginRight:et,marginBottom:et,marginLeft:et,rotate:$,rotateX:$,rotateY:$,rotateZ:$,scale:K,scaleX:K,scaleY:K,scaleZ:K,skew:$,skewX:$,skewY:$,distance:et,translateX:et,translateY:et,translateZ:et,x:et,y:et,z:et,perspective:et,transformPerspective:et,opacity:G,originX:en,originY:en,originZ:et,zIndex:ea,backgroundPositionX:et,backgroundPositionY:et,fillOpacity:G,strokeOpacity:G,numOctaves:ea},eo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},el=q.length,eu=e=>t=>"string"==typeof t&&t.startsWith(e),ed=eu("--"),ec=eu("var(--"),eh=e=>!!ec(e)&&ep.test(e.split("/*")[0].trim()),ep=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function em(e,t,i){let{style:r,vars:n,transformOrigin:a}=e,s=!1,o=!1;for(let e in t){let i=t[e];if(j.has(e)){s=!0;continue}if(ed(e)){n[e]=i;continue}{let t=U(i,es[e]);e.startsWith("origin")?(o=!0,a[e]=t):r[e]=t}}if(!t.transform&&(s||i?r.transform=function(e,t,i){let r="",n=!0;for(let a=0;a<el;a++){let s=q[a],o=e[s];if(void 0===o)continue;let l=!0;if(!(l="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o))||i){let e=U(o,es[s]);if(!l){n=!1;let t=eo[s]||s;r+="".concat(t,"(").concat(e,") ")}i&&(t[s]=e)}}return r=r.trim(),i?r=i(t,n?"":r):n&&(r="none"),r}(t,e.transform,i):r.transform&&(r.transform="none")),o){let{originX:e="50%",originY:t="50%",originZ:i=0}=a;r.transformOrigin="".concat(e," ").concat(t," ").concat(i)}}let ef=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ev(e,t,i){for(let r in t)B(t[r])||F(r,i)||(e[r]=t[r])}let ey=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function eg(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ey.has(e)}let e_=e=>!eg(e);try{(n=require("@emotion/is-prop-valid").default)&&(e_=e=>e.startsWith("on")?!eg(e):n(e))}catch(e){}function eb(e,t,i){return"string"==typeof e?e:et.transform(t+i*e)}let eT={offset:"stroke-dashoffset",array:"stroke-dasharray"},ew={offset:"strokeDashoffset",array:"strokeDasharray"};function eE(e,t,i,r){let{attrX:n,attrY:a,attrScale:s,originX:o,originY:l,pathLength:u,pathSpacing:d=1,pathOffset:c=0,...h}=t;if(em(e,h,r),i){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:p,style:m,dimensions:f}=e;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==o||void 0!==l||m.transform)&&(m.transformOrigin=function(e,t,i){let r=eb(t,e.x,e.width),n=eb(i,e.y,e.height);return"".concat(r," ").concat(n)}(f,void 0!==o?o:.5,void 0!==l?l:.5)),void 0!==n&&(p.x=n),void 0!==a&&(p.y=a),void 0!==s&&(p.scale=s),void 0!==u&&function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=!(arguments.length>4)||void 0===arguments[4]||arguments[4];e.pathLength=1;let a=n?eT:ew;e[a.offset]=et.transform(-r);let s=et.transform(t),o=et.transform(i);e[a.array]="".concat(s," ").concat(o)}(p,u,d,c,!1)}let ex=()=>({...ef(),attrs:{}}),ek=e=>"string"==typeof e&&"svg"===e.toLowerCase();function eP(e,t,i,r){let{style:n,vars:a}=t;for(let t in Object.assign(e.style,n,r&&r.getProjectionStyles(i)),a)e.style.setProperty(t,a[t])}let eA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function eS(e,t,i,r){for(let i in eP(e,t,void 0,r),t.attrs)e.setAttribute(eA.has(i)?i:h(i),t.attrs[i])}function eD(e,t,i){var r;let{style:n}=e,a={};for(let s in n)(B(n[s])||t.style&&B(t.style[s])||F(s,e)||(null===(r=null==i?void 0:i.getValue(s))||void 0===r?void 0:r.liveStyle)!==void 0)&&(a[s]=n[s]);return i&&n&&"string"==typeof n.willChange&&(i.applyWillChange=!1),a}function eR(e,t,i){let r=eD(e,t,i);for(let i in e)(B(e[i])||B(t[i]))&&(r[-1!==q.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return r}function eO(e){let t=[{},{}];return null==e||e.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function eC(e,t,i,r){if("function"==typeof t){let[n,a]=eO(r);t=t(void 0!==i?i:e.custom,n,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){let[n,a]=eO(r);t=t(void 0!==i?i:e.custom,n,a)}return t}let eL=e=>Array.isArray(e),eN=e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue),eM=e=>eL(e)?e[e.length-1]||0:e;function eI(e){let t=B(e)?e.get():e;return eN(t)?t.toValue():t}let eV=new Set(["opacity","clipPath","filter","transform"]);function eq(e){return j.has(e)?"transform":eV.has(e)?h(e):void 0}function ej(e,t){-1===e.indexOf(t)&&e.push(t)}function eF(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}let eB=e=>(t,i)=>{let r=(0,s.useContext)(l),n=(0,s.useContext)(u),a=()=>(function(e,t,i,r,n){let{applyWillChange:a=!1,scrapeMotionValuesFromProps:s,createRenderState:o,onMount:l}=e,u={latestValues:function(e,t,i,r,n){var a;let s={},o=[],l=r&&(null===(a=e.style)||void 0===a?void 0:a.willChange)===void 0,u=n(e,{});for(let e in u)s[e]=eI(u[e]);let{initial:d,animate:c}=e,h=S(e),p=D(e);t&&p&&!h&&!1!==e.inherit&&(void 0===d&&(d=t.initial),void 0===c&&(c=t.animate));let m=!!i&&!1===i.initial,f=(m=m||!1===d)?c:d;return f&&"boolean"!=typeof f&&!k(f)&&eU(e,f,(e,t)=>{for(let t in e){let i=e[t];if(Array.isArray(i)){let e=m?i.length-1:0;i=i[e]}null!==i&&(s[t]=i)}for(let e in t)s[e]=t[e]}),l&&(c&&!1!==d&&!k(c)&&eU(e,c,e=>{for(let t in e)!function(e,t){let i=eq(t);i&&ej(e,i)}(o,t)}),o.length&&(s.willChange=o.join(","))),s}(t,i,r,!n&&a,s),renderState:o()};return l&&(u.mount=e=>l(t,e,u)),u})(e,t,r,n,i);return i?a():function(e){let t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}(a)};function eU(e,t,i){let r=Array.isArray(t)?t:[t];for(let t=0;t<r.length;t++){let n=eC(e,r[t]);if(n){let{transitionEnd:e,transition:t,...r}=n;i(r,e)}}}let eH=e=>e,{schedule:eW,cancel:eG,state:eK,steps:ez}=v("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:eH,!0),eY={useVisualState:eB({scrapeMotionValuesFromProps:eR,createRenderState:ex,onMount:(e,t,i)=>{let{renderState:r,latestValues:n}=i;eW.read(()=>{try{r.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}}),eW.render(()=>{eE(r,n,ek(t.tagName),e.transformTemplate),eS(t,r)})}})},eX={useVisualState:eB({applyWillChange:!0,scrapeMotionValuesFromProps:eD,createRenderState:ef})};function eQ(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return e.addEventListener(t,i,r),()=>e.removeEventListener(t,i)}let eJ=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function eZ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:{x:e["".concat(t,"X")],y:e["".concat(t,"Y")]}}}let e$=e=>t=>eJ(t)&&e(t,eZ(t));function e0(e,t,i,r){return eQ(e,t,e$(i),r)}let e1=(e,t)=>i=>t(e(i)),e2=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce(e1)};function e3(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}let e5=e3("dragHorizontal"),e4=e3("dragVertical");function e9(e){let t=!1;if("y"===e)t=e4();else if("x"===e)t=e5();else{let e=e5(),i=e4();e&&i?t=()=>{e(),i()}:(e&&e(),i&&i())}return t}function e8(){let e=e9(!0);return!e||(e(),!1)}class e6{update(){}constructor(e){this.isMounted=!1,this.node=e}}function e7(e,t){let i=t?"onHoverStart":"onHoverEnd";return e0(e.current,t?"pointerenter":"pointerleave",(r,n)=>{if("touch"===r.pointerType||e8())return;let a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);let s=a[i];s&&eW.postRender(()=>s(r,n))},{passive:!e.getProps()[i]})}class te extends e6{mount(){this.unmount=e2(e7(this.node,!0),e7(this.node,!1))}unmount(){}}class tt extends e6{onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=e2(eQ(this.node.current,"focus",()=>this.onFocus()),eQ(this.node.current,"blur",()=>this.onBlur()))}unmount(){}constructor(){super(...arguments),this.isActive=!1}}let ti=(e,t)=>!!t&&(e===t||ti(e,t.parentElement));function tr(e,t){if(!t)return;let i=new PointerEvent("pointer"+e);t(i,eZ(i))}class tn extends e6{startPress(e,t){this.isPressing=!0;let{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&eW.postRender(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!e8()}cancelPress(e,t){if(!this.checkPressEnd())return;let{onTapCancel:i}=this.node.getProps();i&&eW.postRender(()=>i(e,t))}mount(){let e=this.node.getProps(),t=e0(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=eQ(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=e2(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}constructor(){super(...arguments),this.removeStartListeners=eH,this.removeEndListeners=eH,this.removeAccessibleListeners=eH,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();let i=this.node.getProps(),r=e0(window,"pointerup",(e,t)=>{if(!this.checkPressEnd())return;let{onTap:i,onTapCancel:r,globalTapTarget:n}=this.node.getProps(),a=n||ti(this.node.current,e.target)?i:r;a&&eW.update(()=>a(e,t))},{passive:!(i.onTap||i.onPointerUp)}),n=e0(window,"pointercancel",(e,t)=>this.cancelPress(e,t),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=e2(r,n),this.startPress(e,t)},this.startAccessiblePress=()=>{let e=eQ(this.node.current,"keydown",e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=eQ(this.node.current,"keyup",e=>{"Enter"===e.key&&this.checkPressEnd()&&tr("up",(e,t)=>{let{onTap:i}=this.node.getProps();i&&eW.postRender(()=>i(e,t))})}),tr("down",(e,t)=>{this.startPress(e,t)}))}),t=eQ(this.node.current,"blur",()=>{this.isPressing&&tr("cancel",(e,t)=>this.cancelPress(e,t))});this.removeAccessibleListeners=e2(e,t)}}}let ta=new WeakMap,ts=new WeakMap,to=e=>{let t=ta.get(e.target);t&&t(e)},tl=e=>{e.forEach(to)},tu={some:0,all:1};class td extends e6{startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:n}=e,a={root:t?t.current:void 0,rootMargin:i,threshold:"number"==typeof r?r:tu[r]};return function(e,t,i){let r=function(e){let{root:t,...i}=e,r=t||document;ts.has(r)||ts.set(r,{});let n=ts.get(r),a=JSON.stringify(i);return n[a]||(n[a]=new IntersectionObserver(tl,{root:t,...i})),n[a]}(t);return ta.set(e,i),r.observe(e),()=>{ta.delete(e),r.unobserve(e)}}(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,n&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:r}=this.node.getProps(),a=t?i:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;let{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function(e){let{viewport:t={}}=e,{viewport:i={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=>t[e]!==i[e]}(e,t))&&this.startObserver()}unmount(){}constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}}function tc(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let r=0;r<i;r++)if(t[r]!==e[r])return!1;return!0}function th(e,t,i){let r=e.getProps();return eC(r,t,void 0!==i?i:r.custom,e)}let tp=e=>1e3*e,tm=e=>e/1e3,tf={type:"spring",stiffness:500,damping:25,restSpeed:10},tv=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),ty={type:"keyframes",duration:.8},tg={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},t_=(e,t)=>{let{keyframes:i}=t;return i.length>2?ty:j.has(e)?e.startsWith("scale")?tv(i[1]):tf:tg};function tb(e,t){return e[t]||e.default||e}let tT={current:!1},tw=e=>null!==e;function tE(e,t,i){let{repeat:r,repeatType:n="loop"}=t,a=e.filter(tw),s=r&&"loop"!==n&&r%2==1?0:a.length-1;return s&&void 0!==i?i:a[s]}let tx=e=>/^0[^.\s]+$/u.test(e),tk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),tP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u,tA=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),tS=e=>e===W||e===et,tD=(e,t)=>parseFloat(e.split(", ")[t]),tR=(e,t)=>(i,r)=>{let{transform:n}=r;if("none"===n||!n)return 0;let a=n.match(/^matrix3d\((.+)\)$/u);if(a)return tD(a[1],t);{let t=n.match(/^matrix\((.+)\)$/u);return t?tD(t[1],e):0}},tO=new Set(["x","y","z"]),tC=q.filter(e=>!tO.has(e)),tL={width:(e,t)=>{let{x:i}=e,{paddingLeft:r="0",paddingRight:n="0"}=t;return i.max-i.min-parseFloat(r)-parseFloat(n)},height:(e,t)=>{let{y:i}=e,{paddingTop:r="0",paddingBottom:n="0"}=t;return i.max-i.min-parseFloat(r)-parseFloat(n)},top:(e,t)=>{let{top:i}=t;return parseFloat(i)},left:(e,t)=>{let{left:i}=t;return parseFloat(i)},bottom:(e,t)=>{let{y:i}=e,{top:r}=t;return parseFloat(r)+(i.max-i.min)},right:(e,t)=>{let{x:i}=e,{left:r}=t;return parseFloat(r)+(i.max-i.min)},x:tR(4,13),y:tR(5,14)};tL.translateX=tL.x,tL.translateY=tL.y;let tN=e=>t=>t.test(e),tM=[W,et,ee,$,er,ei,{test:e=>"auto"===e,parse:e=>e}],tI=e=>tM.find(tN(e)),tV=new Set,tq=!1,tj=!1;function tF(){if(tj){let e=Array.from(tV).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),i=new Map;t.forEach(e=>{let t=function(e){let t=[];return tC.forEach(i=>{let r=e.getValue(i);void 0!==r&&(t.push([i,r.get()]),r.set(i.startsWith("scale")?1:0))}),t}(e);t.length&&(i.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=i.get(e);t&&t.forEach(t=>{var i;let[r,n]=t;null===(i=e.getValue(r))||void 0===i||i.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}tj=!1,tq=!1,tV.forEach(e=>e.complete()),tV.clear()}function tB(){tV.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tj=!0)})}class tU{scheduleResolve(){this.isScheduled=!0,this.isAsync?(tV.add(this),tq||(tq=!0,eW.read(tB),eW.resolveKeyframes(tF))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:i,motionValue:r}=this;for(let n=0;n<e.length;n++)if(null===e[n]){if(0===n){let n=null==r?void 0:r.get(),a=e[e.length-1];if(void 0!==n)e[0]=n;else if(i&&t){let r=i.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===n&&r.set(e[0])}else e[n]=e[n-1]}}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),tV.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,tV.delete(this))}resume(){this.isComplete||this.scheduleResolve()}constructor(e,t,i,r,n,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=r,this.element=n,this.isAsync=a}}let tH=(e,t)=>i=>!!(J(i)&&Q.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),tW=(e,t,i)=>r=>{if(!J(r))return r;let[n,a,s,o]=r.match(Y);return{[e]:parseFloat(n),[t]:parseFloat(a),[i]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},tG=e=>H(0,255,e),tK={...W,transform:e=>Math.round(tG(e))},tz={test:tH("rgb","red"),parse:tW("red","green","blue"),transform:e=>{let{red:t,green:i,blue:r,alpha:n=1}=e;return"rgba("+tK.transform(t)+", "+tK.transform(i)+", "+tK.transform(r)+", "+z(G.transform(n))+")"}},tY={test:tH("#"),parse:function(e){let t="",i="",r="",n="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),r=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),r=e.substring(3,4),n=e.substring(4,5),t+=t,i+=i,r+=r,n+=n),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(r,16),alpha:n?parseInt(n,16)/255:1}},transform:tz.transform},tX={test:tH("hsl","hue"),parse:tW("hue","saturation","lightness"),transform:e=>{let{hue:t,saturation:i,lightness:r,alpha:n=1}=e;return"hsla("+Math.round(t)+", "+ee.transform(z(i))+", "+ee.transform(z(r))+", "+z(G.transform(n))+")"}},tQ={test:e=>tz.test(e)||tY.test(e)||tX.test(e),parse:e=>tz.test(e)?tz.parse(e):tX.test(e)?tX.parse(e):tY.parse(e),transform:e=>J(e)?e:e.hasOwnProperty("red")?tz.transform(e):tX.transform(e)},tJ="number",tZ="color",t$=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function t0(e){let t=e.toString(),i=[],r={color:[],number:[],var:[]},n=[],a=0,s=t.replace(t$,e=>(tQ.test(e)?(r.color.push(a),n.push(tZ),i.push(tQ.parse(e))):e.startsWith("var(")?(r.var.push(a),n.push("var"),i.push(e)):(r.number.push(a),n.push(tJ),i.push(parseFloat(e))),++a,"${}")).split("${}");return{values:i,split:s,indexes:r,types:n}}function t1(e){return t0(e).values}function t2(e){let{split:t,types:i}=t0(e),r=t.length;return e=>{let n="";for(let a=0;a<r;a++)if(n+=t[a],void 0!==e[a]){let t=i[a];t===tJ?n+=z(e[a]):t===tZ?n+=tQ.transform(e[a]):n+=e[a]}return n}}let t3=e=>"number"==typeof e?0:e,t5={test:function(e){var t,i;return isNaN(e)&&J(e)&&((null===(t=e.match(Y))||void 0===t?void 0:t.length)||0)+((null===(i=e.match(X))||void 0===i?void 0:i.length)||0)>0},parse:t1,createTransformer:t2,getAnimatableNone:function(e){let t=t1(e);return t2(e)(t.map(t3))}},t4=new Set(["brightness","contrast","saturate","opacity"]);function t9(e){let[t,i]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=i.match(Y)||[];if(!r)return e;let n=i.replace(r,""),a=t4.has(t)?1:0;return r!==i&&(a*=100),t+"("+a+n+")"}let t8=/\b([a-z-]*)\(.*?\)/gu,t6={...t5,getAnimatableNone:e=>{let t=e.match(t8);return t?t.map(t9).join(" "):e}},t7={...es,color:tQ,backgroundColor:tQ,outlineColor:tQ,fill:tQ,stroke:tQ,borderColor:tQ,borderTopColor:tQ,borderRightColor:tQ,borderBottomColor:tQ,borderLeftColor:tQ,filter:t6,WebkitFilter:t6},ie=e=>t7[e];function it(e,t){let i=ie(e);return i!==t6&&(i=t5),i.getAnimatableNone?i.getAnimatableNone(t):void 0}let ii=new Set(["auto","none","0"]);class ir extends tU{readKeyframes(){let{unresolvedKeyframes:e,element:t,name:i}=this;if(!t||!t.current)return;super.readKeyframes();for(let i=0;i<e.length;i++){let r=e[i];if("string"==typeof r&&eh(r=r.trim())){let n=function e(t,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;eH(r<=4,'Max CSS variable fallback depth detected in property "'.concat(t,'". This may indicate a circular fallback dependency.'));let[n,a]=function(e){let t=tP.exec(e);if(!t)return[,];let[,i,r,n]=t;return["--".concat(null!=i?i:r),n]}(t);if(!n)return;let s=window.getComputedStyle(i).getPropertyValue(n);if(s){let e=s.trim();return tk(e)?parseFloat(e):e}return eh(a)?e(a,i,r+1):a}(r,t.current);void 0!==n&&(e[i]=n),i===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!tA.has(i)||2!==e.length)return;let[r,n]=e,a=tI(r),s=tI(n);if(a!==s){if(tS(a)&&tS(s))for(let t=0;t<e.length;t++){let i=e[t];"string"==typeof i&&(e[t]=parseFloat(i))}else this.needsMeasurement=!0}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,i=[];for(let t=0;t<e.length;t++){var r;("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||tx(r))&&i.push(t)}i.length&&function(e,t,i){let r,n=0;for(;n<e.length&&!r;){let t=e[n];"string"==typeof t&&!ii.has(t)&&t0(t).values.length&&(r=e[n]),n++}if(r&&i)for(let n of t)e[n]=it(i,r)}(e,i,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:i}=this;if(!e||!e.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tL[i](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];void 0!==r&&e.getValue(i,r).jump(r,!1)}measureEndState(){var e;let{element:t,name:i,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let n=t.getValue(i);n&&n.jump(this.measuredOrigin,!1);let a=r.length-1,s=r[a];r[a]=tL[i](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(e=>{let[i,r]=e;t.getValue(i).set(r)}),this.resolveNoneKeyframes()}constructor(e,t,i,r,n){super(e,t,i,r,n,!0)}}function ia(e){let t;return()=>(void 0===t&&(t=e()),t)}function is(){r=void 0}let io={now:()=>(void 0===r&&io.set(eK.isProcessing||m.useManualTiming?eK.timestamp:performance.now()),r),set:e=>{r=e,queueMicrotask(is)}},il=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(t5.test(e)||"0"===e)&&!e.startsWith("url("));class iu{calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(tB(),tF()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=io.now(),this.hasAttemptedResolve=!0;let{name:i,type:r,velocity:n,delay:a,onComplete:s,onUpdate:o,isGenerator:l}=this.options;if(!l&&!function(e,t,i,r){let n=e[0];if(null===n)return!1;if("display"===t||"visibility"===t)return!0;let a=e[e.length-1],s=il(n,t),o=il(a,t);return eH(s===o,"You are trying to animate ".concat(t,' from "').concat(n,'" to "').concat(a,'". ').concat(n," is not an animatable value - to enable this animation set ").concat(n," to a value animatable to ").concat(a," via the `style` property.")),!!s&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i<e.length;i++)if(e[i]!==t)return!0}(e)||"spring"===i&&r)}(e,i,r,n)){if(tT.current||!a){null==o||o(tE(e,this.options,t)),null==s||s(),this.resolveFinishedPromise();return}this.options.duration=0}let u=this.initPlayback(e,t);!1!==u&&(this._resolved={keyframes:e,finalKeyframe:t,...u},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:r=0,repeatDelay:n=0,repeatType:a="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=io.now(),this.options={autoplay:e,delay:t,type:i,repeat:r,repeatDelay:n,repeatType:a,...s},this.updateFinishedPromise()}}function id(e,t,i){var r,n;let a=Math.max(t-5,0);return r=i-e(a),(n=t-a)?1e3/n*r:0}function ic(e,t){return e*Math.sqrt(1-t*t)}let ih=["duration","bounce"],ip=["stiffness","damping","mass"];function im(e,t){return t.some(t=>void 0!==e[t])}function iv(e){let t,{keyframes:i,restDelta:r,restSpeed:n,...a}=e,s=i[0],o=i[i.length-1],l={done:!1,value:s},{stiffness:u,damping:d,mass:c,duration:h,velocity:p,isResolvedFromDuration:m}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!im(e,ip)&&im(e,ih)){let i=function(e){let t,i,{duration:r=800,bounce:n=.25,velocity:a=0,mass:s=1}=e;eH(r<=tp(10),"Spring duration must be 10 seconds or less");let o=1-n;o=H(.05,1,o),r=H(.01,10,tm(r)),o<1?(t=e=>{let t=e*o,i=t*r;return .001-(t-a)/ic(e,o)*Math.exp(-i)},i=e=>{let i=e*o*r,n=Math.pow(o,2)*Math.pow(e,2)*r,s=ic(Math.pow(e,2),o);return(i*a+a-n)*Math.exp(-i)*(-t(e)+.001>0?-1:1)/s}):(t=e=>-.001+Math.exp(-e*r)*((e-a)*r+1),i=e=>r*r*(a-e)*Math.exp(-e*r));let l=function(e,t,i){let r=i;for(let i=1;i<12;i++)r-=e(r)/t(r);return r}(t,i,5/r);if(r=tp(r),isNaN(l))return{stiffness:100,damping:10,duration:r};{let e=Math.pow(l,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:r}}}(e);(t={...t,...i,mass:1}).isResolvedFromDuration=!0}return t}({...a,velocity:-tm(a.velocity||0)}),f=p||0,v=d/(2*Math.sqrt(u*c)),y=o-s,g=tm(Math.sqrt(u/c)),b=5>Math.abs(y);if(n||(n=b?.01:2),r||(r=b?.005:.5),v<1){let e=ic(g,v);t=t=>o-Math.exp(-v*g*t)*((f+v*g*y)/e*Math.sin(e*t)+y*Math.cos(e*t))}else if(1===v)t=e=>o-Math.exp(-g*e)*(y+(f+g*y)*e);else{let e=g*Math.sqrt(v*v-1);t=t=>{let i=Math.exp(-v*g*t),r=Math.min(e*t,300);return o-i*((f+v*g*y)*Math.sinh(r)+e*y*Math.cosh(r))/e}}return{calculatedDuration:m&&h||null,next:e=>{let i=t(e);if(m)l.done=e>=h;else{let a=0;v<1&&(a=0===e?tp(f):id(t,e,i));let s=Math.abs(a)<=n,u=Math.abs(o-i)<=r;l.done=s&&u}return l.value=l.done?o:i,l}}}function iy(e){let t,i,{keyframes:r,velocity:n=0,power:a=.8,timeConstant:s=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:c,restDelta:h=.5,restSpeed:p}=e,m=r[0],f={done:!1,value:m},v=e=>void 0!==d&&e<d||void 0!==c&&e>c,y=e=>void 0===d?c:void 0===c?d:Math.abs(d-e)<Math.abs(c-e)?d:c,g=a*n,b=m+g,T=void 0===u?b:u(b);T!==b&&(g=T-m);let w=e=>-g*Math.exp(-e/s),E=e=>T+w(e),x=e=>{let t=w(e),i=E(e);f.done=Math.abs(t)<=h,f.value=f.done?T:i},k=e=>{v(f.value)&&(t=e,i=iv({keyframes:[f.value,y(f.value)],velocity:id(E,e,f.value),damping:o,stiffness:l,restDelta:h,restSpeed:p}))};return k(0),{calculatedDuration:null,next:e=>{let r=!1;return(i||void 0!==t||(r=!0,x(e),k(e)),void 0!==t&&e>=t)?i.next(e-t):(r||x(e),f)}}}let ig=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function i_(e,t,i,r){if(e===t&&i===r)return eH;let n=t=>(function(e,t,i,r,n){let a,s;let o=0;do(a=ig(s=t+(i-t)/2,r,n)-e)>0?i=s:t=s;while(Math.abs(a)>1e-7&&++o<12);return s})(t,0,1,e,i);return e=>0===e||1===e?e:ig(n(e),t,r)}let ib=i_(.42,0,1,1),iT=i_(0,0,.58,1),iw=i_(.42,0,.58,1),iE=e=>Array.isArray(e)&&"number"!=typeof e[0],ix=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ik=e=>t=>1-e(1-t),iP=e=>1-Math.sin(Math.acos(e)),iA=ik(iP),iS=ix(iP),iD=i_(.33,1.53,.69,.99),iR=ik(iD),iO=ix(iR),iC={linear:eH,easeIn:ib,easeInOut:iw,easeOut:iT,circIn:iP,circInOut:iS,circOut:iA,backIn:iR,backInOut:iO,backOut:iD,anticipate:e=>(e*=2)<1?.5*iR(e):.5*(2-Math.pow(2,-10*(e-1)))},iL=e=>{if(Array.isArray(e)){eH(4===e.length,"Cubic bezier arrays must contain four numerical values.");let[t,i,r,n]=e;return i_(t,i,r,n)}return"string"==typeof e?(eH(void 0!==iC[e],"Invalid easing type '".concat(e,"'")),iC[e]):e},iN=(e,t,i)=>{let r=t-e;return 0===r?1:(i-e)/r},iM=(e,t,i)=>e+(t-e)*i;function iI(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function iV(e,t){return i=>i>0?t:e}let iq=(e,t,i)=>{let r=e*e,n=i*(t*t-r)+r;return n<0?0:Math.sqrt(n)},ij=[tY,tz,tX],iF=e=>ij.find(t=>t.test(e));function iB(e){let t=iF(e);if(eH(!!t,"'".concat(e,"' is not an animatable color. Use the equivalent color code instead.")),!t)return!1;let i=t.parse(e);return t===tX&&(i=function(e){let{hue:t,saturation:i,lightness:r,alpha:n}=e;t/=360,r/=100;let a=0,s=0,o=0;if(i/=100){let e=r<.5?r*(1+i):r+i-r*i,n=2*r-e;a=iI(n,e,t+1/3),s=iI(n,e,t),o=iI(n,e,t-1/3)}else a=s=o=r;return{red:Math.round(255*a),green:Math.round(255*s),blue:Math.round(255*o),alpha:n}}(i)),i}let iU=(e,t)=>{let i=iB(e),r=iB(t);if(!i||!r)return iV(e,t);let n={...i};return e=>(n.red=iq(i.red,r.red,e),n.green=iq(i.green,r.green,e),n.blue=iq(i.blue,r.blue,e),n.alpha=iM(i.alpha,r.alpha,e),tz.transform(n))},iH=new Set(["none","hidden"]);function iW(e,t){return i=>iM(e,t,i)}function iG(e){return"number"==typeof e?iW:"string"==typeof e?eh(e)?iV:tQ.test(e)?iU:iY:Array.isArray(e)?iK:"object"==typeof e?tQ.test(e)?iU:iz:iV}function iK(e,t){let i=[...e],r=i.length,n=e.map((e,i)=>iG(e)(e,t[i]));return e=>{for(let t=0;t<r;t++)i[t]=n[t](e);return i}}function iz(e,t){let i={...e,...t},r={};for(let n in i)void 0!==e[n]&&void 0!==t[n]&&(r[n]=iG(e[n])(e[n],t[n]));return e=>{for(let t in r)i[t]=r[t](e);return i}}let iY=(e,t)=>{let i=t5.createTransformer(t),r=t0(e),n=t0(t);return r.indexes.var.length===n.indexes.var.length&&r.indexes.color.length===n.indexes.color.length&&r.indexes.number.length>=n.indexes.number.length?iH.has(e)&&!n.values.length||iH.has(t)&&!r.values.length?iH.has(e)?i=>i<=0?e:t:i=>i>=1?t:e:e2(iK(function(e,t){var i;let r=[],n={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let s=t.types[a],o=e.indexes[s][n[s]],l=null!==(i=e.values[o])&&void 0!==i?i:0;r[a]=l,n[s]++}return r}(r,n),n.values),i):(eH(!0,"Complex values '".concat(e,"' and '").concat(t,"' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.")),iV(e,t))};function iX(e,t,i){return"number"==typeof e&&"number"==typeof t&&"number"==typeof i?iM(e,t,i):iG(e)(e,t)}function iQ(e){let{duration:t=300,keyframes:i,times:r,ease:n="easeInOut"}=e,a=iE(n)?n.map(iL):iL(n),s={done:!1,value:i[0]},o=function(e,t){let{clamp:i=!0,ease:r,mixer:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=e.length;if(eH(a===t.length,"Both input and output ranges must be the same length"),1===a)return()=>t[0];if(2===a&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=function(e,t,i){let r=[],n=i||iX,a=e.length-1;for(let i=0;i<a;i++){let a=n(e[i],e[i+1]);t&&(a=e2(Array.isArray(t)?t[i]||eH:t,a)),r.push(a)}return r}(t,r,n),o=s.length,l=t=>{let i=0;if(o>1)for(;i<e.length-2&&!(t<e[i+1]);i++);let r=iN(e[i],e[i+1],t);return s[i](r)};return i?t=>l(H(e[0],e[a-1],t)):l}((r&&r.length===i.length?r:function(e){let t=[0];return function(e,t){let i=e[e.length-1];for(let r=1;r<=t;r++){let n=iN(0,t,r);e.push(iM(i,1,n))}}(t,e.length-1),t}(i)).map(e=>e*t),i,{ease:Array.isArray(a)?a:i.map(()=>a||iw).splice(0,i.length-1)});return{calculatedDuration:t,next:e=>(s.value=o(e),s.done=e>=t,s)}}let iJ=e=>{let t=t=>{let{timestamp:i}=t;return e(i)};return{start:()=>eW.update(t,!0),stop:()=>eG(t),now:()=>eK.isProcessing?eK.timestamp:io.now()}},iZ={decay:iy,inertia:iy,tween:iQ,keyframes:iQ,spring:iv},i$=e=>e/100;class i0 extends iu{initPlayback(e){let t,i;let{type:r="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:s,velocity:o=0}=this.options,l=iZ[r]||iQ;l!==iQ&&"number"!=typeof e[0]&&(t=e2(i$,iX(e[0],e[1])),e=[0,100]);let u=l({...this.options,keyframes:e});"mirror"===s&&(i=l({...this.options,keyframes:[...e].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=function(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}(u));let{calculatedDuration:d}=u,c=d+a;return{generator:u,mirroredGenerator:i,mapPercentToKeyframes:t,calculatedDuration:d,resolvedDuration:c,totalDuration:c*(n+1)-a}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{resolved:i}=this;if(!i){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:n,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:o,calculatedDuration:l,totalDuration:u,resolvedDuration:d}=i;if(null===this.startTime)return n.next(0);let{delay:c,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;let v=this.currentTime-c*(this.speed>=0?1:-1),y=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let g=this.currentTime,b=n;if(h){let e=Math.min(this.currentTime,u)/d,t=Math.floor(e),i=e%1;!i&&e>=1&&(i=1),1===i&&t--,(t=Math.min(t,h+1))%2&&("reverse"===p?(i=1-i,m&&(i-=m/d)):"mirror"===p&&(b=a)),g=H(0,1,i)*d}let T=y?{done:!1,value:o[0]}:b.next(g);s&&(T.value=s(T.value));let{done:w}=T;y||null===l||(w=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&void 0!==r&&(T.value=tE(o,this.options,r)),f&&f(T.value),E&&this.finish(),T}get duration(){let{resolved:e}=this;return e?tm(e.calculatedDuration):0}get time(){return tm(this.currentTime)}set time(e){e=tp(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=tm(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:e=iJ,onPlay:t,startTime:i}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();let r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=i?i:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:i,element:r,keyframes:n}=this.options,a=(null==r?void 0:r.KeyframeResolver)||tU;this.resolver=new a(n,(e,t)=>this.onKeyframesResolved(e,t),t,i,r),this.resolver.scheduleResolve()}}let i1=e=>Array.isArray(e)&&"number"==typeof e[0],i2=e=>{let[t,i,r,n]=e;return"cubic-bezier(".concat(t,", ").concat(i,", ").concat(r,", ").concat(n,")")},i3={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:i2([0,.65,.55,1]),circOut:i2([.55,0,1,.45]),backIn:i2([.31,.01,.66,-.59]),backOut:i2([.33,1.53,.69,.99])};function i5(e){return i4(e)||i3.easeOut}function i4(e){if(e)return i1(e)?i2(e):Array.isArray(e)?e.map(i5):i3[e]}let i9=ia(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class i8 extends iu{initPlayback(e,t){var i,r;let{duration:n=300,times:a,ease:s,type:o,motionValue:l,name:u,startTime:d}=this.options;if(!(null===(i=l.owner)||void 0===i?void 0:i.current))return!1;if("spring"===(r=this.options).type||!function e(t){return!!(!t||"string"==typeof t&&t in i3||i1(t)||Array.isArray(t)&&t.every(e))}(r.ease)){let{onComplete:t,onUpdate:i,motionValue:r,element:l,...u}=this.options,d=function(e,t){let i=new i0({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},n=[],a=0;for(;!r.done&&a<2e4;)n.push((r=i.sample(a)).value),a+=10;return{times:void 0,keyframes:n,duration:a-10,ease:"linear"}}(e,u);1===(e=d.keyframes).length&&(e[1]=e[0]),n=d.duration,a=d.times,s=d.ease,o="keyframes"}let c=function(e,t,i){let{delay:r=0,duration:n=300,repeat:a=0,repeatType:s="loop",ease:o,times:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},u={[t]:i};l&&(u.offset=l);let d=i4(o);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"})}(l.owner.current,u,e,{...this.options,duration:n,times:a,ease:s});return c.startTime=null!=d?d:this.calcStartTime(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{let{onComplete:i}=this.options;l.set(tE(e,this.options,t)),i&&i(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:a,type:o,ease:s,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return tm(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return tm(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:i}=t;i.currentTime=tp(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:i}=t;i.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return"idle";let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){let{resolved:t}=this;if(!t)return eH;let{animation:i}=t;i.timeline=e,i.onfinish=null}else this.pendingTimeline=e;return eH}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:i,duration:r,type:n,ease:a,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:o,element:l,...u}=this.options,d=new i0({...u,keyframes:i,duration:r,type:n,ease:a,times:s,isGenerator:!0}),c=tp(this.time);e.setWithVelocity(d.sample(c-10).value,d.sample(c).value,10)}let{onStop:o}=this.options;o&&o(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:i,repeatDelay:r,repeatType:n,damping:a,type:s}=e;return i9()&&i&&eV.has(i)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==n&&0!==a&&"inertia"!==s}constructor(e){super(e);let{name:t,motionValue:i,element:r,keyframes:n}=this.options;this.resolver=new ir(n,(e,t)=>this.onKeyframesResolved(e,t),t,i,r),this.resolver.scheduleResolve()}}let i6=ia(()=>void 0!==window.ScrollTimeline);class i7{then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=t}attachTimeline(e){let t=this.animations.map(t=>{if(!i6()||!t.attachTimeline)return t.pause(),function(e,t){let i;let r=()=>{let{currentTime:r}=t,n=(null===r?0:r.value)/100;i!==n&&e(n),i=n};return eW.update(r,!0),()=>eG(r)}(e=>{t.time=t.duration*e},e);t.attachTimeline(e)});return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}}let re=function(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,s=arguments.length>6?arguments[6]:void 0;return o=>{let l=tb(r,e)||{},u=l.delay||r.delay||0,{elapsed:d=0}=r;d-=tp(u);let c={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-d,onUpdate:e=>{t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:()=>{o(),l.onComplete&&l.onComplete(),s&&s()},onStop:s,name:e,motionValue:t,element:a?void 0:n};!function(e){let{when:t,delay:i,delayChildren:r,staggerChildren:n,staggerDirection:a,repeat:s,repeatType:o,repeatDelay:l,from:u,elapsed:d,...c}=e;return!!Object.keys(c).length}(l)&&(c={...c,...t_(e,c)}),c.duration&&(c.duration=tp(c.duration)),c.repeatDelay&&(c.repeatDelay=tp(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if(!1!==c.type&&(0!==c.duration||c.repeatDelay)||(c.duration=0,0!==c.delay||(h=!0)),(tT.current||m.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),h&&!a&&void 0!==t.get()){let e=tE(c.keyframes,l);if(void 0!==e)return eW.update(()=>{c.onUpdate(e),c.onComplete()}),new i7([])}return!a&&i8.supports(c)?new i8(c):new i0(c)}};class rt{add(e){return ej(this.subscriptions,e),()=>eF(this.subscriptions,e)}notify(e,t,i){let r=this.subscriptions.length;if(r){if(1===r)this.subscriptions[0](e,t,i);else for(let n=0;n<r;n++){let r=this.subscriptions[n];r&&r(e,t,i)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}constructor(){this.subscriptions=[]}}let ri=e=>!isNaN(parseFloat(e)),rr={current:void 0};class rn{setCurrent(e){this.current=e,this.updatedAt=io.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=ri(this.current))}setPrevFrameValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current;this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new rt);let i=this.events[e].add(t);return"change"===e?()=>{i(),eW.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return rr.current&&rr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){var e;let t=io.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;let i=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e=parseFloat(this.current)-parseFloat(this.prevFrameValue),i?1e3/i*e:0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}constructor(e,t={}){var i=this;this.version="11.3.30",this.canTrackVelocity=null,this.events={},this.updateAndNotify=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=io.now();i.updatedAt!==r&&i.setPrevFrameValue(),i.prev=i.current,i.setCurrent(e),i.current!==i.prev&&i.events.change&&i.events.change.notify(i.current),t&&i.events.renderRequest&&i.events.renderRequest.notify(i.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}}function ra(e,t){return new rn(e,t)}function rs(e){return e.getProps()[p]}class ro extends rn{add(e){let t=eq(e);if(!t)return;let i=this.counts.get(t)||0;this.counts.set(t,i+1),0===i&&(this.output.push(t),this.update());let r=!1;return()=>{if(r)return;r=!0;let e=this.counts.get(t)-1;this.counts.set(t,e),0===e&&(eF(this.output,t),this.update())}}update(){this.set(this.output.length?this.output.join(", "):"auto")}constructor(){super(...arguments),this.output=[],this.counts=new Map}}function rl(e,t){var i,r;if(!e.applyWillChange)return;let n=e.getValue("willChange");if(n||(null===(i=e.props.style)||void 0===i?void 0:i.willChange)||(n=new ro("auto"),e.addValue("willChange",n)),B(r=n)&&r.add)return n.add(t)}function ru(e,t){var i;let{delay:r=0,transitionOverride:n,type:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=t;n&&(s=n);let u=[],d=a&&e.animationState&&e.animationState.getState()[a];for(let t in l){let n=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),a=l[t];if(void 0===a||d&&function(e,t){let{protectedKeys:i,needsAnimating:r}=e,n=i.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,n}(d,t))continue;let o={delay:r,...tb(s||{},t)},c=!1;if(window.MotionHandoffAnimation){let i=rs(e);if(i){let e=window.MotionHandoffAnimation(i,t,eW);null!==e&&(o.startTime=e,c=!0)}}n.start(re(t,n,a,e.shouldReduceMotion&&j.has(t)?{type:!1}:o,e,c,rl(e,t)));let h=n.animation;h&&u.push(h)}return o&&Promise.all(u).then(()=>{eW.update(()=>{o&&function(e,t){let{transitionEnd:i={},transition:r={},...n}=th(e,t)||{};for(let t in n={...n,...i}){let i=eM(n[t]);e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,ra(i))}}(e,o)})}),u}function rd(e,t){var i;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=th(e,t,"exit"===r.type?null===(i=e.presenceContext)||void 0===i?void 0:i.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(a=r.transitionOverride);let s=n?()=>Promise.all(ru(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,{delayChildren:n=0,staggerChildren:s,staggerDirection:o}=a;return function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5?arguments[5]:void 0,s=[],o=(e.variantChildren.size-1)*r,l=1===n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e*r}:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return o-e*r};return Array.from(e.variantChildren).sort(rc).forEach((e,r)=>{e.notify("AnimationStart",t),s.push(rd(e,t,{...a,delay:i+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(s)}(e,t,n+i,s,o,r)}:()=>Promise.resolve(),{when:l}=a;if(!l)return Promise.all([s(),o(r.delay)]);{let[e,t]="beforeChildren"===l?[s,o]:[o,s];return e().then(()=>t())}}function rc(e,t){return e.sortNodePosition(t)}let rh=[...P].reverse(),rp=P.length;function rm(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rf(){return{animate:rm(!0),whileInView:rm(),whileHover:rm(),whileTap:rm(),whileDrag:rm(),whileFocus:rm(),exit:rm()}}class rv extends e6{updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();k(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}constructor(e){super(e),e.animationState||(e.animationState=function(e){let t=t=>Promise.all(t.map(t=>{let{animation:i,options:r}=t;return function(e,t){let i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t))i=Promise.all(t.map(t=>rd(e,t,r)));else if("string"==typeof t)i=rd(e,t,r);else{let n="function"==typeof t?th(e,t,r.custom):t;i=Promise.all(ru(e,n,r))}return i.then(()=>{e.notify("AnimationComplete",t)})}(e,i,r)})),i=rf(),r=!0,n=t=>(i,r)=>{var n;let a=th(e,r,"exit"===t?null===(n=e.presenceContext)||void 0===n?void 0:n.custom:void 0);if(a){let{transition:e,transitionEnd:t,...r}=a;i={...i,...r,...t}}return i};function a(a){let s=e.getProps(),o=e.getVariantContext(!0)||{},l=[],u=new Set,d={},c=1/0;for(let t=0;t<rp;t++){var h;let p=rh[t],m=i[p],f=void 0!==s[p]?s[p]:o[p],v=x(f),y=p===a?m.isActive:null;!1===y&&(c=t);let g=f===o[p]&&f!==s[p]&&v;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),m.protectedKeys={...d},!m.isActive&&null===y||!f&&!m.prevProp||k(f)||"boolean"==typeof f)continue;let b=(h=m.prevProp,("string"==typeof f?f!==h:!!Array.isArray(f)&&!tc(f,h))||p===a&&m.isActive&&!g&&v||t>c&&v),T=!1,w=Array.isArray(f)?f:[f],E=w.reduce(n(p),{});!1===y&&(E={});let{prevResolvedValues:P={}}=m,A={...P,...E},S=t=>{b=!0,u.has(t)&&(T=!0,u.delete(t)),m.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in A){let t=E[e],i=P[e];if(!d.hasOwnProperty(e))(eL(t)&&eL(i)?tc(t,i):t===i)?void 0!==t&&u.has(e)?S(e):m.protectedKeys[e]=!0:null!=t?S(e):u.add(e)}m.prevProp=f,m.prevResolvedValues=E,m.isActive&&(d={...d,...E}),r&&e.blockInitialAnimation&&(b=!1),b&&(!g||T)&&l.push(...w.map(e=>({animation:e,options:{type:p}})))}if(u.size){let t={};u.forEach(i=>{let r=e.getBaseTarget(i),n=e.getValue(i);n&&(n.liveStyle=!0),t[i]=null!=r?r:null}),l.push({animation:t})}let p=!!l.length;return r&&(!1===s.initial||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){var n;if(i[t].isActive===r)return Promise.resolve();null===(n=e.variantChildren)||void 0===n||n.forEach(e=>{var i;return null===(i=e.animationState)||void 0===i?void 0:i.setActive(t,r)}),i[t].isActive=r;let s=a(t);for(let e in i)i[e].protectedKeys={};return s},setAnimateFunction:function(i){t=i(e)},getState:()=>i,reset:()=>{i=rf(),r=!0}}}(e))}}let ry=0;class rg extends e6{update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;let r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}constructor(){super(...arguments),this.id=ry++}}let r_=(e,t)=>Math.abs(e-t);class rb{updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),eG(this.updatePoint)}constructor(e,t,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:n=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{var e,t;if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let i=rE(this.lastMoveEventInfo,this.history),r=null!==this.startEvent,n=(e=i.offset,t={x:0,y:0},Math.sqrt(r_(e.x,t.x)**2+r_(e.y,t.y)**2)>=3);if(!r&&!n)return;let{point:a}=i,{timestamp:s}=eK;this.history.push({...a,timestamp:s});let{onStart:o,onMove:l}=this.handlers;r||(o&&o(this.lastMoveEvent,i),this.startEvent=this.lastMoveEvent),l&&l(this.lastMoveEvent,i)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=rT(t,this.transformPagePoint),eW.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:i,onSessionEnd:r,resumeAnimation:n}=this.handlers;if(this.dragSnapToOrigin&&n&&n(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=rE("pointercancel"===e.type?this.lastMoveEventInfo:rT(t,this.transformPagePoint),this.history);this.startEvent&&i&&i(e,a),r&&r(e,a)},!eJ(e))return;this.dragSnapToOrigin=n,this.handlers=t,this.transformPagePoint=i,this.contextWindow=r||window;let a=rT(eZ(e),this.transformPagePoint),{point:s}=a,{timestamp:o}=eK;this.history=[{...s,timestamp:o}];let{onSessionStart:l}=t;l&&l(e,rE(a,this.history)),this.removeListeners=e2(e0(this.contextWindow,"pointermove",this.handlePointerMove),e0(this.contextWindow,"pointerup",this.handlePointerUp),e0(this.contextWindow,"pointercancel",this.handlePointerUp))}}function rT(e,t){return t?{point:t(e.point)}:e}function rw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rE(e,t){let{point:i}=e;return{point:i,delta:rw(i,rx(t)),offset:rw(i,t[0]),velocity:function(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,r=null,n=rx(e);for(;i>=0&&(r=e[i],!(n.timestamp-r.timestamp>tp(.1)));)i--;if(!r)return{x:0,y:0};let a=tm(n.timestamp-r.timestamp);if(0===a)return{x:0,y:0};let s={x:(n.x-r.x)/a,y:(n.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}(t,0)}}function rx(e){return e[e.length-1]}function rk(e){return e.max-e.min}function rP(e,t,i){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=iM(t.min,t.max,e.origin),e.scale=rk(i)/rk(t),e.translate=iM(i.min,i.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function rA(e,t,i,r){rP(e.x,t.x,i.x,r?r.originX:void 0),rP(e.y,t.y,i.y,r?r.originY:void 0)}function rS(e,t,i){e.min=i.min+t.min,e.max=e.min+rk(t)}function rD(e,t,i){e.min=t.min-i.min,e.max=e.min+rk(t)}function rR(e,t,i){rD(e.x,t.x,i.x),rD(e.y,t.y,i.y)}function rO(e,t,i){return{min:void 0!==t?e.min+t:void 0,max:void 0!==i?e.max+i-(e.max-e.min):void 0}}function rC(e,t){let i=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([i,r]=[r,i]),{min:i,max:r}}function rL(e,t,i){return{min:rN(e,t),max:rN(e,i)}}function rN(e,t){return"number"==typeof e?e:e[t]||0}let rM=()=>({translate:0,scale:1,origin:0,originPoint:0}),rI=()=>({x:rM(),y:rM()}),rV=()=>({min:0,max:0}),rq=()=>({x:rV(),y:rV()});function rj(e){return[e("x"),e("y")]}function rF(e){let{top:t,left:i,right:r,bottom:n}=e;return{x:{min:i,max:r},y:{min:t,max:n}}}function rB(e){return void 0===e||1===e}function rU(e){let{scale:t,scaleX:i,scaleY:r}=e;return!rB(t)||!rB(i)||!rB(r)}function rH(e){return rU(e)||rW(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rW(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}function rG(e,t,i,r,n){return void 0!==n&&(e=r+n*(e-r)),r+i*(e-r)+t}function rK(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,n=arguments.length>4?arguments[4]:void 0;e.min=rG(e.min,t,i,r,n),e.max=rG(e.max,t,i,r,n)}function rz(e,t){let{x:i,y:r}=t;rK(e.x,i.translate,i.scale,i.originPoint),rK(e.y,r.translate,r.scale,r.originPoint)}function rY(e,t){e.min=e.min+t,e.max=e.max+t}function rX(e,t,i,r){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,a=iM(e.min,e.max,n);rK(e,t,i,a,r)}function rQ(e,t){rX(e.x,t.x,t.scaleX,t.scale,t.originX),rX(e.y,t.y,t.scaleY,t.scale,t.originY)}function rJ(e,t){return rF(function(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}let rZ=e=>{let{current:t}=e;return t?t.ownerDocument.defaultView:null},r$=new WeakMap;class r0{start(e){let{snapToCursor:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{presenceContext:i}=this.visualElement;if(i&&!1===i.isPresent)return;let{dragSnapToOrigin:r}=this.getProps();this.panSession=new rb(e,{onSessionStart:e=>{let{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(eZ(e,"page").point)},onStart:(e,t)=>{var i;let{drag:r,dragPropagation:n,onDragStart:a}=this.getProps();if(r&&!n&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=e9(r),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rj(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ee.test(t)){let{projection:i}=this.visualElement;if(i&&i.layout){let r=i.layout.layoutBox[e];if(r){let e=rk(r);t=parseFloat(t)/100*e}}}this.originPoint[e]=t}),a&&eW.postRender(()=>a(e,t)),null===(i=this.removeWillChange)||void 0===i||i.call(this),this.removeWillChange=rl(this.visualElement,"transform");let{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{let{dragPropagation:i,dragDirectionLock:r,onDirectionLock:n,onDrag:a}=this.getProps();if(!i&&!this.openGlobalLock)return;let{offset:s}=t;if(r&&null===this.currentDirection){this.currentDirection=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}(s),null!==this.currentDirection&&n&&n(this.currentDirection);return}this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),a&&a(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>rj(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:rZ(this.visualElement)})}stop(e,t){var i;null===(i=this.removeWillChange)||void 0===i||i.call(this);let r=this.isDragging;if(this.cancel(),!r)return;let{velocity:n}=t;this.startAnimation(n);let{onDragEnd:a}=this.getProps();a&&eW.postRender(()=>a(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){let{drag:r}=this.getProps();if(!i||!r1(e,r,this.currentDirection))return;let n=this.getAxisMotionValue(e),a=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(a=function(e,t,i){let{min:r,max:n}=t;return void 0!==r&&e<r?e=i?iM(r,e,i.min):Math.max(e,r):void 0!==n&&e>n&&(e=i?iM(n,e,i.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),n.set(a)}resolveConstraints(){var e;let{dragConstraints:t,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,n=this.constraints;t&&b(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=function(e,t){let{top:i,left:r,bottom:n,right:a}=t;return{x:rO(e.x,r,a),y:rO(e.y,i,n)}}(r.layoutBox,t):this.constraints=!1,this.elastic=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.35;return!1===e?e=0:!0===e&&(e=.35),{x:rL(e,"left","right"),y:rL(e,"top","bottom")}}(i),n!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rj(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){let i={};return void 0!==t.min&&(i.min=t.min-e.min),void 0!==t.max&&(i.max=t.max-e.min),i}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){var e;let{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!t||!b(t))return!1;let r=t.current;eH(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let a=function(e,t,i){let r=rJ(e,i),{scroll:n}=t;return n&&(rY(r.x,n.offset.x),rY(r.y,n.offset.y)),r}(r,n.root,this.visualElement.getTransformPagePoint()),s={x:rC((e=n.layout.layoutBox).x,a.x),y:rC(e.y,a.y)};if(i){let e=i(function(e){let{x:t,y:i}=e;return{top:i.min,right:t.max,bottom:i.max,left:t.min}}(s));this.hasMutatedConstraints=!!e,e&&(s=rF(e))}return s}startAnimation(e){let{drag:t,dragMomentum:i,dragElastic:r,dragTransition:n,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),o=this.constraints||{};return Promise.all(rj(s=>{if(!r1(s,t,this.currentDirection))return;let l=o&&o[s]||{};a&&(l={min:0,max:0});let u={type:"inertia",velocity:i?e[s]:0,bounceStiffness:r?200:1e6,bounceDamping:r?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...n,...l};return this.startAxisValueAnimation(s,u)})).then(s)}startAxisValueAnimation(e,t){let i=this.getAxisMotionValue(e);return i.start(re(e,i,0,t,this.visualElement,!1,rl(this.visualElement,e)))}stopAnimation(){rj(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){rj(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){let t="_drag".concat(e.toUpperCase()),i=this.visualElement.getProps();return i[t]||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){rj(t=>{let{drag:i}=this.getProps();if(!r1(t,i,this.currentDirection))return;let{projection:r}=this.visualElement,n=this.getAxisMotionValue(t);if(r&&r.layout){let{min:i,max:a}=r.layout.layoutBox[t];n.set(e[t]-iM(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!b(t)||!i||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};rj(e=>{let t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){let i=t.get();r[e]=function(e,t){let i=.5,r=rk(e),n=rk(t);return n>r?i=iN(t.min,t.max-r,e.min):r>n&&(i=iN(e.min,e.max-n,t.min)),H(0,1,i)}({min:i,max:i},this.constraints[e])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),rj(t=>{if(!r1(t,e,null))return;let i=this.getAxisMotionValue(t),{min:n,max:a}=this.constraints[t];i.set(iM(n,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;r$.set(this.visualElement,this);let e=e0(this.visualElement.current,"pointerdown",e=>{let{drag:t,dragListener:i=!0}=this.getProps();t&&i&&this.start(e)}),t=()=>{let{dragConstraints:e}=this.getProps();b(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",t);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),eW.read(t);let n=eQ(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",e=>{let{delta:t,hasLayoutChanged:i}=e;this.isDragging&&i&&(rj(e=>{let i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{n(),e(),r(),a&&a()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:n=!1,dragElastic:a=.35,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:n,dragElastic:a,dragMomentum:s}}constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=rq(),this.visualElement=e}}function r1(e,t,i){return(!0===t||t===e)&&(null===i||i===e)}class r2 extends e6{mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||eH}unmount(){this.removeGroupControls(),this.removeListeners()}constructor(e){super(e),this.removeGroupControls=eH,this.removeListeners=eH,this.controls=new r0(e)}}let r3=e=>(t,i)=>{e&&eW.postRender(()=>e(t,i))};class r5 extends e6{onPointerDown(e){this.session=new rb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rZ(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:r3(e),onStart:r3(t),onMove:i,onEnd:(e,t)=>{delete this.session,r&&eW.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=e0(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}constructor(){super(...arguments),this.removePointerDownListener=eH}}let r4={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function r9(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let r8={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!et.test(e))return e;e=parseFloat(e)}let i=r9(e,t.target.x),r=r9(e,t.target.y);return"".concat(i,"% ").concat(r,"%")}};class r6 extends s.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:n}=e;Object.assign(V,ne),n&&(t.group&&t.group.add(n),i&&i.register&&r&&i.register(n),n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),r4.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:i,drag:r,isPresent:n}=this.props,a=i.projection;return a&&(a.isPresent=n,r||e.layoutDependency!==t||void 0===t?a.willUpdate():this.safeToRemove(),e.isPresent===n||(n?a.promote():a.relegate()||eW.postRender(()=>{let e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),y.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}}function r7(e){let[t,i]=function(){let e=(0,s.useContext)(u);if(null===e)return[!0,null];let{isPresent:t,onExitComplete:i,register:r}=e,n=(0,s.useId)();(0,s.useEffect)(()=>r(n),[]);let a=(0,s.useCallback)(()=>i&&i(n),[n,i]);return!t&&i?[!1,a]:[!0]}(),r=(0,s.useContext)(L);return(0,a.jsx)(r6,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(T),isPresent:t,safeToRemove:i})}let ne={borderRadius:{...r8,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:r8,borderTopRightRadius:r8,borderBottomLeftRadius:r8,borderBottomRightRadius:r8,boxShadow:{correct:(e,t)=>{let{treeScale:i,projectionDelta:r}=t,n=t5.parse(e);if(n.length>5)return e;let a=t5.createTransformer(e),s="number"!=typeof n[0]?1:0,o=r.x.scale*i.x,l=r.y.scale*i.y;n[0+s]/=o,n[1+s]/=l;let u=iM(o,l,.5);return"number"==typeof n[2+s]&&(n[2+s]/=u),"number"==typeof n[3+s]&&(n[3+s]/=u),a(n)}}},nt=["TopLeft","TopRight","BottomLeft","BottomRight"],ni=nt.length,nr=e=>"string"==typeof e?parseFloat(e):e,nn=e=>"number"==typeof e||et.test(e);function na(e,t){return void 0!==e[t]?e[t]:e.borderRadius}let ns=nl(0,.5,iA),no=nl(.5,.95,eH);function nl(e,t,i){return r=>r<e?0:r>t?1:i(iN(e,t,r))}function nu(e,t){e.min=t.min,e.max=t.max}function nd(e,t){nu(e.x,t.x),nu(e.y,t.y)}function nc(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nh(e,t,i,r,n){return e-=t,e=r+1/i*(e-r),void 0!==n&&(e=r+1/n*(e-r)),e}function np(e,t,i,r,n){let[a,s,o]=i;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,n=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;if(ee.test(t)&&(t=parseFloat(t),t=iM(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let o=iM(a.min,a.max,r);e===a&&(o-=t),e.min=nh(e.min,t,i,o,n),e.max=nh(e.max,t,i,o,n)}(e,t[a],t[s],t[o],t.scale,r,n)}let nm=["x","scaleX","originX"],nf=["y","scaleY","originY"];function nv(e,t,i,r){np(e.x,t,nm,i?i.x:void 0,r?r.x:void 0),np(e.y,t,nf,i?i.y:void 0,r?r.y:void 0)}function ny(e){return 0===e.translate&&1===e.scale}function ng(e){return ny(e.x)&&ny(e.y)}function n_(e,t){return e.min===t.min&&e.max===t.max}function nb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nT(e,t){return nb(e.x,t.x)&&nb(e.y,t.y)}function nw(e){return rk(e.x)/rk(e.y)}function nE(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nx{add(e){ej(this.members,e),e.scheduleRender()}remove(e){if(eF(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t;let i=this.members.findIndex(t=>e===t);if(0===i)return!1;for(let e=i;e>=0;e--){let i=this.members[e];if(!1!==i.isPresent){t=i;break}}return!!t&&(this.promote(t),!0)}promote(e,t){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;!1===r&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}constructor(){this.members=[]}}let nk=(e,t)=>e.depth-t.depth;class nP{add(e){ej(this.children,e),this.isDirty=!0}remove(e){eF(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nk),this.isDirty=!1,this.children.forEach(e)}constructor(){this.children=[],this.isDirty=!1}}let nA={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},nS=void 0!==window.MotionDebug,nD=["","X","Y","Z"],nR={visibility:"hidden"},nO=0;function nC(e,t,i,r){let{latestValues:n}=t;n[e]&&(i[e]=n[e],t.setStaticValue(e,0),r&&(r[e]=0))}function nL(e){let{attachResizeListener:t,defaultParent:i,measureScroll:r,checkIsScrollRoot:n,resetTransform:a}=e;return class{addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new rt),this.eventHandlers.get(e).add(t)}notifyListeners(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];let n=this.eventHandlers.get(e);n&&n.notify(...i)}hasListeners(e){return this.eventHandlers.has(e)}mount(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root.hasTreeAnimated;if(this.instance)return;this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;let{layoutId:r,layout:n,visualElement:a}=this.options;if(a&&!a.current&&a.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),i&&(n||r)&&(this.isLayoutDirty=!0),t){let i;let r=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,i&&i(),i=function(e,t){let i=io.now(),r=n=>{let{timestamp:a}=n,s=a-i;s>=t&&(eG(r),e(s-t))};return eW.read(r,!0),()=>eG(r)}(r,250),r4.hasAnimatedSinceResize&&(r4.hasAnimatedSinceResize=!1,this.nodes.forEach(nU))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||n)&&this.addEventListener("didUpdate",e=>{let{delta:t,hasLayoutChanged:i,hasRelativeTargetChanged:r,layout:n}=e;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let s=this.options.transition||a.getDefaultTransition()||nQ,{onLayoutAnimationStart:o,onLayoutAnimationComplete:l}=a.getProps(),u=!this.targetLayout||!nT(this.targetLayout,n)||r,d=!i&&r;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||d||i&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,d);let e={...tb(s,"layout"),onPlay:o,onComplete:l};(a.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else i||nU(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,eG(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){!this.isUpdateBlocked()&&(this.isUpdating=!0,this.nodes&&this.nodes.forEach(nG),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedTransform&&!this.hasCheckedOptimisedAppear&&function e(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:i}=t.options;if(!i)return;let r=rs(i);window.MotionHasOptimisedTransformAnimation(r)&&window.MotionCancelOptimisedTransform(r);let{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&e(n)}(this),this.root.isUpdating||this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:i}=this.options;if(void 0===t&&!i)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nj);return}this.isUpdating||this.nodes.forEach(nF),this.isUpdating=!1,this.nodes.forEach(nB),this.nodes.forEach(nN),this.nodes.forEach(nM),this.clearAllSnapshots();let e=io.now();eK.delta=H(0,1e3/60,e-eK.timestamp),eK.timestamp=e,eK.isProcessing=!0,ez.update.process(eK),ez.preRender.process(eK),ez.render.process(eK),eK.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,y.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(nq),this.sharedNodes.forEach(nK)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,eW.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){eW.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=rq(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!a)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ng(this.projectionDelta),i=this.getTransformTemplate(),r=i?i(this.latestValues,""):void 0,n=r!==this.prevTransformTemplateValue;e&&(t||rH(this.latestValues)||n)&&(a(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],i=this.measurePageBox(),r=this.removeElementScroll(i);return t&&(r=this.removeTransform(r)),n$((e=r).x),n$(e.y),{animationId:this.root.animationId,measuredBox:i,layoutBox:r,latestValues:{},source:this.id}}measurePageBox(){var e;let{visualElement:t}=this.options;if(!t)return rq();let i=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(n1))){let{scroll:e}=this.root;e&&(rY(i.x,e.offset.x),rY(i.y,e.offset.y))}return i}removeElementScroll(e){var t;let i=rq();if(nd(i,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return i;for(let t=0;t<this.path.length;t++){let r=this.path[t],{scroll:n,options:a}=r;r!==this.root&&n&&a.layoutScroll&&(n.wasRoot&&nd(i,e),rY(i.x,n.offset.x),rY(i.y,n.offset.y))}return i}applyTransform(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=rq();nd(i,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&rQ(i,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),rH(r.latestValues)&&rQ(i,r.latestValues)}return rH(this.latestValues)&&rQ(i,this.latestValues),i}removeTransform(e){let t=rq();nd(t,e);for(let e=0;e<this.path.length;e++){let i=this.path[e];if(!i.instance||!rH(i.latestValues))continue;rU(i.latestValues)&&i.updateSnapshot();let r=rq();nd(r,i.measurePageBox()),nv(t,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,r)}return rH(this.latestValues)&&nv(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==eK.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(){var e,t,i,r;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);let s=!!this.resumingFrom||this!==a;if(!(n||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:o,layoutId:l}=this.options;if(this.layout&&(o||l)){if(this.resolvedRelativeTargetAt=eK.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rq(),this.relativeTargetOrigin=rq(),rR(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),nd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if((this.target||(this.target=rq(),this.targetWithTransforms=rq()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target)?(this.forceRelativeParentToResolveTarget(),t=this.target,i=this.relativeTarget,r=this.relativeParent.target,rS(t.x,i.x,r.x),rS(t.y,i.y,r.y)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nd(this.target,this.layout.layoutBox),rz(this.target,this.targetDelta)):nd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rq(),this.relativeTargetOrigin=rq(),rR(this.relativeTargetOrigin,this.target,e.target),nd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}nS&&nA.resolvedTargetDeltas++}}}getClosestProjectingParent(){return!this.parent||rU(this.parent.latestValues)||rW(this.parent.latestValues)?void 0:this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;let t=this.getLead(),i=!!this.resumingFrom||this!==t,r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===eK.timestamp&&(r=!1),r)return;let{layout:n,layoutId:a}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(n||a))return;nd(this.layoutCorrected,this.layout.layoutBox);let s=this.treeScale.x,o=this.treeScale.y;!function(e,t,i){let r,n,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.length;if(s){t.x=t.y=1;for(let o=0;o<s;o++){n=(r=i[o]).projectionDelta;let{visualElement:s}=r.options;(!s||!s.props.style||"contents"!==s.props.style.display)&&(a&&r.options.layoutScroll&&r.scroll&&r!==r.root&&rQ(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),n&&(t.x*=n.x.scale,t.y*=n.y.scale,rz(e,n)),a&&rH(r.latestValues)&&rQ(e,r.latestValues))}t.x<1.0000000000001&&t.x>.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,i),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms=rq());let{target:l}=t;if(!l){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}this.projectionDelta&&this.prevProjectionDelta?(nc(this.prevProjectionDelta.x,this.projectionDelta.x),nc(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),rA(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===o&&nE(this.projectionDelta.x,this.prevProjectionDelta.x)&&nE(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),nS&&nA.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(){var e;let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=rI(),this.projectionDelta=rI(),this.projectionDeltaWithTransform=rI()}setAnimationOrigin(e){let t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.snapshot,n=r?r.latestValues:{},a={...this.latestValues},s=rI();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let o=rq(),l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),u=this.getStack(),d=!u||u.members.length<=1,c=!!(l&&!d&&!0===this.options.crossfade&&!this.path.some(nX));this.animationProgress=0,this.mixTargetDelta=i=>{let r=i/1e3;if(nz(s.x,e.x,r),nz(s.y,e.y,r),this.setTargetDelta(s),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout){var u,h,p,m;rR(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,nY(p.x,m.x,o.x,r),nY(p.y,m.y,o.y,r),t&&(u=this.relativeTarget,h=t,n_(u.x,h.x)&&n_(u.y,h.y))&&(this.isProjectionDirty=!1),t||(t=rq()),nd(t,this.relativeTarget)}l&&(this.animationValues=a,function(e,t,i,r,n,a){n?(e.opacity=iM(0,void 0!==i.opacity?i.opacity:1,ns(r)),e.opacityExit=iM(void 0!==t.opacity?t.opacity:1,0,no(r))):a&&(e.opacity=iM(void 0!==t.opacity?t.opacity:1,void 0!==i.opacity?i.opacity:1,r));for(let n=0;n<ni;n++){let a="border".concat(nt[n],"Radius"),s=na(t,a),o=na(i,a);(void 0!==s||void 0!==o)&&(s||(s=0),o||(o=0),0===s||0===o||nn(s)===nn(o)?(e[a]=Math.max(iM(nr(s),nr(o),r),0),(ee.test(o)||ee.test(s))&&(e[a]+="%")):e[a]=o)}(t.rotate||i.rotate)&&(e.rotate=iM(t.rotate||0,i.rotate||0,r))}(a,n,this.latestValues,r,c,d)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(eG(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=eW.update(()=>{r4.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,i){let r=B(e)?e:ra(e);return r.start(re("",r,1e3,i)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:i,layout:r,latestValues:n}=e;if(t&&i&&r){if(this!==e&&this.layout&&r&&n0(this.options.animationType,this.layout.layoutBox,r.layoutBox)){i=this.target||rq();let t=rk(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let r=rk(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+r}nd(t,i),rQ(t,n),rA(this.projectionDeltaWithTransform,this.layoutCorrected,t,n)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new nx),this.sharedNodes.get(e).add(t);let i=t.options.initialPromotionConfig;t.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){var e;let{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;let{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote(){let{needsReset:e,transition:t,preserveFollowOpacity:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.getStack();r&&r.promote(this,i),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:i}=e;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(t=!0),!t)return;let r={};i.z&&nC("z",e,r,this.animationValues);for(let t=0;t<nD.length;t++)nC("rotate".concat(nD[t]),e,r,this.animationValues),nC("skew".concat(nD[t]),e,r,this.animationValues);for(let t in e.render(),r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,i;if(!this.instance||this.isSVG)return;if(!this.isVisible)return nR;let r={visibility:""},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=eI(null==e?void 0:e.pointerEvents)||"",r.transform=n?n(this.latestValues,""):"none",r;let a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){let t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=eI(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!rH(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1),t}let s=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,i){let r="",n=e.x.translate/t.x,a=e.y.translate/t.y,s=(null==i?void 0:i.z)||0;if((n||a||s)&&(r="translate3d(".concat(n,"px, ").concat(a,"px, ").concat(s,"px) ")),(1!==t.x||1!==t.y)&&(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),i){let{transformPerspective:e,rotate:t,rotateX:n,rotateY:a,skewX:s,skewY:o}=i;e&&(r="perspective(".concat(e,"px) ").concat(r)),t&&(r+="rotate(".concat(t,"deg) ")),n&&(r+="rotateX(".concat(n,"deg) ")),a&&(r+="rotateY(".concat(a,"deg) ")),s&&(r+="skewX(".concat(s,"deg) ")),o&&(r+="skewY(".concat(o,"deg) "))}let o=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==o||1!==l)&&(r+="scale(".concat(o,", ").concat(l,")")),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),n&&(r.transform=n(s,r.transform));let{x:o,y:l}=this.projectionDelta;for(let e in r.transformOrigin="".concat(100*o.origin,"% ").concat(100*l.origin,"% 0"),a.animationValues?r.opacity=a===this?null!==(i=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==i?i:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=a===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,V){if(void 0===s[e])continue;let{correct:t,applyTo:i}=V[e],n="none"===r.transform?s[e]:t(s[e],a);if(i){let e=i.length;for(let t=0;t<e;t++)r[i[t]]=n}else r[e]=n}return this.options.layoutId&&(r.pointerEvents=a===this?eI(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(nj),this.root.sharedNodes.clear()}constructor(e={},t=null==i?void 0:i()){this.id=nO++,this.animationId=0,this.children=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=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,nS&&(nA.totalNodes=nA.resolvedTargetDeltas=nA.recalculatedProjection=0),this.nodes.forEach(nI),this.nodes.forEach(nH),this.nodes.forEach(nW),this.nodes.forEach(nV),nS&&window.MotionDebug.record(nA)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=t?t.root||t:this,this.path=t?[...t.path,t]:[],this.parent=t,this.depth=t?t.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new nP)}}}function nN(e){e.updateLayout()}function nM(e){var t;let i=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){let{layoutBox:t,measuredBox:r}=e.layout,{animationType:n}=e.options,a=i.source!==e.layout.source;"size"===n?rj(e=>{let r=a?i.measuredBox[e]:i.layoutBox[e],n=rk(r);r.min=t[e].min,r.max=r.min+n}):n0(n,i.layoutBox,t)&&rj(r=>{let n=a?i.measuredBox[r]:i.layoutBox[r],s=rk(t[r]);n.max=n.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});let s=rI();rA(s,t,i.layoutBox);let o=rI();a?rA(o,e.applyTransform(r,!0),i.measuredBox):rA(o,t,i.layoutBox);let l=!ng(s),u=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:n,layout:a}=r;if(n&&a){let s=rq();rR(s,i.layoutBox,n.layoutBox);let o=rq();rR(o,t,a.layoutBox),nT(s,o)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:i,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function nI(e){nS&&nA.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function nq(e){e.clearSnapshot()}function nj(e){e.clearMeasurements()}function nF(e){e.isLayoutDirty=!1}function nB(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nU(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function nH(e){e.resolveTargetDelta()}function nW(e){e.calcProjection()}function nG(e){e.resetSkewAndRotation()}function nK(e){e.removeLeadSnapshot()}function nz(e,t,i){e.translate=iM(t.translate,0,i),e.scale=iM(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function nY(e,t,i,r){e.min=iM(t.min,i.min,r),e.max=iM(t.max,i.max,r)}function nX(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}let nQ={duration:.45,ease:[.4,0,.1,1]},nJ=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nZ=nJ("applewebkit/")&&!nJ("chrome/")?Math.round:eH;function n$(e){e.min=nZ(e.min),e.max=nZ(e.max)}function n0(e,t,i){return"position"===e||"preserve-aspect"===e&&!(.2>=Math.abs(nw(t)-nw(i)))}function n1(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}let n2=nL({attachResizeListener:(e,t)=>eQ(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),n3={current:void 0},n5=nL({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!n3.current){let e=new n2({});e.mount(window),e.setOptions({layoutScroll:!0}),n3.current=e}return n3.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),n4={current:null},n9={current:!1},n8=new WeakMap,n6=[...tM,tQ,t5],n7=e=>n6.find(tN(e)),ae=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],at=A.length;class ai{scrapeMotionValuesFromProps(e,t,i){return{}}mount(e){this.current=e,n8.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),n9.current||function(){if(n9.current=!0,window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>n4.current=e.matches;e.addListener(t),t()}else n4.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||n4.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){for(let e in n8.delete(this.current),this.projection&&this.projection.unmount(),eG(this.notifyUpdate),eG(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let i=j.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&eW.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),n=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),n(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in C){let t=C[e];if(!t)continue;let{isEnabled:i,Feature:r}=t;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rq()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ae.length;t++){let i=ae[t];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);let r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=function(e,t,i){for(let r in t){let n=t[r],a=i[r];if(B(n))e.addValue(r,n);else if(B(a))e.addValue(r,ra(n,{owner:e}));else if(a!==n){if(e.hasValue(r)){let t=e.getValue(r);!0===t.liveStyle?t.jump(n):t.hasAnimated||t.set(n)}else{let t=e.getStaticValue(r);e.addValue(r,ra(void 0!==t?t:n,{owner:e}))}}}for(let r in i)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){let e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}let t={};for(let e=0;e<at;e++){let i=A[e],r=this.props[i];(x(r)||!1===r)&&(t[i]=r)}return t}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=ra(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){var i;let r=void 0===this.latestValues[e]&&this.current?null!==(i=this.getBaseTargetFromProps(this.props,e))&&void 0!==i?i:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(tk(r)||tx(r))?r=parseFloat(r):!n7(r)&&t5.test(t)&&(r=it(e,t)),this.setBaseTarget(e,B(r)?r.get():r)),B(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;let i;let{initial:r}=this.props;if("string"==typeof r||"object"==typeof r){let n=eC(this.props,r,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);n&&(i=n[e])}if(r&&void 0!==i)return i;let n=this.getBaseTargetFromProps(this.props,e);return void 0===n||B(n)?void 0!==this.initialValues[e]&&void 0===i?void 0:this.baseTarget[e]:n}on(e,t){return this.events[e]||(this.events[e]=new rt),this.events[e].add(t)}notify(e){for(var t=arguments.length,i=Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];this.events[e]&&this.events[e].notify(...i)}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:n,visualState:a},s={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=tU,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.isRenderScheduled=!1,this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.isRenderScheduled=!1,this.scheduleRender=()=>{this.isRenderScheduled||(this.isRenderScheduled=!0,eW.render(this.render,!1,!0))};let{latestValues:o,renderState:l}=a;this.latestValues=o,this.baseTarget={...o},this.initialValues=t.initial?{...o}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=!!n,this.isControllingVariants=S(t),this.isVariantNode=D(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];void 0!==o[e]&&B(t)&&t.set(o[e],!1)}}}class ar extends ai{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,t){let{vars:i,style:r}=t;delete i[e],delete r[e]}constructor(){super(...arguments),this.KeyframeResolver=ir}}class an extends ar{readValueFromInstance(e,t){if(j.has(t)){let e=ie(t);return e&&e.default||0}{let i=window.getComputedStyle(e),r=(ed(t)?i.getPropertyValue(t):i[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,t){let{transformPagePoint:i}=t;return rJ(e,i)}build(e,t,i){em(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return eD(e,t,i)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent="".concat(e))}))}constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=eP}}class aa extends ar{getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(j.has(t)){let e=ie(t);return e&&e.default||0}return t=eA.has(t)?t:h(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,i){return eR(e,t,i)}build(e,t,i){eE(e,t,this.isSVGTag,i.transformTemplate)}renderInstance(e,t,i,r){eS(e,t,i,r)}mount(e){this.isSVGTag=ek(e.tagName),super.mount(e)}constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rq}}let as=(e,t)=>I(e)?new aa(t):new an(t,{allowProjection:e!==s.Fragment}),ao={animation:{Feature:rv},exit:{Feature:rg},inView:{Feature:td},tap:{Feature:tn},focus:{Feature:tt},hover:{Feature:te},pan:{Feature:r5},drag:{Feature:r2,ProjectionNode:n5,MeasureLayout:r7},layout:{ProjectionNode:n5,MeasureLayout:r7}},al=function(e){function t(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){let{preloadedFeatures:t,createVisualElement:i,useRender:r,useVisualState:n,Component:h}=e;t&&function(e){for(let t in e)C[t]={...C[t],...e[t]}}(t);let m=(0,s.forwardRef)(function(e,t){var m;let f;let v={...(0,s.useContext)(o),...e,layoutId:function(e){let{layoutId:t}=e,i=(0,s.useContext)(L).id;return i&&void 0!==t?i+"-"+t:t}(e)},{isStatic:g}=v,k=function(e){let{initial:t,animate:i}=function(e,t){if(S(e)){let{initial:t,animate:i}=e;return{initial:!1===t||x(t)?t:void 0,animate:x(i)?i:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(l));return(0,s.useMemo)(()=>({initial:t,animate:i}),[R(t),R(i)])}(e),P=n(e,g);if(!g){(0,s.useContext)(c).strict;let e=function(e){let{drag:t,layout:i}=C;if(!t&&!i)return{};let r={...t,...i};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==i?void 0:i.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(v);f=e.MeasureLayout,k.visualElement=function(e,t,i,r,n){var a;let{visualElement:h}=(0,s.useContext)(l),m=(0,s.useContext)(c),f=(0,s.useContext)(u),v=(0,s.useContext)(o).reducedMotion,g=(0,s.useRef)();r=r||m.renderer,!g.current&&r&&(g.current=r(e,{visualState:t,parent:h,props:i,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:v}));let x=g.current,k=(0,s.useContext)(T);x&&!x.projection&&n&&("html"===x.type||"svg"===x.type)&&function(e,t,i,r){let{layoutId:n,layout:a,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:u}=t;e.projection=new i(e.latestValues,t["data-framer-portal-id"]?void 0:function e(t){if(t)return!1!==t.options.allowProjection?t.projection:e(t.parent)}(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!s||o&&b(o),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(g.current,i,n,k),(0,s.useInsertionEffect)(()=>{x&&x.update(i,f)});let P=i[p],A=(0,s.useRef)(!!P&&!window.MotionHandoffIsComplete&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,P)));return d(()=>{x&&(x.updateFeatures(),y.render(x.render),A.current&&x.animationState&&x.animationState.animateChanges())}),(0,s.useEffect)(()=>{x&&(!A.current&&x.animationState&&x.animationState.animateChanges(),A.current=!1,w||(w=!0,queueMicrotask(E)))}),x}(h,P,v,i,e.ProjectionNode)}return(0,a.jsxs)(l.Provider,{value:k,children:[f&&k.visualElement?(0,a.jsx)(f,{visualElement:k.visualElement,...v}):null,r(h,e,(m=k.visualElement,(0,s.useCallback)(e=>{e&&P.mount&&P.mount(e),m&&(e?m.mount(e):m.unmount()),t&&("function"==typeof t?t(e):b(t)&&(t.current=e))},[m])),P,g,k.visualElement)]})});return m[N]=h,m}(e(t,i))}if("undefined"==typeof Proxy)return t;let i=new Map;return new Proxy(t,{get:(e,r)=>(i.has(r)||i.set(r,t(r)),i.get(r))})}((e,t)=>(function(e,t,i,r){let{forwardMotionProps:n=!1}=t;return{...I(e)?eY:eX,preloadedFeatures:i,useRender:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(t,i,r,n,a)=>{let{latestValues:o}=n,l=(I(t)?function(e,t,i,r){let n=(0,s.useMemo)(()=>{let i=ex();return eE(i,t,ek(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let t={};ev(t,e.style,e),n.style={...t,...n.style}}return n}:function(e,t){let i={},r=function(e,t){let i=e.style||{},r={};return ev(r,i,e),Object.assign(r,function(e,t){let{transformTemplate:i}=e;return(0,s.useMemo)(()=>{let e=ef();return em(e,t,i),Object.assign({},e.vars,e.style)},[t])}(e,t)),r}(e,t);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=r,i})(i,o,a,t),u=function(e,t,i){let r={};for(let n in e)("values"!==n||"object"!=typeof e.values)&&(e_(n)||!0===i&&eg(n)||!t&&!eg(n)||e.draggable&&n.startsWith("onDrag"))&&(r[n]=e[n]);return r}(i,"string"==typeof t,e),d=t!==s.Fragment?{...u,...l,ref:r}:{},{children:c}=i,h=(0,s.useMemo)(()=>B(c)?c.get():c,[c]);return(0,s.createElement)(t,{...d,children:h})}}(n),createVisualElement:r,Component:e}})(e,t,ao,as))}}]);