diff --git a/dist/assets/index-db887e1a.js b/dist/assets/index-30a95f3f.js similarity index 65% rename from dist/assets/index-db887e1a.js rename to dist/assets/index-30a95f3f.js index bc35e24..7e94d8e 100644 --- a/dist/assets/index-db887e1a.js +++ b/dist/assets/index-30a95f3f.js @@ -1,4 +1,4 @@ -var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var I=(o,s,t)=>(es(o,typeof s!="symbol"?s+"":s,t),t),Dn=(o,s,t)=>{if(!s.has(o))throw TypeError("Cannot "+t)};var n=(o,s,t)=>(Dn(o,s,"read from private field"),t?t.call(o):s.get(o)),h=(o,s,t)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,t)},u=(o,s,t,i)=>(Dn(o,s,"write to private field"),i?i.call(o,t):s.set(o,t),t);var cn=(o,s,t,i)=>({set _(e){u(o,s,e,t)},get _(){return n(o,s,i)}}),p=(o,s,t)=>(Dn(o,s,"access private method"),t);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=t(e);fetch(e.href,r)}})();const ns="modulepreload",is=function(o,s){return new URL(o,s).href},Ii={},Ji=function(s,t,i){if(!t||t.length===0)return s();const e=document.getElementsByTagName("link");return Promise.all(t.map(r=>{if(r=is(r,i),r in Ii)return;Ii[r]=!0;const a=r.endsWith(".css"),c=a?'[rel="stylesheet"]':"";if(!!i)for(let f=e.length-1;f>=0;f--){const g=e[f];if(g.href===r&&(!a||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${c}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":ns,a||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),a)return new Promise((f,g)=>{d.addEventListener("load",f),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>s()).catch(r=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=r,window.dispatchEvent(a),!a.defaultPrevented)throw r})};function os(o={}){const{immediate:s=!1,onNeedRefresh:t,onOfflineReady:i,onRegistered:e,onRegisteredSW:r,onRegisterError:a}=o;let c,l,d;const f=async(b=!0)=>{await l,await(d==null?void 0:d())};async function g(){if("serviceWorker"in navigator){const{Workbox:b}=await Ji(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);c=new b("./service-worker.js",{scope:"./",type:"classic"}),d=async()=>{await(c==null?void 0:c.messageSkipWaiting())};{let y=!1;const k=()=>{y=!0,c==null||c.addEventListener("controlling",w=>{w.isUpdate&&window.location.reload()}),t==null||t()};c.addEventListener("installed",w=>{typeof w.isUpdate>"u"?typeof w.isExternal<"u"?w.isExternal?k():!y&&(i==null||i()):w.isExternal?window.location.reload():!y&&(i==null||i()):w.isUpdate||i==null||i()}),c.addEventListener("waiting",k),c.addEventListener("externalwaiting",k)}c.register({immediate:s}).then(y=>{r?r("./service-worker.js",y):e==null||e(y)}).catch(y=>{a==null||a(y)})}}return l=g(),f}os();/** +var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[s]=t;var E=(o,s,t)=>(es(o,typeof s!="symbol"?s+"":s,t),t),Dn=(o,s,t)=>{if(!s.has(o))throw TypeError("Cannot "+t)};var n=(o,s,t)=>(Dn(o,s,"read from private field"),t?t.call(o):s.get(o)),h=(o,s,t)=>{if(s.has(o))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(o):s.set(o,t)},u=(o,s,t,i)=>(Dn(o,s,"write to private field"),i?i.call(o,t):s.set(o,t),t);var cn=(o,s,t,i)=>({set _(e){u(o,s,e,t)},get _(){return n(o,s,i)}}),p=(o,s,t)=>(Dn(o,s,"access private method"),t);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function t(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=t(e);fetch(e.href,r)}})();const ns="modulepreload",is=function(o,s){return new URL(o,s).href},Ei={},Ji=function(s,t,i){if(!t||t.length===0)return s();const e=document.getElementsByTagName("link");return Promise.all(t.map(r=>{if(r=is(r,i),r in Ei)return;Ei[r]=!0;const a=r.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!i)for(let f=e.length-1;f>=0;f--){const g=e[f];if(g.href===r&&(!a||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=a?"stylesheet":ns,a||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),a)return new Promise((f,g)=>{d.addEventListener("load",f),d.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>s()).catch(r=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=r,window.dispatchEvent(a),!a.defaultPrevented)throw r})};function os(o={}){const{immediate:s=!1,onNeedRefresh:t,onOfflineReady:i,onRegistered:e,onRegisteredSW:r,onRegisterError:a}=o;let l,c;const d=async(g=!0)=>{await c};async function f(){if("serviceWorker"in navigator){const{Workbox:g}=await Ji(()=>import("./workbox-window.prod.es5-a7b12eab.js"),[],import.meta.url);l=new g("./service-worker.js",{scope:"./",type:"classic"}),l.addEventListener("activated",m=>{(m.isUpdate||m.isExternal)&&window.location.reload()}),l.addEventListener("installed",m=>{m.isUpdate||i==null||i()}),l.register({immediate:s}).then(m=>{r?r("./service-worker.js",m):e==null||e(m)}).catch(m=>{a==null||a(m)})}}return c=f(),d}os();/** * (c) Iconify * * For the full copyright and license information, please view the license.txt @@ -8,16 +8,16 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config * * @license MIT * @version 1.0.8 -*/const Zi=Object.freeze({left:0,top:0,width:16,height:16}),fn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sn=Object.freeze({...Zi,...fn}),Jn=Object.freeze({...sn,body:"",hidden:!1}),ss=Object.freeze({width:null,height:null}),to=Object.freeze({...ss,...fn});function rs(o,s=0){const t=o.replace(/^-?[0-9.]*/,"");function i(e){for(;e<0;)e+=4;return e%4}if(t===""){const e=parseInt(o);return isNaN(e)?0:i(e)}else if(t!==o){let e=0;switch(t){case"%":e=25;break;case"deg":e=90}if(e){let r=parseFloat(o.slice(0,o.length-t.length));return isNaN(r)?0:(r=r/e,r%1===0?i(r):0)}}return s}const as=/[\s,]+/;function cs(o,s){s.split(as).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0;break}})}const eo={...to,preserveAspectRatio:""};function Li(o){const s={...eo},t=(i,e)=>o.getAttribute(i)||e;return s.width=t("width",null),s.height=t("height",null),s.rotate=rs(t("rotate","")),cs(s,t("flip","")),s.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),s}function ls(o,s){for(const t in eo)if(o[t]!==s[t])return!0;return!1}const ue=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(o,s,t,i="")=>{const e=o.split(":");if(o.slice(0,1)==="@"){if(e.length<2||e.length>3)return null;i=e.shift().slice(1)}if(e.length>3||!e.length)return null;if(e.length>1){const c=e.pop(),l=e.pop(),d={provider:e.length>0?e[0]:i,prefix:l,name:c};return s&&!dn(d)?null:d}const r=e[0],a=r.split("-");if(a.length>1){const c={provider:i,prefix:a.shift(),name:a.join("-")};return s&&!dn(c)?null:c}if(t&&i===""){const c={provider:i,prefix:"",name:r};return s&&!dn(c,t)?null:c}return null},dn=(o,s)=>o?!!((o.provider===""||o.provider.match(ue))&&(s&&o.prefix===""||o.prefix.match(ue))&&o.name.match(ue)):!1;function hs(o,s){const t={};!o.hFlip!=!s.hFlip&&(t.hFlip=!0),!o.vFlip!=!s.vFlip&&(t.vFlip=!0);const i=((o.rotate||0)+(s.rotate||0))%4;return i&&(t.rotate=i),t}function Ti(o,s){const t=hs(o,s);for(const i in Jn)i in fn?i in o&&!(i in t)&&(t[i]=fn[i]):i in s?t[i]=s[i]:i in o&&(t[i]=o[i]);return t}function ds(o,s){const t=o.icons,i=o.aliases||Object.create(null),e=Object.create(null);function r(a){if(t[a])return e[a]=[];if(!(a in e)){e[a]=null;const c=i[a]&&i[a].parent,l=c&&r(c);l&&(e[a]=[c].concat(l))}return e[a]}return(s||Object.keys(t).concat(Object.keys(i))).forEach(r),e}function us(o,s,t){const i=o.icons,e=o.aliases||Object.create(null);let r={};function a(c){r=Ti(i[c]||e[c],r)}return a(s),t.forEach(a),Ti(o,r)}function no(o,s){const t=[];if(typeof o!="object"||typeof o.icons!="object")return t;o.not_found instanceof Array&&o.not_found.forEach(e=>{s(e,null),t.push(e)});const i=ds(o);for(const e in i){const r=i[e];r&&(s(e,us(o,e,r)),t.push(e))}return t}const fs={provider:"",aliases:{},not_found:{},...Zi};function Gn(o,s){for(const t in s)if(t in o&&typeof o[t]!=typeof s[t])return!1;return!0}function io(o){if(typeof o!="object"||o===null)return null;const s=o;if(typeof s.prefix!="string"||!o.icons||typeof o.icons!="object"||!Gn(o,fs))return null;const t=s.icons;for(const e in t){const r=t[e];if(!e.match(ue)||typeof r.body!="string"||!Gn(r,Jn))return null}const i=s.aliases||Object.create(null);for(const e in i){const r=i[e],a=r.parent;if(!e.match(ue)||typeof a!="string"||!t[a]&&!i[a]||!Gn(r,Jn))return null}return s}const pn=Object.create(null);function ps(o,s){return{provider:o,prefix:s,icons:Object.create(null),missing:new Set}}function Ft(o,s){const t=pn[o]||(pn[o]=Object.create(null));return t[s]||(t[s]=ps(o,s))}function yi(o,s){return io(s)?no(s,(t,i)=>{i?o.icons[t]=i:o.missing.add(t)}):[]}function gs(o,s,t){try{if(typeof t.body=="string")return o.icons[s]={...t},!0}catch{}return!1}function ms(o,s){let t=[];return(typeof o=="string"?[o]:Object.keys(pn)).forEach(e=>{(typeof e=="string"&&typeof s=="string"?[s]:Object.keys(pn[e]||{})).forEach(a=>{const c=Ft(e,a);t=t.concat(Object.keys(c.icons).map(l=>(e!==""?"@"+e+":":"")+a+":"+l))})}),t}let pe=!1;function oo(o){return typeof o=="boolean"&&(pe=o),pe}function ge(o){const s=typeof o=="string"?rn(o,!0,pe):o;if(s){const t=Ft(s.provider,s.prefix),i=s.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function so(o,s){const t=rn(o,!0,pe);if(!t)return!1;const i=Ft(t.provider,t.prefix);return gs(i,t.name,s)}function Ci(o,s){if(typeof o!="object")return!1;if(typeof s!="string"&&(s=o.provider||""),pe&&!s&&!o.prefix){let e=!1;return io(o)&&(o.prefix="",no(o,(r,a)=>{a&&so(r,a)&&(e=!0)})),e}const t=o.prefix;if(!dn({provider:s,prefix:t,name:"a"}))return!1;const i=Ft(s,t);return!!yi(i,o)}function bs(o){return!!ge(o)}function ys(o){const s=ge(o);return s?{...sn,...s}:null}function ws(o){const s={loaded:[],missing:[],pending:[]},t=Object.create(null);o.sort((e,r)=>e.provider!==r.provider?e.provider.localeCompare(r.provider):e.prefix!==r.prefix?e.prefix.localeCompare(r.prefix):e.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return o.forEach(e=>{if(i.name===e.name&&i.prefix===e.prefix&&i.provider===e.provider)return;i=e;const r=e.provider,a=e.prefix,c=e.name,l=t[r]||(t[r]=Object.create(null)),d=l[a]||(l[a]=Ft(r,a));let f;c in d.icons?f=s.loaded:a===""||d.missing.has(c)?f=s.missing:f=s.pending;const g={provider:r,prefix:a,name:c};f.push(g)}),s}function ro(o,s){o.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(e=>e.id!==s))})}function xs(o){o.pendingCallbacksFlag||(o.pendingCallbacksFlag=!0,setTimeout(()=>{o.pendingCallbacksFlag=!1;const s=o.loaderCallbacks?o.loaderCallbacks.slice(0):[];if(!s.length)return;let t=!1;const i=o.provider,e=o.prefix;s.forEach(r=>{const a=r.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==e)return!0;const d=l.name;if(o.icons[d])a.loaded.push({provider:i,prefix:e,name:d});else if(o.missing.has(d))a.missing.push({provider:i,prefix:e,name:d});else return t=!0,!0;return!1}),a.pending.length!==c&&(t||ro([o],r.id),r.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),r.abort))})}))}let vs=0;function Ss(o,s,t){const i=vs++,e=ro.bind(null,t,i);if(!s.pending.length)return e;const r={id:i,icons:s,callback:o,abort:e};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(r)}),e}const Zn=Object.create(null);function Ai(o,s){Zn[o]=s}function ti(o){return Zn[o]||Zn[""]}function ks(o,s=!0,t=!1){const i=[];return o.forEach(e=>{const r=typeof e=="string"?rn(e,s,t):e;r&&i.push(r)}),i}var Es={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Is(o,s,t,i){const e=o.resources.length,r=o.random?Math.floor(Math.random()*e):o.index;let a;if(o.random){let v=o.resources.slice(0);for(a=[];v.length>1;){const _=Math.floor(Math.random()*v.length);a.push(v[_]),v=v.slice(0,_).concat(v.slice(_+1))}a=a.concat(v)}else a=o.resources.slice(r).concat(o.resources.slice(0,r));const c=Date.now();let l="pending",d=0,f,g=null,b=[],y=[];typeof i=="function"&&y.push(i);function k(){g&&(clearTimeout(g),g=null)}function w(){l==="pending"&&(l="aborted"),k(),b.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),b=[]}function Rt(v,_){_&&(y=[]),typeof v=="function"&&y.push(v)}function et(){return{startTime:c,payload:s,status:l,queriesSent:d,queriesPending:b.length,subscribe:Rt,abort:w}}function L(){l="failed",y.forEach(v=>{v(void 0,f)})}function R(){b.forEach(v=>{v.status==="pending"&&(v.status="aborted")}),b=[]}function Hn(v,_,le){const an=_!=="success";switch(b=b.filter(Pt=>Pt!==v),l){case"pending":break;case"failed":if(an||!o.dataAfterTimeout)return;break;default:return}if(_==="abort"){f=le,L();return}if(an){f=le,b.length||(a.length?ce():L());return}if(k(),R(),!o.random){const Pt=o.resources.indexOf(v.resource);Pt!==-1&&Pt!==o.index&&(o.index=Pt)}l="completed",y.forEach(Pt=>{Pt(le)})}function ce(){if(l!=="pending")return;k();const v=a.shift();if(v===void 0){if(b.length){g=setTimeout(()=>{k(),l==="pending"&&(R(),L())},o.timeout);return}L();return}const _={status:"pending",resource:v,callback:(le,an)=>{Hn(_,le,an)}};b.push(_),d++,g=setTimeout(ce,o.rotate),t(v,s,_.callback)}return setTimeout(ce),et}function ao(o){const s={...Es,...o};let t=[];function i(){t=t.filter(c=>c().status==="pending")}function e(c,l,d){const f=Is(s,c,l,(g,b)=>{i(),d&&d(g,b)});return t.push(f),f}function r(c){return t.find(l=>c(l))||null}return{query:e,find:r,setIndex:c=>{s.index=c},getIndex:()=>s.index,cleanup:i}}function wi(o){let s;if(typeof o.resources=="string")s=[o.resources];else if(s=o.resources,!(s instanceof Array)||!s.length)return null;return{resources:s,path:o.path||"/",maxURL:o.maxURL||500,rotate:o.rotate||750,timeout:o.timeout||5e3,random:o.random===!0,index:o.index||0,dataAfterTimeout:o.dataAfterTimeout!==!1}}const $n=Object.create(null),he=["https://api.simplesvg.com","https://api.unisvg.com"],un=[];for(;he.length>0;)he.length===1||Math.random()>.5?un.push(he.shift()):un.push(he.pop());$n[""]=wi({resources:["https://api.iconify.design"].concat(un)});function Fi(o,s){const t=wi(s);return t===null?!1:($n[o]=t,!0)}function Wn(o){return $n[o]}function Ls(){return Object.keys($n)}function Ri(){}const Qn=Object.create(null);function Ts(o){if(!Qn[o]){const s=Wn(o);if(!s)return;const t=ao(s),i={config:s,redundancy:t};Qn[o]=i}return Qn[o]}function co(o,s,t){let i,e;if(typeof o=="string"){const r=ti(o);if(!r)return t(void 0,424),Ri;e=r.send;const a=Ts(o);a&&(i=a.redundancy)}else{const r=wi(o);if(r){i=ao(r);const a=o.resources?o.resources[0]:"",c=ti(a);c&&(e=c.send)}}return!i||!e?(t(void 0,424),Ri):i.query(s,e,t)().abort}const Pi="iconify2",me="iconify",lo=me+"-count",zi=me+"-version",ho=36e5,Cs=168;function ei(o,s){try{return o.getItem(s)}catch{}}function xi(o,s,t){try{return o.setItem(s,t),!0}catch{}}function Bi(o,s){try{o.removeItem(s)}catch{}}function ni(o,s){return xi(o,lo,s.toString())}function ii(o){return parseInt(ei(o,lo))||0}const Vt={local:!0,session:!0},uo={local:new Set,session:new Set};let vi=!1;function As(o){vi=o}let ln=typeof window>"u"?{}:window;function fo(o){const s=o+"Storage";try{if(ln&&ln[s]&&typeof ln[s].length=="number")return ln[s]}catch{}Vt[o]=!1}function po(o,s){const t=fo(o);if(!t)return;const i=ei(t,zi);if(i!==Pi){if(i){const c=ii(t);for(let l=0;l{const l=me+c.toString(),d=ei(t,l);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>e&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&s(f,c))return!0}catch{}Bi(t,l)}};let a=ii(t);for(let c=a-1;c>=0;c--)r(c)||(c===a-1?(a--,ni(t,a)):uo[o].add(c))}function go(){if(!vi){As(!0);for(const o in Vt)po(o,s=>{const t=s.data,i=s.provider,e=t.prefix,r=Ft(i,e);if(!yi(r,t).length)return!1;const a=t.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,a):a,!0})}}function Fs(o,s){const t=o.lastModifiedCached;if(t&&t>=s)return t===s;if(o.lastModifiedCached=s,t)for(const i in Vt)po(i,e=>{const r=e.data;return e.provider!==o.provider||r.prefix!==o.prefix||r.lastModified===s});return!0}function Rs(o,s){vi||go();function t(i){let e;if(!Vt[i]||!(e=fo(i)))return;const r=uo[i];let a;if(r.size)r.delete(a=Array.from(r).shift());else if(a=ii(e),!ni(e,a+1))return;const c={cached:Math.floor(Date.now()/ho),provider:o.provider,data:s};return xi(e,me+a.toString(),JSON.stringify(c))}s.lastModified&&!Fs(o,s.lastModified)||Object.keys(s.icons).length&&(s.not_found&&(s=Object.assign({},s),delete s.not_found),t("local")||t("session"))}function Mi(){}function Ps(o){o.iconsLoaderFlag||(o.iconsLoaderFlag=!0,setTimeout(()=>{o.iconsLoaderFlag=!1,xs(o)}))}function zs(o,s){o.iconsToLoad?o.iconsToLoad=o.iconsToLoad.concat(s).sort():o.iconsToLoad=s,o.iconsQueueFlag||(o.iconsQueueFlag=!0,setTimeout(()=>{o.iconsQueueFlag=!1;const{provider:t,prefix:i}=o,e=o.iconsToLoad;delete o.iconsToLoad;let r;if(!e||!(r=ti(t)))return;r.prepare(t,i,e).forEach(c=>{co(t,c,l=>{if(typeof l!="object")c.icons.forEach(d=>{o.missing.add(d)});else try{const d=yi(o,l);if(!d.length)return;const f=o.pendingIcons;f&&d.forEach(g=>{f.delete(g)}),Rs(o,l)}catch(d){console.error(d)}Ps(o)})})}))}const Si=(o,s)=>{const t=ks(o,!0,oo()),i=ws(t);if(!i.pending.length){let l=!0;return s&&setTimeout(()=>{l&&s(i.loaded,i.missing,i.pending,Mi)}),()=>{l=!1}}const e=Object.create(null),r=[];let a,c;return i.pending.forEach(l=>{const{provider:d,prefix:f}=l;if(f===c&&d===a)return;a=d,c=f,r.push(Ft(d,f));const g=e[d]||(e[d]=Object.create(null));g[f]||(g[f]=[])}),i.pending.forEach(l=>{const{provider:d,prefix:f,name:g}=l,b=Ft(d,f),y=b.pendingIcons||(b.pendingIcons=new Set);y.has(g)||(y.add(g),e[d][f].push(g))}),r.forEach(l=>{const{provider:d,prefix:f}=l;e[d][f].length&&zs(l,e[d][f])}),s?Ss(s,i,r):Mi},Bs=o=>new Promise((s,t)=>{const i=typeof o=="string"?rn(o,!0):o;if(!i){t(o);return}Si([i||o],e=>{if(e.length&&i){const r=ge(i);if(r){s({...sn,...r});return}}t(o)})});function Ms(o){try{const s=typeof o=="string"?JSON.parse(o):o;if(typeof s.body=="string")return{...s}}catch{}}function Os(o,s){const t=typeof o=="string"?rn(o,!0,!0):null;if(!t){const r=Ms(o);return{value:o,data:r}}const i=ge(t);if(i!==void 0||!t.prefix)return{value:o,name:t,data:i};const e=Si([t],()=>s(o,t,ge(t)));return{value:o,name:t,loading:e}}function Yn(o){return o.hasAttribute("inline")}let mo=!1;try{mo=navigator.vendor.indexOf("Apple")===0}catch{}function Ns(o,s){switch(s){case"svg":case"bg":case"mask":return s}return s!=="style"&&(mo||o.indexOf("o==="unset"||o==="undefined"||o==="none";function bo(o,s){const t={...sn,...o},i={...to,...s},e={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,i].forEach(k=>{const w=[],Rt=k.hFlip,et=k.vFlip;let L=k.rotate;Rt?et?L+=2:(w.push("translate("+(e.width+e.left).toString()+" "+(0-e.top).toString()+")"),w.push("scale(-1 1)"),e.top=e.left=0):et&&(w.push("translate("+(0-e.left).toString()+" "+(e.height+e.top).toString()+")"),w.push("scale(1 -1)"),e.top=e.left=0);let R;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:R=e.height/2+e.top,w.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:w.unshift("rotate(180 "+(e.width/2+e.left).toString()+" "+(e.height/2+e.top).toString()+")");break;case 3:R=e.width/2+e.left,w.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}L%2===1&&(e.left!==e.top&&(R=e.left,e.left=e.top,e.top=R),e.width!==e.height&&(R=e.width,e.width=e.height,e.height=R)),w.length&&(r=''+r+"")});const a=i.width,c=i.height,l=e.width,d=e.height;let f,g;a===null?(g=c===null?"1em":c==="auto"?d:c,f=oi(g,l/d)):(f=a==="auto"?l:a,g=c===null?oi(f,d/l):c==="auto"?d:c);const b={},y=(k,w)=>{js(w)||(b[k]=w.toString())};return y("width",f),y("height",g),b.viewBox=e.left.toString()+" "+e.top.toString()+" "+l.toString()+" "+d.toString(),{attributes:b,body:r}}const qs=()=>{let o;try{if(o=fetch,typeof o=="function")return o}catch{}};let gn=qs();function $s(o){gn=o}function Ws(){return gn}function Hs(o,s){const t=Wn(o);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let e=0;t.resources.forEach(a=>{e=Math.max(e,a.length)});const r=s+".json?icons=";i=t.maxURL-e-t.path.length-r.length}return i}function Ds(o){return o===404}const Gs=(o,s,t)=>{const i=[],e=Hs(o,s),r="icons";let a={type:r,provider:o,prefix:s,icons:[]},c=0;return t.forEach((l,d)=>{c+=l.length+1,c>=e&&d>0&&(i.push(a),a={type:r,provider:o,prefix:s,icons:[]},c=l.length),a.icons.push(l)}),i.push(a),i};function Qs(o){if(typeof o=="string"){const s=Wn(o);if(s)return s.path}return"/"}const Ys=(o,s,t)=>{if(!gn){t("abort",424);return}let i=Qs(s.provider);switch(s.type){case"icons":{const r=s.prefix,c=s.icons.join(","),l=new URLSearchParams({icons:c});i+=r+".json?"+l.toString();break}case"custom":{const r=s.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:t("abort",400);return}let e=503;gn(o+i).then(r=>{const a=r.status;if(a!==200){setTimeout(()=>{t(Ds(a)?"abort":"next",a)});return}return e=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?t("abort",r):t("next",e)});return}setTimeout(()=>{t("success",r)})}).catch(()=>{t("next",e)})},Xs={prepare:Gs,send:Ys};function Oi(o,s){switch(o){case"local":case"session":Vt[o]=s;break;case"all":for(const t in Vt)Vt[t]=s;break}}const Xn="data-style";let yo="";function Vs(o){yo=o}function Ni(o,s){let t=Array.from(o.childNodes).find(i=>i.hasAttribute&&i.hasAttribute(Xn));t||(t=document.createElement("style"),t.setAttribute(Xn,Xn),o.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(s?"-0.125em":"0")+"}span,svg{display:block}"+yo}function wo(){Ai("",Xs),oo(!0);let o;try{o=window}catch{}if(o){if(go(),o.IconifyPreload!==void 0){const t=o.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!="object"||e===null||e instanceof Array||typeof e.icons!="object"||typeof e.prefix!="string"||!Ci(e))&&console.error(i)}catch{console.error(i)}})}if(o.IconifyProviders!==void 0){const t=o.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const e="IconifyProviders["+i+"] is invalid.";try{const r=t[i];if(typeof r!="object"||!r||r.resources===void 0)continue;Fi(i,r)||console.error(e)}catch{console.error(e)}}}}return{enableCache:t=>Oi(t,!0),disableCache:t=>Oi(t,!1),iconExists:bs,getIcon:ys,listIcons:ms,addIcon:so,addCollection:Ci,calculateSize:oi,buildIcon:bo,loadIcons:Si,loadIcon:Bs,addAPIProvider:Fi,appendCustomStyle:Vs,_api:{getAPIConfig:Wn,setAPIModule:Ai,sendAPIQuery:co,setFetch:$s,getFetch:Ws,listAPIProviders:Ls}}}function xo(o,s){let t=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in s)t+=" "+i+'="'+s[i]+'"';return'"+o+""}function Ks(o){return o.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Js(o){return"data:image/svg+xml,"+Ks(o)}function Zs(o){return'url("'+Js(o)+'")'}const si={"background-color":"currentColor"},vo={"background-color":"transparent"},Ui={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},_i={"-webkit-mask":si,mask:si,background:vo};for(const o in _i){const s=_i[o];for(const t in Ui)s[o+"-"+t]=Ui[t]}function ji(o){return o?o+(o.match(/^[-0-9.]+$/)?"px":""):"inherit"}function tr(o,s,t){const i=document.createElement("span");let e=o.body;e.indexOf("");const r=o.attributes,a=xo(e,{...r,width:s.width+"",height:s.height+""}),c=Zs(a),l=i.style,d={"--svg":c,width:ji(r.width),height:ji(r.height),...t?si:vo};for(const f in d)l.setProperty(f,d[f]);return i}let fe;function er(){try{fe=window.trustedTypes.createPolicy("iconify",{createHTML:o=>o})}catch{fe=null}}function nr(o){return fe===void 0&&er(),fe?fe.createHTML(o):o}function ir(o){const s=document.createElement("span"),t=o.attributes;let i="";t.width||(i="width: inherit;"),t.height||(i+="height: inherit;"),i&&(t.style=i);const e=xo(o.body,t);return s.innerHTML=nr(e),s.firstChild}function qi(o,s){const t=s.icon.data,i=s.customisations,e=bo(t,i);i.preserveAspectRatio&&(e.attributes.preserveAspectRatio=i.preserveAspectRatio);const r=s.renderedMode;let a;switch(r){case"svg":a=ir(e);break;default:a=tr(e,{...sn,...t},r==="mask")}const c=Array.from(o.childNodes).find(l=>{const d=l.tagName&&l.tagName.toUpperCase();return d==="SPAN"||d==="SVG"});c?a.tagName==="SPAN"&&c.tagName===a.tagName?c.setAttribute("style",a.getAttribute("style")):o.replaceChild(a,c):o.appendChild(a)}function $i(o,s,t){const i=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:s,icon:o,lastRender:i}}function or(o="iconify-icon"){let s,t;try{s=window.customElements,t=window.HTMLElement}catch{return}if(!s||!t)return;const i=s.get(o);if(i)return i;const e=["icon","mode","inline","width","height","rotate","flip"],r=class extends t{constructor(){super();I(this,"_shadowRoot");I(this,"_state");I(this,"_checkQueued",!1);const l=this._shadowRoot=this.attachShadow({mode:"open"}),d=Yn(this);Ni(l,d),this._state=$i({value:""},d),this._queueCheck()}static get observedAttributes(){return e.slice(0)}attributeChangedCallback(l){if(l==="inline"){const d=Yn(this),f=this._state;d!==f.inline&&(f.inline=d,Ni(this._shadowRoot,d))}else this._queueCheck()}get icon(){const l=this.getAttribute("icon");if(l&&l.slice(0,1)==="{")try{return JSON.parse(l)}catch{}return l}set icon(l){typeof l=="object"&&(l=JSON.stringify(l)),this.setAttribute("icon",l)}get inline(){return Yn(this)}set inline(l){l?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const l=this._state;if(l.rendered){const d=this._shadowRoot;if(l.renderedMode==="svg")try{d.lastChild.setCurrentTime(0);return}catch{}qi(d,l)}}get status(){const l=this._state;return l.rendered?"rendered":l.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const l=this._state,d=this.getAttribute("icon");if(d!==l.icon.value){this._iconChanged(d);return}if(!l.rendered)return;const f=this.getAttribute("mode"),g=Li(this);(l.attrMode!==f||ls(l.customisations,g))&&this._renderIcon(l.icon,g,f)}_iconChanged(l){const d=Os(l,(f,g,b)=>{const y=this._state;if(y.rendered||this.getAttribute("icon")!==f)return;const k={value:f,name:g,data:b};k.data?this._gotIconData(k):y.icon=k});d.data?this._gotIconData(d):this._state=$i(d,this._state.inline,this._state)}_gotIconData(l){this._checkQueued=!1,this._renderIcon(l,Li(this),this.getAttribute("mode"))}_renderIcon(l,d,f){const g=Ns(l.data.body,f),b=this._state.inline;qi(this._shadowRoot,this._state={rendered:!0,icon:l,inline:b,customisations:d,attrMode:f,renderedMode:g})}};e.forEach(c=>{c in r.prototype||Object.defineProperty(r.prototype,c,{get:function(){return this.getAttribute(c)},set:function(l){l!==null?this.setAttribute(c,l):this.removeAttribute(c)}})});const a=wo();for(const c in a)r[c]=r.prototype[c]=a[c];return s.define(o,r),r}or()||wo();const sr=`:host{position:relative}.bottom-img{display:block;max-width:100%;max-height:100%}.top-img{position:absolute;top:0;left:0;-webkit-mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.8);animation-duration:4s;animation-timing-function:linear;animation-iteration-count:infinite;animation-name:flicker;max-width:100%;max-height:100%}@keyframes flicker{0%{-webkit-mask-position:150% 0%;mask-position:150% 0%}30%{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}to{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}} +*/const Zi=Object.freeze({left:0,top:0,width:16,height:16}),fn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),sn=Object.freeze({...Zi,...fn}),Jn=Object.freeze({...sn,body:"",hidden:!1}),ss=Object.freeze({width:null,height:null}),to=Object.freeze({...ss,...fn});function rs(o,s=0){const t=o.replace(/^-?[0-9.]*/,"");function i(e){for(;e<0;)e+=4;return e%4}if(t===""){const e=parseInt(o);return isNaN(e)?0:i(e)}else if(t!==o){let e=0;switch(t){case"%":e=25;break;case"deg":e=90}if(e){let r=parseFloat(o.slice(0,o.length-t.length));return isNaN(r)?0:(r=r/e,r%1===0?i(r):0)}}return s}const as=/[\s,]+/;function cs(o,s){s.split(as).forEach(t=>{switch(t.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0;break}})}const eo={...to,preserveAspectRatio:""};function Li(o){const s={...eo},t=(i,e)=>o.getAttribute(i)||e;return s.width=t("width",null),s.height=t("height",null),s.rotate=rs(t("rotate","")),cs(s,t("flip","")),s.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),s}function ls(o,s){for(const t in eo)if(o[t]!==s[t])return!0;return!1}const ue=/^[a-z0-9]+(-[a-z0-9]+)*$/,rn=(o,s,t,i="")=>{const e=o.split(":");if(o.slice(0,1)==="@"){if(e.length<2||e.length>3)return null;i=e.shift().slice(1)}if(e.length>3||!e.length)return null;if(e.length>1){const l=e.pop(),c=e.pop(),d={provider:e.length>0?e[0]:i,prefix:c,name:l};return s&&!dn(d)?null:d}const r=e[0],a=r.split("-");if(a.length>1){const l={provider:i,prefix:a.shift(),name:a.join("-")};return s&&!dn(l)?null:l}if(t&&i===""){const l={provider:i,prefix:"",name:r};return s&&!dn(l,t)?null:l}return null},dn=(o,s)=>o?!!((o.provider===""||o.provider.match(ue))&&(s&&o.prefix===""||o.prefix.match(ue))&&o.name.match(ue)):!1;function hs(o,s){const t={};!o.hFlip!=!s.hFlip&&(t.hFlip=!0),!o.vFlip!=!s.vFlip&&(t.vFlip=!0);const i=((o.rotate||0)+(s.rotate||0))%4;return i&&(t.rotate=i),t}function Ti(o,s){const t=hs(o,s);for(const i in Jn)i in fn?i in o&&!(i in t)&&(t[i]=fn[i]):i in s?t[i]=s[i]:i in o&&(t[i]=o[i]);return t}function ds(o,s){const t=o.icons,i=o.aliases||Object.create(null),e=Object.create(null);function r(a){if(t[a])return e[a]=[];if(!(a in e)){e[a]=null;const l=i[a]&&i[a].parent,c=l&&r(l);c&&(e[a]=[l].concat(c))}return e[a]}return(s||Object.keys(t).concat(Object.keys(i))).forEach(r),e}function us(o,s,t){const i=o.icons,e=o.aliases||Object.create(null);let r={};function a(l){r=Ti(i[l]||e[l],r)}return a(s),t.forEach(a),Ti(o,r)}function no(o,s){const t=[];if(typeof o!="object"||typeof o.icons!="object")return t;o.not_found instanceof Array&&o.not_found.forEach(e=>{s(e,null),t.push(e)});const i=ds(o);for(const e in i){const r=i[e];r&&(s(e,us(o,e,r)),t.push(e))}return t}const fs={provider:"",aliases:{},not_found:{},...Zi};function Gn(o,s){for(const t in s)if(t in o&&typeof o[t]!=typeof s[t])return!1;return!0}function io(o){if(typeof o!="object"||o===null)return null;const s=o;if(typeof s.prefix!="string"||!o.icons||typeof o.icons!="object"||!Gn(o,fs))return null;const t=s.icons;for(const e in t){const r=t[e];if(!e.match(ue)||typeof r.body!="string"||!Gn(r,Jn))return null}const i=s.aliases||Object.create(null);for(const e in i){const r=i[e],a=r.parent;if(!e.match(ue)||typeof a!="string"||!t[a]&&!i[a]||!Gn(r,Jn))return null}return s}const pn=Object.create(null);function ps(o,s){return{provider:o,prefix:s,icons:Object.create(null),missing:new Set}}function Ft(o,s){const t=pn[o]||(pn[o]=Object.create(null));return t[s]||(t[s]=ps(o,s))}function yi(o,s){return io(s)?no(s,(t,i)=>{i?o.icons[t]=i:o.missing.add(t)}):[]}function gs(o,s,t){try{if(typeof t.body=="string")return o.icons[s]={...t},!0}catch{}return!1}function ms(o,s){let t=[];return(typeof o=="string"?[o]:Object.keys(pn)).forEach(e=>{(typeof e=="string"&&typeof s=="string"?[s]:Object.keys(pn[e]||{})).forEach(a=>{const l=Ft(e,a);t=t.concat(Object.keys(l.icons).map(c=>(e!==""?"@"+e+":":"")+a+":"+c))})}),t}let pe=!1;function oo(o){return typeof o=="boolean"&&(pe=o),pe}function ge(o){const s=typeof o=="string"?rn(o,!0,pe):o;if(s){const t=Ft(s.provider,s.prefix),i=s.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}function so(o,s){const t=rn(o,!0,pe);if(!t)return!1;const i=Ft(t.provider,t.prefix);return gs(i,t.name,s)}function Ci(o,s){if(typeof o!="object")return!1;if(typeof s!="string"&&(s=o.provider||""),pe&&!s&&!o.prefix){let e=!1;return io(o)&&(o.prefix="",no(o,(r,a)=>{a&&so(r,a)&&(e=!0)})),e}const t=o.prefix;if(!dn({provider:s,prefix:t,name:"a"}))return!1;const i=Ft(s,t);return!!yi(i,o)}function bs(o){return!!ge(o)}function ys(o){const s=ge(o);return s?{...sn,...s}:null}function ws(o){const s={loaded:[],missing:[],pending:[]},t=Object.create(null);o.sort((e,r)=>e.provider!==r.provider?e.provider.localeCompare(r.provider):e.prefix!==r.prefix?e.prefix.localeCompare(r.prefix):e.name.localeCompare(r.name));let i={provider:"",prefix:"",name:""};return o.forEach(e=>{if(i.name===e.name&&i.prefix===e.prefix&&i.provider===e.provider)return;i=e;const r=e.provider,a=e.prefix,l=e.name,c=t[r]||(t[r]=Object.create(null)),d=c[a]||(c[a]=Ft(r,a));let f;l in d.icons?f=s.loaded:a===""||d.missing.has(l)?f=s.missing:f=s.pending;const g={provider:r,prefix:a,name:l};f.push(g)}),s}function ro(o,s){o.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(e=>e.id!==s))})}function vs(o){o.pendingCallbacksFlag||(o.pendingCallbacksFlag=!0,setTimeout(()=>{o.pendingCallbacksFlag=!1;const s=o.loaderCallbacks?o.loaderCallbacks.slice(0):[];if(!s.length)return;let t=!1;const i=o.provider,e=o.prefix;s.forEach(r=>{const a=r.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==e)return!0;const d=c.name;if(o.icons[d])a.loaded.push({provider:i,prefix:e,name:d});else if(o.missing.has(d))a.missing.push({provider:i,prefix:e,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||ro([o],r.id),r.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),r.abort))})}))}let xs=0;function Ss(o,s,t){const i=xs++,e=ro.bind(null,t,i);if(!s.pending.length)return e;const r={id:i,icons:s,callback:o,abort:e};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(r)}),e}const Zn=Object.create(null);function Ai(o,s){Zn[o]=s}function ti(o){return Zn[o]||Zn[""]}function ks(o,s=!0,t=!1){const i=[];return o.forEach(e=>{const r=typeof e=="string"?rn(e,s,t):e;r&&i.push(r)}),i}var Is={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Es(o,s,t,i){const e=o.resources.length,r=o.random?Math.floor(Math.random()*e):o.index;let a;if(o.random){let w=o.resources.slice(0);for(a=[];w.length>1;){const j=Math.floor(Math.random()*w.length);a.push(w[j]),w=w.slice(0,j).concat(w.slice(j+1))}a=a.concat(w)}else a=o.resources.slice(r).concat(o.resources.slice(0,r));const l=Date.now();let c="pending",d=0,f,g=null,m=[],x=[];typeof i=="function"&&x.push(i);function S(){g&&(clearTimeout(g),g=null)}function k(){c==="pending"&&(c="aborted"),S(),m.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),m=[]}function Rt(w,j){j&&(x=[]),typeof w=="function"&&x.push(w)}function et(){return{startTime:l,payload:s,status:c,queriesSent:d,queriesPending:m.length,subscribe:Rt,abort:k}}function L(){c="failed",x.forEach(w=>{w(void 0,f)})}function R(){m.forEach(w=>{w.status==="pending"&&(w.status="aborted")}),m=[]}function Hn(w,j,le){const an=j!=="success";switch(m=m.filter(Pt=>Pt!==w),c){case"pending":break;case"failed":if(an||!o.dataAfterTimeout)return;break;default:return}if(j==="abort"){f=le,L();return}if(an){f=le,m.length||(a.length?ce():L());return}if(S(),R(),!o.random){const Pt=o.resources.indexOf(w.resource);Pt!==-1&&Pt!==o.index&&(o.index=Pt)}c="completed",x.forEach(Pt=>{Pt(le)})}function ce(){if(c!=="pending")return;S();const w=a.shift();if(w===void 0){if(m.length){g=setTimeout(()=>{S(),c==="pending"&&(R(),L())},o.timeout);return}L();return}const j={status:"pending",resource:w,callback:(le,an)=>{Hn(j,le,an)}};m.push(j),d++,g=setTimeout(ce,o.rotate),t(w,s,j.callback)}return setTimeout(ce),et}function ao(o){const s={...Is,...o};let t=[];function i(){t=t.filter(l=>l().status==="pending")}function e(l,c,d){const f=Es(s,l,c,(g,m)=>{i(),d&&d(g,m)});return t.push(f),f}function r(l){return t.find(c=>l(c))||null}return{query:e,find:r,setIndex:l=>{s.index=l},getIndex:()=>s.index,cleanup:i}}function wi(o){let s;if(typeof o.resources=="string")s=[o.resources];else if(s=o.resources,!(s instanceof Array)||!s.length)return null;return{resources:s,path:o.path||"/",maxURL:o.maxURL||500,rotate:o.rotate||750,timeout:o.timeout||5e3,random:o.random===!0,index:o.index||0,dataAfterTimeout:o.dataAfterTimeout!==!1}}const $n=Object.create(null),he=["https://api.simplesvg.com","https://api.unisvg.com"],un=[];for(;he.length>0;)he.length===1||Math.random()>.5?un.push(he.shift()):un.push(he.pop());$n[""]=wi({resources:["https://api.iconify.design"].concat(un)});function Fi(o,s){const t=wi(s);return t===null?!1:($n[o]=t,!0)}function Wn(o){return $n[o]}function Ls(){return Object.keys($n)}function Ri(){}const Qn=Object.create(null);function Ts(o){if(!Qn[o]){const s=Wn(o);if(!s)return;const t=ao(s),i={config:s,redundancy:t};Qn[o]=i}return Qn[o]}function co(o,s,t){let i,e;if(typeof o=="string"){const r=ti(o);if(!r)return t(void 0,424),Ri;e=r.send;const a=Ts(o);a&&(i=a.redundancy)}else{const r=wi(o);if(r){i=ao(r);const a=o.resources?o.resources[0]:"",l=ti(a);l&&(e=l.send)}}return!i||!e?(t(void 0,424),Ri):i.query(s,e,t)().abort}const Pi="iconify2",me="iconify",lo=me+"-count",zi=me+"-version",ho=36e5,Cs=168;function ei(o,s){try{return o.getItem(s)}catch{}}function vi(o,s,t){try{return o.setItem(s,t),!0}catch{}}function Oi(o,s){try{o.removeItem(s)}catch{}}function ni(o,s){return vi(o,lo,s.toString())}function ii(o){return parseInt(ei(o,lo))||0}const Vt={local:!0,session:!0},uo={local:new Set,session:new Set};let xi=!1;function As(o){xi=o}let ln=typeof window>"u"?{}:window;function fo(o){const s=o+"Storage";try{if(ln&&ln[s]&&typeof ln[s].length=="number")return ln[s]}catch{}Vt[o]=!1}function po(o,s){const t=fo(o);if(!t)return;const i=ei(t,zi);if(i!==Pi){if(i){const l=ii(t);for(let c=0;c{const c=me+l.toString(),d=ei(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>e&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&s(f,l))return!0}catch{}Oi(t,c)}};let a=ii(t);for(let l=a-1;l>=0;l--)r(l)||(l===a-1?(a--,ni(t,a)):uo[o].add(l))}function go(){if(!xi){As(!0);for(const o in Vt)po(o,s=>{const t=s.data,i=s.provider,e=t.prefix,r=Ft(i,e);if(!yi(r,t).length)return!1;const a=t.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,a):a,!0})}}function Fs(o,s){const t=o.lastModifiedCached;if(t&&t>=s)return t===s;if(o.lastModifiedCached=s,t)for(const i in Vt)po(i,e=>{const r=e.data;return e.provider!==o.provider||r.prefix!==o.prefix||r.lastModified===s});return!0}function Rs(o,s){xi||go();function t(i){let e;if(!Vt[i]||!(e=fo(i)))return;const r=uo[i];let a;if(r.size)r.delete(a=Array.from(r).shift());else if(a=ii(e),!ni(e,a+1))return;const l={cached:Math.floor(Date.now()/ho),provider:o.provider,data:s};return vi(e,me+a.toString(),JSON.stringify(l))}s.lastModified&&!Fs(o,s.lastModified)||Object.keys(s.icons).length&&(s.not_found&&(s=Object.assign({},s),delete s.not_found),t("local")||t("session"))}function Bi(){}function Ps(o){o.iconsLoaderFlag||(o.iconsLoaderFlag=!0,setTimeout(()=>{o.iconsLoaderFlag=!1,vs(o)}))}function zs(o,s){o.iconsToLoad?o.iconsToLoad=o.iconsToLoad.concat(s).sort():o.iconsToLoad=s,o.iconsQueueFlag||(o.iconsQueueFlag=!0,setTimeout(()=>{o.iconsQueueFlag=!1;const{provider:t,prefix:i}=o,e=o.iconsToLoad;delete o.iconsToLoad;let r;if(!e||!(r=ti(t)))return;r.prepare(t,i,e).forEach(l=>{co(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{o.missing.add(d)});else try{const d=yi(o,c);if(!d.length)return;const f=o.pendingIcons;f&&d.forEach(g=>{f.delete(g)}),Rs(o,c)}catch(d){console.error(d)}Ps(o)})})}))}const Si=(o,s)=>{const t=ks(o,!0,oo()),i=ws(t);if(!i.pending.length){let c=!0;return s&&setTimeout(()=>{c&&s(i.loaded,i.missing,i.pending,Bi)}),()=>{c=!1}}const e=Object.create(null),r=[];let a,l;return i.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,r.push(Ft(d,f));const g=e[d]||(e[d]=Object.create(null));g[f]||(g[f]=[])}),i.pending.forEach(c=>{const{provider:d,prefix:f,name:g}=c,m=Ft(d,f),x=m.pendingIcons||(m.pendingIcons=new Set);x.has(g)||(x.add(g),e[d][f].push(g))}),r.forEach(c=>{const{provider:d,prefix:f}=c;e[d][f].length&&zs(c,e[d][f])}),s?Ss(s,i,r):Bi},Os=o=>new Promise((s,t)=>{const i=typeof o=="string"?rn(o,!0):o;if(!i){t(o);return}Si([i||o],e=>{if(e.length&&i){const r=ge(i);if(r){s({...sn,...r});return}}t(o)})});function Bs(o){try{const s=typeof o=="string"?JSON.parse(o):o;if(typeof s.body=="string")return{...s}}catch{}}function Ms(o,s){const t=typeof o=="string"?rn(o,!0,!0):null;if(!t){const r=Bs(o);return{value:o,data:r}}const i=ge(t);if(i!==void 0||!t.prefix)return{value:o,name:t,data:i};const e=Si([t],()=>s(o,t,ge(t)));return{value:o,name:t,loading:e}}function Yn(o){return o.hasAttribute("inline")}let mo=!1;try{mo=navigator.vendor.indexOf("Apple")===0}catch{}function Ns(o,s){switch(s){case"svg":case"bg":case"mask":return s}return s!=="style"&&(mo||o.indexOf("o==="unset"||o==="undefined"||o==="none";function bo(o,s){const t={...sn,...o},i={...to,...s},e={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,i].forEach(S=>{const k=[],Rt=S.hFlip,et=S.vFlip;let L=S.rotate;Rt?et?L+=2:(k.push("translate("+(e.width+e.left).toString()+" "+(0-e.top).toString()+")"),k.push("scale(-1 1)"),e.top=e.left=0):et&&(k.push("translate("+(0-e.left).toString()+" "+(e.height+e.top).toString()+")"),k.push("scale(1 -1)"),e.top=e.left=0);let R;switch(L<0&&(L-=Math.floor(L/4)*4),L=L%4,L){case 1:R=e.height/2+e.top,k.unshift("rotate(90 "+R.toString()+" "+R.toString()+")");break;case 2:k.unshift("rotate(180 "+(e.width/2+e.left).toString()+" "+(e.height/2+e.top).toString()+")");break;case 3:R=e.width/2+e.left,k.unshift("rotate(-90 "+R.toString()+" "+R.toString()+")");break}L%2===1&&(e.left!==e.top&&(R=e.left,e.left=e.top,e.top=R),e.width!==e.height&&(R=e.width,e.width=e.height,e.height=R)),k.length&&(r=''+r+"")});const a=i.width,l=i.height,c=e.width,d=e.height;let f,g;a===null?(g=l===null?"1em":l==="auto"?d:l,f=oi(g,c/d)):(f=a==="auto"?c:a,g=l===null?oi(f,d/c):l==="auto"?d:l);const m={},x=(S,k)=>{_s(k)||(m[S]=k.toString())};return x("width",f),x("height",g),m.viewBox=e.left.toString()+" "+e.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:m,body:r}}const qs=()=>{let o;try{if(o=fetch,typeof o=="function")return o}catch{}};let gn=qs();function $s(o){gn=o}function Ws(){return gn}function Hs(o,s){const t=Wn(o);if(!t)return 0;let i;if(!t.maxURL)i=0;else{let e=0;t.resources.forEach(a=>{e=Math.max(e,a.length)});const r=s+".json?icons=";i=t.maxURL-e-t.path.length-r.length}return i}function Ds(o){return o===404}const Gs=(o,s,t)=>{const i=[],e=Hs(o,s),r="icons";let a={type:r,provider:o,prefix:s,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=e&&d>0&&(i.push(a),a={type:r,provider:o,prefix:s,icons:[]},l=c.length),a.icons.push(c)}),i.push(a),i};function Qs(o){if(typeof o=="string"){const s=Wn(o);if(s)return s.path}return"/"}const Ys=(o,s,t)=>{if(!gn){t("abort",424);return}let i=Qs(s.provider);switch(s.type){case"icons":{const r=s.prefix,l=s.icons.join(","),c=new URLSearchParams({icons:l});i+=r+".json?"+c.toString();break}case"custom":{const r=s.uri;i+=r.slice(0,1)==="/"?r.slice(1):r;break}default:t("abort",400);return}let e=503;gn(o+i).then(r=>{const a=r.status;if(a!==200){setTimeout(()=>{t(Ds(a)?"abort":"next",a)});return}return e=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?t("abort",r):t("next",e)});return}setTimeout(()=>{t("success",r)})}).catch(()=>{t("next",e)})},Xs={prepare:Gs,send:Ys};function Mi(o,s){switch(o){case"local":case"session":Vt[o]=s;break;case"all":for(const t in Vt)Vt[t]=s;break}}const Xn="data-style";let yo="";function Vs(o){yo=o}function Ni(o,s){let t=Array.from(o.childNodes).find(i=>i.hasAttribute&&i.hasAttribute(Xn));t||(t=document.createElement("style"),t.setAttribute(Xn,Xn),o.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(s?"-0.125em":"0")+"}span,svg{display:block}"+yo}function wo(){Ai("",Xs),oo(!0);let o;try{o=window}catch{}if(o){if(go(),o.IconifyPreload!==void 0){const t=o.IconifyPreload,i="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(e=>{try{(typeof e!="object"||e===null||e instanceof Array||typeof e.icons!="object"||typeof e.prefix!="string"||!Ci(e))&&console.error(i)}catch{console.error(i)}})}if(o.IconifyProviders!==void 0){const t=o.IconifyProviders;if(typeof t=="object"&&t!==null)for(const i in t){const e="IconifyProviders["+i+"] is invalid.";try{const r=t[i];if(typeof r!="object"||!r||r.resources===void 0)continue;Fi(i,r)||console.error(e)}catch{console.error(e)}}}}return{enableCache:t=>Mi(t,!0),disableCache:t=>Mi(t,!1),iconExists:bs,getIcon:ys,listIcons:ms,addIcon:so,addCollection:Ci,calculateSize:oi,buildIcon:bo,loadIcons:Si,loadIcon:Os,addAPIProvider:Fi,appendCustomStyle:Vs,_api:{getAPIConfig:Wn,setAPIModule:Ai,sendAPIQuery:co,setFetch:$s,getFetch:Ws,listAPIProviders:Ls}}}function vo(o,s){let t=o.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in s)t+=" "+i+'="'+s[i]+'"';return'"+o+""}function Ks(o){return o.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function Js(o){return"data:image/svg+xml,"+Ks(o)}function Zs(o){return'url("'+Js(o)+'")'}const si={"background-color":"currentColor"},xo={"background-color":"transparent"},Ui={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ji={"-webkit-mask":si,mask:si,background:xo};for(const o in ji){const s=ji[o];for(const t in Ui)s[o+"-"+t]=Ui[t]}function _i(o){return o?o+(o.match(/^[-0-9.]+$/)?"px":""):"inherit"}function tr(o,s,t){const i=document.createElement("span");let e=o.body;e.indexOf("");const r=o.attributes,a=vo(e,{...r,width:s.width+"",height:s.height+""}),l=Zs(a),c=i.style,d={"--svg":l,width:_i(r.width),height:_i(r.height),...t?si:xo};for(const f in d)c.setProperty(f,d[f]);return i}let fe;function er(){try{fe=window.trustedTypes.createPolicy("iconify",{createHTML:o=>o})}catch{fe=null}}function nr(o){return fe===void 0&&er(),fe?fe.createHTML(o):o}function ir(o){const s=document.createElement("span"),t=o.attributes;let i="";t.width||(i="width: inherit;"),t.height||(i+="height: inherit;"),i&&(t.style=i);const e=vo(o.body,t);return s.innerHTML=nr(e),s.firstChild}function qi(o,s){const t=s.icon.data,i=s.customisations,e=bo(t,i);i.preserveAspectRatio&&(e.attributes.preserveAspectRatio=i.preserveAspectRatio);const r=s.renderedMode;let a;switch(r){case"svg":a=ir(e);break;default:a=tr(e,{...sn,...t},r==="mask")}const l=Array.from(o.childNodes).find(c=>{const d=c.tagName&&c.tagName.toUpperCase();return d==="SPAN"||d==="SVG"});l?a.tagName==="SPAN"&&l.tagName===a.tagName?l.setAttribute("style",a.getAttribute("style")):o.replaceChild(a,l):o.appendChild(a)}function $i(o,s,t){const i=t&&(t.rendered?t:t.lastRender);return{rendered:!1,inline:s,icon:o,lastRender:i}}function or(o="iconify-icon"){let s,t;try{s=window.customElements,t=window.HTMLElement}catch{return}if(!s||!t)return;const i=s.get(o);if(i)return i;const e=["icon","mode","inline","width","height","rotate","flip"],r=class extends t{constructor(){super();E(this,"_shadowRoot");E(this,"_state");E(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),d=Yn(this);Ni(c,d),this._state=$i({value:""},d),this._queueCheck()}static get observedAttributes(){return e.slice(0)}attributeChangedCallback(c){if(c==="inline"){const d=Yn(this),f=this._state;d!==f.inline&&(f.inline=d,Ni(this._shadowRoot,d))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return Yn(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const d=this._shadowRoot;if(c.renderedMode==="svg")try{d.lastChild.setCurrentTime(0);return}catch{}qi(d,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,d=this.getAttribute("icon");if(d!==c.icon.value){this._iconChanged(d);return}if(!c.rendered)return;const f=this.getAttribute("mode"),g=Li(this);(c.attrMode!==f||ls(c.customisations,g))&&this._renderIcon(c.icon,g,f)}_iconChanged(c){const d=Ms(c,(f,g,m)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==f)return;const S={value:f,name:g,data:m};S.data?this._gotIconData(S):x.icon=S});d.data?this._gotIconData(d):this._state=$i(d,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Li(this),this.getAttribute("mode"))}_renderIcon(c,d,f){const g=Ns(c.data.body,f),m=this._state.inline;qi(this._shadowRoot,this._state={rendered:!0,icon:c,inline:m,customisations:d,attrMode:f,renderedMode:g})}};e.forEach(l=>{l in r.prototype||Object.defineProperty(r.prototype,l,{get:function(){return this.getAttribute(l)},set:function(c){c!==null?this.setAttribute(l,c):this.removeAttribute(l)}})});const a=wo();for(const l in a)r[l]=r.prototype[l]=a[l];return s.define(o,r),r}or()||wo();const sr=`:host{display:flex;position:relative;justify-content:center;align-items:stretch}.bottom-img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.top-img{position:absolute;-webkit-mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);mask-image:linear-gradient(90deg,rgb(0 0 0 / 0%) 35%,rgb(255 255 255 / 100%) 50%,rgb(0 0 0 / 0%) 65%);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;filter:brightness(1.8);animation-duration:4s;animation-timing-function:linear;animation-iteration-count:infinite;animation-name:flicker;max-width:100%;max-height:100%}@keyframes flicker{0%{-webkit-mask-position:150% 0%;mask-position:150% 0%}30%{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}to{-webkit-mask-position:-150% 0%;mask-position:-150% 0%}} `,rr=`luffy avatar\r luffy avatar`,ar="luffy-logo",So=document.createElement("template");So.innerHTML=rr;class cr extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=sr,s.append(t,So.content.cloneNode(!0))}}customElements.define(ar,cr);const lr=":host{--slider-thumb-size: 2em;display:flex;position:relative}.slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;background:transparent;width:100%;height:2.5em;font-size:inherit}.slider::-webkit-slider-runnable-track{box-shadow:0 0 .125em .0625em #000c;border:.0625em solid rgb(0 0 0 / 50%);border-radius:.1em;background-color:var(--theme-color);height:.75em}.slider::-moz-range-track{box-shadow:0 0 .125em .0625em #000c;border:.0625em solid rgb(0 0 0 / 50%);border-radius:.1em;background-color:var(--theme-color);height:.75em}.slider::-webkit-slider-thumb{position:relative;top:-.75em;-webkit-appearance:none;-moz-appearance:none;appearance:none;filter:var(--element-filter);-webkit-transition:filter .05s;transition:filter .05s;cursor:pointer;border:0;background:url("+new URL("../images/slider-thumb.png",import.meta.url).href+");background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;width:var(--slider-thumb-size);height:var(--slider-thumb-size)}.slider::-moz-range-thumb{position:relative;top:-.75em;filter:var(--element-filter);cursor:pointer;border:0;background:url("+new URL("../images/slider-thumb.png",import.meta.url).href+`);background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;width:var(--slider-thumb-size);height:var(--slider-thumb-size)}.slider::-webkit-slider-thumb:hover{filter:var(--element-hover-filter)}.thumb-text-wrapper{display:flex;position:absolute;top:31%;justify-content:center;align-items:center;width:var(--slider-thumb-size);pointer-events:none;color:#fff}.thumb-text-wrapper span{font-size:.75em} `,hr=`\r
\r \r -
`,dr="range-slider",ur=["value","max","min","step"],ko=document.createElement("template");ko.innerHTML=hr;const fr=6.5,pr=13;var H,Bt,ye,ri;class gr extends HTMLElement{constructor(){super();h(this,ye);h(this,H,void 0);h(this,Bt,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=lr,t.append(i,ko.content.cloneNode(!0)),u(this,H,t.querySelector("input")),u(this,Bt,t.querySelector("#thumbText")),n(this,H).addEventListener("input",()=>p(this,ye,ri).call(this))}get value(){return n(this,H).value}set value(t){n(this,H).value=t,n(this,Bt).innerText=t,p(this,ye,ri).call(this)}static get observedAttributes(){return ur}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break;default:n(this,H).setAttribute(t,e);break}}}H=new WeakMap,Bt=new WeakMap,ye=new WeakSet,ri=function(){const t=parseFloat(n(this,H).max),i=parseFloat(n(this,H).min),r=(parseFloat(n(this,H).value)-i)/(t-i)*100;n(this,Bt).innerText=this.value;const a=-r+(fr-pr*r/100),c=n(this,Bt).parentElement;c.style.left=r+"%",c.style.transform=`translateX(${a}%)`};customElements.define(dr,gr);const mr=`:host{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}select{flex-grow:1;box-shadow:0 0 .25em #0000007f;border:0;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.25em;width:100%;color:#3b230e;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}select:focus-visible{outline:none}option{background-color:#f5da9e}#fileInput{display:none}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#3b230e}::-webkit-scrollbar-corner{background:transparent} +`,dr="range-slider",ur=["value","max","min","step"],ko=document.createElement("template");ko.innerHTML=hr;const fr=6.5,pr=13;var H,Ot,ye,ri;class gr extends HTMLElement{constructor(){super();h(this,ye);h(this,H,void 0);h(this,Ot,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=lr,t.append(i,ko.content.cloneNode(!0)),u(this,H,t.querySelector("input")),u(this,Ot,t.querySelector("#thumbText")),n(this,H).addEventListener("input",()=>p(this,ye,ri).call(this))}get value(){return n(this,H).value}set value(t){n(this,H).value=t,n(this,Ot).innerText=t,p(this,ye,ri).call(this)}static get observedAttributes(){return ur}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break;default:n(this,H).setAttribute(t,e);break}}}H=new WeakMap,Ot=new WeakMap,ye=new WeakSet,ri=function(){const t=parseFloat(n(this,H).max),i=parseFloat(n(this,H).min),r=(parseFloat(n(this,H).value)-i)/(t-i)*100;n(this,Ot).innerText=this.value;const a=-r+(fr-pr*r/100),l=n(this,Ot).parentElement;l.style.left=r+"%",l.style.transform=`translateX(${a}%)`};customElements.define(dr,gr);const mr=`:host{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}select{flex-grow:1;box-shadow:0 0 .25em #0000007f;border:0;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.25em;width:100%;color:#3b230e;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}select:focus-visible{outline:none}option{background-color:#f5da9e}#fileInput{display:none}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#3b230e}::-webkit-scrollbar-corner{background:transparent} `,br=`\r \r -`,yr="font-select",wr=["value"],Eo=document.createElement("template");Eo.innerHTML=br;var M,we,nt,it,Mt,xe,yn,Io,ve,ai,Se,ci,ke,li;class xr extends HTMLElement{constructor(){super();h(this,yn);h(this,ve);h(this,Se);h(this,ke);h(this,M,void 0);h(this,we,void 0);h(this,nt,void 0);h(this,it,new Set);h(this,Mt,null);h(this,xe,!1);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=mr,t.append(i,Eo.content.cloneNode(!0)),u(this,M,t.querySelector("select")),n(this,M).addEventListener("input",()=>{n(this,M).style.fontFamily=n(this,M).value}),n(this,M).addEventListener("click",()=>{p(this,yn,Io).call(this)}),u(this,we,t.querySelector("icon-button")),u(this,nt,t.querySelector("#fileInput")),n(this,we).addEventListener("click",()=>{n(this,nt).click()}),n(this,nt).addEventListener("input",async r=>{r.stopImmediatePropagation();const a=n(this,nt).files?n(this,nt).files[0]:null;if(!a)return;const c=URL.createObjectURL(a),l=a.name.split(".")[0],d=new FontFace(l,`url(${c})`);try{await d.load(),document.fonts.add(d),p(this,ve,ai).call(this,l),this.value=l,this.dispatchEvent(new CustomEvent("input"))}catch{}});const e=new Set;Array.from(document.fonts).forEach(r=>e.add(r.family)),p(this,Se,ci).call(this,e),document.fonts.addEventListener("loadingdone",()=>{document.fonts.forEach(r=>{n(this,it).has(r.family)||(p(this,ve,ai).call(this,r.family),r.family===n(this,Mt)&&(this.value=n(this,Mt),u(this,Mt,null)))})})}get value(){return n(this,M).value}set value(t){n(this,M).style.fontFamily=t,n(this,M).value=t,u(this,Mt,n(this,it).has(t)?null:t)}static get observedAttributes(){return wr}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break}}}M=new WeakMap,we=new WeakMap,nt=new WeakMap,it=new WeakMap,Mt=new WeakMap,xe=new WeakMap,yn=new WeakSet,Io=async function(){if(!(!window.queryLocalFonts||n(this,xe)))try{const t=await window.queryLocalFonts(),i=new Set;for(const e of t)i.add(e.family);p(this,Se,ci).call(this,i),u(this,xe,!0)}catch(t){console.error(t)}},ve=new WeakSet,ai=function(t){n(this,it).add(t);const i=p(this,ke,li).call(this,t);n(this,M).appendChild(i)},Se=new WeakSet,ci=function(t){const i=new DocumentFragment;Array.from(t).forEach(e=>{if(n(this,it).has(e))return;n(this,it).add(e);const r=p(this,ke,li).call(this,e);i.appendChild(r)}),n(this,M).appendChild(i)},ke=new WeakSet,li=function(t){const i=document.createElement("option");return i.value=t,i.innerText=t,i.style.fontFamily=t,i};customElements.define(yr,xr);const vr=`:host{display:inline-flex;position:relative;justify-content:center;filter:contrast(100%) brightness(100%) drop-shadow(1px 1px 1px rgb(0 0 0 / 50%)) drop-shadow(-1px -1px 1px rgb(0 0 0 / 50%));transition:.05s;cursor:pointer;outline:none;background-color:transparent;width:4.25rem;height:5rem}:host(:hover:not([loading])){filter:contrast(105%) brightness(105%) drop-shadow(1px 4px 3px rgb(0 0 0 / 50%)) drop-shadow(-1px 0 3px rgb(0 0 0 / 50%))}:host(:active:not([loading])){transform:translateY(1px);filter:contrast(105%) brightness(105%) drop-shadow(1px 2px 1px rgb(0 0 0 / 60%)) drop-shadow(-1px 0 1px rgb(0 0 0 / 60%))}.img{position:absolute;max-width:100%;max-height:100%}.icon{display:flex;position:absolute;top:21%;justify-content:center;align-items:center;box-sizing:border-box;width:82%;height:44%;color:#513721;font-size:1.5rem}iconify-icon{display:none}:host([loading]){cursor:wait}:host([loading]) iconify-icon{display:inline}.text{display:flex;position:absolute;bottom:12%;justify-content:center;align-items:center;box-sizing:border-box;width:85%;height:20%;overflow:hidden;color:#513721;font-weight:900;font-size:.9rem;font-family:Scheherazade New,serif;text-align:justify;white-space:nowrap} +`,yr="font-select",wr=["value"],Io=document.createElement("template");Io.innerHTML=br;var B,we,nt,it,Bt,ve,yn,Eo,xe,ai,Se,ci,ke,li;class vr extends HTMLElement{constructor(){super();h(this,yn);h(this,xe);h(this,Se);h(this,ke);h(this,B,void 0);h(this,we,void 0);h(this,nt,void 0);h(this,it,new Set);h(this,Bt,null);h(this,ve,!1);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=mr,t.append(i,Io.content.cloneNode(!0)),u(this,B,t.querySelector("select")),n(this,B).addEventListener("input",()=>{n(this,B).style.fontFamily=n(this,B).value}),n(this,B).addEventListener("click",()=>{p(this,yn,Eo).call(this)}),u(this,we,t.querySelector("icon-button")),u(this,nt,t.querySelector("#fileInput")),n(this,we).addEventListener("click",()=>{n(this,nt).click()}),n(this,nt).addEventListener("input",async r=>{r.stopImmediatePropagation();const a=n(this,nt).files?n(this,nt).files[0]:null;if(!a)return;const l=URL.createObjectURL(a),c=a.name.split(".")[0],d=new FontFace(c,`url(${l})`);try{await d.load(),document.fonts.add(d),p(this,xe,ai).call(this,c),this.value=c,this.dispatchEvent(new CustomEvent("input"))}catch{}});const e=new Set;Array.from(document.fonts).forEach(r=>e.add(r.family)),p(this,Se,ci).call(this,e),document.fonts.addEventListener("loadingdone",()=>{document.fonts.forEach(r=>{n(this,it).has(r.family)||(p(this,xe,ai).call(this,r.family),r.family===n(this,Bt)&&(this.value=n(this,Bt),u(this,Bt,null)))})})}get value(){return n(this,B).value}set value(t){n(this,B).style.fontFamily=t,n(this,B).value=t,u(this,Bt,n(this,it).has(t)?null:t)}static get observedAttributes(){return wr}attributeChangedCallback(t,i,e){switch(t){case"value":this.value=e;break}}}B=new WeakMap,we=new WeakMap,nt=new WeakMap,it=new WeakMap,Bt=new WeakMap,ve=new WeakMap,yn=new WeakSet,Eo=async function(){if(!(!window.queryLocalFonts||n(this,ve)))try{const t=await window.queryLocalFonts(),i=new Set;for(const e of t)i.add(e.family);p(this,Se,ci).call(this,i),u(this,ve,!0)}catch(t){console.error(t)}},xe=new WeakSet,ai=function(t){n(this,it).add(t);const i=p(this,ke,li).call(this,t);n(this,B).appendChild(i)},Se=new WeakSet,ci=function(t){const i=new DocumentFragment;Array.from(t).forEach(e=>{if(n(this,it).has(e))return;n(this,it).add(e);const r=p(this,ke,li).call(this,e);i.appendChild(r)}),n(this,B).appendChild(i)},ke=new WeakSet,li=function(t){const i=document.createElement("option");return i.value=t,i.innerText=t,i.style.fontFamily=t,i};customElements.define(yr,vr);const xr=`:host{display:inline-flex;position:relative;justify-content:center;filter:contrast(100%) brightness(100%) drop-shadow(1px 1px 1px rgb(0 0 0 / 50%)) drop-shadow(-1px -1px 1px rgb(0 0 0 / 50%));transition:.05s;cursor:pointer;outline:none;background-color:transparent;width:4.25rem;height:5rem}:host(:hover:not([loading])){filter:contrast(105%) brightness(105%) drop-shadow(1px 4px 3px rgb(0 0 0 / 50%)) drop-shadow(-1px 0 3px rgb(0 0 0 / 50%))}:host(:active:not([loading])){transform:translateY(1px);filter:contrast(105%) brightness(105%) drop-shadow(1px 2px 1px rgb(0 0 0 / 60%)) drop-shadow(-1px 0 1px rgb(0 0 0 / 60%))}.img{position:absolute;max-width:100%;max-height:100%}.icon{display:flex;position:absolute;top:21%;justify-content:center;align-items:center;box-sizing:border-box;width:82%;height:44%;color:#513721;font-size:1.5rem}iconify-icon{display:none}:host([loading]){cursor:wait}:host([loading]) iconify-icon{display:inline}.text{display:flex;position:absolute;bottom:12%;justify-content:center;align-items:center;box-sizing:border-box;width:85%;height:20%;overflow:hidden;color:#513721;font-weight:900;font-size:.9rem;font-family:Scheherazade New,serif;text-align:justify;white-space:nowrap} `,Sr=`button image\r
\r \r @@ -25,7 +25,7 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config
\r \r \r -`,kr=""+new URL("wanted-c2a6dd7a.png",import.meta.url).href,Er="wanted-button",Ir=["font-size"],Lo=document.createElement("template");Lo.innerHTML=Sr;var Ee,Ie;class Lr extends HTMLElement{constructor(){var e;super();h(this,Ee,void 0);h(this,Ie,void 0);const t=this.attachShadow({mode:"open"});u(this,Ee,t);const i=document.createElement("style");i.textContent=vr,t.append(i,Lo.content.cloneNode(!0)),(e=t.querySelector("img"))==null||e.setAttribute("src",kr),u(this,Ie,t.querySelector("span.text"))}static get observedAttributes(){return Ir}set loading(t){const i=n(this,Ee).querySelector("slot[name=icon]");i&&(i.style.display=t?"none":"contents"),t?this.setAttribute("loading",""):this.removeAttribute("loading")}get loading(){return this.hasAttribute("loading")}attributeChangedCallback(t,i,e){switch(t){case"font-size":n(this,Ie).style.fontSize=e;break}}}Ee=new WeakMap,Ie=new WeakMap;customElements.define(Er,Lr);const Wi=""+new URL("circle-button-78c4b94b.png",import.meta.url).href,Tr=`:host{--filter: drop-shadow(.125em 0 .125em rgb(0 0 0 / 40%)) drop-shadow(-.125em 0 .125em rgb(0 0 0 / 40%)) contrast(100%) brightness(100%);--hover-filter: drop-shadow(.1875em 0 .1875em rgb(0 0 0 / 40%)) drop-shadow(-.1875em 0 .1875em rgb(0 0 0 / 50%)) contrast(105%) brightness(105%);--active-filter: drop-shadow(.0625em 0 .125em rgb(0 0 0 / 60%)) drop-shadow(-.0625em 0 .125em rgb(0 0 0 / 70%)) contrast(105%) brightness(105%);display:flex;justify-content:center;align-items:center;filter:var(--filter);transition:.1s;cursor:pointer;outline:none;border:0;background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;padding-bottom:.05em;width:2em;height:2em;color:#fff}:host(:hover){filter:var(--hover-filter)}:host(:active){transform:translateY(.0625em);filter:var(--active-filter)}iconify-icon{pointer-events:none} +`,kr=""+new URL("wanted-c2a6dd7a.png",import.meta.url).href,Ir="wanted-button",Er=["font-size"],Lo=document.createElement("template");Lo.innerHTML=Sr;var Ie,Ee;class Lr extends HTMLElement{constructor(){var e;super();h(this,Ie,void 0);h(this,Ee,void 0);const t=this.attachShadow({mode:"open"});u(this,Ie,t);const i=document.createElement("style");i.textContent=xr,t.append(i,Lo.content.cloneNode(!0)),(e=t.querySelector("img"))==null||e.setAttribute("src",kr),u(this,Ee,t.querySelector("span.text"))}static get observedAttributes(){return Er}set loading(t){const i=n(this,Ie).querySelector("slot[name=icon]");i&&(i.style.display=t?"none":"contents"),t?this.setAttribute("loading",""):this.removeAttribute("loading")}get loading(){return this.hasAttribute("loading")}attributeChangedCallback(t,i,e){switch(t){case"font-size":n(this,Ee).style.fontSize=e;break}}}Ie=new WeakMap,Ee=new WeakMap;customElements.define(Ir,Lr);const Wi=""+new URL("circle-button-78c4b94b.png",import.meta.url).href,Tr=`:host{--filter: drop-shadow(.125em 0 .125em rgb(0 0 0 / 40%)) drop-shadow(-.125em 0 .125em rgb(0 0 0 / 40%)) contrast(100%) brightness(100%);--hover-filter: drop-shadow(.1875em 0 .1875em rgb(0 0 0 / 40%)) drop-shadow(-.1875em 0 .1875em rgb(0 0 0 / 50%)) contrast(105%) brightness(105%);--active-filter: drop-shadow(.0625em 0 .125em rgb(0 0 0 / 60%)) drop-shadow(-.0625em 0 .125em rgb(0 0 0 / 70%)) contrast(105%) brightness(105%);display:flex;justify-content:center;align-items:center;filter:var(--filter);transition:.1s;cursor:pointer;outline:none;border:0;background-position:center;background-size:cover;background-repeat:no-repeat;background-color:transparent;padding-bottom:.05em;width:2em;height:2em;color:#fff}:host(:hover){filter:var(--hover-filter)}:host(:active){transform:translateY(.0625em);filter:var(--active-filter)}iconify-icon{pointer-events:none} `,Cr='',Ar="icon-button",Fr=["icon","mode","flip","height","width","inline","preserveAspectRatio","rotate"],To=document.createElement("template");To.innerHTML=Cr;var Le;class Rr extends HTMLElement{constructor(){var e;super();h(this,Le,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=Tr,t.append(i,To.content.cloneNode(!0)),(e=t.querySelector("img"))==null||e.setAttribute("src",Wi),u(this,Le,t.querySelector("iconify-icon"))}static get observedAttributes(){return Fr}connectedCallback(){this.style.backgroundImage=`url(${Wi})`}attributeChangedCallback(t,i,e){n(this,Le).setAttribute(t,e)}}Le=new WeakMap;customElements.define(Ar,Rr);const Pr=":host{display:block;position:fixed;top:0;left:0;visibility:hidden;opacity:0;filter:drop-shadow(0 0 5px rgb(0 0 0 / 60%));transition:.2s;box-sizing:border-box;margin-top:3rem;margin-left:.5rem;background-image:url("+new URL("../images/tips-paper.png",import.meta.url).href+`);background-size:contain;background-repeat:no-repeat;padding:1rem .8rem 1rem 1rem;width:17.62rem;max-width:100vw;height:26.33rem;color:var(--dark-text-color);font-size:.8rem}:host([open]){visibility:visible;opacity:1}.content{height:100%;overflow:auto}.content h3{border-bottom:1px solid var(--dark-text-color)}.content *{margin-block-start:.5em;margin-block-end:1em}a{position:relative;outline:none;text-decoration:none}a:after{position:absolute;bottom:0;left:0;border-bottom:.2rem solid rgb(211 255 77 / 50%);width:100%;height:1px;content:" "}a:link{color:#009637}a:visited{color:#558f6a}::-webkit-scrollbar{width:.1rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:var(--dark-text-color)}::-webkit-scrollbar-corner{background:transparent} `,zr=`
\r \r @@ -79,8 +79,8 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config Check out the installation guide.

\r \r -
`,Br="tips-dialog",Co=document.createElement("template");Co.innerHTML=zr;class Mr extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=Pr,s.append(t,Co.content.cloneNode(!0))}toggle(){this.hasAttribute("open")?this.removeAttribute("open"):this.setAttribute("open","")}}customElements.define(Br,Mr);const Or=""+new URL("belly-af8e0dab.png",import.meta.url).href,Nr=""+new URL("one-piece-wanted-ed269d97.png",import.meta.url).href,Vn={imageUrl:Nr,bellyImageUrl:Or,photoPosition:{x:74,y:252,width:638,height:484},namePosition:{x:87,y:826,width:586,height:114},bountyInfo:{x:82,y:958,width:592,height:85,bellyMarginRight:18,fontSize:52.5},boundaryOffset:{left:10,right:10,top:10,bottom:10}},Ur=`:host{display:block;width:100%;height:100%;touch-action:none}.container{display:flex;position:relative;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%} -`;function mn(o){return new Promise((s,t)=>{const i=new Image;i.setAttribute("crossorigin","anonymous"),i.onload=()=>s(i),i.onerror=t,i.src=o})}function ki(o,s,t,i){const e=o/t,r=s/i;return Math.min(r,e)}class Ei{constructor(s){I(this,"x",0);I(this,"y",0);I(this,"width",0);I(this,"height",0);I(this,"ctx");this.ctx=s}scale(s){this.x=this.x*s,this.y=this.y*s,this.width=this.width*s,this.height=this.height*s}}var Kt,Jt,wn,Fo;class Ao extends Ei{constructor(){super(...arguments);h(this,wn);h(this,Kt,"");h(this,Jt,0);I(this,"formattedText","");I(this,"align","center");I(this,"baseline","top");I(this,"fontSize",0);I(this,"fontWeight",400);I(this,"fontFamily","serif")}set text(t){u(this,Kt,t),this.formattedText=this.formatText(t,n(this,Jt))}get text(){return n(this,Kt)}set spacing(t){u(this,Jt,t),this.formattedText=this.formatText(n(this,Kt),t)}get spacing(){return n(this,Jt)}formatSpacing(t,i){let e="";for(let r=0;re())}catch(e){throw console.error(e),new Error("Failed to load photo image.")}}scale(t){super.scale(t),this.updateRenderPosition()}setBoundary(t,i){u(this,O,{...t}),u(this,Ut,{...i})}updateRenderPosition(){if(!n(this,D))return;const t=ki(this.width,this.height,n(this,D).width,n(this,D).height),i=n(this,D).width*t,e=n(this,D).height*t,r=this.x+(this.width-i)/2,a=this.y+(this.height-e)/2;u(this,Ae,{x:r,y:a,width:i,height:e}),u(this,Ce,t)}on(t,i){var e;n(this,st).has(t)||n(this,st).set(t,[]),(e=n(this,st).get(t))==null||e.push(i)}off(t,i){const e=n(this,st).get(t);if(!e)return;const r=e.findIndex(a=>a===i);e.splice(r,1)}render(){if(this.ctx.save(),this.ctx.shadowColor="rgba(0, 0, 0, 1)",this.ctx.shadowBlur=this.shadow*n(this,Ce),this.ctx.fillStyle=n(this,Zt)?n(this,Zt):"none",this.ctx.fillRect(n(this,O).x,n(this,O).y,n(this,O).width,n(this,O).height),!n(this,D)){this.ctx.restore();return}const{x:t,y:i,width:e,height:r}=n(this,Ae);this.ctx.filter=this.filter,this.ctx.drawImage(n(this,D),t,i,e,r);const{left:a,right:c,top:l,bottom:d}=n(this,Ut);t<=a&&this.ctx.clearRect(0,i,a,r),i<=l&&this.ctx.clearRect(t,0,e,l),t+e>this.ctx.canvas.domWidth-c&&this.ctx.clearRect(this.ctx.canvas.domWidth-c,i,c,r),i+r>this.ctx.canvas.domHeight-d&&this.ctx.clearRect(t,this.ctx.canvas.domHeight-d,e,d),this.ctx.restore()}}Ce=new WeakMap,st=new WeakMap,D=new WeakMap,Zt=new WeakMap,O=new WeakMap,Ae=new WeakMap,Ut=new WeakMap,Sn=new WeakSet,Ro=function(){this.x=n(this,O).x,this.y=n(this,O).y,this.width=n(this,O).width,this.height=n(this,O).height,u(this,Ut,{...n(this,Ut)}),u(this,O,{x:this.x,y:this.y,width:this.width,height:this.height}),this.updateRenderPosition()};const Yi=4,Xi=[10,5];var S,_t,N,rt,X,at,jt,qt,Fe,Re,q,$t,Pe,ze,kn,Po,En,zo,In,Bo,Ln,Mo,Tn,Oo,Cn,No,An,Uo,Fn,_o,Rn,jo,Be,hi,Me,di,Oe,ui,Ne,fi,Pn,qo,zn,$o,Bn,Wo;class jr extends Ei{constructor(t,i){super(t);h(this,kn);h(this,En);h(this,In);h(this,Ln);h(this,Tn);h(this,Cn);h(this,An);h(this,Fn);h(this,Rn);h(this,Be);h(this,Me);h(this,Oe);h(this,Ne);h(this,Pn);h(this,zn);h(this,Bn);h(this,S,void 0);h(this,_t,!1);h(this,N,!1);h(this,rt,!1);h(this,X,!1);h(this,at,Yi);h(this,jt,Xi);h(this,qt,null);h(this,Fe,0);h(this,Re,0);h(this,q,new Map);h(this,$t,0);h(this,Pe,0);h(this,ze,0);u(this,S,i),i.on("imageloaded",()=>this.reset()),t.canvas.addEventListener("mouseover",p(this,En,zo).bind(this),{passive:!0}),t.canvas.addEventListener("mouseout",p(this,In,Bo).bind(this),{passive:!0}),t.canvas.addEventListener("wheel",p(this,kn,Po).bind(this),{passive:!0}),t.canvas.addEventListener("pointerdown",p(this,Tn,Oo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerup",p(this,Cn,No).bind(this),{passive:!0}),t.canvas.addEventListener("pointercancel",p(this,An,Uo).bind(this),{passive:!0}),t.canvas.addEventListener("pointermove",p(this,Fn,_o).bind(this),{passive:!0}),t.canvas.addEventListener("pointerout",p(this,Rn,jo).bind(this),{passive:!0})}set borderScale(t){u(this,at,Yi*t),u(this,jt,Xi.map(i=>i*t))}set highlight(t){u(this,_t,t)}scale(t){super.scale(t),n(this,S).scale(t)}reset(){this.x=n(this,S).x,this.y=n(this,S).y,this.width=n(this,S).width,this.height=n(this,S).height,u(this,N,!1),u(this,rt,!1),u(this,X,!1)}render(){!n(this,N)&&!n(this,X)&&!n(this,_t)||(this.ctx.save(),cn(this,$t)._++,n(this,$t)>=n(this,jt)[0]+n(this,jt)[1]&&u(this,$t,0),this.ctx.lineDashOffset=-n(this,$t),this.ctx.fillStyle="rgba(255,255,255,0.5)",this.ctx.strokeStyle="red",this.ctx.lineWidth=n(this,at),this.ctx.setLineDash(n(this,jt)),this.ctx.fillRect(this.x,this.y,this.width,this.height),this.ctx.strokeRect(this.x,this.y,this.width,this.height),this.ctx.restore())}}S=new WeakMap,_t=new WeakMap,N=new WeakMap,rt=new WeakMap,X=new WeakMap,at=new WeakMap,jt=new WeakMap,qt=new WeakMap,Fe=new WeakMap,Re=new WeakMap,q=new WeakMap,$t=new WeakMap,Pe=new WeakMap,ze=new WeakMap,kn=new WeakSet,Po=function(t){const i=t.deltaY>0?.95:1.05;p(this,Ne,fi).call(this,i)},En=new WeakSet,zo=function(){const{left:t,top:i}=this.ctx.canvas.getBoundingClientRect();u(this,Fe,i),u(this,Re,t)},In=new WeakSet,Bo=function(){u(this,N,!1)},Ln=new WeakSet,Mo=function(t){const i=t.clientX-n(this,Re),e=t.clientY-n(this,Fe);if(n(this,rt)){const r=t.clientX-n(this,Pe),a=t.clientY-n(this,ze);p(this,Bn,Wo).call(this,r,a)}n(this,X)||p(this,Pn,qo).call(this,i,e),p(this,Be,hi).call(this,i,e,this.x,this.y,this.width,this.height,n(this,at))?(u(this,N,!0),u(this,_t,!1)):u(this,N,!1),u(this,Pe,t.clientX),u(this,ze,t.clientY)},Tn=new WeakSet,Oo=function(t){if(u(this,_t,!1),t.pointerType==="mouse"&&t.button===0){u(this,rt,!0);return}n(this,q).set(t.pointerId,t);const{left:i,top:e}=this.ctx.canvas.getBoundingClientRect();let r=!1;for(const a of n(this,q).values()){const c=a.clientX-i,l=a.clientY-e;if(p(this,Be,hi).call(this,c,l,this.x,this.y,this.width,this.height,n(this,at))){r=!0;break}}u(this,N,r)},Cn=new WeakSet,No=function(t){if(t.pointerType==="mouse"&&t.button===0){u(this,rt,!1),u(this,X,!1);return}p(this,Me,di).call(this,t)},An=new WeakSet,Uo=function(t){p(this,Me,di).call(this,t)},Fn=new WeakSet,_o=function(t){if(t.pointerType==="mouse"){p(this,Ln,Mo).call(this,t);return}const i=Array.from(n(this,q).values());if(i.length===1&&n(this,N)){const e=i[0],{clientX:r,clientY:a}=t,c=n(this,q).get(e.pointerId);if(c){const l=r-c.clientX,d=a-c.clientY;this.x+=l,this.y+=d,n(this,S).x+=l,n(this,S).y+=d,n(this,S).updateRenderPosition()}}if(i.length===2&&n(this,N)){const e=n(this,q).get(i[0].pointerId),r=n(this,q).get(i[1].pointerId);if(e&&r){const a=i[0].pointerId===t.pointerId?i[1]:i[0],c=p(this,Oe,ui).call(this,a,t),l=p(this,Oe,ui).call(this,e,r),d=c>l?1.02:.98;p(this,Ne,fi).call(this,d)}}n(this,q).set(t.pointerId,t)},Rn=new WeakSet,jo=function(t){t.pointerType==="mouse"&&(u(this,rt,!1),u(this,X,!1))},Be=new WeakSet,hi=function(t,i,e,r,a,c,l=0){const d=l/2,f=e-d,g=r-d,b=e+a+d,y=r+c+d,k=t>=f&&t<=b,w=i>=g&&i<=y;return k&&w},Me=new WeakSet,di=function(t){n(this,q).delete(t.pointerId),n(this,q).size||u(this,N,!1)},Oe=new WeakSet,ui=function(t,i){const e=Math.abs(t.clientX-i.clientX),r=Math.abs(t.clientY-i.clientY);return Math.pow(e,2)+Math.pow(r,2)},Ne=new WeakSet,fi=function(t){const i=this.width*t-this.width,e=this.height*t-this.height;this.x=this.x-i/2,this.width=this.width+i,this.y=this.y-e/2,this.height=this.height+e,n(this,S).x=this.x,n(this,S).y=this.y,n(this,S).width=this.width,n(this,S).height=this.height,n(this,S).updateRenderPosition()},Pn=new WeakSet,qo=function(t,i){const e=p(this,zn,$o).call(this,t,i,this.x,this.y,this.width,this.height,n(this,at));e.left||e.right?(this.ctx.canvas.style.cursor="ew-resize",u(this,qt,e.left?"left":"right")):e.top||e.bottom?(this.ctx.canvas.style.cursor="ns-resize",u(this,qt,e.top?"top":"bottom")):n(this,N)?this.ctx.canvas.style.cursor="move":this.ctx.canvas.style.cursor="default"},zn=new WeakSet,$o=function(t,i,e,r,a,c,l=0){const d=l/2,f=e-d,g=r-d,b=e+a+d,y=r+c+d,k=e+d,w=r+d,Rt=e+a-d,et=r+c-d;return{left:t>=f&&t<=k,right:t>=Rt&&t<=b,top:i>=g&&i<=w,bottom:i>=et&&i<=y}},Bn=new WeakSet,Wo=function(t,i){switch(this.ctx.canvas.style.cursor){case"move":this.x+=t,this.y+=i,n(this,S).x+=t,n(this,S).y+=i,n(this,S).updateRenderPosition();break;case"ew-resize":{if(u(this,X,!0),n(this,qt)==="right"){const e=Math.max(this.width+t,1);this.width=e,n(this,S).width=e}else{const e=this.x+t;if(e>=this.x+this.width)break;const r=this.width-t;this.x=e,n(this,S).x=e,this.width=r,n(this,S).width=r}n(this,S).updateRenderPosition();break}case"ns-resize":{if(u(this,X,!0),n(this,qt)==="bottom"){const e=Math.max(this.height+i,1);this.height=e,n(this,S).height=e}else{const e=this.y+i;if(e>=this.y+this.height)break;const r=this.height-i;this.y=e,n(this,S).y=e,this.height=r,n(this,S).height=r}n(this,S).updateRenderPosition()}}};var $,T,K,Ue,V,Wt,Mn,Ho;class Vi{constructor(s,t){h(this,Mn);h(this,$,void 0);h(this,T,void 0);h(this,K,0);h(this,Ue,1);h(this,V,null);h(this,Wt,void 0);u(this,$,s),u(this,T,s.canvas),u(this,Wt,t)}async loadImage(){let s;try{s=await mn(n(this,Wt).imageUrl),u(this,V,s)}catch(t){throw console.error(t),new Error("Failed to load wanted image.")}return s}get imageScale(){return n(this,Ue)}setSize({width:s,height:t,shadowSize:i,quality:e}){if(!n(this,V))throw new Error("Failed to set size: wanted image is null");const r=n(this,V).width+i*2,a=n(this,V).height+i*2,c=ki(s,t,r,a);u(this,Ue,c);const l=r*c,d=a*c;switch(u(this,K,i*c),n(this,T).style.width=l+"px",n(this,T).style.height=d+"px",n(this,T).domWidth=l,n(this,T).domHeight=d,e){case"original":n(this,T).width=r,n(this,T).height=a,n(this,$).scale(1/c,1/c);break;case"high":{const g=window.devicePixelRatio;n(this,T).width=l*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}case"half":{const g=n(this,V).height/d/2;n(this,T).width=l*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}}return p(this,Mn,Ho).call(this,c,i)}render(){n(this,V)&&(n(this,$).save(),n(this,$).shadowColor="rgba(0, 0, 0, 1)",n(this,$).shadowBlur=n(this,K)*(n(this,T).width/n(this,T).domWidth),n(this,$).drawImage(n(this,V),n(this,K),n(this,K),n(this,T).domWidth-n(this,K)*2,n(this,T).domHeight-n(this,K)*2),n(this,$).restore())}}$=new WeakMap,T=new WeakMap,K=new WeakMap,Ue=new WeakMap,V=new WeakMap,Wt=new WeakMap,Mn=new WeakSet,Ho=function(s,t){if(!n(this,Wt))throw new Error("Failed to calculate wanted image info: WantedImageInfo object is null");t*=s;const{imageUrl:i,bellyImageUrl:e,photoPosition:r,namePosition:a,bountyInfo:c,boundaryOffset:l}=n(this,Wt),d=g=>{const{x:b,y,width:k,height:w}=g;return{x:b*s+t,y:y*s+t,width:k*s,height:w*s}},f={...d(c),bellyMarginRight:c.bellyMarginRight*s,fontSize:c.fontSize*s};return{imageUrl:i,bellyImageUrl:e,photoPosition:d(r),namePosition:d(a),bountyInfo:f,boundaryOffset:{left:l.left*s+t,right:l.right*s+t,top:l.top*s+t,bottom:l.bottom*s+t}}};const qr="wanted-poster",$r=["name","bounty","name-spacing","bounty-spacing","bounty-font-family","bounty-font-scale","bounty-font-weight","bounty-vertical-offset","photo-url","filter","poster-shadow","photo-shadow"];var Ht,ct,_e,U,lt,J,z,P,ht,te,je,W,Y,On,Do,qe,pi,$e,gi;class Wr extends HTMLElement{constructor(){super();h(this,W);h(this,On);h(this,qe);h(this,$e);h(this,Ht,void 0);h(this,ct,void 0);h(this,_e,void 0);h(this,U,void 0);h(this,lt,void 0);h(this,J,void 0);h(this,z,void 0);h(this,P,void 0);h(this,ht,void 0);h(this,te,void 0);h(this,je,void 0);u(this,ht,"init");const t=this.attachShadow({mode:"open"}),i=document.createElement("canvas");i.domWidth=0,i.domHeight=0;const e=document.createElement("div");e.className="container";const r=document.createElement("style");r.textContent=Ur,t.append(r,e);const a=i.getContext("2d");u(this,Ht,e),u(this,ct,i),u(this,_e,a),u(this,P,new Vi(a,Vn)),u(this,U,new Qi(a)),u(this,J,new Di(a)),u(this,z,new Hi(a)),u(this,lt,new jr(a,n(this,U))),u(this,te,new ResizeObserver(()=>{clearTimeout(n(this,je)),u(this,je,window.setTimeout(()=>p(this,qe,pi).call(this),200))})),n(this,te).observe(e)}static get observedAttributes(){return $r}async connectedCallback(){console.log("[connected]"),await new Promise(e=>{setTimeout(()=>e(""))}),u(this,ht,"loading");const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect();try{await n(this,P).loadImage();const e=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(e.namePosition),n(this,z).setBountyInfo(e.bountyInfo,n(this,P).imageScale),await n(this,z).loadBellyImage(Vn.bellyImageUrl),await n(this,U).init(e.photoPosition,e.boundaryOffset),await n(this,U).loadImage(this.getAttribute("photo-url"))}catch(e){u(this,ht,"error"),console.error("Failed to init wanted poster.",e);return}u(this,ht,"success"),p(this,$e,gi).call(this),n(this,Ht).appendChild(n(this,ct)),this.dispatchEvent(new CustomEvent("WantedPosterLoaded",{bubbles:!0}))}disconnectedCallback(){console.log("[disconnected]"),n(this,te).disconnect()}adoptedCallback(){console.log("[adopted]")}async attributeChangedCallback(t,i,e){switch(t){case"name":n(this,J).text=e;break;case"bounty":n(this,z).text=e;break;case"name-spacing":n(this,J).spacing=parseFloat(e)||0;break;case"bounty-spacing":n(this,z).spacing=parseFloat(e)||0;break;case"bounty-font-family":n(this,z).fontFamily=e;break;case"bounty-font-scale":n(this,z).fontScale=parseFloat(e)||1;break;case"bounty-font-weight":n(this,z).fontWeight=parseFloat(e)||600;break;case"bounty-vertical-offset":n(this,z).verticalOffset=parseFloat(e)||0;break;case"photo-url":{await n(this,U).loadImage(e),n(this,lt).highlight=!e.endsWith("#nohighlight");break}case"filter":{n(this,U).filter=e;break}case"poster-shadow":{p(this,qe,pi).call(this);break}case"photo-shadow":n(this,U).shadow=parseFloat(e)||0}}async export(){const t=document.createElement("canvas");t.domWidth=0,t.domHeight=0,t.style.display="none";const i=t.getContext("2d"),e=p(this,W,Y).call(this,"poster-shadow"),r=new Vi(i,Vn),a=new Qi(i),c=new Di(i),l=new Hi(i),d=await r.loadImage(),f=d.width+e*2,g=d.height+e*2,b=r.setSize({width:f,height:g,shadowSize:e,quality:"original"});await l.loadBellyImage(b.bellyImageUrl),c.setPosition(b.namePosition),l.setBountyInfo(b.bountyInfo,1),c.text=this.getAttribute("name")??"",l.text=this.getAttribute("bounty")??"",c.spacing=p(this,W,Y).call(this,"name-spacing"),l.spacing=p(this,W,Y).call(this,"bounty-spacing"),l.fontFamily=this.getAttribute("bounty-font-family")??"",l.fontScale=p(this,W,Y).call(this,"bounty-font-scale",1),l.fontWeight=p(this,W,Y).call(this,"bounty-font-weight"),l.verticalOffset=p(this,W,Y).call(this,"bounty-vertical-offset"),await a.init(b.photoPosition,b.boundaryOffset),await a.loadImage(this.getAttribute("photo-url")),a.shadow=p(this,W,Y).call(this,"photo-shadow");const{x:y,y:k,width:w,height:Rt,filter:et}=n(this,U);a.x=y/n(this,P).imageScale,a.y=k/n(this,P).imageScale,a.width=w/n(this,P).imageScale,a.height=Rt/n(this,P).imageScale,a.filter=et,a.updateRenderPosition(),a.render(),r.render(),l.render(),c.render();let L="";try{const R=await new Promise((Hn,ce)=>{t.toBlob(v=>{v?Hn(v):ce("Failed to create blob object.")},"image/png",1)});L=URL.createObjectURL(R),p(this,On,Do).call(this,L,"wanted-poster.png")}finally{L&&URL.revokeObjectURL(L)}}}Ht=new WeakMap,ct=new WeakMap,_e=new WeakMap,U=new WeakMap,lt=new WeakMap,J=new WeakMap,z=new WeakMap,P=new WeakMap,ht=new WeakMap,te=new WeakMap,je=new WeakMap,W=new WeakSet,Y=function(t,i=0){const e=this.getAttribute(t)||"";return parseFloat(e)||i},On=new WeakSet,Do=function(t,i){const e=document.createElement("a");e.setAttribute("href",t),e.setAttribute("download",i),e.style.display="none",document.body.appendChild(e),e.click(),e.remove()},qe=new WeakSet,pi=function(){if(n(this,ht)!=="success")return;const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect(),e=n(this,ct).getBoundingClientRect(),r=ki(i.width,i.height,e.width,e.height),a=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(a.namePosition),n(this,z).setBountyInfo(a.bountyInfo,n(this,P).imageScale),n(this,U).setBoundary(a.photoPosition,a.boundaryOffset),n(this,lt).scale(r),n(this,lt).borderScale=n(this,P).imageScale},$e=new WeakSet,gi=function(){n(this,_e).clearRect(0,0,n(this,ct).domWidth,n(this,ct).domHeight),n(this,U).render(),n(this,P).render(),n(this,z).render(),n(this,J).render(),n(this,lt).render(),requestAnimationFrame(p(this,$e,gi).bind(this))};customElements.define(qr,Wr);const bn=new Map,be={photoUrl:"",name:"",bounty:"",nameSpacing:0,bountySpacing:1,bountyFontFamily:"Vertiky",bountyFontScale:1,bountyFontWeight:600,bountyVerticalOffset:-4,filter:"",posterShadow:0,photoShadow:0,blur:0,brightness:100,contrast:100,grayscale:0,hueRotate:0,saturate:100,sepia:0};function Hr(o){return o in be}function mi({blur:o,brightness:s,contrast:t,grayscale:i,hueRotate:e,saturate:r,sepia:a}){return`blur(${o}px) brightness(${s}%) contrast(${t}%) grayscale(${i}%) hue-rotate(${e}deg) saturate(${r}%) sepia(${a}%)`}const m=new Proxy({...be,filter:mi(be)},{set(o,s,t,i){if(!Hr(s))return!0;switch(s){case"blur":case"brightness":case"contrast":case"grayscale":case"hueRotate":case"saturate":case"sepia":{const e=mi({...o,[s]:t});if(e===o.filter)break;o.filter=e,setTimeout(()=>{(bn.get("filter")??[]).forEach(a=>a("filter",e,o))})}}return setTimeout(()=>{(bn.get(s)??[]).forEach(r=>r(s,t,o))}),Reflect.set(o,s,t,i)}});function x(o,s){let t=bn.get(o);t||(t=[],bn.set(o,t)),t.push(s)}function Kn(o={}){Object.assign(m,{...m,filter:mi(be),...o})}function Dr(o={}){Object.assign(m,{...be,...o})}const Gr=":host{--slider-thumb-size: 2rem;display:block;position:fixed;top:0;left:0;transform:translate(-105%);transition:transform .2s;box-sizing:border-box;box-shadow:.1rem 0 .3rem #0000007f;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.125rem;width:18.75rem;max-width:80%;height:100%}:host(.open){transform:translate(0)}.container{display:flex;flex-direction:column;box-sizing:border-box;box-shadow:inset 0 0 .2rem .2rem #0000007f;border:.0625rem solid rgb(180 150 81);background:url("+new URL("../images/wood-bg.png",import.meta.url).href+") repeat-y center top;background-size:100% auto;width:100%;height:100%}.field-container{display:flex;flex:1 0;flex-direction:column;gap:2.5rem;padding:1rem;overflow-x:hidden;overflow-y:auto}.action-container{display:flex;justify-content:space-around;align-items:center;padding:0 1rem;height:4rem}.wood-button{display:flex;justify-content:center;align-items:center;filter:var(--element-filter);transition:.05s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/wood-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:6rem;height:2rem;color:#fff;font-size:1rem;font-family:serif;text-shadow:var(--text-shadow)}.wood-button:hover{filter:var(--element-hover-filter)}.close-button{filter:var(--element-filter);transition:.1s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/close-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:2rem;height:2rem}.close-button:hover{filter:var(--element-hover-filter)}.wood-button:active,.close-button:active{transform:translateY(1px);filter:var(--element-active-filter)}.text-input{filter:var(--element-filter);box-sizing:border-box;outline:none;border:0;background-image:url("+new URL("../images/input-frame.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding:0 .8rem 0 .75rem;width:100%;color:var(--dark-text-color);font-size:1rem;line-height:2rem;font-family:serif;text-align:center}.text-input::-moz-placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.text-input::placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.header{display:flex;position:relative;flex-shrink:0;justify-content:center;align-items:center;box-sizing:border-box;margin:0 auto 1.5em;background-image:url("+new URL("../images/scroll-paper.png",import.meta.url).href+`);background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding-bottom:.1rem;padding-left:.5rem;width:14rem;height:2.75rem;color:var(--dark-text-color);font-size:1rem}.field-group{display:grid;grid-template-columns:auto 1fr;-moz-column-gap:1rem;column-gap:1rem;row-gap:.5rem;align-items:center;color:#fff;text-align:right}.field-group label{font-size:.8rem;text-shadow:0 0 .25rem black,0 0 .5rem rgb(57 42 34)}::-moz-selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#f5d58d}::-webkit-scrollbar-corner{background:transparent} +`,Or="tips-dialog",Co=document.createElement("template");Co.innerHTML=zr;class Br extends HTMLElement{constructor(){super();const s=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent=Pr,s.append(t,Co.content.cloneNode(!0))}toggle(){this.hasAttribute("open")?this.removeAttribute("open"):this.setAttribute("open","")}}customElements.define(Or,Br);const Mr=""+new URL("belly-af8e0dab.png",import.meta.url).href,Nr=""+new URL("one-piece-wanted-ed269d97.png",import.meta.url).href,Vn={imageUrl:Nr,bellyImageUrl:Mr,photoPosition:{x:74,y:252,width:638,height:484},namePosition:{x:87,y:826,width:586,height:114},bountyInfo:{x:82,y:958,width:592,height:85,bellyMarginRight:18,fontSize:52.5},boundaryOffset:{left:10,right:10,top:10,bottom:10}},Ur=`:host{display:block;width:100%;height:100%;touch-action:none}.container{display:flex;position:relative;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%} +`;function mn(o){return new Promise((s,t)=>{const i=new Image;i.setAttribute("crossorigin","anonymous"),i.onload=()=>s(i),i.onerror=t,i.src=o})}function ki(o,s,t,i){const e=o/t,r=s/i;return Math.min(r,e)}class Ii{constructor(s){E(this,"x",0);E(this,"y",0);E(this,"width",0);E(this,"height",0);E(this,"ctx");this.ctx=s}scale(s){this.x=this.x*s,this.y=this.y*s,this.width=this.width*s,this.height=this.height*s}}var Kt,Jt,wn,Fo;class Ao extends Ii{constructor(){super(...arguments);h(this,wn);h(this,Kt,"");h(this,Jt,0);E(this,"formattedText","");E(this,"align","center");E(this,"baseline","top");E(this,"fontSize",0);E(this,"fontWeight",400);E(this,"fontFamily","serif")}set text(t){u(this,Kt,t),this.formattedText=this.formatText(t,n(this,Jt))}get text(){return n(this,Kt)}set spacing(t){u(this,Jt,t),this.formattedText=this.formatText(n(this,Kt),t)}get spacing(){return n(this,Jt)}formatSpacing(t,i){let e="";for(let r=0;re())}catch(e){throw console.error(e),new Error("Failed to load photo image.")}}scale(t){super.scale(t),this.updateRenderPosition()}setBoundary(t,i){u(this,M,{...t}),u(this,Ut,{...i})}updateRenderPosition(){if(!n(this,D))return;const t=ki(this.width,this.height,n(this,D).width,n(this,D).height),i=n(this,D).width*t,e=n(this,D).height*t,r=this.x+(this.width-i)/2,a=this.y+(this.height-e)/2;u(this,Ae,{x:r,y:a,width:i,height:e}),u(this,Ce,t)}on(t,i){var e;n(this,st).has(t)||n(this,st).set(t,[]),(e=n(this,st).get(t))==null||e.push(i)}off(t,i){const e=n(this,st).get(t);if(!e)return;const r=e.findIndex(a=>a===i);e.splice(r,1)}render(){if(this.ctx.save(),this.ctx.shadowColor="rgba(0, 0, 0, 1)",this.ctx.shadowBlur=this.shadow*n(this,Ce),this.ctx.fillStyle=n(this,Zt)?n(this,Zt):"none",this.ctx.fillRect(n(this,M).x,n(this,M).y,n(this,M).width,n(this,M).height),!n(this,D)){this.ctx.restore();return}const{x:t,y:i,width:e,height:r}=n(this,Ae);this.ctx.filter=this.filter,this.ctx.drawImage(n(this,D),t,i,e,r);const{left:a,right:l,top:c,bottom:d}=n(this,Ut);t<=a&&this.ctx.clearRect(0,i,a,r),i<=c&&this.ctx.clearRect(t,0,e,c),t+e>this.ctx.canvas.domWidth-l&&this.ctx.clearRect(this.ctx.canvas.domWidth-l,i,l,r),i+r>this.ctx.canvas.domHeight-d&&this.ctx.clearRect(t,this.ctx.canvas.domHeight-d,e,d),this.ctx.restore()}}Ce=new WeakMap,st=new WeakMap,D=new WeakMap,Zt=new WeakMap,M=new WeakMap,Ae=new WeakMap,Ut=new WeakMap,Sn=new WeakSet,Ro=function(){this.x=n(this,M).x,this.y=n(this,M).y,this.width=n(this,M).width,this.height=n(this,M).height,u(this,Ut,{...n(this,Ut)}),u(this,M,{x:this.x,y:this.y,width:this.width,height:this.height}),this.updateRenderPosition()};const Yi=4,Xi=[10,5];var v,jt,N,rt,X,at,_t,qt,Fe,Re,q,$t,Pe,ze,kn,Po,In,zo,En,Oo,Ln,Bo,Tn,Mo,Cn,No,An,Uo,Fn,jo,Rn,_o,Oe,hi,Be,di,Me,ui,Ne,fi,Pn,qo,zn,$o,On,Wo;class _r extends Ii{constructor(t,i){super(t);h(this,kn);h(this,In);h(this,En);h(this,Ln);h(this,Tn);h(this,Cn);h(this,An);h(this,Fn);h(this,Rn);h(this,Oe);h(this,Be);h(this,Me);h(this,Ne);h(this,Pn);h(this,zn);h(this,On);h(this,v,void 0);h(this,jt,!1);h(this,N,!1);h(this,rt,!1);h(this,X,!1);h(this,at,Yi);h(this,_t,Xi);h(this,qt,null);h(this,Fe,0);h(this,Re,0);h(this,q,new Map);h(this,$t,0);h(this,Pe,0);h(this,ze,0);u(this,v,i),i.on("imageloaded",()=>this.reset()),t.canvas.addEventListener("mouseover",p(this,In,zo).bind(this),{passive:!0}),t.canvas.addEventListener("mouseout",p(this,En,Oo).bind(this),{passive:!0}),t.canvas.addEventListener("wheel",p(this,kn,Po).bind(this),{passive:!0}),t.canvas.addEventListener("pointerdown",p(this,Tn,Mo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerup",p(this,Cn,No).bind(this),{passive:!0}),t.canvas.addEventListener("pointercancel",p(this,An,Uo).bind(this),{passive:!0}),t.canvas.addEventListener("pointermove",p(this,Fn,jo).bind(this),{passive:!0}),t.canvas.addEventListener("pointerout",p(this,Rn,_o).bind(this),{passive:!0})}set borderScale(t){u(this,at,Yi*t),u(this,_t,Xi.map(i=>i*t))}set highlight(t){u(this,jt,t)}scale(t){super.scale(t),n(this,v).scale(t)}reset(){this.x=n(this,v).x,this.y=n(this,v).y,this.width=n(this,v).width,this.height=n(this,v).height,u(this,N,!1),u(this,rt,!1),u(this,X,!1)}render(){!n(this,N)&&!n(this,X)&&!n(this,jt)||(this.ctx.save(),cn(this,$t)._++,n(this,$t)>=n(this,_t)[0]+n(this,_t)[1]&&u(this,$t,0),this.ctx.lineDashOffset=-n(this,$t),this.ctx.fillStyle="rgba(255,255,255,0.5)",this.ctx.strokeStyle="red",this.ctx.lineWidth=n(this,at),this.ctx.setLineDash(n(this,_t)),this.ctx.fillRect(this.x,this.y,this.width,this.height),this.ctx.strokeRect(this.x,this.y,this.width,this.height),this.ctx.restore())}}v=new WeakMap,jt=new WeakMap,N=new WeakMap,rt=new WeakMap,X=new WeakMap,at=new WeakMap,_t=new WeakMap,qt=new WeakMap,Fe=new WeakMap,Re=new WeakMap,q=new WeakMap,$t=new WeakMap,Pe=new WeakMap,ze=new WeakMap,kn=new WeakSet,Po=function(t){const i=t.deltaY>0?.95:1.05;p(this,Ne,fi).call(this,i)},In=new WeakSet,zo=function(){const{left:t,top:i}=this.ctx.canvas.getBoundingClientRect();u(this,Fe,i),u(this,Re,t)},En=new WeakSet,Oo=function(){u(this,N,!1)},Ln=new WeakSet,Bo=function(t){const i=t.clientX-n(this,Re),e=t.clientY-n(this,Fe);if(n(this,rt)){const r=t.clientX-n(this,Pe),a=t.clientY-n(this,ze);p(this,On,Wo).call(this,r,a)}n(this,X)||p(this,Pn,qo).call(this,i,e),p(this,Oe,hi).call(this,i,e,this.x,this.y,this.width,this.height,n(this,at))?(u(this,N,!0),u(this,jt,!1)):u(this,N,!1),u(this,Pe,t.clientX),u(this,ze,t.clientY)},Tn=new WeakSet,Mo=function(t){if(u(this,jt,!1),t.pointerType==="mouse"&&t.button===0){u(this,rt,!0);return}n(this,q).set(t.pointerId,t);const{left:i,top:e}=this.ctx.canvas.getBoundingClientRect();let r=!1;for(const a of n(this,q).values()){const l=a.clientX-i,c=a.clientY-e;if(p(this,Oe,hi).call(this,l,c,this.x,this.y,this.width,this.height,n(this,at))){r=!0;break}}u(this,N,r)},Cn=new WeakSet,No=function(t){if(t.pointerType==="mouse"&&t.button===0){u(this,rt,!1),u(this,X,!1);return}p(this,Be,di).call(this,t)},An=new WeakSet,Uo=function(t){p(this,Be,di).call(this,t)},Fn=new WeakSet,jo=function(t){if(t.pointerType==="mouse"){p(this,Ln,Bo).call(this,t);return}const i=Array.from(n(this,q).values());if(i.length===1&&n(this,N)){const e=i[0],{clientX:r,clientY:a}=t,l=n(this,q).get(e.pointerId);if(l){const c=r-l.clientX,d=a-l.clientY;this.x+=c,this.y+=d,n(this,v).x+=c,n(this,v).y+=d,n(this,v).updateRenderPosition()}}if(i.length===2&&n(this,N)){const e=n(this,q).get(i[0].pointerId),r=n(this,q).get(i[1].pointerId);if(e&&r){const a=i[0].pointerId===t.pointerId?i[1]:i[0],l=p(this,Me,ui).call(this,a,t),c=p(this,Me,ui).call(this,e,r),d=l>c?1.02:.98;p(this,Ne,fi).call(this,d)}}n(this,q).set(t.pointerId,t)},Rn=new WeakSet,_o=function(t){t.pointerType==="mouse"&&(u(this,rt,!1),u(this,X,!1))},Oe=new WeakSet,hi=function(t,i,e,r,a,l,c=0){const d=c/2,f=e-d,g=r-d,m=e+a+d,x=r+l+d,S=t>=f&&t<=m,k=i>=g&&i<=x;return S&&k},Be=new WeakSet,di=function(t){n(this,q).delete(t.pointerId),n(this,q).size||u(this,N,!1)},Me=new WeakSet,ui=function(t,i){const e=Math.abs(t.clientX-i.clientX),r=Math.abs(t.clientY-i.clientY);return Math.pow(e,2)+Math.pow(r,2)},Ne=new WeakSet,fi=function(t){const i=this.width*t-this.width,e=this.height*t-this.height;this.x=this.x-i/2,this.width=this.width+i,this.y=this.y-e/2,this.height=this.height+e,n(this,v).x=this.x,n(this,v).y=this.y,n(this,v).width=this.width,n(this,v).height=this.height,n(this,v).updateRenderPosition()},Pn=new WeakSet,qo=function(t,i){const e=p(this,zn,$o).call(this,t,i,this.x,this.y,this.width,this.height,n(this,at));e.left||e.right?(this.ctx.canvas.style.cursor="ew-resize",u(this,qt,e.left?"left":"right")):e.top||e.bottom?(this.ctx.canvas.style.cursor="ns-resize",u(this,qt,e.top?"top":"bottom")):n(this,N)?this.ctx.canvas.style.cursor="move":this.ctx.canvas.style.cursor="default"},zn=new WeakSet,$o=function(t,i,e,r,a,l,c=0){const d=c/2,f=e-d,g=r-d,m=e+a+d,x=r+l+d,S=e+d,k=r+d,Rt=e+a-d,et=r+l-d;return{left:t>=f&&t<=S,right:t>=Rt&&t<=m,top:i>=g&&i<=k,bottom:i>=et&&i<=x}},On=new WeakSet,Wo=function(t,i){switch(this.ctx.canvas.style.cursor){case"move":this.x+=t,this.y+=i,n(this,v).x+=t,n(this,v).y+=i,n(this,v).updateRenderPosition();break;case"ew-resize":{if(u(this,X,!0),n(this,qt)==="right"){const e=Math.max(this.width+t,1);this.width=e,n(this,v).width=e}else{const e=this.x+t;if(e>=this.x+this.width)break;const r=this.width-t;this.x=e,n(this,v).x=e,this.width=r,n(this,v).width=r}n(this,v).updateRenderPosition();break}case"ns-resize":{if(u(this,X,!0),n(this,qt)==="bottom"){const e=Math.max(this.height+i,1);this.height=e,n(this,v).height=e}else{const e=this.y+i;if(e>=this.y+this.height)break;const r=this.height-i;this.y=e,n(this,v).y=e,this.height=r,n(this,v).height=r}n(this,v).updateRenderPosition()}}};var $,T,K,Ue,V,Wt,Bn,Ho;class Vi{constructor(s,t){h(this,Bn);h(this,$,void 0);h(this,T,void 0);h(this,K,0);h(this,Ue,1);h(this,V,null);h(this,Wt,void 0);u(this,$,s),u(this,T,s.canvas),u(this,Wt,t)}async loadImage(){let s;try{s=await mn(n(this,Wt).imageUrl),u(this,V,s)}catch(t){throw console.error(t),new Error("Failed to load wanted image.")}return s}get imageScale(){return n(this,Ue)}setSize({width:s,height:t,shadowSize:i,quality:e}){if(!n(this,V))throw new Error("Failed to set size: wanted image is null");const r=n(this,V).width+i*2,a=n(this,V).height+i*2,l=ki(s,t,r,a);u(this,Ue,l);const c=r*l,d=a*l;switch(u(this,K,i*l),n(this,T).style.width=c+"px",n(this,T).style.height=d+"px",n(this,T).domWidth=c,n(this,T).domHeight=d,e){case"original":n(this,T).width=r,n(this,T).height=a,n(this,$).scale(1/l,1/l);break;case"high":{const g=window.devicePixelRatio;n(this,T).width=c*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}case"half":{const g=n(this,V).height/d/2;n(this,T).width=c*g,n(this,T).height=d*g,n(this,$).scale(g,g);break}}return p(this,Bn,Ho).call(this,l,i)}render(){n(this,V)&&(n(this,$).save(),n(this,$).shadowColor="rgba(0, 0, 0, 1)",n(this,$).shadowBlur=n(this,K)*(n(this,T).width/n(this,T).domWidth),n(this,$).drawImage(n(this,V),n(this,K),n(this,K),n(this,T).domWidth-n(this,K)*2,n(this,T).domHeight-n(this,K)*2),n(this,$).restore())}}$=new WeakMap,T=new WeakMap,K=new WeakMap,Ue=new WeakMap,V=new WeakMap,Wt=new WeakMap,Bn=new WeakSet,Ho=function(s,t){if(!n(this,Wt))throw new Error("Failed to calculate wanted image info: WantedImageInfo object is null");t*=s;const{imageUrl:i,bellyImageUrl:e,photoPosition:r,namePosition:a,bountyInfo:l,boundaryOffset:c}=n(this,Wt),d=g=>{const{x:m,y:x,width:S,height:k}=g;return{x:m*s+t,y:x*s+t,width:S*s,height:k*s}},f={...d(l),bellyMarginRight:l.bellyMarginRight*s,fontSize:l.fontSize*s};return{imageUrl:i,bellyImageUrl:e,photoPosition:d(r),namePosition:d(a),bountyInfo:f,boundaryOffset:{left:c.left*s+t,right:c.right*s+t,top:c.top*s+t,bottom:c.bottom*s+t}}};const qr="wanted-poster",$r=["name","bounty","name-spacing","bounty-spacing","bounty-font-family","bounty-font-scale","bounty-font-weight","bounty-vertical-offset","photo-url","filter","poster-shadow","photo-shadow"];var Ht,ct,je,U,lt,J,z,P,ht,te,_e,W,Y,Mn,Do,qe,pi,$e,gi;class Wr extends HTMLElement{constructor(){super();h(this,W);h(this,Mn);h(this,qe);h(this,$e);h(this,Ht,void 0);h(this,ct,void 0);h(this,je,void 0);h(this,U,void 0);h(this,lt,void 0);h(this,J,void 0);h(this,z,void 0);h(this,P,void 0);h(this,ht,void 0);h(this,te,void 0);h(this,_e,void 0);u(this,ht,"init");const t=this.attachShadow({mode:"open"}),i=document.createElement("canvas");i.domWidth=0,i.domHeight=0;const e=document.createElement("div");e.className="container";const r=document.createElement("style");r.textContent=Ur,t.append(r,e);const a=i.getContext("2d");u(this,Ht,e),u(this,ct,i),u(this,je,a),u(this,P,new Vi(a,Vn)),u(this,U,new Qi(a)),u(this,J,new Di(a)),u(this,z,new Hi(a)),u(this,lt,new _r(a,n(this,U))),u(this,te,new ResizeObserver(()=>{clearTimeout(n(this,_e)),u(this,_e,window.setTimeout(()=>p(this,qe,pi).call(this),200))})),n(this,te).observe(e)}static get observedAttributes(){return $r}async connectedCallback(){console.log("[connected]"),await new Promise(e=>{setTimeout(()=>e(""))}),u(this,ht,"loading");const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect();try{await n(this,P).loadImage();const e=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(e.namePosition),n(this,z).setBountyInfo(e.bountyInfo,n(this,P).imageScale),await n(this,z).loadBellyImage(Vn.bellyImageUrl),await n(this,U).init(e.photoPosition,e.boundaryOffset),await n(this,U).loadImage(this.getAttribute("photo-url"))}catch(e){u(this,ht,"error"),console.error("Failed to init wanted poster.",e);return}u(this,ht,"success"),p(this,$e,gi).call(this),n(this,Ht).appendChild(n(this,ct)),this.dispatchEvent(new CustomEvent("WantedPosterLoaded",{bubbles:!0}))}disconnectedCallback(){console.log("[disconnected]"),n(this,te).disconnect()}adoptedCallback(){console.log("[adopted]")}async attributeChangedCallback(t,i,e){switch(t){case"name":n(this,J).text=e;break;case"bounty":n(this,z).text=e;break;case"name-spacing":n(this,J).spacing=parseFloat(e)||0;break;case"bounty-spacing":n(this,z).spacing=parseFloat(e)||0;break;case"bounty-font-family":n(this,z).fontFamily=e;break;case"bounty-font-scale":n(this,z).fontScale=parseFloat(e)||1;break;case"bounty-font-weight":n(this,z).fontWeight=parseFloat(e)||600;break;case"bounty-vertical-offset":n(this,z).verticalOffset=parseFloat(e)||0;break;case"photo-url":{await n(this,U).loadImage(e),n(this,lt).highlight=!e.endsWith("#nohighlight");break}case"filter":{n(this,U).filter=e;break}case"poster-shadow":{p(this,qe,pi).call(this);break}case"photo-shadow":n(this,U).shadow=parseFloat(e)||0}}async export(){const t=document.createElement("canvas");t.domWidth=0,t.domHeight=0,t.style.display="none";const i=t.getContext("2d"),e=p(this,W,Y).call(this,"poster-shadow"),r=new Vi(i,Vn),a=new Qi(i),l=new Di(i),c=new Hi(i),d=await r.loadImage(),f=d.width+e*2,g=d.height+e*2,m=r.setSize({width:f,height:g,shadowSize:e,quality:"original"});await c.loadBellyImage(m.bellyImageUrl),l.setPosition(m.namePosition),c.setBountyInfo(m.bountyInfo,1),l.text=this.getAttribute("name")??"",c.text=this.getAttribute("bounty")??"",l.spacing=p(this,W,Y).call(this,"name-spacing"),c.spacing=p(this,W,Y).call(this,"bounty-spacing"),c.fontFamily=this.getAttribute("bounty-font-family")??"",c.fontScale=p(this,W,Y).call(this,"bounty-font-scale",1),c.fontWeight=p(this,W,Y).call(this,"bounty-font-weight"),c.verticalOffset=p(this,W,Y).call(this,"bounty-vertical-offset"),await a.init(m.photoPosition,m.boundaryOffset),await a.loadImage(this.getAttribute("photo-url")),a.shadow=p(this,W,Y).call(this,"photo-shadow");const{x,y:S,width:k,height:Rt,filter:et}=n(this,U);a.x=x/n(this,P).imageScale,a.y=S/n(this,P).imageScale,a.width=k/n(this,P).imageScale,a.height=Rt/n(this,P).imageScale,a.filter=et,a.updateRenderPosition(),a.render(),r.render(),c.render(),l.render();let L="";try{const R=await new Promise((Hn,ce)=>{t.toBlob(w=>{w?Hn(w):ce("Failed to create blob object.")},"image/png",1)});L=URL.createObjectURL(R),p(this,Mn,Do).call(this,L,"wanted-poster.png")}finally{L&&URL.revokeObjectURL(L)}}}Ht=new WeakMap,ct=new WeakMap,je=new WeakMap,U=new WeakMap,lt=new WeakMap,J=new WeakMap,z=new WeakMap,P=new WeakMap,ht=new WeakMap,te=new WeakMap,_e=new WeakMap,W=new WeakSet,Y=function(t,i=0){const e=this.getAttribute(t)||"";return parseFloat(e)||i},Mn=new WeakSet,Do=function(t,i){const e=document.createElement("a");e.setAttribute("href",t),e.setAttribute("download",i),e.style.display="none",document.body.appendChild(e),e.click(),e.remove()},qe=new WeakSet,pi=function(){if(n(this,ht)!=="success")return;const t=p(this,W,Y).call(this,"poster-shadow"),i=n(this,Ht).getBoundingClientRect(),e=n(this,ct).getBoundingClientRect(),r=ki(i.width,i.height,e.width,e.height),a=n(this,P).setSize({width:i.width,height:i.height,shadowSize:t,quality:"half"});n(this,J).setPosition(a.namePosition),n(this,z).setBountyInfo(a.bountyInfo,n(this,P).imageScale),n(this,U).setBoundary(a.photoPosition,a.boundaryOffset),n(this,lt).scale(r),n(this,lt).borderScale=n(this,P).imageScale},$e=new WeakSet,gi=function(){n(this,je).clearRect(0,0,n(this,ct).domWidth,n(this,ct).domHeight),n(this,U).render(),n(this,P).render(),n(this,z).render(),n(this,J).render(),n(this,lt).render(),requestAnimationFrame(p(this,$e,gi).bind(this))};customElements.define(qr,Wr);const bn=new Map,be={photoUrl:"",name:"",bounty:"",nameSpacing:0,bountySpacing:1,bountyFontFamily:"Vertiky",bountyFontScale:1,bountyFontWeight:600,bountyVerticalOffset:-4,filter:"",posterShadow:0,photoShadow:0,blur:0,brightness:100,contrast:100,grayscale:0,hueRotate:0,saturate:100,sepia:0};function Hr(o){return o in be}function mi({blur:o,brightness:s,contrast:t,grayscale:i,hueRotate:e,saturate:r,sepia:a}){return`blur(${o}px) brightness(${s}%) contrast(${t}%) grayscale(${i}%) hue-rotate(${e}deg) saturate(${r}%) sepia(${a}%)`}const b=new Proxy({...be,filter:mi(be)},{set(o,s,t,i){if(!Hr(s))return!0;switch(s){case"blur":case"brightness":case"contrast":case"grayscale":case"hueRotate":case"saturate":case"sepia":{const e=mi({...o,[s]:t});if(e===o.filter)break;o.filter=e,setTimeout(()=>{(bn.get("filter")??[]).forEach(a=>a("filter",e,o))})}}return setTimeout(()=>{(bn.get(s)??[]).forEach(r=>r(s,t,o))}),Reflect.set(o,s,t,i)}});function y(o,s){let t=bn.get(o);t||(t=[],bn.set(o,t)),t.push(s)}function Kn(o={}){Object.assign(b,{...b,filter:mi(be),...o})}function Dr(o={}){Object.assign(b,{...be,...o})}const Gr=":host{--slider-thumb-size: 2rem;display:block;position:fixed;top:0;left:0;transform:translate(-105%);transition:transform .2s;box-sizing:border-box;box-shadow:.1rem 0 .3rem #0000007f;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.125rem;width:18.75rem;max-width:80%;height:100%}:host(.open){transform:translate(0)}.container{display:flex;flex-direction:column;box-sizing:border-box;box-shadow:inset 0 0 .2rem .2rem #0000007f;border:.0625rem solid rgb(180 150 81);background:url("+new URL("../images/wood-bg.png",import.meta.url).href+") repeat-y center top;background-size:100% auto;width:100%;height:100%}.field-container{display:flex;flex:1 0;flex-direction:column;gap:2.5rem;padding:1rem;overflow-x:hidden;overflow-y:auto}.action-container{display:flex;justify-content:space-around;align-items:center;padding:0 1rem;height:4rem}.wood-button{display:flex;justify-content:center;align-items:center;filter:var(--element-filter);transition:.05s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/wood-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:6rem;height:2rem;color:#fff;font-size:1rem;font-family:serif;text-shadow:var(--text-shadow)}.wood-button:hover{filter:var(--element-hover-filter)}.close-button{filter:var(--element-filter);transition:.1s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/close-button.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;width:2rem;height:2rem}.close-button:hover{filter:var(--element-hover-filter)}.wood-button:active,.close-button:active{transform:translateY(1px);filter:var(--element-active-filter)}.text-input{filter:var(--element-filter);box-sizing:border-box;outline:none;border:0;background-image:url("+new URL("../images/input-frame.png",import.meta.url).href+");background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding:0 .8rem 0 .75rem;width:100%;color:var(--dark-text-color);font-size:1rem;line-height:2rem;font-family:serif;text-align:center}.text-input::-moz-placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.text-input::placeholder{color:#0000004d;font-size:1rem;text-shadow:none}.header{display:flex;position:relative;flex-shrink:0;justify-content:center;align-items:center;box-sizing:border-box;margin:0 auto 1.5em;background-image:url("+new URL("../images/scroll-paper.png",import.meta.url).href+`);background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding-bottom:.1rem;padding-left:.5rem;width:14rem;height:2.75rem;color:var(--dark-text-color);font-size:1rem}.field-group{display:grid;grid-template-columns:auto 1fr;-moz-column-gap:1rem;column-gap:1rem;row-gap:.5rem;align-items:center;color:#fff;text-align:right}.field-group label{font-size:.8rem;text-shadow:0 0 .25rem black,0 0 .5rem rgb(57 42 34)}::-moz-selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#f5d58d}::-webkit-scrollbar-corner{background:transparent} `,Qr=`
\r
\r
\r @@ -161,7 +161,7 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config \r
\r -
`,Yr="edit-panel",Go=document.createElement("template");Go.innerHTML=Qr;var dt,ut,ft,pt,gt,mt,bt,yt,wt,xt,vt,St,kt,Et,It,Lt,Tt,We,He,De,E;class Xr extends HTMLElement{constructor(){super();h(this,dt,void 0);h(this,ut,void 0);h(this,ft,void 0);h(this,pt,void 0);h(this,gt,void 0);h(this,mt,void 0);h(this,bt,void 0);h(this,yt,void 0);h(this,wt,void 0);h(this,xt,void 0);h(this,vt,void 0);h(this,St,void 0);h(this,kt,void 0);h(this,Et,void 0);h(this,It,void 0);h(this,Lt,void 0);h(this,Tt,void 0);h(this,We,void 0);h(this,He,void 0);h(this,De,void 0);h(this,E,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=Gr,t.append(i,Go.content.cloneNode(!0)),u(this,dt,t.querySelector("#nameInput")),u(this,ut,t.querySelector("#bountyInput")),u(this,ft,t.querySelector("#nameSpacingSlider")),u(this,pt,t.querySelector("#bountyFontFamilySelect")),u(this,gt,t.querySelector("#bountySpacingSlider")),u(this,mt,t.querySelector("#bountyFontScaleSlider")),u(this,bt,t.querySelector("#bountyFontWeightSlider")),u(this,yt,t.querySelector("#bountyOffsetSlider")),u(this,wt,t.querySelector("#posterShadowSlider")),u(this,xt,t.querySelector("#photoShadowSlider")),u(this,vt,t.querySelector("#blurSlider")),u(this,St,t.querySelector("#brightnessSlider")),u(this,kt,t.querySelector("#contrastSlider")),u(this,Et,t.querySelector("#grayscaleSlider")),u(this,It,t.querySelector("#hueRotateSlider")),u(this,Lt,t.querySelector("#saturateSlider")),u(this,Tt,t.querySelector("#sepiaSlider")),u(this,We,t.querySelector("#closeButton")),u(this,He,t.querySelector("#resetButton")),u(this,E,(e,r)=>{switch(r=r.toString(),e){case"name":n(this,dt).value=r;break;case"bounty":n(this,ut).value=r;break;case"nameSpacing":n(this,ft).value=r;break;case"bountySpacing":n(this,gt).value=r;break;case"bountyFontFamily":n(this,pt).value=r;break;case"bountyFontScale":n(this,mt).value=r;break;case"bountyFontWeight":n(this,bt).value=r;break;case"bountyVerticalOffset":n(this,yt).value=r;break;case"posterShadow":n(this,wt).value=r;break;case"photoShadow":n(this,xt).value=r;break;case"blur":n(this,vt).value=r;break;case"brightness":n(this,St).value=r;break;case"contrast":n(this,kt).value=r;break;case"grayscale":n(this,Et).value=r;break;case"hueRotate":n(this,It).value=r;break;case"saturate":n(this,Lt).value=r;break;case"sepia":n(this,Tt).value=r;break}}),u(this,De,e=>{e.composedPath().includes(this)||this.classList.contains("open")&&this.toggle()})}toggle(){this.classList.toggle("open")}connectedCallback(){window.addEventListener("pointerdown",n(this,De)),x("name",n(this,E)),x("bounty",n(this,E)),x("nameSpacing",n(this,E)),x("bountySpacing",n(this,E)),x("bountyFontFamily",n(this,E)),x("bountyFontScale",n(this,E)),x("bountyFontWeight",n(this,E)),x("bountyVerticalOffset",n(this,E)),x("posterShadow",n(this,E)),x("photoShadow",n(this,E)),x("blur",n(this,E)),x("saturate",n(this,E)),x("contrast",n(this,E)),x("grayscale",n(this,E)),x("hueRotate",n(this,E)),x("hueRotate",n(this,E)),x("sepia",n(this,E)),n(this,dt).value=m.name,n(this,ut).value=m.bounty.toString(),n(this,ft).value=m.nameSpacing.toString(),n(this,gt).value=m.bountySpacing.toString(),n(this,pt).value=m.bountyFontFamily.toString(),n(this,mt).value=m.bountyFontScale.toString(),n(this,bt).value=m.bountyFontWeight.toString(),n(this,yt).value=m.bountyVerticalOffset.toString(),n(this,wt).value=m.posterShadow.toString(),n(this,xt).value=m.photoShadow.toString(),n(this,vt).value=m.blur.toString(),n(this,St).value=m.brightness.toString(),n(this,kt).value=m.contrast.toString(),n(this,Et).value=m.grayscale.toString(),n(this,It).value=m.hueRotate.toString(),n(this,Lt).value=m.saturate.toString(),n(this,Tt).value=m.sepia.toString(),n(this,dt).addEventListener("input",()=>m.name=n(this,dt).value),n(this,ft).addEventListener("input",()=>m.nameSpacing=parseFloat(n(this,ft).value)),n(this,ut).addEventListener("input",()=>m.bounty=n(this,ut).value),n(this,pt).addEventListener("input",()=>{m.bountyFontFamily=n(this,pt).value}),n(this,gt).addEventListener("input",()=>{m.bountySpacing=parseFloat(n(this,gt).value)}),n(this,mt).addEventListener("input",()=>{m.bountyFontScale=parseFloat(n(this,mt).value)}),n(this,bt).addEventListener("input",()=>{m.bountyFontWeight=parseFloat(n(this,bt).value)}),n(this,yt).addEventListener("input",()=>{m.bountyVerticalOffset=parseFloat(n(this,yt).value)}),n(this,xt).addEventListener("input",()=>m.photoShadow=parseFloat(n(this,xt).value)),n(this,vt).addEventListener("input",()=>m.blur=parseFloat(n(this,vt).value)),n(this,St).addEventListener("input",()=>m.brightness=parseFloat(n(this,St).value)),n(this,kt).addEventListener("input",()=>m.contrast=parseFloat(n(this,kt).value)),n(this,Et).addEventListener("input",()=>m.grayscale=parseFloat(n(this,Et).value)),n(this,It).addEventListener("input",()=>m.hueRotate=parseFloat(n(this,It).value)),n(this,Lt).addEventListener("input",()=>m.saturate=parseFloat(n(this,Lt).value)),n(this,Tt).addEventListener("input",()=>m.sepia=parseFloat(n(this,Tt).value)),n(this,wt).addEventListener("input",()=>m.posterShadow=parseFloat(n(this,wt).value)),n(this,We).addEventListener("click",()=>this.toggle()),n(this,He).addEventListener("click",()=>Dr({photoUrl:m.photoUrl}))}}dt=new WeakMap,ut=new WeakMap,ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,bt=new WeakMap,yt=new WeakMap,wt=new WeakMap,xt=new WeakMap,vt=new WeakMap,St=new WeakMap,kt=new WeakMap,Et=new WeakMap,It=new WeakMap,Lt=new WeakMap,Tt=new WeakMap,We=new WeakMap,He=new WeakMap,De=new WeakMap,E=new WeakMap;customElements.define(Yr,Xr);const Vr=":host{display:block;position:fixed;top:0;right:0;transform:translate(105%);transition:transform .2s;box-sizing:border-box;box-shadow:.1rem 0 .3rem #0000007f;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.125rem;width:28rem;max-width:80%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(.open){transform:translate(0)}.container{box-sizing:border-box;container:panel / inline-size;box-shadow:inset 0 0 .2rem .2rem #0000007f;border:.0625rem solid rgb(180 150 81);background:url("+new URL("../images/wood-bg.png",import.meta.url).href+") repeat-y center top;background-size:100% auto;width:100%;height:100%}.container>*{height:100%}.loading,.error{display:flex;justify-content:center;align-items:center;padding:1rem;color:#fff}.loading{font-size:6rem}.content{display:grid;grid-template-rows:auto 1fr auto}.header{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:1rem;padding:.5rem 1rem}.image-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:1rem;overflow-y:auto}.image-grid>img{filter:drop-shadow(0 0 .15rem rgba(0 0 0 / 80%));cursor:pointer;background-color:#fff;max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.pagination{display:flex;align-items:center;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.5rem}.page-number-wrapper{display:flex;flex-grow:1;justify-content:space-evenly}.page-button,.navigate-button{display:flex;justify-content:center;align-items:center;transition:.2s;border:0;border-radius:.125em;background-color:transparent;padding:0 .25em;min-width:1.25em;min-height:1.25em;color:#3b230e;font-size:1em}.navigate-button{position:relative;font-size:1.6em}.navigate-button[disabled]{color:#3b230e7f}.navigate-button iconify-icon{position:absolute;pointer-events:none}.page-button:not([disabled]),.navigate-button:not([disabled]){cursor:pointer}.page-button:not([disabled]):hover,.navigate-button:not([disabled]):hover{background-color:#3b230e33}.page-button--active{background-color:#3b230e;color:#fff}@media (min-width: 430px){.pagination{gap:.5rem;font-size:1.25rem}}.search-input{filter:var(--element-filter);box-sizing:border-box;margin-right:auto;outline:none;border:0;background-image:url("+new URL("../images/input-frame.png",import.meta.url).href+`);background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding:0 1rem;width:100%;max-width:14rem;height:2.75rem;color:var(--dark-text-color);font-size:1.4rem;line-height:2rem;font-family:serif;text-align:center}.search-input::-moz-placeholder{color:#0000004d;text-shadow:none}.search-input::placeholder{color:#0000004d;text-shadow:none}#orderButton::part(icon){transition:.2s transform}#orderButton[descending]::part(icon){transform:scaleX(-1) rotate(180deg)}:host([loading]) .content{display:none}:host([loading]) .error{display:none}:host([error]) .content{display:none}:host([error]) .loading{display:none}::-moz-selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#f5d58d}::-webkit-scrollbar-corner{background:transparent} +
`,Yr="edit-panel",Go=document.createElement("template");Go.innerHTML=Qr;var dt,ut,ft,pt,gt,mt,bt,yt,wt,vt,xt,St,kt,It,Et,Lt,Tt,We,He,De,I;class Xr extends HTMLElement{constructor(){super();h(this,dt,void 0);h(this,ut,void 0);h(this,ft,void 0);h(this,pt,void 0);h(this,gt,void 0);h(this,mt,void 0);h(this,bt,void 0);h(this,yt,void 0);h(this,wt,void 0);h(this,vt,void 0);h(this,xt,void 0);h(this,St,void 0);h(this,kt,void 0);h(this,It,void 0);h(this,Et,void 0);h(this,Lt,void 0);h(this,Tt,void 0);h(this,We,void 0);h(this,He,void 0);h(this,De,void 0);h(this,I,void 0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=Gr,t.append(i,Go.content.cloneNode(!0)),u(this,dt,t.querySelector("#nameInput")),u(this,ut,t.querySelector("#bountyInput")),u(this,ft,t.querySelector("#nameSpacingSlider")),u(this,pt,t.querySelector("#bountyFontFamilySelect")),u(this,gt,t.querySelector("#bountySpacingSlider")),u(this,mt,t.querySelector("#bountyFontScaleSlider")),u(this,bt,t.querySelector("#bountyFontWeightSlider")),u(this,yt,t.querySelector("#bountyOffsetSlider")),u(this,wt,t.querySelector("#posterShadowSlider")),u(this,vt,t.querySelector("#photoShadowSlider")),u(this,xt,t.querySelector("#blurSlider")),u(this,St,t.querySelector("#brightnessSlider")),u(this,kt,t.querySelector("#contrastSlider")),u(this,It,t.querySelector("#grayscaleSlider")),u(this,Et,t.querySelector("#hueRotateSlider")),u(this,Lt,t.querySelector("#saturateSlider")),u(this,Tt,t.querySelector("#sepiaSlider")),u(this,We,t.querySelector("#closeButton")),u(this,He,t.querySelector("#resetButton")),u(this,I,(e,r)=>{switch(r=r.toString(),e){case"name":n(this,dt).value=r;break;case"bounty":n(this,ut).value=r;break;case"nameSpacing":n(this,ft).value=r;break;case"bountySpacing":n(this,gt).value=r;break;case"bountyFontFamily":n(this,pt).value=r;break;case"bountyFontScale":n(this,mt).value=r;break;case"bountyFontWeight":n(this,bt).value=r;break;case"bountyVerticalOffset":n(this,yt).value=r;break;case"posterShadow":n(this,wt).value=r;break;case"photoShadow":n(this,vt).value=r;break;case"blur":n(this,xt).value=r;break;case"brightness":n(this,St).value=r;break;case"contrast":n(this,kt).value=r;break;case"grayscale":n(this,It).value=r;break;case"hueRotate":n(this,Et).value=r;break;case"saturate":n(this,Lt).value=r;break;case"sepia":n(this,Tt).value=r;break}}),u(this,De,e=>{e.composedPath().includes(this)||this.classList.contains("open")&&this.toggle()})}toggle(){this.classList.toggle("open")}connectedCallback(){window.addEventListener("pointerdown",n(this,De)),y("name",n(this,I)),y("bounty",n(this,I)),y("nameSpacing",n(this,I)),y("bountySpacing",n(this,I)),y("bountyFontFamily",n(this,I)),y("bountyFontScale",n(this,I)),y("bountyFontWeight",n(this,I)),y("bountyVerticalOffset",n(this,I)),y("posterShadow",n(this,I)),y("photoShadow",n(this,I)),y("blur",n(this,I)),y("saturate",n(this,I)),y("contrast",n(this,I)),y("grayscale",n(this,I)),y("hueRotate",n(this,I)),y("hueRotate",n(this,I)),y("sepia",n(this,I)),n(this,dt).value=b.name,n(this,ut).value=b.bounty.toString(),n(this,ft).value=b.nameSpacing.toString(),n(this,gt).value=b.bountySpacing.toString(),n(this,pt).value=b.bountyFontFamily.toString(),n(this,mt).value=b.bountyFontScale.toString(),n(this,bt).value=b.bountyFontWeight.toString(),n(this,yt).value=b.bountyVerticalOffset.toString(),n(this,wt).value=b.posterShadow.toString(),n(this,vt).value=b.photoShadow.toString(),n(this,xt).value=b.blur.toString(),n(this,St).value=b.brightness.toString(),n(this,kt).value=b.contrast.toString(),n(this,It).value=b.grayscale.toString(),n(this,Et).value=b.hueRotate.toString(),n(this,Lt).value=b.saturate.toString(),n(this,Tt).value=b.sepia.toString(),n(this,dt).addEventListener("input",()=>b.name=n(this,dt).value),n(this,ft).addEventListener("input",()=>b.nameSpacing=parseFloat(n(this,ft).value)),n(this,ut).addEventListener("input",()=>b.bounty=n(this,ut).value),n(this,pt).addEventListener("input",()=>{b.bountyFontFamily=n(this,pt).value}),n(this,gt).addEventListener("input",()=>{b.bountySpacing=parseFloat(n(this,gt).value)}),n(this,mt).addEventListener("input",()=>{b.bountyFontScale=parseFloat(n(this,mt).value)}),n(this,bt).addEventListener("input",()=>{b.bountyFontWeight=parseFloat(n(this,bt).value)}),n(this,yt).addEventListener("input",()=>{b.bountyVerticalOffset=parseFloat(n(this,yt).value)}),n(this,vt).addEventListener("input",()=>b.photoShadow=parseFloat(n(this,vt).value)),n(this,xt).addEventListener("input",()=>b.blur=parseFloat(n(this,xt).value)),n(this,St).addEventListener("input",()=>b.brightness=parseFloat(n(this,St).value)),n(this,kt).addEventListener("input",()=>b.contrast=parseFloat(n(this,kt).value)),n(this,It).addEventListener("input",()=>b.grayscale=parseFloat(n(this,It).value)),n(this,Et).addEventListener("input",()=>b.hueRotate=parseFloat(n(this,Et).value)),n(this,Lt).addEventListener("input",()=>b.saturate=parseFloat(n(this,Lt).value)),n(this,Tt).addEventListener("input",()=>b.sepia=parseFloat(n(this,Tt).value)),n(this,wt).addEventListener("input",()=>b.posterShadow=parseFloat(n(this,wt).value)),n(this,We).addEventListener("click",()=>this.toggle()),n(this,He).addEventListener("click",()=>Dr({photoUrl:b.photoUrl}))}}dt=new WeakMap,ut=new WeakMap,ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,bt=new WeakMap,yt=new WeakMap,wt=new WeakMap,vt=new WeakMap,xt=new WeakMap,St=new WeakMap,kt=new WeakMap,It=new WeakMap,Et=new WeakMap,Lt=new WeakMap,Tt=new WeakMap,We=new WeakMap,He=new WeakMap,De=new WeakMap,I=new WeakMap;customElements.define(Yr,Xr);const Vr=":host{display:block;position:fixed;top:0;right:0;transform:translate(105%);transition:transform .2s;box-sizing:border-box;box-shadow:.1rem 0 .3rem #0000007f;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.125rem;width:28rem;max-width:80%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host(.open){transform:translate(0)}.container{box-sizing:border-box;container:panel / inline-size;box-shadow:inset 0 0 .2rem .2rem #0000007f;border:.0625rem solid rgb(180 150 81);background:url("+new URL("../images/wood-bg.png",import.meta.url).href+") repeat-y center top;background-size:100% auto;width:100%;height:100%}.container>*{height:100%}.loading,.error{display:flex;justify-content:center;align-items:center;padding:1rem;color:#fff}.loading{font-size:6rem}.content{display:grid;grid-template-rows:auto 1fr auto}.header{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:1rem;padding:.5rem 1rem}.image-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:1rem;overflow-y:auto}.image-grid>img{filter:drop-shadow(0 0 .15rem rgba(0 0 0 / 80%));cursor:pointer;background-color:#fff;max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain}.pagination{display:flex;align-items:center;border:1px solid #3b230e;background:linear-gradient(120deg,rgb(245 198 95),rgb(245 218 158),rgb(245 198 96));padding:.5rem}.page-number-wrapper{display:flex;flex-grow:1;justify-content:space-evenly}.page-button,.navigate-button{display:flex;justify-content:center;align-items:center;transition:.2s;border:0;border-radius:.125em;background-color:transparent;padding:0 .25em;min-width:1.25em;min-height:1.25em;color:#3b230e;font-size:1em}.navigate-button{position:relative;font-size:1.6em}.navigate-button[disabled]{color:#3b230e7f}.navigate-button iconify-icon{position:absolute;pointer-events:none}.page-button:not([disabled]),.navigate-button:not([disabled]){cursor:pointer}.page-button:not([disabled]):hover,.navigate-button:not([disabled]):hover{background-color:#3b230e33}.page-button--active{background-color:#3b230e;color:#fff}@media (min-width: 430px){.pagination{gap:.5rem;font-size:1.25rem}}.search-input{filter:var(--element-filter);box-sizing:border-box;margin-right:auto;outline:none;border:0;background-image:url("+new URL("../images/input-frame.png",import.meta.url).href+`);background-position:center;background-size:100% 100%;background-repeat:no-repeat;background-color:transparent;padding:0 1rem;width:100%;max-width:14rem;height:2.75rem;color:var(--dark-text-color);font-size:1.4rem;line-height:2rem;font-family:serif;text-align:center}.search-input::-moz-placeholder{color:#0000004d;text-shadow:none}.search-input::placeholder{color:#0000004d;text-shadow:none}#orderButton::part(icon){transition:.2s transform}#orderButton[descending]::part(icon){transform:scaleX(-1) rotate(180deg)}:host([loading]) .content{display:none}:host([loading]) .error{display:none}:host([error]) .content{display:none}:host([error]) .loading{display:none}::-moz-selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::selection{filter:brightness(120%);background:rgb(88 64 52 / 80%);color:#fff}::-webkit-scrollbar{width:.2rem}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.1rem;background:#f5d58d}::-webkit-scrollbar-corner{background:transparent} `,Kr=`
\r
\r
\r @@ -184,7 +184,7 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config
\r
Error
\r
`,Jr="optc-gallery-panel",Qo=document.createElement("template");Qo.innerHTML=Kr;var Ge,G,ee,ne,Qe,Dt,Gt,Qt,Yt,Ye,ie,oe,Xt,A,Q,Nn,Yo,Un,Xo,Z,zt;class Zr extends HTMLElement{constructor(){super();h(this,Nn);h(this,Un);h(this,Z);h(this,Ge,0);h(this,G,null);h(this,ee,void 0);h(this,ne,void 0);h(this,Qe,void 0);h(this,Dt,void 0);h(this,Gt,void 0);h(this,Qt,void 0);h(this,Yt,void 0);h(this,Ye,void 0);h(this,ie,void 0);h(this,oe,"ascending");h(this,Xt,10);h(this,A,1);h(this,Q,0);const t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent=Vr,t.append(i,Qo.content.cloneNode(!0)),u(this,ee,t.querySelector("#searchInput")),u(this,ne,t.querySelector("#orderButton")),u(this,Qe,t.querySelector("#closeButton")),u(this,Dt,t.querySelector("#imageGrid")),u(this,Gt,t.querySelector("#pageNumberWrapper")),u(this,Qt,t.querySelector("#preButton")),u(this,Yt,t.querySelector("#nextButton")),u(this,Ye,t.querySelector("#error")),u(this,ie,e=>{e.composedPath().includes(this)||this.classList.contains("open")&&this.toggle()})}async init(){this.setAttribute("loading","");try{let i=await(await fetch("https://raw.githubusercontent.com/optc-db/optc-db.github.io/master/common/data/families.js")).text();i=i.replace("(function () {","").replace("window.families =","const families = ").replace("const calcGhostStartIDStart = 5000;","").replace(/const ghostFamilies(.|\n)*\}\);/,"").replace("})();","export default families");const e=new Blob([i],{type:"text/javascript"}),r=URL.createObjectURL(e),{default:a}=await Ji(()=>import(r),[],import.meta.url);u(this,G,a),p(this,Z,zt).call(this)}catch(t){this.setAttribute("error","");let i="Faild to get character info.";t instanceof Error&&(i+=` -`+t.message),n(this,Ye).innerText=i}finally{this.removeAttribute("loading")}}get ids(){if(!n(this,G))return[];const t=n(this,ee).value.toLowerCase().trim();if(!t)return Array.from(Object.keys(n(this,G)));const i=[];for(const e in n(this,G)){if(e.includes(t)){i.push(e);continue}n(this,G)[e].some(c=>c.toLocaleLowerCase().includes(t))&&i.push(e)}return i}toggle(){!n(this,G)&&!this.classList.contains("open")&&this.init(),this.classList.toggle("open")}connectedCallback(){window.addEventListener("pointerdown",n(this,ie)),n(this,ee).addEventListener("input",()=>p(this,Nn,Yo).call(this)),n(this,ne).addEventListener("click",()=>{u(this,oe,n(this,oe)==="ascending"?"descending":"ascending"),n(this,ne).toggleAttribute("descending"),p(this,Z,zt).call(this)}),n(this,Qe).addEventListener("click",()=>this.toggle()),n(this,Dt).addEventListener("click",t=>{const i=t.target;i instanceof Image&&(m.photoUrl=i.src,m.name=i.dataset.name??"",this.toggle())}),n(this,Qt).addEventListener("click",()=>{n(this,A)!==1&&(cn(this,A)._--,p(this,Z,zt).call(this))}),n(this,Yt).addEventListener("click",()=>{n(this,A)!==n(this,Q)&&(cn(this,A)._++,p(this,Z,zt).call(this))})}disconnectedCallback(){window.removeEventListener("pointerdown",n(this,ie))}}Ge=new WeakMap,G=new WeakMap,ee=new WeakMap,ne=new WeakMap,Qe=new WeakMap,Dt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,Yt=new WeakMap,Ye=new WeakMap,ie=new WeakMap,oe=new WeakMap,Xt=new WeakMap,A=new WeakMap,Q=new WeakMap,Nn=new WeakSet,Yo=function(){clearTimeout(n(this,Ge)),u(this,Ge,setTimeout(()=>{u(this,A,1),p(this,Z,zt).call(this)},500))},Un=new WeakSet,Xo=function(){if(n(this,Gt).innerHTML="",n(this,Q)===0){n(this,Qt).disabled=!0,n(this,Yt).disabled=!0;return}let t=1;const i=new Set([1,n(this,Q),n(this,A)]),e=Math.min(n(this,Q),5);for(;i.sizea-c);r.forEach((a,c)=>{const l=document.createElement("button");l.innerText=a.toString(),l.classList.add("page-button"),l.addEventListener("click",()=>{u(this,A,a),p(this,Z,zt).call(this)}),n(this,A)===a&&(l.classList.add("page-button--active"),l.toggleAttribute("disabled")),n(this,Gt).appendChild(l);const d=c+1;if(d1){const f=document.createElement("button");f.classList.add("page-button"),f.toggleAttribute("disabled"),f.innerText="...",n(this,Gt).appendChild(f)}}),n(this,Qt).toggleAttribute("disabled",n(this,A)===1),n(this,Yt).toggleAttribute("disabled",n(this,A)===n(this,Q))},Z=new WeakSet,zt=function(){n(this,Dt).innerHTML="";const t=this.ids;if(u(this,Q,Math.ceil(t.length/n(this,Xt))),p(this,Un,Xo).call(this),n(this,Q)===0)return;const i=(n(this,A)-1)*n(this,Xt);(n(this,oe)==="ascending"?t.slice(i,i+n(this,Xt)):t.reverse().slice(i,i+n(this,Xt))).forEach(r=>{const a=parseInt(r);if(isNaN(a))return;const c=Math.floor(a/1e3),l=(Math.floor(a%1e3/100)*100).toString().padStart(3,"0"),d=a.toString().padStart(4,"0")+".png",f=`https://optc-db.github.io/api/images/full/transparent/${c}/${l}/${d}`,g=n(this,G)?n(this,G)[r].join(", ").toUpperCase():"",b=new Image;b.src=f,b.loading="lazy",b.dataset.id=r,b.dataset.name=g,n(this,Dt).appendChild(b)})};customElements.define(Jr,Zr);const hn={posterShadow:5,photoShadow:4,blur:0,brightness:100,contrast:100,hueRotate:0,grayscale:12,saturate:80,sepia:15,name:"PUTLER",bounty:"War Criminal",nameSpacing:0,bountySpacing:1,bountyFontFamily:"Scheherazade New",bountyFontScale:1.35,bountyVerticalOffset:0,photoUrls:["./images/war-criminal/photo-01.png","./images/war-criminal/photo-02.png","./images/war-criminal/photo-03.png"]};function ta(o){var s;(s=window.launchQueue)==null||s.setConsumer(t=>{var i;(i=t.files)!=null&&i.length&&o(t.files)})}function ea(o){return o.kind==="file"}const Ki={setConsumer:ta,isFileHandle:ea},na=":host{display:block;position:relative;transition:background-color .2s;box-sizing:border-box;background-image:url("+new URL("../images/cement-wall.jpg",import.meta.url).href+");background-position:center;background-size:cover;background-blend-mode:multiply;padding:1rem;width:100%;height:100%}:host(.warcriminal){background-image:url("+new URL("../images/cement-wall.jpg",import.meta.url).href+"),url("+new URL("../images/blood-stains-0.png",import.meta.url).href+")}:host(.dragin){background-color:silver}#uploadInput{display:none}.blood-overlay{display:none;position:absolute;top:0;left:0;opacity:.8;mix-blend-mode:multiply;animation-duration:4s;animation-name:fade-in;background-image:url("+new URL("../images/blood-stains-1.png",import.meta.url).href+");background-position:center;background-size:cover;width:100%;height:100%}.blood-overlay--visible{display:block}.loading-overlay{display:flex;position:absolute;top:0;left:0;justify-content:center;align-items:center;background-image:radial-gradient(#e1e4e7,#a5aab0);width:100%;height:100%}.loading-overlay__luffy{filter:drop-shadow(0 3px 3px rgb(0 0 0 / 50%));max-width:50vw;max-height:40vh}.tips-button{position:absolute;top:.8rem;left:.8rem;cursor:pointer;outline:none;border:0;background-color:transparent;padding:0}.tips-button>svg{filter:drop-shadow(0 0 2px rgb(0 0 0 / 50%));transition:.2s}.tips-button>svg:hover{filter:drop-shadow(0 0 3px #c08000) drop-shadow(0 0 5px #fffca3)}.tips-button--hidden{display:none}.optc-button{position:fixed;top:.5rem;right:5rem;filter:drop-shadow(0 0 .125rem rgb(0 0 0));transition:filter .2s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/tavern-button.png",import.meta.url).href+");background-position:center;background-size:contain;background-repeat:no-repeat;background-color:transparent;padding:0;width:2.4rem;height:2.4rem}.optc-button--hidden{display:none}.optc-button:hover{filter:drop-shadow(0 0 .18rem rgba(0 0 0))}.button-container{display:flex;position:absolute;bottom:0;left:0;gap:.5rem;box-sizing:border-box;padding:0 1rem 1rem}.button-container--hidden{display:none}.criminal{position:fixed;right:1rem;bottom:1.2rem;visibility:hidden;opacity:0;transition:visiblity 2s,opacity 2s;cursor:pointer;margin-left:auto;outline:none;border:0;background-color:transparent;padding:0;width:4rem;max-width:15vw;height:4rem;max-height:15vw}.criminal--visible{visibility:visible;opacity:1}.criminal.criminal--visible:after{top:55%;opacity:1}.criminal:before{position:absolute;top:0;left:0;filter:contrast(85%) brightness(0%) drop-shadow(1px 1px .5rem crimson) drop-shadow(-1px -1px .5rem crimson);transition:filter .5s;background-image:url("+new URL("../images/war-criminal/criminal-avatar.png",import.meta.url).href+');background-position:center;background-size:contain;background-repeat:no-repeat;width:100%;height:100%;content:" "}.criminal--stamp:before{filter:contrast(85%) brightness(110%) drop-shadow(1px 1px .1rem rgb(0 0 0 / 50%)) drop-shadow(-1px -1px .1rem rgb(0 0 0 / 50%));background-image:url('+new URL("../images/war-criminal/criminal-stamp.png",import.meta.url).href+"),url("+new URL("../images/war-criminal/criminal-avatar.png",import.meta.url).href+`)}.criminal:after{position:absolute;top:120%;left:53%;transform:translate(-50%,-50%);opacity:0;filter:brightness(100%)!important;transition:1s ease-out;content:"?";color:#fff;font-size:min(7vw,2rem)}.criminal--stamp:after{content:""}@keyframes fade-in{0%{opacity:0}to{opacity:.8}} +`+t.message),n(this,Ye).innerText=i}finally{this.removeAttribute("loading")}}get ids(){if(!n(this,G))return[];const t=n(this,ee).value.toLowerCase().trim();if(!t)return Array.from(Object.keys(n(this,G)));const i=[];for(const e in n(this,G)){if(e.includes(t)){i.push(e);continue}n(this,G)[e].some(l=>l.toLocaleLowerCase().includes(t))&&i.push(e)}return i}toggle(){!n(this,G)&&!this.classList.contains("open")&&this.init(),this.classList.toggle("open")}connectedCallback(){window.addEventListener("pointerdown",n(this,ie)),n(this,ee).addEventListener("input",()=>p(this,Nn,Yo).call(this)),n(this,ne).addEventListener("click",()=>{u(this,oe,n(this,oe)==="ascending"?"descending":"ascending"),n(this,ne).toggleAttribute("descending"),p(this,Z,zt).call(this)}),n(this,Qe).addEventListener("click",()=>this.toggle()),n(this,Dt).addEventListener("click",t=>{const i=t.target;i instanceof Image&&(b.photoUrl=i.src,b.name=i.dataset.name??"",this.toggle())}),n(this,Qt).addEventListener("click",()=>{n(this,A)!==1&&(cn(this,A)._--,p(this,Z,zt).call(this))}),n(this,Yt).addEventListener("click",()=>{n(this,A)!==n(this,Q)&&(cn(this,A)._++,p(this,Z,zt).call(this))})}disconnectedCallback(){window.removeEventListener("pointerdown",n(this,ie))}}Ge=new WeakMap,G=new WeakMap,ee=new WeakMap,ne=new WeakMap,Qe=new WeakMap,Dt=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,Yt=new WeakMap,Ye=new WeakMap,ie=new WeakMap,oe=new WeakMap,Xt=new WeakMap,A=new WeakMap,Q=new WeakMap,Nn=new WeakSet,Yo=function(){clearTimeout(n(this,Ge)),u(this,Ge,setTimeout(()=>{u(this,A,1),p(this,Z,zt).call(this)},500))},Un=new WeakSet,Xo=function(){if(n(this,Gt).innerHTML="",n(this,Q)===0){n(this,Qt).disabled=!0,n(this,Yt).disabled=!0;return}let t=1;const i=new Set([1,n(this,Q),n(this,A)]),e=Math.min(n(this,Q),5);for(;i.sizea-l);r.forEach((a,l)=>{const c=document.createElement("button");c.innerText=a.toString(),c.classList.add("page-button"),c.addEventListener("click",()=>{u(this,A,a),p(this,Z,zt).call(this)}),n(this,A)===a&&(c.classList.add("page-button--active"),c.toggleAttribute("disabled")),n(this,Gt).appendChild(c);const d=l+1;if(d1){const f=document.createElement("button");f.classList.add("page-button"),f.toggleAttribute("disabled"),f.innerText="...",n(this,Gt).appendChild(f)}}),n(this,Qt).toggleAttribute("disabled",n(this,A)===1),n(this,Yt).toggleAttribute("disabled",n(this,A)===n(this,Q))},Z=new WeakSet,zt=function(){n(this,Dt).innerHTML="";const t=this.ids;if(u(this,Q,Math.ceil(t.length/n(this,Xt))),p(this,Un,Xo).call(this),n(this,Q)===0)return;const i=(n(this,A)-1)*n(this,Xt);(n(this,oe)==="ascending"?t.slice(i,i+n(this,Xt)):t.reverse().slice(i,i+n(this,Xt))).forEach(r=>{const a=parseInt(r);if(isNaN(a))return;const l=Math.floor(a/1e3),c=(Math.floor(a%1e3/100)*100).toString().padStart(3,"0"),d=a.toString().padStart(4,"0")+".png",f=`https://optc-db.github.io/api/images/full/transparent/${l}/${c}/${d}`,g=n(this,G)?n(this,G)[r].join(", ").toUpperCase():"",m=new Image;m.src=f,m.loading="lazy",m.dataset.id=r,m.dataset.name=g,n(this,Dt).appendChild(m)})};customElements.define(Jr,Zr);const hn={posterShadow:5,photoShadow:4,blur:0,brightness:100,contrast:100,hueRotate:0,grayscale:12,saturate:80,sepia:15,name:"PUTLER",bounty:"War Criminal",nameSpacing:0,bountySpacing:1,bountyFontFamily:"Scheherazade New",bountyFontScale:1.35,bountyVerticalOffset:0,photoUrls:["./images/war-criminal/photo-01.png","./images/war-criminal/photo-02.png","./images/war-criminal/photo-03.png"]};function ta(o){var s;(s=window.launchQueue)==null||s.setConsumer(t=>{var i;(i=t.files)!=null&&i.length&&o(t.files)})}function ea(o){return o.kind==="file"}const Ki={setConsumer:ta,isFileHandle:ea},na=":host{display:block;position:relative;transition:background-color .2s;box-sizing:border-box;background-image:url("+new URL("../images/cement-wall.jpg",import.meta.url).href+");background-position:center;background-size:cover;background-blend-mode:multiply;padding:1rem;width:100%;height:100%}:host(.warcriminal){background-image:url("+new URL("../images/cement-wall.jpg",import.meta.url).href+"),url("+new URL("../images/blood-stains-0.png",import.meta.url).href+")}:host(.dragin){background-color:silver}#uploadInput{display:none}.blood-overlay{display:none;position:absolute;top:0;left:0;opacity:.8;mix-blend-mode:multiply;animation-duration:4s;animation-name:fade-in;background-image:url("+new URL("../images/blood-stains-1.png",import.meta.url).href+");background-position:center;background-size:cover;width:100%;height:100%}.blood-overlay--visible{display:block}.loading-overlay{display:flex;position:absolute;top:0;left:0;justify-content:center;align-items:center;background-image:radial-gradient(#e1e4e7,#a5aab0);width:100%;height:100%}.loading-overlay__luffy{filter:drop-shadow(0 3px 3px rgb(0 0 0 / 50%));max-width:50vw;max-height:40vh}.tips-button{position:absolute;top:.8rem;left:.8rem;cursor:pointer;outline:none;border:0;background-color:transparent;padding:0}.tips-button>svg{filter:drop-shadow(0 0 2px rgb(0 0 0 / 50%));transition:.2s}.tips-button>svg:hover{filter:drop-shadow(0 0 3px #c08000) drop-shadow(0 0 5px #fffca3)}.tips-button--hidden{display:none}.optc-button{position:fixed;top:.5rem;right:5rem;filter:drop-shadow(0 0 .125rem rgb(0 0 0));transition:filter .2s;cursor:pointer;outline:none;border:0;background-image:url("+new URL("../images/tavern-button.png",import.meta.url).href+");background-position:center;background-size:contain;background-repeat:no-repeat;background-color:transparent;padding:0;width:2.4rem;height:2.4rem}.optc-button--hidden{display:none}.optc-button:hover{filter:drop-shadow(0 0 .18rem rgba(0 0 0))}.button-container{display:flex;position:absolute;bottom:0;left:0;gap:.5rem;box-sizing:border-box;padding:0 1rem 1rem}.button-container--hidden{display:none}.criminal{position:fixed;right:1rem;bottom:1.2rem;visibility:hidden;opacity:0;transition:visiblity 2s,opacity 2s;cursor:pointer;margin-left:auto;outline:none;border:0;background-color:transparent;padding:0;width:4rem;max-width:15vw;height:4rem;max-height:15vw}.criminal--visible{visibility:visible;opacity:1}.criminal.criminal--visible:after{top:55%;opacity:1}.criminal:before{position:absolute;top:0;left:0;filter:contrast(85%) brightness(0%) drop-shadow(1px 1px .5rem crimson) drop-shadow(-1px -1px .5rem crimson);transition:filter .5s;background-image:url("+new URL("../images/war-criminal/criminal-avatar.png",import.meta.url).href+');background-position:center;background-size:contain;background-repeat:no-repeat;width:100%;height:100%;content:" "}.criminal--stamp:before{filter:contrast(85%) brightness(110%) drop-shadow(1px 1px .1rem rgb(0 0 0 / 50%)) drop-shadow(-1px -1px .1rem rgb(0 0 0 / 50%));background-image:url('+new URL("../images/war-criminal/criminal-stamp.png",import.meta.url).href+"),url("+new URL("../images/war-criminal/criminal-avatar.png",import.meta.url).href+`)}.criminal:after{position:absolute;top:120%;left:53%;transform:translate(-50%,-50%);opacity:0;filter:brightness(100%)!important;transition:1s ease-out;content:"?";color:#fff;font-size:min(7vw,2rem)}.criminal--stamp:after{content:""}@keyframes fade-in{0%{opacity:0}to{opacity:.8}} `,ia=`\r \r
\r @@ -235,5 +235,5 @@ var ts=Object.defineProperty;var es=(o,s,t)=>s in o?ts(o,s,{enumerable:!0,config \r
\r \r -
`,oa="app-container",de="#warcriminal",Vo=document.createElement("template");Vo.innerHTML=ia;var Xe,Ve,Ke,se,tt,Je,Ze,Ct,At,re,ae,tn,en,C,nn,F,_n,Ko,jn,Jo,on,bi,qn,Zo,B,j;class sa extends HTMLElement{constructor(){super();h(this,_n);h(this,jn);h(this,on);h(this,qn);h(this,B);h(this,Xe,void 0);h(this,Ve,void 0);h(this,Ke,void 0);h(this,se,void 0);h(this,tt,void 0);h(this,Je,void 0);h(this,Ze,void 0);h(this,Ct,void 0);h(this,At,void 0);h(this,re,void 0);h(this,ae,void 0);h(this,tn,0);h(this,en,0);h(this,C,void 0);h(this,nn,void 0);h(this,F,void 0);const t=this.attachShadow({mode:"open"});u(this,C,t);const i=document.createElement("style");i.textContent=na,t.append(i,Vo.content.cloneNode(!0)),t.addEventListener("WantedPosterLoaded",()=>{p(this,_n,Ko).call(this)});const e=n(this,C).querySelector("slot[name=poster]");u(this,se,e==null?void 0:e.assignedNodes()[0]),u(this,Xe,n(this,C).querySelector("edit-panel")),u(this,Ve,n(this,C).querySelector("optc-gallery-panel")),u(this,Ke,n(this,C).querySelector("tips-dialog")),u(this,tt,n(this,C).querySelector("#uploadInput")),u(this,Je,n(this,C).querySelector("#editButton")),u(this,Ze,n(this,C).querySelector("#importButton")),u(this,Ct,n(this,C).querySelector("#exportButton")),u(this,At,n(this,C).querySelector("#criminalButton")),u(this,re,n(this,C).querySelector("#tipsButton")),u(this,ae,n(this,C).querySelector("#optcButton")),u(this,nn,p(this,jn,Jo).bind(this)),u(this,F,(r,a)=>{switch(r){case"photoUrl":p(this,B,j).call(this,{"photo-url":a.toString()});break;case"nameSpacing":p(this,B,j).call(this,{"name-spacing":a.toString()});break;case"bountySpacing":p(this,B,j).call(this,{"bounty-spacing":a.toString()});break;case"bountyFontFamily":p(this,B,j).call(this,{"bounty-font-family":a.toString()});break;case"bountyFontScale":p(this,B,j).call(this,{"bounty-font-scale":a.toString()});break;case"bountyFontWeight":p(this,B,j).call(this,{"bounty-font-weight":a.toString()});break;case"bountyVerticalOffset":p(this,B,j).call(this,{"bounty-vertical-offset":a.toString()});break;case"posterShadow":p(this,B,j).call(this,{"poster-shadow":a.toString()});break;case"photoShadow":p(this,B,j).call(this,{"photo-shadow":a.toString()});break;case"name":case"bounty":case"filter":p(this,B,j).call(this,{[r]:a.toString()})}}),window.addEventListener("hashchange",n(this,nn))}connectedCallback(){u(this,en,new Date().getTime()),p(this,B,j).call(this,{name:m.name,bounty:m.bounty.toString(),"name-spacing":m.nameSpacing.toString(),"bounty-spacing":m.bountySpacing.toString(),"poster-shadow":m.posterShadow.toString(),"bounty-font-family":m.bountyFontFamily,"bounty-font-weight":m.bountyFontWeight.toString(),"bounty-vertical-offset":m.bountyVerticalOffset.toString(),filter:m.filter}),x("photoUrl",n(this,F)),x("name",n(this,F)),x("bounty",n(this,F)),x("nameSpacing",n(this,F)),x("bountyFontFamily",n(this,F)),x("bountySpacing",n(this,F)),x("bountyFontScale",n(this,F)),x("bountyFontWeight",n(this,F)),x("bountyVerticalOffset",n(this,F)),x("posterShadow",n(this,F)),x("photoShadow",n(this,F)),x("filter",n(this,F)),location.hash===de&&p(this,on,bi).call(this,!0),this.addEventListener("dragover",t=>{t.preventDefault()}),this.addEventListener("dragenter",()=>{this.classList.add("dragin")}),this.addEventListener("dragleave",t=>{t.relatedTarget===null&&this.classList.remove("dragin")}),this.addEventListener("drop",t=>{var r;t.preventDefault(),this.classList.remove("dragin");const i=(r=t.dataTransfer)==null?void 0:r.files[0];if(!i||!i.type.startsWith("image"))return;const e=URL.createObjectURL(i);m.photoUrl=e}),n(this,tt).addEventListener("input",()=>{const t=n(this,tt).files?n(this,tt).files[0]:null;if(!t||!t.type.startsWith("image"))return;const i=URL.createObjectURL(t);m.photoUrl=i}),n(this,Je).addEventListener("click",()=>{n(this,Xe).toggle()}),n(this,Ze).addEventListener("click",()=>{n(this,tt).value="",n(this,tt).click()}),n(this,Ct).addEventListener("click",async()=>{if(!n(this,Ct).loading){n(this,Ct).loading=!0;try{await n(this,se).export()}catch(t){console.error(t);let i="";t instanceof Error&&(i=t.message),alert(`Oops! something went wrong. 😢 - ${i}`)}finally{n(this,Ct).loading=!1}}}),n(this,At).addEventListener("click",()=>{const t=location.hash===de;location.hash=t?"":de}),n(this,re).addEventListener("click",()=>{n(this,Ke).toggle()}),n(this,ae).addEventListener("click",()=>{n(this,Ve).toggle()}),Ki.setConsumer(async t=>{const i=t[0];if(!Ki.isFileHandle(i))return;const e=await i.getFile(),r=URL.createObjectURL(e);m.photoUrl=r})}}Xe=new WeakMap,Ve=new WeakMap,Ke=new WeakMap,se=new WeakMap,tt=new WeakMap,Je=new WeakMap,Ze=new WeakMap,Ct=new WeakMap,At=new WeakMap,re=new WeakMap,ae=new WeakMap,tn=new WeakMap,en=new WeakMap,C=new WeakMap,nn=new WeakMap,F=new WeakMap,_n=new WeakSet,Ko=function(){const t=n(this,C).querySelector(".loading-overlay"),i=1e3,e=setInterval(()=>{if(!(new Date().getTime()-n(this,en)t.remove(),1e3),location.hash===de){n(this,At).classList.add("criminal--visible");return}setTimeout(()=>n(this,At).classList.add("criminal--visible"),1e4)}},200)},jn=new WeakSet,Jo=function(){p(this,on,bi).call(this,location.hash===de)},on=new WeakSet,bi=function(t){var a;const i=n(this,C).querySelector(".blood-overlay");if(!i)return;const e=t?"https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md":"https://github.com/YuskaWu/one-piece-wanted-poster",r=document.querySelector("github-corner");r.classList.toggle("gc-ua",t),r.setAttribute("href",e),this.classList.toggle("warcriminal"),i.classList.toggle("blood-overlay--visible"),n(this,At).classList.toggle("criminal--stamp"),n(this,re).classList.toggle("tips-button--hidden"),n(this,ae).classList.toggle("optc-button--hidden"),(a=n(this,C).querySelector(".button-container"))==null||a.classList.toggle("button-container--hidden"),t&&Kn({...hn}),p(this,qn,Zo).call(this,t)},qn=new WeakSet,Zo=function(t){if(!t){clearInterval(n(this,tn));return}const i=hn.photoUrls.length;let e=Math.floor(i*Math.random());Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"}),u(this,tn,window.setInterval(()=>{e=(e+1)%i,Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"})},5e3))},B=new WeakSet,j=function(t){const i=Object.keys(t);for(const e of i){const r=t[e]??"";n(this,se).setAttribute(e,r)}};customElements.define(oa,sa); +
`,oa="app-container",de="#warcriminal",Vo=document.createElement("template");Vo.innerHTML=ia;var Xe,Ve,Ke,se,tt,Je,Ze,Ct,At,re,ae,tn,en,C,nn,F,jn,Ko,_n,Jo,on,bi,qn,Zo,O,_;class sa extends HTMLElement{constructor(){super();h(this,jn);h(this,_n);h(this,on);h(this,qn);h(this,O);h(this,Xe,void 0);h(this,Ve,void 0);h(this,Ke,void 0);h(this,se,void 0);h(this,tt,void 0);h(this,Je,void 0);h(this,Ze,void 0);h(this,Ct,void 0);h(this,At,void 0);h(this,re,void 0);h(this,ae,void 0);h(this,tn,0);h(this,en,0);h(this,C,void 0);h(this,nn,void 0);h(this,F,void 0);const t=this.attachShadow({mode:"open"});u(this,C,t);const i=document.createElement("style");i.textContent=na,t.append(i,Vo.content.cloneNode(!0)),t.addEventListener("WantedPosterLoaded",()=>{p(this,jn,Ko).call(this)});const e=n(this,C).querySelector("slot[name=poster]");u(this,se,e==null?void 0:e.assignedNodes()[0]),u(this,Xe,n(this,C).querySelector("edit-panel")),u(this,Ve,n(this,C).querySelector("optc-gallery-panel")),u(this,Ke,n(this,C).querySelector("tips-dialog")),u(this,tt,n(this,C).querySelector("#uploadInput")),u(this,Je,n(this,C).querySelector("#editButton")),u(this,Ze,n(this,C).querySelector("#importButton")),u(this,Ct,n(this,C).querySelector("#exportButton")),u(this,At,n(this,C).querySelector("#criminalButton")),u(this,re,n(this,C).querySelector("#tipsButton")),u(this,ae,n(this,C).querySelector("#optcButton")),u(this,nn,p(this,_n,Jo).bind(this)),u(this,F,(r,a)=>{switch(r){case"photoUrl":p(this,O,_).call(this,{"photo-url":a.toString()});break;case"nameSpacing":p(this,O,_).call(this,{"name-spacing":a.toString()});break;case"bountySpacing":p(this,O,_).call(this,{"bounty-spacing":a.toString()});break;case"bountyFontFamily":p(this,O,_).call(this,{"bounty-font-family":a.toString()});break;case"bountyFontScale":p(this,O,_).call(this,{"bounty-font-scale":a.toString()});break;case"bountyFontWeight":p(this,O,_).call(this,{"bounty-font-weight":a.toString()});break;case"bountyVerticalOffset":p(this,O,_).call(this,{"bounty-vertical-offset":a.toString()});break;case"posterShadow":p(this,O,_).call(this,{"poster-shadow":a.toString()});break;case"photoShadow":p(this,O,_).call(this,{"photo-shadow":a.toString()});break;case"name":case"bounty":case"filter":p(this,O,_).call(this,{[r]:a.toString()})}}),window.addEventListener("hashchange",n(this,nn))}connectedCallback(){u(this,en,new Date().getTime()),p(this,O,_).call(this,{name:b.name,bounty:b.bounty.toString(),"name-spacing":b.nameSpacing.toString(),"bounty-spacing":b.bountySpacing.toString(),"poster-shadow":b.posterShadow.toString(),"bounty-font-family":b.bountyFontFamily,"bounty-font-weight":b.bountyFontWeight.toString(),"bounty-vertical-offset":b.bountyVerticalOffset.toString(),filter:b.filter}),y("photoUrl",n(this,F)),y("name",n(this,F)),y("bounty",n(this,F)),y("nameSpacing",n(this,F)),y("bountyFontFamily",n(this,F)),y("bountySpacing",n(this,F)),y("bountyFontScale",n(this,F)),y("bountyFontWeight",n(this,F)),y("bountyVerticalOffset",n(this,F)),y("posterShadow",n(this,F)),y("photoShadow",n(this,F)),y("filter",n(this,F)),location.hash===de&&p(this,on,bi).call(this,!0),this.addEventListener("dragover",t=>{t.preventDefault()}),this.addEventListener("dragenter",()=>{this.classList.add("dragin")}),this.addEventListener("dragleave",t=>{t.relatedTarget===null&&this.classList.remove("dragin")}),this.addEventListener("drop",t=>{var r;t.preventDefault(),this.classList.remove("dragin");const i=(r=t.dataTransfer)==null?void 0:r.files[0];if(!i||!i.type.startsWith("image"))return;const e=URL.createObjectURL(i);b.photoUrl=e}),n(this,tt).addEventListener("input",()=>{const t=n(this,tt).files?n(this,tt).files[0]:null;if(!t||!t.type.startsWith("image"))return;const i=URL.createObjectURL(t);b.photoUrl=i}),n(this,Je).addEventListener("click",()=>{n(this,Xe).toggle()}),n(this,Ze).addEventListener("click",()=>{n(this,tt).value="",n(this,tt).click()}),n(this,Ct).addEventListener("click",async()=>{if(!n(this,Ct).loading){n(this,Ct).loading=!0;try{await n(this,se).export()}catch(t){console.error(t);let i="";t instanceof Error&&(i=t.message),alert(`Oops! something went wrong. 😢 + ${i}`)}finally{n(this,Ct).loading=!1}}}),n(this,At).addEventListener("click",()=>{const t=location.hash===de;location.hash=t?"":de}),n(this,re).addEventListener("click",()=>{n(this,Ke).toggle()}),n(this,ae).addEventListener("click",()=>{n(this,Ve).toggle()}),Ki.setConsumer(async t=>{const i=t[0];if(!Ki.isFileHandle(i))return;const e=await i.getFile(),r=URL.createObjectURL(e);b.photoUrl=r})}}Xe=new WeakMap,Ve=new WeakMap,Ke=new WeakMap,se=new WeakMap,tt=new WeakMap,Je=new WeakMap,Ze=new WeakMap,Ct=new WeakMap,At=new WeakMap,re=new WeakMap,ae=new WeakMap,tn=new WeakMap,en=new WeakMap,C=new WeakMap,nn=new WeakMap,F=new WeakMap,jn=new WeakSet,Ko=function(){const t=n(this,C).querySelector(".loading-overlay"),i=1e3,e=setInterval(()=>{if(!(new Date().getTime()-n(this,en)t.remove(),1e3),location.hash===de){n(this,At).classList.add("criminal--visible");return}setTimeout(()=>n(this,At).classList.add("criminal--visible"),1e4)}},200)},_n=new WeakSet,Jo=function(){p(this,on,bi).call(this,location.hash===de)},on=new WeakSet,bi=function(t){var a;const i=n(this,C).querySelector(".blood-overlay");if(!i)return;const e=t?"https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md":"https://github.com/YuskaWu/one-piece-wanted-poster",r=document.querySelector("github-corner");r.classList.toggle("gc-ua",t),r.setAttribute("href",e),this.classList.toggle("warcriminal"),i.classList.toggle("blood-overlay--visible"),n(this,At).classList.toggle("criminal--stamp"),n(this,re).classList.toggle("tips-button--hidden"),n(this,ae).classList.toggle("optc-button--hidden"),(a=n(this,C).querySelector(".button-container"))==null||a.classList.toggle("button-container--hidden"),t&&Kn({...hn}),p(this,qn,Zo).call(this,t)},qn=new WeakSet,Zo=function(t){if(!t){clearInterval(n(this,tn));return}const i=hn.photoUrls.length;let e=Math.floor(i*Math.random());Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"}),u(this,tn,window.setInterval(()=>{e=(e+1)%i,Kn({photoUrl:hn.photoUrls[e]+"#nohighlight"})},5e3))},O=new WeakSet,_=function(t){const i=Object.keys(t);for(const e of i){const r=t[e]??"";n(this,se).setAttribute(e,r)}};customElements.define(oa,sa); diff --git a/dist/images/pwa/screenshot-narrow.jpg b/dist/images/pwa/screenshot-narrow.jpg new file mode 100644 index 0000000..8ed6314 Binary files /dev/null and b/dist/images/pwa/screenshot-narrow.jpg differ diff --git a/dist/images/pwa/screenshot-wide.jpg b/dist/images/pwa/screenshot-wide.jpg new file mode 100644 index 0000000..950a720 Binary files /dev/null and b/dist/images/pwa/screenshot-wide.jpg differ diff --git a/dist/index.html b/dist/index.html index d3ddf0e..ea7dc68 100644 --- a/dist/index.html +++ b/dist/index.html @@ -97,7 +97,7 @@ - + diff --git a/dist/manifest.webmanifest b/dist/manifest.webmanifest index 927f1c0..2590803 100644 --- a/dist/manifest.webmanifest +++ b/dist/manifest.webmanifest @@ -1 +1 @@ -{"name":"One Piece Wanted Poster Maker","short_name":"One Piece Wanted Poster Maker","start_url":"./","display":"standalone","background_color":"#584034","lang":"en","scope":"./","id":"one-piece-wanted-poster-maker","description":"Free online web application for creating One Piece wanted poster.","theme_color":"#584034","icons":[{"src":"./images/pwa/icon-maskable.png","sizes":"512x512","type":"image/png","purpose":"maskable"},{"src":"./images/pwa/icon-72x72.png","sizes":"72x72","type":"image/png"},{"src":"./images/pwa/icon-96x96.png","sizes":"96x96","type":"image/png"},{"src":"./images/pwa/icon-128x128.png","sizes":"128x128","type":"image/png"},{"src":"./images/pwa/icon-144x144.png","sizes":"144x144","type":"image/png"},{"src":"./images/pwa/icon-152x152.png","sizes":"152x152","type":"image/png"},{"src":"./images/pwa/icon-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./images/pwa/icon-384x384.png","sizes":"384x384","type":"image/png"},{"src":"./images/pwa/icon-512x512.png","sizes":"512x512","type":"image/png"}],"file_handlers":[{"action":"./","accept":{"image/*":[".png",".jpg",".jpeg",".jfif",".pjpeg",".pjp",".apng",".avif",".gif",".webp",".bmp",".tif",".tiff"]},"icons":[{"src":"./images/pwa/icon-128x128.png","sizes":"128x128","type":"image/png"}],"launch_type":"single-client"}]} +{"name":"One Piece Wanted Poster Maker","short_name":"One Piece Wanted Poster Maker","start_url":"./","display":"standalone","background_color":"#584034","lang":"en","scope":"./","id":"one-piece-wanted-poster-maker","description":"Free online web application for creating One Piece wanted poster.","theme_color":"#584034","launch_handler":{"client_mode":"navigate-existing"},"screenshots":[{"src":"./images/pwa/screenshot-narrow.jpg","type":"image/jpg","sizes":"1080x2163","form_factor":"narrow"},{"src":"./images/pwa/screenshot-wide.jpg","type":"image/jpg","sizes":"2561x1217","form_factor":"wide"}],"icons":[{"src":"./images/pwa/icon-maskable.png","sizes":"512x512","type":"image/png","purpose":"maskable"},{"src":"./images/pwa/icon-72x72.png","sizes":"72x72","type":"image/png"},{"src":"./images/pwa/icon-96x96.png","sizes":"96x96","type":"image/png"},{"src":"./images/pwa/icon-128x128.png","sizes":"128x128","type":"image/png"},{"src":"./images/pwa/icon-144x144.png","sizes":"144x144","type":"image/png"},{"src":"./images/pwa/icon-152x152.png","sizes":"152x152","type":"image/png"},{"src":"./images/pwa/icon-192x192.png","sizes":"192x192","type":"image/png"},{"src":"./images/pwa/icon-384x384.png","sizes":"384x384","type":"image/png"},{"src":"./images/pwa/icon-512x512.png","sizes":"512x512","type":"image/png"}],"file_handlers":[{"action":"./","accept":{"image/*":[".png",".jpg",".jpeg",".jfif",".pjpeg",".pjp",".apng",".avif",".gif",".webp",".bmp",".tif",".tiff"]},"icons":[{"src":"./images/pwa/icon-128x128.png","sizes":"128x128","type":"image/png"}],"launch_type":"single-client"}]} diff --git a/dist/service-worker.js b/dist/service-worker.js index 73346e4..a850e52 100644 --- a/dist/service-worker.js +++ b/dist/service-worker.js @@ -1445,7 +1445,7 @@ function Pe(s = {}) { function Ue(s) { E().setDefaultHandler(s); } -const Le = [{"revision":null,"url":"assets/index-4c91dc97.css"},{"revision":null,"url":"assets/index-db887e1a.js"},{"revision":null,"url":"assets/workbox-window.prod.es5-a7b12eab.js"},{"revision":"48858b3bd4418e7ac1e67c5a52042fd2","url":"index.html"},{"revision":"b5a23c5265868c4408a6c00464006bd9","url":"offline.html"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-maskable.png"},{"revision":"786eaaba55a6b62ecaf32cde1bf26873","url":"./images/pwa/icon-72x72.png"},{"revision":"a5437727776908ffc3d7936b1b28161a","url":"./images/pwa/icon-96x96.png"},{"revision":"abb293e81af9411c28587b747a3e76aa","url":"./images/pwa/icon-128x128.png"},{"revision":"9024e4ee398281b05e092bffd80c9642","url":"./images/pwa/icon-144x144.png"},{"revision":"a67f953bad219821ed6ef2eef8df5ca1","url":"./images/pwa/icon-152x152.png"},{"revision":"18d9668e052ec0ccdb5c53ebf6c30f9a","url":"./images/pwa/icon-192x192.png"},{"revision":"48527e6afb57c06834b4c9ca575f9180","url":"./images/pwa/icon-384x384.png"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-512x512.png"},{"revision":"175d5fa5ef671edc853124d191c560d6","url":"manifest.webmanifest"}]; +const Le = [{"revision":null,"url":"assets/index-30a95f3f.js"},{"revision":null,"url":"assets/index-4c91dc97.css"},{"revision":null,"url":"assets/workbox-window.prod.es5-a7b12eab.js"},{"revision":"a5bccecb2953d89821e8c46f623d86af","url":"index.html"},{"revision":"b5a23c5265868c4408a6c00464006bd9","url":"offline.html"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-maskable.png"},{"revision":"786eaaba55a6b62ecaf32cde1bf26873","url":"./images/pwa/icon-72x72.png"},{"revision":"a5437727776908ffc3d7936b1b28161a","url":"./images/pwa/icon-96x96.png"},{"revision":"abb293e81af9411c28587b747a3e76aa","url":"./images/pwa/icon-128x128.png"},{"revision":"9024e4ee398281b05e092bffd80c9642","url":"./images/pwa/icon-144x144.png"},{"revision":"a67f953bad219821ed6ef2eef8df5ca1","url":"./images/pwa/icon-152x152.png"},{"revision":"18d9668e052ec0ccdb5c53ebf6c30f9a","url":"./images/pwa/icon-192x192.png"},{"revision":"48527e6afb57c06834b4c9ca575f9180","url":"./images/pwa/icon-384x384.png"},{"revision":"d714963bdcfbf8146489804fa260be01","url":"./images/pwa/icon-512x512.png"},{"revision":"282be12ad648c51d4d4bab4363491ea5","url":"manifest.webmanifest"}]; console.log(Le); Ue(new ne()); z(({ url: s }) => s.host === "optc-db.github.io", new pe());