Input: !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="38501799-bf53-48e9-97f1-4f399cc0f259",t._sentryDebugIdIdentifier="sentry-dbid-38501799-bf53-48e9-97f1-4f399cc0f259")}catch(t){}}(),function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="38501799-bf53-48e9-97f1-4f399cc0f259",t._sentryDebugIdIdentifier="sentry-dbid-38501799-bf53-48e9-97f1-4f399cc0f259")}catch(t){}}(),function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="38501799-bf53-48e9-97f1-4f399cc0f259",t._sentryDebugIdIdentifier="sentry-dbid-38501799-bf53-48e9-97f1-4f399cc0f259")}catch(t){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[59631],{877571:(t,e,i)=>{i.d(e,{C:()=>N,E:()=>q,S:()=>B,_:()=>h,a:()=>a,b:()=>w,c:()=>D,d:()=>p,e:()=>J,f:()=>$,h:()=>Q,i:()=>g,m:()=>Z,p:()=>v,r:()=>F,s:()=>tt,t:()=>m,w:()=>et});const s={toVector:(t,e)=>(void 0===t&&(t=e),Array.isArray(t)?t:[t,t]),add:(t,e)=>[t[0]+e[0],t[1]+e[1]],sub:(t,e)=>[t[0]-e[0],t[1]-e[1]],addTo(t,e){t[0]+=e[0],t[1]+=e[1]},subTo(t,e){t[0]-=e[0],t[1]-=e[1]}};function n(t,e,i){return 0===e||Math.abs(e)===1/0?Math.pow(t,5*i):t*e*i/(e+i*t)}function o(t,e,i,s=.15){return 0===s?function(t,e,i){return Math.max(e,Math.min(t,i))}(t,e,i):t<e?-n(e-t,i-e,s)+e:t>i?+n(t-i,i-e,s)+i:t}function r(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}function a(t,e,i){return(e=r(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function h(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}const u={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function l(t){return t?t[0].toUpperCase()+t.slice(1):""}const d=["enter","leave"];function p(t,e="",i=!1){const s=u[t],n=s&&s[e]||e;return"on"+l(t)+l(n)+(function(t=!1,e){return t&&!d.includes(e)}(i,n)?"Capture":"")}const f=["gotpointercapture","lostpointercapture"];function v(t){let e=t.substring(2).toLowerCase();const i=!!~e.indexOf("passive");i&&(e=e.replace("passive",""));const s=f.includes(e)?"capturecapture":"capture",n=!!~e.indexOf(s);return n&&(e=e.replace("capture","")),{device:e,capture:n,passive:i}}function m(t,e=""){const i=u[t];return t+(i&&i[e]||e)}function g(t){return"touches"in t}function _(t){return g(t)?"touch":"pointerType"in t?t.pointerType:"mouse"}function b(t){return g(t)?function(t){return"touchend"===t.type||"touchcancel"===t.type?t.changedTouches:t.targetTouches}(t)[0]:t}function y(t,e){try{const i=e.clientX-t.clientX,s=e.clientY-t.clientY,n=(e.clientX+t.clientX)/2,o=(e.clientY+t.clientY)/2,r=Math.hypot(i,s),a=-180*Math.atan2(i,s)/Math.PI;return{angle:a,distance:r,origin:[n,o]}}catch(t){}return null}function w(t){return function(t){return Array.from(t.touches).filter((e=>{var i,s;return e.target===t.currentTarget||(null===(i=t.currentTarget)||void 0===i||null===(s=i.contains)||void 0===s?void 0:s.call(i,e.target))}))}(t).map((t=>t.identifier))}function S(t,e){const[i,s]=Array.from(t.touches).filter((t=>e.includes(t.identifier)));return y(i,s)}function k(t){const e=b(t);return g(t)?e.identifier:e.pointerId}function I(t){const e=b(t);return[e.clientX,e.clientY]}function E(t){let{deltaX:e,deltaY:i,deltaMode:s}=t;return 1===s?(e*=40,i*=40):2===s&&(e*=800,i*=800),[e,i]}function T(t,...e){return"function"==typeof t?t(...e):t}function x(){}function D(...t){return 0===t.length?x:1===t.length?t[0]:function(){let e;for(const i of t)e=i.apply(this,arguments)||e;return e}}function O(t,e){return Object.assign({},e,t||{})}class M{constructor(t,e,i){this.ctrl=t,this.args=e,this.key=i,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:e,ingKey:i,args:s}=this;e[i]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=s,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const e=this.state,i=this.config;e._active||(this.reset(),this.computeInitial(),e._active=!0,e.target=t.target,e.currentTarget=t.currentTarget,e.lastOffset=i.from?T(i.from,e):e.offset,e.offset=e.lastOffset,e.startTime=e.timeStamp=t.timeStamp)}computeValues(t){const e=this.state;e._values=t,e.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:e,config:i,shared:n}=this;e.args=this.args;let r=0;if(t&&(e.event=t,i.preventDefault&&t.cancelable&&e.event.preventDefault(),e.type=t.type,n.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,n.locked=!!document.pointerLockElement,Object.assign(n,function(t){const e={};if("buttons"in t&&(e.buttons=t.buttons),"shiftKey"in t){const{shiftKey:i,altKey:s,metaKey:n,ctrlKey:o}=t;Object.assign(e,{shiftKey:i,altKey:s,metaKey:n,ctrlKey:o})}return e}(t)),n.down=n.pressed=n.buttons%2==1||n.touches>0,r=t.timeStamp-e.timeStamp,e.timeStamp=t.timeStamp,e.elapsedTime=e.timeStamp-e.startTime),e._active){const t=e._delta.map(Math.abs);s.addTo(e._distance,t)}this.axisIntent&&this.axisIntent(t);const[a,c]=e._movement,[h,u]=i.threshold,{_step:l,values:d}=e;if(i.hasCustomTransform?(!1===l[0]&&(l[0]=Math.abs(a)>=h&&d[0]),!1===l[1]&&(l[1]=Math.abs(c)>=u&&d[1])):(!1===l[0]&&(l[0]=Math.abs(a)>=h&&Math.sign(a)*h),!1===l[1]&&(l[1]=Math.abs(c)>=u&&Math.sign(c)*u)),e.intentional=!1!==l[0]||!1!==l[1],!e.intentional)return;const p=[0,0];if(i.hasCustomTransform){const[t,e]=d;p[0]=!1!==l[0]?t-l[0]:0,p[1]=!1!==l[1]?e-l[1]:0}else p[0]=!1!==l[0]?a-l[0]:0,p[1]=!1!==l[1]?c-l[1]:0;this.restrictToAxis&&!e._blocked&&this.restrictToAxis(p);const f=e.offset,v=e._active&&!e._blocked||e.active;v&&(e.first=e._active&&!e.active,e.last=!e._active&&e.active,e.active=n[this.ingKey]=e._active,t&&(e.first&&("bounds"in i&&(e._bounds=T(i.bounds,e)),this.setup&&this.setup()),e.movement=p,this.computeOffset()));const[m,g]=e.offset,[[_,b],[y,w]]=e._bounds;e.overflow=[m<_?-1:m>b?1:0,g<y?-1:g>w?1:0],e._movementBound[0]=!!e.overflow[0]&&(!1===e._movementBound[0]?e._movement[0]:e._movementBound[0]),e._movementBound[1]=!!e.overflow[1]&&(!1===e._movementBound[1]?e._movement[1]:e._movementBound[1]);const S=e._active&&i.rubberband||[0,0];if(e.offset=function(t,[e,i],[s,n]){const[[r,a],[c,h]]=t;return[o(e,r,a,s),o(i,c,h,n)]}(e._bounds,e.offset,S),e.delta=s.sub(e.offset,f),this.computeMovement(),v&&(!e.last||r>32)){e.delta=s.sub(e.offset,f);const t=e.delta.map(Math.abs);s.addTo(e.distance,t),e.direction=e.delta.map(Math.sign),e._direction=e._delta.map(Math.sign),!e.first&&r>0&&(e.velocity=[t[0]/r,t[1]/r],e.timeDelta=r)}}emit(){const t=this.state,e=this.shared,i=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!i.triggerAllEvents)return;const s=this.handler(h(h(h({},e),t),{},{[this.aliasKey]:t.values}));void 0!==s&&(t.memo=s)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class C extends M{constructor(...t){super(...t),a(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=s.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=s.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const e=this.state,i=this.config;if(!e.axis&&t){const s="object"==typeof i.axisThreshold?i.axisThreshold[_(t)]:i.axisThreshold;e.axis=function([t,e],i){const s=Math.abs(t),n=Math.abs(e);return s>n&&s>i?"x":n>s&&n>i?"y":void 0}(e._movement,s)}e._blocked=(i.lockDirection||!!i.axis)&&!e.axis||!!i.axis&&i.axis!==e.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0}}}const A=t=>t,P={enabled:(t=!0)=>t,eventOptions:(t,e,i)=>h(h({},i.shared.eventOptions),t),preventDefault:(t=!1)=>t,triggerAllEvents:(t=!1)=>t,rubberband(t=0){switch(t){case!0:return[.15,.15];case!1:return[0,0];default:return s.toVector(t)}},from:t=>"function"==typeof t?t:null!=t?s.toVector(t):void 0,transform(t,e,i){const s=t||i.shared.transform;return this.hasCustomTransform=!!s,s||A},threshold:t=>s.toVector(t,0)};const K=h(h({},P),{},{axis(t,e,{axis:i}){if(this.lockDirection="lock"===i,!this.lockDirection)return i},axisThreshold:(t=0)=>t,bounds(t={}){if("function"==typeof t)return e=>K.bounds(t(e));if("current"in t)return()=>t.current;if("function"==typeof HTMLElement&&t instanceof HTMLElement)return t;const{left:e=-1/0,right:i=1/0,top:s=-1/0,bottom:n=1/0}=t;return[[e,i],[s,n]]}}),j={ArrowRight:(t,e=1)=>[t*e,0],ArrowLeft:(t,e=1)=>[-1*t*e,0],ArrowUp:(t,e=1)=>[0,-1*t*e],ArrowDown:(t,e=1)=>[0,t*e]};const L="undefined"!=typeof window&&window.document&&window.document.createElement;function V(){return L&&"ontouchstart"in window}const B={isBrowser:L,gesture:function(){try{return"constructor"in GestureEvent}catch(t){return!1}}(),touch:V(),touchscreen:V()||L&&window.navigator.maxTouchPoints>1,pointer:L&&"onpointerdown"in window,pointerLock:L&&"exitPointerLock"in window.document},H={mouse:0,touch:0,pen:8},U=h(h({},K),{},{device(t,e,{pointer:{touch:i=!1,lock:s=!1,mouse:n=!1}={}}){return this.pointerLock=s&&B.pointerLock,B.touch&&i?"touch":this.pointerLock?"mouse":B.pointer&&!n?"pointer":B.touch?"touch":"mouse"},preventScrollAxis(t,e,{preventScroll:i}){if(this.preventScrollDelay="number"==typeof i?i:i||void 0===i&&t?250:void 0,B.touchscreen&&!1!==i)return t||(void 0!==i?"y":void 0)},pointerCapture(t,e,{pointer:{capture:i=!0,buttons:s=1,keys:n=!0}={}}){return this.pointerButtons=s,this.keys=n,!this.pointerLock&&"pointer"===this.device&&i},threshold(t,e,{filterTaps:i=!1,tapsThreshold:n=3,axis:o}){const r=s.toVector(t,i?n:o?1:0);return this.filterTaps=i,this.tapsThreshold=n,r},swipe({velocity:t=.5,distance:e=50,duration:i=250}={}){return{velocity:this.transform(s.toVector(t)),distance:this.transform(s.toVector(e)),duration:i}},delay(t=0){switch(t){case!0:return 180;case!1:return 0;default:return t}},axisThreshold:t=>t?h(h({},H),t):H,keyboardDisplacement:(t=10)=>t});function X(t){const[e,i]=t.overflow,[s,n]=t._delta,[o,r]=t._direction;(e<0&&s>0&&o<0||e>0&&s<0&&o>0)&&(t._movement[0]=t._movementBound[0]),(i<0&&n>0&&r<0||i>0&&n<0&&r>0)&&(t._movement[1]=t._movementBound[1])}const Y=h(h({},P),{},{device(t,e,{shared:i,pointer:{touch:s=!1}={}}){if(i.target&&!B.touch&&B.gesture)return"gesture";if(B.touch&&s)return"touch";if(B.touchscreen){if(B.pointer)return"pointer";if(B.touch)return"touch"}},bounds(t,e,{scaleBounds:i={},angleBounds:s={}}){const n=t=>{const e=O(T(i,t),{min:-1/0,max:1/0});return[e.min,e.max]},o=t=>{const e=O(T(s,t),{min:-1/0,max:1/0});return[e.min,e.max]};return"function"!=typeof i&&"function"!=typeof s?[n(),o()]:t=>[n(t),o(t)]},threshold(t,e,i){this.lockDirection="lock"===i.axis;return s.toVector(t,this.lockDirection?[.1,3]:0)},modifierKey:t=>void 0===t?"ctrlKey":t,pinchOnWheel:(t=!0)=>t});const z=h(h({},K),{},{mouseOnly:(t=!0)=>t});const R=K;const W=K;const G=h(h({},K),{},{mouseOnly:(t=!0)=>t}),q=new Map,N=new Map;function F(t){q.set(t.key,t.engine),N.set(t.key,t.resolver)}const J={key:"drag",engine:class extends C{constructor(...t){super(...t),a(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const e=t._bounds.getBoundingClientRect(),i=t.currentTarget.getBoundingClientRect(),s={left:e.left-i.left+t.offset[0],right:e.right-i.right+t.offset[0],top:e.top-i.top+t.offset[1],bottom:e.bottom-i.bottom+t.offset[1]};t._bounds=K.bounds(s)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const e=this.config,i=this.state;if(null!=t.buttons&&(Array.isArray(e.pointerButtons)?!e.pointerButtons.includes(t.buttons):-1!==e.pointerButtons&&e.pointerButtons!==t.buttons))return;const s=this.ctrl.setEventIds(t);e.pointerCapture&&t.target.setPointerCapture(t.pointerId),s&&s.size>1&&i._pointerActive||(this.start(t),this.setupPointer(t),i._pointerId=k(t),i._pointerActive=!0,this.computeValues(I(t)),this.computeInitial(),e.preventScrollAxis&&"mouse"!==_(t)?(i._active=!1,this.setupScrollPrevention(t)):e.delay>0?(this.setupDelayTrigger(t),e.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const e=this.state;e._active=!0,e._preventScroll=!0,e._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const e=this.state,i=this.config;if(!e._pointerActive)return;const n=k(t);if(void 0!==e._pointerId&&n!==e._pointerId)return;const o=I(t);return document.pointerLockElement===t.target?e._delta=[t.movementX,t.movementY]:(e._delta=s.sub(o,e._values),this.computeValues(o)),s.addTo(e._movement,e._delta),this.compute(t),e._delayed&&e.intentional?(this.timeoutStore.remove("dragDelay"),e.active=!1,void this.startPointerDrag(t)):i.preventScrollAxis&&!e._preventScroll?e.axis?e.axis===i.preventScrollAxis||"xy"===i.preventScrollAxis?(e._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(t)):void 0:void this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch(t){0}const e=this.state,i=this.config;if(!e._active||!e._pointerActive)return;const s=k(t);if(void 0!==e._pointerId&&s!==e._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[n,o]=e._distance;if(e.tap=n<=i.tapsThreshold&&o<=i.tapsThreshold,e.tap&&i.filterTaps)e._force=!0;else{const[t,s]=e._delta,[n,o]=e._movement,[r,a]=i.swipe.velocity,[c,h]=i.swipe.distance,u=i.swipe.duration;if(e.elapsedTime<u){const i=Math.abs(t/e.timeDelta),u=Math.abs(s/e.timeDelta);i>r&&Math.abs(n)>c&&(e.swipe[0]=Math.sign(t)),u>a&&Math.abs(o)>h&&(e.swipe[1]=Math.sign(s))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const e=this.config,i=e.device;e.pointerLock&&t.currentTarget.requestPointerLock(),e.pointerCapture||(this.eventStore.add(this.sharedConfig.window,i,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,i,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,function(t){"persist"in t&&"function"==typeof t.persist&&t.persist()}(t);const e=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",e),this.eventStore.add(this.sharedConfig.window,"touch","cancel",e),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(t)}),this.config.delay)}keyDown(t){const e=j[t.key];if(e){const i=this.state,n=t.shiftKey?10:t.altKey?.1:1;this.start(t),i._delta=e(this.config.keyboardDisplacement,n),i._keyboardActive=!0,s.addTo(i._movement,i._delta),this.compute(t),this.emit()}}keyUp(t){t.key in j&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const e=this.config.device;t(e,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(e,"change",this.pointerMove.bind(this)),t(e,"end",this.pointerUp.bind(this)),t(e,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:U},Q={key:"hover",engine:class extends C{constructor(...t){super(...t),a(this,"ingKey","hovering")}enter(t){this.config.mouseOnly&&"mouse"!==t.pointerType||(this.start(t),this.computeValues(I(t)),this.compute(t),this.emit())}leave(t){if(this.config.mouseOnly&&"mouse"!==t.pointerType)return;const e=this.state;if(!e._active)return;e._active=!1;const i=I(t);e._movement=e._delta=s.sub(i,e._values),this.computeValues(i),this.compute(t),e.delta=e.movement,this.emit()}bind(t){t("pointer","enter",this.enter.bind(this)),t("pointer","leave",this.leave.bind(this))}},resolver:G},Z={key:"move",engine:class extends C{constructor(...t){super(...t),a(this,"ingKey","moving")}move(t){this.config.mouseOnly&&"mouse"!==t.pointerType||(this.state._active?this.moveChange(t):this.moveStart(t),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(t){this.start(t),this.computeValues(I(t)),this.compute(t),this.computeInitial(),this.emit()}moveChange(t){if(!this.state._active)return;const e=I(t),i=this.state;i._delta=s.sub(e,i._values),s.addTo(i._movement,i._delta),this.computeValues(e),this.compute(t),this.emit()}moveEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}bind(t){t("pointer","change",this.move.bind(this)),t("pointer","leave",this.moveEnd.bind(this))}},resolver:z},$={key:"pinch",engine:class extends M{constructor(...t){super(...t),a(this,"ingKey","pinching"),a(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const t=this.state;t._touchIds=[],t.canceled=!1,t.cancel=this.cancel.bind(this),t.turns=0}computeOffset(){const{type:t,movement:e,lastOffset:i}=this.state;this.state.offset="wheel"===t?s.add(e,i):[(1+e[0])*i[0],e[1]+i[1]]}computeMovement(){const{offset:t,lastOffset:e}=this.state;this.state.movement=[t[0]/e[0],t[1]-e[1]]}axisIntent(){const t=this.state,[e,i]=t._movement;if(!t.axis){const s=30*Math.abs(e)-Math.abs(i);s<0?t.axis="angle":s>0&&(t.axis="scale")}}restrictToAxis(t){this.config.lockDirection&&("scale"===this.state.axis?t[1]=0:"angle"===this.state.axis&&(t[0]=0))}cancel(){const t=this.state;t.canceled||setTimeout((()=>{t.canceled=!0,t._active=!1,this.compute(),this.emit()}),0)}touchStart(t){this.ctrl.setEventIds(t);const e=this.state,i=this.ctrl.touchIds;if(e._active&&e._touchIds.every((t=>i.has(t))))return;if(i.size<2)return;this.start(t),e._touchIds=Array.from(i).slice(0,2);const s=S(t,e._touchIds);s&&this.pinchStart(t,s)}pointerStart(t){if(null!=t.buttons&&t.buttons%2!=1)return;this.ctrl.setEventIds(t),t.target.setPointerCapture(t.pointerId);const e=this.state,i=e._pointerEvents,s=this.ctrl.pointerIds;if(e._active&&Array.from(i.keys()).every((t=>s.has(t))))return;if(i.size<2&&i.set(t.pointerId,t),e._pointerEvents.size<2)return;this.start(t);const n=y(...Array.from(i.values()));n&&this.pinchStart(t,n)}pinchStart(t,e){this.state.origin=e.origin,this.computeValues([e.distance,e.angle]),this.computeInitial(),this.compute(t),this.emit()}touchMove(t){if(!this.state._active)return;const e=S(t,this.state._touchIds);e&&this.pinchMove(t,e)}pointerMove(t){const e=this.state._pointerEvents;if(e.has(t.pointerId)&&e.set(t.pointerId,t),!this.state._active)return;const i=y(...Array.from(e.values()));i&&this.pinchMove(t,i)}pinchMove(t,e){const i=this.state,s=i._values[1],n=e.angle-s;let o=0;Math.abs(n)>270&&(o+=Math.sign(n)),this.computeValues([e.distance,e.angle-360*o]),i.origin=e.origin,i.turns=o,i._movement=[i._values[0]/i._initial[0]-1,i._values[1]-i._initial[1]],this.compute(t),this.emit()}touchEnd(t){this.ctrl.setEventIds(t),this.state._active&&this.state._touchIds.some((t=>!this.ctrl.touchIds.has(t)))&&(this.state._active=!1,this.compute(t),this.emit())}pointerEnd(t){const e=this.state;this.ctrl.setEventIds(t);try{t.target.releasePointerCapture(t.pointerId)}catch(t){}e._pointerEvents.has(t.pointerId)&&e._pointerEvents.delete(t.pointerId),e._active&&e._pointerEvents.size<2&&(e._active=!1,this.compute(t),this.emit())}gestureStart(t){t.cancelable&&t.preventDefault();const e=this.state;e._active||(this.start(t),this.computeValues([t.scale,t.rotation]),e.origin=[t.clientX,t.clientY],this.compute(t),this.emit())}gestureMove(t){if(t.cancelable&&t.preventDefault(),!this.state._active)return;const e=this.state;this.computeValues([t.scale,t.rotation]),e.origin=[t.clientX,t.clientY];const i=e._movement;e._movement=[t.scale-1,t.rotation],e._delta=s.sub(e._movement,i),this.compute(t),this.emit()}gestureEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}wheel(t){const e=this.config.modifierKey;e&&!(Array.isArray(e)?e.find((e=>t[e])):t[e])||(this.state._active?this.wheelChange(t):this.wheelStart(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(t){this.start(t),this.wheelChange(t)}wheelChange(t){"uv"in t||t.cancelable&&t.preventDefault();const e=this.state;e._delta=[-E(t)[1]/100*e.offset[0],0],s.addTo(e._movement,e._delta),X(e),this.state.origin=[t.clientX,t.clientY],this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){const e=this.config.device;e&&(t(e,"start",this[e+"Start"].bind(this)),t(e,"change",this[e+"Move"].bind(this)),t(e,"end",this[e+"End"].bind(this)),t(e,"cancel",this[e+"End"].bind(this)),t("lostPointerCapture","",this[e+"End"].bind(this))),this.config.pinchOnWheel&&t("wheel","",this.wheel.bind(this),{passive:!1})}},resolver:Y},tt={key:"scroll",engine:class extends C{constructor(...t){super(...t),a(this,"ingKey","scrolling")}scroll(t){this.state._active||this.start(t),this.scrollChange(t),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(t){t.cancelable&&t.preventDefault();const e=this.state,i=function(t){var e,i;const{scrollX:s,scrollY:n,scrollLeft:o,scrollTop:r}=t.currentTarget;return[null!==(e=null!=s?s:o)&&void 0!==e?e:0,null!==(i=null!=n?n:r)&&void 0!==i?i:0]}(t);e._delta=s.sub(i,e._values),s.addTo(e._movement,e._delta),this.computeValues(i),this.compute(t),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){t("scroll","",this.scroll.bind(this))}},resolver:R},et={key:"wheel",engine:class extends C{constructor(...t){super(...t),a(this,"ingKey","wheeling")}wheel(t){this.state._active||this.start(t),this.wheelChange(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(t){const e=this.state;e._delta=E(t),s.addTo(e._movement,e._delta),X(e),this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){t("wheel","",this.wheel.bind(this))}},resolver:W}},559631:(t,e,i)=>{i.d(e,{createUseGesture:()=>_,useGesture:()=>b});var s=i(877571),n=i(296540);function o(t,e){if(null==t)return{};var i,s,n=function(t,e){if(null==t)return{};var i,s,n={},o=Object.keys(t);for(s=0;s<o.length;s++)i=o[s],e.indexOf(i)>=0||(n[i]=t[i]);return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(s=0;s<o.length;s++)i=o[s],e.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}const r={target(t){if(t)return()=>"current"in t?t.current:t},enabled:(t=!0)=>t,window:(t=(s.S.isBrowser?window:void 0))=>t,eventOptions:({passive:t=!0,capture:e=!1}={})=>({passive:t,capture:e}),transform:t=>t},a=["target","eventOptions","window","enabled","transform"];function c(t={},e){const i={};for(const[s,n]of Object.entries(e))switch(typeof n){case"function":i[s]=n.call(i,t[s],s,t);break;case"object":i[s]=c(t[s],n);break;case"boolean":n&&(i[s]=t[s])}return i}class h{constructor(t,e){(0,s.a)(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=e}add(t,e,i,n,o){const r=this._listeners,a=(0,s.t)(e,i),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},h=(0,s._)((0,s._)({},c),o);t.addEventListener(a,n,h);const u=()=>{t.removeEventListener(a,n,h),r.delete(u)};return r.add(u),u}clean(){this._listeners.forEach((t=>t())),this._listeners.clear()}}class u{constructor(){(0,s.a)(this,"_timeouts",new Map)}add(t,e,i=140,...s){this.remove(t),this._timeouts.set(t,window.setTimeout(e,i,...s))}remove(t){const e=this._timeouts.get(t);e&&window.clearTimeout(e)}clean(){this._timeouts.forEach((t=>{window.clearTimeout(t)})),this._timeouts.clear()}}class l{constructor(t){(0,s.a)(this,"gestures",new Set),(0,s.a)(this,"_targetEventStore",new h(this)),(0,s.a)(this,"gestureEventStores",{}),(0,s.a)(this,"gestureTimeoutStores",{}),(0,s.a)(this,"handlers",{}),(0,s.a)(this,"config",{}),(0,s.a)(this,"pointerIds",new Set),(0,s.a)(this,"touchIds",new Set),(0,s.a)(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(t,e){e.drag&&d(t,"drag");e.wheel&&d(t,"wheel");e.scroll&&d(t,"scroll");e.move&&d(t,"move");e.pinch&&d(t,"pinch");e.hover&&d(t,"hover")}(this,t)}setEventIds(t){return(0,s.i)(t)?(this.touchIds=new Set((0,s.b)(t)),this.touchIds):"pointerId"in t?("pointerup"===t.type||"pointercancel"===t.type?this.pointerIds.delete(t.pointerId):"pointerdown"===t.type&&this.pointerIds.add(t.pointerId),this.pointerIds):void 0}applyHandlers(t,e){this.handlers=t,this.nativeHandlers=e}applyConfig(t,e){this.config=function(t,e,i={}){const n=t,{target:h,eventOptions:u,window:l,enabled:d,transform:p}=n,f=o(n,a);if(i.shared=c({target:h,eventOptions:u,window:l,enabled:d,transform:p},r),e){const t=s.C.get(e);i[e]=c((0,s._)({shared:i.shared},f),t)}else for(const t in f){const e=s.C.get(t);e&&(i[t]=c((0,s._)({shared:i.shared},f[t]),e))}return i}(t,e,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const e=this.config.shared,i={};let n;if(!e.target||(n=e.target(),n)){if(e.enabled){for(const e of this.gestures){const o=this.config[e],r=p(i,o.eventOptions,!!n);if(o.enabled){new(s.E.get(e))(this,t,e).bind(r)}}const o=p(i,e.eventOptions,!!n);for(const e in this.nativeHandlers)o(e,"",(i=>this.nativeHandlers[e]((0,s._)((0,s._)({},this.state.shared),{},{event:i,args:t}))),void 0,!0)}for(const t in i)i[t]=(0,s.c)(...i[t]);if(!n)return i;for(const t in i){const{device:e,capture:o,passive:r}=(0,s.p)(t);this._targetEventStore.add(n,e,"",i[t],{capture:o,passive:r})}}}}function d(t,e){t.gestures.add(e),t.gestureEventStores[e]=new h(t,e),t.gestureTimeoutStores[e]=new u}const p=(t,e,i)=>(n,o,r,a={},c=!1)=>{var h,u;const l=null!==(h=a.capture)&&void 0!==h?h:e.capture,d=null!==(u=a.passive)&&void 0!==u?u:e.passive;let p=c?n:(0,s.d)(n,o,l);i&&d&&(p+="Passive"),t[p]=t[p]||[],t[p].push(r)},f=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function v(t,e,i,n,o,r){if(!t.has(i))return;if(!s.E.has(n))return void 0;const a=i+"Start",c=i+"End";o[n]=t=>{let s;return t.first&&a in e&&e[a](t),i in e&&(s=e[i](t)),t.last&&c in e&&e[c](t),s},r[n]=r[n]||{}}function m(t,e){const[i,s,n]=function(t){const e={},i={},s=new Set;for(let n in t)f.test(n)?(s.add(RegExp.lastMatch),i[n]=t[n]):e[n]=t[n];return[i,e,s]}(t),o={};return v(n,i,"onDrag","drag",o,e),v(n,i,"onWheel","wheel",o,e),v(n,i,"onScroll","scroll",o,e),v(n,i,"onPinch","pinch",o,e),v(n,i,"onMove","move",o,e),v(n,i,"onHover","hover",o,e),{handlers:o,config:e,nativeHandlers:s}}function g(t,e={},i,s){const o=n.useMemo((()=>new l(t)),[]);if(o.applyHandlers(t,s),o.applyConfig(e,i),n.useEffect(o.effect.bind(o)),n.useEffect((()=>o.clean.bind(o)),[]),void 0===e.target)return o.bind.bind(o)}function _(t){return t.forEach(s.r),function(t,e){const{handlers:i,nativeHandlers:s,config:n}=m(t,e||{});return g(i,n,void 0,s)}}function b(t,e){return _([s.e,s.f,s.s,s.w,s.m,s.h])(t,e||{})}}}]);

Output:
!function() {
	try {
		var var1 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, stack = new var1.Error().stack;
		stack && (var1._sentryDebugIds = var1._sentryDebugIds || {}, var1._sentryDebugIds[stack] = "38501799-bf53-48e9-97f1-4f399cc0f259", var1._sentryDebugIdIdentifier = "sentry-dbid-38501799-bf53-48e9-97f1-4f399cc0f259");
	} catch (error) {}
}();
(function() {
	try {
		var var2 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, stack1 = new var2.Error().stack;
		stack1 && (var2._sentryDebugIds = var2._sentryDebugIds || {}, var2._sentryDebugIds[stack1] = "38501799-bf53-48e9-97f1-4f399cc0f259", var2._sentryDebugIdIdentifier = "sentry-dbid-38501799-bf53-48e9-97f1-4f399cc0f259");
	} catch (error1) {}
})();
(function() {
	try {
		var var3 = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, stack2 = new var3.Error().stack;
		stack2 && (var3._sentryDebugIds = var3._sentryDebugIds || {}, var3._sentryDebugIds[stack2] = "38501799-bf53-48e9-97f1-4f399cc0f259", var3._sentryDebugIdIdentifier = "sentry-dbid-38501799-bf53-48e9-97f1-4f399cc0f259");
	} catch (error2) {}
})();
(self.webpackChunktwitch_twilight = self.webpackChunktwitch_twilight || []).push([[59631], {
	877571: (var4, var5, var6) => {
		var6.d(var5, {
			C: () => map1,
			E: () => map,
			S: () => obj5,
			_: () => fn2,
			a: () => fn22,
			b: () => call,
			c: () => pick8,
			d: () => add,
			e: () => obj7,
			f: () => obj11,
			h: () => obj9,
			i: () => hasKey,
			m: () => obj10,
			p: () => fn3,
			r: () => fn11,
			s: () => obj12,
			t: () => add1,
			w: () => obj13
		});
		const obj = {
			toVector: (var7, var8) => undefined === var7 && (var7 = var8),
			add: (var9, var10) => [var9[0] + var10[0], var9[1] + var10[1]],
			sub: (var11, var12) => [var11[0] - var12[0], var11[1] - var12[1]],
			addTo(var13, var14) {
				var13[0] += var14[0];
				var13[1] += var14[1];
			},
			subTo(var15, var16) {
				var15[0] -= var16[0];
				var15[1] -= var16[1];
			}
		};
		function pick(var17, var18, var19) {
			return 0 === var18 || Math.abs(var18) === 1 / 0 ? Math.pow(var17, 5 * var19) : var17 * var18 * var19 / (var18 + var19 * var17);
		}
		function pick1(var20, var21, var22, var23 = .15) {
			return 0 === var23 ? function(var24, var25, var26) {
				return Math.max(var25, Math.min(var24, var26));
			}(var20, var21, var22) : var20 < var21 ? -pick(var21 - var20, var22 - var21, var23) + var21 : var20 > var22 ? +pick(var20 - var22, var22 - var21, var23) + var22 : var20;
		}
		function pick2(var27) {
			var var28 = function(var29, var30) {
				if ("object" != typeof var29 || null === var29) return var29;
				var var31 = var29[Symbol.toPrimitive];
				if (undefined !== var31) {
					var var32 = var31.call(var29, var30 || "default");
					if ("object" != typeof var32) return var32;
					throw new TypeError("@@toPrimitive must return a primitive value.");
				}
				return ("string" === var30 ? String : Number)(var29);
			}(var27, "string");
			return "symbol" == typeof var28 ? var28 : String(var28);
		}
		function fn22(var33, var34, var35) {
			(var34 = pick2(var34)) in var33 ? Object.defineProperty(var33, var34, {
				value: var35,
				enumerable: true,
				configurable: true,
				writable: true
			}) : var33[var34] = var35;
			return var33;
		}
		function fn1(var36, var37) {
			var list = Object.keys(var36);
			if (Object.getOwnPropertySymbols) {
				var list1 = Object.getOwnPropertySymbols(var36);
				var37 && (list1 = list1.filter((function(item) {
					return Object.getOwnPropertyDescriptor(var36, item).enumerable;
				})));
				list.push.apply(list, list1);
			}
			return list;
		}
		function fn2(var38) {
			for (var index = 1; index < arguments.length; index++) {
				var var39 = null != arguments[index] ? arguments[index] : {};
				index % 2 ? fn1(Object(var39), true).forEach((function(item1) {
					fn22(var38, item1, var39[item1]);
				})) : Object.getOwnPropertyDescriptors ? Object.defineProperties(var38, Object.getOwnPropertyDescriptors(var39)) : fn1(Object(var39)).forEach((function(item2) {
					Object.defineProperty(var38, item2, Object.getOwnPropertyDescriptor(var39, item2));
				}));
			}
			return var38;
		}
		const obj1 = {
			pointer: {
				start: "down",
				change: "move",
				end: "up"
			},
			mouse: {
				start: "down",
				change: "move",
				end: "up"
			},
			touch: {
				start: "start",
				change: "move",
				end: "end"
			},
			gesture: {
				start: "start",
				change: "change",
				end: "end"
			}
		};
		const arr = ["enter", "leave"];
		function add(var40, var41 = "", var42 = false) {
			const var43 = obj1[var40] && obj[var41] || var41;
			return "on" + (var40 ? var40[0].toUpperCase() + var40.slice(1) : "") + (var43 ? var43[0].toUpperCase() + var43.slice(1) : "") + (function(var44 = false, var45) {
				return var44 && !arr.includes(var45);
			}(var42, var43) ? "Capture" : "");
		}
		const arr1 = ["gotpointercapture", "lostpointercapture"];
		function fn3(str) {
			let str1 = str.substring(2).toLowerCase();
			const var46 = !!~str1.indexOf("passive");
			var46 && (str1 = str1.replace("passive", ""));
			const var47 = !!~str1.indexOf(arr1.includes(str1) ? "capturecapture" : "capture");
			var47 && (str1 = str1.replace("capture", ""));
			return {
				device: str1,
				capture: var47,
				passive: var46
			};
		}
		function add1(var48, var49 = "") {
			return var48 + (obj1[var48] && var6[var49] || var49);
		}
		function hasKey(var50) {
			return "touches" in var50;
		}
		function pick5(var51) {
			return "touches" in var51 ? function(var52) {
				return "touchend" === var52.type || "touchcancel" === var52.type ? var52.changedTouches : var52.targetTouches;
			}(var51)[0] : var51;
		}
		function fn4(var53, var54) {
			try {
				const var55 = var54.clientX - var53.clientX, var56 = var54.clientY - var53.clientY, var57 = (var54.clientX + var53.clientX) / 2, var58 = (var54.clientY + var53.clientY) / 2, var59 = Math.hypot(var55, var56), var60 = -180 * Math.atan2(var55, var56) / Math.PI;
				return {
					angle: var60,
					distance: var59,
					origin: [var57, var58]
				};
			} catch (error3) {}
			return null;
		}
		function call(var61) {
			return function(var62) {
				return Array.from(var62.touches).filter(((item3) => {
					var contains, var63;
					return item3.target === var62.currentTarget || (null === (contains = var62.currentTarget) || undefined === contains || null === (var63 = contains.contains) || undefined === var63 ? undefined : var63.call(contains, item3.target));
				}));
			}(var61).map(((item4) => item4.identifier));
		}
		function call1(touches, includes) {
			const [var64, var65] = Array.from(touches.touches).filter(((item5) => includes.includes(item5.identifier)));
			return fn4(var64, var65);
		}
		function pick6(var66) {
			const var67 = pick5(var66);
			return "touches" in var66 ? var67.identifier : var67.pointerId;
		}
		function fn5(var68) {
			const var69 = pick5(var68);
			return [var69.clientX, var69.clientY];
		}
		function fn6(var70) {
			let { deltaX: var71, deltaY: var72, deltaMode: var73 } = var70;
			1 === var73 ? (var71 *= 40, var72 *= 40) : 2 === var73 && (var71 *= 800, var72 *= 800);
			return [var71, var72];
		}
		function pick7(var74, ...var75) {
			return "function" == typeof var74 ? var74(...var75) : var74;
		}
		function fn7() {}
		function pick8(...list3) {
			return 0 === list3.length ? fn7 : 1 === list3.length ? list3[0] : function() {
				let var76;
				for (const var77 of list3) var76 = var77.apply(this, arguments) || var76;
				return var76;
			};
		}
		function call2(var78, var79) {
			return Object.assign({}, var79, var78 || {});
		}
		class fn8 {
			constructor(var80, var81, var82) {
				this.ctrl = var80;
				this.args = var81;
				this.key = var82;
				this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
			}
			get state() {
				return this.ctrl.state[this.key];
			}
			set state(var83) {
				this.ctrl.state[this.key] = var83;
			}
			get shared() {
				return this.ctrl.state.shared;
			}
			get eventStore() {
				return this.ctrl.gestureEventStores[this.key];
			}
			get timeoutStore() {
				return this.ctrl.gestureTimeoutStores[this.key];
			}
			get config() {
				return this.ctrl.config[this.key];
			}
			get sharedConfig() {
				return this.ctrl.config.shared;
			}
			get handler() {
				return this.ctrl.handlers[this.key];
			}
			reset() {
				const { state: var84, shared: var85, ingKey: var86, args: var87 } = this;
				var85[var86] = var84._active = var84.active = var84._blocked = var84._force = false;
				var84._step = [false, false];
				var84.intentional = false;
				var84._movement = [0, 0];
				var84._distance = [0, 0];
				var84._direction = [0, 0];
				var84._delta = [0, 0];
				var84._bounds = [[-1 / 0, 1 / 0], [-1 / 0, 1 / 0]];
				var84.args = var87;
				var84.axis = undefined;
				var84.memo = undefined;
				var84.elapsedTime = var84.timeDelta = 0;
				var84.direction = [0, 0];
				var84.distance = [0, 0];
				var84.overflow = [0, 0];
				var84._movementBound = [false, false];
				var84.velocity = [0, 0];
				var84.movement = [0, 0];
				var84.delta = [0, 0];
				var84.timeStamp = 0;
			}
			start(var88) {
				const state = this.state, config = this.config;
				state._active || (this.reset(), this.computeInitial(), state._active = true, state.target = var88.target, state.currentTarget = var88.currentTarget, state.lastOffset = config.from ? pick7(config.from, state) : state.offset, state.offset = state.lastOffset, state.startTime = state.timeStamp = var88.timeStamp);
			}
			computeValues(var89) {
				const state1 = this.state;
				state1._values = var89;
				state1.values = this.config.transform(var89);
			}
			computeInitial() {
				const state2 = this.state;
				state2._initial = state2._values;
				state2.initial = state2.values;
			}
			compute(var90) {
				const { state: var91, config: var92, shared: var93 } = this;
				var91.args = this.args;
				let num = 0;
				if (var90 && (var91.event = var90, var92.preventDefault && var90.cancelable && var91.event.preventDefault(), var91.type = var90.type, var93.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, var93.locked = !!document.pointerLockElement, Object.assign(var93, function(buttons) {
					const obj2 = {};
					if ("buttons" in buttons && (obj2.buttons = buttons.buttons), "shiftKey" in buttons) {
						const { shiftKey: var94, altKey: var95, metaKey: var96, ctrlKey: var97 } = buttons;
						Object.assign(obj2, {
							shiftKey: var94,
							altKey: var95,
							metaKey: var96,
							ctrlKey: var97
						});
					}
					return obj2;
				}(var90)), var93.down = var93.pressed = var93.buttons % 2 == 1 || var93.touches > 0, num = var90.timeStamp - var91.timeStamp, var91.timeStamp = var90.timeStamp, var91.elapsedTime = var91.timeStamp - var91.startTime), var91._active) {
					const var98 = var91._delta.map(Math.abs);
					obj.addTo(var91._distance, var98);
				}
				this.axisIntent && this.axisIntent(var90);
				const [var99, var100] = var91._movement, [var101, var102] = var92.threshold, { _step: var103, values: var104 } = var91;
				if (var92.hasCustomTransform ? (false === var103[0] && (var103[0] = Math.abs(var99) >= var101 && var104[0]), false === var103[1] && (var103[1] = Math.abs(var100) >= var102 && var104[1])) : (false === var103[0] && (var103[0] = Math.abs(var99) >= var101 && Math.sign(var99) * var101), false === var103[1] && (var103[1] = Math.abs(var100) >= var102 && Math.sign(var100) * var102)), var91.intentional = false !== var103[0] || false !== var103[1], !var91.intentional) return;
				const arr2 = [0, 0];
				if (var92.hasCustomTransform) {
					const [var105, var106] = var104;
					arr2[0] = false !== var103[0] ? var105 - var103[0] : 0;
					arr2[1] = false !== var103[1] ? var106 - var103[1] : 0;
				} else {
					arr2[0] = false !== var103[0] ? var99 - var103[0] : 0;
					arr2[1] = false !== var103[1] ? var100 - var103[1] : 0;
				}
				this.restrictToAxis && !var91._blocked && this.restrictToAxis(arr2);
				const offset = var91.offset, var107 = var91._active && !var91._blocked || var91.active;
				var107 && (var91.first = var91._active && !var91.active, var91.last = !var91._active && var91.active, var91.active = var93[this.ingKey] = var91._active, var90 && (var91.first && ("bounds" in var92 && (var91._bounds = pick7(var92.bounds, var91)), this.setup && this.setup()), var91.movement = arr2, this.computeOffset()));
				const [var108, var109] = var91.offset, [[var110, var111], [var112, var113]] = var91._bounds;
				var91.overflow = [var108 < var110 ? -1 : var108 > var111 ? 1 : 0, var109 < var112 ? -1 : var109 > var113 ? 1 : 0];
				var91._movementBound[0] = !!var91.overflow[0] && (false === var91._movementBound[0] ? var91._movement[0] : var91._movementBound[0]);
				var91._movementBound[1] = !!var91.overflow[1] && (false === var91._movementBound[1] ? var91._movement[1] : var91._movementBound[1]);
				if (var91.offset = function(var114, [var115, var116], [var117, var118]) {
					const [[var119, var120], [var121, var122]] = var114;
					return [pick1(var115, var119, var120, var117), pick1(var116, var121, var122, var118)];
				}(var91._bounds, var91.offset, var91._active && var92.rubberband || [0, 0]), var91.delta = obj.sub(var91.offset, offset), this.computeMovement(), var107 && (!var91.last || num > 32)) {
					var91.delta = obj.sub(var91.offset, offset);
					const var123 = var91.delta.map(Math.abs);
					obj.addTo(var91.distance, var123);
					var91.direction = var91.delta.map(Math.sign);
					var91._direction = var91._delta.map(Math.sign);
					!var91.first && num > 0 && (var91.velocity = [var123[0] / num, var123[1] / num], var91.timeDelta = num);
				}
			}
			emit() {
				const state3 = this.state, shared = this.shared, config1 = this.config;
				if (state3._active || this.clean(), (state3._blocked || !state3.intentional) && !state3._force && !config1.triggerAllEvents) return;
				const var124 = this.handler(fn2(fn2(fn2({}, shared), state3), {}, { [this.aliasKey]: state3.values }));
				undefined !== var124 && (state3.memo = var124);
			}
			clean() {
				this.eventStore.clean();
				this.timeoutStore.clean();
			}
		}
		class fn9 extends fn8 {
			constructor(...var125) {
				super(...var125);
				fn22(this, "aliasKey", "xy");
			}
			reset() {
				super.reset();
				this.state.axis = undefined;
			}
			init() {
				this.state.offset = [0, 0];
				this.state.lastOffset = [0, 0];
			}
			computeOffset() {
				this.state.offset = obj.add(this.state.lastOffset, this.state.movement);
			}
			computeMovement() {
				this.state.movement = obj.sub(this.state.offset, this.state.lastOffset);
			}
			axisIntent(var126) {
				const state4 = this.state, config2 = this.config;
				if (!state4.axis && var126) {
					const var127 = "object" == typeof config2.axisThreshold ? config2.axisThreshold["touches" in var126 ? "touch" : "pointerType" in var126 ? var126.pointerType : "mouse"] : config2.axisThreshold;
					state4.axis = function([var128, var129], var130) {
						const var131 = Math.abs(var128), var132 = Math.abs(var129);
						return var131 > var132 && var131 > var130 ? "x" : var132 > var131 && var132 > var130 ? "y" : undefined;
					}(state4._movement, var127);
				}
				state4._blocked = (config2.lockDirection || !!config2.axis) && !state4.axis || !!config2.axis && config2.axis !== state4.axis;
			}
			restrictToAxis(var133) {
				if (this.config.axis || this.config.lockDirection) switch (this.state.axis) {
					case "x":
						var133[1] = 0;
						break;
					case "y": var133[0] = 0;
				}
			}
		}
		const var134 = (var135) => var135, obj3 = {
			enabled: (var136 = true) => var136,
			eventOptions: (var137, var138, shared1) => fn2(fn2({}, shared1.shared.eventOptions), var137),
			preventDefault: (var139 = false) => var139,
			triggerAllEvents: (var140 = false) => var140,
			rubberband(var141 = 0) {
				switch (var141) {
					case true: return [.15, .15];
					case false: return [0, 0];
					default: return obj.toVector(var141);
				}
			},
			from: (var142) => "function" == typeof var142 ? var142 : null != var142 ? obj.toVector(var142) : undefined,
			transform(var143, var144, shared2) {
				const var145 = var143 || shared2.shared.transform;
				this.hasCustomTransform = !!var145;
				return var145 || var134;
			},
			threshold: (var146) => obj.toVector(var146, 0)
		};
		const bounds = fn2(fn2({}, obj3), {}, {
			axis(var147, var148, { axis: var149 }) {
				if (this.lockDirection = "lock" === var149, !this.lockDirection) return var149;
			},
			axisThreshold: (var150 = 0) => var150,
			bounds(current = {}) {
				if ("function" == typeof current) return (var151) => bounds.bounds(current(var151));
				if ("current" in current) return () => current.current;
				if ("function" == typeof HTMLElement && current instanceof HTMLElement) return current;
				const { left: var152 = -1 / 0, right: var153 = 1 / 0, top: var154 = -1 / 0, bottom: var155 = 1 / 0 } = current;
				return [[var152, var153], [var154, var155]];
			}
		}), obj4 = {
			ArrowRight: (var156, var157 = 1) => [var156 * var157, 0],
			ArrowLeft: (var158, var159 = 1) => [-1 * var158 * var159, 0],
			ArrowUp: (var160, var161 = 1) => [0, -1 * var160 * var161],
			ArrowDown: (var162, var163 = 1) => [0, var162 * var163]
		};
		const var164 = "undefined" != typeof window && window.document && window.document.createElement;
		function and() {
			return var164 && "ontouchstart" in window;
		}
		const obj5 = {
			isBrowser: var164,
			gesture: function() {
				try {
					return "constructor" in GestureEvent;
				} catch (error4) {
					return false;
				}
			}(),
			touch: and(),
			touchscreen: and() || var164 && window.navigator.maxTouchPoints > 1,
			pointer: var164 && "onpointerdown" in window,
			pointerLock: var164 && "exitPointerLock" in window.document
		}, obj6 = {
			mouse: 0,
			touch: 0,
			pen: 8
		}, var165 = fn2(fn2({}, bounds), {}, {
			device(var166, var167, { pointer: { touch: var168 = false, lock: var169 = false, mouse: var170 = false } = {} }) {
				this.pointerLock = var169 && obj5.pointerLock;
				return obj5.touch && var168 ? "touch" : this.pointerLock ? "mouse" : obj5.pointer && !var170 ? "pointer" : obj5.touch ? "touch" : "mouse";
			},
			preventScrollAxis(var171, var172, { preventScroll: var173 }) {
				if (this.preventScrollDelay = "number" == typeof var173 ? var173 : var173 || undefined === var173 && var171 ? 250 : undefined, obj5.touchscreen && false !== var173) return var171 || (undefined !== var173 ? "y" : undefined);
			},
			pointerCapture(var174, var175, { pointer: { capture: var176 = true, buttons: var177 = 1, keys: var178 = true } = {} }) {
				this.pointerButtons = var177;
				this.keys = var178;
				return !this.pointerLock && "pointer" === this.device && var176;
			},
			threshold(var179, var180, { filterTaps: var181 = false, tapsThreshold: var182 = 3, axis: var183 }) {
				const var184 = obj.toVector(var179, var181 ? var182 : var183 ? 1 : 0);
				this.filterTaps = var181;
				this.tapsThreshold = var182;
				return var184;
			},
			swipe({ velocity: var185 = .5, distance: var186 = 50, duration: var187 = 250 } = {}) {
				return {
					velocity: this.transform(obj.toVector(var185)),
					distance: this.transform(obj.toVector(var186)),
					duration: var187
				};
			},
			delay(var188 = 0) {
				switch (var188) {
					case true: return 180;
					case false: return 0;
					default: return var188;
				}
			},
			axisThreshold: (var189) => var189 ? fn2(fn2({}, obj6), var189) : obj6,
			keyboardDisplacement: (var190 = 10) => var190
		});
		function fn10(var191) {
			const [var192, var193] = var191.overflow, [var194, var195] = var191._delta, [var196, var197] = var191._direction;
			(var192 < 0 && var194 > 0 && var196 < 0 || var192 > 0 && var194 < 0 && var196 > 0) && (var191._movement[0] = var191._movementBound[0]);
			(var193 < 0 && var195 > 0 && var197 < 0 || var193 > 0 && var195 < 0 && var197 > 0) && (var191._movement[1] = var191._movementBound[1]);
		}
		const var198 = fn2(fn2({}, obj3), {}, {
			device(var199, var200, { shared: target, pointer: { touch: var201 = false } = {} }) {
				if (target.target && !obj5.touch && obj5.gesture) return "gesture";
				if (obj5.touch && var201) return "touch";
				if (obj5.touchscreen) {
					if (obj5.pointer) return "pointer";
					if (obj5.touch) return "touch";
				}
			},
			bounds(var202, var203, { scaleBounds: var204 = {}, angleBounds: var205 = {} }) {
				const var206 = (var207) => {
					const var208 = call2(pick7(var204, var207), {
						min: -1 / 0,
						max: 1 / 0
					});
					return [var208.min, var208.max];
				}, var209 = (var210) => {
					const var211 = call2(pick7(var205, var210), {
						min: -1 / 0,
						max: 1 / 0
					});
					return [var211.min, var211.max];
				};
				return "function" != typeof var204 && "function" != typeof var205 ? [var206(), var209()] : (var212) => [var206(var212), var209(var212)];
			},
			threshold(var213, var214, axis) {
				this.lockDirection = "lock" === axis.axis;
				return obj.toVector(var213, this.lockDirection ? [.1, 3] : 0);
			},
			modifierKey: (var215) => undefined === var215 ? "ctrlKey" : var215,
			pinchOnWheel: (var216 = true) => var216
		});
		const var217 = fn2(fn2({}, bounds), {}, { mouseOnly: (var218 = true) => var218 });
		const var219 = bounds;
		const var220 = bounds;
		const var221 = fn2(fn2({}, bounds), {}, { mouseOnly: (var222 = true) => var222 }), map = new Map(), map1 = new Map();
		function fn11(var223) {
			map.set(var223.key, var223.engine);
			map1.set(var223.key, var223.resolver);
		}
		const obj7 = {
			key: "drag",
			engine: class extends fn9 {
				constructor(...var224) {
					super(...var224);
					fn22(this, "ingKey", "dragging");
				}
				reset() {
					super.reset();
					const state5 = this.state;
					state5._pointerId = undefined;
					state5._pointerActive = false;
					state5._keyboardActive = false;
					state5._preventScroll = false;
					state5._delayed = false;
					state5.swipe = [0, 0];
					state5.tap = false;
					state5.canceled = false;
					state5.cancel = this.cancel.bind(this);
				}
				setup() {
					const state6 = this.state;
					if (state6._bounds instanceof HTMLElement) {
						const var225 = state6._bounds.getBoundingClientRect(), var226 = state6.currentTarget.getBoundingClientRect(), obj8 = {
							left: var225.left - var226.left + state6.offset[0],
							right: var225.right - var226.right + state6.offset[0],
							top: var225.top - var226.top + state6.offset[1],
							bottom: var225.bottom - var226.bottom + state6.offset[1]
						};
						state6._bounds = bounds.bounds(obj8);
					}
				}
				cancel() {
					const state7 = this.state;
					state7.canceled || (state7.canceled = true, state7._active = false, setTimeout((() => {
						this.compute();
						this.emit();
					}), 0));
				}
				setActive() {
					this.state._active = this.state._pointerActive || this.state._keyboardActive;
				}
				clean() {
					this.pointerClean();
					this.state._pointerActive = false;
					this.state._keyboardActive = false;
					super.clean();
				}
				pointerDown(var227) {
					const config3 = this.config, state8 = this.state;
					if (null != var227.buttons && (Array.isArray(config3.pointerButtons) ? !config3.pointerButtons.includes(var227.buttons) : -1 !== config3.pointerButtons && config3.pointerButtons !== var227.buttons)) return;
					const size = this.ctrl.setEventIds(var227);
					config3.pointerCapture && var227.target.setPointerCapture(var227.pointerId);
					size && size.size > 1 && state8._pointerActive || (this.start(var227), this.setupPointer(var227), state8._pointerId = pick6(var227), state8._pointerActive = true, this.computeValues(fn5(var227)), this.computeInitial(), config3.preventScrollAxis && "mouse" !== ("touches" in var227 ? "touch" : "pointerType" in var227 ? var227.pointerType : "mouse") ? (state8._active = false, this.setupScrollPrevention(var227)) : config3.delay > 0 ? (this.setupDelayTrigger(var227), config3.triggerAllEvents && (this.compute(var227), this.emit())) : this.startPointerDrag(var227));
				}
				startPointerDrag(var228) {
					const state9 = this.state;
					state9._active = true;
					state9._preventScroll = true;
					state9._delayed = false;
					this.compute(var228);
					this.emit();
				}
				pointerMove(var229) {
					const state10 = this.state, config4 = this.config;
					if (!state10._pointerActive) return;
					const var230 = pick6(var229);
					if (undefined !== state10._pointerId && var230 !== state10._pointerId) return;
					const var231 = fn5(var229);
					document.pointerLockElement === var229.target ? state10._delta = [var229.movementX, var229.movementY] : (state10._delta = obj.sub(var231, state10._values), this.computeValues(var231));
					obj.addTo(state10._movement, state10._delta);
					this.compute(var229);
					return state10._delayed && state10.intentional ? (this.timeoutStore.remove("dragDelay"), state10.active = false, void this.startPointerDrag(var229)) : config4.preventScrollAxis && !state10._preventScroll ? state10.axis ? state10.axis === config4.preventScrollAxis || "xy" === config4.preventScrollAxis ? (state10._active = false, void this.clean()) : (this.timeoutStore.remove("startPointerDrag"), void this.startPointerDrag(var229)) : undefined : void this.emit();
				}
				pointerUp(var232) {
					this.ctrl.setEventIds(var232);
					try {
						this.config.pointerCapture && var232.target.hasPointerCapture(var232.pointerId) && var232.target.releasePointerCapture(var232.pointerId);
					} catch (error5) {}
					const state11 = this.state, config5 = this.config;
					if (!state11._active || !state11._pointerActive) return;
					const var233 = pick6(var232);
					if (undefined !== state11._pointerId && var233 !== state11._pointerId) return;
					this.state._pointerActive = false;
					this.setActive();
					this.compute(var232);
					const [var234, var235] = state11._distance;
					if (state11.tap = var234 <= config5.tapsThreshold && var235 <= config5.tapsThreshold, state11.tap && config5.filterTaps) state11._force = true;
					else {
						const [var236, var237] = state11._delta, [var238, var239] = state11._movement, [var240, var241] = config5.swipe.velocity, [var242, var243] = config5.swipe.distance, duration = config5.swipe.duration;
						if (state11.elapsedTime < duration) {
							const var244 = Math.abs(var236 / state11.timeDelta), var245 = Math.abs(var237 / state11.timeDelta);
							var244 > var240 && Math.abs(var238) > var242 && (state11.swipe[0] = Math.sign(var236));
							var245 > var241 && Math.abs(var239) > var243 && (state11.swipe[1] = Math.sign(var237));
						}
					}
					this.emit();
				}
				pointerClick(var246) {
					!this.state.tap && var246.detail > 0 && (var246.preventDefault(), var246.stopPropagation());
				}
				setupPointer(currentTarget) {
					const config6 = this.config, device = config6.device;
					config6.pointerLock && currentTarget.currentTarget.requestPointerLock();
					config6.pointerCapture || (this.eventStore.add(this.sharedConfig.window, device, "change", this.pointerMove.bind(this)), this.eventStore.add(this.sharedConfig.window, device, "end", this.pointerUp.bind(this)), this.eventStore.add(this.sharedConfig.window, device, "cancel", this.pointerUp.bind(this)));
				}
				pointerClean() {
					this.config.pointerLock && document.pointerLockElement === this.state.currentTarget && document.exitPointerLock();
				}
				preventScroll(var247) {
					this.state._preventScroll && var247.cancelable && var247.preventDefault();
				}
				setupScrollPrevention(var248) {
					this.state._preventScroll = false;
					(function(persist) {
						"persist" in persist && "function" == typeof persist.persist && persist.persist();
					})(var248);
					const var249 = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), { passive: false });
					this.eventStore.add(this.sharedConfig.window, "touch", "end", var249);
					this.eventStore.add(this.sharedConfig.window, "touch", "cancel", var249);
					this.timeoutStore.add("startPointerDrag", this.startPointerDrag.bind(this), this.config.preventScrollDelay, var248);
				}
				setupDelayTrigger(var250) {
					this.state._delayed = true;
					this.timeoutStore.add("dragDelay", (() => {
						this.state._step = [0, 0];
						this.startPointerDrag(var250);
					}), this.config.delay);
				}
				keyDown(var251) {
					const var252 = obj4[var251.key];
					if (var252) {
						const state12 = this.state, var253 = var251.shiftKey ? 10 : var251.altKey ? .1 : 1;
						this.start(var251);
						state12._delta = var252(this.config.keyboardDisplacement, var253);
						state12._keyboardActive = true;
						obj.addTo(state12._movement, state12._delta);
						this.compute(var251);
						this.emit();
					}
				}
				keyUp(key) {
					key.key in obj4 && (this.state._keyboardActive = false, this.setActive(), this.compute(key), this.emit());
				}
				bind(var254) {
					const device1 = this.config.device;
					var254(device1, "start", this.pointerDown.bind(this));
					this.config.pointerCapture && (var254(device1, "change", this.pointerMove.bind(this)), var254(device1, "end", this.pointerUp.bind(this)), var254(device1, "cancel", this.pointerUp.bind(this)), var254("lostPointerCapture", "", this.pointerUp.bind(this)));
					this.config.keys && (var254("key", "down", this.keyDown.bind(this)), var254("key", "up", this.keyUp.bind(this)));
					this.config.filterTaps && var254("click", "", this.pointerClick.bind(this), {
						capture: true,
						passive: false
					});
				}
			},
			resolver: var165
		}, obj9 = {
			key: "hover",
			engine: class extends fn9 {
				constructor(...var255) {
					super(...var255);
					fn22(this, "ingKey", "hovering");
				}
				enter(pointerType1) {
					this.config.mouseOnly && "mouse" !== pointerType1.pointerType || (this.start(pointerType1), this.computeValues(fn5(pointerType1)), this.compute(pointerType1), this.emit());
				}
				leave(pointerType2) {
					if (this.config.mouseOnly && "mouse" !== pointerType2.pointerType) return;
					const state13 = this.state;
					if (!state13._active) return;
					state13._active = false;
					const var256 = fn5(pointerType2);
					state13._movement = state13._delta = obj.sub(var256, state13._values);
					this.computeValues(var256);
					this.compute(pointerType2);
					state13.delta = state13.movement;
					this.emit();
				}
				bind(var257) {
					var257("pointer", "enter", this.enter.bind(this));
					var257("pointer", "leave", this.leave.bind(this));
				}
			},
			resolver: var221
		}, obj10 = {
			key: "move",
			engine: class extends fn9 {
				constructor(...var258) {
					super(...var258);
					fn22(this, "ingKey", "moving");
				}
				move(pointerType3) {
					this.config.mouseOnly && "mouse" !== pointerType3.pointerType || (this.state._active ? this.moveChange(pointerType3) : this.moveStart(pointerType3), this.timeoutStore.add("moveEnd", this.moveEnd.bind(this)));
				}
				moveStart(var259) {
					this.start(var259);
					this.computeValues(fn5(var259));
					this.compute(var259);
					this.computeInitial();
					this.emit();
				}
				moveChange(var260) {
					if (!this.state._active) return;
					const var261 = fn5(var260), state14 = this.state;
					state14._delta = obj.sub(var261, state14._values);
					obj.addTo(state14._movement, state14._delta);
					this.computeValues(var261);
					this.compute(var260);
					this.emit();
				}
				moveEnd(var262) {
					this.state._active && (this.state._active = false, this.compute(var262), this.emit());
				}
				bind(var263) {
					var263("pointer", "change", this.move.bind(this));
					var263("pointer", "leave", this.moveEnd.bind(this));
				}
			},
			resolver: var217
		}, obj11 = {
			key: "pinch",
			engine: class extends fn8 {
				constructor(...var264) {
					super(...var264);
					fn22(this, "ingKey", "pinching");
					fn22(this, "aliasKey", "da");
				}
				init() {
					this.state.offset = [1, 0];
					this.state.lastOffset = [1, 0];
					this.state._pointerEvents = new Map();
				}
				reset() {
					super.reset();
					const state15 = this.state;
					state15._touchIds = [];
					state15.canceled = false;
					state15.cancel = this.cancel.bind(this);
					state15.turns = 0;
				}
				computeOffset() {
					const { type: var265, movement: var266, lastOffset: var267 } = this.state;
					this.state.offset = "wheel" === var265 ? obj.add(var266, var267) : [(1 + var266[0]) * var267[0], var266[1] + var267[1]];
				}
				computeMovement() {
					const { offset: var268, lastOffset: var269 } = this.state;
					this.state.movement = [var268[0] / var269[0], var268[1] - var269[1]];
				}
				axisIntent() {
					const state16 = this.state, [var270, var271] = state16._movement;
					if (!state16.axis) {
						const var272 = 30 * Math.abs(var270) - Math.abs(var271);
						var272 < 0 ? state16.axis = "angle" : var272 > 0 && (state16.axis = "scale");
					}
				}
				restrictToAxis(var273) {
					this.config.lockDirection && ("scale" === this.state.axis ? var273[1] = 0 : "angle" === this.state.axis && (var273[0] = 0));
				}
				cancel() {
					const state17 = this.state;
					state17.canceled || setTimeout((() => {
						state17.canceled = true;
						state17._active = false;
						this.compute();
						this.emit();
					}), 0);
				}
				touchStart(var274) {
					this.ctrl.setEventIds(var274);
					const state18 = this.state, touchIds = this.ctrl.touchIds;
					if (state18._active && state18._touchIds.every(((item6) => touchIds.has(item6)))) return;
					if (touchIds.size < 2) return;
					this.start(var274);
					state18._touchIds = Array.from(touchIds).slice(0, 2);
					const var275 = call1(var274, state18._touchIds);
					var275 && this.pinchStart(var274, var275);
				}
				pointerStart(var276) {
					if (null != var276.buttons && var276.buttons % 2 != 1) return;
					this.ctrl.setEventIds(var276);
					var276.target.setPointerCapture(var276.pointerId);
					const state19 = this.state, _pointerEvents = state19._pointerEvents, pointerIds = this.ctrl.pointerIds;
					if (state19._active && Array.from(_pointerEvents.keys()).every(((item7) => pointerIds.has(item7)))) return;
					if (_pointerEvents.size < 2 && _pointerEvents.set(var276.pointerId, var276), state19._pointerEvents.size < 2) return;
					this.start(var276);
					const var277 = fn4(...Array.from(_pointerEvents.values()));
					var277 && this.pinchStart(var276, var277);
				}
				pinchStart(var278, var279) {
					this.state.origin = var279.origin;
					this.computeValues([var279.distance, var279.angle]);
					this.computeInitial();
					this.compute(var278);
					this.emit();
				}
				touchMove(var280) {
					if (!this.state._active) return;
					const var281 = call1(var280, this.state._touchIds);
					var281 && this.pinchMove(var280, var281);
				}
				pointerMove(pointerId) {
					const _pointerEvents1 = this.state._pointerEvents;
					if (_pointerEvents1.has(pointerId.pointerId) && _pointerEvents1.set(pointerId.pointerId, pointerId), !this.state._active) return;
					const var282 = fn4(...Array.from(_pointerEvents1.values()));
					var282 && this.pinchMove(pointerId, var282);
				}
				pinchMove(var283, var284) {
					const state20 = this.state, var285 = var284.angle - state20._values[1];
					let num1 = 0;
					Math.abs(var285) > 270 && (num1 += Math.sign(var285));
					this.computeValues([var284.distance, var284.angle - 360 * num1]);
					state20.origin = var284.origin;
					state20.turns = num1;
					state20._movement = [state20._values[0] / state20._initial[0] - 1, state20._values[1] - state20._initial[1]];
					this.compute(var283);
					this.emit();
				}
				touchEnd(var286) {
					this.ctrl.setEventIds(var286);
					this.state._active && this.state._touchIds.some(((item8) => !this.ctrl.touchIds.has(item8))) && (this.state._active = false, this.compute(var286), this.emit());
				}
				pointerEnd(var287) {
					const state21 = this.state;
					this.ctrl.setEventIds(var287);
					try {
						var287.target.releasePointerCapture(var287.pointerId);
					} catch (error6) {}
					state21._pointerEvents.has(var287.pointerId) && state21._pointerEvents.delete(var287.pointerId);
					state21._active && state21._pointerEvents.size < 2 && (state21._active = false, this.compute(var287), this.emit());
				}
				gestureStart(var288) {
					var288.cancelable && var288.preventDefault();
					const state22 = this.state;
					state22._active || (this.start(var288), this.computeValues([var288.scale, var288.rotation]), state22.origin = [var288.clientX, var288.clientY], this.compute(var288), this.emit());
				}
				gestureMove(var289) {
					if (var289.cancelable && var289.preventDefault(), !this.state._active) return;
					const state23 = this.state;
					this.computeValues([var289.scale, var289.rotation]);
					state23.origin = [var289.clientX, var289.clientY];
					const _movement = state23._movement;
					state23._movement = [var289.scale - 1, var289.rotation];
					state23._delta = obj.sub(state23._movement, _movement);
					this.compute(var289);
					this.emit();
				}
				gestureEnd(var290) {
					this.state._active && (this.state._active = false, this.compute(var290), this.emit());
				}
				wheel(var291) {
					const modifierKey = this.config.modifierKey;
					modifierKey && !(Array.isArray(modifierKey) ? modifierKey.find(((item9) => var291[item9])) : var291[modifierKey]) || (this.state._active ? this.wheelChange(var291) : this.wheelStart(var291), this.timeoutStore.add("wheelEnd", this.wheelEnd.bind(this)));
				}
				wheelStart(var292) {
					this.start(var292);
					this.wheelChange(var292);
				}
				wheelChange(var293) {
					"uv" in var293 || var293.cancelable && var293.preventDefault();
					const state24 = this.state;
					state24._delta = [-fn6(var293)[1] / 100 * state24.offset[0], 0];
					obj.addTo(state24._movement, state24._delta);
					fn10(state24);
					this.state.origin = [var293.clientX, var293.clientY];
					this.compute(var293);
					this.emit();
				}
				wheelEnd() {
					this.state._active && (this.state._active = false, this.compute(), this.emit());
				}
				bind(var294) {
					const device2 = this.config.device;
					device2 && (var294(device2, "start", this[device2 + "Start"].bind(this)), var294(device2, "change", this[device2 + "Move"].bind(this)), var294(device2, "end", this[device2 + "End"].bind(this)), var294(device2, "cancel", this[device2 + "End"].bind(this)), var294("lostPointerCapture", "", this[device2 + "End"].bind(this)));
					this.config.pinchOnWheel && var294("wheel", "", this.wheel.bind(this), { passive: false });
				}
			},
			resolver: var198
		}, obj12 = {
			key: "scroll",
			engine: class extends fn9 {
				constructor(...var295) {
					super(...var295);
					fn22(this, "ingKey", "scrolling");
				}
				scroll(var296) {
					this.state._active || this.start(var296);
					this.scrollChange(var296);
					this.timeoutStore.add("scrollEnd", this.scrollEnd.bind(this));
				}
				scrollChange(var297) {
					var297.cancelable && var297.preventDefault();
					const state25 = this.state, var298 = function(currentTarget1) {
						var var299, var300;
						const { scrollX: var301, scrollY: var302, scrollLeft: var303, scrollTop: var304 } = currentTarget1.currentTarget;
						return [null !== (var299 = null != var301 ? var301 : var303) && undefined !== var299 ? var299 : 0, null !== (var300 = null != var302 ? var302 : var304) && undefined !== var300 ? var300 : 0];
					}(var297);
					state25._delta = obj.sub(var298, state25._values);
					obj.addTo(state25._movement, state25._delta);
					this.computeValues(var298);
					this.compute(var297);
					this.emit();
				}
				scrollEnd() {
					this.state._active && (this.state._active = false, this.compute(), this.emit());
				}
				bind(var305) {
					var305("scroll", "", this.scroll.bind(this));
				}
			},
			resolver: var219
		}, obj13 = {
			key: "wheel",
			engine: class extends fn9 {
				constructor(...var306) {
					super(...var306);
					fn22(this, "ingKey", "wheeling");
				}
				wheel(var307) {
					this.state._active || this.start(var307);
					this.wheelChange(var307);
					this.timeoutStore.add("wheelEnd", this.wheelEnd.bind(this));
				}
				wheelChange(var308) {
					const state26 = this.state;
					state26._delta = fn6(var308);
					obj.addTo(state26._movement, state26._delta);
					fn10(state26);
					this.compute(var308);
					this.emit();
				}
				wheelEnd() {
					this.state._active && (this.state._active = false, this.compute(), this.emit());
				}
				bind(var309) {
					var309("wheel", "", this.wheel.bind(this));
				}
			},
			resolver: var220
		};
	},
	559631: (var310, var311, var312) => {
		var312.d(var311, {
			createUseGesture: () => fn21,
			useGesture: () => call3
		});
		var var313 = var312(877571), var314 = var312(296540);
		function fn12(var315, list4) {
			if (null == var315) return {};
			var var316, var317, var318 = function(var319, list5) {
				if (null == var319) return {};
				var var320, var321, obj14 = {}, list6 = Object.keys(var319);
				for (var321 = 0; var321 < list6.length; var321++) {
					var320 = list6[var321];
					list5.indexOf(var320) >= 0 || (obj14[var320] = var319[var320]);
				}
				return obj14;
			}(var315, list4);
			if (Object.getOwnPropertySymbols) {
				var list7 = Object.getOwnPropertySymbols(var315);
				for (var317 = 0; var317 < list7.length; var317++) {
					var316 = list7[var317];
					list4.indexOf(var316) >= 0 || Object.prototype.propertyIsEnumerable.call(var315, var316) && (var318[var316] = var315[var316]);
				}
			}
			return var318;
		}
		const obj15 = {
			target(current1) {
				if (current1) return () => "current" in current1 ? current1.current : current1;
			},
			enabled: (var322 = true) => var322,
			window: (var323 = var313.S.isBrowser ? window : undefined) => var323,
			eventOptions: ({ passive: var324 = true, capture: var325 = false } = {}) => ({
				passive: var324,
				capture: var325
			}),
			transform: (var326) => var326
		}, arr3 = [
			"target",
			"eventOptions",
			"window",
			"enabled",
			"transform"
		];
		function fn13(var327 = {}, var328) {
			const obj16 = {};
			for (const [var329, var330] of Object.entries(var328)) switch (typeof var330) {
				case "function":
					obj16[var329] = var330.call(obj16, var327[var329], var329, var327);
					break;
				case "object":
					obj16[var329] = fn13(var327[var329], var330);
					break;
				case "boolean": var330 && (obj16[var329] = var327[var329]);
			}
			return obj16;
		}
		class fn14 {
			constructor(var331, var332) {
				(0, var313.a)(this, "_listeners", new Set());
				this._ctrl = var331;
				this._gestureKey = var332;
			}
			add(elem, var333, var334, var335, var336) {
				const _listeners = this._listeners, var337 = (0, var313.t)(var333, var334), var338 = (0, var313._)((0, var313._)({}, this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}), var336);
				elem.addEventListener(var337, var335, var338);
				const var339 = () => {
					elem.removeEventListener(var337, var335, var338);
					_listeners.delete(var339);
				};
				_listeners.add(var339);
				return var339;
			}
			clean() {
				this._listeners.forEach(((item10) => item10()));
				this._listeners.clear();
			}
		}
		class fn15 {
			constructor() {
				(0, var313.a)(this, "_timeouts", new Map());
			}
			add(var340, var341, var342 = 140, ...var343) {
				this.remove(var340);
				this._timeouts.set(var340, window.setTimeout(var341, var342, ...var343));
			}
			remove(var344) {
				const var345 = this._timeouts.get(var344);
				var345 && window.clearTimeout(var345);
			}
			clean() {
				this._timeouts.forEach(((item11) => {
					window.clearTimeout(item11);
				}));
				this._timeouts.clear();
			}
		}
		class fn16 {
			constructor(var346) {
				(0, var313.a)(this, "gestures", new Set());
				(0, var313.a)(this, "_targetEventStore", new fn14(this));
				(0, var313.a)(this, "gestureEventStores", {});
				(0, var313.a)(this, "gestureTimeoutStores", {});
				(0, var313.a)(this, "handlers", {});
				(0, var313.a)(this, "config", {});
				(0, var313.a)(this, "pointerIds", new Set());
				(0, var313.a)(this, "touchIds", new Set());
				(0, var313.a)(this, "state", { shared: {
					shiftKey: false,
					metaKey: false,
					ctrlKey: false,
					altKey: false
				} });
				(function(var347, var348) {
					var348.drag && fn17(var347, "drag");
					var348.wheel && fn17(var347, "wheel");
					var348.scroll && fn17(var347, "scroll");
					var348.move && fn17(var347, "move");
					var348.pinch && fn17(var347, "pinch");
					var348.hover && fn17(var347, "hover");
				})(this, var346);
			}
			setEventIds(var349) {
				return (0, var313.i)(var349) ? (this.touchIds = new Set((0, var313.b)(var349)), this.touchIds) : "pointerId" in var349 ? ("pointerup" === var349.type || "pointercancel" === var349.type ? this.pointerIds.delete(var349.pointerId) : "pointerdown" === var349.type && this.pointerIds.add(var349.pointerId), this.pointerIds) : undefined;
			}
			applyHandlers(var350, var351) {
				this.handlers = var350;
				this.nativeHandlers = var351;
			}
			applyConfig(var352, var353) {
				this.config = function(var354, var355, shared3 = {}) {
					const { target: var357, eventOptions: var358, window: var359, enabled: var360, transform: var361 } = var354, var362 = fn12(var354, arr3);
					if (shared3.shared = fn13({
						target: var357,
						eventOptions: var358,
						window: var359,
						enabled: var360,
						transform: var361
					}, obj15), var355) {
						const var363 = var313.C.get(var355);
						shared3[var355] = fn13((0, var313._)({ shared: shared3.shared }, var362), var363);
					} else for (const var364 in var362) {
						const var365 = var313.C.get(var364);
						var365 && (shared3[var364] = fn13((0, var313._)({ shared: shared3.shared }, var362[var364]), var365));
					}
					return shared3;
				}(var352, var353, this.config);
			}
			clean() {
				this._targetEventStore.clean();
				for (const var366 of this.gestures) {
					this.gestureEventStores[var366].clean();
					this.gestureTimeoutStores[var366].clean();
				}
			}
			effect() {
				this.config.shared.target && this.bind();
				return () => this._targetEventStore.clean();
			}
			bind(...var367) {
				const shared4 = this.config.shared, obj17 = {};
				let var368;
				if (!shared4.target || (var368 = shared4.target(), var368)) {
					if (shared4.enabled) {
						for (const var369 of this.gestures) {
							const var370 = this.config[var369], var371 = var382(obj17, var370.eventOptions, !!var368);
							if (var370.enabled) {
								new (var313.E.get(var369))(this, var367, var369).bind(var371);
							}
						}
						const var372 = var382(obj17, shared4.eventOptions, !!var368);
						for (const var373 in this.nativeHandlers) var372(var373, "", ((var374) => this.nativeHandlers[var373]((0, var313._)((0, var313._)({}, this.state.shared), {}, {
							event: var374,
							args: var367
						}))), undefined, true);
					}
					for (const var375 in obj17) obj17[var375] = (0, var313.c)(...obj17[var375]);
					if (!var368) return obj17;
					for (const var376 in obj17) {
						const { device: var377, capture: var378, passive: var379 } = (0, var313.p)(var376);
						this._targetEventStore.add(var368, var377, "", obj17[var376], {
							capture: var378,
							passive: var379
						});
					}
				}
			}
		}
		function fn17(var380, var381) {
			var380.gestures.add(var381);
			var380.gestureEventStores[var381] = new fn14(var380, var381);
			var380.gestureTimeoutStores[var381] = new fn15();
		}
		const var382 = (var383, var384, var385) => (var386, var387, var388, var389 = {}, var390 = false) => {
			var var391, var392;
			const var393 = null !== (var391 = var389.capture) && undefined !== var391 ? var391 : var384.capture, var394 = null !== (var392 = var389.passive) && undefined !== var392 ? var392 : var384.passive;
			let var395 = var390 ? var386 : (0, var313.d)(var386, var387, var393);
			var385 && var394 && (var395 += "Passive");
			var383[var395] = var383[var395] || [];
			var383[var395].push(var388);
		}, regex = /^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;
		function fn18(has, var396, var397, var398, var399, var400) {
			if (!has.has(var397)) return;
			if (!var313.E.has(var398)) return undefined;
			const var401 = var397 + "Start", var402 = var397 + "End";
			var399[var398] = (var403) => {
				let var404;
				var403.first && var401 in var396 && var396[var401](var403);
				var397 in var396 && (var404 = var396[var397](var403));
				var403.last && var402 in var396 && var396[var402](var403);
				return var404;
			};
			var400[var398] = var400[var398] || {};
		}
		function fn19(var405, var406) {
			const [var407, var408, var409] = function(var410) {
				const obj18 = {}, obj19 = {}, set1 = new Set();
				for (let var411 in var410) regex.test(var411) ? (set1.add(RegExp.lastMatch), obj19[var411] = var410[var411]) : obj18[var411] = var410[var411];
				return [
					obj19,
					obj18,
					set1
				];
			}(var405), obj20 = {};
			fn18(var409, var407, "onDrag", "drag", obj20, var406);
			fn18(var409, var407, "onWheel", "wheel", obj20, var406);
			fn18(var409, var407, "onScroll", "scroll", obj20, var406);
			fn18(var409, var407, "onPinch", "pinch", obj20, var406);
			fn18(var409, var407, "onMove", "move", obj20, var406);
			fn18(var409, var407, "onHover", "hover", obj20, var406);
			return {
				handlers: obj20,
				config: var406,
				nativeHandlers: var408
			};
		}
		function fn20(var412, target1 = {}, var413, var414) {
			const var415 = var314.useMemo((() => new fn16(var412)), []);
			if (var415.applyHandlers(var412, var414), var415.applyConfig(target1, var413), var314.useEffect(var415.effect.bind(var415)), var314.useEffect((() => var415.clean.bind(var415)), []), undefined === target1.target) return var415.bind.bind(var415);
		}
		function fn21(list8) {
			list8.forEach(var313.r);
			return function(var416, var417) {
				const { handlers: var418, nativeHandlers: var419, config: var420 } = fn19(var416, var417 || {});
				return fn20(var418, var420, undefined, var419);
			};
		}
		function call3(var421, var422) {
			return fn21([
				var313.e,
				var313.f,
				var313.s,
				var313.w,
				var313.m,
				var313.h
			])(var421, var422 || {});
		}
	}
}]);