tiny-essentials 1.18.1 → 1.19.0

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.
Files changed (74) hide show
  1. package/README.md +17 -3
  2. package/dist/node_modules/firebase-functions/lib/common/trace.cjs +0 -1
  3. package/dist/node_modules/firebase-functions/lib/logger/index.cjs +1 -0
  4. package/dist/v1/ColorSafeStringify.min.js +1 -1
  5. package/dist/v1/TinyAfterScrollWatcher.min.js +1 -1
  6. package/dist/v1/TinyBasicsEs.js +13 -6
  7. package/dist/v1/TinyBasicsEs.min.js +1 -1
  8. package/dist/v1/TinyClipboard.min.js +1 -1
  9. package/dist/v1/TinyColorConverter.js +617 -0
  10. package/dist/v1/TinyColorConverter.min.js +1 -0
  11. package/dist/v1/TinyDomReadyManager.min.js +1 -1
  12. package/dist/v1/TinyDragger.min.js +1 -1
  13. package/dist/v1/TinyEssentials.js +2635 -482
  14. package/dist/v1/TinyEssentials.min.js +1 -1
  15. package/dist/v1/TinyEvents.js +402 -0
  16. package/dist/v1/TinyEvents.min.js +1 -0
  17. package/dist/v1/TinyHtml.min.js +1 -1
  18. package/dist/v1/TinyLocalStorage.js +1292 -0
  19. package/dist/v1/TinyLocalStorage.min.js +1 -0
  20. package/dist/v1/TinyNotifications.min.js +1 -1
  21. package/dist/v1/TinyNotifyCenter.min.js +1 -1
  22. package/dist/v1/TinyPromiseQueue.min.js +1 -1
  23. package/dist/v1/TinyRateLimiter.js +2 -1
  24. package/dist/v1/TinyRateLimiter.min.js +1 -1
  25. package/dist/v1/TinySmartScroller.js +570 -52
  26. package/dist/v1/TinySmartScroller.min.js +1 -1
  27. package/dist/v1/TinyTextRangeEditor.min.js +1 -1
  28. package/dist/v1/TinyTimeout.js +233 -0
  29. package/dist/v1/TinyTimeout.min.js +1 -0
  30. package/dist/v1/TinyToastNotify.min.js +1 -1
  31. package/dist/v1/TinyUploadClicker.js +1457 -106
  32. package/dist/v1/TinyUploadClicker.min.js +1 -1
  33. package/dist/v1/UltraRandomMsgGen.min.js +1 -1
  34. package/dist/v1/basics/html.cjs +13 -6
  35. package/dist/v1/basics/html.d.mts +12 -4
  36. package/dist/v1/basics/html.mjs +13 -6
  37. package/dist/v1/build/TinyColorConverter.cjs +7 -0
  38. package/dist/v1/build/TinyColorConverter.d.mts +3 -0
  39. package/dist/v1/build/TinyColorConverter.mjs +2 -0
  40. package/dist/v1/build/TinyEvents.cjs +7 -0
  41. package/dist/v1/build/TinyEvents.d.mts +3 -0
  42. package/dist/v1/build/TinyEvents.mjs +2 -0
  43. package/dist/v1/build/TinyLocalStorage.cjs +7 -0
  44. package/dist/v1/build/TinyLocalStorage.d.mts +3 -0
  45. package/dist/v1/build/TinyLocalStorage.mjs +2 -0
  46. package/dist/v1/build/TinyTimeout.cjs +7 -0
  47. package/dist/v1/build/TinyTimeout.d.mts +3 -0
  48. package/dist/v1/build/TinyTimeout.mjs +2 -0
  49. package/dist/v1/index.cjs +8 -0
  50. package/dist/v1/index.d.mts +5 -1
  51. package/dist/v1/index.mjs +5 -1
  52. package/dist/v1/libs/TinyColorConverter.cjs +578 -0
  53. package/dist/v1/libs/TinyColorConverter.d.mts +396 -0
  54. package/dist/v1/libs/TinyColorConverter.mjs +520 -0
  55. package/dist/v1/libs/TinyEvents.cjs +363 -0
  56. package/dist/v1/libs/TinyEvents.d.mts +160 -0
  57. package/dist/v1/libs/TinyEvents.mjs +328 -0
  58. package/dist/v1/libs/TinyLocalStorage.cjs +847 -0
  59. package/dist/v1/libs/TinyLocalStorage.d.mts +407 -0
  60. package/dist/v1/libs/TinyLocalStorage.mjs +740 -0
  61. package/dist/v1/libs/TinySmartScroller.cjs +207 -52
  62. package/dist/v1/libs/TinySmartScroller.d.mts +164 -16
  63. package/dist/v1/libs/TinySmartScroller.mjs +181 -52
  64. package/dist/v1/libs/TinyTimeout.cjs +194 -0
  65. package/dist/v1/libs/TinyTimeout.d.mts +89 -0
  66. package/dist/v1/libs/TinyTimeout.mjs +179 -0
  67. package/dist/v1/libs/TinyUploadClicker.cjs +1 -0
  68. package/docs/v1/README.md +4 -0
  69. package/docs/v1/libs/TinyColorConverter.md +220 -0
  70. package/docs/v1/libs/TinyEvents.md +199 -0
  71. package/docs/v1/libs/TinyLocalStorage.md +350 -0
  72. package/docs/v1/libs/TinyRateLimiter.md +0 -3
  73. package/docs/v1/libs/TinyTimeout.md +190 -0
  74. package/package.json +28 -5
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see TinyUploadClicker.min.js.LICENSE.txt */
2
- (()=>{var t={133:()=>{},251:(t,e)=>{e.read=function(t,e,r,n,o){var i,s,l=8*o-n-1,a=(1<<l)-1,c=a>>1,u=-7,f=r?o-1:0,p=r?-1:1,h=t[e+f];for(f+=p,i=h&(1<<-u)-1,h>>=-u,u+=l;u>0;i=256*i+t[e+f],f+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+t[e+f],f+=p,u-=8);if(0===i)i=1-c;else{if(i===a)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=c}return(h?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,l,a,c=8*i-o-1,u=(1<<c)-1,f=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(l=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(a=Math.pow(2,-s))<1&&(s--,a*=2),(e+=s+f>=1?p/a:p*Math.pow(2,1-f))*a>=2&&(s++,a/=2),s+f>=u?(l=0,s=u):s+f>=1?(l=(e*a-1)*Math.pow(2,o),s+=f):(l=e*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;t[r+h]=255&l,h+=d,l/=256,o-=8);for(s=s<<o|l,c+=o;c>0;t[r+h]=255&s,h+=d,s/=256,c-=8);t[r+h-d]|=128*m}},287:(t,e,r)=>{"use strict";var n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=a,e.IS=50;var s=2147483647;function l(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(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 f(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|m(t,e),n=l(r),o=n.write(t,e);return o!==r&&(n=n.slice(0,o)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(F(t,Uint8Array)){var e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return p(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(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return h(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(F(t,SharedArrayBuffer)||t&&F(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);var o=function(t){if(a.isBuffer(t)){var e=0|d(t.length),r=l(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||j(t.length)?l(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.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 u(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 f(t){return u(t),l(t<0?0:0|d(t))}function p(t){for(var e=t.length<0?0:0|d(t.length),r=l(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(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 n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,a.prototype),n}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 m(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(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,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(o)return n?-1:O(t).length;e=(""+e).toLowerCase(),o=!0}}function g(t,e,r){var n=!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 B(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return L(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return _(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){var i,s=1,l=t.length,a=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,l/=2,a/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var u=-1;for(i=r;i<l;i++)if(c(t,i)===c(e,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===a)return u*s}else-1!==u&&(i-=i-u),u=-1}else for(r+a>l&&(r=l-a),i=r;i>=0;i--){for(var f=!0,p=0;p<a;p++)if(c(t,i+p)!==c(e,p)){f=!1;break}if(f)return i}return-1}function E(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var l=parseInt(e.substr(2*s,2),16);if(j(l))return s;t[r+s]=l}return s}function v(t,e,r,n){return U(O(e,t.length-r),t,r,n)}function T(t,e,r,n){return U(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return U(D(e),t,r,n)}function C(t,e,r,n){return U(function(t,e){for(var r,n,o,i=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function _(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,s,l,a,c=t[o],u=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=t[o+1]))&&(a=(31&c)<<6|63&i)>127&&(u=a);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(a=(15&c)<<12|(63&i)<<6|63&s)>2047&&(a<55296||a>57343)&&(u=a);break;case 4:i=t[o+1],s=t[o+2],l=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&l)&&(a=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&l)>65535&&a<1114112&&(u=a)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=f}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}a.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}}(),a.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(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?l(t):void 0!==e?"string"==typeof r?l(t).fill(e,r):l(t).fill(e):l(t)}(t,e,r)},a.allocUnsafe=function(t){return f(t)},a.allocUnsafeSlow=function(t){return f(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(F(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),F(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.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,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},a.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}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(F(i,Uint8Array))o+i.length>n.length?a.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},a.byteLength=m,a.prototype._isBuffer=!0,a.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)y(this,e,e+1);return this},a.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)y(this,e,e+3),y(this,e+1,e+2);return this},a.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)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?S(this,0,t):g.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.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+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(t,e,r,n,o){if(F(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.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===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(i,s),c=this.slice(n,o),u=t.slice(e,r),f=0;f<l;++f)if(c[f]!==u[f]){i=c[f],s=u[f];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=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===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return T(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function L(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function B(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=V[t[i]];return o}function W(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function P(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 I(t,e,r,n,o,i){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function N(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(t,e,r,n,i){return e=+e,r>>>=0,i||N(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,i){return e=+e,r>>>=0,i||N(t,0,r,8),o.write(t,e,r,n,52,8),r+8}a.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 n=this.subarray(t,e);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),o.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),o.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),o.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),o.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||I(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||I(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||I(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},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||I(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},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var i=0,s=1,l=0;for(this[e]=255&t;++i<r&&(s*=256);)t<0&&0===l&&0!==this[e+i-1]&&(l=1),this[e+i]=(t/s|0)-l&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var o=Math.pow(2,8*r-1);I(this,t,e,r,o-1,-o)}var i=r-1,s=1,l=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===l&&0!==this[e+i+1]&&(l=1),this[e+i]=(t/s|0)-l&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||I(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||I(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},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||I(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},a.prototype.writeFloatLE=function(t,e,r){return R(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return R(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===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(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),o},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var o=t.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(t=o)}}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 i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),l=s.length;if(0===l)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=s[i%l]}return this};var H=/[^+/0-9A-Za-z-_]/g;function O(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.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;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function j(t){return t!=t}var V=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)e[n+o]=t[r]+t[o];return e}()},370:()=>{},526:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=l(t),s=i[0],a=i[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),u=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[u++]=e>>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[u++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,l=0,c=n-o;l<c;l+=s)i.push(a(t,l,l+s>c?c:l+s));return 1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function l(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 a(t,e,n){for(var o,i,s=[],l=e;l<n;l+=3)o=(t[l]<<16&16711680)+(t[l+1]<<8&65280)+(255&t[l+2]),s.push(r[(i=o)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},606:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var l,a=[],c=!1,u=-1;function f(){c&&l&&(c=!1,l.length?a=l.concat(a):u=-1,a.length&&p())}function p(){if(!c){var t=s(f);c=!0;for(var e=a.length;e;){for(l=a,a=[];++u<e;)l&&l[u].run();u=-1,e=a.length}l=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new h(t,e)),1!==a.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},975:(t,e,r)=>{"use strict";var n=r(606);function o(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function i(t,e){for(var r,n="",o=0,i=-1,s=0,l=0;l<=t.length;++l){if(l<t.length)r=t.charCodeAt(l);else{if(47===r)break;r=47}if(47===r){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var a=n.lastIndexOf("/");if(a!==n.length-1){-1===a?(n="",o=0):o=(n=n.slice(0,a)).length-1-n.lastIndexOf("/"),i=l,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=l,s=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,l):n=t.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var s={resolve:function(){for(var t,e="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var l;s>=0?l=arguments[s]:(void 0===t&&(t=n.cwd()),l=t),o(l),0!==l.length&&(e=l+"/"+e,r=47===l.charCodeAt(0))}return e=i(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(o(t),0===t.length)return".";var e=47===t.charCodeAt(0),r=47===t.charCodeAt(t.length-1);return 0!==(t=i(t,!e)).length||e||(t="."),t.length>0&&r&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return o(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var r=arguments[e];o(r),r.length>0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":s.normalize(t)},relative:function(t,e){if(o(t),o(e),t===e)return"";if((t=s.resolve(t))===(e=s.resolve(e)))return"";for(var r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var n=t.length,i=n-r,l=1;l<e.length&&47===e.charCodeAt(l);++l);for(var a=e.length-l,c=i<a?i:a,u=-1,f=0;f<=c;++f){if(f===c){if(a>c){if(47===e.charCodeAt(l+f))return e.slice(l+f+1);if(0===f)return e.slice(l+f)}else i>c&&(47===t.charCodeAt(r+f)?u=f:0===f&&(u=0));break}var p=t.charCodeAt(r+f);if(p!==e.charCodeAt(l+f))break;47===p&&(u=f)}var h="";for(f=r+u+1;f<=n;++f)f!==n&&47!==t.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+e.slice(l+u):(l+=u,47===e.charCodeAt(l)&&++l,e.slice(l))},_makeLong:function(t){return t},dirname:function(t){if(o(t),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!i){n=s;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":t.slice(0,n)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');o(t);var r,n=0,i=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var l=e.length-1,a=-1;for(r=t.length-1;r>=0;--r){var c=t.charCodeAt(r);if(47===c){if(!s){n=r+1;break}}else-1===a&&(s=!1,a=r+1),l>=0&&(c===e.charCodeAt(l)?-1==--l&&(i=r):(l=-1,i=a))}return n===i?i=a:-1===i&&(i=t.length),t.slice(n,i)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!s){n=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":t.slice(n,i)},extname:function(t){o(t);for(var e=-1,r=0,n=-1,i=!0,s=0,l=t.length-1;l>=0;--l){var a=t.charCodeAt(l);if(47!==a)-1===n&&(i=!1,n=l+1),46===a?-1===e?e=l:1!==s&&(s=1):-1!==e&&(s=-1);else if(!i){r=l+1;break}}return-1===e||-1===n||0===s||1===s&&e===n-1&&e===r+1?"":t.slice(e,n)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){o(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var r,n=t.charCodeAt(0),i=47===n;i?(e.root="/",r=1):r=0;for(var s=-1,l=0,a=-1,c=!0,u=t.length-1,f=0;u>=r;--u)if(47!==(n=t.charCodeAt(u)))-1===a&&(c=!1,a=u+1),46===n?-1===s?s=u:1!==f&&(f=1):-1!==s&&(f=-1);else if(!c){l=u+1;break}return-1===s||-1===a||0===f||1===f&&s===a-1&&s===l+1?-1!==a&&(e.base=e.name=0===l&&i?t.slice(1,a):t.slice(l,a)):(0===l&&i?(e.name=t.slice(1,s),e.base=t.slice(1,a)):(e.name=t.slice(l,s),e.base=t.slice(l,a)),e.ext=t.slice(s,a)),l>0?e.dir=t.slice(0,l-1):i&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,t.exports=s}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.d(n,{TinyUploadClicker:()=>M});var t={};r.r(t),r.d(t,{areElsCollBottom:()=>c,areElsCollLeft:()=>u,areElsCollPerfBottom:()=>h,areElsCollPerfLeft:()=>d,areElsCollPerfRight:()=>m,areElsCollPerfTop:()=>p,areElsCollRight:()=>f,areElsCollTop:()=>a,areElsColliding:()=>g,areElsPerfColliding:()=>y,getElsCollDetails:()=>_,getElsCollDirDepth:()=>C,getElsCollOverlap:()=>E,getElsCollOverlapPos:()=>v,getElsColliding:()=>b,getElsPerfColliding:()=>w,getElsRelativeCenterOffset:()=>A,getRectCenter:()=>T});var e=r(287);function o(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"===Object.prototype.toString.call(t)}const i="undefined"!=typeof window&&void 0!==window.document,s={items:{},order:[]};function l(t,e){const r=[],n=Array.isArray(t)?t:Object.entries(t);for(const[t,o]of n)if(!s.items.hasOwnProperty(t)){s.items[t]=o;let n="number"==typeof e?e:-1;if(-1===n){const t=s.order.indexOf("object");n=t>-1?t:s.order.length}n=Math.min(Math.max(0,n),s.order.length),s.order.splice(n,0,t),r.push(t)}return r}l([["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)]]),i||l([["buffer",t=>void 0!==e.hp&&e.hp.isBuffer(t)]]),i&&l([["file",t=>"undefined"!=typeof File&&t instanceof File]]),l([["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]]),i&&l([["htmlelement",t=>"undefined"!=typeof HTMLElement&&t instanceof HTMLElement]]),l([["object",t=>o(t)]]);const a=(t,e)=>t.bottom<e.top,c=(t,e)=>t.top>e.bottom,u=(t,e)=>t.right<e.left,f=(t,e)=>t.left>e.right,p=(t,e)=>t.bottom<=e.top,h=(t,e)=>t.top>=e.bottom,d=(t,e)=>t.right<=e.left,m=(t,e)=>t.left>=e.right,g=(t,e)=>!(u(t,e)||f(t,e)||a(t,e)||c(t,e)),y=(t,e)=>!(d(t,e)||m(t,e)||p(t,e)||h(t,e)),b=(t,e)=>u(t,e)?"left":f(t,e)?"right":a(t,e)?"top":c(t,e)?"bottom":null,w=(t,e)=>d(t,e)?"left":m(t,e)?"right":p(t,e)?"top":h(t,e)?"bottom":null,E=(t,e)=>({overlapLeft:e.right-t.left,overlapRight:t.right-e.left,overlapTop:e.bottom-t.top,overlapBottom:t.bottom-e.top}),v=({overlapLeft:t=-1,overlapRight:e=-1,overlapTop:r=-1,overlapBottom:n=-1}={})=>({dirX:t<e?"right":"left",dirY:r<n?"bottom":"top"}),T=t=>({x:t.left+t.width/2,y:t.top+t.height/2});function A(t,e){const r=t.left+t.width/2,n=t.top+t.height/2;return{x:e.left+e.width/2-r,y:e.top+e.height/2-n}}function C(t,e){if(!y(t,e))return{inDir:null,dirX:null,dirY:null,depthX:0,depthY:0};const{overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}=E(t,e),{dirX:s,dirY:l}=v({overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}),a=Math.min(r,n),c=Math.min(o,i);let u;return u=a<c?s:l,{inDir:u,dirX:s,dirY:l,depthX:a,depthY:c}}function _(t,e){const r=y(t,e),n={in:null,x:null,y:null},o={y:null,x:null},i={top:0,bottom:0,left:0,right:0},{overlapLeft:s,overlapRight:l,overlapTop:a,overlapBottom:c}=E(e,t);i.top=a,i.bottom=c,i.left=s,i.right=l;const u=Object.entries(i).filter((([,t])=>t>0)).sort(((t,e)=>t[1]-e[1])),{dirX:f,dirY:p}=v({overlapLeft:l,overlapRight:s,overlapTop:c,overlapBottom:a});return n.y=p,n.x=f,i.bottom<0?o.y="bottom":i.top<0&&(o.y="top"),i.left<0?o.x="left":i.right<0&&(o.x="right"),n.in=r?i.top===i.bottom&&i.bottom===i.left&&i.left===i.right?"center":u.length?u[0][0]:"top":null,{dirs:n,depth:i,isNeg:o}}const{areElsColliding:S,areElsPerfColliding:k,areElsCollTop:L,areElsCollBottom:x,areElsCollLeft:B,areElsCollRight:W}=t,P=new WeakMap,I=new WeakMap,N={top:new WeakMap,bottom:new WeakMap,left:new WeakMap,right:new WeakMap};class R{static Utils={...t};static createElement(t,e){if("string"!=typeof t)throw new TypeError("[TinyHtml] createElement(): The tagName must be a string.");if(void 0!==e&&"object"!=typeof e)throw new TypeError("[TinyHtml] createElement(): The ops must be a object.");return new R(document.createElement(t,e))}static createTextNode(t){if("string"!=typeof t)throw new TypeError("[TinyHtml] createTextNode(): The value must be a string.");return new R(document.createTextNode(t))}static createElementFromHTML(t){const e=document.createElement("template");if(!(t=t.trim()).startsWith("<"))return R.createTextNode(t);if(e.innerHTML=t,!(e.content.firstChild instanceof Element))throw new Error("");return new R(e.content.firstChild)}static query(t,e=document){const r=e.querySelector(t);return r?new R(r):null}querySelector(t){return R.query(t,R._preElem(this,"query"))}static queryAll(t,e=document){const r=e.querySelectorAll(t);return R.toTinyElm([...r])}querySelectorAll(t){return R.queryAll(t,R._preElem(this,"queryAll"))}static getById(t){const e=document.getElementById(t);return e?new R(e):null}static getByClassName(t,e=document){const r=e.getElementsByClassName(t);return R.toTinyElm([...r])}getElementsByClassName(t){return R.getByClassName(t,R._preElem(this,"getByClassName"))}static getByName(t){const e=document.getElementsByName(t);return R.toTinyElm([...e])}static getByTagNameNS(t,e="http://www.w3.org/1999/xhtml",r=document){const n=r.getElementsByTagNameNS(e,t);return R.toTinyElm([...n])}getElementsByTagNameNS(t,e="http://www.w3.org/1999/xhtml"){return R.getByTagNameNS(t,e,R._preElem(this,"getByTagNameNS"))}get(){return this.#t}_getElement(t){if(!(this.#t instanceof Element||this.#t instanceof Window||this.#t instanceof Document))throw new Error(`[TinyHtml] Invalid Element in ${t}().`);return this.#t}static _preElemsTemplate(t,e,r,n){const o=t=>t.map((t=>{const o=t instanceof R?t._getElement(e):t;let i=!1;for(const t of r)if(o instanceof t){i=!0;break}if(!i)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${e}().`);return o}));return Array.isArray(t)?o(t):o([t])}static _preElemTemplate(t,e,r,n,o=!1){const i=t=>{const i=t[0];let s=i instanceof R?i._getElement(e):i,l=!1;for(const t of r)if(s instanceof t){l=!0;break}if(o&&null==s&&(s=null,l=!0),!l)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${e}().`);return s};if(!Array.isArray(t))return i([t]);if(t.length>1)throw new Error(`[TinyHtml] Invalid element amount in ${e}() (Received ${t.length}/1).`);return i(t)}static _preElems(t,e){return R._preElemsTemplate(t,e,[Element],["Element"])}static _preElem(t,e){return R._preElemTemplate(t,e,[Element],["Element"])}static _preNodeElems(t,e){return R._preElemsTemplate(t,e,[Node],["Node"])}static _preNodeElem(t,e){return R._preElemTemplate(t,e,[Node],["Node"])}static _preNodeElemWithNull(t,e){return R._preElemTemplate(t,e,[Node],["Node"],!0)}static _preHtmlElems(t,e){return R._preElemsTemplate(t,e,[HTMLElement],["HTMLElement"])}static _preHtmlElem(t,e){return R._preElemTemplate(t,e,[HTMLElement],["HTMLElement"])}static _preInputElems(t,e){return R._preElemsTemplate(t,e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preInputElem(t,e){return R._preElemTemplate(t,e,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preEventTargetElems(t,e){return R._preElemsTemplate(t,e,[EventTarget],["EventTarget"])}static _preEventTargetElem(t,e){return R._preElemTemplate(t,e,[EventTarget],["EventTarget"])}static _preElemsAndWindow(t,e){return R._preElemsTemplate(t,e,[Element,Window],["Element","Window"])}static _preElemAndWindow(t,e){return R._preElemTemplate(t,e,[Element,Window],["Element","Window"])}static _preElemsAndWinAndDoc(t,e){return R._preElemsTemplate(t,e,[Element,Window,Document],["Element","Window","Document"]).map((t=>t instanceof Document?t.documentElement:t))}static _preElemAndWinAndDoc(t,e){const r=R._preElemTemplate(t,e,[Element,Window,Document],["Element","Window","Document"]);return r instanceof Document?r.documentElement:r}static _preElemsWithDoc(t,e){return R._preElemsTemplate(t,e,[Element,Document],["Element","Document"])}static _preElemWithDoc(t,e){return R._preElemTemplate(t,e,[Element,Document],["Element","Document"])}static toTinyElm(t){const e=t=>t.map((t=>t instanceof R?t:new R(t)));return Array.isArray(t)?e(t):e([t])}static fromTinyElm(t){const e=t=>t.map((t=>t instanceof R?t._getElement("fromTinyElm"):t));return Array.isArray(t)?e(t):e([t])}static winnow(t,e,r,n=!1){if("boolean"!=typeof n)throw new TypeError('The "not" must be a boolean.');if("function"==typeof e)return R._preElems(t,r).filter(((t,r)=>!!e.call(t,r,t)!==n));if(e instanceof Element)return R._preElems(t,r).filter((t=>t===e!==n));if(Array.isArray(e)||"string"!=typeof e&&null!=e.length)return R._preElems(t,r).filter((t=>e.includes(t)!==n));let o=e;return n&&(o=`:not(${o})`),R._preElems(t,r).filter((t=>1===t.nodeType&&t.matches(o)))}static filter(t,e,r=!1){return r&&(e=`:not(${e})`),R._preElems(t,"filter").filter((t=>1===t.nodeType&&t.matches(e)))}static filterOnly(t,e){return R.winnow(t,e,"filterOnly",!1)}static not(t,e){return R.winnow(t,e,"not",!0)}not(t){return R.not(this,t)}static find(t,e){const r=[];for(const n of R._preElems(t,"find"))r.push(...n.querySelectorAll(e));return[...new Set(r)]}find(t){return R.find(this,t)}static is(t,e){return R.winnow(t,e,"is",!1).length>0}is(t){return R.is(this,t)}static has(t,e){const r="string"==typeof e?[...document.querySelectorAll(e)]:R._preElems(e,"has");return R._preElems(t,"has").filter((t=>r.some((e=>t&&t.contains(e)))))}has(t){return R.has(this,t).length>0}static closest(t,e,r){const n=[];for(const o of R._preElems(t,"closest")){let t=o;for(;t&&t!==r;){if(1===t.nodeType&&("string"==typeof e?t.matches(e):t===e)){n.push(t);break}t=t.parentElement}}return[...new Set(n)]}closest(t,e){return R.closest(this,t,e)}static isSameDom(t,e){return R._preNodeElem(t,"isSameDom")===R._preNodeElem(e,"isSameDom")}isSameDom(t){return R.isSameDom(this,t)}_data={};static _dataSelector={public:(t,e)=>{const r=R._preElem(e,t);let n=I.get(r);return n||(n={},I.set(r,n)),n},private:(t,e)=>{if(!(e instanceof R))throw new Error(`Element must be a TinyHtml instance to execute ${t}().`);return e._data}};static data(t,e,r=!1){const n=R._dataSelector[r?"private":"public"]("data",t);if(null==e)return{...n};if("string"!=typeof e)throw new TypeError("The key must be a string.");return n.hasOwnProperty(e)?n[e]:void 0}data(t,e){return R.data(this,t,e)}static setData(t,e,r,n=!1){const o=R._dataSelector[n?"private":"public"]("setData",t);if("string"!=typeof e)throw new TypeError("The key must be a string.");return o[e]=r,t}setData(t,e,r=!1){return R.setData(this,t,e,r)}static _getSibling(t,e,r){let n=R._preNodeElemWithNull(t,r);for(;n&&(n=n[e])&&1!==n.nodeType;);return n instanceof Node?n:null}static _getSiblings(t,e){let r=t;const n=[];for(;r;r=r.nextSibling)1===r.nodeType&&r!==e&&n.push(r);return n}static domDir(t,e,r,n="domDir"){if("string"!=typeof e)throw new TypeError('The "direction" must be a string.');let o=R._preNodeElemWithNull(t,n);const i=[];for(;o&&(o=o[e]);)if(1===o.nodeType){if(r&&("string"==typeof r?o.matches(r):o===r))break;i.push(o)}return i}static parent(t){let e=R._preNodeElemWithNull(t,"parent");const r=e?e.parentNode:null;return r&&11!==r.nodeType?r:null}parent(){return R.parent(this)}static parents(t,e){return R.domDir(t,"parentNode",e,"parents")}parents(t){return R.parents(this,t)}static next(t){return R._getSibling(t,"nextSibling","next")}next(){return R.next(this)}static prev(t){return R._getSibling(t,"previousSibling","prev")}prev(){return R.prev(this)}static nextAll(t){return R.domDir(t,"nextSibling",void 0,"nextAll")}nextAll(){return R.nextAll(this)}static prevAll(t){return R.domDir(t,"previousSibling",void 0,"prevAll")}prevAll(){return R.prevAll(this)}static nextUntil(t,e){return R.domDir(t,"nextSibling",e,"nextUtil")}nextUntil(t){return R.nextUntil(this,t)}static prevUntil(t,e){return R.domDir(t,"previousSibling",e,"prevUtil")}prevUntil(t){return R.prevUntil(this,t)}static siblings(t){const e=R._preNodeElemWithNull(t,"siblings");return R._getSiblings(e&&e.parentNode?e.parentNode.firstChild:null,e)}siblings(){return R.siblings(this)}static children(t){const e=R._preNodeElemWithNull(t,"children");return R._getSiblings(e?e.firstChild:null)}children(){return R.children(this)}static contents(t){const e=R._preNodeElemWithNull(t,"contents");return e instanceof HTMLIFrameElement&&null!=e.contentDocument&&Object.getPrototypeOf(e.contentDocument)?[e.contentDocument]:e instanceof HTMLTemplateElement?Array.from((e.content||e).childNodes):e?Array.from(e.childNodes):[]}contents(){return R.contents(this)}static clone(t,e=!0){if("boolean"!=typeof e)throw new TypeError('The "deep" must be a boolean.');return R._preNodeElems(t,"clone").map((t=>t.cloneNode(e)))}clone(t){return R.clone(this,t)[0]}static _appendChecker(t,...e){const r=[],n=[...e];for(const e in n)"string"!=typeof n[e]?r.push(R._preNodeElem(n[e],t)):r.push(n[e]);return r}static append(t,...e){return R._preElem(t,"append").append(...R._appendChecker("append",...e)),t}append(...t){return R.append(this,...t)}static prepend(t,...e){return R._preElem(t,"prepend").prepend(...R._appendChecker("prepend",...e)),t}prepend(...t){return R.prepend(this,...t)}static before(t,...e){return R._preElem(t,"before").before(...R._appendChecker("before",...e)),t}before(...t){return R.before(this,...t)}static after(t,...e){return R._preElem(t,"after").after(...R._appendChecker("after",...e)),t}after(...t){return R.after(this,...t)}static replaceWith(t,...e){return R._preElem(t,"replaceWith").replaceWith(...R._appendChecker("replaceWith",...e)),t}replaceWith(...t){return R.replaceWith(this,...t)}static appendTo(t,e){const r=R._preNodeElems(t,"appendTo"),n=R._preNodeElems(e,"appendTo");return n.forEach(((t,e)=>{r.forEach((r=>t.appendChild(e===n.length-1?r:r.cloneNode(!0))))})),t}appendTo(t){return R.appendTo(this,t)}static prependTo(t,e){const r=R._preElems(t,"prependTo"),n=R._preElems(e,"prependTo");return n.forEach(((t,e)=>{r.slice().reverse().forEach((r=>t.prepend(e===n.length-1?r:r.cloneNode(!0))))})),t}prependTo(t){return R.prependTo(this,t)}static insertBefore(t,e,r=null){const n=R._preNodeElem(t,"insertBefore"),o=R._preNodeElem(e,"insertBefore"),i=R._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("");return o.parentNode.insertBefore(n,i||o),t}insertBefore(t,e){return R.insertBefore(this,t,e)}static insertAfter(t,e,r=null){const n=R._preNodeElem(t,"insertAfter"),o=R._preNodeElem(e,"insertBefore"),i=R._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("");return o.parentNode.insertBefore(n,i||o.nextSibling),t}insertAfter(t,e){return R.insertAfter(this,t,e)}static replaceAll(t,e){const r=R._preNodeElems(t,"replaceAll"),n=R._preNodeElems(e,"replaceAll");return n.forEach(((t,e)=>{const o=t.parentNode;r.forEach((r=>{o&&o.replaceChild(e===n.length-1?r:r.cloneNode(!0),t)}))})),t}replaceAll(t){return R.replaceAll(this,t)}#t;constructor(t){if(t instanceof R)throw new Error("[TinyHtml] You are trying to put a TinyHtml inside another TinyHtml in constructor.");if(!(t instanceof Element||t instanceof Window||t instanceof Document||t instanceof Text))throw new Error("[TinyHtml] Invalid Target in constructor.");this.#t=t}static isWindow(t){return null!=t&&t===t.window}static css(t){const e=R._preElem(t,"css");return window.getComputedStyle(e)}css(){return R.css(this)}static cssString(t,e){const r=R._preElem(t,"cssString");if("string"!=typeof e)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[e];return"string"==typeof n?n:"number"==typeof n?n.toString():null}cssString(t){return R.cssString(this,t)}static cssList(t,e){const r=R._preElem(t,"cssList");if(!Array.isArray(e))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const t of e)void 0!==t&&(o[t]=n.getPropertyValue(t));return o}cssList(t){return R.cssList(this,t)}static cssFloat(t,e){const r=R._preElem(t,"cssFloat");if("string"!=typeof e)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[e];return parseFloat(n)||0}cssFloat(t){return R.cssFloat(this,t)}static cssFloats(t,e){const r=R._preElem(t,"cssFloats");if(!Array.isArray(e))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const t of e)o[t]=parseFloat(n[t])||0;return o}cssFloats(t){return R.cssFloats(this,t)}static#e={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip",backgroundColor:"background-color",backgroundImage:"background-image",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomLeftRadius:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRadius:"border-radius",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopLeftRadius:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",boxSizing:"box-sizing",breakAfter:"break-after",breakBefore:"break-before",breakInside:"break-inside",captionSide:"caption-side",caretColor:"caret-color",clipPath:"clip-path",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",counterIncrement:"counter-increment",counterReset:"counter-reset",emptyCells:"empty-cells",flexBasis:"flex-basis",flexDirection:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",fontFamily:"font-family",fontFeatureSettings:"font-feature-settings",fontKerning:"font-kerning",fontLanguageOverride:"font-language-override",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontSynthesis:"font-synthesis",fontVariant:"font-variant",fontVariantAlternates:"font-variant-alternates",fontVariantCaps:"font-variant-caps",fontVariantEastAsian:"font-variant-east-asian",fontVariantLigatures:"font-variant-ligatures",fontVariantNumeric:"font-variant-numeric",fontVariantPosition:"font-variant-position",fontWeight:"font-weight",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas",gridTemplateColumns:"grid-template-columns",gridTemplateRows:"grid-template-rows",imageRendering:"image-rendering",justifyContent:"justify-content",letterSpacing:"letter-spacing",lineBreak:"line-break",lineHeight:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",maskClip:"mask-clip",maskComposite:"mask-composite",maskImage:"mask-image",maskMode:"mask-mode",maskOrigin:"mask-origin",maskPosition:"mask-position",maskRepeat:"mask-repeat",maskSize:"mask-size",maskType:"mask-type",maxHeight:"max-height",maxWidth:"max-width",minHeight:"min-height",minWidth:"min-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",offsetAnchor:"offset-anchor",offsetDistance:"offset-distance",offsetPath:"offset-path",offsetRotate:"offset-rotate",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflowAnchor:"overflow-anchor",overflowWrap:"overflow-wrap",overflowX:"overflow-x",overflowY:"overflow-y",paddingBottom:"padding-bottom",paddingLeft:"padding-left",paddingRight:"padding-right",paddingTop:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspectiveOrigin:"perspective-origin",placeContent:"place-content",placeItems:"place-items",placeSelf:"place-self",pointerEvents:"pointer-events",rowGap:"row-gap",scrollBehavior:"scroll-behavior",scrollMargin:"scroll-margin",scrollMarginBlock:"scroll-margin-block",scrollMarginBlockEnd:"scroll-margin-block-end",scrollMarginBlockStart:"scroll-margin-block-start",scrollMarginBottom:"scroll-margin-bottom",scrollMarginInline:"scroll-margin-inline",scrollMarginInlineEnd:"scroll-margin-inline-end",scrollMarginInlineStart:"scroll-margin-inline-start",scrollMarginLeft:"scroll-margin-left",scrollMarginRight:"scroll-margin-right",scrollMarginTop:"scroll-margin-top",scrollPadding:"scroll-padding",scrollPaddingBlock:"scroll-padding-block",scrollPaddingBlockEnd:"scroll-padding-block-end",scrollPaddingBlockStart:"scroll-padding-block-start",scrollPaddingBottom:"scroll-padding-bottom",scrollPaddingInline:"scroll-padding-inline",scrollPaddingInlineEnd:"scroll-padding-inline-end",scrollPaddingInlineStart:"scroll-padding-inline-start",scrollPaddingLeft:"scroll-padding-left",scrollPaddingRight:"scroll-padding-right",scrollPaddingTop:"scroll-padding-top",scrollSnapAlign:"scroll-snap-align",scrollSnapStop:"scroll-snap-stop",scrollSnapType:"scroll-snap-type",shapeImageThreshold:"shape-image-threshold",shapeMargin:"shape-margin",shapeOutside:"shape-outside",tabSize:"tab-size",tableLayout:"table-layout",textAlign:"text-align",textAlignLast:"text-align-last",textCombineUpright:"text-combine-upright",textDecoration:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOrientation:"text-orientation",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",transformBox:"transform-box",transformOrigin:"transform-origin",transformStyle:"transform-style",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",whiteSpace:"white-space",willChange:"will-change",wordBreak:"word-break",wordSpacing:"word-spacing",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",WebkitTransform:"-webkit-transform",WebkitTransition:"-webkit-transition",WebkitBoxShadow:"-webkit-box-shadow",MozBoxShadow:"-moz-box-shadow",MozTransform:"-moz-transform",MozTransition:"-moz-transition",msTransform:"-ms-transform",msTransition:"-ms-transition"};static cssPropAliases=new Proxy(R.#e,{set:(t,e,r)=>(t[e]=r,R.cssPropRevAliases[r]=e,!0)});static cssPropRevAliases=Object.fromEntries(Object.entries(R.#e).map((([t,e])=>[e,t])));static toStyleKc(t){return"string"==typeof R.cssPropAliases[t]?R.cssPropAliases[t]:t}static toStyleCc(t){return"string"==typeof R.cssPropRevAliases[t]?R.cssPropRevAliases[t]:t}static setStyle(t,e,r=null){return R._preHtmlElems(t,"setStyle").forEach((t=>{if("object"==typeof e)for(const[r,n]of Object.entries(e))t.style.setProperty(R.toStyleKc(r),"string"==typeof n?n:"number"==typeof n?`${n}px`:String(n));else t.style.setProperty(R.toStyleKc(e),r)})),t}setStyle(t,e){return R.setStyle(this,t,e)}static getStyle(t,e){return R._preHtmlElem(t,"getStyle").style.getPropertyValue(R.toStyleKc(e))}getStyle(t){return R.getStyle(this,t)}static style(t,{camelCase:e=!1,rawAttr:r=!1}={}){if("boolean"!=typeof e)throw new TypeError('"camelCase" must be a boolean. Received: '+typeof e);if("boolean"!=typeof r)throw new TypeError('"rawAttr" must be a boolean. Received: '+typeof r);const n=R._preHtmlElem(t,"style"),o={};if(r){const t=(n.getAttribute("style")||"").split(";");for(const r of t){const[t,n]=r.split(":");if(!t||!n)continue;const i=t.trim(),s=n.trim();o[e?R.toStyleCc(i):i]=s}}else{const t=n.style;for(let r=0;r<t.length;r++){const n=t[r],i=t.getPropertyValue(n);o[e?R.toStyleCc(n):n]=i}}return o}style(t){return R.style(this,t)}static removeStyle(t,e){return R._preHtmlElems(t,"removeStyle").forEach((t=>{if(Array.isArray(e))for(const r of e)t.style.removeProperty(R.toStyleKc(r));else t.style.removeProperty(R.toStyleKc(e))})),t}removeStyle(t){return R.removeStyle(this,t)}static toggleStyle(t,e,r,n){return R._preHtmlElems(t,"toggleStyle").forEach((t=>{const o=R.getStyle(t,e).trim()===R.toStyleKc(r)?n:r;R.setStyle(t,e,o)})),t}toggleStyle(t,e,r){return R.toggleStyle(this,t,e,r)}static clearStyle(t){return R._preElems(t,"clearStyle").forEach((t=>t.removeAttribute("style"))),t}clearStyle(){return R.clearStyle(this)}static focus(t){return R._preHtmlElem(t,"focus").focus(),t}focus(){return R.focus(this)}static blur(t){return R._preHtmlElem(t,"blur").blur(),t}blur(){return R.blur(this)}static boolCheck(t){return void 0!==t&&("true"===t||"1"===t||!0===t||"on"===t||"number"==typeof t&&t>0)}static setWinScrollTop(t){if("number"!=typeof t)throw new TypeError("The value must be a number.");R.setScrollTop(window,t)}static setWinScrollLeft(t){if("number"!=typeof t)throw new TypeError("The value must be a number.");R.setScrollLeft(window,t)}static winScrollTop(){return window.scrollY||document.documentElement.scrollTop}static winScrollLeft(){return window.scrollX||document.documentElement.scrollLeft}static winInnerHeight(){return window.innerHeight||document.documentElement.clientHeight}static winInnerWidth(){return window.innerWidth||document.documentElement.clientWidth}static isPageTop(){return 0===window.scrollY}static isPageBottom(){return window.innerHeight+window.scrollY>=document.body.offsetHeight}static getDimension(t,e,r="content"){const n=R._preElemAndWinAndDoc(t,"getDimension");if("string"!=typeof e)throw new TypeError("The type must be a string.");if("string"!=typeof r)throw new TypeError("The extra must be a string.");const o="width"===e?"Width":"Height";if(R.isWindow(n))return"margin"===r?n["inner"+o]:n.document.documentElement["client"+o];const i=n;if(9===i.nodeType){const t=i.documentElement;return Math.max(i.body["scroll"+o],t["scroll"+o],i.body["offset"+o],t["offset"+o],t["client"+o])}let s=i.getBoundingClientRect()[e];function l(t){return"width"===e?R.cssFloat(i,t+"Left")+R.cssFloat(i,t+"Right"):R.cssFloat(i,t+"Top")+R.cssFloat(i,t+"Bottom")}switch(r){case"content":s-=l("padding"),s-=l("border");break;case"padding":s-=l("border");break;case"border":break;case"margin":s+=l("margin")}return s}getDimension(t,e){return R.getDimension(this,t,e)}static setHeight(t,e){const r=R._preHtmlElem(t,"setHeight");if("number"!=typeof e&&"string"!=typeof e)throw new TypeError("The value must be a string or number.");return r.style.height="number"==typeof e?`${e}px`:e,t}setHeight(t){return R.setHeight(this,t)}static setWidth(t,e){const r=R._preHtmlElem(t,"setWidth");if("number"!=typeof e&&"string"!=typeof e)throw new TypeError("The value must be a string or number.");return r.style.width="number"==typeof e?`${e}px`:e,t}setWidth(t){return R.setWidth(this,t)}static height(t){const e=R._preElemAndWinAndDoc(t,"height");return R.getDimension(e,"height","content")}height(){return R.height(this)}static width(t){const e=R._preElemAndWinAndDoc(t,"width");return R.getDimension(e,"width","content")}width(){return R.width(this)}static innerHeight(t){const e=R._preElemAndWinAndDoc(t,"innerHeight");return R.getDimension(e,"height","padding")}innerHeight(){return R.innerHeight(this)}static innerWidth(t){const e=R._preElemAndWinAndDoc(t,"innerWidth");return R.getDimension(e,"width","padding")}innerWidth(){return R.innerWidth(this)}static outerHeight(t,e=!1){if("boolean"!=typeof e)throw new TypeError('The "includeMargin" must be a boolean.');const r=R._preElemAndWinAndDoc(t,"outerHeight");return R.getDimension(r,"height",e?"margin":"border")}outerHeight(t){return R.outerHeight(this,t)}static outerWidth(t,e=!1){if("boolean"!=typeof e)throw new TypeError('The "includeMargin" must be a boolean.');const r=R._preElemAndWinAndDoc(t,"outerWidth");return R.getDimension(r,"width",e?"margin":"border")}outerWidth(t){return R.outerWidth(this,t)}static animate(t,e,r){return R._preElems(t,"animate").forEach((t=>t.animate(e,r))),t}animate(t,e){return R.animate(this,t,e)}static offset(t){const e=R._preElem(t,"offset").getBoundingClientRect(),r=window.scrollY||document.documentElement.scrollTop,n=window.scrollX||document.documentElement.scrollLeft;return{top:e.top+r,left:e.left+n}}offset(){return R.offset(this)}static position(t){const e=R._preHtmlElem(t,"position");let r,n,o={top:0,left:0};if("fixed"===window.getComputedStyle(e).position)n=e.getBoundingClientRect();else{n=R.offset(e),r=e.offsetParent||document.documentElement;const{position:t}=window.getComputedStyle(r);for(;r instanceof HTMLElement&&(r===document.body||r===document.documentElement)&&"static"===t;)r=r.parentNode;if(r instanceof HTMLElement&&r!==e&&1===r.nodeType){const{borderTopWidth:t,borderLeftWidth:e}=R.cssFloats(r,["borderTopWidth","borderLeftWidth"]);o=R.offset(r),o.top+=t,o.left+=e}}return{top:n.top-o.top-R.cssFloat(e,"marginTop"),left:n.left-o.left-R.cssFloat(e,"marginLeft")}}position(){return R.position(this)}static offsetParent(t){let e=R._preHtmlElem(t,"offsetParent").offsetParent;for(;e instanceof HTMLElement&&"static"===window.getComputedStyle(e).position;)e=e.offsetParent;return e instanceof HTMLElement?e:document.documentElement}offsetParent(){return R.offsetParent(this)}static scrollTop(t){const e=R._preElemAndWindow(t,"scrollTop");return R.isWindow(e)?e.pageYOffset:9===e.nodeType?e.defaultView.pageYOffset:e.scrollTop}scrollTop(){return R.scrollTop(this)}static scrollLeft(t){const e=R._preElemAndWindow(t,"scrollLeft");return R.isWindow(e)?e.pageXOffset:9===e.nodeType?e.defaultView.pageXOffset:e.scrollLeft}scrollLeft(){return R.scrollLeft(this)}static easings={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1};static scrollToXY(t,{targetX:e,targetY:r,duration:n,easing:o,onAnimation:i}={}){if(void 0!==e&&"number"!=typeof e)throw new TypeError("`targetX` must be a number if provided.");if(void 0!==r&&"number"!=typeof r)throw new TypeError("`targetY` must be a number if provided.");if(void 0!==n&&"number"!=typeof n)throw new TypeError("`duration` must be a number if provided.");if(void 0!==o&&"string"!=typeof o)throw new TypeError("`easing` must be a string if provided.");if(void 0!==o&&"function"!=typeof R.easings[o])throw new TypeError(`Unknown easing function: "${o}".`);if(void 0!==i&&"function"!=typeof i)throw new TypeError("`onAnimation` must be a function if provided.");const s=(t,e,r,n)=>{if(t instanceof Window)window.scrollTo(e,r);else if(9===t.nodeType)t.defaultView.scrollTo(e,r);else{const n=t instanceof Window?window.scrollX:t.scrollLeft,o=t instanceof Window?window.scrollY:t.scrollTop;n!==e&&(t.scrollLeft=e),o!==r&&(t.scrollTop=r)}"function"==typeof i&&i({x:e,y:r,isComplete:n>=1,time:n})};return R._preElemsAndWindow(t,"scrollToXY").forEach((t=>{const i=t instanceof Window?window.scrollX:t.scrollLeft,l=t instanceof Window?window.scrollY:t.scrollTop,a=e??i,c=r??l,u=a-i,f=c-l,p="string"==typeof o&&R.easings[o]||null;if("number"!=typeof n||"function"!=typeof p)return s(t,a,c,1);const h=performance.now(),d=n??0;requestAnimationFrame((function e(r){if("function"!=typeof p)return;const n=Math.min(1,(r-h)/d),o=p(n);s(t,i+u*o,l+f*o,n),n<1&&requestAnimationFrame(e)}))})),t}scrollToXY({targetX:t,targetY:e,duration:r,easing:n,onAnimation:o}={}){return R.scrollToXY(this,{targetX:t,targetY:e,duration:r,easing:n,onAnimation:o})}static setScrollTop(t,e){if("number"!=typeof e)throw new TypeError("ScrollTop value must be a number.");return R.scrollToXY(t,{targetY:e})}setScrollTop(t){return R.setScrollTop(this,t)}static setScrollLeft(t,e){if("number"!=typeof e)throw new TypeError("ScrollLeft value must be a number.");return R.scrollToXY(t,{targetX:e})}setScrollLeft(t){return R.setScrollLeft(this,t)}static borderWidth(t){const e=R._preElem(t,"borderWidth"),{borderLeftWidth:r,borderRightWidth:n,borderTopWidth:o,borderBottomWidth:i}=R.cssFloats(e,["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}borderWidth(){return R.borderWidth(this)}static border(t){const e=R._preElem(t,"border"),{borderLeft:r,borderRight:n,borderTop:o,borderBottom:i}=R.cssFloats(e,["borderLeft","borderRight","borderTop","borderBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}border(){return R.border(this)}static margin(t){const e=R._preElem(t,"margin"),{marginLeft:r,marginRight:n,marginTop:o,marginBottom:i}=R.cssFloats(e,["marginLeft","marginRight","marginTop","marginBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}margin(){return R.margin(this)}static padding(t){const e=R._preElem(t,"padding"),{paddingLeft:r,paddingRight:n,paddingTop:o,paddingBottom:i}=R.cssFloats(e,["paddingLeft","paddingRight","paddingTop","paddingBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}padding(){return R.padding(this)}static addClass(t,...e){return R._preElems(t,"addClass").forEach((t=>t.classList.add(...e))),t}addClass(...t){return R.addClass(this,...t)}static removeClass(t,...e){return R._preElems(t,"removeClass").forEach((t=>t.classList.remove(...e))),t}removeClass(...t){return R.removeClass(this,...t)}static replaceClass(t,e,r){if("string"!=typeof e)throw new TypeError('The "token" parameter must be a string.');if("string"!=typeof r)throw new TypeError('The "newToken" parameter must be a string.');const n=[];return R._preElems(t,"replaceClass").forEach((t=>n.push(t.classList.replace(e,r)))),n}replaceClass(t,e){return R.replaceClass(this,t,e)[0]}static classItem(t,e){const r=R._preElem(t,"classItem");if("number"!=typeof e)throw new TypeError('The "index" parameter must be a number.');return r.classList.item(e)}classItem(t){return R.classItem(this,t)}static toggleClass(t,e,r){if("string"!=typeof e)throw new TypeError('The "token" parameter must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" parameter must be a boolean.');const n=[];return R._preElems(t,"toggleClass").forEach((t=>n.push(t.classList.toggle(e,r)))),n}toggleClass(t,e){return R.toggleClass(this,t,e)[0]}static hasClass(t,e){const r=R._preElem(t,"hasClass");if("string"!=typeof e)throw new TypeError('The "token" parameter must be a string.');return r.classList.contains(e)}hasClass(t){return R.hasClass(this,t)}static classLength(t){return R._preElem(t,"classLength").classList.length}classLength(){return R.classLength(this)}static classList(t){return R._preElem(t,"classList").classList.values().toArray()}classList(){return R.classList(this)}static tagName(t){return R._preElem(t,"tagName").tagName}tagName(){return R.tagName(this)}static id(t){return R._preElem(t,"id").id}id(){return R.id(this)}static text(t){return R._preElem(t,"text").textContent}text(){return R.text(this)}static setText(t,e){if("string"!=typeof e)throw new Error("Value is not a valid string.");return R._preElems(t,"setText").forEach((t=>t.textContent=e)),t}setText(t){return R.setText(this,t)}static empty(t){return R._preElems(t,"empty").forEach((t=>t.textContent="")),t}empty(){return R.empty(this)}static html(t,e){return R._preElem(t,"html").getHTML(e)}html(t){return R.html(this,t)}static setHtml(t,e){if("string"!=typeof e)throw new Error("Value is not a valid string.");return R._preElems(t,"setHtml").forEach((t=>t.innerHTML=e)),t}setHtml(t){return R.setHtml(this,t)}static _valHooks={option:{get:t=>{const e=t.getAttribute("value");return null!=e?e:t.textContent}},select:{get:t=>{const e=t.options,r=t.selectedIndex,n="select-one"===t.type,o=n?r+1:e.length,i=[];let s=r<0?o:n?r:0;for(;s<o;s++){const t=e[s],o=t.parentNode;if((t.selected||s===r)&&!t.disabled&&(!o||!o.disabled||"OPTGROUP"!==o.tagName)){const e=R._valHooks.option.get(t);if(n)return e;i.push(e)}}return i},set:(t,e)=>{const r=t.options,n=Array.isArray(e)?e.map(String):[String(e)];let o=!1;for(let t=0;t<r.length;t++){const e=r[t],i=R._valHooks.option.get(e);"string"==typeof i&&(e.selected=n.includes(i))&&(o=!0)}return o||(t.selectedIndex=-1),n}},radio:{get:t=>t.checked?"on":"off",set(t,e){if("boolean"==typeof e){const r=t.closest("label");return e&&r&&r.querySelectorAll('input[type="radio"]').forEach((e=>{e instanceof HTMLInputElement&&e!==t&&(e.checked=!1)})),t.checked=e,e}}},checkbox:{get:t=>t.checked?"on":"off",set(t,e){if("boolean"==typeof e)return t.checked=e,e}}};static setVal(t,e){return R._preInputElems(t,"setVal").forEach((t=>{if(1!==t.nodeType)return;let r="function"==typeof e?e(t,R.val(t)):e;null==r?r="":"number"==typeof r?r=String(r):Array.isArray(r)&&(r=(t=>{const e=[];for(let n=0;n<t.length;n++)e.push(null==(r=t[n])?"":String(r));var r;return e})(r));const n=R._valHooks[t.type]||R._valHooks[t.nodeName.toLowerCase()];if(!n||"function"!=typeof n.set||void 0===n.set(t,r,"value")){if("string"!=typeof r&&"boolean"!=typeof r)throw new Error(`Invalid setValue "${typeof r}" value.`);"string"==typeof r&&(t.value=r)}})),t}setVal(t){return R.setVal(this,t)}static _valTypes={string:t=>t.value,date:t=>t.valueAsDate,number:t=>t.valueAsNumber};static _getValByType(t,e,r){if("string"!=typeof e)throw new TypeError('The "type" must be a string.');if("string"!=typeof r)throw new TypeError('The "where" must be a string.');if(!(t instanceof HTMLInputElement))throw new Error(`Provided element is not an HTMLInputElement in ${r}().`);if("function"!=typeof R._valTypes[e])throw new Error(`No handler found for type "${e}" in ${r}().`);return R._valTypes[e](t)}static _val(t,e,r){const n=R._preInputElem(t,e),o=R._valHooks[n.type]||R._valHooks[n.nodeName.toLowerCase()];if(o&&"function"==typeof o.get){const t=o.get(n,"value",r);if(void 0!==t)return"string"==typeof t?t.replace(/\r/g,""):t}return R._getValByType(n,r,e)}_val(t,e){return R._val(this,t,e)}static val(t){return R._val(t,"val","string")}val(){return R.val(this)}static valTxt(t){const e=R._val(t,"valTxt","string");if("string"!=typeof e&&null!==e)throw new Error("Value is not a valid string.");return null==e?"":"string"==typeof e?e.replace(/\r/g,""):e}valTxt(){return R.valTxt(this)}static _valArr(t,e,r){const n=R._val(t,e,r);if(!Array.isArray(n))throw new Error(`Value expected an array but got ${typeof n}.`);return n}_valArr(t,e){return R._valArr(this,t,e)}static valArr(t){return R._valArr(t,"valArr","string")}valArr(){return R.valArr(this)}static valNb(t){if(!(R._preInputElem(t,"valNb")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const e=R._val(t,"valNb","number");if(Number.isNaN(e))throw new Error("Value is not a valid number.");return e}valNb(){return R.valNb(this)}static valDate(t){if(!(R._preInputElem(t,"valDate")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const e=R._val(t,"valDate","date");if(!(e instanceof Date))throw new Error("Value is not a valid date.");return e}valDate(){return R.valDate(this)}static valBool(t){const e=R._preInputElem(t,"valBool");if(!(e instanceof HTMLInputElement))throw new Error("Element must be an input element.");return"on"===R.val(e)}valBool(){return R.valBool(this)}static listenForPaste(t,{onFilePaste:e,onTextPaste:r}={}){if(void 0!==e&&"function"!=typeof e)throw new TypeError("onFilePaste must be a function.");if(void 0!==r&&"function"!=typeof r)throw new TypeError("onTextPaste must be a function.");const n=t=>{if(!(t instanceof ClipboardEvent))return;const n=t.clipboardData?.items||[];for(const t of n)if("file"===t.kind){if("function"==typeof e){const r=t.getAsFile();r&&e(t,r)}}else"string"===t.kind&&"function"==typeof r&&t.getAsString((e=>r(t,e)))};return R._preElemsWithDoc(t,"listenForPaste").forEach((t=>R.on(t,"paste",n))),n}listenForPaste({onFilePaste:t,onTextPaste:e}={}){return R.listenForPaste(this,{onFilePaste:t,onTextPaste:e})}static hasEventListener(t,e){const r=R._preEventTargetElem(t,"hasEventListener");if(!P.has(r))return!1;const n=P.get(r);return!!(n&&Array.isArray(n[e])&&n[e].length>0)}hasEventListener(t){return R.hasEventListener(this,t)}static hasExactEventListener(t,e,r){const n=R._preEventTargetElem(t,"hasExactEventListener");if("function"!=typeof r)throw new TypeError('The "handler" must be a function.');if(!P.has(n))return!1;const o=P.get(n);return!(!o||!Array.isArray(o[e]))&&o[e].some((t=>t.handler===r))}hasExactEventListener(t,e){return R.hasExactEventListener(this,t,e)}static on(t,e,r,n){if("string"!=typeof e)throw new TypeError("The event name must be a string.");return R._preEventTargetElems(t,"on").forEach((t=>{t.addEventListener(e,r,n),P.has(t)||P.set(t,{});const o=P.get(t);o&&(Array.isArray(o[e])||(o[e]=[]),o[e].push({handler:r,options:n}))})),t}on(t,e,r){return R.on(this,t,e,r)}static once(t,e,r,n={}){if("string"!=typeof e)throw new TypeError("The event name must be a string.");return R._preEventTargetElems(t,"once").forEach((t=>{const o=n=>{R.off(t,e,o),"function"==typeof r&&r(n)};R.on(t,e,o,"boolean"==typeof n?n:{...n,once:!0})})),t}once(t,e,r={}){return R.once(this,t,e,r)}static off(t,e,r,n){if("string"!=typeof e)throw new TypeError("The event name must be a string.");return R._preEventTargetElems(t,"off").forEach((t=>{t.removeEventListener(e,r,n);const o=P.get(t);o&&o[e]&&(o[e]=o[e].filter((t=>t.handler!==r)),0===o[e].length&&delete o[e])})),t}off(t,e,r){return R.off(this,t,e,r)}static offAll(t,e){if("string"!=typeof e)throw new TypeError("The event name must be a string.");return R._preEventTargetElems(t,"offAll").forEach((t=>{const r=P.get(t);if(r&&r[e]){for(const n of r[e])t.removeEventListener(e,n.handler,n.options);delete r[e]}})),t}offAll(t){return R.offAll(this,t)}static offAllTypes(t,e=null){if(null!==e&&"function"!=typeof e)throw new TypeError('The "filterFn" must be a function.');return R._preEventTargetElems(t,"offAllTypes").forEach((t=>{const r=P.get(t);if(r){for(const n in r)for(const o of r[n])("function"!=typeof e||e(o.handler,n))&&t.removeEventListener(n,o.handler,o.options);P.delete(t)}})),t}offAllTypes(t=null){return R.offAllTypes(this,t)}static trigger(t,e,r={}){if("string"!=typeof e)throw new TypeError("The event name must be a string.");return R._preEventTargetElems(t,"trigger").forEach((t=>{const n=r instanceof Event||r instanceof CustomEvent?r:new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t.dispatchEvent(n)})),t}trigger(t,e={}){return R.trigger(this,t,e)}static _propFix={for:"htmlFor",class:"className"};static attr(t,e){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');return R._preElem(t,"attr").getAttribute(e)}attr(t){return R.attr(this,t)}static setAttr(t,e,r=null){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');if(null!==r&&"string"!=typeof r)throw new TypeError('The "value" must be a string.');return R._preElems(t,"setAttr").forEach((t=>{null===r?t.removeAttribute(e):t.setAttribute(e,r)})),t}setAttr(t,e){return R.setAttr(this,t,e)}static removeAttr(t,e){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');return R._preElems(t,"removeAttr").forEach((t=>t.removeAttribute(e))),t}removeAttr(t){return R.removeAttr(this,t)}static hasAttr(t,e){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');return R._preElem(t,"hasAttr").hasAttribute(e)}hasAttr(t){return R.hasAttr(this,t)}static hasProp(t,e){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');return!!R._preElem(t,"hasProp")[R._propFix[e]||e]}hasProp(t){return R.hasProp(this,t)}static addProp(t,e){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');return R._preElems(t,"addProp").forEach((t=>{t[e=R._propFix[e]||e]=!0})),t}addProp(t){return R.addProp(this,t)}static removeProp(t,e){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');return R._preElems(t,"removeProp").forEach((t=>{t[e=R._propFix[e]||e]=!1})),t}removeProp(t){return R.removeProp(this,t)}static toggleProp(t,e,r){if("string"!=typeof e)throw new TypeError('The "name" must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" must be a boolean.');R._preElems(t,"toggleProp").forEach((t=>{const n=R._propFix[e]||e;(void 0===r?!t[n]:r)?R.addProp(t,e):R.removeProp(t,e)}))}toggleProp(t,e){return R.toggleProp(this,t,e)}static remove(t){return R._preElems(t,"remove").forEach((t=>t.remove())),t}remove(){return R.remove(this)}static index(t,e=null){const r=R._preElem(t,"index");if(!r)return-1;if(!e)return Array.prototype.indexOf.call(r.parentNode?.children||[],r);if(e){const t="string"==typeof e?document.querySelectorAll(e):R._preElems(e,"index");return Array.prototype.indexOf.call(t,r)}return-1}index(t){return R.index(this,t)}static _getCustomRect(t,e){const r={height:0,width:0,x:0,y:0,bottom:0,left:0,right:0,top:0,toJSON:function(){throw new Error("Function not implemented.")}};for(const e in t)"number"==typeof t[e]&&(r[e]=t[e]);if("object"!=typeof e||null===e||Array.isArray(e))throw new Error("");const{height:n=0,width:o=0,top:i=0,bottom:s=0,left:l=0,right:a=0}=e;if("number"!=typeof n)throw new Error("");if("number"!=typeof o)throw new Error("");if("number"!=typeof i)throw new Error("");if("number"!=typeof s)throw new Error("");if("number"!=typeof l)throw new Error("");if("number"!=typeof a)throw new Error("");return r.height+=n,r.width+=o,r.top+=i,r.bottom+=s,r.left+=l,r.right+=a,r}static isCollWith(t,e,r={}){const n=R._getCustomRect(R._preElem(t,"isCollWith").getBoundingClientRect(),r),o=R._preElem(e,"isCollWith").getBoundingClientRect();return S(n,o)}isCollWith(t,e){return R.isCollWith(this,t,e)}static isCollPerfWith(t,e,r={}){const n=R._getCustomRect(R._preElem(t,"isCollPerfWith").getBoundingClientRect(),r),o=R._preElem(e,"isCollPerfWith").getBoundingClientRect();return k(n,o)}isCollPerfWith(t,e){return R.isCollPerfWith(this,t,e)}static _isCollWithLock(t,e,r,n,o){const i=N[o];if(t)return i.has(n)||i.set(n,!0),!0;if(i.has(n)){let t=!1;switch(o){case"top":t=L(e,r);break;case"bottom":t=x(e,r);break;case"left":t=B(e,r);break;case"right":t=W(e,r)}return t&&i.delete(n),i.has(n)}return!1}static isCollWithLock(t,e,r,n={}){const o=R._preElem(t,"isCollWithLock"),i=R._preElem(e,"isCollWithLock"),s=R._getCustomRect(o.getBoundingClientRect(),n),l=i.getBoundingClientRect(),a=S(s,l);return R._isCollWithLock(a,s,l,o,r)}isCollWithLock(t,e,r){return R.isCollWithLock(this,t,e,r)}static isCollPerfWithLock(t,e,r,n={}){const o=R._preElem(t,"isCollPerfWithLock"),i=R._preElem(e,"isCollPerfWithLock"),s=R._getCustomRect(o.getBoundingClientRect(),n),l=i.getBoundingClientRect(),a=k(s,l);return R._isCollWithLock(a,s,l,o,r)}isCollPerfWithLock(t,e,r){return R.isCollPerfWithLock(this,t,e,r)}static resetCollLock(t){const e=R._preElem(t,"resetCollLock");let r=!1;for(const t of["top","bottom","left","right"])N[t].has(e)&&(N[t].delete(e),r=!0);return r}resetCollLock(){return R.resetCollLock(this)}static resetCollLockDir(t,e){const r=R._preElem(t,"resetCollLockDir"),n=N[e];return!!n.has(r)&&(n.delete(r),!0)}resetCollLockDir(t){return R.resetCollLockDir(this,t)}static isInViewport(t){const e=R._preElem(t,"isInViewport");if(!e.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=R.offset(e).top,n=r+R.outerHeight(e),o=R.scrollTop(window),i=o+R.height(window);return n>o&&r<i}isInViewport(){return R.isInViewport(this)}static isScrolledIntoView(t){const e=R._preElem(t,"isScrolledIntoView");if(!e.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=R.scrollTop(window),n=r+R.height(window),o=R.offset(e).top;return o+R.height(e)<=n&&o>=r}isScrolledIntoView(){return R.isScrolledIntoView(this)}static isInContainer(t,e){const r=R._preElem(t,"isInContainer"),n=R._preElem(e,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=o.bottom>i.top&&o.top<i.bottom,l=o.right>i.left&&o.left<i.right;return s&&l}isInContainer(t){return R.isInContainer(this,t)}static isFullyInContainer(t,e){const r=R._preElem(t,"isScrolledIntoView"),n=R._preElem(e,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return o.top>=i.top&&o.bottom<=i.bottom&&o.left>=i.left&&o.right<=i.right}isFullyInContainer(t){return R.isFullyInContainer(this,t)}static hasScroll(t){const e=R._preElem(t,"hasScroll");return{v:e.scrollHeight>e.clientHeight,h:e.scrollWidth>e.clientWidth}}hasScroll(){return R.hasScroll(this)}}r(133),r(975),r(370);const M=class{#r;#n=[];#o=new WeakMap;#i;constructor(t){if(!o(t))throw new TypeError('TinyUploadClicker: "options" must be a valid object.');this.#r={multiple:!1,accept:"",inputAttributes:{},inputStyles:{display:"none"},onClick:null,onFileLoad:null,...t};const{triggers:e}=t;if(!(Array.isArray(e)||"string"==typeof e||e instanceof HTMLElement))throw new TypeError('TinyUploadClicker: "triggers" is required and must be a string, HTMLElement, or an array of them.');const r=(Array.isArray(this.#r.triggers)?this.#r.triggers:[this.#r.triggers]).map((t=>{if("string"==typeof t){const e=document.querySelector(t);if(!e)throw new Error(`TinyUploadClicker: No element found for selector "${t}".`);return e}if(!(t instanceof HTMLElement))throw new TypeError("TinyUploadClicker: All triggers must be either strings (selectors) or HTMLElements.");return t}));if(void 0!==t.accept&&"string"!=typeof t.accept&&!Array.isArray(t.accept))throw new TypeError('TinyUploadClicker: "accept" must be a string or an array of strings.');if(void 0!==t.onClick&&"function"!=typeof t.onClick&&null!==t.onClick)throw new TypeError('TinyUploadClicker: "onClick" must be a function or null.');if(void 0!==t.onFileLoad&&"function"!=typeof t.onFileLoad&&null!==t.onFileLoad)throw new TypeError('TinyUploadClicker: "onFileLoad" must be a function or null.');if(void 0!==t.inputAttributes&&!o(t.inputAttributes))throw new TypeError('TinyUploadClicker: "inputAttributes" must be an object.');if(void 0!==t.inputStyles&&!o(t.inputStyles))throw new TypeError('TinyUploadClicker: "inputStyles" must be an object.');this.#i=this.#s.bind(this),this.#n=r,this.#n.forEach((t=>{if(!(t instanceof HTMLElement))return;const e=document.createElement("input");e.type="file",this.#r.multiple&&(e.multiple=!0),"string"==typeof this.#r.accept?e.accept=this.#r.accept:Array.isArray(this.#r.accept)&&(e.accept=this.#r.accept.join(","));const r=this.#r.inputAttributes;if(r&&"object"==typeof r)for(const[t,n]of Object.entries(r))e.setAttribute(t,n);Object.assign(e.style,this.#r.inputStyles||{display:"none"}),e.addEventListener("change",(()=>{e.files&&"function"==typeof this.#r.onFileLoad&&this.#r.onFileLoad(e.files,t),e.value=""})),document.body.appendChild(e),this.#o.set(t,e),t.addEventListener("click",this.#i)}))}#s(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const r=this.#o.get(e);r&&("function"==typeof this.#r.onClick&&this.#r.onClick(e),r.click())}destroy(){for(const t of this.#n){if(!(t instanceof HTMLElement))return;t.removeEventListener("click",this.#i);const e=this.#o.get(t);e&&e.parentNode&&e.remove(),this.#o.delete(t)}this.#n=[]}}})(),window.TinyUploadClicker=n.TinyUploadClicker})();
2
+ (()=>{var e={251:(e,t)=>{t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,c=l>>1,u=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=256*i+e[t+f],f+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+f],f+=p,u-=8);if(0===i)i=1-c;else{if(i===l)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=c}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,c=8*i-o-1,u=(1<<c)-1,f=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,m=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(s++,l/=2),s+f>=u?(a=0,s=u):s+f>=1?(a=(t*l-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=m,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+h]=255&s,h+=m,s/=256,c-=8);e[r+h-m]|=128*d}},287:(e,t,r)=>{"use strict";var n=r(526),o=r(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=l,t.IS=50;var s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|d(e,t),n=a(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(F(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(F(e,SharedArrayBuffer)||e&&F(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return l.from(n,t,r);var o=function(e){if(l.isBuffer(e)){var t=0|m(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||j(e.length)?a(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return u(e),a(e<0?0:0|m(e))}function p(e){for(var t=e.length<0?0:0|m(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,l.prototype),n}function m(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function d(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(o)return n?-1:H(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),j(r=+r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=l.from(t,n)),l.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,o){var i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){var u=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*s}else-1!==u&&(i-=i-u),u=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){for(var f=!0,p=0;p<l;p++)if(c(e,i+p)!==c(t,p)){f=!1;break}if(f)return i}return-1}function E(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(j(a))return s;e[r+s]=a}return s}function v(e,t,r,n){return U(H(t,e.length-r),e,r,n)}function T(e,t,r,n){return U(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function A(e,t,r,n){return U(D(t),e,r,n)}function _(e,t,r,n){return U(function(e,t){for(var r,n,o,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,o=r%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function C(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var i,s,a,l,c=e[o],u=null,f=c>239?4:c>223?3:c>191?2:1;if(o+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],s=e[o+2],128==(192&i)&&128==(192&s)&&(l=(15&c)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],s=e[o+2],a=e[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=f}return function(e){var t=e.length;if(t<=L)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=L));return r}(n)}l.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){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(e,t,r){return c(e,t,r)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},l.allocUnsafe=function(e){return f(e)},l.allocUnsafeSlow=function(e){return f(e)},l.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==l.prototype},l.compare=function(e,t){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},l.isEncoding=function(e){switch(String(e).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(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=l.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var i=e[r];if(F(i,Uint8Array))o+i.length>n.length?l.from(i).copy(n,o):Uint8Array.prototype.set.call(n,i,o);else{if(!l.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o)}o+=i.length}return n},l.byteLength=d,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)y(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},l.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",r=t.IS;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,r,n,o){if(F(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),a=Math.min(i,s),c=this.slice(n,o),u=e.slice(t,r),f=0;f<a;++f)if(c[f]!==u[f]){i=c[f],s=u[f];break}return i<s?-1:s<i?1:0},l.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},l.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},l.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},l.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return E(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var L=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function B(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=t;i<r;++i)o+=V[e[i]];return o}function I(e,t,r){for(var n=e.slice(t,r),o="",i=0;i<n.length-1;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function W(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,r,n,o,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,4),o.write(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,8),o.write(e,t,r,n,52,8),r+8}l.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,l.prototype),n},l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||W(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||W(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||W(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||W(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||W(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||W(e,t,this.length);for(var n=this[e],o=1,i=0;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},l.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||W(e,t,this.length);for(var n=t,o=1,i=this[e+--n];n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||W(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(e,t){e>>>=0,t||W(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||W(e,4,this.length),o.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||W(e,4,this.length),o.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||W(e,8,this.length),o.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||W(e,8,this.length),o.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||M(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=0,s=1,a=0;for(this[t]=255&e;++i<r&&(s*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},l.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var o=Math.pow(2,8*r-1);M(this,e,t,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},l.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},l.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},l.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},l.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},l.prototype.copy=function(e,t,r,n){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},l.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!l.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var o=e.charCodeAt(0);("utf8"===n&&o<128||"latin1"===n)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=l.isBuffer(e)?e:l.from(e,n),a=s.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%a]}return this};var O=/[^+/0-9A-Za-z-_]/g;function H(e,t){var r;t=t||1/0;for(var n=e.length,o=null,i=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()},526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,i=a(e),s=i[0],l=i[1],c=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,l)),u=0,f=l>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=16383,a=0,l=n-o;a<l;a+=s)i.push(c(e,a,a+s>l?l:a+s));return 1===o?(t=e[n-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(l(n));return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],c=!1,u=-1;function f(){c&&a&&(c=!1,a.length?l=a.concat(l):u=-1,l.length&&p())}function p(){if(!c){var e=s(f);c=!0;for(var t=l.length;t;){for(a=l,l=[];++u<t;)a&&a[u].run();u=-1,t=l.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new h(e,t)),1!==l.length||c||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},975:(e,t,r)=>{"use strict";var n=r(606);function o(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function i(e,t){for(var r,n="",o=0,i=-1,s=0,a=0;a<=e.length;++a){if(a<e.length)r=e.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(i===a-1||1===s);else if(i!==a-1&&2===s){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}t&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var s={resolve:function(){for(var e,t="",r=!1,s=arguments.length-1;s>=-1&&!r;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=n.cwd()),a=e),o(a),0!==a.length&&(t=a+"/"+t,r=47===a.charCodeAt(0))}return t=i(t,!r),r?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(o(e),0===e.length)return".";var t=47===e.charCodeAt(0),r=47===e.charCodeAt(e.length-1);return 0!==(e=i(e,!t)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return o(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var r=arguments[t];o(r),r.length>0&&(void 0===e?e=r:e+="/"+r)}return void 0===e?".":s.normalize(e)},relative:function(e,t){if(o(e),o(t),e===t)return"";if((e=s.resolve(e))===(t=s.resolve(t)))return"";for(var r=1;r<e.length&&47===e.charCodeAt(r);++r);for(var n=e.length,i=n-r,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var l=t.length-a,c=i<l?i:l,u=-1,f=0;f<=c;++f){if(f===c){if(l>c){if(47===t.charCodeAt(a+f))return t.slice(a+f+1);if(0===f)return t.slice(a+f)}else i>c&&(47===e.charCodeAt(r+f)?u=f:0===f&&(u=0));break}var p=e.charCodeAt(r+f);if(p!==t.charCodeAt(a+f))break;47===p&&(u=f)}var h="";for(f=r+u+1;f<=n;++f)f!==n&&47!==e.charCodeAt(f)||(0===h.length?h+="..":h+="/..");return h.length>0?h+t.slice(a+u):(a+=u,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(o(e),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,s=e.length-1;s>=1;--s)if(47===(t=e.charCodeAt(s))){if(!i){n=s;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":e.slice(0,n)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');o(e);var r,n=0,i=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!s){n=r+1;break}}else-1===l&&(s=!1,l=r+1),a>=0&&(c===t.charCodeAt(a)?-1===--a&&(i=r):(a=-1,i=l))}return n===i?i=l:-1===i&&(i=e.length),e.slice(n,i)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!s){n=r+1;break}}else-1===i&&(s=!1,i=r+1);return-1===i?"":e.slice(n,i)},extname:function(e){o(e);for(var t=-1,r=0,n=-1,i=!0,s=0,a=e.length-1;a>=0;--a){var l=e.charCodeAt(a);if(47!==l)-1===n&&(i=!1,n=a+1),46===l?-1===t?t=a:1!==s&&(s=1):-1!==t&&(s=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===r+1?"":e.slice(t,n)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){o(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var r,n=e.charCodeAt(0),i=47===n;i?(t.root="/",r=1):r=0;for(var s=-1,a=0,l=-1,c=!0,u=e.length-1,f=0;u>=r;--u)if(47!==(n=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===n?-1===s?s=u:1!==f&&(f=1):-1!==s&&(f=-1);else if(!c){a=u+1;break}return-1===s||-1===l||0===f||1===f&&s===l-1&&s===a+1?-1!==l&&(t.base=t.name=0===a&&i?e.slice(1,l):e.slice(a,l)):(0===a&&i?(t.name=e.slice(1,s),t.base=e.slice(1,l)):(t.name=e.slice(a,s),t.base=e.slice(a,l)),t.ext=e.slice(s,l)),a>0?t.dir=e.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,e.exports=s}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.d(n,{TinyUploadClicker:()=>U});var e={};r.r(e),r.d(e,{areElsCollBottom:()=>c,areElsCollLeft:()=>u,areElsCollPerfBottom:()=>h,areElsCollPerfLeft:()=>m,areElsCollPerfRight:()=>d,areElsCollPerfTop:()=>p,areElsCollRight:()=>f,areElsCollTop:()=>l,areElsColliding:()=>g,areElsPerfColliding:()=>y,getElsCollDetails:()=>S,getElsCollDirDepth:()=>_,getElsCollOverlap:()=>E,getElsCollOverlapPos:()=>v,getElsColliding:()=>w,getElsPerfColliding:()=>b,getElsRelativeCenterOffset:()=>A,getRectCenter:()=>T});var t=r(287);function o(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&"[object Object]"===Object.prototype.toString.call(e)}const i="undefined"!=typeof window&&void 0!==window.document,s={items:{},order:[]};function a(e,t){const r=[],n=Array.isArray(e)?e:Object.entries(e);for(const[e,o]of n)if(!s.items.hasOwnProperty(e)){s.items[e]=o;let n="number"==typeof t?t:-1;if(-1===n){const e=s.order.indexOf("object");n=e>-1?e:s.order.length}n=Math.min(Math.max(0,n),s.order.length),s.order.splice(n,0,e),r.push(e)}return r}a([["undefined",e=>void 0===e],["null",e=>null===e],["boolean",e=>"boolean"==typeof e],["number",e=>"number"==typeof e&&!Number.isNaN(e)],["bigint",e=>"bigint"==typeof e],["string",e=>"string"==typeof e],["symbol",e=>"symbol"==typeof e],["function",e=>"function"==typeof e],["array",e=>Array.isArray(e)]]),i||a([["buffer",e=>void 0!==t.hp&&t.hp.isBuffer(e)]]),i&&a([["file",e=>"undefined"!=typeof File&&e instanceof File]]),a([["date",e=>e instanceof Date],["regexp",e=>e instanceof RegExp],["map",e=>e instanceof Map],["set",e=>e instanceof Set],["weakmap",e=>e instanceof WeakMap],["weakset",e=>e instanceof WeakSet],["promise",e=>e instanceof Promise]]),i&&a([["htmlelement",e=>"undefined"!=typeof HTMLElement&&e instanceof HTMLElement]]),a([["object",e=>o(e)]]);const l=(e,t)=>e.bottom<t.top,c=(e,t)=>e.top>t.bottom,u=(e,t)=>e.right<t.left,f=(e,t)=>e.left>t.right,p=(e,t)=>e.bottom<=t.top,h=(e,t)=>e.top>=t.bottom,m=(e,t)=>e.right<=t.left,d=(e,t)=>e.left>=t.right,g=(e,t)=>!(u(e,t)||f(e,t)||l(e,t)||c(e,t)),y=(e,t)=>!(m(e,t)||d(e,t)||p(e,t)||h(e,t)),w=(e,t)=>u(e,t)?"left":f(e,t)?"right":l(e,t)?"top":c(e,t)?"bottom":null,b=(e,t)=>m(e,t)?"left":d(e,t)?"right":p(e,t)?"top":h(e,t)?"bottom":null,E=(e,t)=>({overlapLeft:t.right-e.left,overlapRight:e.right-t.left,overlapTop:t.bottom-e.top,overlapBottom:e.bottom-t.top}),v=({overlapLeft:e=-1,overlapRight:t=-1,overlapTop:r=-1,overlapBottom:n=-1}={})=>({dirX:e<t?"right":"left",dirY:r<n?"bottom":"top"}),T=e=>({x:e.left+e.width/2,y:e.top+e.height/2});function A(e,t){const r=e.left+e.width/2,n=e.top+e.height/2;return{x:t.left+t.width/2-r,y:t.top+t.height/2-n}}function _(e,t){if(!y(e,t))return{inDir:null,dirX:null,dirY:null,depthX:0,depthY:0};const{overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}=E(e,t),{dirX:s,dirY:a}=v({overlapLeft:r,overlapRight:n,overlapTop:o,overlapBottom:i}),l=Math.min(r,n),c=Math.min(o,i);let u;return u=l<c?s:a,{inDir:u,dirX:s,dirY:a,depthX:l,depthY:c}}function S(e,t){const r=y(e,t),n={in:null,x:null,y:null},o={y:null,x:null},i={top:0,bottom:0,left:0,right:0},{overlapLeft:s,overlapRight:a,overlapTop:l,overlapBottom:c}=E(t,e);i.top=l,i.bottom=c,i.left=s,i.right=a;const u=Object.entries(i).filter(([,e])=>e>0).sort((e,t)=>e[1]-t[1]),{dirX:f,dirY:p}=v({overlapLeft:a,overlapRight:s,overlapTop:c,overlapBottom:l});return n.y=p,n.x=f,i.bottom<0?o.y="bottom":i.top<0&&(o.y="top"),i.left<0?o.x="left":i.right<0&&(o.x="right"),n.in=r?i.top===i.bottom&&i.bottom===i.left&&i.left===i.right?"center":u.length?u[0][0]:"top":null,{dirs:n,depth:i,isNeg:o}}const{areElsColliding:C,areElsPerfColliding:L,areElsCollTop:x,areElsCollBottom:k,areElsCollLeft:B,areElsCollRight:I}=e,W=new WeakMap,M=new WeakMap,N={top:new WeakMap,bottom:new WeakMap,left:new WeakMap,right:new WeakMap};class P{static Utils={...e};static createElement(e,t){if("string"!=typeof e)throw new TypeError("[TinyHtml] createElement(): The tagName must be a string.");if(void 0!==t&&"object"!=typeof t)throw new TypeError("[TinyHtml] createElement(): The ops must be a object.");return new P(document.createElement(e,t))}static createTextNode(e){if("string"!=typeof e)throw new TypeError("[TinyHtml] createTextNode(): The value must be a string.");return new P(document.createTextNode(e))}static createElementFromHTML(e){const t=document.createElement("template");if(!(e=e.trim()).startsWith("<"))return P.createTextNode(e);if(t.innerHTML=e,!(t.content.firstChild instanceof Element))throw new Error("");return new P(t.content.firstChild)}static query(e,t=document){const r=t.querySelector(e);return r?new P(r):null}querySelector(e){return P.query(e,P._preElem(this,"query"))}static queryAll(e,t=document){const r=t.querySelectorAll(e);return P.toTinyElm([...r])}querySelectorAll(e){return P.queryAll(e,P._preElem(this,"queryAll"))}static getById(e){const t=document.getElementById(e);return t?new P(t):null}static getByClassName(e,t=document){const r=t.getElementsByClassName(e);return P.toTinyElm([...r])}getElementsByClassName(e){return P.getByClassName(e,P._preElem(this,"getByClassName"))}static getByName(e){const t=document.getElementsByName(e);return P.toTinyElm([...t])}static getByTagNameNS(e,t="http://www.w3.org/1999/xhtml",r=document){const n=r.getElementsByTagNameNS(t,e);return P.toTinyElm([...n])}getElementsByTagNameNS(e,t="http://www.w3.org/1999/xhtml"){return P.getByTagNameNS(e,t,P._preElem(this,"getByTagNameNS"))}get(){return this.#e}_getElement(e){if(!(this.#e instanceof Element||this.#e instanceof Window||this.#e instanceof Document))throw new Error(`[TinyHtml] Invalid Element in ${e}().`);return this.#e}static _preElemsTemplate(e,t,r,n){const o=e=>e.map(e=>{const o=e instanceof P?e._getElement(t):e;let i=!1;for(const e of r)if(o instanceof e){i=!0;break}if(!i)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${t}().`);return o});return Array.isArray(e)?o(e):o([e])}static _preElemTemplate(e,t,r,n,o=!1){const i=e=>{const i=e[0];let s=i instanceof P?i._getElement(t):i,a=!1;for(const e of r)if(s instanceof e){a=!0;break}if(o&&null==s&&(s=null,a=!0),!a)throw new Error(`[TinyHtml] Invalid element of the list "${n.join(",")}" in ${t}().`);return s};if(!Array.isArray(e))return i([e]);if(e.length>1)throw new Error(`[TinyHtml] Invalid element amount in ${t}() (Received ${e.length}/1).`);return i(e)}static _preElems(e,t){return P._preElemsTemplate(e,t,[Element],["Element"])}static _preElem(e,t){return P._preElemTemplate(e,t,[Element],["Element"])}static _preNodeElems(e,t){return P._preElemsTemplate(e,t,[Node],["Node"])}static _preNodeElem(e,t){return P._preElemTemplate(e,t,[Node],["Node"])}static _preNodeElemWithNull(e,t){return P._preElemTemplate(e,t,[Node],["Node"],!0)}static _preHtmlElems(e,t){return P._preElemsTemplate(e,t,[HTMLElement],["HTMLElement"])}static _preHtmlElem(e,t){return P._preElemTemplate(e,t,[HTMLElement],["HTMLElement"])}static _preInputElems(e,t){return P._preElemsTemplate(e,t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preInputElem(e,t){return P._preElemTemplate(e,t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLOptionElement],["HTMLInputElement","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement"])}static _preEventTargetElems(e,t){return P._preElemsTemplate(e,t,[EventTarget],["EventTarget"])}static _preEventTargetElem(e,t){return P._preElemTemplate(e,t,[EventTarget],["EventTarget"])}static _preElemsAndWindow(e,t){return P._preElemsTemplate(e,t,[Element,Window],["Element","Window"])}static _preElemAndWindow(e,t){return P._preElemTemplate(e,t,[Element,Window],["Element","Window"])}static _preElemsAndWinAndDoc(e,t){return P._preElemsTemplate(e,t,[Element,Window,Document],["Element","Window","Document"]).map(e=>e instanceof Document?e.documentElement:e)}static _preElemAndWinAndDoc(e,t){const r=P._preElemTemplate(e,t,[Element,Window,Document],["Element","Window","Document"]);return r instanceof Document?r.documentElement:r}static _preElemsWithDoc(e,t){return P._preElemsTemplate(e,t,[Element,Document],["Element","Document"])}static _preElemWithDoc(e,t){return P._preElemTemplate(e,t,[Element,Document],["Element","Document"])}static toTinyElm(e){const t=e=>e.map(e=>e instanceof P?e:new P(e));return Array.isArray(e)?t(e):t([e])}static fromTinyElm(e){const t=e=>e.map(e=>e instanceof P?e._getElement("fromTinyElm"):e);return Array.isArray(e)?t(e):t([e])}static winnow(e,t,r,n=!1){if("boolean"!=typeof n)throw new TypeError('The "not" must be a boolean.');if("function"==typeof t)return P._preElems(e,r).filter((e,r)=>!!t.call(e,r,e)!==n);if(t instanceof Element)return P._preElems(e,r).filter(e=>e===t!==n);if(Array.isArray(t)||"string"!=typeof t&&null!=t.length)return P._preElems(e,r).filter(e=>t.includes(e)!==n);let o=t;return n&&(o=`:not(${o})`),P._preElems(e,r).filter(e=>1===e.nodeType&&e.matches(o))}static filter(e,t,r=!1){return r&&(t=`:not(${t})`),P._preElems(e,"filter").filter(e=>1===e.nodeType&&e.matches(t))}static filterOnly(e,t){return P.winnow(e,t,"filterOnly",!1)}static not(e,t){return P.winnow(e,t,"not",!0)}not(e){return P.not(this,e)}static find(e,t){const r=[];for(const n of P._preElems(e,"find"))r.push(...n.querySelectorAll(t));return[...new Set(r)]}find(e){return P.find(this,e)}static is(e,t){return P.winnow(e,t,"is",!1).length>0}is(e){return P.is(this,e)}static has(e,t){const r="string"==typeof t?[...document.querySelectorAll(t)]:P._preElems(t,"has");return P._preElems(e,"has").filter(e=>r.some(t=>e&&e.contains(t)))}has(e){return P.has(this,e).length>0}static closest(e,t,r){const n=[];for(const o of P._preElems(e,"closest")){let e=o;for(;e&&e!==r;){if(1===e.nodeType&&("string"==typeof t?e.matches(t):e===t)){n.push(e);break}e=e.parentElement}}return[...new Set(n)]}closest(e,t){return P.closest(this,e,t)}static isSameDom(e,t){return P._preNodeElem(e,"isSameDom")===P._preNodeElem(t,"isSameDom")}isSameDom(e){return P.isSameDom(this,e)}_data={};static _dataSelector={public:(e,t)=>{const r=P._preElem(t,e);let n=M.get(r);return n||(n={},M.set(r,n)),n},private:(e,t)=>{if(!(t instanceof P))throw new Error(`Element must be a TinyHtml instance to execute ${e}().`);return t._data}};static data(e,t,r=!1){const n=P._dataSelector[r?"private":"public"]("data",e);if(null==t)return{...n};if("string"!=typeof t)throw new TypeError("The key must be a string.");return n.hasOwnProperty(t)?n[t]:void 0}data(e,t){return P.data(this,e,t)}static setData(e,t,r,n=!1){const o=P._dataSelector[n?"private":"public"]("setData",e);if("string"!=typeof t)throw new TypeError("The key must be a string.");return o[t]=r,e}setData(e,t,r=!1){return P.setData(this,e,t,r)}static _getSibling(e,t,r){let n=P._preNodeElemWithNull(e,r);for(;n&&(n=n[t])&&1!==n.nodeType;);return n instanceof Node?n:null}static _getSiblings(e,t){let r=e;const n=[];for(;r;r=r.nextSibling)1===r.nodeType&&r!==t&&n.push(r);return n}static domDir(e,t,r,n="domDir"){if("string"!=typeof t)throw new TypeError('The "direction" must be a string.');let o=P._preNodeElemWithNull(e,n);const i=[];for(;o&&(o=o[t]);)if(1===o.nodeType){if(r&&("string"==typeof r?o.matches(r):o===r))break;i.push(o)}return i}static parent(e){let t=P._preNodeElemWithNull(e,"parent");const r=t?t.parentNode:null;return r&&11!==r.nodeType?r:null}parent(){return P.parent(this)}static parents(e,t){return P.domDir(e,"parentNode",t,"parents")}parents(e){return P.parents(this,e)}static next(e){return P._getSibling(e,"nextSibling","next")}next(){return P.next(this)}static prev(e){return P._getSibling(e,"previousSibling","prev")}prev(){return P.prev(this)}static nextAll(e){return P.domDir(e,"nextSibling",void 0,"nextAll")}nextAll(){return P.nextAll(this)}static prevAll(e){return P.domDir(e,"previousSibling",void 0,"prevAll")}prevAll(){return P.prevAll(this)}static nextUntil(e,t){return P.domDir(e,"nextSibling",t,"nextUtil")}nextUntil(e){return P.nextUntil(this,e)}static prevUntil(e,t){return P.domDir(e,"previousSibling",t,"prevUtil")}prevUntil(e){return P.prevUntil(this,e)}static siblings(e){const t=P._preNodeElemWithNull(e,"siblings");return P._getSiblings(t&&t.parentNode?t.parentNode.firstChild:null,t)}siblings(){return P.siblings(this)}static children(e){const t=P._preNodeElemWithNull(e,"children");return P._getSiblings(t?t.firstChild:null)}children(){return P.children(this)}static contents(e){const t=P._preNodeElemWithNull(e,"contents");return t instanceof HTMLIFrameElement&&null!=t.contentDocument&&Object.getPrototypeOf(t.contentDocument)?[t.contentDocument]:t instanceof HTMLTemplateElement?Array.from((t.content||t).childNodes):t?Array.from(t.childNodes):[]}contents(){return P.contents(this)}static clone(e,t=!0){if("boolean"!=typeof t)throw new TypeError('The "deep" must be a boolean.');return P._preNodeElems(e,"clone").map(e=>e.cloneNode(t))}clone(e){return P.clone(this,e)[0]}static _appendChecker(e,...t){const r=[],n=[...t];for(const t in n)"string"!=typeof n[t]?r.push(P._preNodeElem(n[t],e)):r.push(n[t]);return r}static append(e,...t){return P._preElem(e,"append").append(...P._appendChecker("append",...t)),e}append(...e){return P.append(this,...e)}static prepend(e,...t){return P._preElem(e,"prepend").prepend(...P._appendChecker("prepend",...t)),e}prepend(...e){return P.prepend(this,...e)}static before(e,...t){return P._preElem(e,"before").before(...P._appendChecker("before",...t)),e}before(...e){return P.before(this,...e)}static after(e,...t){return P._preElem(e,"after").after(...P._appendChecker("after",...t)),e}after(...e){return P.after(this,...e)}static replaceWith(e,...t){return P._preElem(e,"replaceWith").replaceWith(...P._appendChecker("replaceWith",...t)),e}replaceWith(...e){return P.replaceWith(this,...e)}static appendTo(e,t){const r=P._preNodeElems(e,"appendTo"),n=P._preNodeElems(t,"appendTo");return n.forEach((e,t)=>{r.forEach(r=>e.appendChild(t===n.length-1?r:r.cloneNode(!0)))}),e}appendTo(e){return P.appendTo(this,e)}static prependTo(e,t){const r=P._preElems(e,"prependTo"),n=P._preElems(t,"prependTo");return n.forEach((e,t)=>{r.slice().reverse().forEach(r=>e.prepend(t===n.length-1?r:r.cloneNode(!0)))}),e}prependTo(e){return P.prependTo(this,e)}static insertBefore(e,t,r=null){const n=P._preNodeElem(e,"insertBefore"),o=P._preNodeElem(t,"insertBefore"),i=P._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("");return o.parentNode.insertBefore(n,i||o),e}insertBefore(e,t){return P.insertBefore(this,e,t)}static insertAfter(e,t,r=null){const n=P._preNodeElem(e,"insertAfter"),o=P._preNodeElem(t,"insertBefore"),i=P._preNodeElemWithNull(r,"insertBefore");if(!o.parentNode)throw new Error("");return o.parentNode.insertBefore(n,i||o.nextSibling),e}insertAfter(e,t){return P.insertAfter(this,e,t)}static replaceAll(e,t){const r=P._preNodeElems(e,"replaceAll"),n=P._preNodeElems(t,"replaceAll");return n.forEach((e,t)=>{const o=e.parentNode;r.forEach(r=>{o&&o.replaceChild(t===n.length-1?r:r.cloneNode(!0),e)})}),e}replaceAll(e){return P.replaceAll(this,e)}#e;constructor(e){if(e instanceof P)throw new Error("[TinyHtml] You are trying to put a TinyHtml inside another TinyHtml in constructor.");if(!(e instanceof Element||e instanceof Window||e instanceof Document||e instanceof Text))throw new Error("[TinyHtml] Invalid Target in constructor.");this.#e=e}static isWindow(e){return null!=e&&e===e.window}static css(e){const t=P._preElem(e,"css");return window.getComputedStyle(t)}css(){return P.css(this)}static cssString(e,t){const r=P._preElem(e,"cssString");if("string"!=typeof t)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[t];return"string"==typeof n?n:"number"==typeof n?n.toString():null}cssString(e){return P.cssString(this,e)}static cssList(e,t){const r=P._preElem(e,"cssList");if(!Array.isArray(t))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const e of t)void 0!==e&&(o[e]=n.getPropertyValue(e));return o}cssList(e){return P.cssList(this,e)}static cssFloat(e,t){const r=P._preElem(e,"cssFloat");if("string"!=typeof t)throw new TypeError("The prop must be a string.");const n=window.getComputedStyle(r)[t];return parseFloat(n)||0}cssFloat(e){return P.cssFloat(this,e)}static cssFloats(e,t){const r=P._preElem(e,"cssFloats");if(!Array.isArray(t))throw new TypeError("The prop must be an array of strings.");const n=window.getComputedStyle(r),o={};for(const e of t)o[e]=parseFloat(n[e])||0;return o}cssFloats(e){return P.cssFloats(this,e)}static#t={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip",backgroundColor:"background-color",backgroundImage:"background-image",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomLeftRadius:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRadius:"border-radius",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopLeftRadius:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",boxSizing:"box-sizing",breakAfter:"break-after",breakBefore:"break-before",breakInside:"break-inside",captionSide:"caption-side",caretColor:"caret-color",clipPath:"clip-path",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",counterIncrement:"counter-increment",counterReset:"counter-reset",emptyCells:"empty-cells",flexBasis:"flex-basis",flexDirection:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",fontFamily:"font-family",fontFeatureSettings:"font-feature-settings",fontKerning:"font-kerning",fontLanguageOverride:"font-language-override",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontSynthesis:"font-synthesis",fontVariant:"font-variant",fontVariantAlternates:"font-variant-alternates",fontVariantCaps:"font-variant-caps",fontVariantEastAsian:"font-variant-east-asian",fontVariantLigatures:"font-variant-ligatures",fontVariantNumeric:"font-variant-numeric",fontVariantPosition:"font-variant-position",fontWeight:"font-weight",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas",gridTemplateColumns:"grid-template-columns",gridTemplateRows:"grid-template-rows",imageRendering:"image-rendering",justifyContent:"justify-content",letterSpacing:"letter-spacing",lineBreak:"line-break",lineHeight:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",maskClip:"mask-clip",maskComposite:"mask-composite",maskImage:"mask-image",maskMode:"mask-mode",maskOrigin:"mask-origin",maskPosition:"mask-position",maskRepeat:"mask-repeat",maskSize:"mask-size",maskType:"mask-type",maxHeight:"max-height",maxWidth:"max-width",minHeight:"min-height",minWidth:"min-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",offsetAnchor:"offset-anchor",offsetDistance:"offset-distance",offsetPath:"offset-path",offsetRotate:"offset-rotate",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflowAnchor:"overflow-anchor",overflowWrap:"overflow-wrap",overflowX:"overflow-x",overflowY:"overflow-y",paddingBottom:"padding-bottom",paddingLeft:"padding-left",paddingRight:"padding-right",paddingTop:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspectiveOrigin:"perspective-origin",placeContent:"place-content",placeItems:"place-items",placeSelf:"place-self",pointerEvents:"pointer-events",rowGap:"row-gap",scrollBehavior:"scroll-behavior",scrollMargin:"scroll-margin",scrollMarginBlock:"scroll-margin-block",scrollMarginBlockEnd:"scroll-margin-block-end",scrollMarginBlockStart:"scroll-margin-block-start",scrollMarginBottom:"scroll-margin-bottom",scrollMarginInline:"scroll-margin-inline",scrollMarginInlineEnd:"scroll-margin-inline-end",scrollMarginInlineStart:"scroll-margin-inline-start",scrollMarginLeft:"scroll-margin-left",scrollMarginRight:"scroll-margin-right",scrollMarginTop:"scroll-margin-top",scrollPadding:"scroll-padding",scrollPaddingBlock:"scroll-padding-block",scrollPaddingBlockEnd:"scroll-padding-block-end",scrollPaddingBlockStart:"scroll-padding-block-start",scrollPaddingBottom:"scroll-padding-bottom",scrollPaddingInline:"scroll-padding-inline",scrollPaddingInlineEnd:"scroll-padding-inline-end",scrollPaddingInlineStart:"scroll-padding-inline-start",scrollPaddingLeft:"scroll-padding-left",scrollPaddingRight:"scroll-padding-right",scrollPaddingTop:"scroll-padding-top",scrollSnapAlign:"scroll-snap-align",scrollSnapStop:"scroll-snap-stop",scrollSnapType:"scroll-snap-type",shapeImageThreshold:"shape-image-threshold",shapeMargin:"shape-margin",shapeOutside:"shape-outside",tabSize:"tab-size",tableLayout:"table-layout",textAlign:"text-align",textAlignLast:"text-align-last",textCombineUpright:"text-combine-upright",textDecoration:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOrientation:"text-orientation",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",transformBox:"transform-box",transformOrigin:"transform-origin",transformStyle:"transform-style",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",whiteSpace:"white-space",willChange:"will-change",wordBreak:"word-break",wordSpacing:"word-spacing",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",WebkitTransform:"-webkit-transform",WebkitTransition:"-webkit-transition",WebkitBoxShadow:"-webkit-box-shadow",MozBoxShadow:"-moz-box-shadow",MozTransform:"-moz-transform",MozTransition:"-moz-transition",msTransform:"-ms-transform",msTransition:"-ms-transition"};static cssPropAliases=new Proxy(P.#t,{set:(e,t,r)=>(e[t]=r,P.cssPropRevAliases[r]=t,!0)});static cssPropRevAliases=Object.fromEntries(Object.entries(P.#t).map(([e,t])=>[t,e]));static toStyleKc(e){return"string"==typeof P.cssPropAliases[e]?P.cssPropAliases[e]:e}static toStyleCc(e){return"string"==typeof P.cssPropRevAliases[e]?P.cssPropRevAliases[e]:e}static setStyle(e,t,r=null){return P._preHtmlElems(e,"setStyle").forEach(e=>{if("object"==typeof t)for(const[r,n]of Object.entries(t))e.style.setProperty(P.toStyleKc(r),"string"==typeof n?n:"number"==typeof n?`${n}px`:String(n));else e.style.setProperty(P.toStyleKc(t),r)}),e}setStyle(e,t){return P.setStyle(this,e,t)}static getStyle(e,t){return P._preHtmlElem(e,"getStyle").style.getPropertyValue(P.toStyleKc(t))}getStyle(e){return P.getStyle(this,e)}static style(e,{camelCase:t=!1,rawAttr:r=!1}={}){if("boolean"!=typeof t)throw new TypeError('"camelCase" must be a boolean. Received: '+typeof t);if("boolean"!=typeof r)throw new TypeError('"rawAttr" must be a boolean. Received: '+typeof r);const n=P._preHtmlElem(e,"style"),o={};if(r){const e=(n.getAttribute("style")||"").split(";");for(const r of e){const[e,n]=r.split(":");if(!e||!n)continue;const i=e.trim(),s=n.trim();o[t?P.toStyleCc(i):i]=s}}else{const e=n.style;for(let r=0;r<e.length;r++){const n=e[r],i=e.getPropertyValue(n);o[t?P.toStyleCc(n):n]=i}}return o}style(e){return P.style(this,e)}static removeStyle(e,t){return P._preHtmlElems(e,"removeStyle").forEach(e=>{if(Array.isArray(t))for(const r of t)e.style.removeProperty(P.toStyleKc(r));else e.style.removeProperty(P.toStyleKc(t))}),e}removeStyle(e){return P.removeStyle(this,e)}static toggleStyle(e,t,r,n){return P._preHtmlElems(e,"toggleStyle").forEach(e=>{const o=P.getStyle(e,t).trim()===P.toStyleKc(r)?n:r;P.setStyle(e,t,o)}),e}toggleStyle(e,t,r){return P.toggleStyle(this,e,t,r)}static clearStyle(e){return P._preElems(e,"clearStyle").forEach(e=>e.removeAttribute("style")),e}clearStyle(){return P.clearStyle(this)}static focus(e){return P._preHtmlElem(e,"focus").focus(),e}focus(){return P.focus(this)}static blur(e){return P._preHtmlElem(e,"blur").blur(),e}blur(){return P.blur(this)}static boolCheck(e){return void 0!==e&&("true"===e||"1"===e||!0===e||"on"===e||"number"==typeof e&&e>0)}static setWinScrollTop(e){if("number"!=typeof e)throw new TypeError("The value must be a number.");P.setScrollTop(window,e)}static setWinScrollLeft(e){if("number"!=typeof e)throw new TypeError("The value must be a number.");P.setScrollLeft(window,e)}static winScrollTop(){return window.scrollY||document.documentElement.scrollTop}static winScrollLeft(){return window.scrollX||document.documentElement.scrollLeft}static winInnerHeight(){return window.innerHeight||document.documentElement.clientHeight}static winInnerWidth(){return window.innerWidth||document.documentElement.clientWidth}static isPageTop(){return 0===window.scrollY}static isPageBottom(){return window.innerHeight+window.scrollY>=document.body.offsetHeight}static getDimension(e,t,r="content"){const n=P._preElemAndWinAndDoc(e,"getDimension");if("string"!=typeof t)throw new TypeError("The type must be a string.");if("string"!=typeof r)throw new TypeError("The extra must be a string.");const o="width"===t?"Width":"Height";if(P.isWindow(n))return"margin"===r?n["inner"+o]:n.document.documentElement["client"+o];const i=n;if(9===i.nodeType){const e=i.documentElement;return Math.max(i.body["scroll"+o],e["scroll"+o],i.body["offset"+o],e["offset"+o],e["client"+o])}let s=i.getBoundingClientRect()[t];function a(e){return"width"===t?P.cssFloat(i,e+"Left")+P.cssFloat(i,e+"Right"):P.cssFloat(i,e+"Top")+P.cssFloat(i,e+"Bottom")}switch(r){case"content":s-=a("padding"),s-=a("border");break;case"padding":s-=a("border");break;case"border":break;case"margin":s+=a("margin")}return s}getDimension(e,t){return P.getDimension(this,e,t)}static setHeight(e,t){const r=P._preHtmlElem(e,"setHeight");if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("The value must be a string or number.");return r.style.height="number"==typeof t?`${t}px`:t,e}setHeight(e){return P.setHeight(this,e)}static setWidth(e,t){const r=P._preHtmlElem(e,"setWidth");if("number"!=typeof t&&"string"!=typeof t)throw new TypeError("The value must be a string or number.");return r.style.width="number"==typeof t?`${t}px`:t,e}setWidth(e){return P.setWidth(this,e)}static height(e){const t=P._preElemAndWinAndDoc(e,"height");return P.getDimension(t,"height","content")}height(){return P.height(this)}static width(e){const t=P._preElemAndWinAndDoc(e,"width");return P.getDimension(t,"width","content")}width(){return P.width(this)}static innerHeight(e){const t=P._preElemAndWinAndDoc(e,"innerHeight");return P.getDimension(t,"height","padding")}innerHeight(){return P.innerHeight(this)}static innerWidth(e){const t=P._preElemAndWinAndDoc(e,"innerWidth");return P.getDimension(t,"width","padding")}innerWidth(){return P.innerWidth(this)}static outerHeight(e,t=!1){if("boolean"!=typeof t)throw new TypeError('The "includeMargin" must be a boolean.');const r=P._preElemAndWinAndDoc(e,"outerHeight");return P.getDimension(r,"height",t?"margin":"border")}outerHeight(e){return P.outerHeight(this,e)}static outerWidth(e,t=!1){if("boolean"!=typeof t)throw new TypeError('The "includeMargin" must be a boolean.');const r=P._preElemAndWinAndDoc(e,"outerWidth");return P.getDimension(r,"width",t?"margin":"border")}outerWidth(e){return P.outerWidth(this,e)}static animate(e,t,r){return P._preElems(e,"animate").forEach(e=>e.animate(t,r)),e}animate(e,t){return P.animate(this,e,t)}static offset(e){const t=P._preElem(e,"offset").getBoundingClientRect(),r=window.scrollY||document.documentElement.scrollTop,n=window.scrollX||document.documentElement.scrollLeft;return{top:t.top+r,left:t.left+n}}offset(){return P.offset(this)}static position(e){const t=P._preHtmlElem(e,"position");let r,n,o={top:0,left:0};if("fixed"===window.getComputedStyle(t).position)n=t.getBoundingClientRect();else{n=P.offset(t),r=t.offsetParent||document.documentElement;const{position:e}=window.getComputedStyle(r);for(;r instanceof HTMLElement&&(r===document.body||r===document.documentElement)&&"static"===e;)r=r.parentNode;if(r instanceof HTMLElement&&r!==t&&1===r.nodeType){const{borderTopWidth:e,borderLeftWidth:t}=P.cssFloats(r,["borderTopWidth","borderLeftWidth"]);o=P.offset(r),o.top+=e,o.left+=t}}return{top:n.top-o.top-P.cssFloat(t,"marginTop"),left:n.left-o.left-P.cssFloat(t,"marginLeft")}}position(){return P.position(this)}static offsetParent(e){let t=P._preHtmlElem(e,"offsetParent").offsetParent;for(;t instanceof HTMLElement&&"static"===window.getComputedStyle(t).position;)t=t.offsetParent;return t instanceof HTMLElement?t:document.documentElement}offsetParent(){return P.offsetParent(this)}static scrollTop(e){const t=P._preElemAndWindow(e,"scrollTop");return P.isWindow(t)?t.pageYOffset:9===t.nodeType?t.defaultView.pageYOffset:t.scrollTop}scrollTop(){return P.scrollTop(this)}static scrollLeft(e){const t=P._preElemAndWindow(e,"scrollLeft");return P.isWindow(t)?t.pageXOffset:9===t.nodeType?t.defaultView.pageXOffset:t.scrollLeft}scrollLeft(){return P.scrollLeft(this)}static easings={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:(4-2*e)*e-1,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1};static scrollToXY(e,{targetX:t,targetY:r,duration:n,easing:o,onAnimation:i}={}){if(void 0!==t&&"number"!=typeof t)throw new TypeError("`targetX` must be a number if provided.");if(void 0!==r&&"number"!=typeof r)throw new TypeError("`targetY` must be a number if provided.");if(void 0!==n&&"number"!=typeof n)throw new TypeError("`duration` must be a number if provided.");if(void 0!==o&&"string"!=typeof o)throw new TypeError("`easing` must be a string if provided.");if(void 0!==o&&"function"!=typeof P.easings[o])throw new TypeError(`Unknown easing function: "${o}".`);if(void 0!==i&&"function"!=typeof i)throw new TypeError("`onAnimation` must be a function if provided.");const s=(e,t,r,n)=>{if(e instanceof Window)window.scrollTo(t,r);else if(9===e.nodeType)e.defaultView.scrollTo(t,r);else{const n=e instanceof Window?window.scrollX:e.scrollLeft,o=e instanceof Window?window.scrollY:e.scrollTop;n!==t&&(e.scrollLeft=t),o!==r&&(e.scrollTop=r)}"function"==typeof i&&i({x:t,y:r,isComplete:n>=1,time:n})};return P._preElemsAndWindow(e,"scrollToXY").forEach(e=>{const i=e instanceof Window?window.scrollX:e.scrollLeft,a=e instanceof Window?window.scrollY:e.scrollTop,l=t??i,c=r??a,u=l-i,f=c-a,p="string"==typeof o&&P.easings[o]||null;if("number"!=typeof n||"function"!=typeof p)return s(e,l,c,1);const h=performance.now(),m=n??0;requestAnimationFrame(function t(r){if("function"!=typeof p)return;const n=Math.min(1,(r-h)/m),o=p(n);s(e,i+u*o,a+f*o,n),n<1&&requestAnimationFrame(t)})}),e}scrollToXY({targetX:e,targetY:t,duration:r,easing:n,onAnimation:o}={}){return P.scrollToXY(this,{targetX:e,targetY:t,duration:r,easing:n,onAnimation:o})}static setScrollTop(e,t){if("number"!=typeof t)throw new TypeError("ScrollTop value must be a number.");return P.scrollToXY(e,{targetY:t})}setScrollTop(e){return P.setScrollTop(this,e)}static setScrollLeft(e,t){if("number"!=typeof t)throw new TypeError("ScrollLeft value must be a number.");return P.scrollToXY(e,{targetX:t})}setScrollLeft(e){return P.setScrollLeft(this,e)}static borderWidth(e){const t=P._preElem(e,"borderWidth"),{borderLeftWidth:r,borderRightWidth:n,borderTopWidth:o,borderBottomWidth:i}=P.cssFloats(t,["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}borderWidth(){return P.borderWidth(this)}static border(e){const t=P._preElem(e,"border"),{borderLeft:r,borderRight:n,borderTop:o,borderBottom:i}=P.cssFloats(t,["borderLeft","borderRight","borderTop","borderBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}border(){return P.border(this)}static margin(e){const t=P._preElem(e,"margin"),{marginLeft:r,marginRight:n,marginTop:o,marginBottom:i}=P.cssFloats(t,["marginLeft","marginRight","marginTop","marginBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}margin(){return P.margin(this)}static padding(e){const t=P._preElem(e,"padding"),{paddingLeft:r,paddingRight:n,paddingTop:o,paddingBottom:i}=P.cssFloats(t,["paddingLeft","paddingRight","paddingTop","paddingBottom"]);return{x:r+n,y:o+i,left:r,right:n,top:o,bottom:i}}padding(){return P.padding(this)}static addClass(e,...t){return P._preElems(e,"addClass").forEach(e=>e.classList.add(...t)),e}addClass(...e){return P.addClass(this,...e)}static removeClass(e,...t){return P._preElems(e,"removeClass").forEach(e=>e.classList.remove(...t)),e}removeClass(...e){return P.removeClass(this,...e)}static replaceClass(e,t,r){if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');if("string"!=typeof r)throw new TypeError('The "newToken" parameter must be a string.');const n=[];return P._preElems(e,"replaceClass").forEach(e=>n.push(e.classList.replace(t,r))),n}replaceClass(e,t){return P.replaceClass(this,e,t)[0]}static classItem(e,t){const r=P._preElem(e,"classItem");if("number"!=typeof t)throw new TypeError('The "index" parameter must be a number.');return r.classList.item(t)}classItem(e){return P.classItem(this,e)}static toggleClass(e,t,r){if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" parameter must be a boolean.');const n=[];return P._preElems(e,"toggleClass").forEach(e=>n.push(e.classList.toggle(t,r))),n}toggleClass(e,t){return P.toggleClass(this,e,t)[0]}static hasClass(e,t){const r=P._preElem(e,"hasClass");if("string"!=typeof t)throw new TypeError('The "token" parameter must be a string.');return r.classList.contains(t)}hasClass(e){return P.hasClass(this,e)}static classLength(e){return P._preElem(e,"classLength").classList.length}classLength(){return P.classLength(this)}static classList(e){return P._preElem(e,"classList").classList.values().toArray()}classList(){return P.classList(this)}static tagName(e){return P._preElem(e,"tagName").tagName}tagName(){return P.tagName(this)}static id(e){return P._preElem(e,"id").id}id(){return P.id(this)}static text(e){return P._preElem(e,"text").textContent}text(){return P.text(this)}static setText(e,t){if("string"!=typeof t)throw new Error("Value is not a valid string.");return P._preElems(e,"setText").forEach(e=>e.textContent=t),e}setText(e){return P.setText(this,e)}static empty(e){return P._preElems(e,"empty").forEach(e=>e.textContent=""),e}empty(){return P.empty(this)}static html(e,t){return P._preElem(e,"html").getHTML(t)}html(e){return P.html(this,e)}static setHtml(e,t){if("string"!=typeof t)throw new Error("Value is not a valid string.");return P._preElems(e,"setHtml").forEach(e=>e.innerHTML=t),e}setHtml(e){return P.setHtml(this,e)}static _valHooks={option:{get:e=>{const t=e.getAttribute("value");return null!=t?t:e.textContent}},select:{get:e=>{const t=e.options,r=e.selectedIndex,n="select-one"===e.type,o=n?r+1:t.length,i=[];let s=r<0?o:n?r:0;for(;s<o;s++){const e=t[s],o=e.parentNode;if((e.selected||s===r)&&!e.disabled&&(!o||!o.disabled||"OPTGROUP"!==o.tagName)){const t=P._valHooks.option.get(e);if(n)return t;i.push(t)}}return i},set:(e,t)=>{const r=e.options,n=Array.isArray(t)?t.map(String):[String(t)];let o=!1;for(let e=0;e<r.length;e++){const t=r[e],i=P._valHooks.option.get(t);"string"==typeof i&&(t.selected=n.includes(i))&&(o=!0)}return o||(e.selectedIndex=-1),n}},radio:{get:e=>e.checked?"on":"off",set(e,t){if("boolean"==typeof t){const r=e.closest("label");return t&&r&&r.querySelectorAll('input[type="radio"]').forEach(t=>{t instanceof HTMLInputElement&&t!==e&&(t.checked=!1)}),e.checked=t,t}}},checkbox:{get:e=>e.checked?"on":"off",set(e,t){if("boolean"==typeof t)return e.checked=t,t}}};static setVal(e,t){return P._preInputElems(e,"setVal").forEach(e=>{if(1!==e.nodeType)return;let r="function"==typeof t?t(e,P.val(e)):t;null==r?r="":"number"==typeof r?r=String(r):Array.isArray(r)&&(r=((e,t)=>{const r=[];for(let n=0;n<e.length;n++)r.push(t(e[n]));return r})(r,e=>null==e?"":String(e)));const n=P._valHooks[e.type]||P._valHooks[e.nodeName.toLowerCase()];if(!n||"function"!=typeof n.set||void 0===n.set(e,r,"value")){if("string"!=typeof r&&"boolean"!=typeof r)throw new Error(`Invalid setValue "${typeof r}" value.`);"string"==typeof r&&(e.value=r)}}),e}setVal(e){return P.setVal(this,e)}static _valTypes={string:e=>e.value,date:e=>e.valueAsDate,number:e=>e.valueAsNumber};static _getValByType(e,t,r){if("string"!=typeof t)throw new TypeError('The "type" must be a string.');if("string"!=typeof r)throw new TypeError('The "where" must be a string.');if(!(e instanceof HTMLInputElement))throw new Error(`Provided element is not an HTMLInputElement in ${r}().`);if("function"!=typeof P._valTypes[t])throw new Error(`No handler found for type "${t}" in ${r}().`);return P._valTypes[t](e)}static _val(e,t,r){const n=P._preInputElem(e,t),o=P._valHooks[n.type]||P._valHooks[n.nodeName.toLowerCase()];if(o&&"function"==typeof o.get){const e=o.get(n,"value",r);if(void 0!==e)return"string"==typeof e?e.replace(/\r/g,""):e}return P._getValByType(n,r,t)}_val(e,t){return P._val(this,e,t)}static val(e){return P._val(e,"val","string")}val(){return P.val(this)}static valTxt(e){const t=P._val(e,"valTxt","string");if("string"!=typeof t&&null!==t)throw new Error("Value is not a valid string.");return null==t?"":"string"==typeof t?t.replace(/\r/g,""):t}valTxt(){return P.valTxt(this)}static _valArr(e,t,r){const n=P._val(e,t,r);if(!Array.isArray(n))throw new Error(`Value expected an array but got ${typeof n}.`);return n}_valArr(e,t){return P._valArr(this,e,t)}static valArr(e){return P._valArr(e,"valArr","string")}valArr(){return P.valArr(this)}static valNb(e){if(!(P._preInputElem(e,"valNb")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const t=P._val(e,"valNb","number");if(Number.isNaN(t))throw new Error("Value is not a valid number.");return t}valNb(){return P.valNb(this)}static valDate(e){if(!(P._preInputElem(e,"valDate")instanceof HTMLInputElement))throw new Error("Element must be an input element.");const t=P._val(e,"valDate","date");if(!(t instanceof Date))throw new Error("Value is not a valid date.");return t}valDate(){return P.valDate(this)}static valBool(e){const t=P._preInputElem(e,"valBool");if(!(t instanceof HTMLInputElement))throw new Error("Element must be an input element.");return"on"===P.val(t)}valBool(){return P.valBool(this)}static listenForPaste(e,{onFilePaste:t,onTextPaste:r}={}){if(void 0!==t&&"function"!=typeof t)throw new TypeError("onFilePaste must be a function.");if(void 0!==r&&"function"!=typeof r)throw new TypeError("onTextPaste must be a function.");const n=e=>{if(!(e instanceof ClipboardEvent))return;const n=e.clipboardData?.items||[];for(const e of n)if("file"===e.kind){if("function"==typeof t){const r=e.getAsFile();r&&t(e,r)}}else"string"===e.kind&&"function"==typeof r&&e.getAsString(t=>r(e,t))};return P._preElemsWithDoc(e,"listenForPaste").forEach(e=>P.on(e,"paste",n)),n}listenForPaste({onFilePaste:e,onTextPaste:t}={}){return P.listenForPaste(this,{onFilePaste:e,onTextPaste:t})}static hasEventListener(e,t){const r=P._preEventTargetElem(e,"hasEventListener");if(!W.has(r))return!1;const n=W.get(r);return!!(n&&Array.isArray(n[t])&&n[t].length>0)}hasEventListener(e){return P.hasEventListener(this,e)}static hasExactEventListener(e,t,r){const n=P._preEventTargetElem(e,"hasExactEventListener");if("function"!=typeof r)throw new TypeError('The "handler" must be a function.');if(!W.has(n))return!1;const o=W.get(n);return!(!o||!Array.isArray(o[t]))&&o[t].some(e=>e.handler===r)}hasExactEventListener(e,t){return P.hasExactEventListener(this,e,t)}static on(e,t,r,n){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return P._preEventTargetElems(e,"on").forEach(e=>{e.addEventListener(t,r,n),W.has(e)||W.set(e,{});const o=W.get(e);o&&(Array.isArray(o[t])||(o[t]=[]),o[t].push({handler:r,options:n}))}),e}on(e,t,r){return P.on(this,e,t,r)}static once(e,t,r,n={}){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return P._preEventTargetElems(e,"once").forEach(e=>{const o=n=>{P.off(e,t,o),"function"==typeof r&&r(n)};P.on(e,t,o,"boolean"==typeof n?n:{...n,once:!0})}),e}once(e,t,r={}){return P.once(this,e,t,r)}static off(e,t,r,n){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return P._preEventTargetElems(e,"off").forEach(e=>{e.removeEventListener(t,r,n);const o=W.get(e);o&&o[t]&&(o[t]=o[t].filter(e=>e.handler!==r),0===o[t].length&&delete o[t])}),e}off(e,t,r){return P.off(this,e,t,r)}static offAll(e,t){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return P._preEventTargetElems(e,"offAll").forEach(e=>{const r=W.get(e);if(r&&r[t]){for(const n of r[t])e.removeEventListener(t,n.handler,n.options);delete r[t]}}),e}offAll(e){return P.offAll(this,e)}static offAllTypes(e,t=null){if(null!==t&&"function"!=typeof t)throw new TypeError('The "filterFn" must be a function.');return P._preEventTargetElems(e,"offAllTypes").forEach(e=>{const r=W.get(e);if(r){for(const n in r)for(const o of r[n])("function"!=typeof t||t(o.handler,n))&&e.removeEventListener(n,o.handler,o.options);W.delete(e)}}),e}offAllTypes(e=null){return P.offAllTypes(this,e)}static trigger(e,t,r={}){if("string"!=typeof t)throw new TypeError("The event name must be a string.");return P._preEventTargetElems(e,"trigger").forEach(e=>{const n=r instanceof Event||r instanceof CustomEvent?r:new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e.dispatchEvent(n)}),e}trigger(e,t={}){return P.trigger(this,e,t)}static _propFix={for:"htmlFor",class:"className"};static attr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return P._preElem(e,"attr").getAttribute(t)}attr(e){return P.attr(this,e)}static setAttr(e,t,r=null){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');if(null!==r&&"string"!=typeof r)throw new TypeError('The "value" must be a string.');return P._preElems(e,"setAttr").forEach(e=>{null===r?e.removeAttribute(t):e.setAttribute(t,r)}),e}setAttr(e,t){return P.setAttr(this,e,t)}static removeAttr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return P._preElems(e,"removeAttr").forEach(e=>e.removeAttribute(t)),e}removeAttr(e){return P.removeAttr(this,e)}static hasAttr(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return P._preElem(e,"hasAttr").hasAttribute(t)}hasAttr(e){return P.hasAttr(this,e)}static hasProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return!!P._preElem(e,"hasProp")[P._propFix[t]||t]}hasProp(e){return P.hasProp(this,e)}static addProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return P._preElems(e,"addProp").forEach(e=>{e[t=P._propFix[t]||t]=!0}),e}addProp(e){return P.addProp(this,e)}static removeProp(e,t){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');return P._preElems(e,"removeProp").forEach(e=>{e[t=P._propFix[t]||t]=!1}),e}removeProp(e){return P.removeProp(this,e)}static toggleProp(e,t,r){if("string"!=typeof t)throw new TypeError('The "name" must be a string.');if(void 0!==r&&"boolean"!=typeof r)throw new TypeError('The "force" must be a boolean.');P._preElems(e,"toggleProp").forEach(e=>{const n=P._propFix[t]||t;(void 0===r?!e[n]:r)?P.addProp(e,t):P.removeProp(e,t)})}toggleProp(e,t){return P.toggleProp(this,e,t)}static remove(e){return P._preElems(e,"remove").forEach(e=>e.remove()),e}remove(){return P.remove(this)}static index(e,t=null){const r=P._preElem(e,"index");if(!r)return-1;if(!t)return Array.prototype.indexOf.call(r.parentNode?.children||[],r);if(t){const e="string"==typeof t?document.querySelectorAll(t):P._preElems(t,"index");return Array.prototype.indexOf.call(e,r)}return-1}index(e){return P.index(this,e)}static _getCustomRect(e,t){const r={height:0,width:0,x:0,y:0,bottom:0,left:0,right:0,top:0,toJSON:function(){throw new Error("Function not implemented.")}};for(const t in e)"number"==typeof e[t]&&(r[t]=e[t]);if("object"!=typeof t||null===t||Array.isArray(t))throw new Error("");const{height:n=0,width:o=0,top:i=0,bottom:s=0,left:a=0,right:l=0}=t;if("number"!=typeof n)throw new Error("");if("number"!=typeof o)throw new Error("");if("number"!=typeof i)throw new Error("");if("number"!=typeof s)throw new Error("");if("number"!=typeof a)throw new Error("");if("number"!=typeof l)throw new Error("");return r.height+=n,r.width+=o,r.top+=i,r.bottom+=s,r.left+=a,r.right+=l,r}static isCollWith(e,t,r={}){const n=P._getCustomRect(P._preElem(e,"isCollWith").getBoundingClientRect(),r),o=P._preElem(t,"isCollWith").getBoundingClientRect();return C(n,o)}isCollWith(e,t){return P.isCollWith(this,e,t)}static isCollPerfWith(e,t,r={}){const n=P._getCustomRect(P._preElem(e,"isCollPerfWith").getBoundingClientRect(),r),o=P._preElem(t,"isCollPerfWith").getBoundingClientRect();return L(n,o)}isCollPerfWith(e,t){return P.isCollPerfWith(this,e,t)}static _isCollWithLock(e,t,r,n,o){const i=N[o];if(e)return i.has(n)||i.set(n,!0),!0;if(i.has(n)){let e=!1;switch(o){case"top":e=x(t,r);break;case"bottom":e=k(t,r);break;case"left":e=B(t,r);break;case"right":e=I(t,r)}return e&&i.delete(n),i.has(n)}return!1}static isCollWithLock(e,t,r,n={}){const o=P._preElem(e,"isCollWithLock"),i=P._preElem(t,"isCollWithLock"),s=P._getCustomRect(o.getBoundingClientRect(),n),a=i.getBoundingClientRect(),l=C(s,a);return P._isCollWithLock(l,s,a,o,r)}isCollWithLock(e,t,r){return P.isCollWithLock(this,e,t,r)}static isCollPerfWithLock(e,t,r,n={}){const o=P._preElem(e,"isCollPerfWithLock"),i=P._preElem(t,"isCollPerfWithLock"),s=P._getCustomRect(o.getBoundingClientRect(),n),a=i.getBoundingClientRect(),l=L(s,a);return P._isCollWithLock(l,s,a,o,r)}isCollPerfWithLock(e,t,r){return P.isCollPerfWithLock(this,e,t,r)}static resetCollLock(e){const t=P._preElem(e,"resetCollLock");let r=!1;for(const e of["top","bottom","left","right"])N[e].has(t)&&(N[e].delete(t),r=!0);return r}resetCollLock(){return P.resetCollLock(this)}static resetCollLockDir(e,t){const r=P._preElem(e,"resetCollLockDir"),n=N[t];return!!n.has(r)&&(n.delete(r),!0)}resetCollLockDir(e){return P.resetCollLockDir(this,e)}static isInViewport(e){const t=P._preElem(e,"isInViewport");if(!t.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=P.offset(t).top,n=r+P.outerHeight(t),o=P.scrollTop(window),i=o+P.height(window);return n>o&&r<i}isInViewport(){return P.isInViewport(this)}static isScrolledIntoView(e){const t=P._preElem(e,"isScrolledIntoView");if(!t.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const r=P.scrollTop(window),n=r+P.height(window),o=P.offset(t).top;return o+P.height(t)<=n&&o>=r}isScrolledIntoView(){return P.isScrolledIntoView(this)}static isInContainer(e,t){const r=P._preElem(e,"isInContainer"),n=P._preElem(t,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect(),s=o.bottom>i.top&&o.top<i.bottom,a=o.right>i.left&&o.left<i.right;return s&&a}isInContainer(e){return P.isInContainer(this,e)}static isFullyInContainer(e,t){const r=P._preElem(e,"isScrolledIntoView"),n=P._preElem(t,"isInContainer");if(!r.checkVisibility({contentVisibilityAuto:!1,opacityProperty:!1,visibilityProperty:!1}))return!1;const o=r.getBoundingClientRect(),i=n.getBoundingClientRect();return o.top>=i.top&&o.bottom<=i.bottom&&o.left>=i.left&&o.right<=i.right}isFullyInContainer(e){return P.isFullyInContainer(this,e)}static hasScroll(e){const t=P._preElem(e,"hasScroll");return{v:t.scrollHeight>t.clientHeight,h:t.scrollWidth>t.clientWidth}}hasScroll(){return P.hasScroll(this)}}r(975);const R=class{#r=new Map;#n=10;#o=!1;setThrowOnMaxListeners(e){if("boolean"!=typeof e)throw new TypeError("setThrowOnMaxListeners(value): value must be a boolean");this.#o=e}getThrowOnMaxListeners(){return this.#o}#i(e,t,{once:r=!1}={}){let n=this.#r.get(e);Array.isArray(n)||(n=[],this.#r.set(e,n)),n.unshift({handler:t,config:{once:r}});const o=this.#n;if(o>0&&n.length>o){const t=`Possible memory leak detected. ${n.length} "${e}" listeners added. Use setMaxListeners() to increase limit.`;if(this.#o)throw new Error(t);console.warn(t)}}prependListener(e,t){if("string"!=typeof e)throw new TypeError("prepend(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("prepend(event, handler): handler must be a function");this.#i(e,t)}prependListenerOnce(e,t){if("string"!=typeof e)throw new TypeError("prependOnceListener(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("prependOnceListener(event, handler): handler must be a function");const r=(...n)=>{this.off(e,r),t(...n)};return this.#i(e,r,{once:!0}),r}#s(e,t,{once:r=!1}={}){let n=this.#r.get(e);Array.isArray(n)||(n=[],this.#r.set(e,n)),n.push({handler:t,config:{once:r}});const o=this.#n;if(o>0&&n.length>o){const t=`Possible memory leak detected. ${n.length} "${e}" listeners added. Use setMaxListeners() to increase limit.`;if(this.#o)throw new Error(t);console.warn(t)}}on(e,t){if("string"!=typeof e)throw new TypeError("on(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("on(event, handler): handler must be a function");return this.#s(e,t)}once(e,t){if("string"!=typeof e)throw new TypeError("The event name must be a string.");if("function"!=typeof t)throw new TypeError("once(event, handler): handler must be a function");const r=n=>{this.off(e,r),"function"==typeof t&&t(n)};return this.#s(e,r,{once:!0}),r}appendListener(e,t){return this.on(e,t)}appendListenerOnce(e,t){return this.once(e,t)}off(e,t){if("string"!=typeof e)throw new TypeError("off(event, handler): event name must be a string");if("function"!=typeof t)throw new TypeError("off(event, handler): handler must be a function");const r=this.#r.get(e);if(!Array.isArray(r))return;const n=r.findIndex(e=>e.handler===t);-1!==n&&r.splice(n,1),0===r.length&&this.#r.delete(e)}offAll(e){if("string"!=typeof e)throw new TypeError("The event name must be a string.");this.#r.delete(e)}offAllTypes(){this.#r.clear()}listenerCount(e){if("string"!=typeof e)throw new TypeError("listenerCount(event): event name must be a string");const t=this.#r.get(e);return Array.isArray(t)?t.length:0}listeners(e){if("string"!=typeof e)throw new TypeError("listeners(event): event name must be a string");const t=this.#r.get(e);return Array.isArray(t)?[...t].filter(e=>!e.config.once).map(e=>e.handler):[]}onceListeners(e){if("string"!=typeof e)throw new TypeError("onceListeners(event): event name must be a string");const t=this.#r.get(e);return Array.isArray(t)?[...t].filter(e=>e.config.once).map(e=>e.handler):[]}allListeners(e){if("string"!=typeof e)throw new TypeError("allListeners(event): event name must be a string");const t=this.#r.get(e);return Array.isArray(t)?[...t].map(e=>e.handler):[]}eventNames(){return[...this.#r.keys()]}emit(e,...t){if("string"!=typeof e)throw new TypeError("emit(event, data): event name must be a string");const r=this.#r.get(e);return!(!Array.isArray(r)||0===r.length||(r.forEach(e=>e.handler(...t)),0))}setMaxListeners(e){if(!Number.isInteger(e)||e<0)throw new TypeError("setMaxListeners(n): n must be a non-negative integer");this.#n=e}getMaxListeners(){return this.#n}},O=new Map,H=new Map;class D{#a=new R;setThrowOnMaxListeners(e){return this.#a.setThrowOnMaxListeners(e)}getThrowOnMaxListeners(){return this.#a.getThrowOnMaxListeners()}prependListener(e,t){return this.#a.prependListener(e,t)}prependListenerOnce(e,t){return this.#a.prependListenerOnce(e,t)}appendListener(e,t){return this.#a.appendListener(e,t)}appendListenerOnce(e,t){return this.#a.appendListenerOnce(e,t)}on(e,t){return this.#a.on(e,t)}once(e,t){return this.#a.once(e,t)}off(e,t){return this.#a.off(e,t)}offAll(e){return this.#a.offAll(e)}offAllTypes(){return this.#a.offAllTypes()}listenerCount(e){return this.#a.listenerCount(e)}listeners(e){return this.#a.listeners(e)}onceListeners(e){return this.#a.onceListeners(e)}allListeners(e){return this.#a.allListeners(e)}eventNames(){return this.#a.eventNames()}emit(e,...t){return this.#a.emit(e,...t)}setMaxListeners(e){return this.#a.setMaxListeners(e)}getMaxListeners(){return this.#a.getMaxListeners()}static registerJsonType(e,t,r){O.set(e,t),H.set(e,r)}static deleteJsonType(e){O.delete(e),H.delete(e)}static encodeSpecialJson(e){if(void 0===e)return{__undefined__:!0};if(null===e)return{__null__:!0};for(const[t,r]of O.entries())if("string"!=typeof t&&e instanceof t||typeof e===t)return r(e,D.encodeSpecialJson);if(Array.isArray(e))return e.map(D.encodeSpecialJson);if(o(e)){const t={};for(const r in e)t[r]=D.encodeSpecialJson(e[r]);return t}return e}static decodeSpecialJson(e){const t=o(e);if(t){if(e.__undefined__)return;if(e.__null__)return null}if(Array.isArray(e))return e.map(D.decodeSpecialJson);if(t){for(const[t,r]of H.entries())if(r.check&&r.check(e))return r.decode(e,D.decodeSpecialJson);const t={};for(const r in e)t[r]=D.decodeSpecialJson(e[r]);return t}return e}#l=window.localStorage;#c=e=>this.emit("storage",e);constructor(){window.addEventListener("storage",this.#c)}setLocalStorage(e){if(!(e instanceof Storage))throw new Error("Argument must be a valid instance of Storage.");this.#l=e}localStorageExists(){return this.#l instanceof Storage}#u(e,t){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");return D.encodeSpecialJson(t)}setJson(e,t){if(!(o(t)||Array.isArray(t)||t instanceof Map||t instanceof Set))throw new Error("The storage value is not a valid JSON-compatible structure.");const r=this.#u(e,t);this.emit("setJson",e,t),this.#l.setItem(e,JSON.stringify(r))}#f(e,t){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");const r=this.#l.getItem(e),n={obj:()=>({}),array:()=>[],map:()=>new Map,set:()=>new Set},o="function"==typeof n[t]?n[t]():null;let i;try{i=JSON.parse(r)}catch{return o}return{decoded:D.decodeSpecialJson(i),fallback:o}}getJson(e,t){const{decoded:r,fallback:n}=this.#f(e,t);return r instanceof Map||r instanceof Set||Array.isArray(r)||o(r)?r:n}setDate(e,t){if(!(t instanceof Date))throw new Error("Value must be a Date.");const r=this.#u(e,t);this.#l.setItem(e,JSON.stringify(r)),this.emit("setDate",e,t)}getDate(e){const t=this.#f(e).decoded;return t instanceof Date?t:null}setRegExp(e,t){if(!(t instanceof RegExp))throw new Error("Value must be a RegExp.");const r=this.#u(e,t);this.#l.setItem(e,JSON.stringify(r)),this.emit("setRegExp",e,t)}getRegExp(e){const t=this.#f(e).decoded;return t instanceof RegExp?t:null}setBigInt(e,t){if("bigint"!=typeof t)throw new Error("Value must be a BigInt.");const r=this.#u(e,t);this.#l.setItem(e,JSON.stringify(r)),this.emit("setBigInt",e,t)}getBigInt(e){const t=this.#f(e).decoded;return"bigint"==typeof t?t:null}setSymbol(e,t){if("symbol"!=typeof t)throw new Error("Value must be a Symbol.");const r=this.#u(e,t);this.#l.setItem(e,JSON.stringify(r)),this.emit("setSymbol",e,t)}getSymbol(e){const t=this.#f(e).decoded;return"symbol"==typeof t?t:null}getValue(e){return this.#f(e).decoded??null}setItem(e,t){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");return this.emit("setItem",e,t),this.#l.setItem(e,t)}getItem(e){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");return this.#l.getItem(e)}setString(e,t){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");if("string"!=typeof t)throw new Error("Value must be a string.");return this.emit("setString",e,t),this.#l.setItem(e,t)}getString(e){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");let t=this.#l.getItem(e);return"string"==typeof t?t:null}setNumber(e,t){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");if("number"!=typeof t)throw new Error("Value must be a number.");return this.emit("setNumber",e,t),this.#l.setItem(e,String(t))}getNumber(e){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");let t=this.#l.getItem(e);return"number"==typeof t||"string"==typeof t&&t.length>0&&(t=parseFloat(t),!Number.isNaN(t))?t:null}setBool(e,t){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");if("boolean"!=typeof t)throw new Error("Value must be a boolean.");return this.emit("setBool",e,t),this.#l.setItem(e,String(t))}getBool(e){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");const t=this.#l.getItem(e);if("boolean"==typeof t)return t;if("string"==typeof t){if("true"===t)return!0;if("false"===t)return!1}return null}removeItem(e){if("string"!=typeof e||!e.length)throw new Error("Key must be a non-empty string.");return this.emit("removeItem",e),this.#l.removeItem(e)}clearLocalStorage(){this.#l.clear()}destroy(){window.removeEventListener("storage",this.#c),this.#a.offAllTypes()}}D.registerJsonType(Map,(e,t)=>({__map__:!0,data:Array.from(e.entries()).map(([e,r])=>[e,t(r)])}),{check:e=>e.__map__,decode:(e,t)=>new Map(e.data.map(([e,r])=>[e,t(r)]))}),D.registerJsonType(Set,(e,t)=>({__set__:!0,data:Array.from(e).map(t)}),{check:e=>e.__set__,decode:(e,t)=>new Set(e.data.map(t))}),D.registerJsonType(Date,e=>({__date__:!0,value:e.toISOString()}),{check:e=>e.__date__,decode:e=>new Date(e.value)}),D.registerJsonType(RegExp,e=>({__regexp__:!0,source:e.source,flags:e.flags}),{check:e=>e.__regexp__,decode:e=>new RegExp(e.source,e.flags)}),D.registerJsonType("bigint",e=>({__bigint__:!0,value:e.toString()}),{check:e=>e.__bigint__,decode:e=>BigInt(e.value)}),D.registerJsonType("symbol",e=>({__symbol__:!0,key:Symbol.keyFor(e)??e.description??null}),{check:e=>e.__symbol__,decode:e=>{const t=e.key;return null!=t?Symbol.for(t):Symbol()}});const U=class{#p;#h=[];#m=new WeakMap;#d;constructor(e){if(!o(e))throw new TypeError('TinyUploadClicker: "options" must be a valid object.');this.#p={multiple:!1,accept:"",inputAttributes:{},inputStyles:{display:"none"},onClick:null,onFileLoad:null,...e};const{triggers:t}=e;if(!(Array.isArray(t)||"string"==typeof t||t instanceof HTMLElement))throw new TypeError('TinyUploadClicker: "triggers" is required and must be a string, HTMLElement, or an array of them.');const r=(Array.isArray(this.#p.triggers)?this.#p.triggers:[this.#p.triggers]).map(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`TinyUploadClicker: No element found for selector "${e}".`);return t}if(!(e instanceof HTMLElement))throw new TypeError("TinyUploadClicker: All triggers must be either strings (selectors) or HTMLElements.");return e});if(void 0!==e.accept&&"string"!=typeof e.accept&&!Array.isArray(e.accept))throw new TypeError('TinyUploadClicker: "accept" must be a string or an array of strings.');if(void 0!==e.onClick&&"function"!=typeof e.onClick&&null!==e.onClick)throw new TypeError('TinyUploadClicker: "onClick" must be a function or null.');if(void 0!==e.onFileLoad&&"function"!=typeof e.onFileLoad&&null!==e.onFileLoad)throw new TypeError('TinyUploadClicker: "onFileLoad" must be a function or null.');if(void 0!==e.inputAttributes&&!o(e.inputAttributes))throw new TypeError('TinyUploadClicker: "inputAttributes" must be an object.');if(void 0!==e.inputStyles&&!o(e.inputStyles))throw new TypeError('TinyUploadClicker: "inputStyles" must be an object.');this.#d=this.#g.bind(this),this.#h=r,this.#h.forEach(e=>{if(!(e instanceof HTMLElement))return;const t=document.createElement("input");t.type="file",this.#p.multiple&&(t.multiple=!0),"string"==typeof this.#p.accept?t.accept=this.#p.accept:Array.isArray(this.#p.accept)&&(t.accept=this.#p.accept.join(","));const r=this.#p.inputAttributes;if(r&&"object"==typeof r)for(const[e,n]of Object.entries(r))t.setAttribute(e,n);Object.assign(t.style,this.#p.inputStyles||{display:"none"}),t.addEventListener("change",()=>{t.files&&"function"==typeof this.#p.onFileLoad&&this.#p.onFileLoad(t.files,e),t.value=""}),document.body.appendChild(t),this.#m.set(e,t),e.addEventListener("click",this.#d)})}#g(e){const t=e.currentTarget;if(!(t instanceof HTMLElement))return;const r=this.#m.get(t);r&&("function"==typeof this.#p.onClick&&this.#p.onClick(t),r.click())}destroy(){for(const e of this.#h){if(!(e instanceof HTMLElement))return;e.removeEventListener("click",this.#d);const t=this.#m.get(e);t&&t.parentNode&&t.remove(),this.#m.delete(e)}this.#h=[]}}})(),window.TinyUploadClicker=n.TinyUploadClicker})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e={d:(n,o)=>{for(var a in o)e.o(o,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:o[a]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};e.d(n,{UltraRandomMsgGen:()=>d});const o=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","sed","do","eiusmod","tempor","incididunt","ut","labore","et","dolore","magna","aliqua"],a=["😂","🌈","🤖","💥","🐸","🍕","🦄","🧠","🧬","🚀","🫠","💫","🍩","👾","🎉","🥴","🐙","🧃","🪐","🎈","🧸","👻","🥳","🍭","💖","😺","🌮","🪅","🎮","🥓","🍮"],t=["pudding","bean","snuggle","bloop","jelly","unicorn","floof","giggle","bubble","muffin","puff","pickle","goblin","waffle","sprinkle","cupcake","fizzle","marshmallow","duckling","sock","cloud","teacup","nugget","gnome","hug","moonbean","crayon","jiggle","glitter","carrot","goober"],r=["wiggles","bounces","flies","splats","scoots","giggles","wigglesnacks","twirls","boops","pops","sings","hugs","floats","glows","flaps","mlems","dances","puddles","nomnoms","wigglejumps","sniffs","tumbles","slides","chirps","burps","sparkles","waddles","rambles","blinks","mews"],i=["fluffy","silly","yummy","squishy","wobbly","magical","tiny","sleepy","wiggly","bubbly","glittery","fuzzy","jiggly","sparkly","giggly","crunchy","goofy","soft","mushy","sweet","loopy","floaty","bonkers","chewy","ticklish","dreamy","pastel","cozy","teensy","grumbly"],s=["Boop!","Wiggle achieved.","Oops, {noun} everywhere!","Tiny {adj} {noun}, big {adj} {noun}.","Snuggle initiated with a {adj} {noun}.","{adj} vibes only, powered by {noun}.","No {noun}, no {noun}.","Bounce first, {verb} later.","Mlem. {verb}. {noun}.","{noun} go brrr and {verb}.","Why not? {noun} did. Then {noun} followed.","A {adj} {noun} just {verb} near the {adj} window.","That {adj} {noun} stole my {noun}!","Look, a {adj} {noun} trying to {verb} again!","Every {noun} deserves a {adj} nap.","The {adj} {noun} is my {adj} spirit animal.","Someone call the {noun}, it’s {verb}ing and {verb}ing again!","Don’t touch the {adj} {noun}. It {verb}s loudly.","{noun} forgot how {noun}s work and just {verb}ed.","There once was a {adj} {noun} who loved to {verb} with a {adj} {noun} all day.","Apparently, {noun}s are banned from {verb}ing and {verb}ing in the {noun} library.","That {adj} noise? Just a {noun} learning to {verb} on a {adj} {noun}.","I saw a {adj} {noun} {verb} so hard, it became a {adj} muffin.","The {adj} {noun} met a {adj} pickle and everything {verb}ed.","{noun}s are like {noun}: {adj}, unpredictable, and wiggly.","Don’t judge a {adj} {noun} by its ability to {verb}, or by its {adj} hat.","All I wanted was peace, but a {adj} {noun} with a {adj} {noun} had other plans.","One {adj} morning, a {adj} {noun} decided it was finally time to {verb}, but halfway through, it tripped on a {noun} and turned into a {adj} marshmallow.","I tried to be {adj} today, but then a {noun} {verb}ed across my {noun} and typed “asdfgh{noun}” repeatedly.","If you think you’ve seen everything, wait until a {adj} {noun} {verb}s on a {noun} wearing {adj} socks with tiny {noun}s.","No one ever believed the stories about the ancient {adj} {noun} who could {verb} with such {adj} grace that entire {noun}s turned pink out of embarrassment.","A curious {adj} {noun} wandered into a {noun} shop, not knowing that its destiny involved twelve {adj} {noun}s, one rubber {noun}, and a suspiciously quiet {adj} llama.","In a land where every {adj} {noun} was made of pudding and the sky was {adj} whipped cream, one brave {adj} {noun} set out to discover the legendary Spoon of {noun}s, facing obstacles like bouncing {noun}s, sassy {noun}s, and the Great Wobble of the {noun}.","Once upon a {adj} time, long before the {noun}s learned to {verb}, there existed a tiny {adj} {noun} who dreamed of swimming in a pool made entirely of {adj} glitter pudding while {verb}ing off-key lullabies to passing {noun}s with monocles.","The Council of {noun}s gathered in {adj} secret when the sacred {adj} {noun} started to {verb} uncontrollably, threatening the entire {adj} dessert-based civilization with spontaneous {noun} jiggles and uncontainable {noun} fits across the {noun}.","Hey... do you ever wonder if {noun}s dream of {noun}s?","Okay but hear me out: what if the {adj} {noun} could actually {verb} backwards?","Can we talk about the {noun} that just {verb}ed and vanished?","So I was talking to a {noun}, and it told me to stop being {adj}. Rude.","Not to alarm you, but there’s a {adj} {noun} behind you doing the {verb}.","Why does this {noun} keep staring at me like I owe it pudding?","Is this a safe space to admit I accidentally {verb}ed a {noun}?","I just walked into the room and someone shouted “{adj} {noun}!” — what did I miss?","Wait... we were supposed to bring a {noun}? No one told me!","Okay but what if the {adj} {noun} has feelings too?","Be honest, do I look like a {noun} that forgot how to {verb}?",'If I say "oops", do I still have to explain why the {noun} is glowing?',"I don’t know what’s going on but I brought snacks and a confused {noun}.","Do you think pudding knows it’s pudding? Just a thought.","Is this about the time I {verb}ed the {adj} {noun} by accident? Because I can explain.","Wait, are we talking about {noun}s or am I on the wrong chat again?",'What is this group even about? I just saw "pudding" and joined.',"Hi! I have no idea what’s happening but I’m here and I brought a {noun}.","I blinked and now there’s a {adj} {noun} in charge of everything.","Can someone please explain why the {noun} is floating and chanting?","Okay who gave the {noun} access to glitter and emotional support pickles?","I came for a calm discussion and now there’s a {adj} battle between {noun}s.","Not sure if I’m early, late, or inside a {noun} dream.","I was gone for 3 minutes and now someone’s riding a {noun} into the pudding realm.","This isn’t the pudding appreciation group, is it? ...oh no.","So... who summoned the {adj} {noun} this time? Be honest.","I came here for vibes and stayed for the {noun}s.","Does anyone else hear faint giggling or is that just the {adj} {noun} again?","I feel like I missed step one, two, and also three of this conversation.","All I asked was “what’s up?” and now I’m emotionally attached to a {noun}.",'Me: "I’ll be normal today." Also me: *{verb}s into a meeting riding a {adj} {noun}*','"It’s just pudding," they said. "It can’t hurt you," they said. They were wrong.',"I said one nice thing to a {noun} and now it follows me everywhere.","Can we take a moment to appreciate how the {adj} {noun} is just vibing?","Who put a tiny hat on the {noun}? Because that’s adorable.","My life has been different ever since the {noun} started {verb}ing.","Raise your hand if you’ve ever been personally attacked by a {adj} {noun}.",'"Don’t be weird," they said. So I became a {noun} instead.',"Do {noun}s have feelings? Asking for a {adj} friend.","I trusted the {noun} and all I got was a glitter-covered sock.","Plot twist: the {adj} {noun} was inside us all along.","The {adj} {noun} {verb} and {verb} all over the {adj} {noun}!","Oops! {noun}s {verb}ed into the {adj} {noun} while {verb}ing crazily.","{adj}, {adj}, and more {adj} {noun}s just {verb}ed by!","Why does the {adj} {noun} keep {verb}ing and {verb}ing without stopping?","Look! A {adj} {noun}, a {adj} {noun}, and a {noun} all {verb}ing together!","Sometimes, the {noun} just {verb}s, then {verb}s again, and never stops being {adj}.","{noun}, {noun}, and {noun} — all {verb}ing and {verb}ing in a {adj} {noun}.","I saw a {adj} {noun} {verb}, then another {noun} {verb}ing with a {adj} {noun}.","The {noun} {verb}s {verb} while the {adj} {noun} {verb}s and the {noun} just {verb}s.","Can a {adj} {noun} {verb} {verb} without a {adj} {noun} watching?","Whoa! The {adj} {noun} just {verb}ed... and then {verb}ed again!","Hey... did you see that {adj} {noun} {verb} over there?","Umm, the {noun} is {verb}ing but also {verb}ing and {verb}ing!","Lol! {noun}s {verb} so {adj}ly, it’s impossible not to giggle.",'"Hey! What’s up?" asked the {adj} {noun}, who {verb}ed loudly.','"I’m just a {adj} {noun} trying to {verb}, you know?"','"Did you see the {adj} {noun} that just {verb}ed in the pudding?"','"No way! The {noun} {verb}s better than me!"','"Wait, the {adj} {noun} said it would {verb}, but it {verb}ed instead!"',"Once upon a {adj} {noun}, a group of {adj} {noun}s {verb}ed through the {adj} forest, singing {adj} songs and eating {noun}s made of pudding.","The legend tells of a {adj} {noun} who could {verb} faster than any {noun} ever seen, leaving trails of {adj} sparkles behind.","Every day, the {adj} {noun} would {verb} around the {adj} meadow, trying to convince the {noun}s to join the grand pudding party.","No one knows why the {adj} {noun} suddenly {verb}ed and then {verb}ed again, but everyone agrees it was the cutest thing they ever saw.","In the kingdom of {adj} {noun}s, only the bravest {noun} dared to {verb} the giant pudding monster, armed with nothing but {adj} smiles and jellybeans.","{adj} {noun} {verb} {verb} {verb} {noun} {verb} {adj} {noun} {verb} {noun}!","{noun} {noun} {verb} {adj} {noun} and then {verb} {verb} the {adj} {noun}.","{verb} the {adj} {noun}, then {verb} the {noun} while {verb}ing {adj}ly.","Can the {adj} {noun} {verb} and {verb} the {adj} {noun} at the same time?","{noun} {verb} {noun} {verb}, but the {adj} {noun} {verb}s better.","Boop! The {adj} {noun} just {verb}ed in the pudding.","Bloop bloop, the {noun} is {verb}ing all over again!","Mlem mlem, a {adj} {noun} {verb}s quietly in the corner.","Splat! {noun} {verb}ed right on the {adj} {noun}.","Yum! A {adj} {noun} just {verb}ed in my mouth.","Do {noun}s really {verb} when nobody’s watching?","Why does the {adj} {noun} always {verb} at midnight?","Can a {noun} be too {adj} to {verb} properly?","Is it normal for a {adj} {noun} to {verb} three times in a row?","Who taught the {noun} to {verb} like that?","Wait, did the {adj} {noun} just {verb} itself?","I can’t believe the {noun} {verb}ed into a {adj} {noun}!","Suddenly, a {adj} {noun} appeared and started to {verb} wildly.","That {noun} was {verb}ing so {adj}ly it broke the pudding meter.","Everyone’s talking about the {adj} {noun} that {verb}ed out of nowhere."],d=class{static defaultWords=o;static defaultEmojis=a;static defaultNouns=t;static defaultVerbs=r;static defaultAdjectives=i;static defaultTemplates=s;config={minLength:10,maxLength:300,readable:!0,useEmojis:!0,includeNumbers:!0,includeSymbols:!0,allowWeirdSpacing:!1,emojiSet:[],wordSet:[],mode:"mixed",grammar:{templates:[],nouns:[],verbs:[],adjectives:[]},repeatWords:!0,emojiPlacement:"inline",line:{minLength:20,maxLength:120,emojiChance:.3}};constructor(e={}){this.symbols="!@#$%^&*()-_=+[]{}|;:,.<>?/\\~".split("");const{minLength:n,maxLength:d,readable:u,useEmojis:h,includeNumbers:l,includeSymbols:g,allowWeirdSpacing:m,emojiSet:b,wordSet:c,mode:f,grammar:v,repeatWords:p,emojiPlacement:w,paragraphs:j,line:y}=e;if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.minLength must be an integer >= 1");if(void 0!==d&&(!Number.isInteger(d)||d<1))throw new TypeError("config.maxLength must be an integer >= 1");if(void 0!==n&&void 0!==d&&n>d)throw new RangeError("config.minLength cannot be greater than config.maxLength");if(void 0!==u&&"boolean"!=typeof u)throw new TypeError("config.readable must be a boolean");if(void 0!==h&&"boolean"!=typeof h)throw new TypeError("config.useEmojis must be a boolean");if(void 0!==l&&"boolean"!=typeof l)throw new TypeError("config.includeNumbers must be a boolean");if(void 0!==g&&"boolean"!=typeof g)throw new TypeError("config.includeSymbols must be a boolean");if(void 0!==m&&"boolean"!=typeof m)throw new TypeError("config.allowWeirdSpacing must be a boolean");if(void 0!==b&&!Array.isArray(b))throw new TypeError("config.emojiSet must be an array of strings");if(void 0!==c&&!Array.isArray(c))throw new TypeError("config.wordSet must be an array of strings");if(void 0!==f&&!["mixed","readable","chaotic","natural"].includes(f))throw new RangeError('config.mode must be one of: "mixed", "readable", "chaotic", "natural');if(void 0!==v){if("object"!=typeof v||null===v)throw new TypeError("config.grammar must be an object");const{templates:e,nouns:n,verbs:o,adjectives:a}=v;if(void 0!==e&&!Array.isArray(e))throw new TypeError("config.grammar.templates must be an array of strings");if(void 0!==n&&!Array.isArray(n))throw new TypeError("config.grammar.nouns must be an array of strings");if(void 0!==o&&!Array.isArray(o))throw new TypeError("config.grammar.verbs must be an array of strings");if(void 0!==a&&!Array.isArray(a))throw new TypeError("config.grammar.adjectives must be an array of strings")}if(void 0!==p&&"boolean"!=typeof p)throw new TypeError("config.repeatWords must be a boolean");if(void 0!==w&&!["inline","end","none"].includes(w))throw new RangeError('config.emojiPlacement must be one of: "inline", "end", "none"');if(void 0!==j){if("object"!=typeof j)throw new TypeError("config.paragraphs must be an object or null");const{min:e,max:n}=j;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.paragraphs.min must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.paragraphs.max must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.paragraphs.min cannot be greater than config.paragraphs.max")}if(void 0!==y){if("object"!=typeof y||null===y)throw new TypeError("config.line must be an object");const{minLength:e,maxLength:n,emojiChance:o}=y;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.line.minLength must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.line.maxLength must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.line.minLength cannot be greater than config.line.maxLength");if(void 0!==o&&("number"!=typeof o||o<0||o>1))throw new RangeError("config.line.emojiChance must be a number between 0 and 1")}this.config.emojiSet=[...a],this.config.wordSet=[...o],this.config.grammar.templates=[...s],this.config.grammar.nouns=[...t],this.config.grammar.verbs=[...r],this.config.grammar.adjectives=[...i],Object.assign(this.config,e)}configure(e={}){return Object.assign(this.config,e),this}setGrammarTemplates(...e){return this.config.grammar.templates=e.flat(),this}addGrammarTemplates(...e){return this.config.grammar.templates.push(...e.flat()),this}setGrammarNouns(...e){return this.config.grammar.nouns=e.flat(),this}addGrammarNouns(...e){return this.config.grammar.nouns.push(...e.flat()),this}setGrammarVerbs(...e){return this.config.grammar.verbs=e.flat(),this}addGrammarVerbs(...e){return this.config.grammar.verbs.push(...e.flat()),this}setGrammarAdjectives(...e){return this.config.grammar.adjectives=e.flat(),this}addGrammarAdjectives(...e){return this.config.grammar.adjectives.push(...e.flat()),this}removeGrammarTemplates(...e){const n=new Set(e.flat());return this.config.grammar.templates=this.config.grammar.templates.filter((e=>!n.has(e))),this}removeGrammarNouns(...e){const n=new Set(e.flat());return this.config.grammar.nouns=this.config.grammar.nouns.filter((e=>!n.has(e))),this}removeGrammarVerbs(...e){const n=new Set(e.flat());return this.config.grammar.verbs=this.config.grammar.verbs.filter((e=>!n.has(e))),this}removeGrammarAdjectives(...e){const n=new Set(e.flat());return this.config.grammar.adjectives=this.config.grammar.adjectives.filter((e=>!n.has(e))),this}setWords(...e){return this.config.wordSet=e.flat(),this}addWords(...e){return this.config.wordSet.push(...e.flat()),this}removeWords(...e){const n=new Set(e.flat());return this.config.wordSet=this.config.wordSet.filter((e=>!n.has(e))),this}setEmojis(...e){return this.config.emojiSet=e.flat(),this}addEmojis(...e){return this.config.emojiSet.push(...e.flat()),this}removeEmojis(...e){const n=new Set(e.flat());return this.config.emojiSet=this.config.emojiSet.filter((e=>!n.has(e))),this}_getRandomItem(e){return e[Math.floor(Math.random()*e.length)]}_generateChunk(){const{wordSet:e,emojiSet:n,includeNumbers:o,includeSymbols:a,useEmojis:t,readable:r,mode:i,emojiPlacement:s}=this.config;if("natural"===i)return this._generateNaturalSentence();const d=[];return(r||"readable"===i||"mixed"===i)&&d.push(this._getRandomItem(e)),"chaotic"!==i&&"mixed"!==i||d.push(Math.random().toString(36).slice(2)),o&&d.push(Math.floor(99999*Math.random()).toString()),a&&d.push(this._getRandomItem(this.symbols)),"inline"===s&&t&&n.length&&d.push(this._getRandomItem(n)),this._getRandomItem(d)}_generateNaturalSentence(){const{templates:e,nouns:n,verbs:o,adjectives:a}=this.config.grammar;return this._getRandomItem(e).replace(/{noun}/g,(()=>this._getRandomItem(n))).replace(/{verb}/g,(()=>this._getRandomItem(o))).replace(/{adj}/g,(()=>this._getRandomItem(a)))}_generateLine(e,n){const{allowWeirdSpacing:o,repeatWords:a,readable:t,emojiSet:r,useEmojis:i,emojiPlacement:s,line:d}=this.config,u=[];for(n??=new Set;u.join(" ").length<e;){let e=this._generateChunk();!a&&n.has(e)||(n.add(e),o&&(Math.random()<.1&&(e="\n"+e),Math.random()<.1&&(e=" "+e),Math.random()<.05&&(e=e.toUpperCase())),u.push(e))}let h=u.join(t?" ":"");return"end"===s&&i&&r.length&&Math.random()<(d?.emojiChance||0)&&(h+=" "+this._getRandomItem(r)),h}_generateParagraphLines(e){const{line:n}=this.config,o=[],a=new Set;let t=0;for(;t<e;){const r=Math.floor(Math.random()*(n.maxLength-n.minLength+1)+n.minLength),i=Math.min(r,e-t);o.push(this._generateLine(i,a)),t+=i}return o}generate(){const{minLength:e,maxLength:n,paragraphs:o}=this.config,a=Math.floor(Math.random()*(n-e+1))+e;if(o&&"object"==typeof o){const e=Math.floor(Math.random()*(o.max-o.min+1))+o.min,n=Math.floor(a/e),t=[];for(let o=0;o<e;o++){const e=this._generateParagraphLines(n);t.push(e.join("\n"))}return t.join("\n\n")}return this._generateParagraphLines(a).join("\n")}};window.UltraRandomMsgGen=n.UltraRandomMsgGen})();
1
+ (()=>{"use strict";var e={d:(n,o)=>{for(var a in o)e.o(o,a)&&!e.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:o[a]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},n={};e.d(n,{UltraRandomMsgGen:()=>d});const o=["lorem","ipsum","dolor","sit","amet","consectetur","adipiscing","elit","sed","do","eiusmod","tempor","incididunt","ut","labore","et","dolore","magna","aliqua"],a=["😂","🌈","🤖","💥","🐸","🍕","🦄","🧠","🧬","🚀","🫠","💫","🍩","👾","🎉","🥴","🐙","🧃","🪐","🎈","🧸","👻","🥳","🍭","💖","😺","🌮","🪅","🎮","🥓","🍮"],t=["pudding","bean","snuggle","bloop","jelly","unicorn","floof","giggle","bubble","muffin","puff","pickle","goblin","waffle","sprinkle","cupcake","fizzle","marshmallow","duckling","sock","cloud","teacup","nugget","gnome","hug","moonbean","crayon","jiggle","glitter","carrot","goober"],r=["wiggles","bounces","flies","splats","scoots","giggles","wigglesnacks","twirls","boops","pops","sings","hugs","floats","glows","flaps","mlems","dances","puddles","nomnoms","wigglejumps","sniffs","tumbles","slides","chirps","burps","sparkles","waddles","rambles","blinks","mews"],i=["fluffy","silly","yummy","squishy","wobbly","magical","tiny","sleepy","wiggly","bubbly","glittery","fuzzy","jiggly","sparkly","giggly","crunchy","goofy","soft","mushy","sweet","loopy","floaty","bonkers","chewy","ticklish","dreamy","pastel","cozy","teensy","grumbly"],s=["Boop!","Wiggle achieved.","Oops, {noun} everywhere!","Tiny {adj} {noun}, big {adj} {noun}.","Snuggle initiated with a {adj} {noun}.","{adj} vibes only, powered by {noun}.","No {noun}, no {noun}.","Bounce first, {verb} later.","Mlem. {verb}. {noun}.","{noun} go brrr and {verb}.","Why not? {noun} did. Then {noun} followed.","A {adj} {noun} just {verb} near the {adj} window.","That {adj} {noun} stole my {noun}!","Look, a {adj} {noun} trying to {verb} again!","Every {noun} deserves a {adj} nap.","The {adj} {noun} is my {adj} spirit animal.","Someone call the {noun}, it’s {verb}ing and {verb}ing again!","Don’t touch the {adj} {noun}. It {verb}s loudly.","{noun} forgot how {noun}s work and just {verb}ed.","There once was a {adj} {noun} who loved to {verb} with a {adj} {noun} all day.","Apparently, {noun}s are banned from {verb}ing and {verb}ing in the {noun} library.","That {adj} noise? Just a {noun} learning to {verb} on a {adj} {noun}.","I saw a {adj} {noun} {verb} so hard, it became a {adj} muffin.","The {adj} {noun} met a {adj} pickle and everything {verb}ed.","{noun}s are like {noun}: {adj}, unpredictable, and wiggly.","Don’t judge a {adj} {noun} by its ability to {verb}, or by its {adj} hat.","All I wanted was peace, but a {adj} {noun} with a {adj} {noun} had other plans.","One {adj} morning, a {adj} {noun} decided it was finally time to {verb}, but halfway through, it tripped on a {noun} and turned into a {adj} marshmallow.","I tried to be {adj} today, but then a {noun} {verb}ed across my {noun} and typed “asdfgh{noun}” repeatedly.","If you think you’ve seen everything, wait until a {adj} {noun} {verb}s on a {noun} wearing {adj} socks with tiny {noun}s.","No one ever believed the stories about the ancient {adj} {noun} who could {verb} with such {adj} grace that entire {noun}s turned pink out of embarrassment.","A curious {adj} {noun} wandered into a {noun} shop, not knowing that its destiny involved twelve {adj} {noun}s, one rubber {noun}, and a suspiciously quiet {adj} llama.","In a land where every {adj} {noun} was made of pudding and the sky was {adj} whipped cream, one brave {adj} {noun} set out to discover the legendary Spoon of {noun}s, facing obstacles like bouncing {noun}s, sassy {noun}s, and the Great Wobble of the {noun}.","Once upon a {adj} time, long before the {noun}s learned to {verb}, there existed a tiny {adj} {noun} who dreamed of swimming in a pool made entirely of {adj} glitter pudding while {verb}ing off-key lullabies to passing {noun}s with monocles.","The Council of {noun}s gathered in {adj} secret when the sacred {adj} {noun} started to {verb} uncontrollably, threatening the entire {adj} dessert-based civilization with spontaneous {noun} jiggles and uncontainable {noun} fits across the {noun}.","Hey... do you ever wonder if {noun}s dream of {noun}s?","Okay but hear me out: what if the {adj} {noun} could actually {verb} backwards?","Can we talk about the {noun} that just {verb}ed and vanished?","So I was talking to a {noun}, and it told me to stop being {adj}. Rude.","Not to alarm you, but there’s a {adj} {noun} behind you doing the {verb}.","Why does this {noun} keep staring at me like I owe it pudding?","Is this a safe space to admit I accidentally {verb}ed a {noun}?","I just walked into the room and someone shouted “{adj} {noun}!” — what did I miss?","Wait... we were supposed to bring a {noun}? No one told me!","Okay but what if the {adj} {noun} has feelings too?","Be honest, do I look like a {noun} that forgot how to {verb}?",'If I say "oops", do I still have to explain why the {noun} is glowing?',"I don’t know what’s going on but I brought snacks and a confused {noun}.","Do you think pudding knows it’s pudding? Just a thought.","Is this about the time I {verb}ed the {adj} {noun} by accident? Because I can explain.","Wait, are we talking about {noun}s or am I on the wrong chat again?",'What is this group even about? I just saw "pudding" and joined.',"Hi! I have no idea what’s happening but I’m here and I brought a {noun}.","I blinked and now there’s a {adj} {noun} in charge of everything.","Can someone please explain why the {noun} is floating and chanting?","Okay who gave the {noun} access to glitter and emotional support pickles?","I came for a calm discussion and now there’s a {adj} battle between {noun}s.","Not sure if I’m early, late, or inside a {noun} dream.","I was gone for 3 minutes and now someone’s riding a {noun} into the pudding realm.","This isn’t the pudding appreciation group, is it? ...oh no.","So... who summoned the {adj} {noun} this time? Be honest.","I came here for vibes and stayed for the {noun}s.","Does anyone else hear faint giggling or is that just the {adj} {noun} again?","I feel like I missed step one, two, and also three of this conversation.","All I asked was “what’s up?” and now I’m emotionally attached to a {noun}.",'Me: "I’ll be normal today." Also me: *{verb}s into a meeting riding a {adj} {noun}*','"It’s just pudding," they said. "It can’t hurt you," they said. They were wrong.',"I said one nice thing to a {noun} and now it follows me everywhere.","Can we take a moment to appreciate how the {adj} {noun} is just vibing?","Who put a tiny hat on the {noun}? Because that’s adorable.","My life has been different ever since the {noun} started {verb}ing.","Raise your hand if you’ve ever been personally attacked by a {adj} {noun}.",'"Don’t be weird," they said. So I became a {noun} instead.',"Do {noun}s have feelings? Asking for a {adj} friend.","I trusted the {noun} and all I got was a glitter-covered sock.","Plot twist: the {adj} {noun} was inside us all along.","The {adj} {noun} {verb} and {verb} all over the {adj} {noun}!","Oops! {noun}s {verb}ed into the {adj} {noun} while {verb}ing crazily.","{adj}, {adj}, and more {adj} {noun}s just {verb}ed by!","Why does the {adj} {noun} keep {verb}ing and {verb}ing without stopping?","Look! A {adj} {noun}, a {adj} {noun}, and a {noun} all {verb}ing together!","Sometimes, the {noun} just {verb}s, then {verb}s again, and never stops being {adj}.","{noun}, {noun}, and {noun} — all {verb}ing and {verb}ing in a {adj} {noun}.","I saw a {adj} {noun} {verb}, then another {noun} {verb}ing with a {adj} {noun}.","The {noun} {verb}s {verb} while the {adj} {noun} {verb}s and the {noun} just {verb}s.","Can a {adj} {noun} {verb} {verb} without a {adj} {noun} watching?","Whoa! The {adj} {noun} just {verb}ed... and then {verb}ed again!","Hey... did you see that {adj} {noun} {verb} over there?","Umm, the {noun} is {verb}ing but also {verb}ing and {verb}ing!","Lol! {noun}s {verb} so {adj}ly, it’s impossible not to giggle.",'"Hey! What’s up?" asked the {adj} {noun}, who {verb}ed loudly.','"I’m just a {adj} {noun} trying to {verb}, you know?"','"Did you see the {adj} {noun} that just {verb}ed in the pudding?"','"No way! The {noun} {verb}s better than me!"','"Wait, the {adj} {noun} said it would {verb}, but it {verb}ed instead!"',"Once upon a {adj} {noun}, a group of {adj} {noun}s {verb}ed through the {adj} forest, singing {adj} songs and eating {noun}s made of pudding.","The legend tells of a {adj} {noun} who could {verb} faster than any {noun} ever seen, leaving trails of {adj} sparkles behind.","Every day, the {adj} {noun} would {verb} around the {adj} meadow, trying to convince the {noun}s to join the grand pudding party.","No one knows why the {adj} {noun} suddenly {verb}ed and then {verb}ed again, but everyone agrees it was the cutest thing they ever saw.","In the kingdom of {adj} {noun}s, only the bravest {noun} dared to {verb} the giant pudding monster, armed with nothing but {adj} smiles and jellybeans.","{adj} {noun} {verb} {verb} {verb} {noun} {verb} {adj} {noun} {verb} {noun}!","{noun} {noun} {verb} {adj} {noun} and then {verb} {verb} the {adj} {noun}.","{verb} the {adj} {noun}, then {verb} the {noun} while {verb}ing {adj}ly.","Can the {adj} {noun} {verb} and {verb} the {adj} {noun} at the same time?","{noun} {verb} {noun} {verb}, but the {adj} {noun} {verb}s better.","Boop! The {adj} {noun} just {verb}ed in the pudding.","Bloop bloop, the {noun} is {verb}ing all over again!","Mlem mlem, a {adj} {noun} {verb}s quietly in the corner.","Splat! {noun} {verb}ed right on the {adj} {noun}.","Yum! A {adj} {noun} just {verb}ed in my mouth.","Do {noun}s really {verb} when nobody’s watching?","Why does the {adj} {noun} always {verb} at midnight?","Can a {noun} be too {adj} to {verb} properly?","Is it normal for a {adj} {noun} to {verb} three times in a row?","Who taught the {noun} to {verb} like that?","Wait, did the {adj} {noun} just {verb} itself?","I can’t believe the {noun} {verb}ed into a {adj} {noun}!","Suddenly, a {adj} {noun} appeared and started to {verb} wildly.","That {noun} was {verb}ing so {adj}ly it broke the pudding meter.","Everyone’s talking about the {adj} {noun} that {verb}ed out of nowhere."],d=class{static defaultWords=o;static defaultEmojis=a;static defaultNouns=t;static defaultVerbs=r;static defaultAdjectives=i;static defaultTemplates=s;config={minLength:10,maxLength:300,readable:!0,useEmojis:!0,includeNumbers:!0,includeSymbols:!0,allowWeirdSpacing:!1,emojiSet:[],wordSet:[],mode:"mixed",grammar:{templates:[],nouns:[],verbs:[],adjectives:[]},repeatWords:!0,emojiPlacement:"inline",line:{minLength:20,maxLength:120,emojiChance:.3}};constructor(e={}){this.symbols="!@#$%^&*()-_=+[]{}|;:,.<>?/\\~".split("");const{minLength:n,maxLength:d,readable:u,useEmojis:h,includeNumbers:l,includeSymbols:g,allowWeirdSpacing:m,emojiSet:b,wordSet:c,mode:f,grammar:v,repeatWords:p,emojiPlacement:w,paragraphs:j,line:y}=e;if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.minLength must be an integer >= 1");if(void 0!==d&&(!Number.isInteger(d)||d<1))throw new TypeError("config.maxLength must be an integer >= 1");if(void 0!==n&&void 0!==d&&n>d)throw new RangeError("config.minLength cannot be greater than config.maxLength");if(void 0!==u&&"boolean"!=typeof u)throw new TypeError("config.readable must be a boolean");if(void 0!==h&&"boolean"!=typeof h)throw new TypeError("config.useEmojis must be a boolean");if(void 0!==l&&"boolean"!=typeof l)throw new TypeError("config.includeNumbers must be a boolean");if(void 0!==g&&"boolean"!=typeof g)throw new TypeError("config.includeSymbols must be a boolean");if(void 0!==m&&"boolean"!=typeof m)throw new TypeError("config.allowWeirdSpacing must be a boolean");if(void 0!==b&&!Array.isArray(b))throw new TypeError("config.emojiSet must be an array of strings");if(void 0!==c&&!Array.isArray(c))throw new TypeError("config.wordSet must be an array of strings");if(void 0!==f&&!["mixed","readable","chaotic","natural"].includes(f))throw new RangeError('config.mode must be one of: "mixed", "readable", "chaotic", "natural');if(void 0!==v){if("object"!=typeof v||null===v)throw new TypeError("config.grammar must be an object");const{templates:e,nouns:n,verbs:o,adjectives:a}=v;if(void 0!==e&&!Array.isArray(e))throw new TypeError("config.grammar.templates must be an array of strings");if(void 0!==n&&!Array.isArray(n))throw new TypeError("config.grammar.nouns must be an array of strings");if(void 0!==o&&!Array.isArray(o))throw new TypeError("config.grammar.verbs must be an array of strings");if(void 0!==a&&!Array.isArray(a))throw new TypeError("config.grammar.adjectives must be an array of strings")}if(void 0!==p&&"boolean"!=typeof p)throw new TypeError("config.repeatWords must be a boolean");if(void 0!==w&&!["inline","end","none"].includes(w))throw new RangeError('config.emojiPlacement must be one of: "inline", "end", "none"');if(void 0!==j){if("object"!=typeof j)throw new TypeError("config.paragraphs must be an object or null");const{min:e,max:n}=j;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.paragraphs.min must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.paragraphs.max must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.paragraphs.min cannot be greater than config.paragraphs.max")}if(void 0!==y){if("object"!=typeof y||null===y)throw new TypeError("config.line must be an object");const{minLength:e,maxLength:n,emojiChance:o}=y;if(void 0!==e&&(!Number.isInteger(e)||e<1))throw new TypeError("config.line.minLength must be an integer >= 1");if(void 0!==n&&(!Number.isInteger(n)||n<1))throw new TypeError("config.line.maxLength must be an integer >= 1");if(void 0!==e&&void 0!==n&&e>n)throw new RangeError("config.line.minLength cannot be greater than config.line.maxLength");if(void 0!==o&&("number"!=typeof o||o<0||o>1))throw new RangeError("config.line.emojiChance must be a number between 0 and 1")}this.config.emojiSet=[...a],this.config.wordSet=[...o],this.config.grammar.templates=[...s],this.config.grammar.nouns=[...t],this.config.grammar.verbs=[...r],this.config.grammar.adjectives=[...i],Object.assign(this.config,e)}configure(e={}){return Object.assign(this.config,e),this}setGrammarTemplates(...e){return this.config.grammar.templates=e.flat(),this}addGrammarTemplates(...e){return this.config.grammar.templates.push(...e.flat()),this}setGrammarNouns(...e){return this.config.grammar.nouns=e.flat(),this}addGrammarNouns(...e){return this.config.grammar.nouns.push(...e.flat()),this}setGrammarVerbs(...e){return this.config.grammar.verbs=e.flat(),this}addGrammarVerbs(...e){return this.config.grammar.verbs.push(...e.flat()),this}setGrammarAdjectives(...e){return this.config.grammar.adjectives=e.flat(),this}addGrammarAdjectives(...e){return this.config.grammar.adjectives.push(...e.flat()),this}removeGrammarTemplates(...e){const n=new Set(e.flat());return this.config.grammar.templates=this.config.grammar.templates.filter(e=>!n.has(e)),this}removeGrammarNouns(...e){const n=new Set(e.flat());return this.config.grammar.nouns=this.config.grammar.nouns.filter(e=>!n.has(e)),this}removeGrammarVerbs(...e){const n=new Set(e.flat());return this.config.grammar.verbs=this.config.grammar.verbs.filter(e=>!n.has(e)),this}removeGrammarAdjectives(...e){const n=new Set(e.flat());return this.config.grammar.adjectives=this.config.grammar.adjectives.filter(e=>!n.has(e)),this}setWords(...e){return this.config.wordSet=e.flat(),this}addWords(...e){return this.config.wordSet.push(...e.flat()),this}removeWords(...e){const n=new Set(e.flat());return this.config.wordSet=this.config.wordSet.filter(e=>!n.has(e)),this}setEmojis(...e){return this.config.emojiSet=e.flat(),this}addEmojis(...e){return this.config.emojiSet.push(...e.flat()),this}removeEmojis(...e){const n=new Set(e.flat());return this.config.emojiSet=this.config.emojiSet.filter(e=>!n.has(e)),this}_getRandomItem(e){return e[Math.floor(Math.random()*e.length)]}_generateChunk(){const{wordSet:e,emojiSet:n,includeNumbers:o,includeSymbols:a,useEmojis:t,readable:r,mode:i,emojiPlacement:s}=this.config;if("natural"===i)return this._generateNaturalSentence();const d=[];return(r||"readable"===i||"mixed"===i)&&d.push(this._getRandomItem(e)),"chaotic"!==i&&"mixed"!==i||d.push(Math.random().toString(36).slice(2)),o&&d.push(Math.floor(99999*Math.random()).toString()),a&&d.push(this._getRandomItem(this.symbols)),"inline"===s&&t&&n.length&&d.push(this._getRandomItem(n)),this._getRandomItem(d)}_generateNaturalSentence(){const{templates:e,nouns:n,verbs:o,adjectives:a}=this.config.grammar;return this._getRandomItem(e).replace(/{noun}/g,()=>this._getRandomItem(n)).replace(/{verb}/g,()=>this._getRandomItem(o)).replace(/{adj}/g,()=>this._getRandomItem(a))}_generateLine(e,n){const{allowWeirdSpacing:o,repeatWords:a,readable:t,emojiSet:r,useEmojis:i,emojiPlacement:s,line:d}=this.config,u=[];for(n??=new Set;u.join(" ").length<e;){let e=this._generateChunk();!a&&n.has(e)||(n.add(e),o&&(Math.random()<.1&&(e="\n"+e),Math.random()<.1&&(e=" "+e),Math.random()<.05&&(e=e.toUpperCase())),u.push(e))}let h=u.join(t?" ":"");return"end"===s&&i&&r.length&&Math.random()<(d?.emojiChance||0)&&(h+=" "+this._getRandomItem(r)),h}_generateParagraphLines(e){const{line:n}=this.config,o=[],a=new Set;let t=0;for(;t<e;){const r=Math.floor(Math.random()*(n.maxLength-n.minLength+1)+n.minLength),i=Math.min(r,e-t);o.push(this._generateLine(i,a)),t+=i}return o}generate(){const{minLength:e,maxLength:n,paragraphs:o}=this.config,a=Math.floor(Math.random()*(n-e+1))+e;if(o&&"object"==typeof o){const e=Math.floor(Math.random()*(o.max-o.min+1))+o.min,n=Math.floor(a/e),t=[];for(let o=0;o<e;o++){const e=this._generateParagraphLines(n);t.push(e.join("\n"))}return t.join("\n\n")}return this._generateParagraphLines(a).join("\n")}};window.UltraRandomMsgGen=n.UltraRandomMsgGen})();