import{t as e}from"./chunk-DECur_0Z.js";var t=e(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define(`nipplejs`,[],r):typeof e==`object`?e.nipplejs=r():n.nipplejs=r()})(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t||4&t&&typeof e==`object`&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,`default`,{enumerable:!0,value:e}),2&t&&typeof e!=`string`)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=0)}([function(e,t,n){n.r(t);var r,i=function(e,t){var n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)},a=function(e){return Math.PI/180*e},o=function(e){return 180/Math.PI*e},s=new Map,c=function(e){s.has(e)&&clearTimeout(s.get(e)),s.set(e,setTimeout(e,100))},l=function(e,t,n){for(var r,i=t.split(/[ ,]+/g),a=0;a=0&&this._handlers_[e].splice(this._handlers_[e].indexOf(t),1),this},C.prototype.trigger=function(e,t){var n,r=this,i=e.split(/[ ,]+/g);r._handlers_=r._handlers_||{};for(var a=0;aa&&i<3*a&&!e.lockX?t=`up`:i>-a&&i<=a&&!e.lockY?t=`left`:i>3*-a&&i<=-a&&!e.lockX?t=`down`:e.lockY||(t=`right`),e.lockY||(n=i>-o&&i0?`up`:`down`),e.force>this.options.threshold){var s,c={};for(s in this.direction)this.direction.hasOwnProperty(s)&&(c[s]=this.direction[s]);var l={};for(s in this.direction={x:n,y:r,angle:t},e.direction=this.direction,c)c[s]===this.direction[s]&&(l[s]=!0);if(l.x&&l.y&&l.angle)return e;l.x&&l.y||this.trigger(`plain`,e),l.x||this.trigger(`plain:`+n,e),l.y||this.trigger(`plain:`+r,e),l.angle||this.trigger(`dir dir:`+t,e)}else this.resetDirection();return e};var E=T;function D(e,t){this.nipples=[],this.idles=[],this.actives=[],this.ids=[],this.pressureIntervals={},this.manager=e,this.id=D.id,D.id+=1,this.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:`dynamic`,position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:`white`,fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1,shape:`circle`,dynamicPage:!1,follow:!1},this.config(t),this.options.mode!==`static`&&this.options.mode!==`semi`||(this.options.multitouch=!1),this.options.multitouch||(this.options.maxNumberOfNipples=1);var n=getComputedStyle(this.options.zone.parentElement);return n&&n.display===`flex`&&(this.parentIsFlex=!0),this.updateBox(),this.prepareNipples(),this.bindings(),this.begin(),this.nipples}D.prototype=new w,D.constructor=D,D.id=0,D.prototype.prepareNipples=function(){var e=this.nipples;e.on=this.on.bind(this),e.off=this.off.bind(this),e.options=this.options,e.destroy=this.destroy.bind(this),e.ids=this.ids,e.id=this.id,e.processOnMove=this.processOnMove.bind(this),e.processOnEnd=this.processOnEnd.bind(this),e.get=function(t){if(t===void 0)return e[0];for(var n=0,r=e.length;n