useblocks 1.1.9 → 1.1.11

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 (34) hide show
  1. package/README.md +0 -1
  2. package/iframe/js/amp.BSx0mG91.js +1 -0
  3. package/iframe/js/iframe-eblock.js +1 -1
  4. package/iframe/js/iframe.js +1 -1
  5. package/iframe/js/rules.B4dVzZIU.js +1 -1
  6. package/iframe/js/sanitize-html.BA1fFyP6.js +1 -0
  7. package/package.json +1 -1
  8. package/static/core/{4a6c33e4.js → 2ace19b3.js} +17 -17
  9. package/static/core/{b57dc87c.js → 30e1cd89.js} +1 -1
  10. package/static/core/62863a09.js +33 -0
  11. package/static/core/{cc141b53.js → 6b48c0fb.js} +1 -1
  12. package/static/core/{7b3ab6c8.js → 71a391c2.js} +1 -1
  13. package/static/core/{d4e69323.js → 75723bf5.js} +1 -1
  14. package/static/core/{c93b4f06.js → 771aecf6.js} +1 -1
  15. package/static/core/{3a92c038.js → 7a9d2ed3.js} +1 -1
  16. package/static/core/{4cb1af33.js → 98558f8c.js} +1 -1
  17. package/static/core/{6493972d.js → a19bf3ee.js} +1 -1
  18. package/static/core/{41400d24.js → b4600253.js} +1 -1
  19. package/static/core/{7b4f9e02.js → d4f3066f.js} +1 -1
  20. package/static/core/e62125cf.js +1 -0
  21. package/static/core/{5b91fab0.js → ea5758c2.js} +1 -1
  22. package/static/core/{e9ed0819.js → f6ba84b8.js} +1 -1
  23. package/static/esm/{e6780554.js → 1be7efab.js} +1 -1
  24. package/two_step_headless_plugin.html +1 -1
  25. package/{useblocks-core.a8855649.js → useblocks-core.5fac2936.js} +1 -1
  26. package/useblocks-esm.js +3 -3
  27. package/useblocks.d.ts +1 -9
  28. package/useblocks.js +2 -2
  29. package/iframe/js/amp.DltrX-cv.js +0 -1
  30. package/iframe/js/sanitize-html.BUfJ0Zmy.js +0 -1
  31. package/static/core/3fe138bd.js +0 -29
  32. package/static/core/7cf3023b.js +0 -1
  33. /package/iframe/{iframe-eblock.a8855649.html → iframe-eblock.5fac2936.html} +0 -0
  34. /package/iframe/{iframe.a8855649.html → iframe.5fac2936.html} +0 -0
@@ -1,4 +1,4 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.setAttribute(`data-useblocks`,`true`),e.appendChild(document.createTextNode(`.blocks-app .image-preview{text-align:center;min-height:100px;position:relative}.blocks-app .image-preview .image-editor-modal{border:1px solid red}.blocks-app .image-preview__edit-button{position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-preview img{border:1px solid var(--colorBorder);border-radius:6px;max-width:100%;max-height:500px}.blocks-app .image-editor-modal .ant-modal-content{flex-direction:column;min-height:100vh;display:flex;border-radius:0!important}.blocks-app .image-editor-modal .ant-modal-body{flex-grow:1;display:flex}.blocks-app .image-editor-modal .ant-modal-body #pixie-editor{flex-grow:1;height:calc(100vh - 70px);min-height:calc(100vh - 70px);overflow:hidden}.blocks-app .image-editor-modal .pi .text-on-primary{background:var(--colorPrimary);border-color:var(--colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--colorPrimaryHover);border-color:var(--colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--borderRadius) * 1px)}.blocks-app .image-editor-modal .pi .shadow-xl{box-shadow:none}.blocks-app .image-editor-modal .w-\\[4ch\\].text-sm.text-center{width:5ch}.blocks-app .image-editor-modal .pi .border-white{border-color:var(--colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--colorWhite)}.blocks-app .serach-results .ant-row{align-items:center}.blocks-app .serach-results .blocks-search__divider-wrapper{margin-top:12px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{border-top:1px solid var(--colorBorderSecondary);background:0 0;width:100%;height:1px;min-height:0;margin:0;position:static}.blocks-app .slideshow-container{width:524px;height:350px;margin:auto;position:relative;overflow:hidden}.blocks-app .slideshow-image{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}.blocks-app .image-ai .slideshow-image{width:auto;height:auto}.blocks-app .image-ai__image-item{text-align:center;border-radius:6px;justify-content:center;align-items:center;min-height:100px;display:flex;position:relative}.blocks-app .image-ai__image-item .buttons{justify-content:space-between;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-ai .text-area-input-hybrid{border:none;outline:none;min-height:0;padding:0 0 0 1px}.blocks-app .image-ai .text-area-input-hybrid textarea{height:32px;min-height:32px;padding:3px 11px;line-height:26px}.blocks-app .image-ai__loading{justify-content:center;align-items:center;min-height:150px;display:flex}.blocks-app .image-ai__loading .spin{flex-direction:column;justify-content:center;align-items:center;height:150px;display:flex}.blocks-app .image-ai__loading .status{margin:3px 0 0}.blocks-app .image-ai__preview{border-radius:6px;margin-top:24px;overflow:hidden}.blocks-app .image-ai__preview .image-ai__image-item img{border-radius:calc(var(--borderRadius) * 1px);object-fit:contain;max-height:100%;transition:height 1s;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}.blocks-app .image-ai .small{width:302px;height:202px}.blocks-app .image-ai .large{width:524px;height:350px}.blocks-app .image-ai .image-ai__row{padding:0 2px}.blocks-app .image-ai .image-ai__input-affix-wrapper{border-style:solid;border-width:calc(var(--borderWidth) * 1px);border-color:var(--colorFillSecondaryDarken);border-radius:calc(var(--borderRadius) * 1px);width:100%;padding-left:0;display:inline-flex}.blocks-app .image-ai .image-ai__input-affix-wrapper:hover{border-color:var(--borderColorHover)}.blocks-app .image-ai .image-ai__input-affix-wrapper.ant-input-affix-wrapper-focused{border-color:var(--colorPrimaryBorder)}.blocks-app .image-ai .image-ai__textarea{font-size:16px}.blocks-app .image-ai .image-ai__input-icon{font-size:16px;top:0;right:0}.dark .blocks-app .image-ai .image-ai__preview .image-ai__image-item img{background:#2b2b2b;border:1px solid #434343}.dark .blocks-app .image-ai .ant-btn{background:#1f1f1f}.dark .blocks-app .image-ai .ant-btn:hover{color:var(--colorPrimary)}.blocks-app .stock-tab img{border-radius:0;max-width:none;max-height:none}.blocks-app .stock-tab .stock-search-input{padding:0 2px}.blocks-app .stock-tab .my-masonry-grid{text-align:center;width:auto;display:flex}.blocks-app .stock-tab .my-masonry-grid_column{background-clip:padding-box}.blocks-app .stock-tab .list-item{cursor:pointer;background:#f0f2f5;border:1px solid #f0f2f5;border-radius:6px;min-height:100px;max-height:100px;margin-bottom:20px;transition:all .3s;display:inline-block;position:relative;overflow:hidden}.blocks-app .stock-tab .list-item .overlay-image{opacity:0;background-size:cover;width:110px;height:40px;transition:opacity .5s;position:absolute;bottom:10px;right:10px}.blocks-app .stock-tab .list-item .ant-spin{color:#f0f2f5;font-size:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.blocks-app .stock-tab .list-item img{object-fit:cover;opacity:0;border-radius:6px;height:auto;transition:opacity .5s ease-in-out;display:block}.blocks-app .stock-tab .list-item.loaded{border:1px solid #d9d9d9;max-height:1000px}.blocks-app .stock-tab .list-item.loaded img{opacity:1;height:100%}.blocks-app .stock-tab .list-item.loaded .loaded-image{opacity:.5}.blocks-app .stock-tab .list-item:hover{box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.blocks-app .stock-tab .list-item:hover p.creator-info,.blocks-app .stock-tab .list-item:hover .overlay-image{opacity:1}.blocks-app .stock-tab .list-item p.creator-info{color:#fff;opacity:0;background-color:#00000080;border-radius:0 0 6px;margin:0;padding:5px;font-size:10px;line-height:1.2;position:absolute;bottom:0;right:0}.blocks-app .stock-tab .list-item p.creator-info:hover a{color:#fff;text-decoration:underline}.blocks-app .stock-tab .list-item p.creator-info a{color:#fff;text-decoration:none}.blocks-app .stock-color-filter{display:flex}.blocks-app .stock-color-filter label{border-width:1px;width:24px;height:24px;margin:4px;padding:0;font-size:0;border-radius:6px!important}.blocks-app .stock-color-filter label.all-colors{background-image:linear-gradient(135deg,red,#ff7f00,#ff0,#0f0,#00f,#8b00ff)}.blocks-app .stock-color-filter label.black-color{background:#222}.blocks-app .stock-color-filter label.bw-color{background-image:linear-gradient(135deg,#222 50%,#fff 50%)}.blocks-app .stock-color-filter label.white-color{background:#fff}.blocks-app .stock-color-filter label.orange-color{background:#fa8c16}.blocks-app .stock-color-filter label.red-color{background:#f5222d}.blocks-app .stock-color-filter label.purple-color{background:#722ed1}.blocks-app .stock-color-filter label.magenta-color{background:#eb2f96}.blocks-app .stock-color-filter label.green-color{background:#52c41a}.blocks-app .stock-color-filter label.teal-color{background:#43c3c3}.blocks-app .stock-color-filter label.blue-color{background:#1677ff}.blocks-app .stock-color-filter .ant-radio-button-wrapper:not(:first-child):before{display:none}.blocks-app .serach-results{padding-top:6px}.blocks-app .serach-results .stock-search-input{width:322px;padding:0 2px}.blocks-app .serach-results .blocks-search__divider-wrapper{width:calc(100% + 48px);margin-top:12px;margin-left:-24px;margin-right:-24px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{pointer-events:none;border-top:1px solid var(--colorBorderSecondary);background:linear-gradient(180deg, var(--colorBgContainerDisabled), transparent 40%);border-bottom:none;width:100%;height:20px;min-height:20px;margin:0;position:relative;bottom:auto;left:auto;right:auto}.dark .blocks-app .image-center .stock-tab .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{background:linear-gradient(180deg, var(--colorBgBase), transparent 40%)}.dark .blocks-app .stock-tab .list-item{background:#2b2b2b;border:1px solid #2b2b2b}.dark .blocks-app .stock-tab .list-item.loaded{border:1px solid #434343}.blocks-app .image-center .image-center-image-preview{justify-content:center;align-items:center;display:flex}.blocks-app .image-center .ant-divider-horizontal{pointer-events:none;z-index:1;background:linear-gradient(180deg, var(--colorBgContainerDisabled), transparent 40%);width:calc(100% + 48px);height:20px;margin:24px -24px 0;position:absolute;bottom:-19px}.dark .blocks-app .image-center .ant-divider-horizontal{background:linear-gradient(180deg, var(--colorBgBase), transparent 40%)}.blocks-app .image-center .ant-divider-horizontal.ant-divider-with-text{background:0 0;width:calc(100% + 38px);margin:0 -24px 20px;position:relative;top:0}.blocks-app .image-center img{border-radius:4px;max-width:524px;max-height:352px}.blocks-app .image-center .image-size{justify-content:center;margin-top:6px;font-size:14px;line-height:22px;display:flex}.blocks-app .image-center .ant-upload.ant-upload-drag{border-radius:6px}.blocks-app .image-center .ant-modal-body .stock-search-input{margin-bottom:0}.blocks-app .image-center .ant-modal-body .serach-results .stock-search-input{margin-bottom:10px}.blocks-app .image-center .ant-modal-body .ant-form:not(.serach-results) .ant-form-item:last-child{margin-bottom:0}.blocks-app .image-center .ant-modal-body .ant-tabs{transition:all .7s cubic-bezier(.075,.82,.165,1)}.blocks-app .image-center .ant-modal-body .ant-tabs .ant-tabs-content-holder{overflow-y:clip}.blocks-app .ant-modal{transition:width .7s ease-in-out}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();__useblocks__.define(`static/core/5b91fab0.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/cc141b53.js`,`static/core/3fe138bd.js`,`static/core/d4e69323.js`,`static/core/e9ed0819.js`,`static/core/b57dc87c.js`,`static/core/c93b4f06.js`,`react`,`prop-types`,`react-dom`,`react-router-dom`,`react/jsx-runtime`,`react-dom/client`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./3fe138bd.js"),a=e("./e9ed0819.js"),o=e("./d4e69323.js"),s=e("./cc141b53.js"),c=e("./c93b4f06.js"),l=e("./b57dc87c.js"),u=e("react");u=r.l(u);let d=e("prop-types");d=r.l(d);let f=e("react-dom");f=r.l(f);let p=e("react-router-dom"),m=e("react/jsx-runtime"),h=e("react-dom/client");var g=r.a(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).imageCompression=r()})(e,(function(){"use strict";function e(e,t){return t.forEach((function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if(n!=="default"&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}function t(e,t){return new Promise((function(r,i){let a;return n(e).then((function(e){try{return a=e,r(new Blob([t.slice(0,2),a,t.slice(2)],{type:`image/jpeg`}))}catch(e){return i(e)}}),i)}))}let n=e=>new Promise(((t,n)=>{let r=new FileReader;r.addEventListener(`load`,(({target:{result:e}})=>{let r=new DataView(e),i=0;if(r.getUint16(i)!==65496)return n(`not a valid JPEG`);for(i+=2;;){let a=r.getUint16(i);if(a===65498)break;let o=r.getUint16(i+2);if(a===65505&&r.getUint32(i+4)===1165519206){let a=i+10,s;switch(r.getUint16(a)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n(`TIFF header contains invalid endian`)}if(r.getUint16(a+2,s)!==42)return n(`TIFF header contains invalid version`);let c=r.getUint32(a+4,s),l=a+c+2+12*r.getUint16(a+c,s);for(let e=a+c+2;e<l;e+=12)if(r.getUint16(e,s)==274){if(r.getUint16(e+2,s)!==3)return n(`Orientation data type is invalid`);if(r.getUint32(e+4,s)!==1)return n(`Orientation data count is invalid`);r.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+o))}i+=2+o}return t(new Blob)})),r.readAsArrayBuffer(e)}));var r={};(function(e){var t,n,r={};e.exports=r,r.parse=function(e,t){for(var n=r.bin.readUshort,i=r.bin.readUint,a=0,o={},s=new Uint8Array(e),c=s.length-4;i(s,c)!=101010256;)c--;a=c,a+=4;var l=n(s,a+=4);n(s,a+=2);var u=i(s,a+=2),d=i(s,a+=4);a+=4,a=d;for(var f=0;f<l;f++){i(s,a),a+=4,a+=4,a+=4,i(s,a+=4),u=i(s,a+=4);var p=i(s,a+=4),m=n(s,a+=4),h=n(s,a+2),g=n(s,a+4);a+=6;var _=i(s,a+=8);a+=4,a+=m+h+g,r._readLocal(s,_,o,u,p,t)}return o},r._readLocal=function(e,t,n,i,a,o){var s=r.bin.readUshort,c=r.bin.readUint;c(e,t),s(e,t+=4),s(e,t+=2);var l=s(e,t+=2);c(e,t+=2),c(e,t+=4),t+=4;var u=s(e,t+=8),d=s(e,t+=2);t+=2;var f=r.bin.readUTF8(e,t,u);if(t+=u,t+=d,o)n[f]={size:a,csize:i};else{var p=new Uint8Array(e.buffer,t);if(l==0)n[f]=new Uint8Array(p.buffer.slice(t,t+i));else{if(l!=8)throw`unknown compression method: `+l;var m=new Uint8Array(a);r.inflateRaw(p,m),n[f]=m}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t??={level:6};var n=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[n]=120,i[n+1]=156,n+=2,n=r.F.deflateRaw(e,i,n,t.level);var a=r.adler(e,0,e.length);return i[n+0]=a>>>24&255,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=a>>>0&255,new Uint8Array(i.buffer,0,n+4)},r.deflateRaw=function(e,t){t??={level:6};var n=new Uint8Array(50+Math.floor(1.1*e.length)),i=r.F.deflateRaw(e,n,i,t.level);return new Uint8Array(n.buffer,0,i)},r.encode=function(e,t){t??=!1;var n=0,i=r.bin.writeUint,a=r.bin.writeUshort,o={};for(var s in e){var c=!r._noNeed(s)&&!t,l=e[s],u=r.crc.crc(l,0,l.length);o[s]={cpr:c,usize:l.length,crc:u,file:c?r.deflateRaw(l):l}}for(var s in o)n+=o[s].file.length+30+46+2*r.bin.sizeUTF8(s);n+=22;var d=new Uint8Array(n),f=0,p=[];for(var s in o){var m=o[s];p.push(f),f=r._writeHeader(d,f,s,m,0)}var h=0,g=f;for(var s in o)m=o[s],p.push(f),f=r._writeHeader(d,f,s,m,1,p[h++]);var _=f-g;return i(d,f,101010256),f+=4,a(d,f+=4,h),a(d,f+=2,h),i(d,f+=2,_),i(d,f+=4,g),f+=4,f+=2,d.buffer},r._noNeed=function(e){var t=e.split(`.`).pop().toLowerCase();return`png,jpg,jpeg,zip`.indexOf(t)!=-1},r._writeHeader=function(e,t,n,i,a,o){var s=r.bin.writeUint,c=r.bin.writeUshort,l=i.file;return s(e,t,a==0?67324752:33639248),t+=4,a==1&&(t+=2),c(e,t,20),c(e,t+=2,0),c(e,t+=2,i.cpr?8:0),s(e,t+=2,0),s(e,t+=4,i.crc),s(e,t+=4,l.length),s(e,t+=4,i.usize),c(e,t+=4,r.bin.sizeUTF8(n)),c(e,t+=2,0),t+=2,a==1&&(t+=2,t+=2,s(e,t+=6,o),t+=4),t+=r.bin.writeUTF8(e,t,n),a==0&&(e.set(l,t),t+=l.length),t},r.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,r=0;r<8;r++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,i){for(var a=0;a<i;a++)e=r.crc.table[255&(e^t[n+a])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^r.crc.update(4294967295,e,t,n)}},r.adler=function(e,t,n){for(var r=1,i=0,a=t,o=t+n;a<o;){for(var s=Math.min(a+5552,o);a<s;)i+=r+=e[a++];r%=65521,i%=65521}return i<<16|r},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var r=``,i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},writeASCII:function(e,t,n){for(var r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},pad:function(e){return e.length<2?`0`+e:e},readUTF8:function(e,t,n){for(var i,a=``,o=0;o<n;o++)a+=`%`+r.bin.pad(e[t+o].toString(16));try{i=decodeURIComponent(a)}catch{return r.bin.readASCII(e,t,n)}return i},writeUTF8:function(e,t,n){for(var r=n.length,i=0,a=0;a<r;a++){var o=n.charCodeAt(a);if(!(4294967168&o))e[t+i]=o,i++;else if(!(4294965248&o))e[t+i]=192|o>>6,e[t+i+1]=128|o>>0&63,i+=2;else if(!(4294901760&o))e[t+i]=224|o>>12,e[t+i+1]=128|o>>6&63,e[t+i+2]=128|o>>0&63,i+=3;else{if(4292870144&o)throw`e`;e[t+i]=240|o>>18,e[t+i+1]=128|o>>12&63,e[t+i+2]=128|o>>6&63,e[t+i+3]=128|o>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var t=e.length,n=0,r=0;r<t;r++){var i=e.charCodeAt(r);if(!(4294967168&i))n++;else if(!(4294965248&i))n+=2;else if(!(4294901760&i))n+=3;else{if(4292870144&i)throw`e`;n+=4}}return n}},r.F={},r.F.deflateRaw=function(e,t,n,i){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=r.F.U,s=r.F._goodIndex;r.F._hash;var c=r.F._putsE,l=0,u=n<<3,d=0,f=e.length;if(i==0){for(;l<f;)c(t,u,+(l+(w=Math.min(65535,f-l))==f)),u=r.F._copyExact(e,l,w,t,u+8),l+=w;return u>>>3}var p=o.lits,m=o.strt,h=o.prev,g=0,_=0,v=0,y=0,b=0,x=0;for(f>2&&(m[x=r.F._hash(e,0)]=0),l=0;l<f;l++){if(b=x,l+1<f-2){x=r.F._hash(e,l+1);var S=l+1&32767;h[S]=m[x],m[x]=S}if(d<=l){(g>14e3||_>26697)&&f-l>100&&(d<l&&(p[g]=l-d,g+=2,d=l),u=r.F._writeBlock(+(l==f-1||d==f),p,g,y,e,v,l-v,t,u),g=_=y=0,v=l);var C=0;l<f-2&&(C=r.F._bestMatch(e,l,h,b,Math.min(a[2],f-l),a[3]));var w=C>>>16,T=65535&C;if(C!=0){T=65535&C;var E=s(w=C>>>16,o.of0);o.lhst[257+E]++;var D=s(T,o.df0);o.dhst[D]++,y+=o.exb[E]+o.dxb[D],p[g]=w<<23|l-d,p[g+1]=T<<16|E<<8|D,g+=2,d=l+w}else o.lhst[e[l]]++;_++}}for(v==l&&e.length!=0||(d<l&&(p[g]=l-d,g+=2,d=l),u=r.F._writeBlock(1,p,g,y,e,v,l-v,t,u),g=0,_=0,g=_=y=0,v=l);7&u;)u++;return u>>>3},r.F._bestMatch=function(e,t,n,i,a,o){var s=32767&t,c=n[s],l=s-c+32768&32767;if(c==s||i!=r.F._hash(e,t-l))return 0;for(var u=0,d=0,f=Math.min(32767,t);l<=f&&--o!=0&&c!=s;){if(u==0||e[t+u]==e[t+u-l]){var p=r.F._howLong(e,t,l);if(p>u){if(d=l,(u=p)>=a)break;l+2<p&&(p=l+2);for(var m=0,h=0;h<p-2;h++){var g=t-l+h+32768&32767,_=g-n[g]+32768&32767;_>m&&(m=_,c=g)}}}l+=(s=c)-(c=n[s])+32768&32767}return u<<16|d},r.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var r=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-r},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,n,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y=r.F.U,b=r.F._putsF,x=r.F._putsE;y.lhst[256]++,d=(u=r.F.getTrees())[0],f=u[1],p=u[2],m=u[3],h=u[4],g=u[5],_=u[6],v=u[7];var S=32+(l+3&7?8-(l+3&7):0)+(s<<3),C=i+r.F.contSize(y.fltree,y.lhst)+r.F.contSize(y.fdtree,y.dhst),w=i+r.F.contSize(y.ltree,y.lhst)+r.F.contSize(y.dtree,y.dhst);w+=14+3*g+r.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var T=0;T<286;T++)y.lhst[T]=0;for(T=0;T<30;T++)y.dhst[T]=0;for(T=0;T<19;T++)y.ihst[T]=0;var E=S<C&&S<w?0:C<w?1:2;if(b(c,l,e),b(c,l+1,E),l+=3,E==0){for(;7&l;)l++;l=r.F._copyExact(a,o,s,c,l)}else{var D,O;if(E==1&&(D=y.fltree,O=y.fdtree),E==2){r.F.makeCodes(y.ltree,d),r.F.revCodes(y.ltree,d),r.F.makeCodes(y.dtree,f),r.F.revCodes(y.dtree,f),r.F.makeCodes(y.itree,p),r.F.revCodes(y.itree,p),D=y.ltree,O=y.dtree,x(c,l,m-257),x(c,l+=5,h-1),x(c,l+=5,g-4),l+=4;for(var k=0;k<g;k++)x(c,l+3*k,y.itree[1+(y.ordr[k]<<1)]);l+=3*g,l=r.F._codeTiny(_,y.itree,c,l),l=r.F._codeTiny(v,y.itree,c,l)}for(var A=o,j=0;j<n;j+=2){for(var M=t[j],N=M>>>23,P=A+(8388607&M);A<P;)l=r.F._writeLit(a[A++],D,c,l);if(N!=0){var F=t[j+1],I=F>>16,ee=F>>8&255,L=255&F;x(c,l=r.F._writeLit(257+ee,D,c,l),N-y.of0[ee]),l+=y.exb[ee],b(c,l=r.F._writeLit(L,O,c,l),I-y.df0[L]),l+=y.dxb[L],A+=N}}l=r.F._writeLit(256,D,c,l)}return l},r.F._copyExact=function(e,t,n,r,i){var a=i>>>3;return r[a]=n,r[a+1]=n>>>8,r[a+2]=255-r[a],r[a+3]=255-r[a+1],a+=4,r.set(new Uint8Array(e.buffer,t,n),a),i+(n+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),n=r.F._hufTree(e.dhst,e.dtree,15),i=[],a=r.F._lenCodes(e.ltree,i),o=[],s=r.F._lenCodes(e.dtree,o),c=0;c<i.length;c+=2)e.ihst[i[c]]++;for(c=0;c<o.length;c+=2)e.ihst[o[c]]++;for(var l=r.F._hufTree(e.ihst,e.itree,7),u=19;u>4&&e.itree[1+(e.ordr[u-1]<<1)]==0;)u--;return[t,n,l,a,s,u,i,o]},r.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},r.F.nonZero=function(e){for(var t=``,n=0;n<e.length;n+=2)e[n+1]!=0&&(t+=(n>>1)+`,`);return t},r.F.contSize=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[1+(r<<1)];return n},r.F._codeTiny=function(e,t,n,i){for(var a=0;a<e.length;a+=2){var o=e[a],s=e[a+1];i=r.F._writeLit(o,t,n,i);var c=o==16?2:o==17?3:7;o>15&&(r.F._putsE(n,i,s,c),i+=c)}return i},r.F._lenCodes=function(e,t){for(var n=e.length;n!=2&&e[n-1]==0;)n-=2;for(var r=0;r<n;r+=2){var i=e[r+1],a=r+3<n?e[r+3]:-1,o=r+5<n?e[r+5]:-1,s=r==0?-1:e[r-1];if(i==0&&a==i&&o==i){for(var c=r+5;c+2<n&&e[c+2]==i;)c+=2;(l=Math.min(c+1-r>>>1,138))<11?t.push(17,l-3):t.push(18,l-11),r+=2*l-2}else if(i==s&&a==i&&o==i){for(c=r+5;c+2<n&&e[c+2]==i;)c+=2;var l=Math.min(c+1-r>>>1,6);t.push(16,l-3),r+=2*l-2}else t.push(i,0)}return n>>>1},r.F._hufTree=function(e,t,n){var i=[],a=e.length,o=t.length,s=0;for(s=0;s<o;s+=2)t[s]=0,t[s+1]=0;for(s=0;s<a;s++)e[s]!=0&&i.push({lit:s,f:e[s]});var c=i.length,l=i.slice(0);if(c==0)return 0;if(c==1){var u=i[0].lit;return l=+(u==0),t[1+(u<<1)]=1,t[1+(l<<1)]=1,1}i.sort((function(e,t){return e.f-t.f}));var d=i[0],f=i[1],p=0,m=1,h=2;for(i[0]={lit:-1,f:d.f+f.f,l:d,r:f,d:0};m!=c-1;)d=p!=m&&(h==c||i[p].f<i[h].f)?i[p++]:i[h++],f=p!=m&&(h==c||i[p].f<i[h].f)?i[p++]:i[h++],i[m++]={lit:-1,f:d.f+f.f,l:d,r:f};var g=r.F.setDepth(i[m-1],0);for(g>n&&(r.F.restrictDepth(l,n,g),g=n),s=0;s<c;s++)t[1+(l[s].lit<<1)]=l[s].d;return g},r.F.setDepth=function(e,t){return e.lit==-1?Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1)):(e.d=t,t)},r.F.restrictDepth=function(e,t,n){var r=0,i=1<<n-t,a=0;for(e.sort((function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d})),r=0;r<e.length&&e[r].d>t;r++){var o=e[r].d;e[r].d=t,a+=i-(1<<n-o)}for(a>>>=n-t;a>0;)(o=e[r].d)<t?(e[r].d++,a-=1<<t-o-1):r++;for(;r>=0;r--)e[r].d==t&&a<0&&(e[r].d--,a++)},r.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},r.F._writeLit=function(e,t,n,i){return r.F._putsF(n,i,t[e<<1]),i+t[1+(e<<1)]},r.F.inflate=function(e,t){var n=Uint8Array;if(e[0]==3&&e[1]==0)return t||new n(0);var i=r.F,a=i._bitsF,o=i._bitsE,s=i._decodeTiny,c=i.makeCodes,l=i.codes2map,u=i._get17,d=i.U,f=t==null;f&&(t=new n(e.length>>>2<<3));for(var p,m,h=0,g=0,_=0,v=0,y=0,b=0,x=0,S=0,C=0;h==0;)if(h=a(e,C,1),g=a(e,C+1,2),C+=3,g!=0){if(f&&(t=r.F._check(t,S+(1<<17))),g==1&&(p=d.flmap,m=d.fdmap,b=511,x=31),g==2){_=o(e,C,5)+257,v=o(e,C+5,5)+1,y=o(e,C+10,4)+4,C+=14;for(var w=0;w<38;w+=2)d.itree[w]=0,d.itree[w+1]=0;var T=1;for(w=0;w<y;w++){var E=o(e,C+3*w,3);d.itree[1+(d.ordr[w]<<1)]=E,E>T&&(T=E)}C+=3*y,c(d.itree,T),l(d.itree,T,d.imap),p=d.lmap,m=d.dmap,C=s(d.imap,(1<<T)-1,_+v,e,C,d.ttree);var D=i._copyOut(d.ttree,0,_,d.ltree);b=(1<<D)-1;var O=i._copyOut(d.ttree,_,v,d.dtree);x=(1<<O)-1,c(d.ltree,D),l(d.ltree,D,p),c(d.dtree,O),l(d.dtree,O,m)}for(;;){var k=p[u(e,C)&b];C+=15&k;var A=k>>>4;if(!(A>>>8))t[S++]=A;else{if(A==256)break;var j=S+A-254;if(A>264){var M=d.ldef[A-257];j=S+(M>>>3)+o(e,C,7&M),C+=7&M}var N=m[u(e,C)&x];C+=15&N;var P=N>>>4,F=d.ddef[P],I=(F>>>4)+a(e,C,15&F);for(C+=15&F,f&&(t=r.F._check(t,S+(1<<17)));S<j;)t[S]=t[S++-I],t[S]=t[S++-I],t[S]=t[S++-I],t[S]=t[S++-I];S=j}}}else{7&C&&(C+=8-(7&C));var ee=4+(C>>>3),L=e[ee-4]|e[ee-3]<<8;f&&(t=r.F._check(t,S+L)),t.set(new n(e.buffer,e.byteOffset+ee,L),S),C=ee+L<<3,S+=L}return t.length==S?t:t.slice(0,S)},r.F._check=function(e,t){var n=e.length;if(t<=n)return e;var r=new Uint8Array(Math.max(n<<1,t));return r.set(e,0),r},r.F._decodeTiny=function(e,t,n,i,a,o){for(var s=r.F._bitsE,c=r.F._get17,l=0;l<n;){var u=e[c(i,a)&t];a+=15&u;var d=u>>>4;if(d<=15)o[l]=d,l++;else{var f=0,p=0;d==16?(p=3+s(i,a,2),a+=2,f=o[l-1]):d==17?(p=3+s(i,a,3),a+=3):d==18&&(p=11+s(i,a,7),a+=7);for(var m=l+p;l<m;)o[l]=f,l++}}return a},r.F._copyOut=function(e,t,n,r){for(var i=0,a=0,o=r.length>>>1;a<n;){var s=e[a+t];r[a<<1]=0,r[1+(a<<1)]=s,s>i&&(i=s),a++}for(;a<o;)r[a<<1]=0,r[1+(a<<1)]=0,a++;return i},r.F.makeCodes=function(e,t){for(var n,i,a,o,s=r.F.U,c=e.length,l=s.bl_count,u=0;u<=t;u++)l[u]=0;for(u=1;u<c;u+=2)l[e[u]]++;var d=s.next_code;for(n=0,l[0]=0,i=1;i<=t;i++)n=n+l[i-1]<<1,d[i]=n;for(a=0;a<c;a+=2)(o=e[a+1])!=0&&(e[a]=d[o],d[o]++)},r.F.codes2map=function(e,t,n){for(var i=e.length,a=r.F.U.rev15,o=0;o<i;o+=2)if(e[o+1]!=0)for(var s=o>>1,c=e[o+1],l=s<<4|c,u=t-c,d=e[o]<<u,f=d+(1<<u);d!=f;)n[a[d]>>>15-t]=l,d++},r.F.revCodes=function(e,t){for(var n=r.F.U.rev15,i=15-t,a=0;a<e.length;a+=2)e[a]=n[e[a]<<t-e[a+1]]>>>i},r.F._putsE=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},r.F._putsF=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},r.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},r.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),function(){for(var e=r.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function i(e,t,n){for(;t--!=0;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];i(e.fltree,144,8),i(e.fltree,112,9),i(e.fltree,24,7),i(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),i(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),i(e.itree,19,0),i(e.ltree,286,0),i(e.dtree,30,0),i(e.ttree,320,0)}()})({get exports(){return r},set exports(e){r=e}});var i=e({__proto__:null,default:r},[r]);let a=function(){var e={nextZero(e,t){for(;e[t]!=0;)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let r=``;for(let i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},writeASCII(e,t,n){for(let r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},readBytes(e,t,n){let r=[];for(let i=0;i<n;i++)r.push(e[t+i]);return r},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,r){let i,a=``;for(let i=0;i<r;i++)a+=`%${e.pad(t[n+i].toString(16))}`;try{i=decodeURIComponent(a)}catch{return e.readASCII(t,n,r)}return i}};function t(t,n,r,i){let o=n*r,s=a(i),c=Math.ceil(n*s/8),l=new Uint8Array(4*o),u=new Uint32Array(l.buffer),{ctype:d}=i,{depth:f}=i,p=e.readUshort;if(d==6){let e=o<<2;if(f==8)for(var m=0;m<e;m+=4)l[m]=t[m],l[m+1]=t[m+1],l[m+2]=t[m+2],l[m+3]=t[m+3];if(f==16)for(m=0;m<e;m++)l[m]=t[m<<1]}else if(d==2){let e=i.tabs.tRNS;if(e==null){if(f==8)for(m=0;m<o;m++){var h=3*m;u[m]=255<<24|t[h+2]<<16|t[h+1]<<8|t[h]}if(f==16)for(m=0;m<o;m++)h=6*m,u[m]=255<<24|t[h+4]<<16|t[h+2]<<8|t[h]}else{var g=e[0];let n=e[1],r=e[2];if(f==8)for(m=0;m<o;m++){var _=m<<2;h=3*m,u[m]=255<<24|t[h+2]<<16|t[h+1]<<8|t[h],t[h]==g&&t[h+1]==n&&t[h+2]==r&&(l[_+3]=0)}if(f==16)for(m=0;m<o;m++)_=m<<2,h=6*m,u[m]=255<<24|t[h+4]<<16|t[h+2]<<8|t[h],p(t,h)==g&&p(t,h+2)==n&&p(t,h+4)==r&&(l[_+3]=0)}}else if(d==3){let e=i.tabs.PLTE,a=i.tabs.tRNS,s=a?a.length:0;if(f==1)for(var v=0;v<r;v++){var y=v*c,b=v*n;for(m=0;m<n;m++){_=b+m<<2;var x=3*(S=t[y+(m>>3)]>>7-((7&m)<<0)&1);l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255}}if(f==2)for(v=0;v<r;v++)for(y=v*c,b=v*n,m=0;m<n;m++)_=b+m<<2,x=3*(S=t[y+(m>>2)]>>6-((3&m)<<1)&3),l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255;if(f==4)for(v=0;v<r;v++)for(y=v*c,b=v*n,m=0;m<n;m++)_=b+m<<2,x=3*(S=t[y+(m>>1)]>>4-((1&m)<<2)&15),l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255;if(f==8)for(m=0;m<o;m++){var S;_=m<<2,x=3*(S=t[m]),l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255}}else if(d==4){if(f==8)for(m=0;m<o;m++){_=m<<2;var C=t[w=m<<1];l[_]=C,l[_+1]=C,l[_+2]=C,l[_+3]=t[w+1]}if(f==16)for(m=0;m<o;m++){var w;_=m<<2,C=t[w=m<<2],l[_]=C,l[_+1]=C,l[_+2]=C,l[_+3]=t[w+2]}}else if(d==0)for(g=i.tabs.tRNS?i.tabs.tRNS:-1,v=0;v<r;v++){let e=v*c,r=v*n;if(f==1)for(var T=0;T<n;T++){var E=(C=255*(t[e+(T>>>3)]>>>7-(7&T)&1))==255*g?0:255;u[r+T]=E<<24|C<<16|C<<8|C}else if(f==2)for(T=0;T<n;T++)E=(C=85*(t[e+(T>>>2)]>>>6-((3&T)<<1)&3))==85*g?0:255,u[r+T]=E<<24|C<<16|C<<8|C;else if(f==4)for(T=0;T<n;T++)E=(C=17*(t[e+(T>>>1)]>>>4-((1&T)<<2)&15))==17*g?0:255,u[r+T]=E<<24|C<<16|C<<8|C;else if(f==8)for(T=0;T<n;T++)E=(C=t[e+T])==g?0:255,u[r+T]=E<<24|C<<16|C<<8|C;else if(f==16)for(T=0;T<n;T++)C=t[e+(T<<1)],E=p(t,e+(T<<1))==g?0:255,u[r+T]=E<<24|C<<16|C<<8|C}return l}function n(e,t,n,s){let c=a(e),l=Math.ceil(n*c/8),u=new Uint8Array((l+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,u):r(t,u),e.interlace==0?t=o(t,e,0,n,s):e.interlace==1&&(t=function(e,t){let n=t.width,r=t.height,i=a(t),s=i>>3,c=Math.ceil(n*i/8),l=new Uint8Array(r*c),u=0,d=[0,0,4,0,2,0,1],f=[0,4,0,2,0,1,0],p=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1],h=0;for(;h<7;){let a=p[h],_=m[h],v=0,y=0,b=d[h];for(;b<r;)b+=a,y++;let x=f[h];for(;x<n;)x+=_,v++;let S=Math.ceil(v*i/8);o(e,t,u,v,y);let C=0,w=d[h];for(;w<r;){let t=f[h],r=u+C*S<<3;for(;t<n;){var g;if(i==1&&(g=(g=e[r>>3])>>7-(7&r)&1,l[w*c+(t>>3)]|=g<<7-((7&t)<<0)),i==2&&(g=(g=e[r>>3])>>6-(7&r)&3,l[w*c+(t>>2)]|=g<<6-((3&t)<<1)),i==4&&(g=(g=e[r>>3])>>4-(7&r)&15,l[w*c+(t>>1)]|=g<<4-((1&t)<<2)),i>=8){let n=w*c+t*s;for(let t=0;t<s;t++)l[n+t]=e[(r>>3)+t]}r+=i,t+=_}C++,w+=a}v*y!=0&&(u+=y*(1+S)),h+=1}return l}(t,e)),t}function r(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){let e={H:{}};return e.H.N=function(t,n){let r=Uint8Array,i,a,o=0,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0;if(t[0]==3&&t[1]==0)return n||new r(0);let h=e.H,g=h.b,_=h.e,v=h.R,y=h.n,b=h.A,x=h.Z,S=h.m,C=n==null;for(C&&(n=new r(t.length>>>2<<5));o==0;)if(o=g(t,m,1),s=g(t,m+1,2),m+=3,s!=0){if(C&&(n=e.H.W(n,p+(1<<17))),s==1&&(i=S.J,a=S.h,d=511,f=31),s==2){c=_(t,m,5)+257,l=_(t,m+5,5)+1,u=_(t,m+10,4)+4,m+=14;let e=1;for(var w=0;w<38;w+=2)S.Q[w]=0,S.Q[w+1]=0;for(w=0;w<u;w++){let n=_(t,m+3*w,3);S.Q[1+(S.X[w]<<1)]=n,n>e&&(e=n)}m+=3*u,y(S.Q,e),b(S.Q,e,S.u),i=S.w,a=S.d,m=v(S.u,(1<<e)-1,c+l,t,m,S.v);let n=h.V(S.v,0,c,S.C);d=(1<<n)-1;let r=h.V(S.v,c,l,S.D);f=(1<<r)-1,y(S.C,n),b(S.C,n,i),y(S.D,r),b(S.D,r,a)}for(;;){let e=i[x(t,m)&d];m+=15&e;let r=e>>>4;if(!(r>>>8))n[p++]=r;else{if(r==256)break;{let e=p+r-254;if(r>264){let n=S.q[r-257];e=p+(n>>>3)+_(t,m,7&n),m+=7&n}let i=a[x(t,m)&f];m+=15&i;let o=i>>>4,s=S.c[o],c=(s>>>4)+g(t,m,15&s);for(m+=15&s;p<e;)n[p]=n[p++-c],n[p]=n[p++-c],n[p]=n[p++-c],n[p]=n[p++-c];p=e}}}}else{7&m&&(m+=8-(7&m));let i=4+(m>>>3),a=t[i-4]|t[i-3]<<8;C&&(n=e.H.W(n,p+a)),n.set(new r(t.buffer,t.byteOffset+i,a),p),m=i+a<<3,p+=a}return n.length==p?n:n.slice(0,p)},e.H.W=function(e,t){let n=e.length;if(t<=n)return e;let r=new Uint8Array(n<<1);return r.set(e,0),r},e.H.R=function(t,n,r,i,a,o){let s=e.H.e,c=e.H.Z,l=0;for(;l<r;){let e=t[c(i,a)&n];a+=15&e;let r=e>>>4;if(r<=15)o[l]=r,l++;else{let e=0,t=0;r==16?(t=3+s(i,a,2),a+=2,e=o[l-1]):r==17?(t=3+s(i,a,3),a+=3):r==18&&(t=11+s(i,a,7),a+=7);let n=l+t;for(;l<n;)o[l]=e,l++}}return a},e.H.V=function(e,t,n,r){let i=0,a=0,o=r.length>>>1;for(;a<n;){let n=e[a+t];r[a<<1]=0,r[1+(a<<1)]=n,n>i&&(i=n),a++}for(;a<o;)r[a<<1]=0,r[1+(a<<1)]=0,a++;return i},e.H.n=function(t,n){let r=e.H.m,i=t.length,a,o,s,c,l=r.j;for(var u=0;u<=n;u++)l[u]=0;for(u=1;u<i;u+=2)l[t[u]]++;let d=r.K;for(a=0,l[0]=0,o=1;o<=n;o++)a=a+l[o-1]<<1,d[o]=a;for(s=0;s<i;s+=2)c=t[s+1],c!=0&&(t[s]=d[c],d[c]++)},e.H.A=function(t,n,r){let i=t.length,a=e.H.m.r;for(let e=0;e<i;e+=2)if(t[e+1]!=0){let i=e>>1,o=t[e+1],s=i<<4|o,c=n-o,l=t[e]<<c,u=l+(1<<c);for(;l!=u;)r[a[l]>>>15-n]=s,l++}},e.H.l=function(t,n){let r=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2)t[e]=r[t[e]<<n-t[e+1]]>>>i},e.H.M=function(e,t,n){n<<=7&t;let r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;let r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){let e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){let t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function r(e,t,n){for(;t--!=0;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];r(t._,144,8),r(t._,112,9),r(t._,24,7),r(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),r(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),r(t.Q,19,0),r(t.C,286,0),r(t.D,30,0),r(t.v,320,0)}(),e.H.N}();function a(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function o(e,t,n,r,i){let o=a(t),c=Math.ceil(r*o/8),l,u;o=Math.ceil(o/8);let d=e[n],f=0;if(d>1&&(e[n]=[0,0,1][d-2]),d==3)for(f=o;f<c;f++)e[f+1]=e[f+1]+(e[f+1-o]>>>1)&255;for(let t=0;t<i;t++)if(l=n+t*c,u=l+t+1,d=e[u-1],f=0,d==0)for(;f<c;f++)e[l+f]=e[u+f];else if(d==1){for(;f<o;f++)e[l+f]=e[u+f];for(;f<c;f++)e[l+f]=e[u+f]+e[l+f-o]}else if(d==2)for(;f<c;f++)e[l+f]=e[u+f]+e[l+f-c];else if(d==3){for(;f<o;f++)e[l+f]=e[u+f]+(e[l+f-c]>>>1);for(;f<c;f++)e[l+f]=e[u+f]+(e[l+f-c]+e[l+f-o]>>>1)}else{for(;f<o;f++)e[l+f]=e[u+f]+s(0,e[l+f-c],0);for(;f<c;f++)e[l+f]=e[u+f]+s(e[l+f-o],e[l+f-c],e[l+f-o-c])}return e}function s(e,t,n){let r=e+t-n,i=r-e,a=r-t,o=r-n;return i*i<=a*a&&i*i<=o*o?e:a*a<=o*o?t:n}function c(t,n,r){r.width=e.readUint(t,n),n+=4,r.height=e.readUint(t,n),n+=4,r.depth=t[n],n++,r.ctype=t[n],n++,r.compress=t[n],n++,r.filter=t[n],n++,r.interlace=t[n],n++}function l(e,t,n,r,i,a,o,s,c){let l=Math.min(t,i),u=Math.min(n,a),d=0,f=0;for(let n=0;n<u;n++)for(let a=0;a<l;a++)if(o>=0&&s>=0?(d=n*t+a<<2,f=(s+n)*i+o+a<<2):(d=(-s+n)*t-o+a<<2,f=n*i+a<<2),c==0)r[f]=e[d],r[f+1]=e[d+1],r[f+2]=e[d+2],r[f+3]=e[d+3];else if(c==1){var p=e[d+3]*(1/255),m=e[d]*p,h=e[d+1]*p,g=e[d+2]*p,_=r[f+3]*(1/255),v=r[f]*_,y=r[f+1]*_,b=r[f+2]*_;let t=1-p,n=p+_*t,i=n==0?0:1/n;r[f+3]=255*n,r[f+0]=(m+v*t)*i,r[f+1]=(h+y*t)*i,r[f+2]=(g+b*t)*i}else if(c==2)p=e[d+3],m=e[d],h=e[d+1],g=e[d+2],_=r[f+3],v=r[f],y=r[f+1],b=r[f+2],p==_&&m==v&&h==y&&g==b?(r[f]=0,r[f+1]=0,r[f+2]=0,r[f+3]=0):(r[f]=m,r[f+1]=h,r[f+2]=g,r[f+3]=p);else if(c==3){if(p=e[d+3],m=e[d],h=e[d+1],g=e[d+2],_=r[f+3],v=r[f],y=r[f+1],b=r[f+2],p==_&&m==v&&h==y&&g==b)continue;if(p<220&&_>20)return!1}return!0}return{decode:function(t){let a=new Uint8Array(t),o=8,s=e,l=s.readUshort,u=s.readUint,d={tabs:{},frames:[]},f=new Uint8Array(a.length),p,m=0,h=0,g=[137,80,78,71,13,10,26,10];for(var _=0;_<8;_++)if(a[_]!=g[_])throw`The input is not a PNG file!`;for(;o<a.length;){let e=s.readUint(a,o);o+=4;let t=s.readASCII(a,o,4);if(o+=4,t==`IHDR`)c(a,o,d);else if(t==`iCCP`){for(var v=o;a[v]!=0;)v++;s.readASCII(a,o,v-o),a[v+1];let n=a.slice(v+2,o+e),c=null;try{c=r(n)}catch{c=i(n)}d.tabs[t]=c}else if(t==`CgBI`)d.tabs[t]=a.slice(o,o+4);else if(t==`IDAT`){for(_=0;_<e;_++)f[m+_]=a[o+_];m+=e}else if(t==`acTL`)d.tabs[t]={num_frames:u(a,o),num_plays:u(a,o+4)},p=new Uint8Array(a.length);else if(t==`fcTL`){h!=0&&((w=d.frames[d.frames.length-1]).data=n(d,p.slice(0,h),w.rect.width,w.rect.height),h=0);let e={x:u(a,o+12),y:u(a,o+16),width:u(a,o+4),height:u(a,o+8)},t=l(a,o+22);t=l(a,o+20)/(t==0?100:t);let r={rect:e,delay:Math.round(1e3*t),dispose:a[o+24],blend:a[o+25]};d.frames.push(r)}else if(t==`fdAT`){for(_=0;_<e-4;_++)p[h+_]=a[o+_+4];h+=e-4}else if(t==`pHYs`)d.tabs[t]=[s.readUint(a,o),s.readUint(a,o+4),a[o+8]];else if(t==`cHRM`)for(d.tabs[t]=[],_=0;_<8;_++)d.tabs[t].push(s.readUint(a,o+4*_));else if(t==`tEXt`||t==`zTXt`){d.tabs[t]??(d.tabs[t]={});var y=s.nextZero(a,o),b=s.readASCII(a,o,y-o),x=o+e-y-1;if(t==`tEXt`)C=s.readASCII(a,y+1,x);else{var S=r(a.slice(y+2,y+2+x));C=s.readUTF8(S,0,S.length)}d.tabs[t][b]=C}else if(t==`iTXt`){d.tabs[t]??(d.tabs[t]={}),y=0,v=o,y=s.nextZero(a,v),b=s.readASCII(a,v,y-v);let n=a[v=y+1];var C;a[v+1],v+=2,y=s.nextZero(a,v),s.readASCII(a,v,y-v),v=y+1,y=s.nextZero(a,v),s.readUTF8(a,v,y-v),x=e-((v=y+1)-o),n==0?C=s.readUTF8(a,v,x):(S=r(a.slice(v,v+x)),C=s.readUTF8(S,0,S.length)),d.tabs[t][b]=C}else if(t==`PLTE`)d.tabs[t]=s.readBytes(a,o,e);else if(t==`hIST`){let e=d.tabs.PLTE.length/3;for(d.tabs[t]=[],_=0;_<e;_++)d.tabs[t].push(l(a,o+2*_))}else if(t==`tRNS`)d.ctype==3?d.tabs[t]=s.readBytes(a,o,e):d.ctype==0?d.tabs[t]=l(a,o):d.ctype==2&&(d.tabs[t]=[l(a,o),l(a,o+2),l(a,o+4)]);else if(t==`gAMA`)d.tabs[t]=s.readUint(a,o)/1e5;else if(t==`sRGB`)d.tabs[t]=a[o];else if(t==`bKGD`)d.ctype==0||d.ctype==4?d.tabs[t]=[l(a,o)]:d.ctype==2||d.ctype==6?d.tabs[t]=[l(a,o),l(a,o+2),l(a,o+4)]:d.ctype==3&&(d.tabs[t]=a[o]);else if(t==`IEND`)break;o+=e,s.readUint(a,o),o+=4}var w;return h!=0&&((w=d.frames[d.frames.length-1]).data=n(d,p.slice(0,h),w.rect.width,w.rect.height)),d.data=n(d,f,d.width,d.height),delete d.compress,delete d.interlace,delete d.filter,d},toRGBA8:function(e){let n=e.width,r=e.height;if(e.tabs.acTL==null)return[t(e.data,n,r,e).buffer];let i=[];e.frames[0].data??(e.frames[0].data=e.data);let a=n*r*4,o=new Uint8Array(a),s=new Uint8Array(a),c=new Uint8Array(a);for(let d=0;d<e.frames.length;d++){let f=e.frames[d],p=f.rect.x,m=f.rect.y,h=f.rect.width,g=f.rect.height,_=t(f.data,h,g,e);if(d!=0)for(var u=0;u<a;u++)c[u]=o[u];if(f.blend==0?l(_,h,g,o,n,r,p,m,0):f.blend==1&&l(_,h,g,o,n,r,p,m,1),i.push(o.buffer.slice(0)),f.dispose!=0){if(f.dispose==1)l(s,h,g,o,n,r,p,m,0);else if(f.dispose==2)for(u=0;u<a;u++)o[u]=c[u]}}return i},_paeth:s,_copyTile:l,_bin:e}}();(function(){let{_copyTile:e}=a,{_bin:t}=a,n=a._paeth;var r={table:function(){let e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let a=0;a<i;a++)e=r.table[255&(e^t[n+a])]^e>>>8;return e},crc:(e,t,n)=>4294967295^r.update(4294967295,e,t,n)};function o(e,t,n,r){t[n]+=e[0]*r>>4,t[n+1]+=e[1]*r>>4,t[n+2]+=e[2]*r>>4,t[n+3]+=e[3]*r>>4}function s(e){return Math.max(0,Math.min(255,e))}function c(e,t){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+i*i+a*a}function l(e,t,n,r,i,a,l){l??=1;let u=r.length,d=[];for(var f=0;f<u;f++){let e=r[f];d.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(f=0;f<u;f++){let e=4294967295;for(var p=0,m=0;m<u;m++){var h=c(d[f],d[m]);m!=f&&h<e&&(e=h,p=m)}}let g=new Uint32Array(i.buffer),_=new Int16Array(t*n*4),v=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(f=0;f<v.length;f++)v[f]=255*((v[f]+.5)/16-.5);for(let i=0;i<n;i++)for(let b=0;b<t;b++){var y;f=4*(i*t+b),l==2?(h=v[4*(3&i)+(3&b)],y=[s(e[f]+h),s(e[f+1]+h),s(e[f+2]+h),s(e[f+3]+h)]):y=[s(e[f]+_[f]),s(e[f+1]+_[f+1]),s(e[f+2]+_[f+2]),s(e[f+3]+_[f+3])],p=0;let x=16777215;for(m=0;m<u;m++){let e=c(y,d[m]);e<x&&(x=e,p=m)}let S=d[p],C=[y[0]-S[0],y[1]-S[1],y[2]-S[2],y[3]-S[3]];l==1&&(b!=t-1&&o(C,_,f+4,7),i!=n-1&&(b!=0&&o(C,_,f+4*t-4,3),o(C,_,f+4*t,5),b!=t-1&&o(C,_,f+4*t+4,1))),a[f>>2]=p,g[f>>2]=r[p]}}function u(e,n,i,a,o){o??={};let{crc:s}=r,c=t.writeUint,l=t.writeUshort,u=t.writeASCII,d=8,f=e.frames.length>1,p,m=!1,h=33+(f?20:0);if(o.sRGB!=null&&(h+=13),o.pHYs!=null&&(h+=21),o.iCCP!=null&&(p=pako.deflate(o.iCCP),h+=21+p.length+4),e.ctype==3){for(var g=e.plte.length,_=0;_<g;_++)e.plte[_]>>>24!=255&&(m=!0);h+=8+3*g+4+(m?8+1*g+4:0)}for(var v=0;v<e.frames.length;v++)f&&(h+=38),h+=(S=e.frames[v]).cimg.length+12,v!=0&&(h+=4);h+=12;let y=new Uint8Array(h),b=[137,80,78,71,13,10,26,10];for(_=0;_<8;_++)y[_]=b[_];if(c(y,d,13),d+=4,u(y,d,`IHDR`),d+=4,c(y,d,n),d+=4,c(y,d,i),d+=4,y[d]=e.depth,d++,y[d]=e.ctype,d++,y[d]=0,d++,y[d]=0,d++,y[d]=0,d++,c(y,d,s(y,d-17,17)),d+=4,o.sRGB!=null&&(c(y,d,1),d+=4,u(y,d,`sRGB`),d+=4,y[d]=o.sRGB,d++,c(y,d,s(y,d-5,5)),d+=4),o.iCCP!=null){let e=13+p.length;c(y,d,e),d+=4,u(y,d,`iCCP`),d+=4,u(y,d,`ICC profile`),d+=11,d+=2,y.set(p,d),d+=p.length,c(y,d,s(y,d-(e+4),e+4)),d+=4}if(o.pHYs!=null&&(c(y,d,9),d+=4,u(y,d,`pHYs`),d+=4,c(y,d,o.pHYs[0]),d+=4,c(y,d,o.pHYs[1]),d+=4,y[d]=o.pHYs[2],d++,c(y,d,s(y,d-13,13)),d+=4),f&&(c(y,d,8),d+=4,u(y,d,`acTL`),d+=4,c(y,d,e.frames.length),d+=4,c(y,d,o.loop==null?0:o.loop),d+=4,c(y,d,s(y,d-12,12)),d+=4),e.ctype==3){for(c(y,d,3*(g=e.plte.length)),d+=4,u(y,d,`PLTE`),d+=4,_=0;_<g;_++){let t=3*_,n=e.plte[_],r=255&n,i=n>>>8&255,a=n>>>16&255;y[d+t+0]=r,y[d+t+1]=i,y[d+t+2]=a}if(d+=3*g,c(y,d,s(y,d-3*g-4,3*g+4)),d+=4,m){for(c(y,d,g),d+=4,u(y,d,`tRNS`),d+=4,_=0;_<g;_++)y[d+_]=e.plte[_]>>>24&255;d+=g,c(y,d,s(y,d-g-4,g+4)),d+=4}}let x=0;for(v=0;v<e.frames.length;v++){var S=e.frames[v];f&&(c(y,d,26),d+=4,u(y,d,`fcTL`),d+=4,c(y,d,x++),d+=4,c(y,d,S.rect.width),d+=4,c(y,d,S.rect.height),d+=4,c(y,d,S.rect.x),d+=4,c(y,d,S.rect.y),d+=4,l(y,d,a[v]),d+=2,l(y,d,1e3),d+=2,y[d]=S.dispose,d++,y[d]=S.blend,d++,c(y,d,s(y,d-30,30)),d+=4);let t=S.cimg;c(y,d,(g=t.length)+(v==0?0:4)),d+=4;let n=d;u(y,d,v==0?`IDAT`:`fdAT`),d+=4,v!=0&&(c(y,d,x++),d+=4),y.set(t,d),d+=g,c(y,d,s(y,n,d-n)),d+=4}return c(y,d,0),d+=4,u(y,d,`IEND`),d+=4,c(y,d,s(y,d-4,4)),d+=4,y.buffer}function d(e,t,n){for(let r=0;r<e.frames.length;r++){let i=e.frames[r];i.rect.width;let a=i.rect.height,o=new Uint8Array(a*i.bpl+a);i.cimg=h(i.img,a,i.bpp,i.bpl,o,t,n)}}function f(t,n,r,i,a){let o=a[0],s=a[1],c=a[2],u=a[3],d=a[4],f=a[5],h=6,g=8,v=255;for(var y=0;y<t.length;y++){let e=new Uint8Array(t[y]);for(var b=e.length,x=0;x<b;x+=4)v&=e[x+3]}let S=v!=255,C=function(t,n,r,i,a,o){let s=[];for(var c=0;c<t.length;c++){let d=new Uint8Array(t[c]),p=new Uint32Array(d.buffer);var l;let h=0,g=0,_=n,v=r,y=+!!i;if(c!=0){let b=o||i||c==1||s[c-2].dispose!=0?1:2,x=0,S=1e9;for(let e=0;e<b;e++){var u=new Uint8Array(t[c-1-e]);let i=new Uint32Array(t[c-1-e]),o=n,s=r,l=-1,d=-1;for(let e=0;e<r;e++)for(let t=0;t<n;t++)p[f=e*n+t]!=i[f]&&(t<o&&(o=t),t>l&&(l=t),e<s&&(s=e),e>d&&(d=e));l==-1&&(o=s=l=d=0),a&&((1&o)==1&&o--,(1&s)==1&&s--);let m=(l-o+1)*(d-s+1);m<S&&(S=m,x=e,h=o,g=s,_=l-o+1,v=d-s+1)}u=new Uint8Array(t[c-1-x]),x==1&&(s[c-1].dispose=2),l=new Uint8Array(_*v*4),e(u,n,r,l,_,v,-h,-g,0),y=+!!e(d,n,r,l,_,v,-h,-g,3),y==1?m(d,n,r,l,{x:h,y:g,width:_,height:v}):e(d,n,r,l,_,v,-h,-g,0)}else l=d.slice(0);s.push({rect:{x:h,y:g,width:_,height:v},img:l,blend:y,dispose:0})}if(i)for(c=0;c<s.length;c++){if((h=s[c]).blend==1)continue;let e=h.rect,i=s[c-1].rect,o=Math.min(e.x,i.x),l=Math.min(e.y,i.y),u={x:o,y:l,width:Math.max(e.x+e.width,i.x+i.width)-o,height:Math.max(e.y+e.height,i.y+i.height)-l};s[c-1].dispose=1,c-1!=0&&p(t,n,r,s,c-1,u,a),p(t,n,r,s,c,u,a)}let d=0;if(t.length!=1)for(var f=0;f<s.length;f++){var h;d+=(h=s[f]).rect.width*h.rect.height}return s}(t,n,r,o,s,c),w={},T=[],E=[];if(i!=0){let e=[];for(x=0;x<C.length;x++)e.push(C[x].img.buffer);let t=_(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;let r=new Uint8Array(t),i=0;for(n=0;n<e.length;n++){let t=new Uint8Array(e[n]),a=t.length;for(let e=0;e<a;e+=4){let n=t[e],a=t[e+1],o=t[e+2],s=t[e+3];s==0&&(n=a=o=0),r[i+e]=n,r[i+e+1]=a,r[i+e+2]=o,r[i+e+3]=s}i+=a}return r.buffer}(e),i);for(x=0;x<t.plte.length;x++)T.push(t.plte[x].est.rgba);let n=0;for(x=0;x<C.length;x++){let e=(O=C[x]).img.length;var D=new Uint8Array(t.inds.buffer,n>>2,e>>2);E.push(D);let r=new Uint8Array(t.abuf,n,e);f&&l(O.img,O.rect.width,O.rect.height,T,r,D),O.img.set(r),n+=e}}else for(y=0;y<C.length;y++){var O=C[y];let e=new Uint32Array(O.img.buffer);var k=O.rect.width;for(b=e.length,D=new Uint8Array(b),E.push(D),x=0;x<b;x++){let t=e[x];if(x!=0&&t==e[x-1])D[x]=D[x-1];else if(x>k&&t==e[x-k])D[x]=D[x-k];else{let e=w[t];if(e==null&&(w[t]=e=T.length,T.push(t),T.length>=300))break;D[x]=e}}}let A=T.length;for(A<=256&&d==0&&(g=A<=2?1:A<=4?2:A<=16?4:8,g=Math.max(g,u)),y=0;y<C.length;y++){(O=C[y]).rect.x,O.rect.y,k=O.rect.width;let e=O.rect.height,t=O.img;new Uint32Array(t.buffer);let n=4*k,r=4;if(A<=256&&d==0){n=Math.ceil(g*k/8);var j=new Uint8Array(n*e);let i=E[y];for(let t=0;t<e;t++){x=t*n;let e=t*k;if(g==8)for(var M=0;M<k;M++)j[x+M]=i[e+M];else if(g==4)for(M=0;M<k;M++)j[x+(M>>1)]|=i[e+M]<<4-4*(1&M);else if(g==2)for(M=0;M<k;M++)j[x+(M>>2)]|=i[e+M]<<6-2*(3&M);else if(g==1)for(M=0;M<k;M++)j[x+(M>>3)]|=i[e+M]<<7-1*(7&M)}t=j,h=3,r=1}else if(S==0&&C.length==1){j=new Uint8Array(k*e*3);let i=k*e;for(x=0;x<i;x++){let e=3*x,n=4*x;j[e]=t[n],j[e+1]=t[n+1],j[e+2]=t[n+2]}t=j,h=2,r=3,n=3*k}O.img=t,O.bpl=n,O.bpp=r}return{ctype:h,depth:g,plte:T,frames:C}}function p(t,n,r,i,a,o,s){let c=Uint8Array,l=Uint32Array,u=new c(t[a-1]),d=new l(t[a-1]),f=a+1<t.length?new c(t[a+1]):null,p=new c(t[a]),h=new l(p.buffer),g=n,_=r,v=-1,y=-1;for(let e=0;e<o.height;e++)for(let t=0;t<o.width;t++){let r=o.x+t,s=o.y+e,c=s*n+r,l=h[c];l==0||i[a-1].dispose==0&&d[c]==l&&(f==null||f[4*c+3]!=0)||(r<g&&(g=r),r>v&&(v=r),s<_&&(_=s),s>y&&(y=s))}v==-1&&(g=_=v=y=0),s&&((1&g)==1&&g--,(1&_)==1&&_--),o={x:g,y:_,width:v-g+1,height:y-_+1};let b=i[a];b.rect=o,b.blend=1,b.img=new Uint8Array(o.width*o.height*4),i[a-1].dispose==0?(e(u,n,r,b.img,o.width,o.height,-o.x,-o.y,0),m(p,n,r,b.img,o)):e(p,n,r,b.img,o.width,o.height,-o.x,-o.y,0)}function m(t,n,r,i,a){e(t,n,r,i,a.width,a.height,-a.x,-a.y,2)}function h(e,t,n,r,a,o,s){let c=[],l,u=[0,1,2,3,4];o==-1?(t*r>5e5||n==1)&&(u=[0]):u=[o],s&&(l={level:0});let d=i;for(var f=0;f<u.length;f++){for(let i=0;i<t;i++)g(a,e,i,r,n,u[f]);c.push(d.deflate(a,l))}let p,m=1e9;for(f=0;f<c.length;f++)c[f].length<m&&(p=f,m=c[f].length);return c[p]}function g(e,t,r,i,a,o){let s=r*i,c=s+r;if(e[c]=o,c++,o==0)if(i<500)for(var l=0;l<i;l++)e[c+l]=t[s+l];else e.set(new Uint8Array(t.buffer,s,i),c);else if(o==1){for(l=0;l<a;l++)e[c+l]=t[s+l];for(l=a;l<i;l++)e[c+l]=t[s+l]-t[s+l-a]+256&255}else if(r==0){for(l=0;l<a;l++)e[c+l]=t[s+l];if(o==2)for(l=a;l<i;l++)e[c+l]=t[s+l];if(o==3)for(l=a;l<i;l++)e[c+l]=t[s+l]-(t[s+l-a]>>1)+256&255;if(o==4)for(l=a;l<i;l++)e[c+l]=t[s+l]-n(t[s+l-a],0,0)+256&255}else{if(o==2)for(l=0;l<i;l++)e[c+l]=t[s+l]+256-t[s+l-i]&255;if(o==3){for(l=0;l<a;l++)e[c+l]=t[s+l]+256-(t[s+l-i]>>1)&255;for(l=a;l<i;l++)e[c+l]=t[s+l]+256-(t[s+l-i]+t[s+l-a]>>1)&255}if(o==4){for(l=0;l<a;l++)e[c+l]=t[s+l]+256-n(0,t[s+l-i],0)&255;for(l=a;l<i;l++)e[c+l]=t[s+l]+256-n(t[s+l-a],t[s+l-i],t[s+l-a-i])&255}}}function _(e,t){let n=new Uint8Array(e),r=n.slice(0),i=new Uint32Array(r.buffer),a=v(r,t),o=a[0],s=a[1],c=n.length,l=new Uint8Array(c>>2),u;if(n.length<2e7)for(var d=0;d<c;d+=4)u=y(o,f=n[d]*(1/255),p=n[d+1]*(1/255),m=n[d+2]*(1/255),h=n[d+3]*(1/255)),l[d>>2]=u.ind,i[d>>2]=u.est.rgba;else for(d=0;d<c;d+=4){var f=n[d]*(1/255),p=n[d+1]*(1/255),m=n[d+2]*(1/255),h=n[d+3]*(1/255);for(u=o;u.left;)u=b(u.est,f,p,m,h)<=0?u.left:u.right;l[d>>2]=u.ind,i[d>>2]=u.est.rgba}return{abuf:r.buffer,inds:l,plte:s}}function v(e,t,n){n??=1e-4;let r=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=C(e,i.i0,i.i1),i.est=w(i.bst);let a=[i];for(;a.length<t;){let t=0,i=0;for(var o=0;o<a.length;o++)a[o].est.L>t&&(t=a[o].est.L,i=o);if(t<n)break;let s=a[i],c=x(e,r,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=c||s.i1<=c){s.est.L=0;continue}let l={i0:s.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};l.bst=C(e,l.i0,l.i1),l.est=w(l.bst);let u={i0:c,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(u.bst={R:[],m:[],N:s.bst.N-l.bst.N},o=0;o<16;o++)u.bst.R[o]=s.bst.R[o]-l.bst.R[o];for(o=0;o<4;o++)u.bst.m[o]=s.bst.m[o]-l.bst.m[o];u.est=w(u.bst),s.left=l,s.right=u,a[i]=l,a.push(u)}for(a.sort(((e,t)=>t.bst.N-e.bst.N)),o=0;o<a.length;o++)a[o].ind=o;return[i,a]}function y(e,t,n,r,i){if(e.left==null)return e.tdst=function(e,t,n,r,i){let a=t-e[0],o=n-e[1],s=r-e[2],c=i-e[3];return a*a+o*o+s*s+c*c}(e.est.q,t,n,r,i),e;let a=b(e.est,t,n,r,i),o=e.left,s=e.right;a>0&&(o=e.right,s=e.left);let c=y(o,t,n,r,i);if(c.tdst<=a*a)return c;let l=y(s,t,n,r,i);return l.tdst<c.tdst?l:c}function b(e,t,n,r,i){let{e:a}=e;return a[0]*t+a[1]*n+a[2]*r+a[3]*i-e.eMq}function x(e,t,n,r,i,a){for(r-=4;n<r;){for(;S(e,n,i)<=a;)n+=4;for(;S(e,r,i)>a;)r-=4;if(n>=r)break;let o=t[n>>2];t[n>>2]=t[r>>2],t[r>>2]=o,n+=4,r-=4}for(;S(e,n,i)>a;)n-=4;return n+4}function S(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function C(e,t,n){let r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],a=n-t>>2;for(let a=t;a<n;a+=4){let t=e[a]*(1/255),n=e[a+1]*(1/255),o=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=o,i[3]+=s,r[0]+=t*t,r[1]+=t*n,r[2]+=t*o,r[3]+=t*s,r[5]+=n*n,r[6]+=n*o,r[7]+=n*s,r[10]+=o*o,r[11]+=o*s,r[15]+=s*s}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:i,N:a}}function w(e){let{R:t}=e,{m:n}=e,{N:r}=e,i=n[0],a=n[1],o=n[2],s=n[3],c=r==0?0:1/r,l=[t[0]-i*i*c,t[1]-i*a*c,t[2]-i*o*c,t[3]-i*s*c,t[4]-a*i*c,t[5]-a*a*c,t[6]-a*o*c,t[7]-a*s*c,t[8]-o*i*c,t[9]-o*a*c,t[10]-o*o*c,t[11]-o*s*c,t[12]-s*i*c,t[13]-s*a*c,t[14]-s*o*c,t[15]-s*s*c],u=l,d=T,f=[Math.random(),Math.random(),Math.random(),Math.random()],p=0,m=0;if(r!=0)for(let e=0;e<16&&(f=d.multVec(u,f),m=Math.sqrt(d.dot(f,f)),f=d.sml(1/m,f),!(e!=0&&Math.abs(m-p)<1e-9));e++)p=m;let h=[i*c,a*c,o*c,s*c];return{Cov:l,q:h,e:f,L:p,eMq255:d.dot(d.sml(255,h),f),eMq:d.dot(f,h),rgba:(Math.round(255*h[3])<<24|Math.round(255*h[2])<<16|Math.round(255*h[1])<<8|Math.round(255*h[0])<<0)>>>0}}var T={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};a.encode=function(e,t,n,r,i,a,o){r??=0,o??=!1;let s=f(e,t,n,r,[!1,!1,!1,0,o,!1]);return d(s,-1),u(s,t,n,i,a)},a.encodeLL=function(e,t,n,r,i,a,o,s){let c={ctype:0+(r==1?0:2)+(i==0?0:4),depth:a,frames:[]},l=(r+i)*a,f=l*t;for(let r=0;r<e.length;r++)c.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[r]),blend:0,dispose:1,bpp:Math.ceil(l/8),bpl:Math.ceil(f/8)});return d(c,0,!0),u(c,t,n,o,s)},a.encode.compress=f,a.encode.dither=l,a.quantize=_,a.quantize.getKDtree=v,a.quantize.getNearest=y})();let o={toArrayBuffer(e,t){let n=e.width,r=e.height,i=n<<2,a=e.getContext(`2d`).getImageData(0,0,n,r),s=new Uint32Array(a.data.buffer),c=(32*n+31)/32<<2,l=c*r,u=122+l,d=new ArrayBuffer(u),f=new DataView(d),p=1<<20,m,h,g,_,v=p,y=0,b=0,x=0;function S(e){f.setUint16(b,e,!0),b+=2}function C(e){f.setUint32(b,e,!0),b+=4}function w(e){b+=e}S(19778),C(u),w(4),C(122),C(108),C(n),C(-r>>>0),S(1),S(32),C(3),C(l),C(2835),C(2835),w(8),C(16711680),C(65280),C(255),C(4278190080),C(1466527264),function e(){for(;y<r&&v>0;){for(_=122+y*c,m=0;m<i;)v--,h=s[x++],g=h>>>24,f.setUint32(_+m,h<<8|g),m+=4;y++}x<s.length?(v=p,setTimeout(e,o._dly)):t(d)}()},toBlob(e,t){this.toArrayBuffer(e,(e=>{t(new Blob([e],{type:`image/bmp`}))}))},_dly:9};var s={CHROME:`CHROME`,FIREFOX:`FIREFOX`,DESKTOP_SAFARI:`DESKTOP_SAFARI`,IE:`IE`,IOS:`IOS`,ETC:`ETC`},c={[s.CHROME]:16384,[s.FIREFOX]:11180,[s.DESKTOP_SAFARI]:16384,[s.IE]:8192,[s.IOS]:4096,[s.ETC]:8192};let l=typeof window<`u`,u=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,d=l&&window.cordova&&window.cordova.require&&window.cordova.require(`cordova/modulemapper`),f=(l||u)&&(d&&d.getOriginalSymbol(window,`File`)||typeof File<`u`&&File),p=(l||u)&&(d&&d.getOriginalSymbol(window,`FileReader`)||typeof FileReader<`u`&&FileReader);function m(e,t,n=Date.now()){return new Promise((r=>{let i=e.split(`,`),a=i[0].match(/:(.*?);/)[1],o=globalThis.atob(i[1]),s=o.length,c=new Uint8Array(s);for(;s--;)c[s]=o.charCodeAt(s);let l=new Blob([c],{type:a});l.name=t,l.lastModified=n,r(l)}))}function h(e){return new Promise(((t,n)=>{let r=new p;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)}))}function g(e){return new Promise(((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=e=>n(e),r.src=e}))}function _(){if(_.cachedResult!==void 0)return _.cachedResult;let e=s.ETC,{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=s.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=s.IOS:/Safari/i.test(t)?e=s.DESKTOP_SAFARI:/Firefox/i.test(t)?e=s.FIREFOX:(/MSIE/i.test(t)||!!document.documentMode==1)&&(e=s.IE),_.cachedResult=e,_.cachedResult}function v(e,t){let n=c[_()],r=e,i=t,a=r*i,o=r>i?i/r:r/i;for(;a>n*n;){let e=(n+r)/2,t=(n+i)/2;e<t?(i=t,r=t*o):(i=e*o,r=e),a=r*i}return{width:r,height:i}}function y(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext(`2d`),r===null)throw Error(`getContext of OffscreenCanvas returns null`)}catch{n=document.createElement(`canvas`),r=n.getContext(`2d`)}return n.width=e,n.height=t,[n,r]}function b(e,t){let{width:n,height:r}=v(e.width,e.height),[i,a]=y(n,r);return t&&/jpe?g/.test(t)&&(a.fillStyle=`white`,a.fillRect(0,0,i.width,i.height)),a.drawImage(e,0,0,i.width,i.height),i}function x(){return x.cachedResult!==void 0||(x.cachedResult=[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&typeof document<`u`&&`ontouchend`in document),x.cachedResult}function S(e,t={}){return new Promise((function(n,r){let i,a;var o=function(){try{return a=b(i,t.fileType||e.type),n([i,a])}catch(e){return r(e)}},c=function(t){try{var n=function(e){try{throw e}catch(e){return r(e)}};try{let t;return h(e).then((function(e){try{return t=e,g(t).then((function(e){try{return i=e,function(){try{return o()}catch(e){return r(e)}}()}catch(e){return n(e)}}),n)}catch(e){return n(e)}}),n)}catch(e){n(e)}}catch(e){return r(e)}};try{if(x()||[s.DESKTOP_SAFARI,s.MOBILE_SAFARI].includes(_()))throw Error(`Skip createImageBitmap on IOS and Safari`);return createImageBitmap(e).then((function(e){try{return i=e,o()}catch{return c()}}),c)}catch{c()}}))}function C(e,t,n,r,i=1){return new Promise((function(s,c){let l;if(t===`image/png`){let o,s,c;return o=e.getContext(`2d`),{data:s}=o.getImageData(0,0,e.width,e.height),c=a.encode([s.buffer],e.width,e.height,4096*i),l=new Blob([c],{type:t}),l.name=n,l.lastModified=r,u.call(this)}{if(t===`image/bmp`)return new Promise((t=>o.toBlob(e,t))).then(function(e){try{return l=e,l.name=n,l.lastModified=r,a.call(this)}catch(e){return c(e)}}.bind(this),c);{if(typeof OffscreenCanvas==`function`&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=r,o.call(this)}catch(e){return c(e)}}.bind(this),c);{let a;return a=e.toDataURL(t,i),m(a,n,r).then(function(e){try{return l=e,o.call(this)}catch(e){return c(e)}}.bind(this),c)}function o(){return a.call(this)}}function a(){return u.call(this)}}function u(){return s(l)}}))}function w(e){e.width=0,e.height=0}function T(){return new Promise((function(e,t){let n,r,i,a;return T.cachedResult===void 0?m(`data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==`,`test.jpg`,Date.now()).then((function(o){try{return n=o,S(n).then((function(o){try{return r=o[1],C(r,n.type,n.name,n.lastModified).then((function(n){try{return i=n,w(r),S(i).then((function(n){try{return a=n[0],T.cachedResult=a.width===1&&a.height===2,e(T.cachedResult)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t):e(T.cachedResult)}))}function E(e){return new Promise(((t,n)=>{let r=new p;r.onload=e=>{let n=new DataView(e.target.result);if(n.getUint16(0,!1)!=65496)return t(-2);let r=n.byteLength,i=2;for(;i<r;){if(n.getUint16(i+2,!1)<=8)return t(-1);let e=n.getUint16(i,!1);if(i+=2,e==65505){if(n.getUint32(i+=2,!1)!=1165519206)return t(-1);let e=n.getUint16(i+=6,!1)==18761;i+=n.getUint32(i+4,e);let r=n.getUint16(i,e);i+=2;for(let a=0;a<r;a++)if(n.getUint16(i+12*a,e)==274)return t(n.getUint16(i+12*a+8,e))}else{if((65280&e)!=65280)break;i+=n.getUint16(i,!1)}}return t(-1)},r.onerror=e=>n(e),r.readAsArrayBuffer(e)}))}function D(e,t){let{width:n}=e,{height:r}=e,{maxWidthOrHeight:i}=t,a,o=e;return isFinite(i)&&(n>i||r>i)&&([o,a]=y(n,r),n>r?(o.width=i,o.height=r/n*i):(o.width=n/r*i,o.height=i),a.drawImage(e,0,0,o.width,o.height),w(e)),o}function O(e,t){let{width:n}=e,{height:r}=e,[i,a]=y(n,r);switch(t>4&&t<9?(i.width=r,i.height=n):(i.width=n,i.height=r),t){case 2:a.transform(-1,0,0,1,n,0);break;case 3:a.transform(-1,0,0,-1,n,r);break;case 4:a.transform(1,0,0,-1,0,r);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,r,0);break;case 7:a.transform(0,-1,-1,0,r,n);break;case 8:a.transform(0,-1,1,0,0,n)}return a.drawImage(e,0,0,n,r),w(e),i}function k(e,t,n=0){return new Promise((function(r,i){let a,o,s,c,l,u,d,f,p,m,h,g,_,v,b,x,k,A,j,M;function N(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;a+=e,t.onProgress(Math.min(a,100))}function P(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;a=Math.min(Math.max(e,a),100),t.onProgress(a)}return a=n,o=t.maxIteration||10,s=1024*t.maxSizeMB*1024,N(),S(e,t).then(function(n){try{return[,c]=n,N(),l=D(c,t),N(),new Promise((function(n,r){var i;if(!(i=t.exifOrientation))return E(e).then(function(e){try{return i=e,a.call(this)}catch(e){return r(e)}}.bind(this),r);function a(){return n(i)}return a.call(this)})).then(function(n){try{return u=n,N(),T().then(function(n){try{return d=n?l:O(l,u),N(),f=t.initialQuality||1,p=t.fileType||e.type,C(d,p,e.name,e.lastModified,f).then(function(n){try{{if(m=n,N(),h=m.size>s,g=m.size>e.size,!h&&!g)return P(100),r(m);var a;function u(){if(o--&&(b>s||b>_)){let t,n;return t=M?.95*j.width:j.width,n=M?.95*j.height:j.height,[k,A]=y(t,n),A.drawImage(j,0,0,t,n),f*=p===`image/png`?.85:.95,C(k,p,e.name,e.lastModified,f).then((function(e){try{return x=e,w(j),j=k,b=x.size,P(Math.min(99,Math.floor((v-b)/(v-s)*100))),u}catch(e){return i(e)}}),i)}return[1]}return _=e.size,v=m.size,b=v,j=d,M=!t.alwaysKeepResolution&&h,(a=function(e){for(;e;){if(e.then)return void e.then(a,i);try{if(e.pop){if(e.length)return e.pop()?S.call(this):e;e=u}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))(u);function S(){return w(j),w(k),w(l),w(d),w(c),P(100),r(x)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}let A;function j(e,t){return new Promise(((n,r)=>{A||=function(e){let t=[];return typeof e==`function`?t.push(`(${e})()`):t.push(e),URL.createObjectURL(new Blob(t))}(`
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.setAttribute(`data-useblocks`,`true`),e.appendChild(document.createTextNode(`.blocks-app .image-preview{text-align:center;min-height:100px;position:relative}.blocks-app .image-preview .image-editor-modal{border:1px solid red}.blocks-app .image-preview__edit-button{position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-preview img{border:1px solid var(--colorBorder);border-radius:6px;max-width:100%;max-height:500px}.blocks-app .image-editor-modal .ant-modal-content{flex-direction:column;min-height:100vh;display:flex;border-radius:0!important}.blocks-app .image-editor-modal .ant-modal-body{flex-grow:1;display:flex}.blocks-app .image-editor-modal .ant-modal-body #pixie-editor{flex-grow:1;height:calc(100vh - 70px);min-height:calc(100vh - 70px);overflow:hidden}.blocks-app .image-editor-modal .pi .text-on-primary{background:var(--colorPrimary);border-color:var(--colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--colorPrimaryHover);border-color:var(--colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--borderRadius) * 1px)}.blocks-app .image-editor-modal .pi .shadow-xl{box-shadow:none}.blocks-app .image-editor-modal .w-\\[4ch\\].text-sm.text-center{width:5ch}.blocks-app .image-editor-modal .pi .border-white{border-color:var(--colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--colorWhite)}.blocks-app .serach-results .ant-row{align-items:center}.blocks-app .serach-results .blocks-search__divider-wrapper{margin-top:12px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{border-top:1px solid var(--colorBorderSecondary);background:0 0;width:100%;height:1px;min-height:0;margin:0;position:static}.blocks-app .slideshow-container{width:524px;height:350px;margin:auto;position:relative;overflow:hidden}.blocks-app .slideshow-image{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}.blocks-app .image-ai .slideshow-image{width:auto;height:auto}.blocks-app .image-ai__image-item{text-align:center;border-radius:6px;justify-content:center;align-items:center;min-height:100px;display:flex;position:relative}.blocks-app .image-ai__image-item .buttons{justify-content:space-between;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-ai .text-area-input-hybrid{border:none;outline:none;min-height:0;padding:0 0 0 1px}.blocks-app .image-ai .text-area-input-hybrid textarea{height:32px;min-height:32px;padding:3px 11px;line-height:26px}.blocks-app .image-ai__loading{justify-content:center;align-items:center;min-height:150px;display:flex}.blocks-app .image-ai__loading .spin{flex-direction:column;justify-content:center;align-items:center;height:150px;display:flex}.blocks-app .image-ai__loading .status{margin:3px 0 0}.blocks-app .image-ai__preview{border-radius:6px;margin-top:24px;overflow:hidden}.blocks-app .image-ai__preview .image-ai__image-item img{border-radius:calc(var(--borderRadius) * 1px);object-fit:contain;max-height:100%;transition:height 1s;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}.blocks-app .image-ai .small{width:302px;height:202px}.blocks-app .image-ai .large{width:524px;height:350px}.blocks-app .image-ai .image-ai__row{padding:0 2px}.blocks-app .image-ai .image-ai__input-affix-wrapper{border-style:solid;border-width:calc(var(--borderWidth) * 1px);border-color:var(--colorFillSecondaryDarken);border-radius:calc(var(--borderRadius) * 1px);width:100%;padding-left:0;display:inline-flex}.blocks-app .image-ai .image-ai__input-affix-wrapper:hover{border-color:var(--borderColorHover)}.blocks-app .image-ai .image-ai__input-affix-wrapper.ant-input-affix-wrapper-focused{border-color:var(--colorPrimaryBorder)}.blocks-app .image-ai .image-ai__textarea{font-size:16px}.blocks-app .image-ai .image-ai__input-icon{font-size:16px;top:0;right:0}.dark .blocks-app .image-ai .image-ai__preview .image-ai__image-item img{background:#2b2b2b;border:1px solid #434343}.dark .blocks-app .image-ai .ant-btn{background:#1f1f1f}.dark .blocks-app .image-ai .ant-btn:hover{color:var(--colorPrimary)}.blocks-app .stock-tab img{border-radius:0;max-width:none;max-height:none}.blocks-app .stock-tab .stock-search-input{padding:0 2px}.blocks-app .stock-tab .my-masonry-grid{text-align:center;width:auto;display:flex}.blocks-app .stock-tab .my-masonry-grid_column{background-clip:padding-box}.blocks-app .stock-tab .list-item{cursor:pointer;background:#f0f2f5;border:1px solid #f0f2f5;border-radius:6px;min-height:100px;max-height:100px;margin-bottom:20px;transition:all .3s;display:inline-block;position:relative;overflow:hidden}.blocks-app .stock-tab .list-item .overlay-image{opacity:0;background-size:cover;width:110px;height:40px;transition:opacity .5s;position:absolute;bottom:10px;right:10px}.blocks-app .stock-tab .list-item .ant-spin{color:#f0f2f5;font-size:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.blocks-app .stock-tab .list-item img{object-fit:cover;opacity:0;border-radius:6px;height:auto;transition:opacity .5s ease-in-out;display:block}.blocks-app .stock-tab .list-item.loaded{border:1px solid #d9d9d9;max-height:1000px}.blocks-app .stock-tab .list-item.loaded img{opacity:1;height:100%}.blocks-app .stock-tab .list-item.loaded .loaded-image{opacity:.5}.blocks-app .stock-tab .list-item:hover{box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.blocks-app .stock-tab .list-item:hover p.creator-info,.blocks-app .stock-tab .list-item:hover .overlay-image{opacity:1}.blocks-app .stock-tab .list-item p.creator-info{color:#fff;opacity:0;background-color:#00000080;border-radius:0 0 6px;margin:0;padding:5px;font-size:10px;line-height:1.2;position:absolute;bottom:0;right:0}.blocks-app .stock-tab .list-item p.creator-info:hover a{color:#fff;text-decoration:underline}.blocks-app .stock-tab .list-item p.creator-info a{color:#fff;text-decoration:none}.blocks-app .stock-color-filter{display:flex}.blocks-app .stock-color-filter label{border-width:1px;width:24px;height:24px;margin:4px;padding:0;font-size:0;border-radius:6px!important}.blocks-app .stock-color-filter label.all-colors{background-image:linear-gradient(135deg,red,#ff7f00,#ff0,#0f0,#00f,#8b00ff)}.blocks-app .stock-color-filter label.black-color{background:#222}.blocks-app .stock-color-filter label.bw-color{background-image:linear-gradient(135deg,#222 50%,#fff 50%)}.blocks-app .stock-color-filter label.white-color{background:#fff}.blocks-app .stock-color-filter label.orange-color{background:#fa8c16}.blocks-app .stock-color-filter label.red-color{background:#f5222d}.blocks-app .stock-color-filter label.purple-color{background:#722ed1}.blocks-app .stock-color-filter label.magenta-color{background:#eb2f96}.blocks-app .stock-color-filter label.green-color{background:#52c41a}.blocks-app .stock-color-filter label.teal-color{background:#43c3c3}.blocks-app .stock-color-filter label.blue-color{background:#1677ff}.blocks-app .stock-color-filter .ant-radio-button-wrapper:not(:first-child):before{display:none}.blocks-app .serach-results{padding-top:6px}.blocks-app .serach-results .stock-search-input{width:322px;padding:0 2px}.blocks-app .serach-results .blocks-search__divider-wrapper{width:calc(100% + 48px);margin-top:12px;margin-left:-24px;margin-right:-24px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{pointer-events:none;border-top:1px solid var(--colorBorderSecondary);background:linear-gradient(180deg, var(--colorBgContainerDisabled), transparent 40%);border-bottom:none;width:100%;height:20px;min-height:20px;margin:0;position:relative;bottom:auto;left:auto;right:auto}.dark .blocks-app .image-center .stock-tab .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{background:linear-gradient(180deg, var(--colorBgBase), transparent 40%)}.dark .blocks-app .stock-tab .list-item{background:#2b2b2b;border:1px solid #2b2b2b}.dark .blocks-app .stock-tab .list-item.loaded{border:1px solid #434343}.blocks-app .image-center .image-center-image-preview{justify-content:center;align-items:center;display:flex}.blocks-app .image-center .ant-divider-horizontal{pointer-events:none;z-index:1;background:linear-gradient(180deg, var(--colorBgContainerDisabled), transparent 40%);width:calc(100% + 48px);height:20px;margin:24px -24px 0;position:absolute;bottom:-19px}.dark .blocks-app .image-center .ant-divider-horizontal{background:linear-gradient(180deg, var(--colorBgBase), transparent 40%)}.blocks-app .image-center .ant-divider-horizontal.ant-divider-with-text{background:0 0;width:calc(100% + 38px);margin:0 -24px 20px;position:relative;top:0}.blocks-app .image-center img{border-radius:4px;max-width:524px;max-height:352px}.blocks-app .image-center .image-size{justify-content:center;margin-top:6px;font-size:14px;line-height:22px;display:flex}.blocks-app .image-center .ant-upload.ant-upload-drag{border-radius:6px}.blocks-app .image-center .ant-modal-body .stock-search-input{margin-bottom:0}.blocks-app .image-center .ant-modal-body .serach-results .stock-search-input{margin-bottom:10px}.blocks-app .image-center .ant-modal-body .ant-form:not(.serach-results) .ant-form-item:last-child{margin-bottom:0}.blocks-app .image-center .ant-modal-body .ant-tabs{transition:all .7s cubic-bezier(.075,.82,.165,1)}.blocks-app .image-center .ant-modal-body .ant-tabs .ant-tabs-content-holder{overflow-y:clip}.blocks-app .ant-modal{transition:width .7s ease-in-out}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();__useblocks__.define(`static/core/ea5758c2.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/6b48c0fb.js`,`static/core/62863a09.js`,`static/core/75723bf5.js`,`static/core/f6ba84b8.js`,`static/core/30e1cd89.js`,`static/core/771aecf6.js`,`react`,`prop-types`,`react-dom`,`react-router-dom`,`react/jsx-runtime`,`react-dom/client`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./62863a09.js"),a=e("./f6ba84b8.js"),o=e("./75723bf5.js"),s=e("./6b48c0fb.js"),c=e("./771aecf6.js"),l=e("./30e1cd89.js"),u=e("react");u=r.l(u);let d=e("prop-types");d=r.l(d);let f=e("react-dom");f=r.l(f);let p=e("react-router-dom"),m=e("react/jsx-runtime"),h=e("react-dom/client");var g=r.a(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).imageCompression=r()})(e,(function(){"use strict";function e(e,t){return t.forEach((function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if(n!=="default"&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}function t(e,t){return new Promise((function(r,i){let a;return n(e).then((function(e){try{return a=e,r(new Blob([t.slice(0,2),a,t.slice(2)],{type:`image/jpeg`}))}catch(e){return i(e)}}),i)}))}let n=e=>new Promise(((t,n)=>{let r=new FileReader;r.addEventListener(`load`,(({target:{result:e}})=>{let r=new DataView(e),i=0;if(r.getUint16(i)!==65496)return n(`not a valid JPEG`);for(i+=2;;){let a=r.getUint16(i);if(a===65498)break;let o=r.getUint16(i+2);if(a===65505&&r.getUint32(i+4)===1165519206){let a=i+10,s;switch(r.getUint16(a)){case 18761:s=!0;break;case 19789:s=!1;break;default:return n(`TIFF header contains invalid endian`)}if(r.getUint16(a+2,s)!==42)return n(`TIFF header contains invalid version`);let c=r.getUint32(a+4,s),l=a+c+2+12*r.getUint16(a+c,s);for(let e=a+c+2;e<l;e+=12)if(r.getUint16(e,s)==274){if(r.getUint16(e+2,s)!==3)return n(`Orientation data type is invalid`);if(r.getUint32(e+4,s)!==1)return n(`Orientation data count is invalid`);r.setUint16(e+8,1,s);break}return t(e.slice(i,i+2+o))}i+=2+o}return t(new Blob)})),r.readAsArrayBuffer(e)}));var r={};(function(e){var t,n,r={};e.exports=r,r.parse=function(e,t){for(var n=r.bin.readUshort,i=r.bin.readUint,a=0,o={},s=new Uint8Array(e),c=s.length-4;i(s,c)!=101010256;)c--;a=c,a+=4;var l=n(s,a+=4);n(s,a+=2);var u=i(s,a+=2),d=i(s,a+=4);a+=4,a=d;for(var f=0;f<l;f++){i(s,a),a+=4,a+=4,a+=4,i(s,a+=4),u=i(s,a+=4);var p=i(s,a+=4),m=n(s,a+=4),h=n(s,a+2),g=n(s,a+4);a+=6;var _=i(s,a+=8);a+=4,a+=m+h+g,r._readLocal(s,_,o,u,p,t)}return o},r._readLocal=function(e,t,n,i,a,o){var s=r.bin.readUshort,c=r.bin.readUint;c(e,t),s(e,t+=4),s(e,t+=2);var l=s(e,t+=2);c(e,t+=2),c(e,t+=4),t+=4;var u=s(e,t+=8),d=s(e,t+=2);t+=2;var f=r.bin.readUTF8(e,t,u);if(t+=u,t+=d,o)n[f]={size:a,csize:i};else{var p=new Uint8Array(e.buffer,t);if(l==0)n[f]=new Uint8Array(p.buffer.slice(t,t+i));else{if(l!=8)throw`unknown compression method: `+l;var m=new Uint8Array(a);r.inflateRaw(p,m),n[f]=m}}},r.inflateRaw=function(e,t){return r.F.inflate(e,t)},r.inflate=function(e,t){return e[0],e[1],r.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},r.deflate=function(e,t){t??={level:6};var n=0,i=new Uint8Array(50+Math.floor(1.1*e.length));i[n]=120,i[n+1]=156,n+=2,n=r.F.deflateRaw(e,i,n,t.level);var a=r.adler(e,0,e.length);return i[n+0]=a>>>24&255,i[n+1]=a>>>16&255,i[n+2]=a>>>8&255,i[n+3]=a>>>0&255,new Uint8Array(i.buffer,0,n+4)},r.deflateRaw=function(e,t){t??={level:6};var n=new Uint8Array(50+Math.floor(1.1*e.length)),i=r.F.deflateRaw(e,n,i,t.level);return new Uint8Array(n.buffer,0,i)},r.encode=function(e,t){t??=!1;var n=0,i=r.bin.writeUint,a=r.bin.writeUshort,o={};for(var s in e){var c=!r._noNeed(s)&&!t,l=e[s],u=r.crc.crc(l,0,l.length);o[s]={cpr:c,usize:l.length,crc:u,file:c?r.deflateRaw(l):l}}for(var s in o)n+=o[s].file.length+30+46+2*r.bin.sizeUTF8(s);n+=22;var d=new Uint8Array(n),f=0,p=[];for(var s in o){var m=o[s];p.push(f),f=r._writeHeader(d,f,s,m,0)}var h=0,g=f;for(var s in o)m=o[s],p.push(f),f=r._writeHeader(d,f,s,m,1,p[h++]);var _=f-g;return i(d,f,101010256),f+=4,a(d,f+=4,h),a(d,f+=2,h),i(d,f+=2,_),i(d,f+=4,g),f+=4,f+=2,d.buffer},r._noNeed=function(e){var t=e.split(`.`).pop().toLowerCase();return`png,jpg,jpeg,zip`.indexOf(t)!=-1},r._writeHeader=function(e,t,n,i,a,o){var s=r.bin.writeUint,c=r.bin.writeUshort,l=i.file;return s(e,t,a==0?67324752:33639248),t+=4,a==1&&(t+=2),c(e,t,20),c(e,t+=2,0),c(e,t+=2,i.cpr?8:0),s(e,t+=2,0),s(e,t+=4,i.crc),s(e,t+=4,l.length),s(e,t+=4,i.usize),c(e,t+=4,r.bin.sizeUTF8(n)),c(e,t+=2,0),t+=2,a==1&&(t+=2,t+=2,s(e,t+=6,o),t+=4),t+=r.bin.writeUTF8(e,t,n),a==0&&(e.set(l,t),t+=l.length),t},r.crc={table:function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var n=t,r=0;r<8;r++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update:function(e,t,n,i){for(var a=0;a<i;a++)e=r.crc.table[255&(e^t[n+a])]^e>>>8;return e},crc:function(e,t,n){return 4294967295^r.crc.update(4294967295,e,t,n)}},r.adler=function(e,t,n){for(var r=1,i=0,a=t,o=t+n;a<o;){for(var s=Math.min(a+5552,o);a<s;)i+=r+=e[a++];r%=65521,i%=65521}return i<<16|r},r.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,n){e[t]=255&n,e[t+1]=n>>8&255,e[t+2]=n>>16&255,e[t+3]=n>>24&255},readASCII:function(e,t,n){for(var r=``,i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},writeASCII:function(e,t,n){for(var r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},pad:function(e){return e.length<2?`0`+e:e},readUTF8:function(e,t,n){for(var i,a=``,o=0;o<n;o++)a+=`%`+r.bin.pad(e[t+o].toString(16));try{i=decodeURIComponent(a)}catch{return r.bin.readASCII(e,t,n)}return i},writeUTF8:function(e,t,n){for(var r=n.length,i=0,a=0;a<r;a++){var o=n.charCodeAt(a);if(!(4294967168&o))e[t+i]=o,i++;else if(!(4294965248&o))e[t+i]=192|o>>6,e[t+i+1]=128|o>>0&63,i+=2;else if(!(4294901760&o))e[t+i]=224|o>>12,e[t+i+1]=128|o>>6&63,e[t+i+2]=128|o>>0&63,i+=3;else{if(4292870144&o)throw`e`;e[t+i]=240|o>>18,e[t+i+1]=128|o>>12&63,e[t+i+2]=128|o>>6&63,e[t+i+3]=128|o>>0&63,i+=4}}return i},sizeUTF8:function(e){for(var t=e.length,n=0,r=0;r<t;r++){var i=e.charCodeAt(r);if(!(4294967168&i))n++;else if(!(4294965248&i))n+=2;else if(!(4294901760&i))n+=3;else{if(4292870144&i)throw`e`;n+=4}}return n}},r.F={},r.F.deflateRaw=function(e,t,n,i){var a=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]][i],o=r.F.U,s=r.F._goodIndex;r.F._hash;var c=r.F._putsE,l=0,u=n<<3,d=0,f=e.length;if(i==0){for(;l<f;)c(t,u,+(l+(w=Math.min(65535,f-l))==f)),u=r.F._copyExact(e,l,w,t,u+8),l+=w;return u>>>3}var p=o.lits,m=o.strt,h=o.prev,g=0,_=0,v=0,y=0,b=0,x=0;for(f>2&&(m[x=r.F._hash(e,0)]=0),l=0;l<f;l++){if(b=x,l+1<f-2){x=r.F._hash(e,l+1);var S=l+1&32767;h[S]=m[x],m[x]=S}if(d<=l){(g>14e3||_>26697)&&f-l>100&&(d<l&&(p[g]=l-d,g+=2,d=l),u=r.F._writeBlock(+(l==f-1||d==f),p,g,y,e,v,l-v,t,u),g=_=y=0,v=l);var C=0;l<f-2&&(C=r.F._bestMatch(e,l,h,b,Math.min(a[2],f-l),a[3]));var w=C>>>16,T=65535&C;if(C!=0){T=65535&C;var E=s(w=C>>>16,o.of0);o.lhst[257+E]++;var D=s(T,o.df0);o.dhst[D]++,y+=o.exb[E]+o.dxb[D],p[g]=w<<23|l-d,p[g+1]=T<<16|E<<8|D,g+=2,d=l+w}else o.lhst[e[l]]++;_++}}for(v==l&&e.length!=0||(d<l&&(p[g]=l-d,g+=2,d=l),u=r.F._writeBlock(1,p,g,y,e,v,l-v,t,u),g=0,_=0,g=_=y=0,v=l);7&u;)u++;return u>>>3},r.F._bestMatch=function(e,t,n,i,a,o){var s=32767&t,c=n[s],l=s-c+32768&32767;if(c==s||i!=r.F._hash(e,t-l))return 0;for(var u=0,d=0,f=Math.min(32767,t);l<=f&&--o!=0&&c!=s;){if(u==0||e[t+u]==e[t+u-l]){var p=r.F._howLong(e,t,l);if(p>u){if(d=l,(u=p)>=a)break;l+2<p&&(p=l+2);for(var m=0,h=0;h<p-2;h++){var g=t-l+h+32768&32767,_=g-n[g]+32768&32767;_>m&&(m=_,c=g)}}}l+=(s=c)-(c=n[s])+32768&32767}return u<<16|d},r.F._howLong=function(e,t,n){if(e[t]!=e[t-n]||e[t+1]!=e[t+1-n]||e[t+2]!=e[t+2-n])return 0;var r=t,i=Math.min(e.length,t+258);for(t+=3;t<i&&e[t]==e[t-n];)t++;return t-r},r.F._hash=function(e,t){return(e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},r.saved=0,r.F._writeBlock=function(e,t,n,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y=r.F.U,b=r.F._putsF,x=r.F._putsE;y.lhst[256]++,d=(u=r.F.getTrees())[0],f=u[1],p=u[2],m=u[3],h=u[4],g=u[5],_=u[6],v=u[7];var S=32+(l+3&7?8-(l+3&7):0)+(s<<3),C=i+r.F.contSize(y.fltree,y.lhst)+r.F.contSize(y.fdtree,y.dhst),w=i+r.F.contSize(y.ltree,y.lhst)+r.F.contSize(y.dtree,y.dhst);w+=14+3*g+r.F.contSize(y.itree,y.ihst)+(2*y.ihst[16]+3*y.ihst[17]+7*y.ihst[18]);for(var T=0;T<286;T++)y.lhst[T]=0;for(T=0;T<30;T++)y.dhst[T]=0;for(T=0;T<19;T++)y.ihst[T]=0;var E=S<C&&S<w?0:C<w?1:2;if(b(c,l,e),b(c,l+1,E),l+=3,E==0){for(;7&l;)l++;l=r.F._copyExact(a,o,s,c,l)}else{var D,O;if(E==1&&(D=y.fltree,O=y.fdtree),E==2){r.F.makeCodes(y.ltree,d),r.F.revCodes(y.ltree,d),r.F.makeCodes(y.dtree,f),r.F.revCodes(y.dtree,f),r.F.makeCodes(y.itree,p),r.F.revCodes(y.itree,p),D=y.ltree,O=y.dtree,x(c,l,m-257),x(c,l+=5,h-1),x(c,l+=5,g-4),l+=4;for(var k=0;k<g;k++)x(c,l+3*k,y.itree[1+(y.ordr[k]<<1)]);l+=3*g,l=r.F._codeTiny(_,y.itree,c,l),l=r.F._codeTiny(v,y.itree,c,l)}for(var A=o,j=0;j<n;j+=2){for(var M=t[j],N=M>>>23,P=A+(8388607&M);A<P;)l=r.F._writeLit(a[A++],D,c,l);if(N!=0){var F=t[j+1],I=F>>16,ee=F>>8&255,L=255&F;x(c,l=r.F._writeLit(257+ee,D,c,l),N-y.of0[ee]),l+=y.exb[ee],b(c,l=r.F._writeLit(L,O,c,l),I-y.df0[L]),l+=y.dxb[L],A+=N}}l=r.F._writeLit(256,D,c,l)}return l},r.F._copyExact=function(e,t,n,r,i){var a=i>>>3;return r[a]=n,r[a+1]=n>>>8,r[a+2]=255-r[a],r[a+3]=255-r[a+1],a+=4,r.set(new Uint8Array(e.buffer,t,n),a),i+(n+4<<3)},r.F.getTrees=function(){for(var e=r.F.U,t=r.F._hufTree(e.lhst,e.ltree,15),n=r.F._hufTree(e.dhst,e.dtree,15),i=[],a=r.F._lenCodes(e.ltree,i),o=[],s=r.F._lenCodes(e.dtree,o),c=0;c<i.length;c+=2)e.ihst[i[c]]++;for(c=0;c<o.length;c+=2)e.ihst[o[c]]++;for(var l=r.F._hufTree(e.ihst,e.itree,7),u=19;u>4&&e.itree[1+(e.ordr[u-1]<<1)]==0;)u--;return[t,n,l,a,s,u,i,o]},r.F.getSecond=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(e[n+1]);return t},r.F.nonZero=function(e){for(var t=``,n=0;n<e.length;n+=2)e[n+1]!=0&&(t+=(n>>1)+`,`);return t},r.F.contSize=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[1+(r<<1)];return n},r.F._codeTiny=function(e,t,n,i){for(var a=0;a<e.length;a+=2){var o=e[a],s=e[a+1];i=r.F._writeLit(o,t,n,i);var c=o==16?2:o==17?3:7;o>15&&(r.F._putsE(n,i,s,c),i+=c)}return i},r.F._lenCodes=function(e,t){for(var n=e.length;n!=2&&e[n-1]==0;)n-=2;for(var r=0;r<n;r+=2){var i=e[r+1],a=r+3<n?e[r+3]:-1,o=r+5<n?e[r+5]:-1,s=r==0?-1:e[r-1];if(i==0&&a==i&&o==i){for(var c=r+5;c+2<n&&e[c+2]==i;)c+=2;(l=Math.min(c+1-r>>>1,138))<11?t.push(17,l-3):t.push(18,l-11),r+=2*l-2}else if(i==s&&a==i&&o==i){for(c=r+5;c+2<n&&e[c+2]==i;)c+=2;var l=Math.min(c+1-r>>>1,6);t.push(16,l-3),r+=2*l-2}else t.push(i,0)}return n>>>1},r.F._hufTree=function(e,t,n){var i=[],a=e.length,o=t.length,s=0;for(s=0;s<o;s+=2)t[s]=0,t[s+1]=0;for(s=0;s<a;s++)e[s]!=0&&i.push({lit:s,f:e[s]});var c=i.length,l=i.slice(0);if(c==0)return 0;if(c==1){var u=i[0].lit;return l=+(u==0),t[1+(u<<1)]=1,t[1+(l<<1)]=1,1}i.sort((function(e,t){return e.f-t.f}));var d=i[0],f=i[1],p=0,m=1,h=2;for(i[0]={lit:-1,f:d.f+f.f,l:d,r:f,d:0};m!=c-1;)d=p!=m&&(h==c||i[p].f<i[h].f)?i[p++]:i[h++],f=p!=m&&(h==c||i[p].f<i[h].f)?i[p++]:i[h++],i[m++]={lit:-1,f:d.f+f.f,l:d,r:f};var g=r.F.setDepth(i[m-1],0);for(g>n&&(r.F.restrictDepth(l,n,g),g=n),s=0;s<c;s++)t[1+(l[s].lit<<1)]=l[s].d;return g},r.F.setDepth=function(e,t){return e.lit==-1?Math.max(r.F.setDepth(e.l,t+1),r.F.setDepth(e.r,t+1)):(e.d=t,t)},r.F.restrictDepth=function(e,t,n){var r=0,i=1<<n-t,a=0;for(e.sort((function(e,t){return t.d==e.d?e.f-t.f:t.d-e.d})),r=0;r<e.length&&e[r].d>t;r++){var o=e[r].d;e[r].d=t,a+=i-(1<<n-o)}for(a>>>=n-t;a>0;)(o=e[r].d)<t?(e[r].d++,a-=1<<t-o-1):r++;for(;r>=0;r--)e[r].d==t&&a<0&&(e[r].d--,a++)},r.F._goodIndex=function(e,t){var n=0;return t[16|n]<=e&&(n|=16),t[8|n]<=e&&(n|=8),t[4|n]<=e&&(n|=4),t[2|n]<=e&&(n|=2),t[1|n]<=e&&(n|=1),n},r.F._writeLit=function(e,t,n,i){return r.F._putsF(n,i,t[e<<1]),i+t[1+(e<<1)]},r.F.inflate=function(e,t){var n=Uint8Array;if(e[0]==3&&e[1]==0)return t||new n(0);var i=r.F,a=i._bitsF,o=i._bitsE,s=i._decodeTiny,c=i.makeCodes,l=i.codes2map,u=i._get17,d=i.U,f=t==null;f&&(t=new n(e.length>>>2<<3));for(var p,m,h=0,g=0,_=0,v=0,y=0,b=0,x=0,S=0,C=0;h==0;)if(h=a(e,C,1),g=a(e,C+1,2),C+=3,g!=0){if(f&&(t=r.F._check(t,S+(1<<17))),g==1&&(p=d.flmap,m=d.fdmap,b=511,x=31),g==2){_=o(e,C,5)+257,v=o(e,C+5,5)+1,y=o(e,C+10,4)+4,C+=14;for(var w=0;w<38;w+=2)d.itree[w]=0,d.itree[w+1]=0;var T=1;for(w=0;w<y;w++){var E=o(e,C+3*w,3);d.itree[1+(d.ordr[w]<<1)]=E,E>T&&(T=E)}C+=3*y,c(d.itree,T),l(d.itree,T,d.imap),p=d.lmap,m=d.dmap,C=s(d.imap,(1<<T)-1,_+v,e,C,d.ttree);var D=i._copyOut(d.ttree,0,_,d.ltree);b=(1<<D)-1;var O=i._copyOut(d.ttree,_,v,d.dtree);x=(1<<O)-1,c(d.ltree,D),l(d.ltree,D,p),c(d.dtree,O),l(d.dtree,O,m)}for(;;){var k=p[u(e,C)&b];C+=15&k;var A=k>>>4;if(!(A>>>8))t[S++]=A;else{if(A==256)break;var j=S+A-254;if(A>264){var M=d.ldef[A-257];j=S+(M>>>3)+o(e,C,7&M),C+=7&M}var N=m[u(e,C)&x];C+=15&N;var P=N>>>4,F=d.ddef[P],I=(F>>>4)+a(e,C,15&F);for(C+=15&F,f&&(t=r.F._check(t,S+(1<<17)));S<j;)t[S]=t[S++-I],t[S]=t[S++-I],t[S]=t[S++-I],t[S]=t[S++-I];S=j}}}else{7&C&&(C+=8-(7&C));var ee=4+(C>>>3),L=e[ee-4]|e[ee-3]<<8;f&&(t=r.F._check(t,S+L)),t.set(new n(e.buffer,e.byteOffset+ee,L),S),C=ee+L<<3,S+=L}return t.length==S?t:t.slice(0,S)},r.F._check=function(e,t){var n=e.length;if(t<=n)return e;var r=new Uint8Array(Math.max(n<<1,t));return r.set(e,0),r},r.F._decodeTiny=function(e,t,n,i,a,o){for(var s=r.F._bitsE,c=r.F._get17,l=0;l<n;){var u=e[c(i,a)&t];a+=15&u;var d=u>>>4;if(d<=15)o[l]=d,l++;else{var f=0,p=0;d==16?(p=3+s(i,a,2),a+=2,f=o[l-1]):d==17?(p=3+s(i,a,3),a+=3):d==18&&(p=11+s(i,a,7),a+=7);for(var m=l+p;l<m;)o[l]=f,l++}}return a},r.F._copyOut=function(e,t,n,r){for(var i=0,a=0,o=r.length>>>1;a<n;){var s=e[a+t];r[a<<1]=0,r[1+(a<<1)]=s,s>i&&(i=s),a++}for(;a<o;)r[a<<1]=0,r[1+(a<<1)]=0,a++;return i},r.F.makeCodes=function(e,t){for(var n,i,a,o,s=r.F.U,c=e.length,l=s.bl_count,u=0;u<=t;u++)l[u]=0;for(u=1;u<c;u+=2)l[e[u]]++;var d=s.next_code;for(n=0,l[0]=0,i=1;i<=t;i++)n=n+l[i-1]<<1,d[i]=n;for(a=0;a<c;a+=2)(o=e[a+1])!=0&&(e[a]=d[o],d[o]++)},r.F.codes2map=function(e,t,n){for(var i=e.length,a=r.F.U.rev15,o=0;o<i;o+=2)if(e[o+1]!=0)for(var s=o>>1,c=e[o+1],l=s<<4|c,u=t-c,d=e[o]<<u,f=d+(1<<u);d!=f;)n[a[d]>>>15-t]=l,d++},r.F.revCodes=function(e,t){for(var n=r.F.U.rev15,i=15-t,a=0;a<e.length;a+=2)e[a]=n[e[a]<<t-e[a+1]]>>>i},r.F._putsE=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},r.F._putsF=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},r.F._bitsE=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},r.F._bitsF=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},r.F._get17=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},r.F._get25=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},r.F.U=(t=Uint16Array,n=Uint32Array,{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new n(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new n(286),dhst:new n(30),ihst:new n(19),lits:new n(15e3),strt:new t(65536),prev:new t(32768)}),function(){for(var e=r.F.U,t=0;t<32768;t++){var n=t;n=(4278255360&(n=(4042322160&(n=(3435973836&(n=(2863311530&n)>>>1|(1431655765&n)<<1))>>>2|(858993459&n)<<2))>>>4|(252645135&n)<<4))>>>8|(16711935&n)<<8,e.rev15[t]=(n>>>16|n<<16)>>>17}function i(e,t,n){for(;t--!=0;)e.push(0,n)}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];i(e.fltree,144,8),i(e.fltree,112,9),i(e.fltree,24,7),i(e.fltree,8,8),r.F.makeCodes(e.fltree,9),r.F.codes2map(e.fltree,9,e.flmap),r.F.revCodes(e.fltree,9),i(e.fdtree,32,5),r.F.makeCodes(e.fdtree,5),r.F.codes2map(e.fdtree,5,e.fdmap),r.F.revCodes(e.fdtree,5),i(e.itree,19,0),i(e.ltree,286,0),i(e.dtree,30,0),i(e.ttree,320,0)}()})({get exports(){return r},set exports(e){r=e}});var i=e({__proto__:null,default:r},[r]);let a=function(){var e={nextZero(e,t){for(;e[t]!=0;)t++;return t},readUshort:(e,t)=>e[t]<<8|e[t+1],writeUshort(e,t,n){e[t]=n>>8&255,e[t+1]=255&n},readUint:(e,t)=>16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3]),writeUint(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII(e,t,n){let r=``;for(let i=0;i<n;i++)r+=String.fromCharCode(e[t+i]);return r},writeASCII(e,t,n){for(let r=0;r<n.length;r++)e[t+r]=n.charCodeAt(r)},readBytes(e,t,n){let r=[];for(let i=0;i<n;i++)r.push(e[t+i]);return r},pad:e=>e.length<2?`0${e}`:e,readUTF8(t,n,r){let i,a=``;for(let i=0;i<r;i++)a+=`%${e.pad(t[n+i].toString(16))}`;try{i=decodeURIComponent(a)}catch{return e.readASCII(t,n,r)}return i}};function t(t,n,r,i){let o=n*r,s=a(i),c=Math.ceil(n*s/8),l=new Uint8Array(4*o),u=new Uint32Array(l.buffer),{ctype:d}=i,{depth:f}=i,p=e.readUshort;if(d==6){let e=o<<2;if(f==8)for(var m=0;m<e;m+=4)l[m]=t[m],l[m+1]=t[m+1],l[m+2]=t[m+2],l[m+3]=t[m+3];if(f==16)for(m=0;m<e;m++)l[m]=t[m<<1]}else if(d==2){let e=i.tabs.tRNS;if(e==null){if(f==8)for(m=0;m<o;m++){var h=3*m;u[m]=255<<24|t[h+2]<<16|t[h+1]<<8|t[h]}if(f==16)for(m=0;m<o;m++)h=6*m,u[m]=255<<24|t[h+4]<<16|t[h+2]<<8|t[h]}else{var g=e[0];let n=e[1],r=e[2];if(f==8)for(m=0;m<o;m++){var _=m<<2;h=3*m,u[m]=255<<24|t[h+2]<<16|t[h+1]<<8|t[h],t[h]==g&&t[h+1]==n&&t[h+2]==r&&(l[_+3]=0)}if(f==16)for(m=0;m<o;m++)_=m<<2,h=6*m,u[m]=255<<24|t[h+4]<<16|t[h+2]<<8|t[h],p(t,h)==g&&p(t,h+2)==n&&p(t,h+4)==r&&(l[_+3]=0)}}else if(d==3){let e=i.tabs.PLTE,a=i.tabs.tRNS,s=a?a.length:0;if(f==1)for(var v=0;v<r;v++){var y=v*c,b=v*n;for(m=0;m<n;m++){_=b+m<<2;var x=3*(S=t[y+(m>>3)]>>7-((7&m)<<0)&1);l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255}}if(f==2)for(v=0;v<r;v++)for(y=v*c,b=v*n,m=0;m<n;m++)_=b+m<<2,x=3*(S=t[y+(m>>2)]>>6-((3&m)<<1)&3),l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255;if(f==4)for(v=0;v<r;v++)for(y=v*c,b=v*n,m=0;m<n;m++)_=b+m<<2,x=3*(S=t[y+(m>>1)]>>4-((1&m)<<2)&15),l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255;if(f==8)for(m=0;m<o;m++){var S;_=m<<2,x=3*(S=t[m]),l[_]=e[x],l[_+1]=e[x+1],l[_+2]=e[x+2],l[_+3]=S<s?a[S]:255}}else if(d==4){if(f==8)for(m=0;m<o;m++){_=m<<2;var C=t[w=m<<1];l[_]=C,l[_+1]=C,l[_+2]=C,l[_+3]=t[w+1]}if(f==16)for(m=0;m<o;m++){var w;_=m<<2,C=t[w=m<<2],l[_]=C,l[_+1]=C,l[_+2]=C,l[_+3]=t[w+2]}}else if(d==0)for(g=i.tabs.tRNS?i.tabs.tRNS:-1,v=0;v<r;v++){let e=v*c,r=v*n;if(f==1)for(var T=0;T<n;T++){var E=(C=255*(t[e+(T>>>3)]>>>7-(7&T)&1))==255*g?0:255;u[r+T]=E<<24|C<<16|C<<8|C}else if(f==2)for(T=0;T<n;T++)E=(C=85*(t[e+(T>>>2)]>>>6-((3&T)<<1)&3))==85*g?0:255,u[r+T]=E<<24|C<<16|C<<8|C;else if(f==4)for(T=0;T<n;T++)E=(C=17*(t[e+(T>>>1)]>>>4-((1&T)<<2)&15))==17*g?0:255,u[r+T]=E<<24|C<<16|C<<8|C;else if(f==8)for(T=0;T<n;T++)E=(C=t[e+T])==g?0:255,u[r+T]=E<<24|C<<16|C<<8|C;else if(f==16)for(T=0;T<n;T++)C=t[e+(T<<1)],E=p(t,e+(T<<1))==g?0:255,u[r+T]=E<<24|C<<16|C<<8|C}return l}function n(e,t,n,s){let c=a(e),l=Math.ceil(n*c/8),u=new Uint8Array((l+1+e.interlace)*s);return t=e.tabs.CgBI?i(t,u):r(t,u),e.interlace==0?t=o(t,e,0,n,s):e.interlace==1&&(t=function(e,t){let n=t.width,r=t.height,i=a(t),s=i>>3,c=Math.ceil(n*i/8),l=new Uint8Array(r*c),u=0,d=[0,0,4,0,2,0,1],f=[0,4,0,2,0,1,0],p=[8,8,8,4,4,2,2],m=[8,8,4,4,2,2,1],h=0;for(;h<7;){let a=p[h],_=m[h],v=0,y=0,b=d[h];for(;b<r;)b+=a,y++;let x=f[h];for(;x<n;)x+=_,v++;let S=Math.ceil(v*i/8);o(e,t,u,v,y);let C=0,w=d[h];for(;w<r;){let t=f[h],r=u+C*S<<3;for(;t<n;){var g;if(i==1&&(g=(g=e[r>>3])>>7-(7&r)&1,l[w*c+(t>>3)]|=g<<7-((7&t)<<0)),i==2&&(g=(g=e[r>>3])>>6-(7&r)&3,l[w*c+(t>>2)]|=g<<6-((3&t)<<1)),i==4&&(g=(g=e[r>>3])>>4-(7&r)&15,l[w*c+(t>>1)]|=g<<4-((1&t)<<2)),i>=8){let n=w*c+t*s;for(let t=0;t<s;t++)l[n+t]=e[(r>>3)+t]}r+=i,t+=_}C++,w+=a}v*y!=0&&(u+=y*(1+S)),h+=1}return l}(t,e)),t}function r(e,t){return i(new Uint8Array(e.buffer,2,e.length-6),t)}var i=function(){let e={H:{}};return e.H.N=function(t,n){let r=Uint8Array,i,a,o=0,s=0,c=0,l=0,u=0,d=0,f=0,p=0,m=0;if(t[0]==3&&t[1]==0)return n||new r(0);let h=e.H,g=h.b,_=h.e,v=h.R,y=h.n,b=h.A,x=h.Z,S=h.m,C=n==null;for(C&&(n=new r(t.length>>>2<<5));o==0;)if(o=g(t,m,1),s=g(t,m+1,2),m+=3,s!=0){if(C&&(n=e.H.W(n,p+(1<<17))),s==1&&(i=S.J,a=S.h,d=511,f=31),s==2){c=_(t,m,5)+257,l=_(t,m+5,5)+1,u=_(t,m+10,4)+4,m+=14;let e=1;for(var w=0;w<38;w+=2)S.Q[w]=0,S.Q[w+1]=0;for(w=0;w<u;w++){let n=_(t,m+3*w,3);S.Q[1+(S.X[w]<<1)]=n,n>e&&(e=n)}m+=3*u,y(S.Q,e),b(S.Q,e,S.u),i=S.w,a=S.d,m=v(S.u,(1<<e)-1,c+l,t,m,S.v);let n=h.V(S.v,0,c,S.C);d=(1<<n)-1;let r=h.V(S.v,c,l,S.D);f=(1<<r)-1,y(S.C,n),b(S.C,n,i),y(S.D,r),b(S.D,r,a)}for(;;){let e=i[x(t,m)&d];m+=15&e;let r=e>>>4;if(!(r>>>8))n[p++]=r;else{if(r==256)break;{let e=p+r-254;if(r>264){let n=S.q[r-257];e=p+(n>>>3)+_(t,m,7&n),m+=7&n}let i=a[x(t,m)&f];m+=15&i;let o=i>>>4,s=S.c[o],c=(s>>>4)+g(t,m,15&s);for(m+=15&s;p<e;)n[p]=n[p++-c],n[p]=n[p++-c],n[p]=n[p++-c],n[p]=n[p++-c];p=e}}}}else{7&m&&(m+=8-(7&m));let i=4+(m>>>3),a=t[i-4]|t[i-3]<<8;C&&(n=e.H.W(n,p+a)),n.set(new r(t.buffer,t.byteOffset+i,a),p),m=i+a<<3,p+=a}return n.length==p?n:n.slice(0,p)},e.H.W=function(e,t){let n=e.length;if(t<=n)return e;let r=new Uint8Array(n<<1);return r.set(e,0),r},e.H.R=function(t,n,r,i,a,o){let s=e.H.e,c=e.H.Z,l=0;for(;l<r;){let e=t[c(i,a)&n];a+=15&e;let r=e>>>4;if(r<=15)o[l]=r,l++;else{let e=0,t=0;r==16?(t=3+s(i,a,2),a+=2,e=o[l-1]):r==17?(t=3+s(i,a,3),a+=3):r==18&&(t=11+s(i,a,7),a+=7);let n=l+t;for(;l<n;)o[l]=e,l++}}return a},e.H.V=function(e,t,n,r){let i=0,a=0,o=r.length>>>1;for(;a<n;){let n=e[a+t];r[a<<1]=0,r[1+(a<<1)]=n,n>i&&(i=n),a++}for(;a<o;)r[a<<1]=0,r[1+(a<<1)]=0,a++;return i},e.H.n=function(t,n){let r=e.H.m,i=t.length,a,o,s,c,l=r.j;for(var u=0;u<=n;u++)l[u]=0;for(u=1;u<i;u+=2)l[t[u]]++;let d=r.K;for(a=0,l[0]=0,o=1;o<=n;o++)a=a+l[o-1]<<1,d[o]=a;for(s=0;s<i;s+=2)c=t[s+1],c!=0&&(t[s]=d[c],d[c]++)},e.H.A=function(t,n,r){let i=t.length,a=e.H.m.r;for(let e=0;e<i;e+=2)if(t[e+1]!=0){let i=e>>1,o=t[e+1],s=i<<4|o,c=n-o,l=t[e]<<c,u=l+(1<<c);for(;l!=u;)r[a[l]>>>15-n]=s,l++}},e.H.l=function(t,n){let r=e.H.m.r,i=15-n;for(let e=0;e<t.length;e+=2)t[e]=r[t[e]<<n-t[e+1]]>>>i},e.H.M=function(e,t,n){n<<=7&t;let r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},e.H.I=function(e,t,n){n<<=7&t;let r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},e.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<n)-1},e.H.b=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<n)-1},e.H.Z=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},e.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},e.H.m=function(){let e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){let t=e.H.m;for(var n=0;n<32768;n++){let e=n;e=(2863311530&e)>>>1|(1431655765&e)<<1,e=(3435973836&e)>>>2|(858993459&e)<<2,e=(4042322160&e)>>>4|(252645135&e)<<4,e=(4278255360&e)>>>8|(16711935&e)<<8,t.r[n]=(e>>>16|e<<16)>>>17}function r(e,t,n){for(;t--!=0;)e.push(0,n)}for(n=0;n<32;n++)t.q[n]=t.S[n]<<3|t.T[n],t.c[n]=t.p[n]<<4|t.z[n];r(t._,144,8),r(t._,112,9),r(t._,24,7),r(t._,8,8),e.H.n(t._,9),e.H.A(t._,9,t.J),e.H.l(t._,9),r(t.$,32,5),e.H.n(t.$,5),e.H.A(t.$,5,t.h),e.H.l(t.$,5),r(t.Q,19,0),r(t.C,286,0),r(t.D,30,0),r(t.v,320,0)}(),e.H.N}();function a(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth}function o(e,t,n,r,i){let o=a(t),c=Math.ceil(r*o/8),l,u;o=Math.ceil(o/8);let d=e[n],f=0;if(d>1&&(e[n]=[0,0,1][d-2]),d==3)for(f=o;f<c;f++)e[f+1]=e[f+1]+(e[f+1-o]>>>1)&255;for(let t=0;t<i;t++)if(l=n+t*c,u=l+t+1,d=e[u-1],f=0,d==0)for(;f<c;f++)e[l+f]=e[u+f];else if(d==1){for(;f<o;f++)e[l+f]=e[u+f];for(;f<c;f++)e[l+f]=e[u+f]+e[l+f-o]}else if(d==2)for(;f<c;f++)e[l+f]=e[u+f]+e[l+f-c];else if(d==3){for(;f<o;f++)e[l+f]=e[u+f]+(e[l+f-c]>>>1);for(;f<c;f++)e[l+f]=e[u+f]+(e[l+f-c]+e[l+f-o]>>>1)}else{for(;f<o;f++)e[l+f]=e[u+f]+s(0,e[l+f-c],0);for(;f<c;f++)e[l+f]=e[u+f]+s(e[l+f-o],e[l+f-c],e[l+f-o-c])}return e}function s(e,t,n){let r=e+t-n,i=r-e,a=r-t,o=r-n;return i*i<=a*a&&i*i<=o*o?e:a*a<=o*o?t:n}function c(t,n,r){r.width=e.readUint(t,n),n+=4,r.height=e.readUint(t,n),n+=4,r.depth=t[n],n++,r.ctype=t[n],n++,r.compress=t[n],n++,r.filter=t[n],n++,r.interlace=t[n],n++}function l(e,t,n,r,i,a,o,s,c){let l=Math.min(t,i),u=Math.min(n,a),d=0,f=0;for(let n=0;n<u;n++)for(let a=0;a<l;a++)if(o>=0&&s>=0?(d=n*t+a<<2,f=(s+n)*i+o+a<<2):(d=(-s+n)*t-o+a<<2,f=n*i+a<<2),c==0)r[f]=e[d],r[f+1]=e[d+1],r[f+2]=e[d+2],r[f+3]=e[d+3];else if(c==1){var p=e[d+3]*(1/255),m=e[d]*p,h=e[d+1]*p,g=e[d+2]*p,_=r[f+3]*(1/255),v=r[f]*_,y=r[f+1]*_,b=r[f+2]*_;let t=1-p,n=p+_*t,i=n==0?0:1/n;r[f+3]=255*n,r[f+0]=(m+v*t)*i,r[f+1]=(h+y*t)*i,r[f+2]=(g+b*t)*i}else if(c==2)p=e[d+3],m=e[d],h=e[d+1],g=e[d+2],_=r[f+3],v=r[f],y=r[f+1],b=r[f+2],p==_&&m==v&&h==y&&g==b?(r[f]=0,r[f+1]=0,r[f+2]=0,r[f+3]=0):(r[f]=m,r[f+1]=h,r[f+2]=g,r[f+3]=p);else if(c==3){if(p=e[d+3],m=e[d],h=e[d+1],g=e[d+2],_=r[f+3],v=r[f],y=r[f+1],b=r[f+2],p==_&&m==v&&h==y&&g==b)continue;if(p<220&&_>20)return!1}return!0}return{decode:function(t){let a=new Uint8Array(t),o=8,s=e,l=s.readUshort,u=s.readUint,d={tabs:{},frames:[]},f=new Uint8Array(a.length),p,m=0,h=0,g=[137,80,78,71,13,10,26,10];for(var _=0;_<8;_++)if(a[_]!=g[_])throw`The input is not a PNG file!`;for(;o<a.length;){let e=s.readUint(a,o);o+=4;let t=s.readASCII(a,o,4);if(o+=4,t==`IHDR`)c(a,o,d);else if(t==`iCCP`){for(var v=o;a[v]!=0;)v++;s.readASCII(a,o,v-o),a[v+1];let n=a.slice(v+2,o+e),c=null;try{c=r(n)}catch{c=i(n)}d.tabs[t]=c}else if(t==`CgBI`)d.tabs[t]=a.slice(o,o+4);else if(t==`IDAT`){for(_=0;_<e;_++)f[m+_]=a[o+_];m+=e}else if(t==`acTL`)d.tabs[t]={num_frames:u(a,o),num_plays:u(a,o+4)},p=new Uint8Array(a.length);else if(t==`fcTL`){h!=0&&((w=d.frames[d.frames.length-1]).data=n(d,p.slice(0,h),w.rect.width,w.rect.height),h=0);let e={x:u(a,o+12),y:u(a,o+16),width:u(a,o+4),height:u(a,o+8)},t=l(a,o+22);t=l(a,o+20)/(t==0?100:t);let r={rect:e,delay:Math.round(1e3*t),dispose:a[o+24],blend:a[o+25]};d.frames.push(r)}else if(t==`fdAT`){for(_=0;_<e-4;_++)p[h+_]=a[o+_+4];h+=e-4}else if(t==`pHYs`)d.tabs[t]=[s.readUint(a,o),s.readUint(a,o+4),a[o+8]];else if(t==`cHRM`)for(d.tabs[t]=[],_=0;_<8;_++)d.tabs[t].push(s.readUint(a,o+4*_));else if(t==`tEXt`||t==`zTXt`){d.tabs[t]??(d.tabs[t]={});var y=s.nextZero(a,o),b=s.readASCII(a,o,y-o),x=o+e-y-1;if(t==`tEXt`)C=s.readASCII(a,y+1,x);else{var S=r(a.slice(y+2,y+2+x));C=s.readUTF8(S,0,S.length)}d.tabs[t][b]=C}else if(t==`iTXt`){d.tabs[t]??(d.tabs[t]={}),y=0,v=o,y=s.nextZero(a,v),b=s.readASCII(a,v,y-v);let n=a[v=y+1];var C;a[v+1],v+=2,y=s.nextZero(a,v),s.readASCII(a,v,y-v),v=y+1,y=s.nextZero(a,v),s.readUTF8(a,v,y-v),x=e-((v=y+1)-o),n==0?C=s.readUTF8(a,v,x):(S=r(a.slice(v,v+x)),C=s.readUTF8(S,0,S.length)),d.tabs[t][b]=C}else if(t==`PLTE`)d.tabs[t]=s.readBytes(a,o,e);else if(t==`hIST`){let e=d.tabs.PLTE.length/3;for(d.tabs[t]=[],_=0;_<e;_++)d.tabs[t].push(l(a,o+2*_))}else if(t==`tRNS`)d.ctype==3?d.tabs[t]=s.readBytes(a,o,e):d.ctype==0?d.tabs[t]=l(a,o):d.ctype==2&&(d.tabs[t]=[l(a,o),l(a,o+2),l(a,o+4)]);else if(t==`gAMA`)d.tabs[t]=s.readUint(a,o)/1e5;else if(t==`sRGB`)d.tabs[t]=a[o];else if(t==`bKGD`)d.ctype==0||d.ctype==4?d.tabs[t]=[l(a,o)]:d.ctype==2||d.ctype==6?d.tabs[t]=[l(a,o),l(a,o+2),l(a,o+4)]:d.ctype==3&&(d.tabs[t]=a[o]);else if(t==`IEND`)break;o+=e,s.readUint(a,o),o+=4}var w;return h!=0&&((w=d.frames[d.frames.length-1]).data=n(d,p.slice(0,h),w.rect.width,w.rect.height)),d.data=n(d,f,d.width,d.height),delete d.compress,delete d.interlace,delete d.filter,d},toRGBA8:function(e){let n=e.width,r=e.height;if(e.tabs.acTL==null)return[t(e.data,n,r,e).buffer];let i=[];e.frames[0].data??(e.frames[0].data=e.data);let a=n*r*4,o=new Uint8Array(a),s=new Uint8Array(a),c=new Uint8Array(a);for(let d=0;d<e.frames.length;d++){let f=e.frames[d],p=f.rect.x,m=f.rect.y,h=f.rect.width,g=f.rect.height,_=t(f.data,h,g,e);if(d!=0)for(var u=0;u<a;u++)c[u]=o[u];if(f.blend==0?l(_,h,g,o,n,r,p,m,0):f.blend==1&&l(_,h,g,o,n,r,p,m,1),i.push(o.buffer.slice(0)),f.dispose!=0){if(f.dispose==1)l(s,h,g,o,n,r,p,m,0);else if(f.dispose==2)for(u=0;u<a;u++)o[u]=c[u]}}return i},_paeth:s,_copyTile:l,_bin:e}}();(function(){let{_copyTile:e}=a,{_bin:t}=a,n=a._paeth;var r={table:function(){let e=new Uint32Array(256);for(let t=0;t<256;t++){let n=t;for(let e=0;e<8;e++)1&n?n=3988292384^n>>>1:n>>>=1;e[t]=n}return e}(),update(e,t,n,i){for(let a=0;a<i;a++)e=r.table[255&(e^t[n+a])]^e>>>8;return e},crc:(e,t,n)=>4294967295^r.update(4294967295,e,t,n)};function o(e,t,n,r){t[n]+=e[0]*r>>4,t[n+1]+=e[1]*r>>4,t[n+2]+=e[2]*r>>4,t[n+3]+=e[3]*r>>4}function s(e){return Math.max(0,Math.min(255,e))}function c(e,t){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+i*i+a*a}function l(e,t,n,r,i,a,l){l??=1;let u=r.length,d=[];for(var f=0;f<u;f++){let e=r[f];d.push([e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255])}for(f=0;f<u;f++){let e=4294967295;for(var p=0,m=0;m<u;m++){var h=c(d[f],d[m]);m!=f&&h<e&&(e=h,p=m)}}let g=new Uint32Array(i.buffer),_=new Int16Array(t*n*4),v=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(f=0;f<v.length;f++)v[f]=255*((v[f]+.5)/16-.5);for(let i=0;i<n;i++)for(let b=0;b<t;b++){var y;f=4*(i*t+b),l==2?(h=v[4*(3&i)+(3&b)],y=[s(e[f]+h),s(e[f+1]+h),s(e[f+2]+h),s(e[f+3]+h)]):y=[s(e[f]+_[f]),s(e[f+1]+_[f+1]),s(e[f+2]+_[f+2]),s(e[f+3]+_[f+3])],p=0;let x=16777215;for(m=0;m<u;m++){let e=c(y,d[m]);e<x&&(x=e,p=m)}let S=d[p],C=[y[0]-S[0],y[1]-S[1],y[2]-S[2],y[3]-S[3]];l==1&&(b!=t-1&&o(C,_,f+4,7),i!=n-1&&(b!=0&&o(C,_,f+4*t-4,3),o(C,_,f+4*t,5),b!=t-1&&o(C,_,f+4*t+4,1))),a[f>>2]=p,g[f>>2]=r[p]}}function u(e,n,i,a,o){o??={};let{crc:s}=r,c=t.writeUint,l=t.writeUshort,u=t.writeASCII,d=8,f=e.frames.length>1,p,m=!1,h=33+(f?20:0);if(o.sRGB!=null&&(h+=13),o.pHYs!=null&&(h+=21),o.iCCP!=null&&(p=pako.deflate(o.iCCP),h+=21+p.length+4),e.ctype==3){for(var g=e.plte.length,_=0;_<g;_++)e.plte[_]>>>24!=255&&(m=!0);h+=8+3*g+4+(m?8+1*g+4:0)}for(var v=0;v<e.frames.length;v++)f&&(h+=38),h+=(S=e.frames[v]).cimg.length+12,v!=0&&(h+=4);h+=12;let y=new Uint8Array(h),b=[137,80,78,71,13,10,26,10];for(_=0;_<8;_++)y[_]=b[_];if(c(y,d,13),d+=4,u(y,d,`IHDR`),d+=4,c(y,d,n),d+=4,c(y,d,i),d+=4,y[d]=e.depth,d++,y[d]=e.ctype,d++,y[d]=0,d++,y[d]=0,d++,y[d]=0,d++,c(y,d,s(y,d-17,17)),d+=4,o.sRGB!=null&&(c(y,d,1),d+=4,u(y,d,`sRGB`),d+=4,y[d]=o.sRGB,d++,c(y,d,s(y,d-5,5)),d+=4),o.iCCP!=null){let e=13+p.length;c(y,d,e),d+=4,u(y,d,`iCCP`),d+=4,u(y,d,`ICC profile`),d+=11,d+=2,y.set(p,d),d+=p.length,c(y,d,s(y,d-(e+4),e+4)),d+=4}if(o.pHYs!=null&&(c(y,d,9),d+=4,u(y,d,`pHYs`),d+=4,c(y,d,o.pHYs[0]),d+=4,c(y,d,o.pHYs[1]),d+=4,y[d]=o.pHYs[2],d++,c(y,d,s(y,d-13,13)),d+=4),f&&(c(y,d,8),d+=4,u(y,d,`acTL`),d+=4,c(y,d,e.frames.length),d+=4,c(y,d,o.loop==null?0:o.loop),d+=4,c(y,d,s(y,d-12,12)),d+=4),e.ctype==3){for(c(y,d,3*(g=e.plte.length)),d+=4,u(y,d,`PLTE`),d+=4,_=0;_<g;_++){let t=3*_,n=e.plte[_],r=255&n,i=n>>>8&255,a=n>>>16&255;y[d+t+0]=r,y[d+t+1]=i,y[d+t+2]=a}if(d+=3*g,c(y,d,s(y,d-3*g-4,3*g+4)),d+=4,m){for(c(y,d,g),d+=4,u(y,d,`tRNS`),d+=4,_=0;_<g;_++)y[d+_]=e.plte[_]>>>24&255;d+=g,c(y,d,s(y,d-g-4,g+4)),d+=4}}let x=0;for(v=0;v<e.frames.length;v++){var S=e.frames[v];f&&(c(y,d,26),d+=4,u(y,d,`fcTL`),d+=4,c(y,d,x++),d+=4,c(y,d,S.rect.width),d+=4,c(y,d,S.rect.height),d+=4,c(y,d,S.rect.x),d+=4,c(y,d,S.rect.y),d+=4,l(y,d,a[v]),d+=2,l(y,d,1e3),d+=2,y[d]=S.dispose,d++,y[d]=S.blend,d++,c(y,d,s(y,d-30,30)),d+=4);let t=S.cimg;c(y,d,(g=t.length)+(v==0?0:4)),d+=4;let n=d;u(y,d,v==0?`IDAT`:`fdAT`),d+=4,v!=0&&(c(y,d,x++),d+=4),y.set(t,d),d+=g,c(y,d,s(y,n,d-n)),d+=4}return c(y,d,0),d+=4,u(y,d,`IEND`),d+=4,c(y,d,s(y,d-4,4)),d+=4,y.buffer}function d(e,t,n){for(let r=0;r<e.frames.length;r++){let i=e.frames[r];i.rect.width;let a=i.rect.height,o=new Uint8Array(a*i.bpl+a);i.cimg=h(i.img,a,i.bpp,i.bpl,o,t,n)}}function f(t,n,r,i,a){let o=a[0],s=a[1],c=a[2],u=a[3],d=a[4],f=a[5],h=6,g=8,v=255;for(var y=0;y<t.length;y++){let e=new Uint8Array(t[y]);for(var b=e.length,x=0;x<b;x+=4)v&=e[x+3]}let S=v!=255,C=function(t,n,r,i,a,o){let s=[];for(var c=0;c<t.length;c++){let d=new Uint8Array(t[c]),p=new Uint32Array(d.buffer);var l;let h=0,g=0,_=n,v=r,y=+!!i;if(c!=0){let b=o||i||c==1||s[c-2].dispose!=0?1:2,x=0,S=1e9;for(let e=0;e<b;e++){var u=new Uint8Array(t[c-1-e]);let i=new Uint32Array(t[c-1-e]),o=n,s=r,l=-1,d=-1;for(let e=0;e<r;e++)for(let t=0;t<n;t++)p[f=e*n+t]!=i[f]&&(t<o&&(o=t),t>l&&(l=t),e<s&&(s=e),e>d&&(d=e));l==-1&&(o=s=l=d=0),a&&((1&o)==1&&o--,(1&s)==1&&s--);let m=(l-o+1)*(d-s+1);m<S&&(S=m,x=e,h=o,g=s,_=l-o+1,v=d-s+1)}u=new Uint8Array(t[c-1-x]),x==1&&(s[c-1].dispose=2),l=new Uint8Array(_*v*4),e(u,n,r,l,_,v,-h,-g,0),y=+!!e(d,n,r,l,_,v,-h,-g,3),y==1?m(d,n,r,l,{x:h,y:g,width:_,height:v}):e(d,n,r,l,_,v,-h,-g,0)}else l=d.slice(0);s.push({rect:{x:h,y:g,width:_,height:v},img:l,blend:y,dispose:0})}if(i)for(c=0;c<s.length;c++){if((h=s[c]).blend==1)continue;let e=h.rect,i=s[c-1].rect,o=Math.min(e.x,i.x),l=Math.min(e.y,i.y),u={x:o,y:l,width:Math.max(e.x+e.width,i.x+i.width)-o,height:Math.max(e.y+e.height,i.y+i.height)-l};s[c-1].dispose=1,c-1!=0&&p(t,n,r,s,c-1,u,a),p(t,n,r,s,c,u,a)}let d=0;if(t.length!=1)for(var f=0;f<s.length;f++){var h;d+=(h=s[f]).rect.width*h.rect.height}return s}(t,n,r,o,s,c),w={},T=[],E=[];if(i!=0){let e=[];for(x=0;x<C.length;x++)e.push(C[x].img.buffer);let t=_(function(e){let t=0;for(var n=0;n<e.length;n++)t+=e[n].byteLength;let r=new Uint8Array(t),i=0;for(n=0;n<e.length;n++){let t=new Uint8Array(e[n]),a=t.length;for(let e=0;e<a;e+=4){let n=t[e],a=t[e+1],o=t[e+2],s=t[e+3];s==0&&(n=a=o=0),r[i+e]=n,r[i+e+1]=a,r[i+e+2]=o,r[i+e+3]=s}i+=a}return r.buffer}(e),i);for(x=0;x<t.plte.length;x++)T.push(t.plte[x].est.rgba);let n=0;for(x=0;x<C.length;x++){let e=(O=C[x]).img.length;var D=new Uint8Array(t.inds.buffer,n>>2,e>>2);E.push(D);let r=new Uint8Array(t.abuf,n,e);f&&l(O.img,O.rect.width,O.rect.height,T,r,D),O.img.set(r),n+=e}}else for(y=0;y<C.length;y++){var O=C[y];let e=new Uint32Array(O.img.buffer);var k=O.rect.width;for(b=e.length,D=new Uint8Array(b),E.push(D),x=0;x<b;x++){let t=e[x];if(x!=0&&t==e[x-1])D[x]=D[x-1];else if(x>k&&t==e[x-k])D[x]=D[x-k];else{let e=w[t];if(e==null&&(w[t]=e=T.length,T.push(t),T.length>=300))break;D[x]=e}}}let A=T.length;for(A<=256&&d==0&&(g=A<=2?1:A<=4?2:A<=16?4:8,g=Math.max(g,u)),y=0;y<C.length;y++){(O=C[y]).rect.x,O.rect.y,k=O.rect.width;let e=O.rect.height,t=O.img;new Uint32Array(t.buffer);let n=4*k,r=4;if(A<=256&&d==0){n=Math.ceil(g*k/8);var j=new Uint8Array(n*e);let i=E[y];for(let t=0;t<e;t++){x=t*n;let e=t*k;if(g==8)for(var M=0;M<k;M++)j[x+M]=i[e+M];else if(g==4)for(M=0;M<k;M++)j[x+(M>>1)]|=i[e+M]<<4-4*(1&M);else if(g==2)for(M=0;M<k;M++)j[x+(M>>2)]|=i[e+M]<<6-2*(3&M);else if(g==1)for(M=0;M<k;M++)j[x+(M>>3)]|=i[e+M]<<7-1*(7&M)}t=j,h=3,r=1}else if(S==0&&C.length==1){j=new Uint8Array(k*e*3);let i=k*e;for(x=0;x<i;x++){let e=3*x,n=4*x;j[e]=t[n],j[e+1]=t[n+1],j[e+2]=t[n+2]}t=j,h=2,r=3,n=3*k}O.img=t,O.bpl=n,O.bpp=r}return{ctype:h,depth:g,plte:T,frames:C}}function p(t,n,r,i,a,o,s){let c=Uint8Array,l=Uint32Array,u=new c(t[a-1]),d=new l(t[a-1]),f=a+1<t.length?new c(t[a+1]):null,p=new c(t[a]),h=new l(p.buffer),g=n,_=r,v=-1,y=-1;for(let e=0;e<o.height;e++)for(let t=0;t<o.width;t++){let r=o.x+t,s=o.y+e,c=s*n+r,l=h[c];l==0||i[a-1].dispose==0&&d[c]==l&&(f==null||f[4*c+3]!=0)||(r<g&&(g=r),r>v&&(v=r),s<_&&(_=s),s>y&&(y=s))}v==-1&&(g=_=v=y=0),s&&((1&g)==1&&g--,(1&_)==1&&_--),o={x:g,y:_,width:v-g+1,height:y-_+1};let b=i[a];b.rect=o,b.blend=1,b.img=new Uint8Array(o.width*o.height*4),i[a-1].dispose==0?(e(u,n,r,b.img,o.width,o.height,-o.x,-o.y,0),m(p,n,r,b.img,o)):e(p,n,r,b.img,o.width,o.height,-o.x,-o.y,0)}function m(t,n,r,i,a){e(t,n,r,i,a.width,a.height,-a.x,-a.y,2)}function h(e,t,n,r,a,o,s){let c=[],l,u=[0,1,2,3,4];o==-1?(t*r>5e5||n==1)&&(u=[0]):u=[o],s&&(l={level:0});let d=i;for(var f=0;f<u.length;f++){for(let i=0;i<t;i++)g(a,e,i,r,n,u[f]);c.push(d.deflate(a,l))}let p,m=1e9;for(f=0;f<c.length;f++)c[f].length<m&&(p=f,m=c[f].length);return c[p]}function g(e,t,r,i,a,o){let s=r*i,c=s+r;if(e[c]=o,c++,o==0)if(i<500)for(var l=0;l<i;l++)e[c+l]=t[s+l];else e.set(new Uint8Array(t.buffer,s,i),c);else if(o==1){for(l=0;l<a;l++)e[c+l]=t[s+l];for(l=a;l<i;l++)e[c+l]=t[s+l]-t[s+l-a]+256&255}else if(r==0){for(l=0;l<a;l++)e[c+l]=t[s+l];if(o==2)for(l=a;l<i;l++)e[c+l]=t[s+l];if(o==3)for(l=a;l<i;l++)e[c+l]=t[s+l]-(t[s+l-a]>>1)+256&255;if(o==4)for(l=a;l<i;l++)e[c+l]=t[s+l]-n(t[s+l-a],0,0)+256&255}else{if(o==2)for(l=0;l<i;l++)e[c+l]=t[s+l]+256-t[s+l-i]&255;if(o==3){for(l=0;l<a;l++)e[c+l]=t[s+l]+256-(t[s+l-i]>>1)&255;for(l=a;l<i;l++)e[c+l]=t[s+l]+256-(t[s+l-i]+t[s+l-a]>>1)&255}if(o==4){for(l=0;l<a;l++)e[c+l]=t[s+l]+256-n(0,t[s+l-i],0)&255;for(l=a;l<i;l++)e[c+l]=t[s+l]+256-n(t[s+l-a],t[s+l-i],t[s+l-a-i])&255}}}function _(e,t){let n=new Uint8Array(e),r=n.slice(0),i=new Uint32Array(r.buffer),a=v(r,t),o=a[0],s=a[1],c=n.length,l=new Uint8Array(c>>2),u;if(n.length<2e7)for(var d=0;d<c;d+=4)u=y(o,f=n[d]*(1/255),p=n[d+1]*(1/255),m=n[d+2]*(1/255),h=n[d+3]*(1/255)),l[d>>2]=u.ind,i[d>>2]=u.est.rgba;else for(d=0;d<c;d+=4){var f=n[d]*(1/255),p=n[d+1]*(1/255),m=n[d+2]*(1/255),h=n[d+3]*(1/255);for(u=o;u.left;)u=b(u.est,f,p,m,h)<=0?u.left:u.right;l[d>>2]=u.ind,i[d>>2]=u.est.rgba}return{abuf:r.buffer,inds:l,plte:s}}function v(e,t,n){n??=1e-4;let r=new Uint32Array(e.buffer),i={i0:0,i1:e.length,bst:null,est:null,tdst:0,left:null,right:null};i.bst=C(e,i.i0,i.i1),i.est=w(i.bst);let a=[i];for(;a.length<t;){let t=0,i=0;for(var o=0;o<a.length;o++)a[o].est.L>t&&(t=a[o].est.L,i=o);if(t<n)break;let s=a[i],c=x(e,r,s.i0,s.i1,s.est.e,s.est.eMq255);if(s.i0>=c||s.i1<=c){s.est.L=0;continue}let l={i0:s.i0,i1:c,bst:null,est:null,tdst:0,left:null,right:null};l.bst=C(e,l.i0,l.i1),l.est=w(l.bst);let u={i0:c,i1:s.i1,bst:null,est:null,tdst:0,left:null,right:null};for(u.bst={R:[],m:[],N:s.bst.N-l.bst.N},o=0;o<16;o++)u.bst.R[o]=s.bst.R[o]-l.bst.R[o];for(o=0;o<4;o++)u.bst.m[o]=s.bst.m[o]-l.bst.m[o];u.est=w(u.bst),s.left=l,s.right=u,a[i]=l,a.push(u)}for(a.sort(((e,t)=>t.bst.N-e.bst.N)),o=0;o<a.length;o++)a[o].ind=o;return[i,a]}function y(e,t,n,r,i){if(e.left==null)return e.tdst=function(e,t,n,r,i){let a=t-e[0],o=n-e[1],s=r-e[2],c=i-e[3];return a*a+o*o+s*s+c*c}(e.est.q,t,n,r,i),e;let a=b(e.est,t,n,r,i),o=e.left,s=e.right;a>0&&(o=e.right,s=e.left);let c=y(o,t,n,r,i);if(c.tdst<=a*a)return c;let l=y(s,t,n,r,i);return l.tdst<c.tdst?l:c}function b(e,t,n,r,i){let{e:a}=e;return a[0]*t+a[1]*n+a[2]*r+a[3]*i-e.eMq}function x(e,t,n,r,i,a){for(r-=4;n<r;){for(;S(e,n,i)<=a;)n+=4;for(;S(e,r,i)>a;)r-=4;if(n>=r)break;let o=t[n>>2];t[n>>2]=t[r>>2],t[r>>2]=o,n+=4,r-=4}for(;S(e,n,i)>a;)n-=4;return n+4}function S(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]+e[t+3]*n[3]}function C(e,t,n){let r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=[0,0,0,0],a=n-t>>2;for(let a=t;a<n;a+=4){let t=e[a]*(1/255),n=e[a+1]*(1/255),o=e[a+2]*(1/255),s=e[a+3]*(1/255);i[0]+=t,i[1]+=n,i[2]+=o,i[3]+=s,r[0]+=t*t,r[1]+=t*n,r[2]+=t*o,r[3]+=t*s,r[5]+=n*n,r[6]+=n*o,r[7]+=n*s,r[10]+=o*o,r[11]+=o*s,r[15]+=s*s}return r[4]=r[1],r[8]=r[2],r[9]=r[6],r[12]=r[3],r[13]=r[7],r[14]=r[11],{R:r,m:i,N:a}}function w(e){let{R:t}=e,{m:n}=e,{N:r}=e,i=n[0],a=n[1],o=n[2],s=n[3],c=r==0?0:1/r,l=[t[0]-i*i*c,t[1]-i*a*c,t[2]-i*o*c,t[3]-i*s*c,t[4]-a*i*c,t[5]-a*a*c,t[6]-a*o*c,t[7]-a*s*c,t[8]-o*i*c,t[9]-o*a*c,t[10]-o*o*c,t[11]-o*s*c,t[12]-s*i*c,t[13]-s*a*c,t[14]-s*o*c,t[15]-s*s*c],u=l,d=T,f=[Math.random(),Math.random(),Math.random(),Math.random()],p=0,m=0;if(r!=0)for(let e=0;e<16&&(f=d.multVec(u,f),m=Math.sqrt(d.dot(f,f)),f=d.sml(1/m,f),!(e!=0&&Math.abs(m-p)<1e-9));e++)p=m;let h=[i*c,a*c,o*c,s*c];return{Cov:l,q:h,e:f,L:p,eMq255:d.dot(d.sml(255,h),f),eMq:d.dot(f,h),rgba:(Math.round(255*h[3])<<24|Math.round(255*h[2])<<16|Math.round(255*h[1])<<8|Math.round(255*h[0])<<0)>>>0}}var T={multVec:(e,t)=>[e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],e[4]*t[0]+e[5]*t[1]+e[6]*t[2]+e[7]*t[3],e[8]*t[0]+e[9]*t[1]+e[10]*t[2]+e[11]*t[3],e[12]*t[0]+e[13]*t[1]+e[14]*t[2]+e[15]*t[3]],dot:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],sml:(e,t)=>[e*t[0],e*t[1],e*t[2],e*t[3]]};a.encode=function(e,t,n,r,i,a,o){r??=0,o??=!1;let s=f(e,t,n,r,[!1,!1,!1,0,o,!1]);return d(s,-1),u(s,t,n,i,a)},a.encodeLL=function(e,t,n,r,i,a,o,s){let c={ctype:0+(r==1?0:2)+(i==0?0:4),depth:a,frames:[]},l=(r+i)*a,f=l*t;for(let r=0;r<e.length;r++)c.frames.push({rect:{x:0,y:0,width:t,height:n},img:new Uint8Array(e[r]),blend:0,dispose:1,bpp:Math.ceil(l/8),bpl:Math.ceil(f/8)});return d(c,0,!0),u(c,t,n,o,s)},a.encode.compress=f,a.encode.dither=l,a.quantize=_,a.quantize.getKDtree=v,a.quantize.getNearest=y})();let o={toArrayBuffer(e,t){let n=e.width,r=e.height,i=n<<2,a=e.getContext(`2d`).getImageData(0,0,n,r),s=new Uint32Array(a.data.buffer),c=(32*n+31)/32<<2,l=c*r,u=122+l,d=new ArrayBuffer(u),f=new DataView(d),p=1<<20,m,h,g,_,v=p,y=0,b=0,x=0;function S(e){f.setUint16(b,e,!0),b+=2}function C(e){f.setUint32(b,e,!0),b+=4}function w(e){b+=e}S(19778),C(u),w(4),C(122),C(108),C(n),C(-r>>>0),S(1),S(32),C(3),C(l),C(2835),C(2835),w(8),C(16711680),C(65280),C(255),C(4278190080),C(1466527264),function e(){for(;y<r&&v>0;){for(_=122+y*c,m=0;m<i;)v--,h=s[x++],g=h>>>24,f.setUint32(_+m,h<<8|g),m+=4;y++}x<s.length?(v=p,setTimeout(e,o._dly)):t(d)}()},toBlob(e,t){this.toArrayBuffer(e,(e=>{t(new Blob([e],{type:`image/bmp`}))}))},_dly:9};var s={CHROME:`CHROME`,FIREFOX:`FIREFOX`,DESKTOP_SAFARI:`DESKTOP_SAFARI`,IE:`IE`,IOS:`IOS`,ETC:`ETC`},c={[s.CHROME]:16384,[s.FIREFOX]:11180,[s.DESKTOP_SAFARI]:16384,[s.IE]:8192,[s.IOS]:4096,[s.ETC]:8192};let l=typeof window<`u`,u=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope,d=l&&window.cordova&&window.cordova.require&&window.cordova.require(`cordova/modulemapper`),f=(l||u)&&(d&&d.getOriginalSymbol(window,`File`)||typeof File<`u`&&File),p=(l||u)&&(d&&d.getOriginalSymbol(window,`FileReader`)||typeof FileReader<`u`&&FileReader);function m(e,t,n=Date.now()){return new Promise((r=>{let i=e.split(`,`),a=i[0].match(/:(.*?);/)[1],o=globalThis.atob(i[1]),s=o.length,c=new Uint8Array(s);for(;s--;)c[s]=o.charCodeAt(s);let l=new Blob([c],{type:a});l.name=t,l.lastModified=n,r(l)}))}function h(e){return new Promise(((t,n)=>{let r=new p;r.onload=()=>t(r.result),r.onerror=e=>n(e),r.readAsDataURL(e)}))}function g(e){return new Promise(((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=e=>n(e),r.src=e}))}function _(){if(_.cachedResult!==void 0)return _.cachedResult;let e=s.ETC,{userAgent:t}=navigator;return/Chrom(e|ium)/i.test(t)?e=s.CHROME:/iP(ad|od|hone)/i.test(t)&&/WebKit/i.test(t)?e=s.IOS:/Safari/i.test(t)?e=s.DESKTOP_SAFARI:/Firefox/i.test(t)?e=s.FIREFOX:(/MSIE/i.test(t)||!!document.documentMode==1)&&(e=s.IE),_.cachedResult=e,_.cachedResult}function v(e,t){let n=c[_()],r=e,i=t,a=r*i,o=r>i?i/r:r/i;for(;a>n*n;){let e=(n+r)/2,t=(n+i)/2;e<t?(i=t,r=t*o):(i=e*o,r=e),a=r*i}return{width:r,height:i}}function y(e,t){let n,r;try{if(n=new OffscreenCanvas(e,t),r=n.getContext(`2d`),r===null)throw Error(`getContext of OffscreenCanvas returns null`)}catch{n=document.createElement(`canvas`),r=n.getContext(`2d`)}return n.width=e,n.height=t,[n,r]}function b(e,t){let{width:n,height:r}=v(e.width,e.height),[i,a]=y(n,r);return t&&/jpe?g/.test(t)&&(a.fillStyle=`white`,a.fillRect(0,0,i.width,i.height)),a.drawImage(e,0,0,i.width,i.height),i}function x(){return x.cachedResult!==void 0||(x.cachedResult=[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&typeof document<`u`&&`ontouchend`in document),x.cachedResult}function S(e,t={}){return new Promise((function(n,r){let i,a;var o=function(){try{return a=b(i,t.fileType||e.type),n([i,a])}catch(e){return r(e)}},c=function(t){try{var n=function(e){try{throw e}catch(e){return r(e)}};try{let t;return h(e).then((function(e){try{return t=e,g(t).then((function(e){try{return i=e,function(){try{return o()}catch(e){return r(e)}}()}catch(e){return n(e)}}),n)}catch(e){return n(e)}}),n)}catch(e){n(e)}}catch(e){return r(e)}};try{if(x()||[s.DESKTOP_SAFARI,s.MOBILE_SAFARI].includes(_()))throw Error(`Skip createImageBitmap on IOS and Safari`);return createImageBitmap(e).then((function(e){try{return i=e,o()}catch{return c()}}),c)}catch{c()}}))}function C(e,t,n,r,i=1){return new Promise((function(s,c){let l;if(t===`image/png`){let o,s,c;return o=e.getContext(`2d`),{data:s}=o.getImageData(0,0,e.width,e.height),c=a.encode([s.buffer],e.width,e.height,4096*i),l=new Blob([c],{type:t}),l.name=n,l.lastModified=r,u.call(this)}{if(t===`image/bmp`)return new Promise((t=>o.toBlob(e,t))).then(function(e){try{return l=e,l.name=n,l.lastModified=r,a.call(this)}catch(e){return c(e)}}.bind(this),c);{if(typeof OffscreenCanvas==`function`&&e instanceof OffscreenCanvas)return e.convertToBlob({type:t,quality:i}).then(function(e){try{return l=e,l.name=n,l.lastModified=r,o.call(this)}catch(e){return c(e)}}.bind(this),c);{let a;return a=e.toDataURL(t,i),m(a,n,r).then(function(e){try{return l=e,o.call(this)}catch(e){return c(e)}}.bind(this),c)}function o(){return a.call(this)}}function a(){return u.call(this)}}function u(){return s(l)}}))}function w(e){e.width=0,e.height=0}function T(){return new Promise((function(e,t){let n,r,i,a;return T.cachedResult===void 0?m(`data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==`,`test.jpg`,Date.now()).then((function(o){try{return n=o,S(n).then((function(o){try{return r=o[1],C(r,n.type,n.name,n.lastModified).then((function(n){try{return i=n,w(r),S(i).then((function(n){try{return a=n[0],T.cachedResult=a.width===1&&a.height===2,e(T.cachedResult)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t)}catch(e){return t(e)}}),t):e(T.cachedResult)}))}function E(e){return new Promise(((t,n)=>{let r=new p;r.onload=e=>{let n=new DataView(e.target.result);if(n.getUint16(0,!1)!=65496)return t(-2);let r=n.byteLength,i=2;for(;i<r;){if(n.getUint16(i+2,!1)<=8)return t(-1);let e=n.getUint16(i,!1);if(i+=2,e==65505){if(n.getUint32(i+=2,!1)!=1165519206)return t(-1);let e=n.getUint16(i+=6,!1)==18761;i+=n.getUint32(i+4,e);let r=n.getUint16(i,e);i+=2;for(let a=0;a<r;a++)if(n.getUint16(i+12*a,e)==274)return t(n.getUint16(i+12*a+8,e))}else{if((65280&e)!=65280)break;i+=n.getUint16(i,!1)}}return t(-1)},r.onerror=e=>n(e),r.readAsArrayBuffer(e)}))}function D(e,t){let{width:n}=e,{height:r}=e,{maxWidthOrHeight:i}=t,a,o=e;return isFinite(i)&&(n>i||r>i)&&([o,a]=y(n,r),n>r?(o.width=i,o.height=r/n*i):(o.width=n/r*i,o.height=i),a.drawImage(e,0,0,o.width,o.height),w(e)),o}function O(e,t){let{width:n}=e,{height:r}=e,[i,a]=y(n,r);switch(t>4&&t<9?(i.width=r,i.height=n):(i.width=n,i.height=r),t){case 2:a.transform(-1,0,0,1,n,0);break;case 3:a.transform(-1,0,0,-1,n,r);break;case 4:a.transform(1,0,0,-1,0,r);break;case 5:a.transform(0,1,1,0,0,0);break;case 6:a.transform(0,1,-1,0,r,0);break;case 7:a.transform(0,-1,-1,0,r,n);break;case 8:a.transform(0,-1,1,0,0,n)}return a.drawImage(e,0,0,n,r),w(e),i}function k(e,t,n=0){return new Promise((function(r,i){let a,o,s,c,l,u,d,f,p,m,h,g,_,v,b,x,k,A,j,M;function N(e=5){if(t.signal&&t.signal.aborted)throw t.signal.reason;a+=e,t.onProgress(Math.min(a,100))}function P(e){if(t.signal&&t.signal.aborted)throw t.signal.reason;a=Math.min(Math.max(e,a),100),t.onProgress(a)}return a=n,o=t.maxIteration||10,s=1024*t.maxSizeMB*1024,N(),S(e,t).then(function(n){try{return[,c]=n,N(),l=D(c,t),N(),new Promise((function(n,r){var i;if(!(i=t.exifOrientation))return E(e).then(function(e){try{return i=e,a.call(this)}catch(e){return r(e)}}.bind(this),r);function a(){return n(i)}return a.call(this)})).then(function(n){try{return u=n,N(),T().then(function(n){try{return d=n?l:O(l,u),N(),f=t.initialQuality||1,p=t.fileType||e.type,C(d,p,e.name,e.lastModified,f).then(function(n){try{{if(m=n,N(),h=m.size>s,g=m.size>e.size,!h&&!g)return P(100),r(m);var a;function u(){if(o--&&(b>s||b>_)){let t,n;return t=M?.95*j.width:j.width,n=M?.95*j.height:j.height,[k,A]=y(t,n),A.drawImage(j,0,0,t,n),f*=p===`image/png`?.85:.95,C(k,p,e.name,e.lastModified,f).then((function(e){try{return x=e,w(j),j=k,b=x.size,P(Math.min(99,Math.floor((v-b)/(v-s)*100))),u}catch(e){return i(e)}}),i)}return[1]}return _=e.size,v=m.size,b=v,j=d,M=!t.alwaysKeepResolution&&h,(a=function(e){for(;e;){if(e.then)return void e.then(a,i);try{if(e.pop){if(e.length)return e.pop()?S.call(this):e;e=u}else e=e.call(this)}catch(e){return i(e)}}}.bind(this))(u);function S(){return w(j),w(k),w(l),w(d),w(c),P(100),r(x)}}}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}catch(e){return i(e)}}.bind(this),i)}))}let A;function j(e,t){return new Promise(((n,r)=>{A||=function(e){let t=[];return typeof e==`function`?t.push(`(${e})()`):t.push(e),URL.createObjectURL(new Blob(t))}(`
2
2
  let scriptImported = false
3
3
  self.addEventListener('message', async (e) => {
4
4
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -1,3 +1,3 @@
1
- __useblocks__.define(`static/core/e9ed0819.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/3fe138bd.js`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./3fe138bd.js");function a(e){return function(t){return{setOptions:()=>{},instance:{},dispose:()=>{},...e(t)||{}}}}function o(e){return t=>{let n={},r=[];for(let n of e)r.push(n(t));for(let e of r)Object.assign(n,e.instance);return{instance:n,setOptions:async e=>{for(let t of r)await t.setOptions(e)},dispose:()=>{for(let e of r)e.dispose()}}}}function s(){let e=new Date;return e.valueOf()-e.getTimezoneOffset()*60*1e3}function c(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return new TextDecoder().decode(r)}function l(e){let[t,n,r]=e.split(`.`),i=JSON.parse(c(n));return{exp:i.exp,createdAt:i.iat,data:i}}var u=i.eo();function d(e,t,n,r){e.inject(u,void 0),e.injectFactory(u,async(a,o)=>{try{let a=o?await o:void 0;if(!a){let t=e.getInstance(i.Oa);t&&(a=await t)}return t?!a||(l(a)?.exp??0)*1e3<=s()?await t(n,r,a):a:``}catch{return``}},!0)}var f=a(e=>{let t,n,r;return e.addService(i.ia,{execute:async n=>{if(t){let t=await e.getInstanceAsync(u);t&&n.headers.append(`authorization`,`Bearer ${t}`)}}}),{setOptions(a){let o=!i.na(n,a.user),s=r!==a.project;(t!==a.getAuthToken||o||s)&&(t=a.getAuthToken,n=a.user,r=a.project,d(e,t,a.user,a.project))}}});function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var m={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function h(e,t){function n(n,r,i){if(!(typeof document>`u`)){i=p({},t,i),typeof i.expires==`number`&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&=i.expires.toUTCString(),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a=``;for(var o in i)i[o]&&(a+=`; `+o,i[o]!==!0&&(a+=`=`+i[o].split(`;`)[0]));return document.cookie=n+`=`+e.write(r,n)+a}}function r(t){if(!(typeof document>`u`||arguments.length&&!t)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(r[s]=e.read(o,s),t===s)break}catch{}}return t?r[t]:r}}return Object.create({set:n,get:r,remove:function(e,t){n(e,``,p({},t,{expires:-1}))},withAttributes:function(e){return h(this.converter,p({},this.attributes,e))},withConverter:function(e){return h(p({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var g=h(m,{path:`/`}),_=r.a(((e,t)=>{(function(n){"use strict";var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,d=n.fetch,f=n.Response,p=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<`u`&&l!==void 0&&!(`readyState`in l)&&l.body==null&&(l.readyState=`loading`,window.addEventListener(`load`,function(e){l.readyState=`complete`},!1)),a==null&&s!=null&&(a=function(){return new s(`Microsoft.XMLHTTP`)}),Object.create??(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return new Date().getTime()}),h==null){var g=d;d=function(e,t){var n=t.signal;return g(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then(function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(e){function t(e,t,n){if(n===1)return e>=128>>t&&e<<t<=2047;if(n===2)return e>=2048>>t&&e<<t<=55295||e>=57344>>t&&e<<t<=65535;if(n===3)return e>=65536>>t&&e<<t<=1114111;throw Error()}function n(e,t){if(e===6)return t>>6>15?3:t>31?2:1;if(e===12)return t>15?3:2;if(e===18)return 3;throw Error()}for(var r=65533,i=``,a=this.bitsNeeded,o=this.codePoint,s=0;s<e.length;s+=1){var c=e[s];a!==0&&(c<128||c>191||!t(o<<6|c&63,a-6,n(a,o)))&&(a=0,o=r,i+=String.fromCharCode(o)),a===0?(c>=0&&c<=127?(a=0,o=c):c>=192&&c<=223?(a=6,o=c&31):c>=224&&c<=239?(a=12,o=c&15):c>=240&&c<=247?(a=18,o=c&7):(a=0,o=r),a!==0&&!t(o,a,n(a,o))&&(a=0,o=r)):(a-=6,o=o<<6|c&63),a===0&&(o<=65535?i+=String.fromCharCode(o):(i+=String.fromCharCode(55296+(o-65535-1>>10)),i+=String.fromCharCode(56320+(o-65535-1&1023))))}return this.bitsNeeded=a,this.codePoint=o,i},(p==null||m==null||!function(){try{return new p().decode(new m().encode(`test`),{stream:!0})===`test`}catch{}return!1}())&&(p=_);var v=function(){};function y(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText=``,this.responseText=``,this.onprogress=v,this.onload=v,this.onerror=v,this.onreadystatechange=v,this._contentType=``,this._xhr=e,this._sendTimeout=0,this._abort=v}y.prototype.open=function(e,t){this._abort(!0);var n=this,o=this._xhr,s=1,c=0;this._abort=function(e){n._sendTimeout!==0&&(i(n._sendTimeout),n._sendTimeout=0),(s===1||s===2||s===3)&&(s=4,o.onload=v,o.onerror=v,o.onabort=v,o.onprogress=v,o.onreadystatechange=v,o.abort(),c!==0&&(i(c),c=0),e||(n.readyState=4,n.onabort(null),n.onreadystatechange())),s=0};var l=function(){if(s===1){var e=0,t=``,r=void 0;if(`contentType`in o)e=200,t=`OK`,r=o.contentType;else try{e=o.status,t=o.statusText,r=o.getResponseHeader(`Content-Type`)}catch{e=0,t=``,r=void 0}e!==0&&(s=2,n.readyState=2,n.status=e,n.statusText=t,n._contentType=r,n.onreadystatechange())}},u=function(){if(l(),s===2||s===3){s=3;var e=``;try{e=o.responseText}catch{}n.readyState=3,n.responseText=e,n.onprogress()}},d=function(e,t){if((t==null||t.preventDefault==null)&&(t={preventDefault:v}),u(),s===1||s===2||s===3){if(s=4,c!==0&&(i(c),c=0),n.readyState=4,e===`load`)n.onload(t);else if(e===`error`)n.onerror(t);else if(e===`abort`)n.onabort(t);else throw TypeError();n.onreadystatechange()}},f=function(e){o!=null&&(o.readyState===4?(!(`onload`in o)||!(`onerror`in o)||!(`onabort`in o))&&d(o.responseText===``?`error`:`load`,e):o.readyState===3?`onprogress`in o||u():o.readyState===2&&l())},p=function(){c=r(function(){p()},500),o.readyState===3&&u()};`onload`in o&&(o.onload=function(e){d(`load`,e)}),`onerror`in o&&(o.onerror=function(e){d(`error`,e)}),`onabort`in o&&(o.onabort=function(e){d(`abort`,e)}),`onprogress`in o&&(o.onprogress=u),`onreadystatechange`in o&&(o.onreadystatechange=function(e){f(e)}),(`contentType`in o||!(`ontimeout`in a.prototype))&&(t+=(t.indexOf(`?`)===-1?`?`:`&`)+`padding=true`),o.open(e,t,!0),`readyState`in o&&(c=r(function(){p()},0))},y.prototype.abort=function(){this._abort(!1)},y.prototype.getResponseHeader=function(e){return this._contentType},y.prototype.setRequestHeader=function(e,t){var n=this._xhr;`setRequestHeader`in n&&n.setRequestHeader(e,t)},y.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders==null?``:this._xhr.getAllResponseHeaders()||``},y.prototype.send=function(){if((!(`ontimeout`in a.prototype)||!(`sendAsBinary`in a.prototype)&&!(`mozAnon`in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!==`complete`){var e=this;e._sendTimeout=r(function(){e._sendTimeout=0,e.send()},4);return}var t=this._xhr;`withCredentials`in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(e){throw e}};function b(e){return e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+32)})}function x(e){for(var t=Object.create(null),n=e.split(`\r
1
+ __useblocks__.define(`static/core/f6ba84b8.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/62863a09.js`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./62863a09.js");function a(e){return function(t){return{setOptions:()=>{},instance:{},dispose:()=>{},...e(t)||{}}}}function o(e){return t=>{let n={},r=[];for(let n of e)r.push(n(t));for(let e of r)Object.assign(n,e.instance);return{instance:n,setOptions:async e=>{for(let t of r)await t.setOptions(e)},dispose:()=>{for(let e of r)e.dispose()}}}}function s(){let e=new Date;return e.valueOf()-e.getTimezoneOffset()*60*1e3}function c(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return new TextDecoder().decode(r)}function l(e){let[t,n,r]=e.split(`.`),i=JSON.parse(c(n));return{exp:i.exp,createdAt:i.iat,data:i}}var u=i.eo();function d(e,t,n,r){e.inject(u,void 0),e.injectFactory(u,async(a,o)=>{try{let a=o?await o:void 0;if(!a){let t=e.getInstance(i.Oa);t&&(a=await t)}return t?!a||(l(a)?.exp??0)*1e3<=s()?await t(n,r,a):a:``}catch{return``}},!0)}var f=a(e=>{let t,n,r;return e.addService(i.ia,{execute:async n=>{if(t){let t=await e.getInstanceAsync(u);t&&n.headers.append(`authorization`,`Bearer ${t}`)}}}),{setOptions(a){let o=!i.na(n,a.user),s=r!==a.project;(t!==a.getAuthToken||o||s)&&(t=a.getAuthToken,n=a.user,r=a.project,d(e,t,a.user,a.project))}}});function p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var m={read:function(e){return e[0]===`"`&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function h(e,t){function n(n,r,i){if(!(typeof document>`u`)){i=p({},t,i),typeof i.expires==`number`&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&=i.expires.toUTCString(),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a=``;for(var o in i)i[o]&&(a+=`; `+o,i[o]!==!0&&(a+=`=`+i[o].split(`;`)[0]));return document.cookie=n+`=`+e.write(r,n)+a}}function r(t){if(!(typeof document>`u`||arguments.length&&!t)){for(var n=document.cookie?document.cookie.split(`; `):[],r={},i=0;i<n.length;i++){var a=n[i].split(`=`),o=a.slice(1).join(`=`);try{var s=decodeURIComponent(a[0]);if(r[s]=e.read(o,s),t===s)break}catch{}}return t?r[t]:r}}return Object.create({set:n,get:r,remove:function(e,t){n(e,``,p({},t,{expires:-1}))},withAttributes:function(e){return h(this.converter,p({},this.attributes,e))},withConverter:function(e){return h(p({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var g=h(m,{path:`/`}),_=r.a(((e,t)=>{(function(n){"use strict";var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,c=n.EventSource,l=n.document,u=n.Promise,d=n.fetch,f=n.Response,p=n.TextDecoder,m=n.TextEncoder,h=n.AbortController;if(typeof window<`u`&&l!==void 0&&!(`readyState`in l)&&l.body==null&&(l.readyState=`loading`,window.addEventListener(`load`,function(e){l.readyState=`complete`},!1)),a==null&&s!=null&&(a=function(){return new s(`Microsoft.XMLHTTP`)}),Object.create??(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return new Date().getTime()}),h==null){var g=d;d=function(e,t){var n=t.signal;return g(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then(function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}})},h=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function _(){this.bitsNeeded=0,this.codePoint=0}_.prototype.decode=function(e){function t(e,t,n){if(n===1)return e>=128>>t&&e<<t<=2047;if(n===2)return e>=2048>>t&&e<<t<=55295||e>=57344>>t&&e<<t<=65535;if(n===3)return e>=65536>>t&&e<<t<=1114111;throw Error()}function n(e,t){if(e===6)return t>>6>15?3:t>31?2:1;if(e===12)return t>15?3:2;if(e===18)return 3;throw Error()}for(var r=65533,i=``,a=this.bitsNeeded,o=this.codePoint,s=0;s<e.length;s+=1){var c=e[s];a!==0&&(c<128||c>191||!t(o<<6|c&63,a-6,n(a,o)))&&(a=0,o=r,i+=String.fromCharCode(o)),a===0?(c>=0&&c<=127?(a=0,o=c):c>=192&&c<=223?(a=6,o=c&31):c>=224&&c<=239?(a=12,o=c&15):c>=240&&c<=247?(a=18,o=c&7):(a=0,o=r),a!==0&&!t(o,a,n(a,o))&&(a=0,o=r)):(a-=6,o=o<<6|c&63),a===0&&(o<=65535?i+=String.fromCharCode(o):(i+=String.fromCharCode(55296+(o-65535-1>>10)),i+=String.fromCharCode(56320+(o-65535-1&1023))))}return this.bitsNeeded=a,this.codePoint=o,i},(p==null||m==null||!function(){try{return new p().decode(new m().encode(`test`),{stream:!0})===`test`}catch{}return!1}())&&(p=_);var v=function(){};function y(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText=``,this.responseText=``,this.onprogress=v,this.onload=v,this.onerror=v,this.onreadystatechange=v,this._contentType=``,this._xhr=e,this._sendTimeout=0,this._abort=v}y.prototype.open=function(e,t){this._abort(!0);var n=this,o=this._xhr,s=1,c=0;this._abort=function(e){n._sendTimeout!==0&&(i(n._sendTimeout),n._sendTimeout=0),(s===1||s===2||s===3)&&(s=4,o.onload=v,o.onerror=v,o.onabort=v,o.onprogress=v,o.onreadystatechange=v,o.abort(),c!==0&&(i(c),c=0),e||(n.readyState=4,n.onabort(null),n.onreadystatechange())),s=0};var l=function(){if(s===1){var e=0,t=``,r=void 0;if(`contentType`in o)e=200,t=`OK`,r=o.contentType;else try{e=o.status,t=o.statusText,r=o.getResponseHeader(`Content-Type`)}catch{e=0,t=``,r=void 0}e!==0&&(s=2,n.readyState=2,n.status=e,n.statusText=t,n._contentType=r,n.onreadystatechange())}},u=function(){if(l(),s===2||s===3){s=3;var e=``;try{e=o.responseText}catch{}n.readyState=3,n.responseText=e,n.onprogress()}},d=function(e,t){if((t==null||t.preventDefault==null)&&(t={preventDefault:v}),u(),s===1||s===2||s===3){if(s=4,c!==0&&(i(c),c=0),n.readyState=4,e===`load`)n.onload(t);else if(e===`error`)n.onerror(t);else if(e===`abort`)n.onabort(t);else throw TypeError();n.onreadystatechange()}},f=function(e){o!=null&&(o.readyState===4?(!(`onload`in o)||!(`onerror`in o)||!(`onabort`in o))&&d(o.responseText===``?`error`:`load`,e):o.readyState===3?`onprogress`in o||u():o.readyState===2&&l())},p=function(){c=r(function(){p()},500),o.readyState===3&&u()};`onload`in o&&(o.onload=function(e){d(`load`,e)}),`onerror`in o&&(o.onerror=function(e){d(`error`,e)}),`onabort`in o&&(o.onabort=function(e){d(`abort`,e)}),`onprogress`in o&&(o.onprogress=u),`onreadystatechange`in o&&(o.onreadystatechange=function(e){f(e)}),(`contentType`in o||!(`ontimeout`in a.prototype))&&(t+=(t.indexOf(`?`)===-1?`?`:`&`)+`padding=true`),o.open(e,t,!0),`readyState`in o&&(c=r(function(){p()},0))},y.prototype.abort=function(){this._abort(!1)},y.prototype.getResponseHeader=function(e){return this._contentType},y.prototype.setRequestHeader=function(e,t){var n=this._xhr;`setRequestHeader`in n&&n.setRequestHeader(e,t)},y.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders==null?``:this._xhr.getAllResponseHeaders()||``},y.prototype.send=function(){if((!(`ontimeout`in a.prototype)||!(`sendAsBinary`in a.prototype)&&!(`mozAnon`in a.prototype))&&l!=null&&l.readyState!=null&&l.readyState!==`complete`){var e=this;e._sendTimeout=r(function(){e._sendTimeout=0,e.send()},4);return}var t=this._xhr;`withCredentials`in t&&(t.withCredentials=this.withCredentials);try{t.send(void 0)}catch(e){throw e}};function b(e){return e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+32)})}function x(e){for(var t=Object.create(null),n=e.split(`\r
2
2
  `),r=0;r<n.length;r+=1){var i=n[r].split(`: `),a=i.shift(),o=i.join(`: `);t[b(a)]=o}this._map=t}x.prototype.get=function(e){return this._map[b(e)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function S(){}S.prototype.open=function(e,t,n,r,i,o,s){e.open(`GET`,i);var c=0;for(var l in e.onprogress=function(){var t=e.responseText.slice(c);c+=t.length,n(t)},e.onerror=function(e){e.preventDefault(),r(Error(`NetworkError`))},e.onload=function(){r(null)},e.onabort=function(){r(null)},e.onreadystatechange=function(){if(e.readyState===a.HEADERS_RECEIVED){var n=e.status,r=e.statusText;t(n,r,e.getResponseHeader(`Content-Type`),new x(e.getAllResponseHeaders()))}},e.withCredentials=o,s)Object.prototype.hasOwnProperty.call(s,l)&&e.setRequestHeader(l,s[l]);return e.send(),e};function C(e){this._headers=e}C.prototype.get=function(e){return this._headers.get(e)};function w(){}w.prototype.open=function(e,t,n,r,i,a,o){var s=null,c=new h,l=c.signal,f=new p;return d(i,{headers:o,credentials:a?`include`:`same-origin`,signal:l,cache:`no-store`}).then(function(e){return s=e.body.getReader(),t(e.status,e.statusText,e.headers.get(`Content-Type`),new C(e.headers)),new u(function(e,t){var r=function(){s.read().then(function(t){t.done?e(void 0):(n(f.decode(t.value,{stream:!0})),r())}).catch(function(e){t(e)})};r()})}).catch(function(e){if(e.name!==`AbortError`)return e}).then(function(e){r(e)}),{abort:function(){s?.cancel(),c.abort()}}};function T(){this._listeners=Object.create(null)}function E(e){r(function(){throw e},0)}T.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(t!=null)for(var n=t.length,r=0;r<n;r+=1){var i=t[r];try{typeof i.handleEvent==`function`?i.handleEvent(e):i.call(this,e)}catch(e){E(e)}}},T.prototype.addEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];r??(r=[],n[e]=r);for(var i=!1,a=0;a<r.length;a+=1)r[a]===t&&(i=!0);i||r.push(t)},T.prototype.removeEventListener=function(e,t){e=String(e);var n=this._listeners,r=n[e];if(r!=null){for(var i=[],a=0;a<r.length;a+=1)r[a]!==t&&i.push(r[a]);i.length===0?delete n[e]:n[e]=i}};function D(e){this.type=e,this.target=void 0}function O(e,t){D.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}O.prototype=Object.create(D.prototype);function k(e,t){D.call(this,e),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}k.prototype=Object.create(D.prototype);function A(e,t){D.call(this,e),this.error=t.error}A.prototype=Object.create(D.prototype);var j=-1,M=0,N=1,P=2,F=-1,I=0,L=1,R=2,z=3,B=/^text\/event\-stream(;.*)?$/i,V=1e3,H=18e6,U=function(e,t){var n=e==null?t:parseInt(e,10);return n!==n&&(n=t),W(n)},W=function(e){return Math.min(Math.max(e,V),H)},G=function(e,t,n){try{typeof t==`function`&&t.call(e,n)}catch(e){E(e)}};function K(e,t){T.call(this),t||={},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,J(this,e,t)}function ee(){return a!=null&&`withCredentials`in a.prototype||o==null?new a:new o}var q=d!=null&&f!=null&&`body`in f.prototype;function J(e,t,n){t=String(t);var a=!!n.withCredentials,o=n.lastEventIdQueryParameterName||`lastEventId`,s=W(1e3),c=U(n.heartbeatTimeout,45e3),l=``,u=s,d=!1,f=0,p=n.headers||{},m=n.Transport,h=q&&m==null?void 0:new y(m==null?ee():new m),g=m!=null&&typeof m!=`string`?new m:h==null?new w:new S,_=void 0,v=0,b=j,x=``,C=``,T=``,E=``,D=I,V=0,H=0,K=function(t,n,r,i){if(b===M)if(t===200&&r!=null&&B.test(r)){b=N,d=Date.now(),u=s,e.readyState=N;var a=new k(`open`,{status:t,statusText:n,headers:i});e.dispatchEvent(a),G(e,e.onopen,a)}else{t===200?``+(r==null?`-`:r.replace(/\s+/g,` `)):(n&&=n.replace(/\s+/g,` `),``+t+n),X();var a=new k(`error`,{status:t,statusText:n,headers:i});e.dispatchEvent(a),G(e,e.onerror,a)}},J=function(t){if(b===N){for(var n=-1,a=0;a<t.length;a+=1){var o=t.charCodeAt(a);(o===10||o===13)&&(n=a)}var p=(n===-1?``:E)+t.slice(0,n+1);E=(n===-1?E:``)+t.slice(n+1),t!==``&&(d=Date.now(),f+=t.length);for(var m=0;m<p.length;m+=1){var o=p.charCodeAt(m);if(D===F&&o===10)D=I;else if(D===F&&(D=I),o===13||o===10){if(D!==I){D===L&&(H=m+1);var h=p.slice(V,H-1),g=p.slice(H+ +(H<m&&p.charCodeAt(H)===32),m);h===`data`?(x+=`
3
3
  `,x+=g):h===`id`?C=g:h===`event`?T=g:h===`retry`?(s=U(g,s),u=s):h===`heartbeatTimeout`&&(c=U(g,c),v!==0&&(i(v),v=r(function(){Z()},c)))}if(D===I){if(x!==``){l=C,T===``&&(T=`message`);var _=new O(T,{data:x.slice(1),lastEventId:C});if(e.dispatchEvent(_),T===`open`?G(e,e.onopen,_):T===`message`?G(e,e.onmessage,_):T===`error`&&G(e,e.onerror,_),b===P)return}x=``,T=``}D=o===13?F:I}else D===I&&(V=m,D=L),D===L?o===58&&(H=m+1,D=R):D===R&&(D=z)}}},Y=function(t){if(b===N||b===M){b=j,v!==0&&(i(v),v=0),v=r(function(){Z()},u),u=W(Math.min(s*16,u*2)),e.readyState=M;var n=new A(`error`,{error:t});e.dispatchEvent(n),G(e,e.onerror,n)}},X=function(){b=P,_!=null&&(_.abort(),_=void 0),v!==0&&(i(v),v=0),e.readyState=P},Z=function(){if(v=0,b!==j){if(!d&&_!=null)Y(Error(`No activity within `+c+` milliseconds. `+(b===M?`No response received.`:f+` chars received.`)+` Reconnecting.`)),_!=null&&(_.abort(),_=void 0);else{var n=Math.max((d||Date.now())+c-Date.now(),1);d=!1,v=r(function(){Z()},n)}return}d=!1,f=0,v=r(function(){Z()},c),b=M,x=``,T=``,C=l,E=``,V=0,H=0,D=I;var i=t;if(t.slice(0,5)!==`data:`&&t.slice(0,5)!==`blob:`&&l!==``){var a=t.indexOf(`?`);i=a===-1?t:t.slice(0,a+1)+t.slice(a+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(e,t){return t===o?``:e}),i+=(t.indexOf(`?`)===-1?`?`:`&`)+o+`=`+encodeURIComponent(l)}var s=e.withCredentials,u={};u.Accept=`text/event-stream`;var p=e.headers;if(p!=null)for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(u[m]=p[m]);try{_=g.open(h,K,J,Y,i,s,u)}catch(e){throw X(),e}};e.url=t,e.readyState=M,e.withCredentials=a,e.headers=p,e._close=X,Z()}K.prototype=Object.create(T.prototype),K.prototype.CONNECTING=M,K.prototype.OPEN=N,K.prototype.CLOSED=P,K.prototype.close=function(){this._close()},K.CONNECTING=M,K.OPEN=N,K.CLOSED=P,K.prototype.withCredentials=void 0;var Y=c;a!=null&&(c==null||!(`withCredentials`in c.prototype))&&(Y=K),(function(r){if(typeof t==`object`&&typeof t.exports==`object`){var i=r(e);i!==void 0&&(t.exports=i)}else typeof define==`function`&&define.amd?define([`exports`],r):r(n)})(function(e){e.EventSourcePolyfill=K,e.NativeEventSource=c,e.EventSource=Y})})(typeof globalThis>`u`?typeof window<`u`?window:typeof self<`u`?self:e:globalThis)})),v=_();function y({candidates:e,headers:t,createEventSource:n,onMessage:r,onError:i}){let a=e.filter(Boolean),o=!1,s=null,c=()=>{s?.close(),s=null},l=e=>{if(o)return;let u=a[e];if(!u){i?.(Error(`Failed to connect to EventSource through proxy chain`));return}c();let d=n(u,{headers:t});s=d,d.onmessage=e=>{o||s!==d||r(e)},d.onerror=t=>{if(!(o||s!==d)){if(c(),e+1<a.length){l(e+1);return}i?.(t)}}};return l(0),{close(){o=!0,c()}}}var b=`https://api.unsplash.com`,x=`https://api.giphy.com/v1/gifs`;function S(e){return{error:e instanceof Error?e:Error(String(e))}}async function C(e){if(!e.ok)throw Error(`Request failed with status ${e.status}`);let t=await e.text();try{return t?JSON.parse(t):null}catch(e){throw e}}function w(e){return e&&Array.isArray(e.results)?e:e?.data&&Array.isArray(e.data.results)?e.data:e?.response&&Array.isArray(e.response.results)?e.response:{...e||{},results:[]}}var T=i.zr({reducerPath:`imageApi`,baseQuery:void 0,endpoints:e=>({getImageInfo:e.query({queryFn:async function(e,t){try{let n=t.getState().configSlice?.config?.imageInfoToolUrl||`https://scr.useblocks.io/imageinfo`;return{data:await C(await fetch(`${n}?url=${encodeURIComponent(e)}`))}}catch(e){return S(e)}}}),getSearchImage:e.query({queryFn:async function({query:e,page:t},n){let r=e.keywords.replace(/[^\w\d\sа-яёА-ЯЁ]|_/g,``).replace(/[\s_-]+/g,` `);try{let a=n.getState().configSlice?.config,o=i.Fr.getInstance(n,i.Da)!==void 0,s=new URL(`${b}/search/photos`);return s.searchParams.set(`client_id`,`S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`),s.searchParams.set(`lang`,`ru`),s.searchParams.set(`per_page`,`18`),s.searchParams.set(`query`,r),s.searchParams.set(`page`,String(t)),e.color!==``&&s.searchParams.set(`color`,e.color),e.orientation!==``&&s.searchParams.set(`orientation`,e.orientation),{data:w(await C(await i.ua(s.toString(),{config:a,standalone:o,resourceType:`stockImages`,intent:`metadata`})))}}catch(e){return S(e)}}}),getUnsplashImage:e.query({queryFn:async function(e,t){try{let n=t.getState().configSlice?.config,r=i.Fr.getInstance(t,i.Da)!==void 0,a=new URL(e);return a.searchParams.set(`client_id`,`S5iNcLqYgRBIOLQdluHdTsCJnjCvahzhG7JfYQOrV7o`),{data:await C(await i.ua(a.toString(),{config:n,standalone:r,resourceType:`stockImages`,intent:`metadata`}))}}catch(e){return S(e)}}}),sendAiImageRequest:e.query({queryFn:async function({body:e},t){try{return await i.Mr(t).aiGenerator.ai_create(e)}catch(e){throw Error(e)}}}),getAiImage:e.query({queryFn:async function(e,t){try{return await i.Mr(t).aiGenerator.ai_status_list(e)}catch(e){return S(e)}}}),getAiImageSSE:e.query({queryFn:e=>({data:[]}),async onCacheEntryAdded({task_id:e,entity_id:t,setError:n},r){let{updateCachedData:a,cacheEntryRemoved:o}=r,s=i.Mr(r).baseUrl||i.sa(`https://app.useblocks.io/api`),c=r.getState().configSlice?.config,l=i.Fr.getInstance(r,i.Da)!==void 0,d=i.Pi.isPlugin?await i.Fr.getInstance(r,u):g.get(i.Qr.em_token),f=d?{Authorization:`Bearer ${d}`}:{},p=`${s}/ai-generator/v1/ai-status?entity_id=${t}&stream=1&task_id=${e}`,m=i.pa(p,{config:c,method:`GET`,requestType:`ai`,standalone:l}),h=y({candidates:m.length>0?m:[p],headers:f,createEventSource:(e,t)=>new v.EventSourcePolyfill(e,t),onMessage:e=>{let t=JSON.parse(e.data);a(e=>{e.push(t)}),t.progress===100&&h.close()},onError:()=>{h.close()}});await o,h.close()}}),getSearchGif:e.query({queryFn:async function({query:e,page:t},n){let r=e.keywords.replace(/[^\w\d\sа-яёА-ЯЁ]|_/g,``).replace(/[\s_-]+/g,` `);try{let e=n.getState().configSlice?.config,a=i.Fr.getInstance(n,i.Da)!==void 0;return{data:await C(await i.ua(`${x}/search?api_key=Nh77eBlPeMn1ed9MBAvL542NUGeNO26F&q=${encodeURIComponent(r)}&limit=25&offset=${t}&lang=en`,{config:e,standalone:a,resourceType:`generic`,intent:`metadata`}))}}catch(e){return S(e)}}})})}),{useLazyGetImageInfoQuery:E,useGetImageInfoQuery:D,useGetSearchImageQuery:O,useLazyGetSearchImageQuery:k,useSendAiImageRequestQuery:A,useLazySendAiImageRequestQuery:j,useGetAiImageQuery:M,useLazyGetAiImageQuery:N,useGetUnsplashImageQuery:P,useLazyGetUnsplashImageQuery:F,useGetSearchGifQuery:I,useLazyGetSearchGifQuery:L,useGetAiImageSSEQuery:R,useLazyGetAiImageSSEQuery:z}=T,B=`https://app.useblocks.io/api`.replaceAll(/[\\/]$/g,``),V=`wp-json/limits/v1`,H=`wp-json/subscription/v2`,U=i.zr({reducerPath:`limitsApi`,baseQuery:i.Ar({baseUrl:B}),tagTypes:[`LimitsStats`,`LimitsWarnings`,`SubscriptionMe`],endpoints:e=>({getLimitsStats:e.query({query:()=>({url:`${V}/stats`,method:`GET`}),providesTags:[`LimitsStats`]}),getLimitsStatsByType:e.query({query:e=>({url:`${V}/stats/${e}`,method:`GET`}),providesTags:(e,t,n)=>[{type:`LimitsStats`,id:n}]}),getLimitsWarnings:e.query({query:()=>({url:`${V}/warnings`,method:`GET`}),providesTags:[`LimitsWarnings`]}),getSubscriptionMeV2:e.query({query:()=>({url:`${H}/me`,method:`GET`}),providesTags:[`SubscriptionMe`]})})}),{useGetLimitsStatsQuery:W,useLazyGetLimitsStatsQuery:G,useGetLimitsStatsByTypeQuery:K,useLazyGetLimitsStatsByTypeQuery:ee,useGetLimitsWarningsQuery:q,useLazyGetLimitsWarningsQuery:J,useGetSubscriptionMeV2Query:Y,useLazyGetSubscriptionMeV2Query:X}=U,Z=new URLSearchParams(window.location.search),Q=Z.get(`tag`),te=Z.get(`folder`),ne=i.Cr({activeModal:``,switchToPlanRequestTitle:``,secondModal:``,projectsTotal:``,projectsTotalPages:``,folders:[],activeTagId:Q||null,activeFolderId:te||(Q?null:`all`),activeTab:null,activeIntegration:null,addNewProjectInitialTitle:null}),$=`projectsPageSlice`,re=i.qr({name:$,initialState:ne,reducers:{openModal(e,t){e.activeModal=t.payload},openAddNewProjectModal(e,t){e.activeModal=i.ki.ADD_NEW_PROJECT_MODAL,e.addNewProjectInitialTitle=t.payload??null},setSwitchToPlanRequestTitle(e,t){e.switchToPlanRequestTitle=typeof t.payload==`string`?t.payload:``},setActiveTab(e,t){e.activeTab=t.payload},closeModal(e){e.activeModal=``,e.activeIntegration=null,e.addNewProjectInitialTitle=null,e.switchToPlanRequestTitle=``},openSecondModal(e,t){e.secondModal=t.payload},closeSecondModal(e){e.secondModal=``},setFolders(e,{payload:t}){e.folders=t},setActiveTagId(e,{payload:t}){e.activeTagId=t},setActiveIntegration(e,t){e.activeIntegration=t.payload}},extraReducers:e=>{e.addMatcher(i.zt.endpoints.getProjects.matchFulfilled,(e,t)=>{let n=t.meta,r=n.baseQueryMeta,i=n.projectsListPagination??r?.projectsListPagination;if(i!=null&&typeof i.total==`number`&&Number.isFinite(i.total)&&i.total>=0){e.projectsTotal=String(i.total),e.projectsTotalPages=String(typeof i.totalPages==`number`&&Number.isFinite(i.totalPages)?i.totalPages:``);return}let a=r?.response?.headers?.get?.(`X-WP-Total`),o=r?.response?.headers?.get?.(`X-WP-TotalPages`);e.projectsTotal=a??``,e.projectsTotalPages=o??``}),e.addMatcher(i.Et.endpoints.getFolders.matchFulfilled,(e,{payload:t})=>{e.folders=t})}}),{openModal:ie,openAddNewProjectModal:ae,setSwitchToPlanRequestTitle:oe,setActiveTab:se,closeModal:ce,openSecondModal:le,closeSecondModal:ue,setFolders:de,setActiveTagId:fe,setActiveIntegration:pe}=re.actions,me=e=>e[$].activeTab,he=e=>e[$].activeModal,ge=e=>e[$].secondModal,_e=e=>e[$].projectsTotal,ve=e=>e[$].activeIntegration;Object.defineProperty(t,"A",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"C",{enumerable:!0,get:function(){return j}}),Object.defineProperty(t,"D",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"E",{enumerable:!0,get:function(){return f}}),Object.defineProperty(t,"O",{enumerable:!0,get:function(){return l}}),Object.defineProperty(t,"S",{enumerable:!0,get:function(){return F}}),Object.defineProperty(t,"T",{enumerable:!0,get:function(){return g}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"a",{enumerable:!0,get:function(){return re}}),Object.defineProperty(t,"b",{enumerable:!0,get:function(){return L}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return me}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return se}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return q}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return le}}),Object.defineProperty(t,"k",{enumerable:!0,get:function(){return o}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return W}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return U}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return he}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(t,"v",{enumerable:!0,get:function(){return z}}),Object.defineProperty(t,"w",{enumerable:!0,get:function(){return _}}),Object.defineProperty(t,"x",{enumerable:!0,get:function(){return k}}),Object.defineProperty(t,"y",{enumerable:!0,get:function(){return E}})});
@@ -1 +1 @@
1
- import{a as e,i as t}from"./6046a29b.js";import"useblocks/runtime/react";function n(t,n){if(t!==void 0)if(typeof t==`string`){if(t=document.querySelector(t),t)return t;let r=n.addDisposable(new e);return new Promise((e,n)=>{let i=new MutationObserver(()=>{t=document.querySelector(t),t&&(r.dispose(),e(t))});i.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),r.addDisposable({dispose:()=>i.disconnect()})})}else return t;else return t}var r=new Map;t(`ELEMENT_INSERT_HTML_PIPELINE`),t(`BLOCK_INSERT_HTML_PIPELINE`),t(`DomComponentRegistry`),t(`ComponentRegistry`);function i(e){return t(e)}var a;(function(e){e.BEFORE_SAVE_EMAIL=i(),e.ON_SAVEBUTTON_CLICK_ID=i(),e.ON_NEXTBUTTON_CLICK_ID=i(),e.ON_PREVIOUSBUTTON_CLICK_ID=i(),e.ON_MODEL_CHANGE=i(),e.WILL_EMAIL_INIT_ID=i(),e.ON_EMAIL_INIT_ID=i(),e.ON_BLOCK_INIT_ID=i(),e.ON_CONTENT_CHANGED_ID=i(),e.ON_PREHEADER_CHANGED_ID=i(),e.ON_SUBJECT_CHANGED_ID=i(),e.ON_EMAIL_CHANGED_ID=i(),e.ON_BLOCK_CHANGED_ID=i(),e.ON_CHUNKS_LOADED=i(),e.ON_SEND_TESTEMAIL_ID=i(),e.ON_SEND_LIVEPREVIEW_ID=i(),e.ON_SHARE_ID=i(),e.ON_SHOW_PREVIEW_ID=i(),e.ON_EMAIL_CLONE_ID=i(),e.ON_SEND_EMAIL_MODAL_ID=i(),e.ON_NOTIFICATION=i(),e.READ_LOCALE=i(),e.ON_TRANSLATE_ID=i(),e.ON_CODE_VALIDATE_ID=i(),e.UPLOAD_EVENT_ID=i(),e.PROXY_URL_EVENT_ID=i(),e.FILE_PROXY_EVENT_ID=i(),e.ON_LIMIT_ID=i(),e.ON_GLOBAL_BLOCK_PROPAGATE_UPDATE_ID=i(),e.ON_BROWSER_EXTENSION_DETECTED_ID=i()})(a||={}),t(),t(),t(),t(),t(),t(),t(),t(),t(`PluginCollection`),i(`APP_LOAD_EVENT`),i(`CONFIG_CHANGED_EVENT`);export{n,r as t};
1
+ import{a as e,i as t}from"./6046a29b.js";import"useblocks/runtime/react";function n(t,n){if(t!==void 0)if(typeof t==`string`){if(t=document.querySelector(t),t)return t;let r=n.addDisposable(new e);return new Promise((e,n)=>{let i=new MutationObserver(()=>{t=document.querySelector(t),t&&(r.dispose(),e(t))});i.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),r.addDisposable({dispose:()=>i.disconnect()})})}else return t;else return t}var r=new Map;t(`ELEMENT_INSERT_HTML_PIPELINE`),t(`BLOCK_INSERT_HTML_PIPELINE`),t(`DomComponentRegistry`),t(`ComponentRegistry`);function i(e){return t(e)}var a;(function(e){e.BEFORE_SAVE_EMAIL=i(),e.ON_SAVEBUTTON_CLICK_ID=i(),e.ON_NEXTBUTTON_CLICK_ID=i(),e.ON_PREVIOUSBUTTON_CLICK_ID=i(),e.ON_MODEL_CHANGE=i(),e.WILL_EMAIL_INIT_ID=i(),e.ON_EMAIL_INIT_ID=i(),e.ON_BLOCK_INIT_ID=i(),e.ON_CONTENT_CHANGED_ID=i(),e.ON_PREHEADER_CHANGED_ID=i(),e.ON_SUBJECT_CHANGED_ID=i(),e.ON_EMAIL_CHANGED_ID=i(),e.ON_BLOCK_CHANGED_ID=i(),e.ON_CHUNKS_LOADED=i(),e.ON_SEND_TESTEMAIL_ID=i(),e.ON_SEND_LIVEPREVIEW_ID=i(),e.ON_SHARE_ID=i(),e.ON_SHOW_PREVIEW_ID=i(),e.ON_EMAIL_CLONE_ID=i(),e.ON_SEND_EMAIL_MODAL_ID=i(),e.ON_NOTIFICATION=i(),e.READ_LOCALE=i(),e.ON_TRANSLATE_ID=i(),e.ON_CODE_VALIDATE_ID=i(),e.UPLOAD_EVENT_ID=i(),e.PROXY_URL_EVENT_ID=i(),e.FILE_PROXY_EVENT_ID=i(),e.ON_LIMIT_ID=i(),e.ON_BROWSER_EXTENSION_DETECTED_ID=i()})(a||={}),t(),t(),t(),t(),t(),t(),t(),t(),t(`PluginCollection`),i(`APP_LOAD_EVENT`),i(`CONFIG_CHANGED_EVENT`);export{n,r as t};
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <title>Two-step flow: design → subject/preheader (headless)</title>
6
- <script id="plugin-script" type="text/javascript" src="useblocks.js?a8855649"></script>
6
+ <script id="plugin-script" type="text/javascript" src="useblocks.js?5fac2936"></script>
7
7
  <style>
8
8
  body {
9
9
  margin: 0;
@@ -1 +1 @@
1
- __useblocks__.define(`core`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/3fe138bd.js`,`static/core/e9ed0819.js`,`static/core/3a92c038.js`,`static/core/7b3ab6c8.js`],function(e,t,n){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),e("./static/core/4dc58c63.js");let r=e("./static/core/3fe138bd.js"),i=e("./static/core/3a92c038.js"),a=e("./static/core/e9ed0819.js"),o=e("./static/core/7b3ab6c8.js");function s(e){return async()=>(await e.app.app_init_create({})).data}function c(e,t,n){e.inject(r.ba,void 0);let i;e.injectFactory(r.ba,async(e,r)=>i||(i=(async()=>{let e=r?await r:void 0;return t({baseUrl:n.baseUrl,user:n.user,project:n.project,prevApp:e})})(),i),!0)}var l=a.A(e=>{let t,n,i,a,o,l=!1;function u(e){return String(e||``).trim()||void 0}return{setOptions(d){let f=!!e.getInstance(r.Da),p=d.hasOwnProperty(`baseUrl`)?u(d.baseUrl):n,m=p?r.sa(p):void 0;if(d.hasOwnProperty(`baseUrl`)){let n=e.getInstance(r.aa);t!==m&&n?.setOptions(m?{baseUrl:m}:{})}let h=i!==d.appInit,g=!r.na(a,d.user),_=o!==d.project,v=t!==m;if(i=d.appInit,a=d.user,o=d.project,t=m,n=p,f||l&&!h&&!g&&!_&&!v)return;let y=e.getInstance(r._a);c(e,i||s(y),{baseUrl:n,user:d.user,project:d.project}),l=!0}}}),u=r.eo(),d=r.eo(),f=a.A(e=>({setOptions(t){let n=i.kn();e.addService(r.ia,{execute:n.decorate(async n=>{if(!t.jwtAuth)return;let i=e.getInstance(u);if(!e.getInstance(d)){if(!i)try{let n=e.getInstance(r.aa)?.getOptions()?.baseUrl||``,a=await fetch(`${n}/jwt-auth/token`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t.jwtAuth)});if(!a.ok)throw Error(`JWT auth failed: ${a.status}`);i=(await a.json()).token,e.inject(u,i)}catch{throw e.inject(d,r.bi),Error(r.bi)}i&&n.headers.append(`authorization`,`Bearer ${i}`)}})})}})),p=a.A(e=>{let t,n,a;return{async setOptions(o){let s=a!==o.getAuthToken,c=!r.na(t,o.user),l=n!==o.project;if(a=o.getAuthToken,t=o.user,n=o.project,!(!e.getInstance(r.Da)||!o.getAuthToken)&&!(!s&&!c&&!l))try{let t=await o.getAuthToken(o.user,o.project);e.inject(r.Oa,Promise.resolve(t||``));let n=i.I(t);if(!n)return;e.inject(r.ka,n);let a=e.getInstance(r.ba),s=a?await a.catch(()=>void 0):void 0;e.inject(r.ba,Promise.resolve(i.F(n,s)))}catch{}}}}),m=a.A(e=>{let t=e.getInstance(r.Ca),n=new r.Ja,a=i.P(n.event);t.addDispose(()=>{let t=e.getInstance(r.wa);n.fire(t)});let o=t.addDisposable(new i.N(a));return t.addDisposable(n),{setOptions({handleDestroy:e}){o.setListener(e)},instance:{handleDestroy:a,destroy:()=>t.dispose()}}}),h=a.A(e=>{let t=e.getInstance(r.Ca),n=i.P(r.Na(e,r.xa)),a=t.addDisposable(new i.N(n));return{setOptions({handleLoad:e}){a.setListener(e)},instance:{handleLoad:n},dispose:()=>t.dispose()}}),g=a.A(e=>{let t=e.getInstance(r.Ca),n=t.addDisposable(new r.qa),a=t.addDisposable(new r.qa),o=r.Ma(e,r.Sa),s=i.P(n.event),c=i.P(a.event),l=i.P(o.event),u=t.addDisposable(new i.N(s)),d=t.addDisposable(new i.N(c)),f=t.addDisposable(new i.N(l));return{instance:{handleSetOptions:s,handleOptionsChanged:c,handleConfigChanged:l},async setOptions(e){u.setListener(e.handleSetOptions),d.setListener(e.handleOptionsChanged),f.setListener(e.handleConfigChanged),await n.fire(e),await a.fire(e)},dispose(){}}}),_=1e4;function v(e,t,n,r={}){let i=Object.assign({},e);for(let[e,a]of Object.entries(t))if(a!==void 0)if(n.includes(e)&&typeof a==`object`&&a){let t=i[e],n=r[e]??{};i[e]=Object.assign({},typeof t==`object`&&t?t:n,a)}else i[e]=a;return i}var y={border:{all:null,top:null,right:null,bottom:null,left:null},borderRadius:{all:5,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},borderRadiusCards:{all:10,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},padding:{all:null,top:null,right:null,bottom:null,left:null}},b={fontFamily:[`Safe Fonts`,`-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif`],fontSize:16,fontSizeDim:`px`,lineHeight:21,lineHeightDim:`px`,color:`#5a5a5a`,contrastColor:`#FFFFFF`,textAlign:`left`,paddingBottom:10,paddingBottomDim:`px`},x={fontFamily:[`Safe Fonts`,`-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif`],fontSize:24,fontSizeDim:`px`,lineHeight:32,lineHeightDim:`px`,color:`#333333`,contrastColor:`#FFFFFF`,textAlign:`left`,paddingTop:20,paddingTopDim:`px`,paddingBottom:20,paddingBottomDim:`px`,letterSpacing:0,letterSpacingDim:`px`,bold:!0,italic:!1},S={color:`#1C52DC`,contrastColor:`#FFFFFF`,underline:!0},C={fontFamily:[`Safe Fonts`,`-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif`],fontSize:16,fontSizeDim:`px`,letterSpacing:0,letterSpacingDim:`px`,color:`#FFFFFF`,contrastColor:`#1C52DC`,bold:!1,italic:!1,backgroundColor:`#1C52DC`,contrastBackgroundColor:`#FFFFFF`,marginTop:10,marginTopDim:`px`,marginBottom:10,marginBottomDim:`px`,border:y.border,borderRadius:y.borderRadius,textAlign:`center`,padding:y.padding},w={backgroundColor:`#FFFFFF`,contrastBackgroundColor:`#1C52DC`,padding:y.padding},T={contrastBackgroundColor:`#1C52DC`,contrastTextColor:`#FFFFFF`,baseBackgroundColor:`#F8F8F8`,baseTextColor:`#333333`,border:y.border,borderRadius:y.borderRadiusCards};function E(e){return{...b,...e}}function D(e){return{...x,...e,bold:e?.bold??x.bold,italic:e?.italic??x.italic}}function O(e){return{...S,...e,underline:e?.underline??S.underline}}function k(e){return{...C,...e,bold:e?.bold??C.bold,italic:e?.italic??C.italic,border:{...C.border,...e?.border??{}},borderRadius:{...C.borderRadius,...e?.borderRadius??{}},padding:{...C.padding,...e?.padding??{}}}}function A(e){return{...w,...e,padding:{...w.padding,...e?.padding??{}}}}function j(e){return{...T,...e,border:{...T.border,...e?.border??{}},borderRadius:{...T.borderRadius,...e?.borderRadius??{}}}}var M=class{_editor;_layoutSettingsChanged=new r.Ja;_contentStylesChanged=new r.Ja;_messageSubscription;_messageSubscriptionPromise;_prevLayoutSnapshot;_prevContentSnapshot;constructor(e){this._editor=e}onChangeEmailLayoutSettings(e){let t=this._layoutSettingsChanged.event(e);return this._ensureMessageSubscription(),{dispose:()=>{t.dispose(),this._disposeMessageSubscriptionIfUnused()}}}onChangeEmailContentStyles(e){let t=this._contentStylesChanged.event(e);return this._ensureMessageSubscription(),{dispose:()=>{t.dispose(),this._disposeMessageSubscriptionIfUnused()}}}_disposeMessageSubscriptionIfUnused(){this._layoutSettingsChanged.hasListeners()||this._contentStylesChanged.hasListeners()||(this._messageSubscription?.dispose(),this._messageSubscription=void 0)}_mapLayoutSettings(e={}){return{backgroundColor:e.backgroundColor||``,backgroundImage:(e.backgroundImage||[]).map(e=>({type:`url`,value:e?.value||``})),backgroundPositionX:e.backgroundPositionX||``,backgroundPositionY:e.backgroundPositionY||``,backgroundRepeat:e.backgroundRepeat||``,backgroundSize:e.backgroundSize||``,backgroundColorContent:e.backgroundColorContent||``,textStrong:e.textStrong||!1,textItalic:e.textItalic||!1,textUnderline:e.textUnderline||!1,width:e.width,responsive:e.responsive}}_parseCommonStyles(e){let t={...r.ea};try{e&&e!==`{}`&&(t=JSON.parse(e))}catch{}return t}_mapCommonStylesToContentStyles(e){return{text:E(e.text),headings:D(e.headings),links:O(e.links),buttons:k(e.buttons),block:A(e.block),cards:j(e.cards)}}_getCurrentLayoutSettings(e){return this._mapLayoutSettings(o.k(e.getState()))}_getCurrentContentStyles(e){return this._mapCommonStylesToContentStyles(this._parseCommonStyles(o.T(e.getState())?.common_styles))}_getLayoutSnapshot(e){return JSON.stringify(e)}_getContentSnapshot(e){return JSON.stringify(e)}async _ensureMessageSubscription(){if(!this._messageSubscription){if(this._messageSubscriptionPromise)return this._messageSubscriptionPromise;this._messageSubscriptionPromise=(async()=>{let e=await this._editor.container.getInstanceAsync(r.Aa);if(this._messageSubscription)return;let t=this._editor.container.getOrCreateInstance(r.za,()=>new r.Ga),n=this._getCurrentLayoutSettings(e),i=this._getCurrentContentStyles(e);this._prevLayoutSnapshot=this._getLayoutSnapshot(n),this._prevContentSnapshot=this._getContentSnapshot(i),this._messageSubscription=t.addListener(e=>{let t=e?.data?.operation;if(t===r.Si.APPLICATION_EMAIL_SETTINGS_SET){let t=this._mapLayoutSettings(e.data?.settings),n=this._getLayoutSnapshot(t);n!==this._prevLayoutSnapshot&&(this._prevLayoutSnapshot=n,this._layoutSettingsChanged.fire(t));return}if(t!==r.Si.APPLICATION_COMMON_STYLES_UPDATE)return;let n=this._mapCommonStylesToContentStyles(e.data?.settings?.commonStyles??{...r.ea}),i=this._getContentSnapshot(n);i!==this._prevContentSnapshot&&(this._prevContentSnapshot=i,this._contentStylesChanged.fire(n))})})();try{await this._messageSubscriptionPromise}finally{this._messageSubscriptionPromise=void 0}}}async getEmailLayoutSettings(){let e=await this._editor.container.getInstanceAsync(r.Aa);return await this._waitForEmailSettingsFromIframe(e),this._getCurrentLayoutSettings(e)}async setEmailLayoutSettings(e){let t=await this._editor.container.getInstanceAsync(r.Aa);await this._waitForEmailSettingsFromIframe(t);let n={...o.k(t.getState()),...e};t.dispatch(o.G(n));let i=this._mapLayoutSettings(n);this._prevLayoutSnapshot=this._getLayoutSnapshot(i),this._layoutSettingsChanged.fire(i)}async _waitForEmailSettingsFromIframe(e,t=_){let n=e.getState(),i=o.T(n),a=o.k(n);if(i?.is_inited&&a&&Object.keys(a).length>0&&(a.backgroundColor||a.backgroundImage?.[0]?.value||a.width?.value||a.responsive!==void 0)||i?.is_inited)return;let s=this._editor.container,c=r.Na(s,r.ja.ON_EMAIL_INIT_ID);return new Promise(e=>{let n=!1,r,i=()=>{r&&=(clearTimeout(r),void 0)},a=c(()=>{n||(n=!0,i(),a.dispose(),e())});r=setTimeout(()=>{n||(n=!0,a.dispose(),e())},t)})}async getEmailContentStyles(){let e=await this._editor.container.getInstanceAsync(r.Aa);return this._getCurrentContentStyles(e)}async setEmailContentStyles(e){let t=await this._editor.container.getInstanceAsync(r.Aa),n=o.T(t.getState());if(!n)return;let i=this._parseCommonStyles(n.common_styles);e.text!==void 0&&(i.text={...i.text||{},...e.text}),e.headings!==void 0&&(i.headings={...i.headings||{},...e.headings}),e.links!==void 0&&(i.links={...i.links||{},...e.links}),e.buttons!==void 0&&(i.buttons=v(i.buttons||{},e.buttons,[`border`,`borderRadius`,`padding`],{border:y.border,borderRadius:y.borderRadius,padding:y.padding})),e.block!==void 0&&(i.block=v(i.block||{},e.block,[`padding`],{padding:y.padding})),e.cards!==void 0&&(i.cards=v(i.cards||{},e.cards,[`border`,`borderRadius`],{border:y.border,borderRadius:y.borderRadiusCards})),t.dispatch(o.z({...n,common_styles:JSON.stringify(i)}));let a=this._mapCommonStylesToContentStyles(i);this._prevContentSnapshot=this._getContentSnapshot(a),this._contentStylesChanged.fire(a)}},N={...r.Pa,EmailSettingsApi:M};({...r.Pa});var P={...N};function F(){i.j.addAll(P)}var I=[m,h,g,f,p,a.E,l];async function L(){return(await Promise.resolve().then(()=>e("./static/core/4a6c33e4.js"))).default}var R=e=>{let t=null,n=!1;return{instance:{},async setOptions(i){if(!t&&!n){t=(await L())(e);let n=await e.getInstanceAsync(r.wa);Object.assign(n,t.instance||{}),F()}t&&await t.setOptions(i)},dispose(){t?.dispose(),n=!0}}},z=a.k([...I,R]),B=class{_storage=Object.create(null);get(e){let t=this._storage[e];return t&&(!t.expires||t.expires<Date.now())?t.value:``}set(e,t,n){this._storage[e]={value:t,expires:n.expires?n.expires*1e3+Date.now():void 0}}remove(e){delete this._storage[e]}},V=100,H={events:[],container:null,collection:null};function U(e,t){H.container=e,H.collection=t,t.onLifecycle(e=>{H.events.push({...e,timestamp:Date.now()}),H.events.length>V&&(H.events=H.events.slice(-100))}),typeof window<`u`&&(window.__EMAILMAKER_DEVTOOLS__=W())}function W(){return{enabled:!0,plugins(){return H.collection?H.collection.getStatus().map(e=>({...e,hasInit:!0,hasDispose:!0,hasAfterInit:!0})):[]},registry(){if(!H.container)return[];try{return H.container.getInstance(i.M).keys().map(String)}catch{return[]}},events(e=50){return H.events.slice(-e)},clearEvents(){H.events=[]},getPlugin(e){if(H.collection)try{return H.collection.use(e)}catch{return}}}}var G=a.k([z]);async function K(e){let t=new r.io;async function n(){let n=r.$a.createChild();if(e.standaloneKey){n.inject(r.Da,e.standaloneKey);let i=r.Na(n,r.ja.FILE_PROXY_EVENT_ID);t.addDisposable(i(async({url:e})=>(await fetch(e)).blob(),Number.MIN_VALUE))}n.inject(r.Ca,t),n.inject(r.ga,new B),r.ca(n);let i=G(n),a={...i.instance,container:n};if(n.inject(r.wa,a),await i.setOptions(e),e.devTools)try{let e=n.getInstance(r.Ea);e&&U(n,e)}catch{}return r.Ma(n,r.xa).fire(a),a}return n()}async function q(e){let t=new Map;typeof e==`object`&&(e=e.code);let n=await i.a(e,async e=>{await i.g(e.document,e=>i.m.getEscapedText(e)===e?i.y(e):e,t);for(let t of e.document.querySelectorAll(`.em-amp-show-disabled`))t.remove();e.handleRender(async({contentDocument:e,managedNodeController:t})=>{await i.n(e,{mappedTags:{script:`___script`},commit:()=>t.commit()})})},[800]),r=await i.a(e,async e=>{await i.g(e.document,e=>i.m.getEscapedText(e)===e?i.y(e):e,t);for(let t of e.document.querySelectorAll(`.em-amp-show-only`))t.remove();await i.t(e.document,{mappedTags:{script:`___script`}})},[800]);return{code:e,html:r,ampHtml:n}}t.init=K,t.parseAMP=q,t.version=`1.1.9`});
1
+ __useblocks__.define(`core`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/62863a09.js`,`static/core/f6ba84b8.js`,`static/core/7a9d2ed3.js`,`static/core/71a391c2.js`],function(e,t,n){Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),e("./static/core/4dc58c63.js");let r=e("./static/core/62863a09.js"),i=e("./static/core/7a9d2ed3.js"),a=e("./static/core/f6ba84b8.js"),o=e("./static/core/71a391c2.js");function s(e){return async()=>(await e.app.app_init_create({})).data}function c(e,t,n){e.inject(r.ba,void 0);let i;e.injectFactory(r.ba,async(e,r)=>i||(i=(async()=>{let e=r?await r:void 0;return t({baseUrl:n.baseUrl,user:n.user,project:n.project,prevApp:e})})(),i),!0)}var l=a.A(e=>{let t,n,i,a,o,l=!1;function u(e){return String(e||``).trim()||void 0}return{setOptions(d){let f=!!e.getInstance(r.Da),p=d.hasOwnProperty(`baseUrl`)?u(d.baseUrl):n,m=p?r.sa(p):void 0;if(d.hasOwnProperty(`baseUrl`)){let n=e.getInstance(r.aa);t!==m&&n?.setOptions(m?{baseUrl:m}:{})}let h=i!==d.appInit,g=!r.na(a,d.user),_=o!==d.project,v=t!==m;if(i=d.appInit,a=d.user,o=d.project,t=m,n=p,f||l&&!h&&!g&&!_&&!v)return;let y=e.getInstance(r._a);c(e,i||s(y),{baseUrl:n,user:d.user,project:d.project}),l=!0}}}),u=r.eo(),d=r.eo(),f=a.A(e=>({setOptions(t){let n=i.kn();e.addService(r.ia,{execute:n.decorate(async n=>{if(!t.jwtAuth)return;let i=e.getInstance(u);if(!e.getInstance(d)){if(!i)try{let n=e.getInstance(r.aa)?.getOptions()?.baseUrl||``,a=await fetch(`${n}/jwt-auth/token`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t.jwtAuth)});if(!a.ok)throw Error(`JWT auth failed: ${a.status}`);i=(await a.json()).token,e.inject(u,i)}catch{throw e.inject(d,r.bi),Error(r.bi)}i&&n.headers.append(`authorization`,`Bearer ${i}`)}})})}})),p=a.A(e=>{let t,n,a;return{async setOptions(o){let s=a!==o.getAuthToken,c=!r.na(t,o.user),l=n!==o.project;if(a=o.getAuthToken,t=o.user,n=o.project,!(!e.getInstance(r.Da)||!o.getAuthToken)&&!(!s&&!c&&!l))try{let t=await o.getAuthToken(o.user,o.project);e.inject(r.Oa,Promise.resolve(t||``));let n=i.I(t);if(!n)return;e.inject(r.ka,n);let a=e.getInstance(r.ba),s=a?await a.catch(()=>void 0):void 0;e.inject(r.ba,Promise.resolve(i.F(n,s)))}catch{}}}}),m=a.A(e=>{let t=e.getInstance(r.Ca),n=new r.Ja,a=i.P(n.event);t.addDispose(()=>{let t=e.getInstance(r.wa);n.fire(t)});let o=t.addDisposable(new i.N(a));return t.addDisposable(n),{setOptions({handleDestroy:e}){o.setListener(e)},instance:{handleDestroy:a,destroy:()=>t.dispose()}}}),h=a.A(e=>{let t=e.getInstance(r.Ca),n=i.P(r.Na(e,r.xa)),a=t.addDisposable(new i.N(n));return{setOptions({handleLoad:e}){a.setListener(e)},instance:{handleLoad:n},dispose:()=>t.dispose()}}),g=a.A(e=>{let t=e.getInstance(r.Ca),n=t.addDisposable(new r.qa),a=t.addDisposable(new r.qa),o=r.Ma(e,r.Sa),s=i.P(n.event),c=i.P(a.event),l=i.P(o.event),u=t.addDisposable(new i.N(s)),d=t.addDisposable(new i.N(c)),f=t.addDisposable(new i.N(l));return{instance:{handleSetOptions:s,handleOptionsChanged:c,handleConfigChanged:l},async setOptions(e){u.setListener(e.handleSetOptions),d.setListener(e.handleOptionsChanged),f.setListener(e.handleConfigChanged),await n.fire(e),await a.fire(e)},dispose(){}}}),_=1e4;function v(e,t,n,r={}){let i=Object.assign({},e);for(let[e,a]of Object.entries(t))if(a!==void 0)if(n.includes(e)&&typeof a==`object`&&a){let t=i[e],n=r[e]??{};i[e]=Object.assign({},typeof t==`object`&&t?t:n,a)}else i[e]=a;return i}var y={border:{all:null,top:null,right:null,bottom:null,left:null},borderRadius:{all:5,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},borderRadiusCards:{all:10,topLeft:null,topRight:null,bottomRight:null,bottomLeft:null},padding:{all:null,top:null,right:null,bottom:null,left:null}},b={fontFamily:[`Safe Fonts`,`-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif`],fontSize:16,fontSizeDim:`px`,lineHeight:21,lineHeightDim:`px`,color:`#5a5a5a`,contrastColor:`#FFFFFF`,textAlign:`left`,paddingBottom:10,paddingBottomDim:`px`},x={fontFamily:[`Safe Fonts`,`-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif`],fontSize:24,fontSizeDim:`px`,lineHeight:32,lineHeightDim:`px`,color:`#333333`,contrastColor:`#FFFFFF`,textAlign:`left`,paddingTop:20,paddingTopDim:`px`,paddingBottom:20,paddingBottomDim:`px`,letterSpacing:0,letterSpacingDim:`px`,bold:!0,italic:!1},S={color:`#1C52DC`,contrastColor:`#FFFFFF`,underline:!0},C={fontFamily:[`Safe Fonts`,`-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif`],fontSize:16,fontSizeDim:`px`,letterSpacing:0,letterSpacingDim:`px`,color:`#FFFFFF`,contrastColor:`#1C52DC`,bold:!1,italic:!1,backgroundColor:`#1C52DC`,contrastBackgroundColor:`#FFFFFF`,marginTop:10,marginTopDim:`px`,marginBottom:10,marginBottomDim:`px`,border:y.border,borderRadius:y.borderRadius,textAlign:`center`,padding:y.padding},w={backgroundColor:`#FFFFFF`,contrastBackgroundColor:`#1C52DC`,padding:y.padding},T={contrastBackgroundColor:`#1C52DC`,contrastTextColor:`#FFFFFF`,baseBackgroundColor:`#F8F8F8`,baseTextColor:`#333333`,border:y.border,borderRadius:y.borderRadiusCards};function E(e){return{...b,...e}}function D(e){return{...x,...e,bold:e?.bold??x.bold,italic:e?.italic??x.italic}}function O(e){return{...S,...e,underline:e?.underline??S.underline}}function k(e){return{...C,...e,bold:e?.bold??C.bold,italic:e?.italic??C.italic,border:{...C.border,...e?.border??{}},borderRadius:{...C.borderRadius,...e?.borderRadius??{}},padding:{...C.padding,...e?.padding??{}}}}function A(e){return{...w,...e,padding:{...w.padding,...e?.padding??{}}}}function j(e){return{...T,...e,border:{...T.border,...e?.border??{}},borderRadius:{...T.borderRadius,...e?.borderRadius??{}}}}var M=class{_editor;_layoutSettingsChanged=new r.Ja;_contentStylesChanged=new r.Ja;_messageSubscription;_messageSubscriptionPromise;_prevLayoutSnapshot;_prevContentSnapshot;constructor(e){this._editor=e}onChangeEmailLayoutSettings(e){let t=this._layoutSettingsChanged.event(e);return this._ensureMessageSubscription(),{dispose:()=>{t.dispose(),this._disposeMessageSubscriptionIfUnused()}}}onChangeEmailContentStyles(e){let t=this._contentStylesChanged.event(e);return this._ensureMessageSubscription(),{dispose:()=>{t.dispose(),this._disposeMessageSubscriptionIfUnused()}}}_disposeMessageSubscriptionIfUnused(){this._layoutSettingsChanged.hasListeners()||this._contentStylesChanged.hasListeners()||(this._messageSubscription?.dispose(),this._messageSubscription=void 0)}_mapLayoutSettings(e={}){return{backgroundColor:e.backgroundColor||``,backgroundImage:(e.backgroundImage||[]).map(e=>({type:`url`,value:e?.value||``})),backgroundPositionX:e.backgroundPositionX||``,backgroundPositionY:e.backgroundPositionY||``,backgroundRepeat:e.backgroundRepeat||``,backgroundSize:e.backgroundSize||``,backgroundColorContent:e.backgroundColorContent||``,textStrong:e.textStrong||!1,textItalic:e.textItalic||!1,textUnderline:e.textUnderline||!1,width:e.width,responsive:e.responsive}}_parseCommonStyles(e){let t={...r.ea};try{e&&e!==`{}`&&(t=JSON.parse(e))}catch{}return t}_mapCommonStylesToContentStyles(e){return{text:E(e.text),headings:D(e.headings),links:O(e.links),buttons:k(e.buttons),block:A(e.block),cards:j(e.cards)}}_getCurrentLayoutSettings(e){return this._mapLayoutSettings(o.k(e.getState()))}_getCurrentContentStyles(e){return this._mapCommonStylesToContentStyles(this._parseCommonStyles(o.T(e.getState())?.common_styles))}_getLayoutSnapshot(e){return JSON.stringify(e)}_getContentSnapshot(e){return JSON.stringify(e)}async _ensureMessageSubscription(){if(!this._messageSubscription){if(this._messageSubscriptionPromise)return this._messageSubscriptionPromise;this._messageSubscriptionPromise=(async()=>{let e=await this._editor.container.getInstanceAsync(r.Aa);if(this._messageSubscription)return;let t=this._editor.container.getOrCreateInstance(r.za,()=>new r.Ga),n=this._getCurrentLayoutSettings(e),i=this._getCurrentContentStyles(e);this._prevLayoutSnapshot=this._getLayoutSnapshot(n),this._prevContentSnapshot=this._getContentSnapshot(i),this._messageSubscription=t.addListener(e=>{let t=e?.data?.operation;if(t===r.Si.APPLICATION_EMAIL_SETTINGS_SET){let t=this._mapLayoutSettings(e.data?.settings),n=this._getLayoutSnapshot(t);n!==this._prevLayoutSnapshot&&(this._prevLayoutSnapshot=n,this._layoutSettingsChanged.fire(t));return}if(t!==r.Si.APPLICATION_COMMON_STYLES_UPDATE)return;let n=this._mapCommonStylesToContentStyles(e.data?.settings?.commonStyles??{...r.ea}),i=this._getContentSnapshot(n);i!==this._prevContentSnapshot&&(this._prevContentSnapshot=i,this._contentStylesChanged.fire(n))})})();try{await this._messageSubscriptionPromise}finally{this._messageSubscriptionPromise=void 0}}}async getEmailLayoutSettings(){let e=await this._editor.container.getInstanceAsync(r.Aa);return await this._waitForEmailSettingsFromIframe(e),this._getCurrentLayoutSettings(e)}async setEmailLayoutSettings(e){let t=await this._editor.container.getInstanceAsync(r.Aa);await this._waitForEmailSettingsFromIframe(t);let n={...o.k(t.getState()),...e};t.dispatch(o.G(n));let i=this._mapLayoutSettings(n);this._prevLayoutSnapshot=this._getLayoutSnapshot(i),this._layoutSettingsChanged.fire(i)}async _waitForEmailSettingsFromIframe(e,t=_){let n=e.getState(),i=o.T(n),a=o.k(n);if(i?.is_inited&&a&&Object.keys(a).length>0&&(a.backgroundColor||a.backgroundImage?.[0]?.value||a.width?.value||a.responsive!==void 0)||i?.is_inited)return;let s=this._editor.container,c=r.Na(s,r.ja.ON_EMAIL_INIT_ID);return new Promise(e=>{let n=!1,r,i=()=>{r&&=(clearTimeout(r),void 0)},a=c(()=>{n||(n=!0,i(),a.dispose(),e())});r=setTimeout(()=>{n||(n=!0,a.dispose(),e())},t)})}async getEmailContentStyles(){let e=await this._editor.container.getInstanceAsync(r.Aa);return this._getCurrentContentStyles(e)}async setEmailContentStyles(e){let t=await this._editor.container.getInstanceAsync(r.Aa),n=o.T(t.getState());if(!n)return;let i=this._parseCommonStyles(n.common_styles);e.text!==void 0&&(i.text={...i.text||{},...e.text}),e.headings!==void 0&&(i.headings={...i.headings||{},...e.headings}),e.links!==void 0&&(i.links={...i.links||{},...e.links}),e.buttons!==void 0&&(i.buttons=v(i.buttons||{},e.buttons,[`border`,`borderRadius`,`padding`],{border:y.border,borderRadius:y.borderRadius,padding:y.padding})),e.block!==void 0&&(i.block=v(i.block||{},e.block,[`padding`],{padding:y.padding})),e.cards!==void 0&&(i.cards=v(i.cards||{},e.cards,[`border`,`borderRadius`],{border:y.border,borderRadius:y.borderRadiusCards})),t.dispatch(o.z({...n,common_styles:JSON.stringify(i)}));let a=this._mapCommonStylesToContentStyles(i);this._prevContentSnapshot=this._getContentSnapshot(a),this._contentStylesChanged.fire(a)}},N={...r.Pa,EmailSettingsApi:M};({...r.Pa});var P={...N};function F(){i.j.addAll(P)}var I=[m,h,g,f,p,a.E,l];async function L(){return(await Promise.resolve().then(()=>e("./static/core/2ace19b3.js"))).default}var R=e=>{let t=null,n=!1;return{instance:{},async setOptions(i){if(!t&&!n){t=(await L())(e);let n=await e.getInstanceAsync(r.wa);Object.assign(n,t.instance||{}),F()}t&&await t.setOptions(i)},dispose(){t?.dispose(),n=!0}}},z=a.k([...I,R]),B=class{_storage=Object.create(null);get(e){let t=this._storage[e];return t&&(!t.expires||t.expires<Date.now())?t.value:``}set(e,t,n){this._storage[e]={value:t,expires:n.expires?n.expires*1e3+Date.now():void 0}}remove(e){delete this._storage[e]}},V=100,H={events:[],container:null,collection:null};function U(e,t){H.container=e,H.collection=t,t.onLifecycle(e=>{H.events.push({...e,timestamp:Date.now()}),H.events.length>V&&(H.events=H.events.slice(-100))}),typeof window<`u`&&(window.__EMAILMAKER_DEVTOOLS__=W())}function W(){return{enabled:!0,plugins(){return H.collection?H.collection.getStatus().map(e=>({...e,hasInit:!0,hasDispose:!0,hasAfterInit:!0})):[]},registry(){if(!H.container)return[];try{return H.container.getInstance(i.M).keys().map(String)}catch{return[]}},events(e=50){return H.events.slice(-e)},clearEvents(){H.events=[]},getPlugin(e){if(H.collection)try{return H.collection.use(e)}catch{return}}}}var G=a.k([z]);async function K(e){let t=new r.io;async function n(){let n=r.$a.createChild();if(e.standaloneKey){n.inject(r.Da,e.standaloneKey);let i=r.Na(n,r.ja.FILE_PROXY_EVENT_ID);t.addDisposable(i(async({url:e})=>(await fetch(e)).blob(),Number.MIN_VALUE))}n.inject(r.Ca,t),n.inject(r.ga,new B),r.ca(n);let i=G(n),a={...i.instance,container:n};if(n.inject(r.wa,a),await i.setOptions(e),e.devTools)try{let e=n.getInstance(r.Ea);e&&U(n,e)}catch{}return r.Ma(n,r.xa).fire(a),a}return n()}async function q(e){let t=new Map;typeof e==`object`&&(e=e.code);let n=await i.a(e,async e=>{await i.g(e.document,e=>i.m.getEscapedText(e)===e?i.y(e):e,t);for(let t of e.document.querySelectorAll(`.em-amp-show-disabled`))t.remove();e.handleRender(async({contentDocument:e,managedNodeController:t})=>{await i.n(e,{mappedTags:{script:`___script`},commit:()=>t.commit()})})},[800]),r=await i.a(e,async e=>{await i.g(e.document,e=>i.m.getEscapedText(e)===e?i.y(e):e,t);for(let t of e.document.querySelectorAll(`.em-amp-show-only`))t.remove();await i.t(e.document,{mappedTags:{script:`___script`}})},[800]);return{code:e,html:r,ampHtml:n}}t.init=K,t.parseAMP=q,t.version=`1.1.11`});
package/useblocks-esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import{a as e,i as t,n,r,t as i}from"./static/esm/6046a29b.js";import{n as a,t as o}from"./static/esm/e6780554.js";(function(){var e=window.__useblocks__=window.__useblocks__||{};__useblocks__.publicPath||(__useblocks__.publicPath=(function(){var e=(function(){if(typeof document>`u`)return`./`;var e=document.getElementsByTagName(`script`),t=document.currentScript||e[e.length-1];return t&&t.src?t.src.substring(0,t.src.lastIndexOf(`/`)+1):`./`})();e||=`./`;try{var t=String(e);if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)||t.indexOf(`//`)===0)return t;var n=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return n?new URL(t,n).href:t}catch{return String(e)}})()),__useblocks__.assetUrl||(__useblocks__.assetUrl=function(e){function t(e){try{var t=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return t?new URL(String(e||``),t).href:String(e||``)}catch{return String(e||``)}}var n=String(e||``);if(!n)return``;if(/^(?:data:|blob:)/.test(n))return n;if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.indexOf(`//`)===0||n.charAt(0)===`/`)return t(n);var r=n.replace(/^\.\/+/,``).replace(/^\/+/,``),i=`static/media`.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/,``),a=i&&r.indexOf(i+`/`)!==0?i+`/`+r:r,o=__useblocks__.publicPath||`./`;try{return new URL(a,o).href}catch{return o.slice(-1)!==`/`&&(o+=`/`),t(o+a)}});var t=e.modules=Object.create(null),n=import(`./runtime/index.js`),r=import(`./ui-kit/index.js`);t.React=n.then(function(e){return e.React}),t.ReactDom=n.then(function(e){return e.ReactDom}),t.ReactDomClient=n.then(function(e){return e.ReactDomClient}),t.ReactJsxRuntime=n.then(function(e){return e.ReactJsxRuntime}),t.ReactJsxDevRuntime=n.then(function(e){return e.ReactJsxDevRuntime}),t.PropTypes=n.then(function(e){return e.PropTypes}),t.ReactRouterDom=n.then(function(e){return e.ReactRouterDom}),t.Antd=n.then(function(e){return e.Antd}),t.AntDesignIcons=n.then(function(e){return e.AntDesignIcons}),t.AntDesignCssinjs=n.then(function(e){return e.AntDesignCssinjs}),t.Classnames=n.then(function(e){return e.Classnames}),t.Dayjs=n.then(function(e){return e.Dayjs}),t.Uuid=n.then(function(e){return e.Uuid}),t.UiKit=r.then(function(e){return e.UiKit===void 0?e:e.UiKit});var i=Promise.all([n,r]).then(function(e){var n=e[0]||Object.create(null),r=Object.create(null);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);var a=e[1]||Object.create(null);for(var o in r.UiKit=a.UiKit===void 0?a:a.UiKit,r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return r}),a=t,o=i;typeof e.define!=`function`&&(Function(`__amdEnv`,`/**
1
+ import{a as e,i as t,n,r,t as i}from"./static/esm/6046a29b.js";import{n as a,t as o}from"./static/esm/1be7efab.js";(function(){var e=window.__useblocks__=window.__useblocks__||{};__useblocks__.publicPath||(__useblocks__.publicPath=(function(){var e=(function(){if(typeof document>`u`)return`./`;var e=document.getElementsByTagName(`script`),t=document.currentScript||e[e.length-1];return t&&t.src?t.src.substring(0,t.src.lastIndexOf(`/`)+1):`./`})();e||=`./`;try{var t=String(e);if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)||t.indexOf(`//`)===0)return t;var n=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return n?new URL(t,n).href:t}catch{return String(e)}})()),__useblocks__.assetUrl||(__useblocks__.assetUrl=function(e){function t(e){try{var t=typeof document<`u`&&document.baseURI?document.baseURI:typeof window<`u`&&window.location?window.location.href:``;return t?new URL(String(e||``),t).href:String(e||``)}catch{return String(e||``)}}var n=String(e||``);if(!n)return``;if(/^(?:data:|blob:)/.test(n))return n;if(/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.indexOf(`//`)===0||n.charAt(0)===`/`)return t(n);var r=n.replace(/^\.\/+/,``).replace(/^\/+/,``),i=`static/media`.replace(/^\.\/+/,``).replace(/^\/+/,``).replace(/\/+$/,``),a=i&&r.indexOf(i+`/`)!==0?i+`/`+r:r,o=__useblocks__.publicPath||`./`;try{return new URL(a,o).href}catch{return o.slice(-1)!==`/`&&(o+=`/`),t(o+a)}});var t=e.modules=Object.create(null),n=import(`./runtime/index.js`),r=import(`./ui-kit/index.js`);t.React=n.then(function(e){return e.React}),t.ReactDom=n.then(function(e){return e.ReactDom}),t.ReactDomClient=n.then(function(e){return e.ReactDomClient}),t.ReactJsxRuntime=n.then(function(e){return e.ReactJsxRuntime}),t.ReactJsxDevRuntime=n.then(function(e){return e.ReactJsxDevRuntime}),t.PropTypes=n.then(function(e){return e.PropTypes}),t.ReactRouterDom=n.then(function(e){return e.ReactRouterDom}),t.Antd=n.then(function(e){return e.Antd}),t.AntDesignIcons=n.then(function(e){return e.AntDesignIcons}),t.AntDesignCssinjs=n.then(function(e){return e.AntDesignCssinjs}),t.Classnames=n.then(function(e){return e.Classnames}),t.Dayjs=n.then(function(e){return e.Dayjs}),t.Uuid=n.then(function(e){return e.Uuid}),t.UiKit=r.then(function(e){return e.UiKit===void 0?e:e.UiKit});var i=Promise.all([n,r]).then(function(e){var n=e[0]||Object.create(null),r=Object.create(null);for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i]);var a=e[1]||Object.create(null);for(var o in r.UiKit=a.UiKit===void 0?a:a.UiKit,r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return r}),a=t,o=i;typeof e.define!=`function`&&(Function(`__amdEnv`,`/**
2
2
  * Async AMD Loader (IIFE version for injection)
3
3
  *
4
4
  * This file is injected at the beginning of iframe entry points.
@@ -476,7 +476,7 @@ import{a as e,i as t,n,r,t as i}from"./static/esm/6046a29b.js";import{n as a,t a
476
476
  __amdEnv.require = require;
477
477
  __amdEnv.syncRequire = syncRequire;
478
478
  })();
479
- `)(e),typeof e.require==`function`&&typeof e.require.config==`function`&&e.require.config({baseUrl:`./`,paths:{core:`useblocks-core.a8855649.js`}}));var s=typeof e.prefetch==`function`?e.prefetch:void 0;if(e.prefetch=function(){return i.then(function(){if(typeof s==`function`)return s.call(e)})},typeof e.define==`function`){var c=typeof WeakMap<`u`?new WeakMap:null;function t(e){if(!e||typeof e!=`object`&&typeof e!=`function`||e.__esModule)return e;if(c){var t=c.get(e);if(t)return t}var n=Object.create(null);Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});for(var r=Reflect.ownKeys(e),i=0;i<r.length;i++){var a=r[i];if(a!=="__esModule"){var o=Object.getOwnPropertyDescriptor(e,a);o&&Object.defineProperty(n,a,o)}}return Object.prototype.hasOwnProperty.call(n,`default`)||Object.defineProperty(n,"default",{enumerable:!0,value:e,writable:!1}),c&&c.set(e,n),n}e.define(`react`,[],function(){var e=a.React;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.React;return t(n)}):t(e)}),e.define(`useblocks/runtime/react`,[],function(){var e=a.React;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.React;return t(n)}):t(e)}),e.define(`react-dom`,[],function(){var e=a.ReactDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDom;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-dom`,[],function(){var e=a.ReactDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDom;return t(n)}):t(e)}),e.define(`react-dom/client`,[],function(){var e=a.ReactDomClient;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDomClient;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-dom/client`,[],function(){var e=a.ReactDomClient;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDomClient;return t(n)}):t(e)}),e.define(`react/jsx-runtime`,[],function(){var e=a.ReactJsxRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxRuntime;return t(n)}):t(e)}),e.define(`useblocks/runtime/react/jsx-runtime`,[],function(){var e=a.ReactJsxRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxRuntime;return t(n)}):t(e)}),e.define(`react/jsx-dev-runtime`,[],function(){var e=a.ReactJsxDevRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxDevRuntime;return t(n)}):t(e)}),e.define(`useblocks/runtime/react/jsx-dev-runtime`,[],function(){var e=a.ReactJsxDevRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxDevRuntime;return t(n)}):t(e)}),e.define(`prop-types`,[],function(){var e=a.PropTypes;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.PropTypes;return t(n)}):t(e)}),e.define(`useblocks/runtime/prop-types`,[],function(){var e=a.PropTypes;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.PropTypes;return t(n)}):t(e)}),e.define(`react-router-dom`,[],function(){var e=a.ReactRouterDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactRouterDom;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-router-dom`,[],function(){var e=a.ReactRouterDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactRouterDom;return t(n)}):t(e)}),e.define(`antd`,[],function(){var e=a.Antd;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Antd;return t(n)}):t(e)}),e.define(`useblocks/runtime/antd`,[],function(){var e=a.Antd;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Antd;return t(n)}):t(e)}),e.define(`@ant-design/icons`,[],function(){var e=a.AntDesignIcons;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignIcons;return t(n)}):t(e)}),e.define(`useblocks/runtime/@ant-design/icons`,[],function(){var e=a.AntDesignIcons;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignIcons;return t(n)}):t(e)}),e.define(`@ant-design/cssinjs`,[],function(){var e=a.AntDesignCssinjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignCssinjs;return t(n)}):t(e)}),e.define(`useblocks/runtime/@ant-design/cssinjs`,[],function(){var e=a.AntDesignCssinjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignCssinjs;return t(n)}):t(e)}),e.define(`classnames`,[],function(){var e=a.Classnames;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Classnames;return t(n)}):t(e)}),e.define(`useblocks/runtime/classnames`,[],function(){var e=a.Classnames;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Classnames;return t(n)}):t(e)}),e.define(`dayjs`,[],function(){var e=a.Dayjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Dayjs;return t(n)}):t(e)}),e.define(`useblocks/runtime/dayjs`,[],function(){var e=a.Dayjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Dayjs;return t(n)}):t(e)}),e.define(`uuid`,[],function(){var e=a.Uuid;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Uuid;return t(n)}):t(e)}),e.define(`useblocks/runtime/uuid`,[],function(){var e=a.Uuid;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Uuid;return t(n)}):t(e)}),e.define(`useblocks-ui-kit`,[],function(){var e=a.UiKit;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.UiKit;return t(n)}):t(e)}),e.define(`useblocks/ui-kit`,[],function(){var e=a.UiKit;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.UiKit;return t(n)}):t(e)})}globalThis.__SHARED_RUNTIME_INIT_SENTINEL__=`@shared-runtime:init-complete`})();var s=null,c=`core`;function l(){return typeof window.__useblocks__?.require==`function`?new Promise((e,t)=>{window.__useblocks__.require([c],t=>e(t),e=>t(e instanceof Error?e:Error(`[loadEngine] Failed to require core module`)))}):Promise.reject(Error(`[loadEngine] AMD loader is unavailable`))}function u(){return s||=l(),s}var d=null,f=null;async function p(e){typeof e?.prefetch==`function`&&await e.prefetch()}function m(){return d||=u().then(()=>void 0),d}function h(e){return f||=p(e),f}function g(e){return Promise.all([m(),h(e)]).then(()=>void 0)}function _(e){let t=e?.startupPrefetchMode;return t===`eager`||t===`idle`||t===`manual`||t===`off`?t:`eager`}function v(e){Promise.resolve().then(()=>g(e)).catch(()=>{})}function y(e){Promise.resolve().then(()=>h(e)).catch(()=>{})}function b(e){let t=_(e);if(t===`eager`)v(e);else if(t===`idle`){let t=window.requestIdleCallback;typeof t==`function`?t(()=>v(e),{timeout:1500}):setTimeout(()=>v(e),0)}}var x=new WeakMap,S=`data-useblocks-config-styles`;function C(e){return typeof e==`string`?e.trim():``}function w(e,t){if(e.firstChild){e.insertBefore(t,e.firstChild);return}e.appendChild(t)}function T(e,t,n){if(!e||typeof document>`u`)return null;let r=C(t),i=x.get(e),a=n||e;if(!r)return i&&(i.remove(),x.delete(e)),null;if(i)return i.textContent!==r&&(i.textContent=r),(i.parentNode!==a||i!==a.firstChild)&&w(a,i),i;let o=document.createElement(`style`);return o.setAttribute(S,`true`),o.textContent=r,w(a,o),x.set(e,o),o}function E(e){if(!e)return;let t=x.get(e);t&&(t.remove(),x.delete(e))}function D(){return!1}var O=`
479
+ `)(e),typeof e.require==`function`&&typeof e.require.config==`function`&&e.require.config({baseUrl:`./`,paths:{core:`useblocks-core.5fac2936.js`}}));var s=typeof e.prefetch==`function`?e.prefetch:void 0;if(e.prefetch=function(){return i.then(function(){if(typeof s==`function`)return s.call(e)})},typeof e.define==`function`){var c=typeof WeakMap<`u`?new WeakMap:null;function t(e){if(!e||typeof e!=`object`&&typeof e!=`function`||e.__esModule)return e;if(c){var t=c.get(e);if(t)return t}var n=Object.create(null);Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});for(var r=Reflect.ownKeys(e),i=0;i<r.length;i++){var a=r[i];if(a!=="__esModule"){var o=Object.getOwnPropertyDescriptor(e,a);o&&Object.defineProperty(n,a,o)}}return Object.prototype.hasOwnProperty.call(n,`default`)||Object.defineProperty(n,"default",{enumerable:!0,value:e,writable:!1}),c&&c.set(e,n),n}e.define(`react`,[],function(){var e=a.React;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.React;return t(n)}):t(e)}),e.define(`useblocks/runtime/react`,[],function(){var e=a.React;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.React;return t(n)}):t(e)}),e.define(`react-dom`,[],function(){var e=a.ReactDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDom;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-dom`,[],function(){var e=a.ReactDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDom;return t(n)}):t(e)}),e.define(`react-dom/client`,[],function(){var e=a.ReactDomClient;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDomClient;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-dom/client`,[],function(){var e=a.ReactDomClient;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactDomClient;return t(n)}):t(e)}),e.define(`react/jsx-runtime`,[],function(){var e=a.ReactJsxRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxRuntime;return t(n)}):t(e)}),e.define(`useblocks/runtime/react/jsx-runtime`,[],function(){var e=a.ReactJsxRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxRuntime;return t(n)}):t(e)}),e.define(`react/jsx-dev-runtime`,[],function(){var e=a.ReactJsxDevRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxDevRuntime;return t(n)}):t(e)}),e.define(`useblocks/runtime/react/jsx-dev-runtime`,[],function(){var e=a.ReactJsxDevRuntime;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactJsxDevRuntime;return t(n)}):t(e)}),e.define(`prop-types`,[],function(){var e=a.PropTypes;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.PropTypes;return t(n)}):t(e)}),e.define(`useblocks/runtime/prop-types`,[],function(){var e=a.PropTypes;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.PropTypes;return t(n)}):t(e)}),e.define(`react-router-dom`,[],function(){var e=a.ReactRouterDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactRouterDom;return t(n)}):t(e)}),e.define(`useblocks/runtime/react-router-dom`,[],function(){var e=a.ReactRouterDom;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.ReactRouterDom;return t(n)}):t(e)}),e.define(`antd`,[],function(){var e=a.Antd;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Antd;return t(n)}):t(e)}),e.define(`useblocks/runtime/antd`,[],function(){var e=a.Antd;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Antd;return t(n)}):t(e)}),e.define(`@ant-design/icons`,[],function(){var e=a.AntDesignIcons;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignIcons;return t(n)}):t(e)}),e.define(`useblocks/runtime/@ant-design/icons`,[],function(){var e=a.AntDesignIcons;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignIcons;return t(n)}):t(e)}),e.define(`@ant-design/cssinjs`,[],function(){var e=a.AntDesignCssinjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignCssinjs;return t(n)}):t(e)}),e.define(`useblocks/runtime/@ant-design/cssinjs`,[],function(){var e=a.AntDesignCssinjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.AntDesignCssinjs;return t(n)}):t(e)}),e.define(`classnames`,[],function(){var e=a.Classnames;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Classnames;return t(n)}):t(e)}),e.define(`useblocks/runtime/classnames`,[],function(){var e=a.Classnames;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Classnames;return t(n)}):t(e)}),e.define(`dayjs`,[],function(){var e=a.Dayjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Dayjs;return t(n)}):t(e)}),e.define(`useblocks/runtime/dayjs`,[],function(){var e=a.Dayjs;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Dayjs;return t(n)}):t(e)}),e.define(`uuid`,[],function(){var e=a.Uuid;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Uuid;return t(n)}):t(e)}),e.define(`useblocks/runtime/uuid`,[],function(){var e=a.Uuid;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.Uuid;return t(n)}):t(e)}),e.define(`useblocks-ui-kit`,[],function(){var e=a.UiKit;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.UiKit;return t(n)}):t(e)}),e.define(`useblocks/ui-kit`,[],function(){var e=a.UiKit;return e&&typeof e.then==`function`||e===void 0?o.then(function(e){var n=e.UiKit;return t(n)}):t(e)})}globalThis.__SHARED_RUNTIME_INIT_SENTINEL__=`@shared-runtime:init-complete`})();var s=null,c=`core`;function l(){return typeof window.__useblocks__?.require==`function`?new Promise((e,t)=>{window.__useblocks__.require([c],t=>e(t),e=>t(e instanceof Error?e:Error(`[loadEngine] Failed to require core module`)))}):Promise.reject(Error(`[loadEngine] AMD loader is unavailable`))}function u(){return s||=l(),s}var d=null,f=null;async function p(e){typeof e?.prefetch==`function`&&await e.prefetch()}function m(){return d||=u().then(()=>void 0),d}function h(e){return f||=p(e),f}function g(e){return Promise.all([m(),h(e)]).then(()=>void 0)}function _(e){let t=e?.startupPrefetchMode;return t===`eager`||t===`idle`||t===`manual`||t===`off`?t:`eager`}function v(e){Promise.resolve().then(()=>g(e)).catch(()=>{})}function y(e){Promise.resolve().then(()=>h(e)).catch(()=>{})}function b(e){let t=_(e);if(t===`eager`)v(e);else if(t===`idle`){let t=window.requestIdleCallback;typeof t==`function`?t(()=>v(e),{timeout:1500}):setTimeout(()=>v(e),0)}}var x=new WeakMap,S=`data-useblocks-config-styles`;function C(e){return typeof e==`string`?e.trim():``}function w(e,t){if(e.firstChild){e.insertBefore(t,e.firstChild);return}e.appendChild(t)}function T(e,t,n){if(!e||typeof document>`u`)return null;let r=C(t),i=x.get(e),a=n||e;if(!r)return i&&(i.remove(),x.delete(e)),null;if(i)return i.textContent!==r&&(i.textContent=r),(i.parentNode!==a||i!==a.firstChild)&&w(a,i),i;let o=document.createElement(`style`);return o.setAttribute(S,`true`),o.textContent=r,w(a,o),x.set(e,o),o}function E(e){if(!e)return;let t=x.get(e);t&&(t.remove(),x.delete(e))}function D(){return!1}var O=`
480
480
  .blocks-app-initial-spinner-wrapper {
481
481
  width: 100%;
482
482
  height: 100%;
@@ -505,4 +505,4 @@ import{a as e,i as t,n,r,t as i}from"./static/esm/6046a29b.js";import{n as a,t a
505
505
  100% {
506
506
  transform: rotate(360deg);
507
507
  }
508
- }`;function k(){return()=>{}}function A(e,t){if(!D()||!e||typeof document>`u`)return k();e.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=document.createElement(`div`);n.classList.add(`blocks-app-initial-spinner-wrapper`);let r=document.createElement(`div`);r.classList.add(`blocks-app-initial-spinner`),n.appendChild(r);let i=document.createElement(`style`);i.setAttribute(t,`true`),i.textContent=O,document.head?.appendChild(i),e.appendChild(n);let a=!1;return()=>{a||(a=!0,n.remove(),i.remove())}}function j(e){for(;e.endsWith(`/`);)e=e.slice(0,e.length-1);return/\/wp-json$/i.test(e)?e:`${e}/wp-json`}j(`https://app.useblocks.io/api`),t(),t(),t(),t();var M;(function(e){let t=`https://racs.rest/v3`;function n(e,n){let r={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(n)};return fetch(`${t}?resource=${e}&dataset=${document.location.hostname}`,r)}e.post=n;async function r(e,n=0){let r={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:`{"filter":{},"limit":${n}}`};return await(await fetch(`${t}/get?resource=${e}&dataset=${document.location.hostname}`,r)).json()}e.getAll=r})(M||={});var N=new Map,P=new WeakMap;function F(e){return j(String(e||``).trim()||`https://app.useblocks.io/api`)}async function I(e){if(!e.getAuthToken)return;let t=await e.getAuthToken(e.user,e.project,void 0);return t?`Bearer ${t}`:void 0}function L(e){return async({baseUrl:t})=>{let n=F(t);if(!n)throw Error(`[Loader] appInit warmup requires baseUrl or REACT_APP_OPENAPI_BASE_URL`);let r=new Headers({Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded;charset=UTF-8`}),i=await I(e);i&&r.set(`authorization`,i);let a=await fetch(`${n}/app/v1/app_init`,{method:`POST`,headers:r,body:new URLSearchParams,credentials:`same-origin`});if(!a.ok)throw Error(`[Loader] appInit request failed: ${a.status} ${a.statusText}`);return a.json()}}function R(e){return JSON.stringify({baseUrl:F(e.baseUrl)||``,project:e.project??``,userId:e.user?.id??``})}function z(e){return async t=>{let n=R(t),r=N.get(n);if(r)return r;let i=Promise.resolve(e(t)).catch(e=>{throw N.delete(n),e});return N.set(n,i),i}}function B(e){if(e.standaloneKey)return e;let t=e.appInit||L(e),n=P.get(t);return n||(n=z(t),P.set(t,n)),Promise.resolve(n({baseUrl:e.baseUrl,user:e.user,project:e.project,prevApp:void 0})).catch(e=>{}),{...e,appInit:n}}var V=new WeakMap;function H(e){let t=null;return async(n,r,i)=>(t||=Promise.resolve(e(n,r,i)).finally(()=>{t=null}),t)}function U(e){if(e.standaloneKey)return e;let t=e.getAuthToken;if(!t)return e;let n=V.get(t);return n||(n=H(t),V.set(t,n)),Promise.resolve(n(e.user,e.project,void 0)).catch(e=>{}),{...e,getAuthToken:n}}function W(e,t){return{...e,element:t}}function G(){return()=>{}}function K(e){let t=e.element;return!t||typeof t==`string`||typeof document>`u`?G():(T(t,e.config?.styles,t),()=>{E(t)})}function q(e){if(!D()||e.initialSpinner===!1||typeof document>`u`)return{options:e,cleanup:G()};let t=e.element;if(!t||typeof t==`string`)return{options:e,cleanup:G()};t.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=A(t,`data-useblocks`),r=e.handleChunkLoaded;return{options:{...e,handleChunkLoaded:()=>{n(),r?.()}},cleanup:n}}function J(e){return e?.length?e.some(e=>Array.isArray(e)?!1:!!(e&&typeof e==`object`&&`url`in e)):!1}var Y=`1.1.9`;async function X(e){await g(window.__useblocks__===void 0?void 0:window.__useblocks__)}async function Z(t){let n=new e,r=await a(t.element,n);n.dispose();let i=B(U(W(t,r)));if(r){let e=o.get(r);if(e)try{let t=await e;if(t.getElement()===r)return t.reset(i)}catch{o.get(r)===e&&o.delete(r)}}let s=K(i),c=q(i),l=c.options;await m();let d=window.__useblocks__===void 0?void 0:window.__useblocks__;J(l.plugins)?await h(d):y(d);let f=u().then(e=>e.init(l));r&&o.set(r,f);try{let e=await f;return r&&o.set(r,e),e}catch(e){throw s(),c.cleanup(),r&&o.get(r)===f&&o.delete(r),e}}async function Q(e){return(await u()).parseAMP(e)}typeof window<`u`&&b(window.__useblocks__===void 0?void 0:window.__useblocks__);export{n as errors,i as helpers,Z as init,Q as parseAMP,r as pluginRegistry,X as preload,Y as version};
508
+ }`;function k(){return()=>{}}function A(e,t){if(!D()||!e||typeof document>`u`)return k();e.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=document.createElement(`div`);n.classList.add(`blocks-app-initial-spinner-wrapper`);let r=document.createElement(`div`);r.classList.add(`blocks-app-initial-spinner`),n.appendChild(r);let i=document.createElement(`style`);i.setAttribute(t,`true`),i.textContent=O,document.head?.appendChild(i),e.appendChild(n);let a=!1;return()=>{a||(a=!0,n.remove(),i.remove())}}function j(e){for(;e.endsWith(`/`);)e=e.slice(0,e.length-1);return/\/wp-json$/i.test(e)?e:`${e}/wp-json`}j(`https://app.useblocks.io/api`),t(),t(),t(),t();var M;(function(e){let t=`https://racs.rest/v3`;function n(e,n){let r={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(n)};return fetch(`${t}?resource=${e}&dataset=${document.location.hostname}`,r)}e.post=n;async function r(e,n=0){let r={method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:`{"filter":{},"limit":${n}}`};return await(await fetch(`${t}/get?resource=${e}&dataset=${document.location.hostname}`,r)).json()}e.getAll=r})(M||={});var N=new Map,P=new WeakMap;function F(e){return j(String(e||``).trim()||`https://app.useblocks.io/api`)}async function I(e){if(!e.getAuthToken)return;let t=await e.getAuthToken(e.user,e.project,void 0);return t?`Bearer ${t}`:void 0}function L(e){return async({baseUrl:t})=>{let n=F(t);if(!n)throw Error(`[Loader] appInit warmup requires baseUrl or REACT_APP_OPENAPI_BASE_URL`);let r=new Headers({Accept:`application/json`,"Content-Type":`application/x-www-form-urlencoded;charset=UTF-8`}),i=await I(e);i&&r.set(`authorization`,i);let a=await fetch(`${n}/app/v1/app_init`,{method:`POST`,headers:r,body:new URLSearchParams,credentials:`same-origin`});if(!a.ok)throw Error(`[Loader] appInit request failed: ${a.status} ${a.statusText}`);return a.json()}}function R(e){return JSON.stringify({baseUrl:F(e.baseUrl)||``,project:e.project??``,userId:e.user?.id??``})}function z(e){return async t=>{let n=R(t),r=N.get(n);if(r)return r;let i=Promise.resolve(e(t)).catch(e=>{throw N.delete(n),e});return N.set(n,i),i}}function B(e){if(e.standaloneKey)return e;let t=e.appInit||L(e),n=P.get(t);return n||(n=z(t),P.set(t,n)),Promise.resolve(n({baseUrl:e.baseUrl,user:e.user,project:e.project,prevApp:void 0})).catch(e=>{}),{...e,appInit:n}}var V=new WeakMap;function H(e){let t=null;return async(n,r,i)=>(t||=Promise.resolve(e(n,r,i)).finally(()=>{t=null}),t)}function U(e){if(e.standaloneKey)return e;let t=e.getAuthToken;if(!t)return e;let n=V.get(t);return n||(n=H(t),V.set(t,n)),Promise.resolve(n(e.user,e.project,void 0)).catch(e=>{}),{...e,getAuthToken:n}}function W(e,t){return{...e,element:t}}function G(){return()=>{}}function K(e){let t=e.element;return!t||typeof t==`string`||typeof document>`u`?G():(T(t,e.config?.styles,t),()=>{E(t)})}function q(e){if(!D()||e.initialSpinner===!1||typeof document>`u`)return{options:e,cleanup:G()};let t=e.element;if(!t||typeof t==`string`)return{options:e,cleanup:G()};t.querySelectorAll(`.blocks-app-initial-spinner-wrapper`).forEach(e=>{e.remove()});let n=A(t,`data-useblocks`),r=e.handleChunkLoaded;return{options:{...e,handleChunkLoaded:()=>{n(),r?.()}},cleanup:n}}function J(e){return e?.length?e.some(e=>Array.isArray(e)?!1:!!(e&&typeof e==`object`&&`url`in e)):!1}var Y=`1.1.11`;async function X(e){await g(window.__useblocks__===void 0?void 0:window.__useblocks__)}async function Z(t){let n=new e,r=await a(t.element,n);n.dispose();let i=B(U(W(t,r)));if(r){let e=o.get(r);if(e)try{let t=await e;if(t.getElement()===r)return t.reset(i)}catch{o.get(r)===e&&o.delete(r)}}let s=K(i),c=q(i),l=c.options;await m();let d=window.__useblocks__===void 0?void 0:window.__useblocks__;J(l.plugins)?await h(d):y(d);let f=u().then(e=>e.init(l));r&&o.set(r,f);try{let e=await f;return r&&o.set(r,e),e}catch(e){throw s(),c.cleanup(),r&&o.get(r)===f&&o.delete(r),e}}async function Q(e){return(await u()).parseAMP(e)}typeof window<`u`&&b(window.__useblocks__===void 0?void 0:window.__useblocks__);export{n as errors,i as helpers,Z as init,Q as parseAMP,r as pluginRegistry,X as preload,Y as version};