@volverjs/ui-vue 0.0.10-beta.76 → 0.0.10-beta.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/icons.cjs +1 -1
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAction/VvAction.umd.js +1 -1
- package/dist/components/VvAlert/VvAlert.umd.js +1 -1
- package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
- package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
- package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvInputFile/VvInputFile.es.js +15 -6784
- package/dist/components/VvInputFile/VvInputFile.umd.js +1 -7
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvNav/VvNav.umd.js +1 -1
- package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
- package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvTab/VvTab.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/index.es.js +114 -6883
- package/dist/components/index.umd.js +1 -7
- package/dist/composables/index.es.js +1 -1777
- package/dist/composables/index.umd.js +1 -7
- package/dist/directives/index.es.js +1 -1773
- package/dist/directives/index.umd.js +1 -7
- package/dist/directives/v-contextmenu.es.js +1 -1773
- package/dist/directives/v-contextmenu.umd.js +1 -7
- package/dist/directives/v-tooltip.umd.js +1 -1
- package/dist/icons.es.js +3 -3
- package/dist/icons.umd.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue"),require("comlink")):"function"==typeof define&&define.amd?define(["exports","vue","comlink"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).composables={},t.Vue,t.Comlink)}(this,function(t,e,n){"use strict";const r="default",i="information",a=new Map([["success","check-circle"],["info",i],["warning","warning"],["danger","error"]]),o=e.reactive(new Map([[r,new Map]]));function A(t){const n=e.ref(0),r=e.ref(0),i=e.ref();let a=0,o=0,A=0,s=0;const u=t=>{const e=t.target;a=e.scrollLeft-s,o=e.scrollTop-A,r.value=r.value-o,n.value=n.value-a,s=e.scrollLeft,A=e.scrollTop},h=()=>({width:0,height:0,x:n.value,y:r.value,top:r.value,left:n.value,right:n.value,bottom:r.value});return e.getCurrentInstance()&&(e.onMounted(()=>{t.value&&(t.value.init({getBoundingClientRect:h}),i.value=function(t){if(!t)return;let e=t.parentElement;for(;e;){const{overflow:t}=window.getComputedStyle(e);if(t.split(" ").every(t=>"auto"===t||"scroll"===t))return e;e=e.parentElement}return document.documentElement}(t.value.$el),i.value&&i.value.addEventListener("scroll",u))}),e.onUnmounted(()=>{i.value&&i.value.removeEventListener("scroll",u)})),{x:n,y:r,getBoundingClientRect:h,onScroll:u}}function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var h,c={exports:{}};
|
|
2
|
-
/*!
|
|
3
|
-
|
|
4
|
-
pica
|
|
5
|
-
https://github.com/nodeca/pica
|
|
6
|
-
|
|
7
|
-
*/var l=(h||(h=1,c.exports=function(){function t(e,n,r){function i(o,A){if(!n[o]){if(!e[o]){if(!A&&u)return u(o);if(a)return a(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var h=n[o]={exports:{}};e[o][0].call(h.exports,function(t){return i(e[o][1][t]||t)},h,h.exports,t,e,n,r)}return n[o].exports}for(var a=u,o=0;o<r.length;o++)i(r[o]);return i}return t}()({1:[function(t,e,n){var r=t("multimath"),i=t("./mm_unsharp_mask"),a=t("./mm_resize");function o(t){var e=t||[],n={js:e.indexOf("js")>=0,wasm:e.indexOf("wasm")>=0};r.call(this,n),this.features={js:n.js,wasm:n.wasm&&this.has_wasm()},this.use(i),this.use(a)}o.prototype=Object.create(r.prototype),o.prototype.constructor=o,o.prototype.resizeAndUnsharp=function(t,e){var n=this.resize(t,e);return t.unsharpAmount&&this.unsharp_mask(n,t.toWidth,t.toHeight,t.unsharpAmount,t.unsharpRadius,t.unsharpThreshold),n},e.exports=o},{"./mm_resize":4,"./mm_unsharp_mask":9,multimath:19}],2:[function(t,e,n){function r(t){return t<0?0:t>255?255:t}function i(t){return t>=0?t:0}function a(t,e,n,r,a,o){var A,s,u,h,c,l,f,g,d,m,I,p=0,B=0;for(d=0;d<r;d++){for(c=0,m=0;m<a;m++){for(l=o[c++],f=o[c++],g=p+4*l|0,A=s=u=h=0;f>0;f--)h=h+(I=o[c++])*t[g+3]|0,u=u+I*t[g+2]|0,s=s+I*t[g+1]|0,A=A+I*t[g]|0,g=g+4|0;e[B+3]=i(h>>7),e[B+2]=i(u>>7),e[B+1]=i(s>>7),e[B]=i(A>>7),B=B+4*r|0}B=4*(d+1)|0,p=(d+1)*n*4|0}}function o(t,e,n,i,a,o){var A,s,u,h,c,l,f,g,d,m,I,p=0,B=0;for(d=0;d<i;d++){for(c=0,m=0;m<a;m++){for(l=o[c++],f=o[c++],g=p+4*l|0,A=s=u=h=0;f>0;f--)h=h+(I=o[c++])*t[g+3]|0,u=u+I*t[g+2]|0,s=s+I*t[g+1]|0,A=A+I*t[g]|0,g=g+4|0;A>>=7,s>>=7,u>>=7,h>>=7,e[B+3]=r(h+8192>>14),e[B+2]=r(u+8192>>14),e[B+1]=r(s+8192>>14),e[B]=r(A+8192>>14),B=B+4*i|0}B=4*(d+1)|0,p=(d+1)*n*4|0}}function A(t,e,n,r,a,o){var A,s,u,h,c,l,f,g,d,m,I,p,B=0,w=0;for(m=0;m<r;m++){for(l=0,I=0;I<a;I++){for(f=o[l++],g=o[l++],d=B+4*f|0,A=s=u=h=0;g>0;g--)h=h+(p=o[l++])*(c=t[d+3])|0,u=u+p*t[d+2]*c|0,s=s+p*t[d+1]*c|0,A=A+p*t[d]*c|0,d=d+4|0;u=u/255|0,s=s/255|0,A=A/255|0,e[w+3]=i(h>>7),e[w+2]=i(u>>7),e[w+1]=i(s>>7),e[w]=i(A>>7),w=w+4*r|0}w=4*(m+1)|0,B=(m+1)*n*4|0}}function s(t,e,n,i,a,o){var A,s,u,h,c,l,f,g,d,m,I,p=0,B=0;for(d=0;d<i;d++){for(c=0,m=0;m<a;m++){for(l=o[c++],f=o[c++],g=p+4*l|0,A=s=u=h=0;f>0;f--)h=h+(I=o[c++])*t[g+3]|0,u=u+I*t[g+2]|0,s=s+I*t[g+1]|0,A=A+I*t[g]|0,g=g+4|0;A>>=7,s>>=7,u>>=7,(h=r(8192+(h>>=7)>>14))>0&&(A=255*A/h|0,s=255*s/h|0,u=255*u/h|0),e[B+3]=h,e[B+2]=r(u+8192>>14),e[B+1]=r(s+8192>>14),e[B]=r(A+8192>>14),B=B+4*i|0}B=4*(d+1)|0,p=(d+1)*n*4|0}}e.exports={convolveHor:a,convolveVert:o,convolveHorWithPre:A,convolveVertWithPre:s}},{}],3:[function(t,e,n){e.exports="AGFzbQEAAAAADAZkeWxpbmsAAAAAAAEYA2AGf39/f39/AGAAAGAIf39/f39/f38AAg8BA2VudgZtZW1vcnkCAAADBwYBAAAAAAIGBgF/AEEACweUAQgRX193YXNtX2NhbGxfY3RvcnMAAAtjb252b2x2ZUhvcgABDGNvbnZvbHZlVmVydAACEmNvbnZvbHZlSG9yV2l0aFByZQADE2NvbnZvbHZlVmVydFdpdGhQcmUABApjb252b2x2ZUhWAAUMX19kc29faGFuZGxlAwAYX193YXNtX2FwcGx5X2RhdGFfcmVsb2NzAAAKyA4GAwABC4wDARB/AkAgA0UNACAERQ0AIANBAnQhFQNAQQAhE0EAIQsDQCALQQJqIQcCfyALQQF0IAVqIgYuAQIiC0UEQEEAIQhBACEGQQAhCUEAIQogBwwBCyASIAYuAQBqIQhBACEJQQAhCiALIRRBACEOIAchBkEAIQ8DQCAFIAZBAXRqLgEAIhAgACAIQQJ0aigCACIRQRh2bCAPaiEPIBFB/wFxIBBsIAlqIQkgEUEQdkH/AXEgEGwgDmohDiARQQh2Qf8BcSAQbCAKaiEKIAhBAWohCCAGQQFqIQYgFEEBayIUDQALIAlBB3UhCCAKQQd1IQYgDkEHdSEJIA9BB3UhCiAHIAtqCyELIAEgDEEBdCIHaiAIQQAgCEEAShs7AQAgASAHQQJyaiAGQQAgBkEAShs7AQAgASAHQQRyaiAJQQAgCUEAShs7AQAgASAHQQZyaiAKQQAgCkEAShs7AQAgDCAVaiEMIBNBAWoiEyAERw0ACyANQQFqIg0gAmwhEiANQQJ0IQwgAyANRw0ACwsL2gMBD38CQCADRQ0AIARFDQAgAkECdCEUA0AgCyEMQQAhE0EAIQIDQCACQQJqIQYCfyACQQF0IAVqIgcuAQIiAkUEQEEAIQhBACEHQQAhCkEAIQkgBgwBCyAHLgEAQQJ0IBJqIQhBACEJIAIhCkEAIQ0gBiEHQQAhDkEAIQ8DQCAFIAdBAXRqLgEAIhAgACAIQQF0IhFqLwEAbCAJaiEJIAAgEUEGcmovAQAgEGwgDmohDiAAIBFBBHJqLwEAIBBsIA9qIQ8gACARQQJyai8BACAQbCANaiENIAhBBGohCCAHQQFqIQcgCkEBayIKDQALIAlBB3UhCCANQQd1IQcgDkEHdSEKIA9BB3UhCSACIAZqCyECIAEgDEECdGogB0GAQGtBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobQQh0QYD+A3EgCUGAQGtBDnUiBkH/ASAGQf8BSBsiBkEAIAZBAEobQRB0QYCA/AdxIApBgEBrQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG0EYdHJyIAhBgEBrQQ51IgZB/wEgBkH/AUgbIgZBACAGQQBKG3I2AgAgAyAMaiEMIBNBAWoiEyAERw0ACyAUIAtBAWoiC2whEiADIAtHDQALCwuSAwEQfwJAIANFDQAgBEUNACADQQJ0IRUDQEEAIRNBACEGA0AgBkECaiEIAn8gBkEBdCAFaiIGLgECIgdFBEBBACEJQQAhDEEAIQ1BACEOIAgMAQsgEiAGLgEAaiEJQQAhDkEAIQ1BACEMIAchFEEAIQ8gCCEGA0AgBSAGQQF0ai4BACAAIAlBAnRqKAIAIhBBGHZsIhEgD2ohDyARIBBBEHZB/wFxbCAMaiEMIBEgEEEIdkH/AXFsIA1qIQ0gESAQQf8BcWwgDmohDiAJQQFqIQkgBkEBaiEGIBRBAWsiFA0ACyAPQQd1IQkgByAIagshBiABIApBAXQiCGogDkH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEECcmogDUH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEEEcmogDEH/AW1BB3UiB0EAIAdBAEobOwEAIAEgCEEGcmogCUEAIAlBAEobOwEAIAogFWohCiATQQFqIhMgBEcNAAsgC0EBaiILIAJsIRIgC0ECdCEKIAMgC0cNAAsLC4IEAQ9/AkAgA0UNACAERQ0AIAJBAnQhFANAIAshDEEAIRJBACEHA0AgB0ECaiEKAn8gB0EBdCAFaiICLgECIhNFBEBBACEIQQAhCUEAIQYgCiEHQQAMAQsgAi4BAEECdCARaiEJQQAhByATIQJBACENIAohBkEAIQ5BACEPA0AgBSAGQQF0ai4BACIIIAAgCUEBdCIQai8BAGwgB2ohByAAIBBBBnJqLwEAIAhsIA5qIQ4gACAQQQRyai8BACAIbCAPaiEPIAAgEEECcmovAQAgCGwgDWohDSAJQQRqIQkgBkEBaiEGIAJBAWsiAg0ACyAHQQd1IQggDUEHdSEJIA9BB3UhBiAKIBNqIQcgDkEHdQtBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKGyIKQf8BcQRAIAlB/wFsIAJtIQkgCEH/AWwgAm0hCCAGQf8BbCACbSEGCyABIAxBAnRqIAlBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKG0EIdEGA/gNxIAZBgEBrQQ51IgJB/wEgAkH/AUgbIgJBACACQQBKG0EQdEGAgPwHcSAKQRh0ciAIQYBAa0EOdSICQf8BIAJB/wFIGyICQQAgAkEAShtycjYCACADIAxqIQwgEkEBaiISIARHDQALIBQgC0EBaiILbCERIAMgC0cNAAsLC0AAIAcEQEEAIAIgAyAEIAUgABADIAJBACAEIAUgBiABEAQPC0EAIAIgAyAEIAUgABABIAJBACAEIAUgBiABEAIL"},{}],4:[function(t,e,n){e.exports={name:"resize",fn:t("./resize"),wasm_fn:t("./resize_wasm"),wasm_src:t("./convolve_wasm_base64")}},{"./convolve_wasm_base64":3,"./resize":5,"./resize_wasm":8}],5:[function(t,e,n){var r=t("./resize_filter_gen"),i=t("./convolve"),a=i.convolveHor,o=i.convolveVert,A=i.convolveHorWithPre,s=i.convolveVertWithPre;function u(t,e,n){for(var r=3,i=e*n*4|0;r<i;){if(255!==t[r])return!0;r=r+4|0}return!1}function h(t,e,n){for(var r=3,i=e*n*4|0;r<i;)t[r]=255,r=r+4|0}e.exports=function(t){var e=t.src,n=t.width,i=t.height,c=t.toWidth,l=t.toHeight,f=t.scaleX||t.toWidth/t.width,g=t.scaleY||t.toHeight/t.height,d=t.offsetX||0,m=t.offsetY||0,I=t.dest||new Uint8Array(c*l*4),p=void 0===t.filter?"mks2013":t.filter,B=r(p,n,c,f,d),w=r(p,i,l,g,m),E=new Uint16Array(c*i*4);return u(e,n,i)?(A(e,E,n,i,c,B),s(E,I,i,c,l,w)):(a(e,E,n,i,c,B),o(E,I,i,c,l,w),h(I,c,l)),I}},{"./convolve":2,"./resize_filter_gen":6}],6:[function(t,e,n){var r=t("./resize_filter_info"),i=14;function a(t){return Math.round(t*((1<<i)-1))}e.exports=function(t,e,n,i,o){var A,s,u,h,c,l,f,g,d,m,I,p,B,w,E,Q,C,v=r.filter[t].fn,b=1/i,y=Math.min(1,i),_=r.filter[t].win/y,M=Math.floor(2*(_+1)),x=new Int16Array((M+2)*n),D=0,k=!x.subarray||!x.set;for(A=0;A<n;A++){for(s=(A+.5)*b+o,u=Math.max(0,Math.floor(s-_)),c=(h=Math.min(e-1,Math.ceil(s+_)))-u+1,l=new Float32Array(c),f=new Int16Array(c),g=0,d=u,m=0;d<=h;d++,m++)g+=I=v((d+.5-s)*y),l[m]=I;for(p=0,m=0;m<l.length;m++)p+=B=l[m]/g,f[m]=a(B);for(f[n>>1]+=a(1-p),w=0;w<f.length&&0===f[w];)w++;if(w<f.length){for(E=f.length-1;E>0&&0===f[E];)E--;if(Q=u+w,C=E-w+1,x[D++]=Q,x[D++]=C,k)for(m=w;m<=E;m++)x[D++]=f[m];else x.set(f.subarray(w,E+1),D),D+=C}else x[D++]=0,x[D++]=0}return x}},{"./resize_filter_info":7}],7:[function(t,e,n){var r={box:{win:.5,fn:function(t){return t<0&&(t=-t),t<.5?1:0}},hamming:{win:1,fn:function(t){if(t<0&&(t=-t),t>=1)return 0;if(t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*(.54+.46*Math.cos(e/1))}},lanczos2:{win:2,fn:function(t){if(t<0&&(t=-t),t>=2)return 0;if(t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/2)/(e/2)}},lanczos3:{win:3,fn:function(t){if(t<0&&(t=-t),t>=3)return 0;if(t<1.1920929e-7)return 1;var e=t*Math.PI;return Math.sin(e)/e*Math.sin(e/3)/(e/3)}},mks2013:{win:2.5,fn:function(t){return t<0&&(t=-t),t>=2.5?0:t>=1.5?-.125*(t-2.5)*(t-2.5):t>=.5?.25*(4*t*t-11*t+7):1.0625-1.75*t*t}}};e.exports={filter:r,f2q:{box:0,hamming:1,lanczos2:2,lanczos3:3},q2f:["box","hamming","lanczos2","lanczos3"]}},{}],8:[function(t,e,n){var r=t("./resize_filter_gen");function i(t,e,n){for(var r=3,i=e*n*4|0;r<i;){if(255!==t[r])return!0;r=r+4|0}return!1}function a(t,e,n){for(var r=3,i=e*n*4|0;r<i;)t[r]=255,r=r+4|0}function o(t){return new Uint8Array(t.buffer,0,t.byteLength)}var A=!0;try{A=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0]}catch(u){}function s(t,e,n){if(A)e.set(o(t),n);else for(var r=n,i=0;i<t.length;i++){var a=t[i];e[r++]=255&a,e[r++]=a>>8&255}}e.exports=function(t){var e=t.src,n=t.width,o=t.height,A=t.toWidth,u=t.toHeight,h=t.scaleX||t.toWidth/t.width,c=t.scaleY||t.toHeight/t.height,l=t.offsetX||0,f=t.offsetY||0,g=t.dest||new Uint8Array(A*u*4),d=void 0===t.filter?"mks2013":t.filter,m=r(d,n,A,h,l),I=r(d,o,u,c,f),p=0,B=Math.max(e.byteLength,g.byteLength),w=this.__align(p+B),E=o*A*4*2,Q=this.__align(w+E),C=this.__align(Q+m.byteLength),v=C+I.byteLength,b=this.__instance("resize",v),y=new Uint8Array(this.__memory.buffer),_=new Uint32Array(this.__memory.buffer),M=new Uint32Array(e.buffer);_.set(M),s(m,y,Q),s(I,y,C);var x=b.exports.convolveHV||b.exports._convolveHV;return i(e,n,o)?x(Q,C,w,n,o,A,u,1):(x(Q,C,w,n,o,A,u,0),a(g,A,u)),new Uint32Array(g.buffer).set(new Uint32Array(this.__memory.buffer,0,u*A)),g}},{"./resize_filter_gen":6}],9:[function(t,e,n){e.exports={name:"unsharp_mask",fn:t("./unsharp_mask"),wasm_fn:t("./unsharp_mask_wasm"),wasm_src:t("./unsharp_mask_wasm_base64")}},{"./unsharp_mask":10,"./unsharp_mask_wasm":11,"./unsharp_mask_wasm_base64":12}],10:[function(t,e,n){var r=t("glur/mono16");function i(t,e,n){for(var r,i,a,o,A=e*n,s=new Uint16Array(A),u=0;u<A;u++)r=t[4*u],i=t[4*u+1],a=t[4*u+2],o=r>=i&&r>=a?r:i>=a&&i>=r?i:a,s[u]=o<<8;return s}e.exports=function(t,e,n,a,o,A){var s,u,h,c,l;if(!(0===a||o<.5)){o>2&&(o=2);var f=i(t,e,n),g=new Uint16Array(f);r(g,e,n,o);for(var d=a/100*4096+.5|0,m=A<<8,I=e*n,p=0;p<I;p++)c=(s=f[p])-g[p],Math.abs(c)>=m&&(h=((u=(u=(u=s+(d*c+2048>>12))>65280?65280:u)<0?0:u)<<12)/(s=0!==s?s:1)|0,t[l=4*p]=t[l]*h+2048>>12,t[l+1]=t[l+1]*h+2048>>12,t[l+2]=t[l+2]*h+2048>>12)}}},{"glur/mono16":18}],11:[function(t,e,n){e.exports=function(t,e,n,r,i,a){if(!(0===r||i<.5)){i>2&&(i=2);var o=e*n,A=4*o,s=2*o,u=2*o,h=4*Math.max(e,n),c=32,l=0,f=A,g=f+s,d=g+u,m=d+u,I=m+h,p=this.__instance("unsharp_mask",A+s+2*u+h+c,{exp:Math.exp}),B=new Uint32Array(t.buffer);new Uint32Array(this.__memory.buffer).set(B);var w=p.exports.hsv_v16||p.exports._hsv_v16;w(l,f,e,n),(w=p.exports.blurMono16||p.exports._blurMono16)(f,g,d,m,I,e,n,i),(w=p.exports.unsharp||p.exports._unsharp)(l,l,f,g,e,n,r,a),B.set(new Uint32Array(this.__memory.buffer,0,o))}}},{}],12:[function(t,e,n){e.exports="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"},{}],13:[function(t,e,n){var r=100;function i(t,e){this.create=t,this.available=[],this.acquired={},this.lastId=1,this.timeoutId=0,this.idle=e||2e3}i.prototype.acquire=function(){var t,e=this;return 0!==this.available.length?t=this.available.pop():((t=this.create()).id=this.lastId++,t.release=function(){return e.release(t)}),this.acquired[t.id]=t,t},i.prototype.release=function(t){var e=this;delete this.acquired[t.id],t.lastUsed=Date.now(),this.available.push(t),0===this.timeoutId&&(this.timeoutId=setTimeout(function(){return e.gc()},r))},i.prototype.gc=function(){var t=this,e=Date.now();this.available=this.available.filter(function(n){return!(e-n.lastUsed>t.idle&&(n.destroy(),1))}),0!==this.available.length?this.timeoutId=setTimeout(function(){return t.gc()},r):this.timeoutId=0},e.exports=i},{}],14:[function(t,e,n){var r=2;e.exports=function(t,e,n,i,a,o){var A=n/t,s=i/e,u=(2*o+r+1)/a;if(u>.5)return[[n,i]];var h=Math.ceil(Math.log(Math.min(A,s))/Math.log(u));if(h<=1)return[[n,i]];for(var c=[],l=0;l<h;l++){var f=Math.round(Math.pow(Math.pow(t,h-l-1)*Math.pow(n,l+1),1/h)),g=Math.round(Math.pow(Math.pow(e,h-l-1)*Math.pow(i,l+1),1/h));c.push([f,g])}return c}},{}],15:[function(t,e,n){var r=1e-5;function i(t){var e=Math.round(t);return Math.abs(t-e)<r?e:Math.floor(t)}function a(t){var e=Math.round(t);return Math.abs(t-e)<r?e:Math.ceil(t)}e.exports=function(t){var e,n,r,o,A,s,u=t.toWidth/t.width,h=t.toHeight/t.height,c=i(t.srcTileSize*u)-2*t.destTileBorder,l=i(t.srcTileSize*h)-2*t.destTileBorder;if(c<1||l<1)throw new Error("Internal error in pica: target tile width/height is too small.");var f,g=[];for(o=0;o<t.toHeight;o+=l)for(r=0;r<t.toWidth;r+=c)(e=r-t.destTileBorder)<0&&(e=0),e+(A=r+c+t.destTileBorder-e)>=t.toWidth&&(A=t.toWidth-e),(n=o-t.destTileBorder)<0&&(n=0),n+(s=o+l+t.destTileBorder-n)>=t.toHeight&&(s=t.toHeight-n),f={toX:e,toY:n,toWidth:A,toHeight:s,toInnerX:r,toInnerY:o,toInnerWidth:c,toInnerHeight:l,offsetX:e/u-i(e/u),offsetY:n/h-i(n/h),scaleX:u,scaleY:h,x:i(e/u),y:i(n/h),width:a(A/u),height:a(s/h)},g.push(f);return g}},{}],16:[function(t,e,n){function r(t){return Object.prototype.toString.call(t)}e.exports.isCanvas=function(t){var e=r(t);return"[object HTMLCanvasElement]"===e||"[object OffscreenCanvas]"===e||"[object Canvas]"===e},e.exports.isImage=function(t){return"[object HTMLImageElement]"===r(t)},e.exports.isImageBitmap=function(t){return"[object ImageBitmap]"===r(t)},e.exports.limiter=function(t){var e=0,n=[];function r(){e<t&&n.length&&(e++,n.shift()())}return function(t){return new Promise(function(i,a){n.push(function(){t().then(function(t){i(t),e--,r()},function(t){a(t),e--,r()})}),r()})}},e.exports.cib_quality_name=function(t){switch(t){case 0:return"pixelated";case 1:return"low";case 2:return"medium"}return"high"},e.exports.cib_support=function(t){return Promise.resolve().then(function(){if("undefined"==typeof createImageBitmap)return!1;var e=t(100,100);return createImageBitmap(e,0,0,100,100,{resizeWidth:10,resizeHeight:10,resizeQuality:"high"}).then(function(t){var n=10===t.width;return t.close(),e=null,n})}).catch(function(){return!1})},e.exports.worker_offscreen_canvas_support=function(){return new Promise(function(t,e){if("undefined"!=typeof OffscreenCanvas){var n=btoa("(".concat(i.toString(),")(self);")),r=new Worker("data:text/javascript;base64,".concat(n));r.onmessage=function(e){return t(e.data)},r.onerror=e}else t(!1);function i(t){"undefined"!=typeof createImageBitmap?Promise.resolve().then(function(){var t=new OffscreenCanvas(10,10);return t.getContext("2d").rect(0,0,1,1),createImageBitmap(t,0,0,1,1)}).then(function(){return t.postMessage(!0)},function(){return t.postMessage(!1)}):t.postMessage(!1)}}).then(function(t){return t},function(){return!1})},e.exports.can_use_canvas=function(t){var e=!1;try{var n=t(2,1).getContext("2d"),r=n.createImageData(2,1);r.data[0]=12,r.data[1]=23,r.data[2]=34,r.data[3]=255,r.data[4]=45,r.data[5]=56,r.data[6]=67,r.data[7]=255,n.putImageData(r,0,0),r=null,12===(r=n.getImageData(0,0,2,1)).data[0]&&23===r.data[1]&&34===r.data[2]&&255===r.data[3]&&45===r.data[4]&&56===r.data[5]&&67===r.data[6]&&255===r.data[7]&&(e=!0)}catch(i){}return e},e.exports.cib_can_use_region=function(){return new Promise(function(t){if("undefined"!=typeof Image&&"undefined"!=typeof createImageBitmap){var e=new Image;e.src="data:image/jpeg;base64,/9j/4QBiRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAYAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAAITAAMAAAABAAEAAAAAAAAAAABIAAAAAQAAAEgAAAAB/9sAQwAEAwMEAwMEBAMEBQQEBQYKBwYGBgYNCQoICg8NEBAPDQ8OERMYFBESFxIODxUcFRcZGRsbGxAUHR8dGh8YGhsa/9sAQwEEBQUGBQYMBwcMGhEPERoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoa/8IAEQgAAQACAwERAAIRAQMRAf/EABQAAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAAF/P//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAQUCf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Bf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Bf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEABj8Cf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8hf//aAAwDAQACAAMAAAAQH//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Qf//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Qf//EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAT8Qf//Z",e.onload=function(){createImageBitmap(e,0,0,e.width,e.height).then(function(n){n.width===e.width&&n.height===e.height?t(!0):t(!1)},function(){return t(!1)})},e.onerror=function(){return t(!1)}}else t(!1)})}},{}],17:[function(t,e,n){e.exports=function(){var e,n=t("./mathlib");onmessage=function(t){var r=t.data.opts;if(!r.src&&r.srcBitmap){var i=new OffscreenCanvas(r.width,r.height),a=i.getContext("2d");a.drawImage(r.srcBitmap,0,0),r.src=a.getImageData(0,0,r.width,r.height).data,i.width=i.height=0,i=null,r.srcBitmap.close(),r.srcBitmap=null}e||(e=new n(t.data.features));var o=e.resizeAndUnsharp(r);postMessage({data:o},[o.buffer])}}},{"./mathlib":1}],18:[function(t,e,n){var r,i,a,o,A,s;function u(t){t<.5&&(t=.5);var e=Math.exp(.527076)/t,n=Math.exp(-e),u=Math.exp(-2*e),h=(1-n)*(1-n)/(1+2*e*n-u);return r=h,i=h*(e-1)*n,a=h*(e+1)*n,o=-h*u,A=2*n,s=-u,new Float32Array([r,i,a,o,A,s,(r+i)/(1-A-s),(a+o)/(1-A-s)])}function h(t,e,n,r,i,a){var o,A,s,u,h,c,l,f,g,d,m,I,p,B;for(g=0;g<a;g++){for(l=g,f=0,u=h=(o=t[c=g*i])*r[6],m=r[0],I=r[1],p=r[4],B=r[5],d=0;d<i;d++)s=(A=t[c])*m+o*I+u*p+h*B,h=u,u=s,o=A,n[f]=u,f++,c++;for(f--,l+=a*(i-1),u=h=(o=t[--c])*r[7],A=o,m=r[2],I=r[3],d=i-1;d>=0;d--)s=A*m+o*I+u*p+h*B,h=u,u=s,o=A,A=t[c],e[l]=n[f]+u,c--,f--,l-=a}}function c(t,e,n,r){if(r){var i=new Uint16Array(t.length),a=new Float32Array(Math.max(e,n)),o=u(r);h(t,i,a,o,e,n),h(i,t,a,o,n,e)}}e.exports=c},{}],19:[function(t,e,n){var r=t("object-assign"),i=t("./lib/base64decode"),a=t("./lib/wa_detect"),o={js:!0,wasm:!0};function A(t){if(!(this instanceof A))return new A(t);var e=r({},o,t||{});if(this.options=e,this.__cache={},this.__init_promise=null,this.__modules=e.modules||{},this.__memory=null,this.__wasm={},this.__isLE=1===new Uint32Array(new Uint8Array([1,0,0,0]).buffer)[0],!this.options.js&&!this.options.wasm)throw new Error('mathlib: at least "js" or "wasm" should be enabled')}A.prototype.has_wasm=a,A.prototype.use=function(t){return this.__modules[t.name]=t,this.options.wasm&&this.has_wasm()&&t.wasm_fn?this[t.name]=t.wasm_fn:this[t.name]=t.fn,this},A.prototype.init=function(){if(this.__init_promise)return this.__init_promise;if(!this.options.js&&this.options.wasm&&!this.has_wasm())return Promise.reject(new Error('mathlib: only "wasm" was enabled, but it\'s not supported'));var t=this;return this.__init_promise=Promise.all(Object.keys(t.__modules).map(function(e){var n=t.__modules[e];return t.options.wasm&&t.has_wasm()&&n.wasm_fn?t.__wasm[e]?null:WebAssembly.compile(t.__base64decode(n.wasm_src)).then(function(n){t.__wasm[e]=n}):null})).then(function(){return t}),this.__init_promise},A.prototype.__base64decode=i,A.prototype.__reallocate=function(t){if(!this.__memory)return this.__memory=new WebAssembly.Memory({initial:Math.ceil(t/65536)}),this.__memory;var e=this.__memory.buffer.byteLength;return e<t&&this.__memory.grow(Math.ceil((t-e)/65536)),this.__memory},A.prototype.__instance=function(t,e,n){if(e&&this.__reallocate(e),!this.__wasm[t]){var i=this.__modules[t];this.__wasm[t]=new WebAssembly.Module(this.__base64decode(i.wasm_src))}if(!this.__cache[t]){var a={memoryBase:0,memory:this.__memory,tableBase:0,table:new WebAssembly.Table({initial:0,element:"anyfunc"})};this.__cache[t]=new WebAssembly.Instance(this.__wasm[t],{env:r(a,n||{})})}return this.__cache[t]},A.prototype.__align=function(t,e){var n=t%(e=e||8);return t+(n?e-n:0)},e.exports=A},{"./lib/base64decode":20,"./lib/wa_detect":21,"object-assign":22}],20:[function(t,e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports=function(t){for(var e=t.replace(/[\r\n=]/g,""),n=e.length,i=new Uint8Array(3*n>>2),a=0,o=0,A=0;A<n;A++)A%4==0&&A&&(i[o++]=a>>16&255,i[o++]=a>>8&255,i[o++]=255&a),a=a<<6|r.indexOf(e.charAt(A));var s=n%4*6;return 0===s?(i[o++]=a>>16&255,i[o++]=a>>8&255,i[o++]=255&a):18===s?(i[o++]=a>>10&255,i[o++]=a>>2&255):12===s&&(i[o++]=a>>4&255),i}},{}],21:[function(t,e,n){var r;e.exports=function(){if(void 0!==r)return r;if(r=!1,"undefined"==typeof WebAssembly)return r;try{var t=new Uint8Array([0,97,115,109,1,0,0,0,1,6,1,96,1,127,1,127,3,2,1,0,5,3,1,0,1,7,8,1,4,116,101,115,116,0,0,10,16,1,14,0,32,0,65,1,54,2,0,32,0,40,2,0,11]),e=new WebAssembly.Module(t);return 0!==new WebAssembly.Instance(e,{}).exports.test(4)&&(r=!0),r}catch(n){}return r}},{}],22:[function(t,e,n){var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function A(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}e.exports=A()?Object.assign:function(t,e){for(var n,A,s=o(t),u=1;u<arguments.length;u++){for(var h in n=Object(arguments[u]))i.call(n,h)&&(s[h]=n[h]);if(r){A=r(n);for(var c=0;c<A.length;c++)a.call(n,A[c])&&(s[A[c]]=n[A[c]])}}return s}},{}],23:[function(t,e,n){var r=arguments[3],i=arguments[4],a=arguments[5],o=JSON.stringify;e.exports=function(t,e){for(var n,A=Object.keys(a),s=0,u=A.length;s<u;s++){var h=A[s],c=a[h].exports;if(c===t||c&&c.default===t){n=h;break}}if(!n){n=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var l={};for(s=0,u=A.length;s<u;s++)l[h=A[s]]=h;i[n]=["function(require,module,exports){"+t+"(self); }",l]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),g={};g[n]=n,i[f]=["function(require,module,exports){var f = require("+o(n)+");(f.default ? f.default : f)(self);}",g];var d={};function m(t){for(var e in d[t]=!0,i[t][1]){var n=i[t][1][e];d[n]||m(n)}}m(f);var I="("+r+")({"+Object.keys(d).map(function(t){return o(t)+":["+i[t][0]+","+o(i[t][1])+"]"}).join(",")+"},{},["+o(f)+"])",p=window.URL||window.webkitURL||window.mozURL||window.msURL,B=new Blob([I],{type:"text/javascript"});if(e&&e.bare)return B;var w=p.createObjectURL(B),E=new Worker(w);return E.objectURL=w,E}},{}],"/index.js":[function(t,e,n){function r(t,e){return s(t)||A(t,e)||a(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(t,e){if(t){if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function A(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a=[],o=!0,A=!1;try{for(n=n.call(t);!(o=(r=n.next()).done)&&(a.push(r.value),!e||a.length!==e);o=!0);}catch(s){A=!0,i=s}finally{try{o||null==n.return||n.return()}finally{if(A)throw i}}return a}}function s(t){if(Array.isArray(t))return t}var u=t("object-assign"),h=t("webworkify"),c=t("./lib/mathlib"),l=t("./lib/pool"),f=t("./lib/utils"),g=t("./lib/worker"),d=t("./lib/stepper"),m=t("./lib/tiler"),I=t("./lib/mm_resize/resize_filter_info"),p={},B=!1;try{"undefined"!=typeof navigator&&navigator.userAgent&&(B=navigator.userAgent.indexOf("Safari")>=0)}catch(D){}var w=1;"undefined"!=typeof navigator&&(w=Math.min(navigator.hardwareConcurrency||1,4));var E={tile:1024,concurrency:w,features:["js","wasm","ww"],idle:2e3,createCanvas:function(t,e){var n=document.createElement("canvas");return n.width=t,n.height=e,n}},Q={filter:"mks2013",unsharpAmount:0,unsharpRadius:0,unsharpThreshold:0},C=!1,v=!1,b=!1,y=!1,_=!1;function M(){return{value:h(g),destroy:function(){if(this.value.terminate(),"undefined"!=typeof window){var t=window.URL||window.webkitURL||window.mozURL||window.msURL;t&&t.revokeObjectURL&&this.value.objectURL&&t.revokeObjectURL(this.value.objectURL)}}}}function x(t){if(!(this instanceof x))return new x(t);this.options=u({},E,t||{});var e="lk_".concat(this.options.concurrency);this.__limit=p[e]||f.limiter(this.options.concurrency),p[e]||(p[e]=this.__limit),this.features={js:!1,wasm:!1,cib:!1,ww:!1},this.__workersPool=null,this.__requested_features=[],this.__mathlib=null}x.prototype.init=function(){var e=this;if(this.__initPromise)return this.__initPromise;if("undefined"!=typeof ImageData&&"undefined"!=typeof Uint8ClampedArray)try{new ImageData(new Uint8ClampedArray(400),10,10),C=!0}catch(s){}"undefined"!=typeof ImageBitmap&&(ImageBitmap.prototype&&ImageBitmap.prototype.close?v=!0:this.debug("ImageBitmap does not support .close(), disabled"));var n=this.options.features.slice();if(n.indexOf("all")>=0&&(n=["cib","wasm","js","ww"]),this.__requested_features=n,this.__mathlib=new c(n),n.indexOf("ww")>=0&&"undefined"!=typeof window&&"Worker"in window)try{t("webworkify")(function(){}).terminate(),this.features.ww=!0;var r="wp_".concat(JSON.stringify(this.options));p[r]?this.__workersPool=p[r]:(this.__workersPool=new l(M,this.options.idle),p[r]=this.__workersPool)}catch(s){}var i,a,o=this.__mathlib.init().then(function(t){u(e.features,t.features)});i=v?f.cib_support(this.options.createCanvas).then(function(t){e.features.cib&&n.indexOf("cib")<0?e.debug("createImageBitmap() resize supported, but disabled by config"):n.indexOf("cib")>=0&&(e.features.cib=t)}):Promise.resolve(!1),b=f.can_use_canvas(this.options.createCanvas),a=(a=v&&C&&-1!==n.indexOf("ww")?f.worker_offscreen_canvas_support():Promise.resolve(!1)).then(function(t){y=t});var A=f.cib_can_use_region().then(function(t){_=t});return this.__initPromise=Promise.all([o,i,a,A]).then(function(){return e}),this.__initPromise},x.prototype.__invokeResize=function(t,e){var n=this;return e.__mathCache=e.__mathCache||{},Promise.resolve().then(function(){return n.features.ww?new Promise(function(r,i){var a=n.__workersPool.acquire();e.cancelToken&&e.cancelToken.catch(function(t){return i(t)}),a.value.onmessage=function(t){a.release(),t.data.err?i(t.data.err):r(t.data)};var o=[];t.src&&o.push(t.src.buffer),t.srcBitmap&&o.push(t.srcBitmap),a.value.postMessage({opts:t,features:n.__requested_features,preload:{wasm_nodule:n.__mathlib.__}},o)}):{data:n.__mathlib.resizeAndUnsharp(t,e.__mathCache)}})},x.prototype.__extractTileData=function(t,e,n,r,i){if(this.features.ww&&y&&(f.isCanvas(e)||_))return this.debug("Create tile for OffscreenCanvas"),createImageBitmap(r.srcImageBitmap||e,t.x,t.y,t.width,t.height).then(function(t){return i.srcBitmap=t,i});if(f.isCanvas(e))return r.srcCtx||(r.srcCtx=e.getContext("2d")),this.debug("Get tile pixel data"),i.src=r.srcCtx.getImageData(t.x,t.y,t.width,t.height).data,i;this.debug("Draw tile imageBitmap/image to temporary canvas");var a=this.options.createCanvas(t.width,t.height),o=a.getContext("2d");return o.globalCompositeOperation="copy",o.drawImage(r.srcImageBitmap||e,t.x,t.y,t.width,t.height,0,0,t.width,t.height),this.debug("Get tile pixel data"),i.src=o.getImageData(0,0,t.width,t.height).data,a.width=a.height=0,i},x.prototype.__landTileData=function(t,e,n){var r;if(this.debug("Convert raw rgba tile result to ImageData"),e.bitmap)return n.toCtx.drawImage(e.bitmap,t.toX,t.toY),null;if(C)r=new ImageData(new Uint8ClampedArray(e.data),t.toWidth,t.toHeight);else if((r=n.toCtx.createImageData(t.toWidth,t.toHeight)).data.set)r.data.set(e.data);else for(var i=r.data.length-1;i>=0;i--)r.data[i]=e.data[i];return this.debug("Draw tile"),B?n.toCtx.putImageData(r,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth+1e-5,t.toInnerHeight+1e-5):n.toCtx.putImageData(r,t.toX,t.toY,t.toInnerX-t.toX,t.toInnerY-t.toY,t.toInnerWidth,t.toInnerHeight),null},x.prototype.__tileAndResize=function(t,e,n){var r=this,i={srcCtx:null,srcImageBitmap:null,isImageBitmapReused:!1,toCtx:null},a=function(e){return r.__limit(function(){if(n.canceled)return n.cancelToken;var a={width:e.width,height:e.height,toWidth:e.toWidth,toHeight:e.toHeight,scaleX:e.scaleX,scaleY:e.scaleY,offsetX:e.offsetX,offsetY:e.offsetY,filter:n.filter,unsharpAmount:n.unsharpAmount,unsharpRadius:n.unsharpRadius,unsharpThreshold:n.unsharpThreshold};return r.debug("Invoke resize math"),Promise.resolve(a).then(function(a){return r.__extractTileData(e,t,n,i,a)}).then(function(t){return r.debug("Invoke resize math"),r.__invokeResize(t,n)}).then(function(t){return n.canceled?n.cancelToken:(i.srcImageData=null,r.__landTileData(e,t,i))})})};return Promise.resolve().then(function(){if(i.toCtx=e.getContext("2d"),f.isCanvas(t))return null;if(f.isImageBitmap(t))return i.srcImageBitmap=t,i.isImageBitmapReused=!0,null;if(f.isImage(t))return v?(r.debug("Decode image via createImageBitmap"),createImageBitmap(t).then(function(t){i.srcImageBitmap=t}).catch(function(t){return null})):null;throw new Error('Pica: ".from" should be Image, Canvas or ImageBitmap')}).then(function(){if(n.canceled)return n.cancelToken;r.debug("Calculate tiles");var t=m({width:n.width,height:n.height,srcTileSize:r.options.tile,toWidth:n.toWidth,toHeight:n.toHeight,destTileBorder:n.__destTileBorder}).map(function(t){return a(t)});function o(t){t.srcImageBitmap&&(t.isImageBitmapReused||t.srcImageBitmap.close(),t.srcImageBitmap=null)}return r.debug("Process tiles"),Promise.all(t).then(function(){return r.debug("Finished!"),o(i),e},function(t){throw o(i),t})})},x.prototype.__processStages=function(t,e,n,i){var a=this;if(i.canceled)return i.cancelToken;var o,A,s=r(t.shift(),2),h=s[0],c=s[1],l=0===t.length;return o=l||I.q2f.indexOf(i.filter)<0?i.filter:"box"===i.filter?"box":"hamming",i=u({},i,{toWidth:h,toHeight:c,filter:o}),l||(A=this.options.createCanvas(h,c)),this.__tileAndResize(e,l?n:A,i).then(function(){return l?n:(i.width=h,i.height=c,a.__processStages(t,A,n,i))}).then(function(t){return A&&(A.width=A.height=0),t})},x.prototype.__resizeViaCreateImageBitmap=function(t,e,n){var r=this,i=e.getContext("2d");return this.debug("Resize via createImageBitmap()"),createImageBitmap(t,{resizeWidth:n.toWidth,resizeHeight:n.toHeight,resizeQuality:f.cib_quality_name(I.f2q[n.filter])}).then(function(t){if(n.canceled)return n.cancelToken;if(!n.unsharpAmount)return i.drawImage(t,0,0),t.close(),i=null,r.debug("Finished!"),e;r.debug("Unsharp result");var a=r.options.createCanvas(n.toWidth,n.toHeight),o=a.getContext("2d");o.drawImage(t,0,0),t.close();var A=o.getImageData(0,0,n.toWidth,n.toHeight);return r.__mathlib.unsharp_mask(A.data,n.toWidth,n.toHeight,n.unsharpAmount,n.unsharpRadius,n.unsharpThreshold),i.putImageData(A,0,0),a.width=a.height=0,A=o=a=i=null,r.debug("Finished!"),e})},x.prototype.resize=function(t,e,n){var r=this;this.debug("Start resize...");var i=u({},Q);if(isNaN(n)?n&&(i=u(i,n)):i=u(i,{quality:n}),i.toWidth=e.width,i.toHeight=e.height,i.width=t.naturalWidth||t.width,i.height=t.naturalHeight||t.height,Object.prototype.hasOwnProperty.call(i,"quality")){if(i.quality<0||i.quality>3)throw new Error("Pica: .quality should be [0..3], got ".concat(i.quality));i.filter=I.q2f[i.quality]}if(0===e.width||0===e.height)return Promise.reject(new Error("Invalid output size: ".concat(e.width,"x").concat(e.height)));i.unsharpRadius>2&&(i.unsharpRadius=2),i.canceled=!1,i.cancelToken&&(i.cancelToken=i.cancelToken.then(function(t){throw i.canceled=!0,t},function(t){throw i.canceled=!0,t}));var a=3;return i.__destTileBorder=Math.ceil(Math.max(a,2.5*i.unsharpRadius|0)),this.init().then(function(){if(i.canceled)return i.cancelToken;if(r.features.cib){if(I.q2f.indexOf(i.filter)>=0)return r.__resizeViaCreateImageBitmap(t,e,i);r.debug("cib is enabled, but not supports provided filter, fallback to manual math")}if(!b){var n=new Error("Pica: cannot use getImageData on canvas, make sure fingerprinting protection isn't enabled");throw n.code="ERR_GET_IMAGE_DATA",n}var a=d(i.width,i.height,i.toWidth,i.toHeight,r.options.tile,i.__destTileBorder);return r.__processStages(a,t,e,i)})},x.prototype.resizeBuffer=function(t){var e=this,n=u({},Q,t);if(Object.prototype.hasOwnProperty.call(n,"quality")){if(n.quality<0||n.quality>3)throw new Error("Pica: .quality should be [0..3], got ".concat(n.quality));n.filter=I.q2f[n.quality]}return this.init().then(function(){return e.__mathlib.resizeAndUnsharp(n)})},x.prototype.toBlob=function(t,e,n){return e=e||"image/png",new Promise(function(r){if(t.toBlob)t.toBlob(function(t){return r(t)},e,n);else if(t.convertToBlob)r(t.convertToBlob({type:e,quality:n}));else{for(var i=atob(t.toDataURL(e,n).split(",")[1]),a=i.length,o=new Uint8Array(a),A=0;A<a;A++)o[A]=i.charCodeAt(A);r(new Blob([o],{type:e}))}})},x.prototype.debug=function(){},e.exports=x},{"./lib/mathlib":1,"./lib/mm_resize/resize_filter_info":7,"./lib/pool":13,"./lib/stepper":14,"./lib/tiler":15,"./lib/utils":16,"./lib/worker":17,"object-assign":22,webworkify:23}]},{},[])("/index.js")),c.exports);const f=s(l),g='!function(){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],e=e=>{let n=0;for(let r=0;r<e.length;r++){let a=e[r];n=83*n+t.indexOf(a)}return n},n=(e,n)=>{var r="";for(let a=1;a<=n;a++){let o=Math.floor(e)/Math.pow(83,n-a)%83;r+=t[Math.floor(o)]}return r},r=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},a=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},o=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),s=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},i=t=>{if(!t||t.length<6)throw new s("The blurhash string must be at least 6 characters");let n=e(t[0]),r=Math.floor(n/9)+1,a=n%9+1;if(t.length!==4+2*a*r)throw new s(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*a*r}`)},l=t=>{let e=t>>8&255,n=255&t;return[r(t>>16),r(e),r(n)]},c=(t,e)=>{let n=Math.floor(t/361),r=Math.floor(t/19)%19,a=t%19;return[o((n-9)/9,2)*e,o((r-9)/9,2)*e,o((a-9)/9,2)*e]},h=(t,n,r,o)=>{i(t),o|=1;let s=e(t[0]),h=Math.floor(s/9)+1,u=s%9+1,f=(e(t[1])+1)/166,p=new Array(u*h);for(let a=0;a<p.length;a++)if(0===a){let n=e(t.substring(2,6));p[a]=l(n)}else{let n=e(t.substring(4+2*a,6+2*a));p[a]=c(n,f*o)}let m=4*n,g=new Uint8ClampedArray(m*r);for(let e=0;e<r;e++)for(let t=0;t<n;t++){let o=0,s=0,i=0;for(let a=0;a<h;a++)for(let l=0;l<u;l++){let c=Math.cos(Math.PI*t*l/n)*Math.cos(Math.PI*e*a/r),h=p[l+a*u];o+=h[0]*c,s+=h[1]*c,i+=h[2]*c}let l=a(o),c=a(s),f=a(i);g[4*t+0+e*m]=l,g[4*t+1+e*m]=c,g[4*t+2+e*m]=f,g[4*t+3+e*m]=255}return g},u=(t,e,n,a)=>{let o=0,s=0,i=0,l=4*e;for(let h=0;h<e;h++){let e=4*h;for(let c=0;c<n;c++){let n=e+c*l,u=a(h,c);o+=u*r(t[n]),s+=u*r(t[n+1]),i+=u*r(t[n+2])}}let c=1/(e*n);return[o*c,s*c,i*c]},f=(t,e,r,i,l)=>{if(i<1||i>9||l<1||l>9)throw new s("BlurHash must have between 1 and 9 components");if(e*r*4!==t.length)throw new s("Width and height must match the pixels array");let c=[];for(let n=0;n<l;n++)for(let a=0;a<i;a++){let o=0==a&&0==n?1:2,s=u(t,e,r,(t,s)=>o*Math.cos(Math.PI*a*t/e)*Math.cos(Math.PI*n*s/r));c.push(s)}let h,f=c[0],p=c.slice(1),m="";if(m+=n(i-1+9*(l-1),1),p.length>0){let t=Math.max(...p.map(t=>Math.max(...t))),e=Math.floor(Math.max(0,Math.min(82,Math.floor(166*t-.5))));h=(e+1)/166,m+=n(e,1)}else h=1,m+=n(0,1);return m+=n((t=>(a(t[0])<<16)+(a(t[1])<<8)+a(t[2]))(f),4),p.forEach(t=>{m+=n(((t,e)=>19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o(t[0]/e,.5)+9.5))))*19+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o(t[1]/e,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*o(t[2]/e,.5)+9.5)))))(t,h),2)}),m};\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst p=Symbol("Comlink.proxy"),m=Symbol("Comlink.endpoint"),g=Symbol("Comlink.releaseProxy"),M=Symbol("Comlink.finalizer"),d=Symbol("Comlink.thrown"),y=t=>"object"==typeof t&&null!==t||"function"==typeof t,w=new Map([["proxy",{canHandle:t=>y(t)&&t[p],serialize(t){const{port1:e,port2:n}=new MessageChannel;return b(t,e),[n,[n]]},deserialize:t=>(t.start(),function(t,e){const n=new Map;return t.addEventListener("message",function(t){const{data:e}=t;if(!e||!e.id)return;const r=n.get(e.id);if(r)try{r(e)}finally{n.delete(e.id)}}),P(t,n,[],e)}(t))}],["throw",{canHandle:t=>y(t)&&d in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function b(t,e=globalThis,n=["*"]){e.addEventListener("message",function r(a){if(!a||!a.data)return;if(!function(t,e){for(const n of t){if(e===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}return!1}(n,a.origin))return void console.warn(`Invalid origin \'${a.origin}\' for comlink proxy`);const{id:o,type:s,path:i}=Object.assign({path:[]},a.data),l=(a.data.argumentList||[]).map(L);let c;try{const e=i.slice(0,-1).reduce((t,e)=>t[e],t),n=i.reduce((t,e)=>t[e],t);switch(s){case"GET":c=n;break;case"SET":e[i.slice(-1)[0]]=L(a.data.value),c=!0;break;case"APPLY":c=n.apply(e,l);break;case"CONSTRUCT":c=function(t){return Object.assign(t,{[p]:!0})}(new n(...l));break;case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel;b(t,n),c=function(t,e){return T.set(t,e),t}(e,[e])}break;case"RELEASE":c=void 0;break;default:return}}catch(h){c={value:h,[d]:0}}Promise.resolve(c).catch(t=>({value:t,[d]:0})).then(n=>{const[a,i]=R(n);e.postMessage(Object.assign(Object.assign({},a),{id:o}),i),"RELEASE"===s&&(e.removeEventListener("message",r),E(e),M in t&&"function"==typeof t[M]&&t[M]())}).catch(t=>{const[n,r]=R({value:new TypeError("Unserializable return value"),[d]:0});e.postMessage(Object.assign(Object.assign({},n),{id:o}),r)})}),e.start&&e.start()}function E(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function v(t){if(t)throw new Error("Proxy has been released and is not useable")}function S(t){return O(t,new Map,{type:"RELEASE"}).then(()=>{E(t)})}const x=new WeakMap,k="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(x.get(t)||0)-1;x.set(t,e),0===e&&S(t)});function P(t,e,n=[],r=function(){}){let a=!1;const o=new Proxy(r,{get(r,s){if(v(a),s===g)return()=>{!function(t){k&&k.unregister(t)}(o),S(t),e.clear(),a=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=O(t,e,{type:"GET",path:n.map(t=>t.toString())}).then(L);return r.then.bind(r)}return P(t,e,[...n,s])},set(r,o,s){v(a);const[i,l]=R(s);return O(t,e,{type:"SET",path:[...n,o].map(t=>t.toString()),value:i},l).then(L)},apply(r,o,s){v(a);const i=n[n.length-1];if(i===m)return O(t,e,{type:"ENDPOINT"}).then(L);if("bind"===i)return P(t,e,n.slice(0,-1));const[l,c]=A(s);return O(t,e,{type:"APPLY",path:n.map(t=>t.toString()),argumentList:l},c).then(L)},construct(r,o){v(a);const[s,i]=A(o);return O(t,e,{type:"CONSTRUCT",path:n.map(t=>t.toString()),argumentList:s},i).then(L)}});return function(t,e){const n=(x.get(e)||0)+1;x.set(e,n),k&&k.register(t,e,t)}(o,t),o}function A(t){const e=t.map(R);return[e.map(t=>t[0]),(n=e.map(t=>t[1]),Array.prototype.concat.apply([],n))];var n}const T=new WeakMap;function R(t){for(const[e,n]of w)if(n.canHandle(t)){const[r,a]=n.serialize(t);return[{type:"HANDLER",name:e,value:r},a]}return[{type:"RAW",value:t},T.get(t)||[]]}function L(t){switch(t.type){case"HANDLER":return w.get(t.name).deserialize(t.value);case"RAW":return t.value}}function O(t,e,n,r){return new Promise(a=>{const o=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.set(o,a),t.start&&t.start(),t.postMessage(Object.assign({id:o},n),r)})}b({ValidationError:s,encode:f,decode:h,isBlurhashValid:t=>{try{i(t)}catch(e){return{result:!1,errorReason:e.message}}return{result:!0}}})}();\n',d="undefined"!=typeof self&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",g],{type:"text/javascript;charset=utf-8"});const m=n.wrap(new function(t){let e;try{if(e=d&&(self.URL||self.webkitURL).createObjectURL(d),!e)throw"";const n=new Worker(e,{name:t?.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(g),{name:t?.name})}});function I(t){return new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=(...t)=>n(t),r.src=t})}t.useAlert=function(){const t=(t=r)=>e.computed(()=>{const e=o.get(t);return e&&e instanceof Map?Array.from(e?.values()).sort((t,e)=>t.timestamp-e.timestamp):[]});return{groups:o,alerts:t(),addAlert:({id:t=crypto.randomUUID(),group:e=r,title:n,icon:A=i,content:s,footer:u,modifiers:h="info",dismissable:c=true,autoClose:l=1e4,timestamp:f=Date.now()}={})=>{o.has(e)||o.set(e,new Map);const g=o.get(e),d="string"==typeof h?h.split(" "):h;if(!A){const t=d.find(t=>a.has(t));t&&(A=a.get(t))}g?.set(t.toString(),{id:t,group:e,title:n,icon:A,content:s,footer:u,modifiers:h,dismissable:c,autoClose:l,timestamp:f})},removeAlert:(t,e=r)=>{const n=o.get(e);n?.delete(t.toString())},getAlerts:t}},t.useBlurhash=function(){return{encode:async function(t){const e=URL.createObjectURL(t),n=await I(e);if("width"in n&&"height"in n){const{width:t,height:e}=(r=n.width,i=n.height,a=32,r>i?{width:a,height:Math.round(a*(i/r))}:{width:Math.round(a*(r/i)),height:a}),o=await async function(t,e,n){const r=new f,i=document.createElement("canvas");i.width=e,i.height=n;const a=await r.resize(t,i);return a.getContext("2d")?.getImageData(0,0,e,n).data}(n,t,e);if(o)return m.encode(o,t,e,4,4)}var r,i,a},decode:m.decode,loadImage:I}},t.useDropdownContextmenu=function(t,n){const{x:r,y:i,getBoundingClientRect:a,onScroll:o}=A(t),s=e=>{r.value=e.clientX,i.value=e.clientY,e.preventDefault(),t.value.show()},u=e.computed(()=>e.unref(n));return u&&e.getCurrentInstance()&&(e.onMounted(()=>{u.value?.addEventListener("contextmenu",s,!1)}),e.onUnmounted(()=>{u.value?.removeEventListener("contextmenu",s)})),{x:r,y:i,getBoundingClientRect:a,onContextmenu:s,onScroll:o}},t.useDropdownVirtualElement=A,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("vue"),require("comlink"),require("pica")):"function"==typeof define&&define.amd?define(["exports","vue","comlink","pica"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).composables={},t.vue,t.comlink,t.Pica)}(this,function(t,e,n,r){"use strict";const a="default",o="information",i=new Map([["success","check-circle"],["info",o],["warning","warning"],["danger","error"]]),s=e.reactive(new Map([[a,new Map]]));function l(t){const n=e.ref(0),r=e.ref(0),a=e.ref();let o=0,i=0,s=0,l=0;const c=t=>{const e=t.target;o=e.scrollLeft-l,i=e.scrollTop-s,r.value=r.value-i,n.value=n.value-o,l=e.scrollLeft,s=e.scrollTop},u=()=>({width:0,height:0,x:n.value,y:r.value,top:r.value,left:n.value,right:n.value,bottom:r.value});return e.getCurrentInstance()&&(e.onMounted(()=>{t.value&&(t.value.init({getBoundingClientRect:u}),a.value=function(t){if(!t)return;let e=t.parentElement;for(;e;){const{overflow:t}=window.getComputedStyle(e);if(t.split(" ").every(t=>"auto"===t||"scroll"===t))return e;e=e.parentElement}return document.documentElement}(t.value.$el),a.value&&a.value.addEventListener("scroll",c))}),e.onUnmounted(()=>{a.value&&a.value.removeEventListener("scroll",c)})),{x:n,y:r,getBoundingClientRect:u,onScroll:c}}const c='!function(){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],e=e=>{let n=0;for(let r=0;r<e.length;r++){let a=e[r];n=83*n+t.indexOf(a)}return n},n=(e,n)=>{var r="";for(let a=1;a<=n;a++){let o=Math.floor(e)/Math.pow(83,n-a)%83;r+=t[Math.floor(o)]}return r},r=t=>{let e=t/255;return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)},a=t=>{let e=Math.max(0,Math.min(1,t));return e<=.0031308?Math.trunc(12.92*e*255+.5):Math.trunc(255*(1.055*Math.pow(e,.4166666666666667)-.055)+.5)},o=(t,e)=>(t=>t<0?-1:1)(t)*Math.pow(Math.abs(t),e),s=class extends Error{constructor(t){super(t),this.name="ValidationError",this.message=t}},i=t=>{if(!t||t.length<6)throw new s("The blurhash string must be at least 6 characters");let n=e(t[0]),r=Math.floor(n/9)+1,a=n%9+1;if(t.length!==4+2*a*r)throw new s(`blurhash length mismatch: length is ${t.length} but it should be ${4+2*a*r}`)},l=t=>{let e=t>>8&255,n=255&t;return[r(t>>16),r(e),r(n)]},c=(t,e)=>{let n=Math.floor(t/361),r=Math.floor(t/19)%19,a=t%19;return[o((n-9)/9,2)*e,o((r-9)/9,2)*e,o((a-9)/9,2)*e]},h=(t,n,r,o)=>{i(t),o|=1;let s=e(t[0]),h=Math.floor(s/9)+1,u=s%9+1,f=(e(t[1])+1)/166,p=new Array(u*h);for(let a=0;a<p.length;a++)if(0===a){let n=e(t.substring(2,6));p[a]=l(n)}else{let n=e(t.substring(4+2*a,6+2*a));p[a]=c(n,f*o)}let m=4*n,g=new Uint8ClampedArray(m*r);for(let e=0;e<r;e++)for(let t=0;t<n;t++){let o=0,s=0,i=0;for(let a=0;a<h;a++)for(let l=0;l<u;l++){let c=Math.cos(Math.PI*t*l/n)*Math.cos(Math.PI*e*a/r),h=p[l+a*u];o+=h[0]*c,s+=h[1]*c,i+=h[2]*c}let l=a(o),c=a(s),f=a(i);g[4*t+0+e*m]=l,g[4*t+1+e*m]=c,g[4*t+2+e*m]=f,g[4*t+3+e*m]=255}return g},u=(t,e,n,a)=>{let o=0,s=0,i=0,l=4*e;for(let h=0;h<e;h++){let e=4*h;for(let c=0;c<n;c++){let n=e+c*l,u=a(h,c);o+=u*r(t[n]),s+=u*r(t[n+1]),i+=u*r(t[n+2])}}let c=1/(e*n);return[o*c,s*c,i*c]},f=(t,e,r,i,l)=>{if(i<1||i>9||l<1||l>9)throw new s("BlurHash must have between 1 and 9 components");if(e*r*4!==t.length)throw new s("Width and height must match the pixels array");let c=[];for(let n=0;n<l;n++)for(let a=0;a<i;a++){let o=0==a&&0==n?1:2,s=u(t,e,r,(t,s)=>o*Math.cos(Math.PI*a*t/e)*Math.cos(Math.PI*n*s/r));c.push(s)}let h,f=c[0],p=c.slice(1),m="";if(m+=n(i-1+9*(l-1),1),p.length>0){let t=Math.max(...p.map(t=>Math.max(...t))),e=Math.floor(Math.max(0,Math.min(82,Math.floor(166*t-.5))));h=(e+1)/166,m+=n(e,1)}else h=1,m+=n(0,1);return m+=n((t=>(a(t[0])<<16)+(a(t[1])<<8)+a(t[2]))(f),4),p.forEach(t=>{m+=n(((t,e)=>19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o(t[0]/e,.5)+9.5))))*19+19*Math.floor(Math.max(0,Math.min(18,Math.floor(9*o(t[1]/e,.5)+9.5))))+Math.floor(Math.max(0,Math.min(18,Math.floor(9*o(t[2]/e,.5)+9.5)))))(t,h),2)}),m};\n/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nconst p=Symbol("Comlink.proxy"),m=Symbol("Comlink.endpoint"),g=Symbol("Comlink.releaseProxy"),M=Symbol("Comlink.finalizer"),d=Symbol("Comlink.thrown"),y=t=>"object"==typeof t&&null!==t||"function"==typeof t,w=new Map([["proxy",{canHandle:t=>y(t)&&t[p],serialize(t){const{port1:e,port2:n}=new MessageChannel;return b(t,e),[n,[n]]},deserialize:t=>(t.start(),function(t,e){const n=new Map;return t.addEventListener("message",function(t){const{data:e}=t;if(!e||!e.id)return;const r=n.get(e.id);if(r)try{r(e)}finally{n.delete(e.id)}}),P(t,n,[],e)}(t))}],["throw",{canHandle:t=>y(t)&&d in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function b(t,e=globalThis,n=["*"]){e.addEventListener("message",function r(a){if(!a||!a.data)return;if(!function(t,e){for(const n of t){if(e===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}return!1}(n,a.origin))return void console.warn(`Invalid origin \'${a.origin}\' for comlink proxy`);const{id:o,type:s,path:i}=Object.assign({path:[]},a.data),l=(a.data.argumentList||[]).map(L);let c;try{const e=i.slice(0,-1).reduce((t,e)=>t[e],t),n=i.reduce((t,e)=>t[e],t);switch(s){case"GET":c=n;break;case"SET":e[i.slice(-1)[0]]=L(a.data.value),c=!0;break;case"APPLY":c=n.apply(e,l);break;case"CONSTRUCT":c=function(t){return Object.assign(t,{[p]:!0})}(new n(...l));break;case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel;b(t,n),c=function(t,e){return T.set(t,e),t}(e,[e])}break;case"RELEASE":c=void 0;break;default:return}}catch(h){c={value:h,[d]:0}}Promise.resolve(c).catch(t=>({value:t,[d]:0})).then(n=>{const[a,i]=R(n);e.postMessage(Object.assign(Object.assign({},a),{id:o}),i),"RELEASE"===s&&(e.removeEventListener("message",r),E(e),M in t&&"function"==typeof t[M]&&t[M]())}).catch(t=>{const[n,r]=R({value:new TypeError("Unserializable return value"),[d]:0});e.postMessage(Object.assign(Object.assign({},n),{id:o}),r)})}),e.start&&e.start()}function E(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function v(t){if(t)throw new Error("Proxy has been released and is not useable")}function S(t){return O(t,new Map,{type:"RELEASE"}).then(()=>{E(t)})}const x=new WeakMap,k="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(x.get(t)||0)-1;x.set(t,e),0===e&&S(t)});function P(t,e,n=[],r=function(){}){let a=!1;const o=new Proxy(r,{get(r,s){if(v(a),s===g)return()=>{!function(t){k&&k.unregister(t)}(o),S(t),e.clear(),a=!0};if("then"===s){if(0===n.length)return{then:()=>o};const r=O(t,e,{type:"GET",path:n.map(t=>t.toString())}).then(L);return r.then.bind(r)}return P(t,e,[...n,s])},set(r,o,s){v(a);const[i,l]=R(s);return O(t,e,{type:"SET",path:[...n,o].map(t=>t.toString()),value:i},l).then(L)},apply(r,o,s){v(a);const i=n[n.length-1];if(i===m)return O(t,e,{type:"ENDPOINT"}).then(L);if("bind"===i)return P(t,e,n.slice(0,-1));const[l,c]=A(s);return O(t,e,{type:"APPLY",path:n.map(t=>t.toString()),argumentList:l},c).then(L)},construct(r,o){v(a);const[s,i]=A(o);return O(t,e,{type:"CONSTRUCT",path:n.map(t=>t.toString()),argumentList:s},i).then(L)}});return function(t,e){const n=(x.get(e)||0)+1;x.set(e,n),k&&k.register(t,e,t)}(o,t),o}function A(t){const e=t.map(R);return[e.map(t=>t[0]),(n=e.map(t=>t[1]),Array.prototype.concat.apply([],n))];var n}const T=new WeakMap;function R(t){for(const[e,n]of w)if(n.canHandle(t)){const[r,a]=n.serialize(t);return[{type:"HANDLER",name:e,value:r},a]}return[{type:"RAW",value:t},T.get(t)||[]]}function L(t){switch(t.type){case"HANDLER":return w.get(t.name).deserialize(t.value);case"RAW":return t.value}}function O(t,e,n,r){return new Promise(a=>{const o=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");e.set(o,a),t.start&&t.start(),t.postMessage(Object.assign({id:o},n),r)})}b({ValidationError:s,encode:f,decode:h,isBlurhashValid:t=>{try{i(t)}catch(e){return{result:!1,errorReason:e.message}}return{result:!0}}})}();\n',u="undefined"!=typeof self&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",c],{type:"text/javascript;charset=utf-8"});const h=n.wrap(new function(t){let e;try{if(e=u&&(self.URL||self.webkitURL).createObjectURL(u),!e)throw"";const n=new Worker(e,{name:t?.name});return n.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),n}catch(n){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(c),{name:t?.name})}});function f(t){return new Promise((e,n)=>{const r=new Image;r.onload=()=>e(r),r.onerror=(...t)=>n(t),r.src=t})}t.useAlert=function(){const t=(t=a)=>e.computed(()=>{const e=s.get(t);return e&&e instanceof Map?Array.from(e?.values()).sort((t,e)=>t.timestamp-e.timestamp):[]});return{groups:s,alerts:t(),addAlert:({id:t=crypto.randomUUID(),group:e=a,title:n,icon:r=o,content:l,footer:c,modifiers:u="info",dismissable:h=true,autoClose:f=1e4,timestamp:m=Date.now()}={})=>{s.has(e)||s.set(e,new Map);const d=s.get(e),p="string"==typeof u?u.split(" "):u;if(!r){const t=p.find(t=>i.has(t));t&&(r=i.get(t))}d?.set(t.toString(),{id:t,group:e,title:n,icon:r,content:l,footer:c,modifiers:u,dismissable:h,autoClose:f,timestamp:m})},removeAlert:(t,e=a)=>{const n=s.get(e);n?.delete(t.toString())},getAlerts:t}},t.useBlurhash=function(){return{encode:async function(t){const e=URL.createObjectURL(t),n=await f(e);if("width"in n&&"height"in n){const{width:t,height:e}=(a=n.width,o=n.height,i=32,a>o?{width:i,height:Math.round(i*(o/a))}:{width:Math.round(i*(a/o)),height:i}),s=await async function(t,e,n){const a=new r,o=document.createElement("canvas");o.width=e,o.height=n;const i=await a.resize(t,o);return i.getContext("2d")?.getImageData(0,0,e,n).data}(n,t,e);if(s)return h.encode(s,t,e,4,4)}var a,o,i},decode:h.decode,loadImage:f}},t.useDropdownContextmenu=function(t,n){const{x:r,y:a,getBoundingClientRect:o,onScroll:i}=l(t),s=e=>{r.value=e.clientX,a.value=e.clientY,e.preventDefault(),t.value.show()},c=e.computed(()=>e.unref(n));return c&&e.getCurrentInstance()&&(e.onMounted(()=>{c.value?.addEventListener("contextmenu",s,!1)}),e.onUnmounted(()=>{c.value?.removeEventListener("contextmenu",s)})),{x:r,y:a,getBoundingClientRect:o,onContextmenu:s,onScroll:i}},t.useDropdownVirtualElement=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|