tiny-essentials 1.11.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -3
- package/dist/node_modules/firebase-functions/lib/common/trace.cjs +82 -0
- package/dist/node_modules/firebase-functions/lib/logger/common.cjs +57 -0
- package/dist/node_modules/firebase-functions/lib/logger/index.cjs +158 -0
- package/dist/v1/TinyBasicsEs.js +1653 -1
- package/dist/v1/TinyBasicsEs.min.js +1 -1
- package/dist/v1/TinyDragDropDetector.js +307 -0
- package/dist/v1/TinyDragDropDetector.min.js +1 -0
- package/dist/v1/TinyDragger.js +3668 -0
- package/dist/v1/TinyDragger.min.js +2 -0
- package/dist/v1/TinyDragger.min.js.LICENSE.txt +8 -0
- package/dist/v1/TinyEssentials.js +2888 -2
- package/dist/v1/TinyEssentials.min.js +1 -1
- package/dist/v1/TinyNotifyCenter.js +32 -0
- package/dist/v1/TinyNotifyCenter.min.js +1 -1
- package/dist/v1/TinyToastNotify.js +24 -0
- package/dist/v1/TinyToastNotify.min.js +1 -1
- package/dist/v1/TinyUploadClicker.js +5340 -0
- package/dist/v1/TinyUploadClicker.min.js +2 -0
- package/dist/v1/TinyUploadClicker.min.js.LICENSE.txt +8 -0
- package/dist/v1/basics/fileManager.cjs +524 -0
- package/dist/v1/basics/fileManager.d.mts +209 -0
- package/dist/v1/basics/fileManager.mjs +443 -0
- package/dist/v1/basics/fullScreen.cjs +134 -0
- package/dist/v1/basics/fullScreen.d.mts +8 -0
- package/dist/v1/basics/fullScreen.mjs +121 -0
- package/dist/v1/basics/html.cjs +262 -0
- package/dist/v1/basics/html.d.mts +63 -0
- package/dist/v1/basics/html.mjs +208 -0
- package/dist/v1/basics/index.cjs +40 -0
- package/dist/v1/basics/index.d.mts +38 -1
- package/dist/v1/basics/index.mjs +4 -1
- package/dist/v1/build/TinyDragDropDetector.cjs +7 -0
- package/dist/v1/build/TinyDragDropDetector.d.mts +3 -0
- package/dist/v1/build/TinyDragDropDetector.mjs +2 -0
- package/dist/v1/build/TinyDragger.cjs +7 -0
- package/dist/v1/build/TinyDragger.d.mts +3 -0
- package/dist/v1/build/TinyDragger.mjs +2 -0
- package/dist/v1/build/TinyUploadClicker.cjs +7 -0
- package/dist/v1/build/TinyUploadClicker.d.mts +3 -0
- package/dist/v1/build/TinyUploadClicker.mjs +2 -0
- package/dist/v1/css/TinyDraggerExample.css +21 -0
- package/dist/v1/css/TinyDraggerExample.min.css +1 -0
- package/dist/v1/index.cjs +44 -0
- package/dist/v1/index.d.mts +40 -1
- package/dist/v1/index.mjs +6 -1
- package/dist/v1/libs/TinyDragDropDetector.cjs +268 -0
- package/dist/v1/libs/TinyDragDropDetector.d.mts +123 -0
- package/dist/v1/libs/TinyDragDropDetector.mjs +228 -0
- package/dist/v1/libs/TinyDragger.cjs +906 -0
- package/dist/v1/libs/TinyDragger.d.mts +316 -0
- package/dist/v1/libs/TinyDragger.mjs +783 -0
- package/dist/v1/libs/TinyNotifyCenter.cjs +32 -0
- package/dist/v1/libs/TinyNotifyCenter.d.mts +9 -0
- package/dist/v1/libs/TinyNotifyCenter.mjs +28 -0
- package/dist/v1/libs/TinyToastNotify.cjs +24 -0
- package/dist/v1/libs/TinyToastNotify.d.mts +8 -0
- package/dist/v1/libs/TinyToastNotify.mjs +20 -0
- package/dist/v1/libs/TinyUploadClicker.cjs +223 -0
- package/dist/v1/libs/TinyUploadClicker.d.mts +80 -0
- package/dist/v1/libs/TinyUploadClicker.mjs +182 -0
- package/docs/v1/README.md +8 -2
- package/docs/v1/basics/fileManager.md +222 -0
- package/docs/v1/basics/fullScreen.md +183 -0
- package/docs/v1/basics/html.md +243 -0
- package/docs/v1/libs/TinyDragDropDetector.md +143 -0
- package/docs/v1/libs/TinyDragger.md +430 -0
- package/docs/v1/libs/TinyLevelUp.md +1 -1
- package/docs/v1/libs/TinyNotifyCenter.md +20 -0
- package/docs/v1/libs/TinyToastNotify.md +19 -0
- package/docs/v1/libs/TinyUploadClicker.md +108 -0
- package/package.json +12 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see TinyDragger.min.js.LICENSE.txt */
|
|
2
|
+
(()=>{var t={251:(t,e)=>{e.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,l=(1<<a)-1,h=l>>1,f=-7,u=r?n-1:0,c=r?-1:1,g=t[e+u];for(u+=c,o=g&(1<<-f)-1,g>>=-f,f+=a;f>0;o=256*o+t[e+u],u+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=i;f>0;s=256*s+t[e+u],u+=c,f-=8);if(0===o)o=1-h;else{if(o===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,i),o-=h}return(g?-1:1)*s*Math.pow(2,o-i)},e.write=function(t,e,r,i,n,o){var s,a,l,h=8*o-n-1,f=(1<<h)-1,u=f>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,g=i?0:o-1,d=i?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+u>=1?c/l:c*Math.pow(2,1-u))*l>=2&&(s++,l/=2),s+u>=f?(a=0,s=f):s+u>=1?(a=(e*l-1)*Math.pow(2,n),s+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,n),s=0));n>=8;t[r+g]=255&a,g+=d,a/=256,n-=8);for(s=s<<n|a,h+=n;h>0;t[r+g]=255&s,g+=d,s/=256,h-=8);t[r+g-d]|=128*p}},287:(t,e,r)=>{"use strict";var i=r(526),n=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=l,e.IS=50;var s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|p(t,e),i=a(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}(t,e);if(ArrayBuffer.isView(t))return function(t){if(N(t,Uint8Array)){var e=new Uint8Array(t);return g(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer))return g(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(N(t,SharedArrayBuffer)||t&&N(t.buffer,SharedArrayBuffer)))return g(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return l.from(i,e,r);var n=function(t){if(l.isBuffer(t)){var e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||F(t.length)?a(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return f(t),a(t<0?0:0|d(t))}function c(t){for(var e=t.length<0?0:0|d(t.length),r=a(e),i=0;i<e;i+=1)r[i]=255&t[i];return r}function g(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(i,l.prototype),i}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return S(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return _(t).length;default:if(n)return i?-1:S(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return L(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function v(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function b(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),F(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:m(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,i,n){var o,s=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=r;o<a;o++)if(h(t,o)===h(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===l)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+l>a&&(r=a-l),o=r;o>=0;o--){for(var u=!0,c=0;c<l;c++)if(h(t,o+c)!==h(e,c)){u=!1;break}if(u)return o}return-1}function w(t,e,r,i){r=Number(r)||0;var n=t.length-r;i?(i=Number(i))>n&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s<i;++s){var a=parseInt(e.substr(2*s,2),16);if(F(a))return s;t[r+s]=a}return s}function E(t,e,r,i){return H(S(e,t.length-r),t,r,i)}function C(t,e,r,i){return H(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,i)}function D(t,e,r,i){return H(_(e),t,r,i)}function B(t,e,r,i){return H(function(t,e){for(var r,i,n,o=[],s=0;s<t.length&&!((e-=2)<0);++s)i=(r=t.charCodeAt(s))>>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function A(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function L(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n<r;){var o,s,a,l,h=t[n],f=null,u=h>239?4:h>223?3:h>191?2:1;if(n+u<=r)switch(u){case 1:h<128&&(f=h);break;case 2:128==(192&(o=t[n+1]))&&(l=(31&h)<<6|63&o)>127&&(f=l);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(l=(15&h)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(f=l);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(f=l)}null===f?(f=65533,u=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=u}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);for(var r="",i=0;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=M));return r}(i)}l.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,r){return h(t,e,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},l.allocUnsafe=function(t){return u(t)},l.allocUnsafeSlow=function(t){return u(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(N(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n<o;++n)if(t[n]!==e[n]){r=t[n],i=e[n];break}return r<i?-1:i<r?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var i=l.allocUnsafe(e),n=0;for(r=0;r<t.length;++r){var o=t[r];if(N(o,Uint8Array))n+o.length>i.length?l.from(o).copy(i,n):Uint8Array.prototype.set.call(i,o,n);else{if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,n)}n+=o.length}return i},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},l.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},l.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},l.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?L(this,0,t):y.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(t,e,r,i,n){if(N(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),h=this.slice(i,n),f=t.slice(e,r),u=0;u<a;++u)if(h[u]!==f[u]){o=h[u],s=f[u];break}return o<s?-1:s<o?1:0},l.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},l.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},l.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},l.prototype.write=function(t,e,r,i){if(void 0===e)i="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)i=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return C(this,t,e,r);case"base64":return D(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function x(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(127&t[n]);return i}function O(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function T(t,e,r){var i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var n="",o=e;o<r;++o)n+=Y[t[o]];return n}function I(t,e,r){for(var i=t.slice(e,r),n="",o=0;o<i.length-1;o+=2)n+=String.fromCharCode(i[o]+256*i[o+1]);return n}function U(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,i,n,o){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<o)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}function P(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(t,e,r,i,o){return e=+e,r>>>=0,o||P(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function k(t,e,r,i,o){return e=+e,r>>>=0,o||P(t,0,r,8),n.write(t,e,r,i,52,8),r+8}l.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var i=this.subarray(t,e);return Object.setPrototypeOf(i,l.prototype),i},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var i=this[t],n=1,o=0;++o<e&&(n*=256);)i+=this[t+o]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||U(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},l.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),n.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),n.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),n.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),n.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||R(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o<r&&(n*=256);)this[e+o]=t/n&255;return e+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||R(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},l.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s|0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeFloatLE=function(t,e,r){return j(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return j(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return k(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return k(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,i){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<r&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var n=i-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,i):Uint8Array.prototype.set.call(t,this.subarray(r,i),e),n},l.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!l.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=l.isBuffer(t)?t:l.from(t,i),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var J=/[^+/0-9A-Za-z-_]/g;function S(t,e){var r;e=e||1/0;for(var i=t.length,n=null,o=[],s=0;s<i;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function _(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(J,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}var Y=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)e[i+n]=t[r]+t[n];return e}()},526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],l=o[1],h=new n(function(t,e,r){return 3*(e+r)/4-r}(0,s,l)),f=0,u=l>0?s-4:s;for(r=0;r<u;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],h[f++]=e>>16&255,h[f++]=e>>8&255,h[f++]=255&e;return 2===l&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,h[f++]=255&e),1===l&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,h[f++]=e>>8&255,h[f++]=255&e),h},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,o=[],s=16383,a=0,h=i-n;a<h;a+=s)o.push(l(t,a,a+s>h?h:a+s));return 1===n?(e=t[i-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,i){for(var n,o,s=[],a=e;a<i;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=n)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};(()=>{"use strict";r.d(i,{TinyDragger:()=>l});var t=r(287);const e="undefined"!=typeof window&&void 0!==window.document,n={items:{},order:[]};function o(t,e){const r=[],i=Array.isArray(t)?t:Object.entries(t);for(const[t,o]of i)if(!n.items.hasOwnProperty(t)){n.items[t]=o;let i="number"==typeof e?e:-1;if(-1===i){const t=n.order.indexOf("object");i=t>-1?t:n.order.length}i=Math.min(Math.max(0,i),n.order.length),n.order.splice(i,0,t),r.push(t)}return r}function s(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"===Object.prototype.toString.call(t)}o([["undefined",t=>void 0===t],["null",t=>null===t],["boolean",t=>"boolean"==typeof t],["number",t=>"number"==typeof t&&!Number.isNaN(t)],["bigint",t=>"bigint"==typeof t],["string",t=>"string"==typeof t],["symbol",t=>"symbol"==typeof t],["function",t=>"function"==typeof t],["array",t=>Array.isArray(t)]]),e||o([["buffer",e=>void 0!==t.hp&&t.hp.isBuffer(e)]]),e&&o([["file",t=>"undefined"!=typeof File&&t instanceof File]]),o([["date",t=>t instanceof Date],["regexp",t=>t instanceof RegExp],["map",t=>t instanceof Map],["set",t=>t instanceof Set],["weakmap",t=>t instanceof WeakMap],["weakset",t=>t instanceof WeakSet],["promise",t=>t instanceof Promise]]),e&&o([["htmlelement",t=>"undefined"!=typeof HTMLElement&&t instanceof HTMLElement]]),o([["object",t=>s(t)]]);const a=t=>{const e=getComputedStyle(t),r=parseFloat(e.borderLeftWidth)||0,i=parseFloat(e.borderRightWidth)||0,n=parseFloat(e.borderTopWidth)||0,o=parseFloat(e.borderBottomWidth)||0;return{x:r+i,y:n+o,left:r,right:i,top:n,bottom:o}},l=class{#t=!0;#e=!1;#r=0;#i=0;#n=!1;#o=!1;#s=!1;#a=!1;#l=!1;#h=!1;#f=null;#u=[];#c=null;#g={start:!1,end:!1,collide:!1,move:!1};#d=null;#p;#y="drag-hidden";#v="dragging";#b="drag-active";#m="jail-drag-active";#w="jail-drag-disabled";#E="dragging-collision";constructor(t,e={}){if(!(t instanceof HTMLElement))throw new Error("TinyDragger requires a valid target HTMLElement to initialize.");if(this.#p=t,void 0!==e.jail&&!(e.jail instanceof HTMLElement))throw new Error('The "jail" option must be an HTMLElement if provided.');if(void 0!==e.vibration&&!1!==e.vibration&&!s(e.vibration))throw new Error('The "vibration" option must be an object or false.');const r=(t,e)=>{if(void 0!==t&&"boolean"!=typeof t)throw new Error(`The "${e}" option must be a boolean.`)},i=(t,e)=>{if(void 0!==t&&"string"!=typeof t)throw new Error(`The "${e}" option must be a string.`)};r(e.collisionByMouse,"collisionByMouse"),r(e.lockInsideJail,"lockInsideJail"),r(e.dropInJailOnly,"dropInJailOnly"),r(e.revertOnDrop,"revertOnDrop"),r(e.multiCollision,"multiCollision"),i(e.classDragging,"classDragging"),i(e.classBodyDragging,"classBodyDragging"),i(e.classJailDragging,"classJailDragging"),i(e.classJailDragDisabled,"classJailDragDisabled"),i(e.classDragCollision,"classDragCollision"),i(e.classHidden,"classHidden"),e.jail instanceof HTMLElement&&(this.#d=e.jail),this.#g=Object.assign({start:!1,end:!1,collide:!1,move:!1},s(e.vibration)?e.vibration:{}),"string"==typeof e.classDragging&&(this.#v=e.classDragging),"string"==typeof e.classBodyDragging&&(this.#b=e.classBodyDragging),"string"==typeof e.classJailDragging&&(this.#m=e.classJailDragging),"string"==typeof e.classJailDragDisabled&&(this.#w=e.classJailDragDisabled),"string"==typeof e.classHidden&&(this.#y=e.classHidden),"string"==typeof e.classDragCollision&&(this.#E=e.classDragCollision),"boolean"==typeof e.collisionByMouse&&(this.#l=e.collisionByMouse),"boolean"==typeof e.revertOnDrop&&(this.#s=e.revertOnDrop),"boolean"==typeof e.lockInsideJail&&(this.#o=e.lockInsideJail),"boolean"==typeof e.dropInJailOnly&&(this.#h=e.dropInJailOnly),"boolean"==typeof e.multiCollision&&(this.#n=e.multiCollision),this._onMouseDown=this.#C.bind(this),this._onMouseMove=this.#D.bind(this),this._onMouseUp=this.#B.bind(this),this._onTouchStart=t=>this.#C(t.touches[0]),this._onTouchMove=t=>this.#D(t.touches[0]),this._onTouchEnd=t=>this.#B(t.changedTouches[0]),this.#p.addEventListener("mousedown",this._onMouseDown),this.#p.addEventListener("touchstart",this._onTouchStart,{passive:!1})}enable(){this.#A(),this.#d&&this.#d.classList.add(this.#w),this.#t=!0}disable(){this.#d&&this.#d.classList.remove(this.#w),this.#t=!1}addCollidable(t){if(this.#A(),!(t instanceof HTMLElement))throw new Error("addCollidable expects an HTMLElement as argument.");this.#u.includes(t)||this.#u.push(t)}removeCollidable(t){if(this.#A(),!(t instanceof HTMLElement))throw new Error("removeCollidable expects an HTMLElement as argument.");this.#u=this.#u.filter((e=>e!==t))}setVibrationPattern({startPattern:t=!1,endPattern:e=!1,collidePattern:r=!1,movePattern:i=!1}={}){this.#A();const n=t=>!1===t||Array.isArray(t)&&t.every((t=>"number"==typeof t));if(!n(t))throw new Error('Invalid "startPattern": must be false or an array of numbers.');if(!n(e))throw new Error('Invalid "endPattern": must be false or an array of numbers.');if(!n(r))throw new Error('Invalid "collidePattern": must be false or an array of numbers.');if(!n(i))throw new Error('Invalid "movePattern": must be false or an array of numbers.');this.#g={start:t,end:e,collide:r,move:i}}disableVibration(){this.#A(),this.#g={start:!1,end:!1,collide:!1,move:!1}}getOffset(t){if(this.#A(),!(t instanceof MouseEvent||t instanceof Touch)||"number"!=typeof t.clientX||"number"!=typeof t.clientY)throw new Error("getOffset expects an event with valid clientX and clientY coordinates.");const e=this.#p.getBoundingClientRect(),{left:r,top:i}=a(this.#p);return{x:t.clientX-e.left+r,y:t.clientY-e.top+i}}#C(t){if(t instanceof MouseEvent&&t.preventDefault(),this.#e||!this.#t||!this.#p.parentElement)return;const e=this.#p.cloneNode(!0);if(!(e instanceof HTMLElement))return;this.#c=e,this.#a=!0;const r=this.#p.getBoundingClientRect();Object.assign(this.#c.style,{position:"absolute",pointerEvents:"none",left:`${this.#p.offsetLeft}px`,top:`${this.#p.offsetTop}px`,width:`${r.width}px`,height:`${r.height}px`,zIndex:9999}),this.#p.classList.add(this.#y),this.#p.parentElement.appendChild(this.#c);const{x:i,y:n}=this.getOffset(t);this.#i=i,this.#r=n,this.#c.classList.add(this.#v),document.body.classList.add(this.#b),this.#d&&this.#d.classList.add(this.#m),document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),document.addEventListener("touchmove",this._onTouchMove,{passive:!1}),document.addEventListener("touchend",this._onTouchEnd),navigator.vibrate&&Array.isArray(this.#g.start)&&navigator.vibrate(this.#g.start),this.checkDragCollision(t),this.#L("drag")}#M=[];#x(t){t&&(t.classList.add(this.#E),this.#M.push(t))}#O(){for(;this.#M.length>0;){const t=this.#M.shift();t&&t.classList.remove(this.#E)}this.#f&&this.#f.classList.remove(this.#E)}checkDragCollision(t){const{collidedElements:e}=this.execCollision(t),r=e[0]||null;this.#f&&!e.includes(this.#f)&&this.#O(),e.forEach((t=>this.#x(t))),this.#u.forEach((t=>{e.includes(t)||t.classList.remove(this.#E)})),navigator.vibrate&&Array.isArray(this.#g.collide)&&e.length>0&&navigator.vibrate(this.#g.collide),this.#f=r}#D(t){if(t instanceof MouseEvent&&t.preventDefault(),this.#e||!this.#a||!this.#t||!this.#c)return;const e=(this.#c.offsetParent||document.body).getBoundingClientRect();let r=t.clientX-e.left-this.#i,i=t.clientY-e.top-this.#r;if(this.#o&&this.#d){const t=this.#d.getBoundingClientRect(),n=this.#c.getBoundingClientRect(),o=t.left-e.left,s=t.top-e.top,{x:l,y:h}=a(this.#d),f=o+t.width-n.width-h,u=s+t.height-n.height-l;r=Math.max(o,Math.min(r,f)),i=Math.max(s,Math.min(i,u))}this.#c.style.position="absolute",this.#c.style.left=`${r}px`,this.#c.style.top=`${i}px`,navigator.vibrate&&Array.isArray(this.#g.move)&&navigator.vibrate(this.#g.move),this.checkDragCollision(t),this.#L("dragging")}execCollision(t){if(this.#e||!this.#c)return{inJail:!1,collidedElements:[]};let e=[],r=!0;const i=this.#d?.getBoundingClientRect();if(this.#l){const n=t.clientX,o=t.clientY;this.#h&&this.#d&&i&&(r=n>=i.left&&n<=i.right&&o>=i.top&&o<=i.bottom),e=r?this.#n?this.getAllCollidedElements(n,o):[this.getCollidedElement(n,o)].filter(Boolean):[]}else{const t=this.#c.getBoundingClientRect();this.#h&&this.#d&&i&&(r=t.left>=i.left&&t.right<=i.right&&t.top>=i.top&&t.bottom<=i.bottom),e=r?this.#n?this.getAllCollidedElementsByRect(t):[this.getCollidedElementByRect(t)].filter(Boolean):[]}return{inJail:r,collidedElements:e}}#B(t){if(t instanceof MouseEvent&&t.preventDefault(),this.#e||!this.#a)return;if(this.#a=!1,!this.#c)return;this.#p.classList.remove(this.#v),document.body.classList.remove(this.#b),this.#d&&this.#d.classList.remove(this.#m),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd);const{collidedElements:e}=this.execCollision(t);navigator.vibrate&&Array.isArray(this.#g.end)&&navigator.vibrate(this.#g.end);const r=this.#c.style.left,i=this.#c.style.top;this.#c&&(this.#c.remove(),this.#c=null),this.#f&&this.#O(),this.#f=null,this.#p.classList.remove(this.#y),this.#s||(this.#p.style.left=r,this.#p.style.top=i);const n=new CustomEvent("drop",{detail:{targets:e,first:e[0]||null}});this.#p.dispatchEvent(n)}#T(t,e){const r=t.getBoundingClientRect();return!(e.right<r.left||e.left>r.right||e.bottom<r.top||e.top>r.bottom)}getAllCollidedElementsByRect(t){if(this.#A(),!(t instanceof DOMRect)||"number"!=typeof t.left||"number"!=typeof t.right||"number"!=typeof t.top||"number"!=typeof t.bottom)throw new Error("getCollidedElementByRect expects a valid DOMRect object.");return this.#u.filter((e=>this.#T(e,t)))}getCollidedElementByRect(t){if(this.#A(),!(t instanceof DOMRect)||"number"!=typeof t.left||"number"!=typeof t.right||"number"!=typeof t.top||"number"!=typeof t.bottom)throw new Error("getCollidedElementByRect expects a valid DOMRect object.");return this.#u.find((e=>this.#T(e,t)))||null}#I(t,e,r){const i=t.getBoundingClientRect();return e>=i.left&&e<=i.right&&r>=i.top&&r<=i.bottom}getAllCollidedElements(t,e){if(this.#A(),"number"!=typeof t||"number"!=typeof e)throw new Error("getCollidedElement expects numeric x and y coordinates.");return this.#u.filter((r=>this.#I(r,t,e)))}getCollidedElement(t,e){if(this.#A(),"number"!=typeof t||"number"!=typeof e)throw new Error("getCollidedElement expects numeric x and y coordinates.");return this.#u.find((r=>this.#I(r,t,e)))||null}#L(t){const e=new CustomEvent(t);this.#p.dispatchEvent(e)}getDragging(){return this.#a}getLockInsideJail(){return this.#o}setLockInsideJail(t){if("boolean"!=typeof t)throw new Error("lockInsideJail must be a boolean.");this.#o=t}getRevertOnDrop(){return this.#s}setRevertOnDrop(t){if("boolean"!=typeof t)throw new Error("revertOnDrop must be a boolean.");this.#s=t}getCollisionByMouse(){return this.#l}setCollisionByMouse(t){if("boolean"!=typeof t)throw new Error("collisionByMouse must be a boolean.");this.#l=t}getDropInJailOnly(){return this.#h}setDropInJailOnly(t){if("boolean"!=typeof t)throw new Error("dropInJailOnly must be a boolean.");this.#h=t}getTarget(){return this.#p}getJail(){return this.#d}getDragProxy(){return this.#c}getLastCollision(){return this.#f}getCollidables(){return[...this.#u]}getDragHiddenClass(){return this.#y}getClassDragging(){return this.#v}getClassBodyDragging(){return this.#b}getClassJailDragging(){return this.#m}getClassJailDragDisabled(){return this.#w}getClassDragCollision(){return this.#E}getVibrations(){return{...this.#g}}getStartVibration(){return this.#g.start}getEndVibration(){return this.#g.end}getCollideVibration(){return this.#g.collide}getMoveVibration(){return this.#g.move}isEnabled(){return this.#t}#A(){if(this.#e)throw new Error("This TinyDragger instance has been destroyed and can no longer be used.")}destroy(){this.#e||(this.disable(),this.#p.removeEventListener("mousedown",this._onMouseDown),this.#p.removeEventListener("touchstart",this._onTouchStart),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd),this.#f&&this.#O(),this.#c&&(this.#c.remove(),this.#c=null),this.#u=[],this.#a=!1,this.#f=null,this.#p.classList.remove(this.#y,this.#v),document.body.classList.remove(this.#b),this.#d&&this.#d.classList.remove(this.#m,this.#w),this.#e=!0)}}})(),window.TinyDragger=i.TinyDragger})();
|