mirror of
https://github.com/SoPat712/dotfiles.git
synced 2026-02-10 00:45:09 -05:00
vuetorrent 2.8.0
This commit is contained in:
@@ -1 +1 @@
|
|||||||
import{u as f,__tla as __tla_0}from"./index-bUuJUL5l.js";import{c as d,E as t}from"./vue-BSryv7ps.js";let h;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{h=function(e,a,o=1){const{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l}=f({total:()=>t(e).length,page:o,pageSize:()=>t(a)===-1?t(e).length:t(a)}),p=d(()=>{const s=(n.value-1)*t(a),P=s+r.value;return t(e).slice(s,P)});return{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l,paginatedResults:p}}});export{h as u,__tla};
|
import{u as f,__tla as __tla_0}from"./index-CfNDsQKB.js";import{c as d,E as t}from"./vue--7UcA1iU.js";let h;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{h=function(e,a,o=1){const{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l}=f({total:()=>t(e).length,page:o,pageSize:()=>t(a)===-1?t(e).length:t(a)}),p=d(()=>{const s=(n.value-1)*t(a),P=s+r.value;return t(e).slice(s,P)});return{currentPage:n,currentPageSize:r,pageCount:u,isFirstPage:c,isLastPage:i,next:g,prev:l,paginatedResults:p}}});export{h as u,__tla};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{a as le,b as ae,V as te,c as oe,q as se,r as ne,i as G,d as de,e as re,s as ue,t as V,v as q,H as O,w as ce,k as m,x as ie,y as fe,z as pe,A as P,B as U,j as ge,C as me,__tla as __tla_0}from"./index-CfNDsQKB.js";import{g as ye}from"./FileIcon-DH65fwz5.js";import{g as he,G as ve,d as g,c as X,r as ke,w as Ve,x as _e,I as r,J as c,K as o,m as s,L as i,M as u,u as d,V as w,W as _,F as J,O as y,X as x,Y as be,Q as Fe,U as D,Z as Ne,_ as Ce}from"./vue--7UcA1iU.js";import{u as Re}from"./vuetify-GhifFkZ7.js";let Ke;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let we,xe,Ee,$e,Te,Ie;we=v=>(Ne("data-v-5c316654"),v=v(),Ce(),v);xe=we(()=>x("br",null,null,-1));Ee=["onClick"];$e={class:"d-inline-flex flex-column"};Te={key:1};Ie=he({__name:"BulkRenameFilesDialog",props:{guid:{},node:{},hash:{}},setup(v){const k=v,{isOpened:b}=le(k.guid),{t:h}=ve(),S=ae(),f=Re().mobile,K=g(),F=g(!1),E=g(!1),N=g(""),L=g(),C=g([]),R=g(""),M=g(),$=g(!1),A=[l=>!!l],Q=X(()=>{const l=[{fixed:!0,sortable:!1,key:"selected",width:"50px"},{sortable:!1,key:"name"}];return f.value||l.push({sortable:!1,key:"targetName"}),l}),p=ke([]),T=X(()=>p.filter(l=>l.type==="file"&&l.selected&&l.targetName&&l.name!==l.targetName)),H=(l,a=void 0,t=0)=>{const e={indent:t,name:l.name,fullName:l.fullName,parentItem:a,show:!0,folded:!1,selected:!1,type:l.type,node:l};if(p.push(e),l.type==="folder")for(const n of l.children)H(n,e,t+1)},j=(l,a)=>{l.folded=a,l.node.children.forEach(t=>{const e=p.find(n=>n.node.id===t.id);e.show=!a,e.type==="folder"&&a&&j(e,a)})},I=l=>{const a=p.find(t=>t.node.id===l.id);if(l.type==="folder"){let t=0,e=0;return l.children.forEach(n=>{switch(I(n)){case 1:t++;break;case 0:e++;break}}),t===0&&e===0?(a.selected=!1,a.indeterminate=!1,-1):t===l.children.length?(a.selected=!0,a.indeterminate=!1,1):(a.indeterminate=!0,0)}else return a.indeterminate=!1,a.selected?1:-1},W=l=>{const a=t=>{t.node.children.forEach(e=>{const n=p.find(ee=>ee.node.id===e.id);n&&(n.selected=t.selected,n.selected&&(n.show=!0,n.folded=!1),n.type==="folder"&&a(n))}),t.selected&&(t.show=!0,t.folded=!1)};a(l),I(k.node),B()},Y=l=>{I(k.node),B([l])},B=async l=>{if(await K.value?.validate(),!F.value)return;let a;try{a=new RegExp(N.value,C.value.join(""))}catch{return}(l||p).forEach(e=>{e.type==="file"&&(e.selected&&a.test(e.name)?(e.targetName=e.name.replace(a,R.value),e.targetFullName=(e.parentItem.fullName===""?"":e.parentItem.fullName+"/")+e.targetName):(e.targetName=void 0,e.targetFullName=void 0),e.notChanged=e.name===e.targetName)}),E.value=!1;const t=new Map;p.filter(e=>!!e.targetFullName).forEach(e=>{t.set(e.targetFullName,(t.get(e.targetFullName)||0)+1)}),p.forEach(e=>{e.duplicated=t.get(e.targetFullName)>1,e.duplicated&&(E.value=!0)})},Z=async()=>{if(!T.value.length)return D.warn(h("dialogs.bulkRenameFiles.nothing_to_do"));const l=[];for(const a of T.value)l.push(S.renameTorrentFile(k.hash,a.fullName,a.targetFullName));$.value=!0,Promise.all(l).then(()=>{D.success(h("dialogs.bulkRenameFiles.success")),L.value?.saveValueToHistory(),M.value?.saveValueToHistory()}).catch(a=>{D.error(a.toString())}).finally(()=>{$.value=!1,S.updateFileTree(),z()})},z=()=>{b.value=!1};return Ve([N,C,R],()=>{B()}),_e(()=>{H(k.node)}),(l,a)=>(r(),c(ge,{modelValue:d(b),"onUpdate:modelValue":a[6]||(a[6]=t=>Fe(b)?b.value=t:null),persistent:""},{default:o(()=>[s(te,{density:"compact"},{default:o(()=>[s(oe,null,{default:o(()=>[s(se,{density:"compact",color:"transparent"},{default:o(()=>[s(ne,null,{default:o(()=>[i(u(l.$t("dialogs.bulkRenameFiles.title")),1)]),_:1}),s(G,{icon:"mdi-close",onClick:a[0]||(a[0]=t=>z())})]),_:1})]),_:1}),s(de,{class:"d-flex flex-column"},{default:o(()=>[s(d(re),{modelValue:F.value,"onUpdate:modelValue":a[5]||(a[5]=t=>F.value=t),ref_key:"form",ref:K},{default:o(()=>[s(ue,{"no-gutters":"",align:"center",justify:"center"},{default:o(()=>[s(V,{cols:d(f)?9:void 0},{default:o(()=>[s(q,{historyKey:d(O).BULK_RENAME_REGEXP,ref_key:"regexpEl",ref:L,"hide-details":"",density:"compact",modelValue:N.value,"onUpdate:modelValue":a[1]||(a[1]=t=>N.value=t),rules:A,label:l.$t("dialogs.bulkRenameFiles.regexp")},null,8,["historyKey","modelValue","label"])]),_:1},8,["cols"]),s(V,{cols:d(f)?3:"auto"},{default:o(()=>[s(ce,{class:"ml-2",modelValue:C.value,"onUpdate:modelValue":a[2]||(a[2]=t=>C.value=t),items:["d","g","i","m","s","u","v","y"],placeholder:d(h)("dialogs.bulkRenameFiles.select_regex_flags"),label:"Flags",density:"compact",multiple:"","hide-details":""},null,8,["modelValue","placeholder"])]),_:1},8,["cols"]),s(V,{cols:"auto"},{default:o(()=>[s(m,{class:"mx-2",icon:`mdi-arrow-${d(f)?"down":"right"}`},null,8,["icon"])]),_:1}),s(V,{cols:d(f)?12:void 0},{default:o(()=>[s(q,{historyKey:d(O).BULK_RENAME_TARGET,ref_key:"targetEl",ref:M,"hide-details":"",density:"compact",modelValue:R.value,"onUpdate:modelValue":a[3]||(a[3]=t=>R.value=t),rules:A,label:l.$t("dialogs.bulkRenameFiles.target")},null,8,["historyKey","modelValue","label"])]),_:1},8,["cols"]),s(V,{cols:"auto"},{default:o(()=>[s(ie,{class:w(d(f)?"mt-2":"ml-5"),color:"success",location:"top left",content:T.value.length},{default:o(()=>[s(G,{loading:$.value,disabled:!F.value||E.value,color:"primary",onClick:a[4]||(a[4]=t=>Z())},{default:o(()=>[i(u(l.$t("dialogs.bulkRenameFiles.run")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["class","content"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),s(fe,{headers:Q.value,items:p,density:"compact","fixed-header":""},{"header.name":o(()=>[i(u(l.$t("dialogs.bulkRenameFiles.col_origin_name"))+" ",1),d(f)?(r(),_(J,{key:0},[xe,i(" "+u(l.$t("dialogs.bulkRenameFiles.col_result_name")),1)],64)):y("",!0)]),"header.targetName":o(()=>[d(f)?y("",!0):(r(),_(J,{key:0},[i(u(l.$t("dialogs.bulkRenameFiles.col_result_name")),1)],64))]),item:o(({index:t,item:e})=>[e.show?(r(),c(pe,{key:0,index:t,item:e},{"item.selected":o(()=>[e.type==="file"?(r(),c(P,{key:0,modelValue:e.selected,"onUpdate:modelValue":n=>e.selected=n,color:e.targetName&&"indigo",onChange:n=>Y(e)},null,8,["modelValue","onUpdate:modelValue","color","onChange"])):(r(),c(P,{key:1,modelValue:e.selected,"onUpdate:modelValue":n=>e.selected=n,indeterminate:e.indeterminate,onChange:n=>W(e)},null,8,["modelValue","onUpdate:modelValue","indeterminate","onChange"]))]),"item.name":o(()=>[x("span",{class:w(["fold-toggle",{clickable:e.type==="folder"}]),style:be({"padding-left":`${e.indent*20}px`}),onClick:n=>e.type==="folder"&&j(e,!e.folded)},[e.type==="folder"?(r(),c(U,{key:0,location:"top",activator:"parent"},{default:o(()=>[i(u(d(h)(`dialogs.bulkRenameFiles.${e.folded?"unfold":"fold"}`)),1)]),_:2},1024)):y("",!0),e.type==="folder"?(r(),c(m,{key:1},{default:o(()=>[i(u(e.folded?"mdi-chevron-down":"mdi-chevron-up"),1)]),_:2},1024)):y("",!0),e.fullName===""?(r(),c(m,{key:2,icon:"mdi-file-tree"})):e.type==="file"?(r(),c(m,{key:3,icon:d(ye)(e.name)},null,8,["icon"])):e.folded?(r(),c(m,{key:5,icon:"mdi-folder",color:"#ffe476"})):(r(),c(m,{key:4,icon:"mdi-folder-open",color:"#ffe476"})),x("div",$e,[x("span",null,u(e.name),1),d(f)?(r(),_("span",{key:0,class:w(["target-name",{duplicated:e.duplicated,"not-changed":e.notChanged}])},u(e.targetName),3)):y("",!0)])],14,Ee)]),"item.targetName":o(()=>[e.type==="file"?(r(),_("span",{key:0,class:w(["target-name",{duplicated:e.duplicated,"not-changed":e.notChanged}])},[i(u(e.targetName)+" ",1),e.duplicated||e.notChanged?(r(),c(U,{key:0,activator:"parent"},{default:o(()=>[i(u(d(h)(`dialogs.bulkRenameFiles.${e.duplicated?"duplicated":"not_changed"}`)),1)]),_:2},1024)):y("",!0)],2)):(r(),_("span",Te,[s(m,{icon:"mdi-cancel",color:"grey-lighten-1"}),s(U,{activator:"parent"},{default:o(()=>[i(u(d(h)("dialogs.bulkRenameFiles.notForFolder")),1)]),_:1})]))]),_:2},1032,["index","item"])):y("",!0)]),bottom:o(()=>[]),_:1},8,["headers","items"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});Ke=me(Ie,[["__scopeId","data-v-5c316654"]])});export{Ke as default,__tla};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.v-card-text[data-v-5c316654]{height:calc(100vh - 115px)}.v-table[data-v-5c316654]{overflow:auto}.target-name.duplicated[data-v-5c316654]{color:red}.target-name.not-changed[data-v-5c316654]{color:#ff9595}.fold-toggle.clickable[data-v-5c316654]{cursor:pointer}.fold-toggle[data-v-5c316654],.target-name[data-v-5c316654]{word-break:keep-all;white-space:pre}
|
||||||
@@ -1 +1 @@
|
|||||||
import{D as c,n,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";let C;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{class l{constructor(a){this._canvasPool=Object.create(null),this.canvasOptions=a||{},this.enableFullScreen=!1}_createCanvasAndContext(a,t){const s=c.get().createCanvas();s.width=a,s.height=t;const e=s.getContext("2d");return{canvas:s,context:e}}getOptimalCanvasAndContext(a,t,s=1){a=Math.ceil(a*s-1e-6),t=Math.ceil(t*s-1e-6),a=n(a),t=n(t);const e=(a<<17)+(t<<1);this._canvasPool[e]||(this._canvasPool[e]=[]);let o=this._canvasPool[e].pop();return o||(o=this._createCanvasAndContext(a,t)),o}returnCanvasAndContext(a){const{width:t,height:s}=a.canvas,e=(t<<17)+(s<<1);this._canvasPool[e].push(a)}clear(){this._canvasPool={}}}C=new l});export{C,__tla};
|
import{D as c,n,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";let C;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{class l{constructor(a){this._canvasPool=Object.create(null),this.canvasOptions=a||{},this.enableFullScreen=!1}_createCanvasAndContext(a,t){const s=c.get().createCanvas();s.width=a,s.height=t;const e=s.getContext("2d");return{canvas:s,context:e}}getOptimalCanvasAndContext(a,t,s=1){a=Math.ceil(a*s-1e-6),t=Math.ceil(t*s-1e-6),a=n(a),t=n(t);const e=(a<<17)+(t<<1);this._canvasPool[e]||(this._canvasPool[e]=[]);let o=this._canvasPool[e].pop();return o||(o=this._createCanvasAndContext(a,t)),o}returnCanvasAndContext(a){const{width:t,height:s}=a.canvas,e=(t<<17)+(s<<1);this._canvasPool[e].push(a)}clear(){this._canvasPool={}}}C=new l});export{C,__tla};
|
||||||
File diff suppressed because one or more lines are too long
1
qbit/vuetorrent/public/assets/Dashboard-a3EICMmK.js
Normal file
1
qbit/vuetorrent/public/assets/Dashboard-a3EICMmK.js
Normal file
File diff suppressed because one or more lines are too long
1
qbit/vuetorrent/public/assets/FileIcon-DH65fwz5.js
Normal file
1
qbit/vuetorrent/public/assets/FileIcon-DH65fwz5.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
const e={pdf:"mdi-file-pdf-box",png:"mdi-file-image",jpg:"mdi-file-image",jpeg:"mdi-file-image",tiff:"mdi-file-image",doc:"mdi-file-document",docx:"mdi-file-document",txt:"mdi-file-document",nfo:"mdi-information-variant-box",mp3:"mdi-music",wav:"mdi-music",flac:"mdi-music",avi:"mdi-movie",mp4:"mdi-movie",mkv:"mdi-movie",mov:"mdi-movie",wmv:"mdi-movie",srt:"mdi-subtitles",idx:"mdi-subtitles",sub:"mdi-subtitles",rar:"mdi-zip-box-outline",zip:"mdi-zip-box-outline",gz:"mdi-zip-box-outline","7z":"mdi-zip-box-outline",iso:"mdi-zip-box-outline",exe:"mdi-application-brackets",msi:"mdi-application-brackets",dmg:"mdi-application-brackets",deb:"mdi-application-brackets",jar:"mdi-application-brackets"};function d(i){const m=i.split(".").pop()?.toLowerCase()||"";return e[m]||"mdi-file"}export{d as g};
|
||||||
@@ -1 +1 @@
|
|||||||
import{g as v,G as b,r as h,d as C,x as q,a as x,I as k,J as S,K as s,T as K,S as T,m as e,L as m,M as p,u as l,N as f,P as _,U as y}from"./vue-BSryv7ps.js";import{_ as A,__tla as __tla_0}from"./PasswordField.vue_vue_type_script_setup_true_lang-CqQQlY6F.js";import{n as U,o as B,c as F,p as I,d as M,e as N,f as L,k as O,g as R,i as D,V as E,__tla as __tla_1}from"./index-bUuJUL5l.js";import"./vuetify-i5Qjiq6M.js";let z;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{z=v({__name:"Login",setup(G){const{t:a}=b(),w=K(),o=T(),u=U(),r=h({username:"",password:""}),c=C(!1),V={username:[d=>!!d||a("login.rules.username_required")],password:[d=>!!d||a("login.rules.password_required")]},i=async()=>{c.value&&(await u.login(r.username,r.password),u.isAuthenticated?(y.success(a("login.success")),g()):y.error(a("login.error")))},g=()=>{o.query.redirect?w.push(o.query.redirect):w.push({name:"dashboard"})};return q(async()=>{o.query.username&&o.query.password&&await u.login(o.query.username,o.query.password)}),x(()=>{u.isAuthenticated&&g()}),(d,n)=>(k(),S(B,{class:"fill-height"},{default:s(()=>[e(E,{class:"mx-auto",rounded:"lg","min-width":"250"},{default:s(()=>[e(F,null,{default:s(()=>[m(p(l(a)("login.title")),1)]),_:1}),e(I,null,{default:s(()=>[m(p(l(a)("login.subtitle")),1)]),_:1}),e(M,null,{default:s(()=>[e(N,{modelValue:c.value,"onUpdate:modelValue":n[2]||(n[2]=t=>c.value=t),onSubmit:f(i,["prevent"])},{default:s(()=>[e(L,{modelValue:r.username,"onUpdate:modelValue":n[0]||(n[0]=t=>r.username=t),id:"username",name:"username",label:l(a)("login.username"),autofocus:"",rules:V.username,onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},{prepend:s(()=>[e(O,{color:"accent",icon:"mdi-account"})]),_:1},8,["modelValue","label","rules","onKeydown"]),e(A,{modelValue:r.password,"onUpdate:modelValue":n[1]||(n[1]=t=>r.password=t),id:"password",label:l(a)("login.password"),rules:V.password,"prepend-icon":"mdi-lock",onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},null,8,["modelValue","label","rules","onKeydown"])]),_:1},8,["modelValue"])]),_:1}),e(R,null,{default:s(()=>[e(D,{variant:"elevated",block:"",color:"accent",onClick:i},{default:s(()=>[m(p(l(a)("login.submit")),1)]),_:1})]),_:1})]),_:1})]),_:1}))}})});export{z as default,__tla};
|
import{g as v,G as b,r as h,d as C,x as q,a as x,I as k,J as S,K as s,T as K,S as T,m as e,L as m,M as p,u as l,N as f,P as _,U as y}from"./vue--7UcA1iU.js";import{_ as A,__tla as __tla_0}from"./PasswordField.vue_vue_type_script_setup_true_lang-C1VS1hko.js";import{n as U,o as B,c as F,p as I,d as M,e as N,f as L,k as O,g as R,i as D,V as E,__tla as __tla_1}from"./index-CfNDsQKB.js";import"./vuetify-GhifFkZ7.js";let z;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{z=v({__name:"Login",setup(G){const{t:a}=b(),w=K(),o=T(),u=U(),r=h({username:"",password:""}),c=C(!1),V={username:[d=>!!d||a("login.rules.username_required")],password:[d=>!!d||a("login.rules.password_required")]},i=async()=>{c.value&&(await u.login(r.username,r.password),u.isAuthenticated?(y.success(a("login.success")),g()):y.error(a("login.error")))},g=()=>{o.query.redirect?w.push(o.query.redirect):w.push({name:"dashboard"})};return q(async()=>{o.query.username&&o.query.password&&await u.login(o.query.username,o.query.password)}),x(()=>{u.isAuthenticated&&g()}),(d,n)=>(k(),S(B,{class:"fill-height"},{default:s(()=>[e(E,{class:"mx-auto",rounded:"lg","min-width":"250"},{default:s(()=>[e(F,null,{default:s(()=>[m(p(l(a)("login.title")),1)]),_:1}),e(I,null,{default:s(()=>[m(p(l(a)("login.subtitle")),1)]),_:1}),e(M,null,{default:s(()=>[e(N,{modelValue:c.value,"onUpdate:modelValue":n[2]||(n[2]=t=>c.value=t),onSubmit:f(i,["prevent"])},{default:s(()=>[e(L,{modelValue:r.username,"onUpdate:modelValue":n[0]||(n[0]=t=>r.username=t),id:"username",name:"username",label:l(a)("login.username"),autofocus:"",rules:V.username,onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},{prepend:s(()=>[e(O,{color:"accent",icon:"mdi-account"})]),_:1},8,["modelValue","label","rules","onKeydown"]),e(A,{modelValue:r.password,"onUpdate:modelValue":n[1]||(n[1]=t=>r.password=t),id:"password",label:l(a)("login.password"),rules:V.password,"prepend-icon":"mdi-lock",onKeydown:_(f(i,["prevent"]),["enter"]),variant:"outlined"},null,8,["modelValue","label","rules","onKeydown"])]),_:1},8,["modelValue"])]),_:1}),e(R,null,{default:s(()=>[e(D,{variant:"elevated",block:"",color:"accent",onClick:i},{default:s(()=>[m(p(l(a)("login.submit")),1)]),_:1})]),_:1})]),_:1})]),_:1}))}})});export{z as default,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{u as z,__tla as __tla_0}from"./ArrayPagination-DuWOkPss.js";import{q as D,r as H,L as l,s as K,t as Q,v as R,w as J,x as f,i as X,y as m,z as Y,A as Z,B as c,f as ee,C as S,D as te,E as le,F as ae,h as se,G as oe,H as ne,I as ue,__tla as __tla_1}from"./index-bUuJUL5l.js";import{g as re,G as ie,d as T,c as g,H as de,V as me,I as r,W as C,m as e,K as a,T as ce,X as v,M as i,u as o,J as y,Q as w,O as V,F,Y as pe,Z as fe,L as b}from"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";let xe;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{let ge,ve,ye,Ve,_e,Le;ge={class:"pa-3"};ve={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"};ye={class:"d-flex justify-end"};Ve={class:"d-flex mr-8 overflow-hidden"};_e={class:"d-flex"};Le=re({__name:"Logs",setup(he){const B=ce(),{t:E}=ie(),_=D(),O=H(),L=T([{title:l[l.NORMAL],value:l.NORMAL},{title:l[l.INFO],value:l.INFO},{title:l[l.WARNING],value:l.WARNING},{title:l[l.CRITICAL],value:l.CRITICAL}]),u=T([l.NORMAL,l.INFO,l.WARNING,l.CRITICAL]),h=T(""),P=g(()=>_.logs),G=g(()=>P.value.filter(t=>u.value.includes(t.type))),I=g(()=>u.value.length>0),N=g(()=>u.value.length===L.value.length),{results:x}=K(G,h,t=>t.message),{paginatedResults:M,currentPage:d,pageCount:p}=z(x,30),k=()=>{B.push({name:"dashboard"})},U=t=>`logtype-${l[t?.type]?.toLowerCase()}`,$=t=>l[t.type],W=t=>ne(t.timestamp*1e3).format(O.dateFormat),j=()=>{N.value?u.value=[]:u.value=L.value.map(t=>t.value)},A=t=>{t.key==="Escape"&&k()};return de(async()=>{document.addEventListener("keydown",A),await _.cleanAndFetchLogs(),Q(_.fetchLogs,15e3)}),me(()=>{document.removeEventListener("keydown",A)}),(t,n)=>(r(),C("div",ge,[e(R,{"no-gutters":"",align:"center",justify:"center"},{default:a(()=>[e(f,null,{default:a(()=>[v("h1",ve,i(o(E)("logs.title")),1)]),_:1}),e(f,null,{default:a(()=>[v("div",ye,[e(X,{icon:"mdi-close",variant:"plain",onClick:k})])]),_:1})]),_:1}),e(J,null,{default:a(()=>[e(m,null,{default:a(()=>[e(R,null,{default:a(()=>[e(f,{cols:"6"},{default:a(()=>[e(Y,{modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),items:L.value,label:t.$t("logs.filters.type"),"hide-details":"",multiple:"",chips:""},{"prepend-item":a(()=>[e(m,{title:t.$t("common.selectAll"),onClick:j},{prepend:a(()=>[e(Z,{indeterminate:I.value&&!N.value,"model-value":I.value},null,8,["indeterminate","model-value"])]),_:1},8,["title"]),e(c)]),_:1},8,["modelValue","items","label"])]),_:1}),e(f,{cols:"6"},{default:a(()=>[e(ee,{modelValue:h.value,"onUpdate:modelValue":n[1]||(n[1]=s=>h.value=s),label:t.$t("logs.filters.query"),"hide-details":""},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(c,{class:"my-3",thickness:"5"}),o(p)>1?(r(),y(m,{key:0},{default:a(()=>[e(S,{modelValue:o(d),"onUpdate:modelValue":n[2]||(n[2]=s=>w(d)?d.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):V("",!0),e(c),(r(!0),C(F,null,pe(o(M),(s,q)=>(r(),C(F,null,[q>0?(r(),y(c,{key:0})):V("",!0),e(m,{class:"pa-0"},{default:a(()=>[e(te,{class:"p-0"},{default:a(()=>[e(le,{class:fe([U(s),"pa-0"])},{default:a(()=>[e(ae,{class:"text-no-wrap"},{default:a(()=>[v("div",Ve,"["+i(s.id)+"] "+i(s.message),1),e(se),v("div",_e,i(W(s)),1)]),_:2},1024),e(oe,{class:"wrap-word text-select"},{default:a(()=>[b(" ["+i($(s))+"] "+i(s.message),1)]),_:2},1024)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024)],64))),256)),o(x).length===0?(r(),y(m,{key:1},{default:a(()=>[b(i(t.$t("logs.emptyLogList")),1)]),_:1})):V("",!0),e(c),o(p)>1?(r(),y(m,{key:2},{default:a(()=>[e(S,{modelValue:o(d),"onUpdate:modelValue":n[3]||(n[3]=s=>w(d)?d.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):V("",!0)]),_:1})]))}});xe=ue(Le,[["__scopeId","data-v-1115081b"]])});export{xe as default,__tla};
|
|
||||||
1
qbit/vuetorrent/public/assets/Logs-BTdobjpK.js
Normal file
1
qbit/vuetorrent/public/assets/Logs-BTdobjpK.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{u as K,__tla as __tla_0}from"./ArrayPagination-D_SxCqyJ.js";import{D as Q,E as q,L as l,F as z,G as H,s as R,I as J,t as f,i as X,J as m,w as Y,A as Z,K as c,f as ee,M as S,N as te,O as le,P as ae,h as se,Q as oe,R as ne,C as ue,__tla as __tla_1}from"./index-CfNDsQKB.js";import{g as ie,G as re,d as N,c as g,H as de,$ as me,I as i,W as T,m as e,K as a,T as ce,X as v,M as r,u as o,J as y,Q as w,O as V,F,a0 as pe,V as fe,L as b}from"./vue--7UcA1iU.js";import"./vuetify-GhifFkZ7.js";let xe;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{let ge,ve,ye,Ve,_e,Le;ge={class:"pa-3"};ve={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"};ye={class:"d-flex justify-end"};Ve={class:"d-flex mr-8 overflow-hidden"};_e={class:"d-flex"};Le=ie({__name:"Logs",setup(he){const E=ce(),{t:O}=re(),_=Q(),B=q(),L=N([{title:l[l.NORMAL],value:l.NORMAL},{title:l[l.INFO],value:l.INFO},{title:l[l.WARNING],value:l.WARNING},{title:l[l.CRITICAL],value:l.CRITICAL}]),u=N([l.NORMAL,l.INFO,l.WARNING,l.CRITICAL]),h=N(""),P=g(()=>_.logs),M=g(()=>P.value.filter(t=>u.value.includes(t.type))),C=g(()=>u.value.length>0),I=g(()=>u.value.length===L.value.length),{results:x}=z(M,h,t=>t.message),{paginatedResults:$,currentPage:d,pageCount:p}=K(x,30),k=()=>{E.push({name:"dashboard"})},G=t=>`logtype-${l[t?.type]?.toLowerCase()}`,U=t=>l[t.type],W=t=>ne(t.timestamp*1e3).format(B.dateFormat),j=()=>{I.value?u.value=[]:u.value=L.value.map(t=>t.value)},A=t=>{t.key==="Escape"&&k()};return de(async()=>{document.addEventListener("keydown",A),await _.cleanAndFetchLogs(),H(_.fetchLogs,15e3)}),me(()=>{document.removeEventListener("keydown",A)}),(t,n)=>(i(),T("div",ge,[e(R,{"no-gutters":"",align:"center",justify:"center"},{default:a(()=>[e(f,null,{default:a(()=>[v("h1",ve,r(o(O)("logs.title")),1)]),_:1}),e(f,null,{default:a(()=>[v("div",ye,[e(X,{icon:"mdi-close",variant:"plain",onClick:k})])]),_:1})]),_:1}),e(J,null,{default:a(()=>[e(m,null,{default:a(()=>[e(R,null,{default:a(()=>[e(f,{cols:"6"},{default:a(()=>[e(Y,{modelValue:u.value,"onUpdate:modelValue":n[0]||(n[0]=s=>u.value=s),items:L.value,label:t.$t("logs.filters.type"),"hide-details":"",multiple:"",chips:""},{"prepend-item":a(()=>[e(m,{title:t.$t("common.selectAll"),onClick:j},{prepend:a(()=>[e(Z,{indeterminate:C.value&&!I.value,"model-value":C.value},null,8,["indeterminate","model-value"])]),_:1},8,["title"]),e(c)]),_:1},8,["modelValue","items","label"])]),_:1}),e(f,{cols:"6"},{default:a(()=>[e(ee,{modelValue:h.value,"onUpdate:modelValue":n[1]||(n[1]=s=>h.value=s),label:t.$t("logs.filters.query"),"hide-details":""},null,8,["modelValue","label"])]),_:1})]),_:1})]),_:1}),e(c,{class:"my-3",thickness:"5"}),o(p)>1?(i(),y(m,{key:0},{default:a(()=>[e(S,{modelValue:o(d),"onUpdate:modelValue":n[2]||(n[2]=s=>w(d)?d.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):V("",!0),e(c),(i(!0),T(F,null,pe(o($),(s,D)=>(i(),T(F,null,[D>0?(i(),y(c,{key:0})):V("",!0),e(m,{class:"pa-0"},{default:a(()=>[e(te,{class:"p-0"},{default:a(()=>[e(le,{class:fe([G(s),"pa-0"])},{default:a(()=>[e(ae,{class:"text-no-wrap"},{default:a(()=>[v("div",Ve,"["+r(s.id)+"] "+r(s.message),1),e(se),v("div",_e,r(W(s)),1)]),_:2},1024),e(oe,{class:"wrap-word text-select"},{default:a(()=>[b(" ["+r(U(s))+"] "+r(s.message),1)]),_:2},1024)]),_:2},1032,["class"])]),_:2},1024)]),_:2},1024)],64))),256)),o(x).length===0?(i(),y(m,{key:1},{default:a(()=>[b(r(t.$t("logs.emptyLogList")),1)]),_:1})):V("",!0),e(c),o(p)>1?(i(),y(m,{key:2},{default:a(()=>[e(S,{modelValue:o(d),"onUpdate:modelValue":n[3]||(n[3]=s=>w(d)?d.value=s:null),length:o(p),"prev-icon":"mdi-menu-left","next-icon":"mdi-menu-right"},null,8,["modelValue","length"])]),_:1})):V("",!0)]),_:1})]))}});xe=ue(Le,[["__scopeId","data-v-1115081b"]])});export{xe as default,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{l as a,m as r,_ as n,__tla as __tla_0}from"./index-bUuJUL5l.js";import{g as u,H as i,S as m,T as p}from"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";let l;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{l=u({__name:"MagnetHandler",setup(d){const o=m(),s=p();return i(async()=>{const e=decodeURIComponent(o.params.url);if(e.startsWith("magnet:")){const t=a();t.isFirstInit=!1,t.pushTorrentToQueue(e),r().createDialog(n,{})}await s.push({name:"dashboard"})}),()=>{}}})});export{l as default,__tla};
|
|
||||||
1
qbit/vuetorrent/public/assets/MagnetHandler-D64huxWC.js
Normal file
1
qbit/vuetorrent/public/assets/MagnetHandler-D64huxWC.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{l as r,m as n,_ as u,__tla as __tla_0}from"./index-CfNDsQKB.js";import{g as i,H as m,S as d,T as p}from"./vue--7UcA1iU.js";import"./vuetify-GhifFkZ7.js";let g;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{g=i({__name:"MagnetHandler",setup(c){const t=d(),s=p(),e=r(),a=n();return m(async()=>{const o=decodeURIComponent(t.params.url);o.startsWith("magnet:")&&(e.isFirstInit=!1,e.pushTorrentToQueue(o),a.createDialog(u,{})),await s.push({name:"dashboard"})}),()=>{}}})});export{g as default,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{k as b,h as S,R as D,w as I,y as L,a as O,S as U,T as A,V as q,c as j,d as z,e as G,f as J,O as Q,P as W,g as X,i as B,j as Y,__tla as __tla_0}from"./index-bUuJUL5l.js";import{g as C,$ as Z,I as o,J as s,K as a,X as x,L as c,M as i,O as m,W as g,m as l,Y as F,a0 as K,a1 as N,F as E,a2 as ee,a3 as ae,a4 as oe,G as te,d as T,r as le,c as R,H as se,u as w,N as ne,P as re,Q as de}from"./vue-BSryv7ps.js";let ve,he;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let ie,ue,me,ce;ie={class:"d-flex"};ue={key:2};me={key:3};ce=C({__name:"RightClickMenuEntry",props:{text:{},icon:{},action:{type:Function},hidden:{type:Boolean},disabled:{type:Boolean},disabledText:{},disabledIcon:{},children:{}},setup(f){const t=f,n=()=>{t.action&&t.action()};return(e,u)=>{const v=Z("RightClickMenuEntry",!0);return e.hidden?m("",!0):(o(),s(L,{key:0,class:"px-3",disabled:e.disabled,onClick:n},{default:a(()=>[x("div",ie,[e.disabled&&e.disabledIcon?(o(),s(b,{key:0,class:"mr-2"},{default:a(()=>[c(i(e.disabledIcon),1)]),_:1})):e.icon?(o(),s(b,{key:1,class:"mr-2"},{default:a(()=>[c(i(e.icon),1)]),_:1})):m("",!0),e.disabled&&e.disabledText?(o(),g("span",ue,i(e.disabledText),1)):(o(),g("span",me,i(e.text),1)),l(S),!e.disabled&&e.children?(o(),s(b,{key:4},{default:a(()=>[c("mdi-chevron-right")]),_:1})):m("",!0)]),e.children?(o(),s(D,{key:0,activator:"parent","open-on-hover":"","open-on-click":"","close-delay":"10","open-delay":"0",location:"right"},{default:a(()=>[l(I,null,{default:a(()=>[(o(!0),g(E,null,F(e.children,h=>(o(),s(v,K(N(h)),null,16))),256))]),_:1})]),_:1})):m("",!0)]),_:1},8,["disabled"]))}}});ve=C({__name:"RightClickMenu",props:ee({menuData:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(f){const t=ae(f,"modelValue");return(n,e)=>t.value?(o(),s(D,{key:0,modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=u=>t.value=u),activator:"parent","close-on-content-click":!0,transition:"slide-y-transition","scroll-strategy":"none"},{default:a(()=>[l(I,null,{default:a(()=>[oe(n.$slots,"top"),(o(!0),g(E,null,F(n.menuData,u=>(o(),s(ce,K(N(u)),null,16))),256))]),_:3})]),_:3},8,["modelValue"])):m("",!0)}});he=C({__name:"MoveTorrentDialog",props:{guid:{},hashes:{},mode:{}},setup(f){const t=f,{isOpened:n}=O(t.guid),{t:e}=te(),u=U(),v=A(),h=T(),_=T(),V=T(!1),y=le({newPath:""}),H=[r=>!!r||e("dialogs.moveTorrent.required")],M=R(()=>t.hashes.map(v.getTorrentByHash)),k=R(()=>{switch(t.mode){case"dl":return M.value[0]?.download_path;case"save":return M.value[0]?.savePath}});async function P(){await h.value?.validate(),V.value&&(await u.toggleAutoTmm(t.hashes,!1),await v.moveTorrents(t.mode,t.hashes,y.newPath),_.value?.saveValueToHistory(),$())}const $=()=>{n.value=!1};return se(()=>{y.newPath=k.value||""}),(r,d)=>(o(),s(Y,{modelValue:w(n),"onUpdate:modelValue":d[3]||(d[3]=p=>de(n)?n.value=p:null)},{default:a(()=>[l(q,null,{default:a(()=>[l(j,null,{default:a(()=>[c(i(r.$t(`dialogs.moveTorrent.${r.mode}.title`)),1)]),_:1}),l(z,null,{default:a(()=>[l(w(G),{modelValue:V.value,"onUpdate:modelValue":d[1]||(d[1]=p=>V.value=p),ref_key:"form",ref:h,onSubmit:d[2]||(d[2]=ne(()=>{},["prevent"]))},{default:a(()=>[k.value?(o(),s(J,{key:0,"model-value":k.value,disabled:"",label:r.$t("dialogs.moveTorrent.oldPath")},null,8,["model-value","label"])):m("",!0),l(Q,{modelValue:y.newPath,"onUpdate:modelValue":d[0]||(d[0]=p=>y.newPath=p),historyKey:w(W).TORRENT_PATH,ref_key:"field",ref:_,rules:H,autofocus:"",label:r.$t("dialogs.moveTorrent.newPath"),onKeydown:re(P,["enter"])},null,8,["modelValue","historyKey","label"])]),_:1},8,["modelValue"])]),_:1}),l(X,null,{default:a(()=>[l(S),l(B,{color:"error",onClick:$},{default:a(()=>[c(i(r.$t("common.cancel")),1)]),_:1}),l(B,{color:"accent",disabled:!V.value,onClick:P},{default:a(()=>[c(i(r.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}})});export{ve as _,he as a,__tla};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{k as b,h as R,Y as S,I as D,J as L,a as U,Z as A,$ as O,V as q,c as J,d as j,e as z,f as G,v as Q,H as W,g as X,i as B,j as Y,__tla as __tla_0}from"./index-CfNDsQKB.js";import{g as _,a2 as Z,I as o,J as s,K as a,X as x,L as c,M as i,O as m,W as g,m as l,a0 as F,a3 as H,a4 as K,F as N,a5 as ee,a6 as ae,a7 as oe,G as te,d as T,r as le,c as I,H as se,u as C,N as ne,P as re,Q as de}from"./vue--7UcA1iU.js";let ve,he;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let ie,ue,me,ce;ie={class:"d-flex"};ue={key:2};me={key:3};ce=_({__name:"RightClickMenuEntry",props:{text:{},icon:{},action:{type:Function},hidden:{type:Boolean},disabled:{type:Boolean},disabledText:{},disabledIcon:{},children:{}},setup(f){const t=f,n=()=>{t.action&&t.action()};return(e,u)=>{const v=Z("RightClickMenuEntry",!0);return e.hidden?m("",!0):(o(),s(L,{key:0,class:"px-3",disabled:e.disabled,onClick:n},{default:a(()=>[x("div",ie,[e.disabled&&e.disabledIcon?(o(),s(b,{key:0,class:"mr-2"},{default:a(()=>[c(i(e.disabledIcon),1)]),_:1})):e.icon?(o(),s(b,{key:1,class:"mr-2"},{default:a(()=>[c(i(e.icon),1)]),_:1})):m("",!0),e.disabled&&e.disabledText?(o(),g("span",ue,i(e.disabledText),1)):(o(),g("span",me,i(e.text),1)),l(R),!e.disabled&&e.children?(o(),s(b,{key:4},{default:a(()=>[c("mdi-chevron-right")]),_:1})):m("",!0)]),e.children?(o(),s(S,{key:0,activator:"parent","open-on-hover":"","open-on-click":"","close-delay":"10","open-delay":"0",location:"right"},{default:a(()=>[l(D,null,{default:a(()=>[(o(!0),g(N,null,F(e.children,h=>(o(),s(v,H(K(h)),null,16))),256))]),_:1})]),_:1})):m("",!0)]),_:1},8,["disabled"]))}}});ve=_({__name:"RightClickMenu",props:ee({menuData:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(f){const t=ae(f,"modelValue");return(n,e)=>t.value?(o(),s(S,{key:0,modelValue:t.value,"onUpdate:modelValue":e[0]||(e[0]=u=>t.value=u),activator:"parent","close-on-content-click":!0,transition:"slide-y-transition","scroll-strategy":"none"},{default:a(()=>[l(D,null,{default:a(()=>[oe(n.$slots,"top"),(o(!0),g(N,null,F(n.menuData,u=>(o(),s(ce,H(K(u)),null,16))),256))]),_:3})]),_:3},8,["modelValue"])):m("",!0)}});he=_({__name:"MoveTorrentDialog",props:{guid:{},hashes:{},mode:{}},setup(f){const t=f,{isOpened:n}=U(t.guid),{t:e}=te(),u=A(),v=O(),h=T(),w=T(),V=T(!1),y=le({newPath:""}),E=[r=>!!r||e("dialogs.moveTorrent.required")],M=I(()=>t.hashes.map(v.getTorrentByHash)),k=I(()=>{switch(t.mode){case"dl":return M.value[0]?.download_path;case"save":return M.value[0]?.savePath}});async function P(){await h.value?.validate(),V.value&&(await u.toggleAutoTmm(t.hashes,!1),await v.moveTorrents(t.mode,t.hashes,y.newPath),w.value?.saveValueToHistory(),$())}const $=()=>{n.value=!1};return se(()=>{y.newPath=k.value||""}),(r,d)=>(o(),s(Y,{modelValue:C(n),"onUpdate:modelValue":d[3]||(d[3]=p=>de(n)?n.value=p:null)},{default:a(()=>[l(q,null,{default:a(()=>[l(J,null,{default:a(()=>[c(i(r.$t(`dialogs.moveTorrent.${r.mode}.title`)),1)]),_:1}),l(j,null,{default:a(()=>[l(C(z),{modelValue:V.value,"onUpdate:modelValue":d[1]||(d[1]=p=>V.value=p),ref_key:"form",ref:h,onSubmit:d[2]||(d[2]=ne(()=>{},["prevent"]))},{default:a(()=>[k.value?(o(),s(G,{key:0,"model-value":k.value,disabled:"",label:r.$t("dialogs.moveTorrent.oldPath")},null,8,["model-value","label"])):m("",!0),l(Q,{modelValue:y.newPath,"onUpdate:modelValue":d[0]||(d[0]=p=>y.newPath=p),historyKey:C(W).TORRENT_PATH,ref_key:"field",ref:w,rules:E,autofocus:"",label:r.$t("dialogs.moveTorrent.newPath"),onKeydown:re(P,["enter"])},null,8,["modelValue","historyKey","label"])]),_:1},8,["modelValue"])]),_:1}),l(X,null,{default:a(()=>[l(R),l(B,{color:"error",onClick:$},{default:a(()=>[c(i(r.$t("common.cancel")),1)]),_:1}),l(B,{color:"accent",disabled:!V.value,onClick:P},{default:a(()=>[c(i(r.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}})});export{ve as _,he as a,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{_ as o,__tla as __tla_0}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";import"./vue-BSryv7ps.js";import{__tla as __tla_1}from"./index-bUuJUL5l.js";import"./vuetify-i5Qjiq6M.js";let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{});export{o as default,__tla};
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{_ as o,__tla as __tla_0}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-BvP4_KF0.js";import"./vue--7UcA1iU.js";import{__tla as __tla_1}from"./index-CfNDsQKB.js";import"./vuetify-GhifFkZ7.js";let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{});export{o as default,__tla};
|
||||||
@@ -1 +1 @@
|
|||||||
import{g as I,G as S,d as u,r as h,H as B,A as g,I as F,J as T,K as n,m as l,L as m,M as f,u as V,N as D,O as x,P as M,Q as O}from"./vue-BSryv7ps.js";import{a as $,b as K,V as U,c as A,d as P,e as R,f as b,g as _,h as j,i as C,j as q,__tla as __tla_0}from"./index-bUuJUL5l.js";let J;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{J=I({__name:"MoveTorrentFileDialog",props:{guid:{},hash:{},isFolder:{type:Boolean},oldName:{}},setup(k){const o=k,{isOpened:r}=$(o.guid),{t:c}=S(),N=K(),p=u(),i=u(),d=u(!1),t=h({newName:""}),y=[e=>!!e||c("dialogs.moveTorrent.required")];async function v(){await p.value?.validate(),d.value&&(o.isFolder?await N.renameTorrentFolder(o.hash,o.oldName,t.newName):await N.renameTorrentFile(o.hash,o.oldName,t.newName),w())}const w=()=>{r.value=!1};return B(()=>{if(t.newName=o.oldName,o.isFolder)g(()=>i.value?.select());else{const e=t.newName.lastIndexOf("/"),a=t.newName.lastIndexOf(".");g(()=>{i.value?.setSelectionRange(e+1,a==-1?t.newName.length:a)})}}),(e,a)=>(F(),T(q,{modelValue:V(r),"onUpdate:modelValue":a[3]||(a[3]=s=>O(r)?r.value=s:null)},{default:n(()=>[l(U,null,{default:n(()=>[l(A,null,{default:n(()=>[m(f(V(c)("dialogs.moveTorrentFile.title",1+Number(e.isFolder))),1)]),_:1}),l(P,null,{default:n(()=>[l(V(R),{modelValue:d.value,"onUpdate:modelValue":a[1]||(a[1]=s=>d.value=s),ref_key:"form",ref:p,onSubmit:a[2]||(a[2]=D(()=>{},["prevent"]))},{default:n(()=>[e.oldName?(F(),T(b,{key:0,"model-value":e.oldName,disabled:"",label:e.$t("dialogs.moveTorrentFile.oldName")},null,8,["model-value","label"])):x("",!0),l(b,{modelValue:t.newName,"onUpdate:modelValue":a[0]||(a[0]=s=>t.newName=s),ref_key:"input",ref:i,rules:y,autofocus:"",label:e.$t("dialogs.moveTorrent.newPath"),onKeydown:M(v,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),l(_,null,{default:n(()=>[l(j),l(C,{color:"error",onClick:w},{default:n(()=>[m(f(e.$t("common.cancel")),1)]),_:1}),l(C,{color:"accent",disabled:!d.value,onClick:v},{default:n(()=>[m(f(e.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}})});export{J as _,__tla};
|
import{g as I,G as S,d as u,r as h,H as B,A as g,I as F,J as T,K as n,m as l,L as m,M as f,u as V,N as D,O as x,P as M,Q as O}from"./vue--7UcA1iU.js";import{a as $,b as K,V as U,c as A,d as P,e as R,f as b,g as _,h as j,i as C,j as q,__tla as __tla_0}from"./index-CfNDsQKB.js";let J;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{J=I({__name:"MoveTorrentFileDialog",props:{guid:{},hash:{},isFolder:{type:Boolean},oldName:{}},setup(k){const o=k,{isOpened:r}=$(o.guid),{t:c}=S(),N=K(),p=u(),i=u(),d=u(!1),t=h({newName:""}),y=[e=>!!e||c("dialogs.moveTorrent.required")];async function v(){await p.value?.validate(),d.value&&(o.isFolder?await N.renameTorrentFolder(o.hash,o.oldName,t.newName):await N.renameTorrentFile(o.hash,o.oldName,t.newName),w())}const w=()=>{r.value=!1};return B(()=>{if(t.newName=o.oldName,o.isFolder)g(()=>i.value?.select());else{const e=t.newName.lastIndexOf("/"),a=t.newName.lastIndexOf(".");g(()=>{i.value?.setSelectionRange(e+1,a==-1?t.newName.length:a)})}}),(e,a)=>(F(),T(q,{modelValue:V(r),"onUpdate:modelValue":a[3]||(a[3]=s=>O(r)?r.value=s:null)},{default:n(()=>[l(U,null,{default:n(()=>[l(A,null,{default:n(()=>[m(f(V(c)("dialogs.moveTorrentFile.title",1+Number(e.isFolder))),1)]),_:1}),l(P,null,{default:n(()=>[l(V(R),{modelValue:d.value,"onUpdate:modelValue":a[1]||(a[1]=s=>d.value=s),ref_key:"form",ref:p,onSubmit:a[2]||(a[2]=D(()=>{},["prevent"]))},{default:n(()=>[e.oldName?(F(),T(b,{key:0,"model-value":e.oldName,disabled:"",label:e.$t("dialogs.moveTorrentFile.oldName")},null,8,["model-value","label"])):x("",!0),l(b,{modelValue:t.newName,"onUpdate:modelValue":a[0]||(a[0]=s=>t.newName=s),ref_key:"input",ref:i,rules:y,autofocus:"",label:e.$t("dialogs.moveTorrent.newPath"),onKeydown:M(v,["enter"])},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),l(_,null,{default:n(()=>[l(j),l(C,{color:"error",onClick:w},{default:n(()=>[m(f(e.$t("common.cancel")),1)]),_:1}),l(C,{color:"accent",disabled:!d.value,onClick:v},{default:n(()=>[m(f(e.$t("common.save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}})});export{J as _,__tla};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{k as c,f as r,__tla as __tla_0}from"./index-CfNDsQKB.js";import{g as t,d,c as o,I as i,J as l,R as m,K as u,m as f}from"./vue--7UcA1iU.js";let _;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{_=t({__name:"PasswordField",props:{hideIcon:{type:Boolean},prependIcon:{}},setup(I){const e=d(!1);function a(){e.value=!e.value}const p=o(()=>e.value?"text":"password"),s=o(()=>e.value?"mdi-eye":"mdi-eye-off");return(n,v)=>(i(),l(r,{name:"password",type:p.value,"append-inner-icon":n.hideIcon?"":s.value,"onClick:appendInner":a},m({_:2},[n.prependIcon?{name:"prepend",fn:u(()=>[f(c,{color:"accent",icon:n.prependIcon},null,8,["icon"])]),key:"0"}:void 0]),1032,["type","append-inner-icon"]))}})});export{_,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{g as c,d as r,c as o,I as t,J as d,R as i,K as l,m}from"./vue-BSryv7ps.js";import{k as u,f,__tla as __tla_0}from"./index-bUuJUL5l.js";let _;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{_=c({__name:"PasswordField",props:{hideIcon:{type:Boolean},prependIcon:{}},setup(I){const e=r(!1);function a(){e.value=!e.value}const p=o(()=>e.value?"text":"password"),s=o(()=>e.value?"mdi-eye":"mdi-eye-off");return(n,v)=>(t(),d(f,{name:"password",type:p.value,"append-inner-icon":n.hideIcon?"":s.value,"onClick:appendInner":a},i({_:2},[n.prependIcon?{name:"prepend",fn:l(()=>[m(u,{color:"accent",icon:n.prependIcon},null,8,["icon"])]),key:"0"}:void 0]),1032,["type","append-inner-icon"]))}})});export{_,__tla};
|
|
||||||
1
qbit/vuetorrent/public/assets/RssArticles-BhqSYl10.js
Normal file
1
qbit/vuetorrent/public/assets/RssArticles-BhqSYl10.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{g as P,G as z,d as J,r as q,c as G,H as O,x as W,$ as X,I as r,W as v,m as e,K as s,T as Y,X as i,M as u,u as a,J as h,Q as R,O as c,F as S,a0 as Z,V as ee,L as b,N as A}from"./vue--7UcA1iU.js";import{u as te,__tla as __tla_0}from"./ArrayPagination-D_SxCqyJ.js";import{l as le,m as se,a0 as ne,E as ae,F as oe,s as $,I as D,j as re,t as y,i as m,J as f,f as ie,a1 as ue,h as N,M as F,K as de,a2 as ce,a3 as me,V as fe,c as pe,q as ve,r as Ve,d as _e,C as ge,__tla as __tla_1}from"./index-CfNDsQKB.js";import{d as ke}from"./index-DnOugk3D.js";import"./vuetify-GhifFkZ7.js";let Me;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{let he,ye,Ce,be,Ae,xe,we,Te,Le,Re;he={class:"pa-3"};ye={class:"subtitle-1 ml-2",style:{"font-size":"1.6em !important"}};Ce={class:"d-flex justify-end"};be={class:"d-flex flex-row align-center justify-center"};Ae={class:"d-flex"};xe={key:0};we={key:1};Te={class:"d-flex flex-column"};Le=["innerHTML"];Re=P({__name:"RssArticles",setup(Se){const I=Y(),{t:V}=z(),M=le(),U=se(),o=ne(),B=ae(),p=J(!1),_=q({title:"",content:""}),C=G({get:()=>o.filters.title,set:ke(l=>{o.filters.title=l??""},300)}),g=oe(()=>o.articles.sort((l,n)=>Number(n.parsedDate)-Number(l.parsedDate)),()=>C.value,l=>l.title),{paginatedResults:j,currentPage:d,pageCount:x}=te(g.results,15);function E(l){const n=B.useIdForRssLinks?l.id:l.link;window.open(n,"_blank","noreferrer")}function H(l){l.description&&(_.title=l.title.trim(),_.content=l.description.trim(),p.value=!0)}function Q(l){M.pushTorrentToQueue(l.torrentURL)}async function w(l){await o.markArticleAsRead(l.id)}function T(){I.push({name:"dashboard"})}function L(l){if(U.hasActiveDialog||p.value)return!1;l.key==="Escape"&&T()}return O(async()=>{await o.fetchFeeds()}),W(()=>{document.addEventListener("keydown",L)}),X(()=>{document.removeEventListener("keydown",L)}),(l,n)=>(r(),v("div",he,[e($,{align:"center",justify:"center","no-gutters":""},{default:s(()=>[e(y,null,{default:s(()=>[i("h1",ye,u(a(V)("rssArticles.title")),1)]),_:1}),e(y,null,{default:s(()=>[i("div",Ce,[e(m,{icon:"mdi-close",variant:"plain",onClick:T})])]),_:1})]),_:1}),e(D,null,{default:s(()=>[e(f,null,{default:s(()=>[e($,null,{default:s(()=>[e(y,{cols:"12"},{default:s(()=>[e(ie,{modelValue:C.value,"onUpdate:modelValue":n[0]||(n[0]=t=>C.value=t),label:l.$t("rssArticles.filters.title"),clearable:"","hide-details":""},null,8,["modelValue","label"])]),_:1}),e(y,{cols:"12"},{default:s(()=>[i("div",be,[e(ue,{modelValue:a(o).filters.unread,"onUpdate:modelValue":n[1]||(n[1]=t=>a(o).filters.unread=t),label:l.$t("rssArticles.filters.unread"),"hide-details":""},null,8,["modelValue","label"]),e(N),e(m,{disabled:a(o).unreadArticles.length===0,text:l.$t("rssArticles.markAllAsRead"),color:"primary",onClick:n[2]||(n[2]=t=>a(o).markAllAsRead())},null,8,["disabled","text"])])]),_:1})]),_:1})]),_:1}),a(g).results.value.length?(r(),h(f,{key:0},{default:s(()=>[e(F,{modelValue:a(d),"onUpdate:modelValue":n[3]||(n[3]=t=>R(d)?d.value=t:null),length:a(x),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):c("",!0),e(f,null,{default:s(()=>[e(D,null,{default:s(()=>[(r(!0),v(S,null,Z(a(j),(t,K)=>(r(),v(S,null,[K>0?(r(),h(de,{key:0,color:"white"})):c("",!0),e(f,{class:ee({"rss-read":t.isRead}),onClick:k=>H(t),onContextmenu:k=>w(t)},{default:s(()=>[i("div",Ae,[i("div",null,[e(ce,{class:"wrap-anywhere",style:{"white-space":"unset"}},{default:s(()=>[b(u(t.title),1)]),_:2},1024),e(me,{class:"d-block"},{default:s(()=>[i("div",null,u(t.parsedDate.toLocaleString()),1),i("div",null,u(a(V)("rssArticles.item.feedName",{name:a(o).getFeedNames(t.id).join(" | ")})),1),t.author?(r(),v("div",xe,u(a(V)("rssArticles.item.author",{author:t.author})),1)):c("",!0),t.category?(r(),v("div",we,u(a(V)("rssArticles.item.category",{category:t.category})),1)):c("",!0)]),_:2},1024)]),e(N),i("div",Te,[e(m,{icon:"mdi-open-in-new",variant:"text",onClick:A(k=>E(t),["stop"])},null,8,["onClick"]),e(m,{color:"accent",icon:"mdi-check",variant:"text",onClick:A(k=>w(t),["stop"])},null,8,["onClick"]),e(m,{icon:"mdi-download",variant:"text",onClick:A(k=>Q(t),["stop"])},null,8,["onClick"])])])]),_:2},1032,["class","onClick","onContextmenu"])],64))),256)),a(g).results.value.length===0?(r(),h(f,{key:0},{default:s(()=>[b(u(l.$t("common.emptyList")),1)]),_:1})):c("",!0)]),_:1})]),_:1}),a(g).results.value.length?(r(),h(f,{key:1},{default:s(()=>[e(F,{modelValue:a(d),"onUpdate:modelValue":n[4]||(n[4]=t=>R(d)?d.value=t:null),length:a(x),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):c("",!0)]),_:1}),e(re,{modelValue:p.value,"onUpdate:modelValue":n[6]||(n[6]=t=>p.value=t)},{default:s(()=>[e(fe,null,{default:s(()=>[e(pe,null,{default:s(()=>[e(ve,{color:"transparent"},{default:s(()=>[e(Ve,null,{default:s(()=>[b(u(_.title),1)]),_:1}),e(m,{icon:"mdi-close",onClick:n[5]||(n[5]=t=>p.value=!1)})]),_:1})]),_:1}),e(_e,null,{default:s(()=>[i("div",{class:"description-container",innerHTML:_.content},null,8,Le)]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}});Me=ge(Re,[["__scopeId","data-v-77fbfd3e"]])});export{Me as default,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{g as z,G as K,d as W,r as X,c as Y,H as Z,x as G,V as J,I as r,W as v,m as e,K as s,T as O,X as i,M as u,u as o,J as h,Q as R,O as c,F as S,Y as q,Z as ee,L as b,N as x}from"./vue-BSryv7ps.js";import{u as te,__tla as __tla_0}from"./ArrayPagination-DuWOkPss.js";import{l as le,m as se,U as ne,r as oe,s as ae,v as $,w as D,j as re,x as y,i as m,y as f,f as ie,W as ue,h as N,C as I,B as de,X as ce,Y as me,V as fe,c as pe,Z as ve,$ as Ve,d as _e,I as ge,__tla as __tla_1}from"./index-bUuJUL5l.js";import{d as ke}from"./index-BIiPWG4K.js";import"./vuetify-i5Qjiq6M.js";let Be;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{let he,ye,Ce,be,xe,Ae,we,Te,Le,Re;he={class:"pa-3"};ye={class:"subtitle-1 ml-2",style:{"font-size":"1.6em !important"}};Ce={class:"d-flex justify-end"};be={class:"d-flex flex-row align-center justify-center"};xe={class:"d-flex"};Ae={key:0};we={key:1};Te={class:"d-flex flex-column"};Le=["innerHTML"];Re=z({__name:"RssArticles",setup(Se){const U=O(),{t:V}=K(),B=le(),F=se(),a=ne(),M=oe(),p=W(!1),_=X({title:"",content:""}),C=Y({get:()=>a.filters.title,set:ke(l=>{a.filters.title=l??""},300)}),g=ae(()=>a.articles.sort((l,n)=>Number(n.parsedDate)-Number(l.parsedDate)),()=>C.value,l=>l.title),{paginatedResults:j,currentPage:d,pageCount:A}=te(g.results,15);function E(l){const n=M.useIdForRssLinks?l.id:l.link;window.open(n,"_blank","noreferrer")}function H(l){l.description&&(_.title=l.title.trim(),_.content=l.description.trim(),p.value=!0)}function Q(l){B.pushTorrentToQueue(l.torrentURL)}async function w(l){await a.markArticleAsRead(l.id)}function T(){U.push({name:"dashboard"})}function L(l){if(F.hasActiveDialog||p.value)return!1;l.key==="Escape"&&T()}return Z(async()=>{await a.fetchFeeds()}),G(()=>{document.addEventListener("keydown",L)}),J(()=>{document.removeEventListener("keydown",L)}),(l,n)=>(r(),v("div",he,[e($,{align:"center",justify:"center","no-gutters":""},{default:s(()=>[e(y,null,{default:s(()=>[i("h1",ye,u(o(V)("rssArticles.title")),1)]),_:1}),e(y,null,{default:s(()=>[i("div",Ce,[e(m,{icon:"mdi-close",variant:"plain",onClick:T})])]),_:1})]),_:1}),e(D,null,{default:s(()=>[e(f,null,{default:s(()=>[e($,null,{default:s(()=>[e(y,{cols:"12"},{default:s(()=>[e(ie,{modelValue:C.value,"onUpdate:modelValue":n[0]||(n[0]=t=>C.value=t),label:l.$t("rssArticles.filters.title"),clearable:"","hide-details":""},null,8,["modelValue","label"])]),_:1}),e(y,{cols:"12"},{default:s(()=>[i("div",be,[e(ue,{modelValue:o(a).filters.unread,"onUpdate:modelValue":n[1]||(n[1]=t=>o(a).filters.unread=t),label:l.$t("rssArticles.filters.unread"),"hide-details":""},null,8,["modelValue","label"]),e(N),e(m,{disabled:o(a).unreadArticles.length===0,text:l.$t("rssArticles.markAllAsRead"),color:"primary",onClick:n[2]||(n[2]=t=>o(a).markAllAsRead())},null,8,["disabled","text"])])]),_:1})]),_:1})]),_:1}),o(g).results.value.length?(r(),h(f,{key:0},{default:s(()=>[e(I,{modelValue:o(d),"onUpdate:modelValue":n[3]||(n[3]=t=>R(d)?d.value=t:null),length:o(A),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):c("",!0),e(f,null,{default:s(()=>[e(D,null,{default:s(()=>[(r(!0),v(S,null,q(o(j),(t,P)=>(r(),v(S,null,[P>0?(r(),h(de,{key:0,color:"white"})):c("",!0),e(f,{class:ee({"rss-read":t.isRead}),onClick:k=>H(t),onContextmenu:k=>w(t)},{default:s(()=>[i("div",xe,[i("div",null,[e(ce,{class:"wrap-anywhere",style:{"white-space":"unset"}},{default:s(()=>[b(u(t.title),1)]),_:2},1024),e(me,{class:"d-block"},{default:s(()=>[i("div",null,u(t.parsedDate.toLocaleString()),1),i("div",null,u(o(V)("rssArticles.item.feedName",{name:o(a).getFeedNames(t.id).join(" | ")})),1),t.author?(r(),v("div",Ae,u(o(V)("rssArticles.item.author",{author:t.author})),1)):c("",!0),t.category?(r(),v("div",we,u(o(V)("rssArticles.item.category",{category:t.category})),1)):c("",!0)]),_:2},1024)]),e(N),i("div",Te,[e(m,{icon:"mdi-open-in-new",variant:"text",onClick:x(k=>E(t),["stop"])},null,8,["onClick"]),e(m,{color:"accent",icon:"mdi-check",variant:"text",onClick:x(k=>w(t),["stop"])},null,8,["onClick"]),e(m,{icon:"mdi-download",variant:"text",onClick:x(k=>Q(t),["stop"])},null,8,["onClick"])])])]),_:2},1032,["class","onClick","onContextmenu"])],64))),256)),o(g).results.value.length===0?(r(),h(f,{key:0},{default:s(()=>[b(u(l.$t("common.emptyList")),1)]),_:1})):c("",!0)]),_:1})]),_:1}),o(g).results.value.length?(r(),h(f,{key:1},{default:s(()=>[e(I,{modelValue:o(d),"onUpdate:modelValue":n[4]||(n[4]=t=>R(d)?d.value=t:null),length:o(A),"next-icon":"mdi-menu-right","prev-icon":"mdi-menu-left"},null,8,["modelValue","length"])]),_:1})):c("",!0)]),_:1}),e(re,{modelValue:p.value,"onUpdate:modelValue":n[6]||(n[6]=t=>p.value=t)},{default:s(()=>[e(fe,null,{default:s(()=>[e(pe,null,{default:s(()=>[e(ve,{color:"transparent"},{default:s(()=>[e(Ve,null,{default:s(()=>[b(u(_.title),1)]),_:1}),e(m,{icon:"mdi-close",onClick:n[5]||(n[5]=t=>p.value=!1)})]),_:1})]),_:1}),e(_e,null,{default:s(()=>[i("div",{class:"description-container",innerHTML:_.content},null,8,Le)]),_:1})]),_:1})]),_:1},8,["modelValue"])]))}});Be=ge(Re,[["__scopeId","data-v-77fbfd3e"]])});export{Be as default,__tla};
|
|
||||||
1
qbit/vuetorrent/public/assets/SearchEngine-BUFic1l3.js
Normal file
1
qbit/vuetorrent/public/assets/SearchEngine-BUFic1l3.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{g as W,G as X,d as h,I as S,J as $,K as l,m as e,X as C,M as m,n as se,L as E,u as p,N as R,Q as ie,a1 as oe,c as A,H as re,q as ue,W as F,T as ce,F as de,a0 as fe,P as ge}from"./vue--7UcA1iU.js";import{a as me,S as Y,V as j,c as pe,h as I,i as c,j as x,d as Q,e as ve,f as Z,g as O,T as ee,A as he,k as ye,l as Ve,m as ke,E as be,F as Ee,s as P,I as Se,t as b,o as we,U as Ce,W as Te,J as G,v as _e,H as Pe,w as J,K as $e,X as Ie,__tla as __tla_0}from"./index-CfNDsQKB.js";import"./vuetify-GhifFkZ7.js";let He;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let Me,Ne,Ue,De,qe;Me=["href","title"];Ne=W({__name:"PluginManagerDialog",props:{guid:{}},setup(B){const M=B,{isOpened:t}=me(M.guid),{t:y}=X(),d=Y(),f=[{title:y("dialogs.pluginManager.headers.enabled"),key:"enabled",sortable:!1},{title:y("dialogs.pluginManager.headers.name"),key:"fullName"},{title:y("dialogs.pluginManager.headers.version"),key:"version"},{title:y("dialogs.pluginManager.headers.url"),key:"url"},{title:y("dialogs.pluginManager.headers.actions"),key:"actions"}],V=h(!1),k=h(!1),w=h(!1),v=h(!1),u=h("");async function N(r){await d.toggleSearchPlugin(r),await d.fetchSearchPlugins()}async function T(){k.value=!0,await d.updatePlugins().then(()=>new Promise(r=>setTimeout(r,2e3))),await d.fetchSearchPlugins(),k.value=!1}async function U(){_(),V.value=!0,await d.installSearchPlugin(u.value),u.value="",setTimeout(()=>{d.fetchSearchPlugins().then(()=>{V.value=!1})},1e3)}async function D(r){V.value=!0,await d.uninstallSearchPlugin(r.name),await d.fetchSearchPlugins(),V.value=!1}const i=()=>{t.value=!1};function _(){w.value=!1}return(r,g)=>(S(),$(x,{modelValue:p(t),"onUpdate:modelValue":g[4]||(g[4]=n=>ie(t)?t.value=n:null)},{default:l(()=>[e(j,null,{default:l(()=>[e(pe,{class:"d-flex"},{default:l(()=>[C("div",null,m(r.$t("dialogs.pluginManager.title")),1),e(I),e(c,{text:r.$t("dialogs.pluginManager.update"),color:"accent",class:"mr-2",loading:k.value,onClick:T},null,8,["text","loading"]),e(x,{modelValue:w.value,"onUpdate:modelValue":g[3]||(g[3]=n=>w.value=n)},{activator:l(({props:n})=>[e(c,se(n,{color:"primary"}),{default:l(()=>[E(m(r.$t("dialogs.pluginManager.install.activator")),1)]),_:2},1040)]),default:l(()=>[e(j,{title:r.$t("dialogs.pluginManager.install.title")},{default:l(()=>[e(Q,null,{default:l(()=>[e(p(ve),{modelValue:v.value,"onUpdate:modelValue":g[1]||(g[1]=n=>v.value=n),onSubmit:g[2]||(g[2]=R(()=>{},["prevent"]))},{default:l(()=>[e(Z,{modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=n=>u.value=n),autofocus:"",label:r.$t("dialogs.pluginManager.install.label")},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),e(O,null,{default:l(()=>[e(I),e(c,{color:"error",onClick:_},{default:l(()=>[E(m(r.$t("common.cancel")),1)]),_:1}),e(c,{color:"accent",onClick:U},{default:l(()=>[E(m(r.$t("common.ok")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),e(Q,null,{default:l(()=>[e(ee,{headers:f,"items-per-page":"-1",items:p(d).searchPlugins,"sort-by":[{key:"fullName",order:"asc"}],loading:V.value},{"item.enabled":l(({item:n})=>[e(he,{"model-value":n.enabled,onClick:q=>N(n)},null,8,["model-value","onClick"])]),"item.url":l(({item:n})=>[C("a",{href:n.url,title:n.name},m(n.url),9,Me)]),"item.actions":l(({item:n})=>[e(ye,{color:"red",icon:"mdi-delete",onClick:q=>D(n)},null,8,["onClick"])]),tfoot:l(()=>[]),_:1},8,["items","loading"])]),_:1}),e(O,null,{default:l(()=>[e(I),e(c,{color:"accent",onClick:i},{default:l(()=>[E(m(r.$t("common.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});Ue={class:"pa-3"};De={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"};qe={class:"d-flex justify-end"};He=W({__name:"SearchEngine",setup(B){const M=ce(),{t}=X(),y=Ve(),d=ke(),f=Y(),V=be(),k=h(),w=h(!1),v=h(0),{searchData:u}=oe(f),N=[{title:t("searchEngine.headers.fileName"),key:"fileName"},{title:t("searchEngine.headers.fileSize"),key:"fileSize"},{title:t("searchEngine.headers.nbSeeders"),key:"nbSeeders"},{title:t("searchEngine.headers.nbLeechers"),key:"nbLeechers"},{title:t("searchEngine.headers.siteUrl"),key:"siteUrl"},{title:"",key:"actions",sortable:!1}],T=[{title:t("searchEngine.filters.category.movies"),value:"movies"},{title:t("searchEngine.filters.category.tv"),value:"tv"},{title:t("searchEngine.filters.category.music"),value:"music"},{title:t("searchEngine.filters.category.games"),value:"games"},{title:t("searchEngine.filters.category.anime"),value:"anime"},{title:t("searchEngine.filters.category.software"),value:"software"},{title:t("searchEngine.filters.category.pictures"),value:"pictures"},{title:t("searchEngine.filters.category.books"),value:"books"}];T.sort((a,o)=>a.title.localeCompare(o.title));const U=[{title:t("searchEngine.filters.category.all"),value:"all"},...T],D=A(()=>{const a=[{title:t("searchEngine.filters.plugins.all"),value:"all"},{title:t("searchEngine.filters.plugins.enabled"),value:"enabled"}];return f.searchPlugins.filter(o=>o.enabled).forEach(o=>{a.push({title:o.name,value:o.name})}),a}),i=A(()=>u.value[v.value]??{}),{results:_}=Ee(()=>i.value.results,()=>i.value.filters?.title,a=>a.fileName);function r(){f.createNewTab(),v.value=u.value.length-1,k.value?.focus()}function g(){u.value.length!==1&&(f.deleteTab(i.value.uniqueId),v.value=Math.min(v.value,u.value.length-1))}function n(a){y.pushTorrentToQueue(a.fileUrl)}function q(a){window.open(a.descrLink,"_blank","noreferrer")}async function H(){await f.runNewSearch(i.value),i.value.timer=setInterval(()=>ae(i.value),1e3),k.value?.saveValueToHistory()}async function L(a){await f.stopSearch(a),a.timer&&clearInterval(a.timer)}function le(){u.value.forEach(L)}async function ae(a){await f.refreshResults(a)==="Stopped"&&await L(a)}const K=()=>{M.push({name:"dashboard"})};function te(){d.createDialog(Ne)}function z(a){if(d.hasActiveDialog||w.value)return!1;a.key==="Escape"&&K()}return re(async()=>{document.addEventListener("keydown",z),u.value.length===0?f.createNewTab():u.value.forEach(a=>{a.id&&a.id!==0&&(a.timer=setInterval(()=>f.refreshResults(a),1e3))}),await f.fetchSearchPlugins()}),ue(()=>{document.removeEventListener("keydown",z),u.value.forEach(a=>{a.timer&&clearInterval(a.timer)})}),(a,o)=>(S(),F("div",Ue,[e(P,{"no-gutters":"",align:"center",justify:"center"},{default:l(()=>[e(b,null,{default:l(()=>[C("h1",De,m(p(t)("searchEngine.title")),1)]),_:1}),e(b,null,{default:l(()=>[C("div",qe,[e(c,{icon:"mdi-stop",variant:"plain",color:"error",onClick:le}),e(c,{icon:"mdi-toy-brick",variant:"plain",color:"primary",onClick:te}),e(c,{icon:"mdi-close",variant:"plain",onClick:K})])]),_:1})]),_:1}),e(P,{class:"ma-0 pa-0"},{default:l(()=>[e(we,{class:"d-flex align-center justify-center ma-0 pa-0 bg-primary",fluid:""},{default:l(()=>[e(Ce,{modelValue:v.value,"onUpdate:modelValue":o[0]||(o[0]=s=>v.value=s),class:"overflow-auto","bg-color":"primary","show-arrows":""},{default:l(()=>[(S(!0),F(de,null,fe(p(u),s=>(S(),$(Te,{key:s.uniqueId},{default:l(()=>[C("h4",null,m(!s.query||s.query.length===0?a.$t("searchEngine.tabHeaderEmpty"):s.query),1)]),_:2},1024))),128))]),_:1},8,["modelValue"]),e(I),e(c,{icon:"mdi-plus-circle-outline",variant:"plain",color:"accent",onClick:r}),e(c,{icon:"mdi-minus-circle-outline",variant:"plain",color:"error",disabled:p(u).length===1,onClick:g},null,8,["disabled"])]),_:1})]),_:1}),e(Se,null,{default:l(()=>[e(G,null,{default:l(()=>[e(P,{class:"mt-1"},{default:l(()=>[e(b,{cols:"12",md:"6"},{default:l(()=>[e(_e,{modelValue:i.value.query,"onUpdate:modelValue":o[1]||(o[1]=s=>i.value.query=s),"history-key":p(Pe).SEARCH_ENGINE_QUERY,ref_key:"queryInput",ref:k,autofocus:"",density:"compact","hide-details":"",clearable:"",label:a.$t("searchEngine.query"),onKeydown:ge(R(H,["prevent"]),["enter"])},null,8,["modelValue","history-key","label","onKeydown"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:l(()=>[e(J,{modelValue:i.value.filters.category,"onUpdate:modelValue":o[2]||(o[2]=s=>i.value.filters.category=s),height:"1",variant:"outlined",density:"compact","hide-details":"",items:U,label:a.$t("searchEngine.filters.category.label")},null,8,["modelValue","label"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:l(()=>[e(J,{modelValue:i.value.filters.plugin,"onUpdate:modelValue":o[3]||(o[3]=s=>i.value.filters.plugin=s),flat:"",density:"compact","hide-details":"",variant:"outlined",items:D.value,label:a.$t("searchEngine.filters.plugins.label")},null,8,["modelValue","items","label"])]),_:1}),e(b,{cols:"12",sm:"2",class:"d-flex align-center justify-center"},{default:l(()=>[i.value.id===0?(S(),$(c,{key:0,color:"accent",flat:"",class:"mx-auto px-4",onClick:H},{default:l(()=>[E(m(a.$t("searchEngine.runSearch")),1)]),_:1})):(S(),$(c,{key:1,color:"warning",flat:"",class:"mx-auto px-4",onClick:o[4]||(o[4]=s=>L(i.value))},{default:l(()=>[E(m(a.$t("searchEngine.stopSearch")),1)]),_:1}))]),_:1})]),_:1})]),_:1}),e($e,{class:"my-3"}),e(G,{class:"text-select"},{default:l(()=>[e(ee,{headers:N,items:p(_),"footer-props":{itemsPerPageOptions:[10,25,50,100,-1]},"items-per-page":i.value.itemsPerPage},{top:l(()=>[e(P,null,{default:l(()=>[e(b,{cols:"12"},{default:l(()=>[e(Z,{modelValue:i.value.filters.title,"onUpdate:modelValue":o[5]||(o[5]=s=>i.value.filters.title=s),density:"compact","hide-details":"",label:a.$t("searchEngine.filters.title.label")},null,8,["modelValue","label"])]),_:1})]),_:1})]),"item.fileSize":l(({item:s})=>[E(m(p(Ie)(s.fileSize,p(V).useBinarySize)),1)]),"item.actions":l(({item:s})=>[e(c,{icon:"mdi-open-in-new",variant:"flat",density:"compact",onClick:R(ne=>q(s),["stop"])},null,8,["onClick"]),e(c,{icon:"mdi-download",variant:"flat",density:"compact",onClick:ne=>n(s)},null,8,["onClick"])]),_:1},8,["items","items-per-page"])]),_:1})]),_:1})]))}})});export{He as default,__tla};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{g as Y,G as W,d as h,I as S,J as $,K as l,m as e,X as C,M as m,n as se,L as E,u as p,N as B,Q as ie,_ as oe,c as A,H as re,q as ue,W as H,T as ce,F as de,Y as fe,P as ge}from"./vue-BSryv7ps.js";import{a as me,J as X,V as j,c as pe,h as M,i as c,j as F,d as Q,e as ve,f as Z,g as O,K as ee,A as he,k as ye,l as Ve,m as ke,r as be,s as Ee,v as T,w as Se,x as b,o as we,M as Ce,N as _e,y as G,O as Pe,P as Te,z as J,B as $e,Q as Me,__tla as __tla_0}from"./index-bUuJUL5l.js";import"./vuetify-i5Qjiq6M.js";let ze;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{let Ne,Ie,De,Ue,qe;Ne=["href","title"];Ie=Y({__name:"PluginManagerDialog",props:{guid:{}},setup(R){const N=R,{isOpened:t}=me(N.guid),{t:y}=W(),d=X(),f=[{title:y("dialogs.pluginManager.headers.enabled"),key:"enabled",sortable:!1},{title:y("dialogs.pluginManager.headers.name"),key:"fullName"},{title:y("dialogs.pluginManager.headers.version"),key:"version"},{title:y("dialogs.pluginManager.headers.url"),key:"url"},{title:y("dialogs.pluginManager.headers.actions"),key:"actions"}],V=h(!1),k=h(!1),w=h(!1),v=h(!1),u=h("");async function I(r){await d.toggleSearchPlugin(r),await d.fetchSearchPlugins()}async function _(){k.value=!0,await d.updatePlugins().then(()=>new Promise(r=>setTimeout(r,2e3))),await d.fetchSearchPlugins(),k.value=!1}async function D(){P(),V.value=!0,await d.installSearchPlugin(u.value),u.value="",setTimeout(()=>{d.fetchSearchPlugins().then(()=>{V.value=!1})},1e3)}async function U(r){V.value=!0,await d.uninstallSearchPlugin(r.name),await d.fetchSearchPlugins(),V.value=!1}const i=()=>{t.value=!1};function P(){w.value=!1}return(r,g)=>(S(),$(F,{modelValue:p(t),"onUpdate:modelValue":g[4]||(g[4]=n=>ie(t)?t.value=n:null)},{default:l(()=>[e(j,null,{default:l(()=>[e(pe,{class:"d-flex"},{default:l(()=>[C("div",null,m(r.$t("dialogs.pluginManager.title")),1),e(M),e(c,{text:r.$t("dialogs.pluginManager.update"),color:"accent",class:"mr-2",loading:k.value,onClick:_},null,8,["text","loading"]),e(F,{modelValue:w.value,"onUpdate:modelValue":g[3]||(g[3]=n=>w.value=n)},{activator:l(({props:n})=>[e(c,se(n,{color:"primary"}),{default:l(()=>[E(m(r.$t("dialogs.pluginManager.install.activator")),1)]),_:2},1040)]),default:l(()=>[e(j,{title:r.$t("dialogs.pluginManager.install.title")},{default:l(()=>[e(Q,null,{default:l(()=>[e(p(ve),{modelValue:v.value,"onUpdate:modelValue":g[1]||(g[1]=n=>v.value=n),onSubmit:g[2]||(g[2]=B(()=>{},["prevent"]))},{default:l(()=>[e(Z,{modelValue:u.value,"onUpdate:modelValue":g[0]||(g[0]=n=>u.value=n),autofocus:"",label:r.$t("dialogs.pluginManager.install.label")},null,8,["modelValue","label"])]),_:1},8,["modelValue"])]),_:1}),e(O,null,{default:l(()=>[e(M),e(c,{color:"error",onClick:P},{default:l(()=>[E(m(r.$t("common.cancel")),1)]),_:1}),e(c,{color:"accent",onClick:D},{default:l(()=>[E(m(r.$t("common.ok")),1)]),_:1})]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1}),e(Q,null,{default:l(()=>[e(ee,{headers:f,"items-per-page":"-1",items:p(d).searchPlugins,"sort-by":[{key:"fullName",order:"asc"}],loading:V.value},{"item.enabled":l(({item:n})=>[e(he,{"model-value":n.enabled,onClick:q=>I(n)},null,8,["model-value","onClick"])]),"item.url":l(({item:n})=>[C("a",{href:n.url,title:n.name},m(n.url),9,Ne)]),"item.actions":l(({item:n})=>[e(ye,{color:"red",icon:"mdi-delete",onClick:q=>U(n)},null,8,["onClick"])]),tfoot:l(()=>[]),_:1},8,["items","loading"])]),_:1}),e(O,null,{default:l(()=>[e(M),e(c,{color:"accent",onClick:i},{default:l(()=>[E(m(r.$t("common.close")),1)]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"]))}});De={class:"pa-3"};Ue={style:{"font-size":"1.6em !important"},class:"subtitle-1 ml-2"};qe={class:"d-flex justify-end"};ze=Y({__name:"SearchEngine",setup(R){const N=ce(),{t}=W(),y=Ve(),d=ke(),f=X(),V=be(),k=h(),w=h(!1),v=h(0),{searchData:u}=oe(f),I=[{title:t("searchEngine.headers.fileName"),key:"fileName"},{title:t("searchEngine.headers.fileSize"),key:"fileSize"},{title:t("searchEngine.headers.nbSeeders"),key:"nbSeeders"},{title:t("searchEngine.headers.nbLeechers"),key:"nbLeechers"},{title:t("searchEngine.headers.siteUrl"),key:"siteUrl"},{title:"",key:"actions",sortable:!1}],_=[{title:t("searchEngine.filters.category.movies"),value:"movies"},{title:t("searchEngine.filters.category.tv"),value:"tv"},{title:t("searchEngine.filters.category.music"),value:"music"},{title:t("searchEngine.filters.category.games"),value:"games"},{title:t("searchEngine.filters.category.anime"),value:"anime"},{title:t("searchEngine.filters.category.software"),value:"software"},{title:t("searchEngine.filters.category.pictures"),value:"pictures"},{title:t("searchEngine.filters.category.books"),value:"books"}];_.sort((a,o)=>a.title.localeCompare(o.title));const D=[{title:t("searchEngine.filters.category.all"),value:"all"},..._],U=A(()=>{const a=[{title:t("searchEngine.filters.plugins.all"),value:"all"},{title:t("searchEngine.filters.plugins.enabled"),value:"enabled"}];return f.searchPlugins.filter(o=>o.enabled).forEach(o=>{a.push({title:o.name,value:o.name})}),a}),i=A(()=>u.value[v.value]??{}),{results:P}=Ee(()=>i.value.results,()=>i.value.filters?.title,a=>a.fileName);function r(){f.createNewTab(),v.value=u.value.length-1,k.value?.focus()}function g(){u.value.length!==1&&(f.deleteTab(i.value.uniqueId),v.value=Math.min(v.value,u.value.length-1))}function n(a){y.pushTorrentToQueue(a.fileUrl)}function q(a){window.open(a.descrLink,"_blank","noreferrer")}async function z(){await f.runNewSearch(i.value),i.value.timer=setInterval(()=>ae(i.value),1e3),k.value?.saveValueToHistory()}async function L(a){await f.stopSearch(a),a.timer&&clearInterval(a.timer)}function le(){u.value.forEach(L)}async function ae(a){await f.refreshResults(a)==="Stopped"&&await L(a)}const K=()=>{N.push({name:"dashboard"})};function te(){d.createDialog(Ie)}function x(a){if(d.hasActiveDialog||w.value)return!1;a.key==="Escape"&&K()}return re(async()=>{document.addEventListener("keydown",x),u.value.length===0?f.createNewTab():u.value.forEach(a=>{a.id&&a.id!==0&&(a.timer=setInterval(()=>f.refreshResults(a),1e3))}),await f.fetchSearchPlugins()}),ue(()=>{document.removeEventListener("keydown",x),u.value.forEach(a=>{a.timer&&clearInterval(a.timer)})}),(a,o)=>(S(),H("div",De,[e(T,{"no-gutters":"",align:"center",justify:"center"},{default:l(()=>[e(b,null,{default:l(()=>[C("h1",Ue,m(p(t)("searchEngine.title")),1)]),_:1}),e(b,null,{default:l(()=>[C("div",qe,[e(c,{icon:"mdi-stop",variant:"plain",color:"error",onClick:le}),e(c,{icon:"mdi-toy-brick",variant:"plain",color:"primary",onClick:te}),e(c,{icon:"mdi-close",variant:"plain",onClick:K})])]),_:1})]),_:1}),e(T,{class:"ma-0 pa-0"},{default:l(()=>[e(we,{class:"d-flex align-center justify-center ma-0 pa-0 bg-primary",fluid:""},{default:l(()=>[e(Ce,{modelValue:v.value,"onUpdate:modelValue":o[0]||(o[0]=s=>v.value=s),class:"overflow-auto","bg-color":"primary","show-arrows":""},{default:l(()=>[(S(!0),H(de,null,fe(p(u),s=>(S(),$(_e,{key:s.uniqueId},{default:l(()=>[C("h4",null,m(!s.query||s.query.length===0?a.$t("searchEngine.tabHeaderEmpty"):s.query),1)]),_:2},1024))),128))]),_:1},8,["modelValue"]),e(M),e(c,{icon:"mdi-plus-circle-outline",variant:"plain",color:"accent",onClick:r}),e(c,{icon:"mdi-minus-circle-outline",variant:"plain",color:"error",disabled:p(u).length===1,onClick:g},null,8,["disabled"])]),_:1})]),_:1}),e(Se,null,{default:l(()=>[e(G,null,{default:l(()=>[e(T,{class:"mt-1"},{default:l(()=>[e(b,{cols:"12",md:"6"},{default:l(()=>[e(Pe,{modelValue:i.value.query,"onUpdate:modelValue":o[1]||(o[1]=s=>i.value.query=s),"history-key":p(Te).SEARCH_ENGINE_QUERY,ref_key:"queryInput",ref:k,autofocus:"",density:"compact","hide-details":"",clearable:"",label:a.$t("searchEngine.query"),onKeydown:ge(B(z,["prevent"]),["enter"])},null,8,["modelValue","history-key","label","onKeydown"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:l(()=>[e(J,{modelValue:i.value.filters.category,"onUpdate:modelValue":o[2]||(o[2]=s=>i.value.filters.category=s),height:"1",variant:"outlined",density:"compact","hide-details":"",items:D,label:a.$t("searchEngine.filters.category.label")},null,8,["modelValue","label"])]),_:1}),e(b,{cols:"6",sm:"5",md:"2"},{default:l(()=>[e(J,{modelValue:i.value.filters.plugin,"onUpdate:modelValue":o[3]||(o[3]=s=>i.value.filters.plugin=s),flat:"",density:"compact","hide-details":"",variant:"outlined",items:U.value,label:a.$t("searchEngine.filters.plugins.label")},null,8,["modelValue","items","label"])]),_:1}),e(b,{cols:"12",sm:"2",class:"d-flex align-center justify-center"},{default:l(()=>[i.value.id===0?(S(),$(c,{key:0,color:"accent",flat:"",class:"mx-auto px-4",onClick:z},{default:l(()=>[E(m(a.$t("searchEngine.runSearch")),1)]),_:1})):(S(),$(c,{key:1,color:"warning",flat:"",class:"mx-auto px-4",onClick:o[4]||(o[4]=s=>L(i.value))},{default:l(()=>[E(m(a.$t("searchEngine.stopSearch")),1)]),_:1}))]),_:1})]),_:1})]),_:1}),e($e,{class:"my-3"}),e(G,{class:"text-select"},{default:l(()=>[e(ee,{headers:I,items:p(P),"footer-props":{itemsPerPageOptions:[10,25,50,100,-1]},"items-per-page":i.value.itemsPerPage},{top:l(()=>[e(T,null,{default:l(()=>[e(b,{cols:"12"},{default:l(()=>[e(Z,{modelValue:i.value.filters.title,"onUpdate:modelValue":o[5]||(o[5]=s=>i.value.filters.title=s),density:"compact","hide-details":"",label:a.$t("searchEngine.filters.title.label")},null,8,["modelValue","label"])]),_:1})]),_:1})]),"item.fileSize":l(({item:s})=>[E(m(p(Me)(s.fileSize,p(V).useBinarySize)),1)]),"item.actions":l(({item:s})=>[e(c,{icon:"mdi-open-in-new",variant:"flat",density:"compact",onClick:B(ne=>q(s),["stop"])},null,8,["onClick"]),e(c,{icon:"mdi-download",variant:"flat",density:"compact",onClick:ne=>n(s)},null,8,["onClick"])]),_:1},8,["items","items-per-page"])]),_:1})]),_:1})]))}})});export{ze as default,__tla};
|
|
||||||
1
qbit/vuetorrent/public/assets/Settings-CLaFHssc.js
Normal file
1
qbit/vuetorrent/public/assets/Settings-CLaFHssc.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
import{l as Re,j as g,m as Ge,o as Be,E as u,p as b,q as Ue,s as N,F as q,t as Ae,k as m,S as p,d as G,w as K,v as Ie,b as z,B as k,h as B,u as C,i as _,R as w,x as Fe,a as De,C as S,y as Y,z as Ee,G as Oe,H as ze,I as J,e as X,J as Le,P as He,c as We,D as Q,K as Ve,L as je,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{b as $e,S as Z,G as ee,f as te,U as re,T as L,h as H,B as Ne,i as qe,R as se,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";let Rt,T,Pt,Gt,Ct,Bt,st,wt,M,Mt,kt,Tt,St;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{const ae=class U extends $e{constructor(e){e={...U.defaultOptions,...e},super(e),this.enabled=!0,this._state=Z.for2d(),this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.addResource("uTexture",0,1)}apply(e,t,r,a){e.applyFilter(this,t,r,a)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:r,...a}=e;let n,i;return t&&(n=ee.from(t)),r&&(i=te.from(r)),new U({gpuProgram:n,glProgram:i,...a})}};ae.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1};let Ke=ae;var Ye=`in vec2 vMaskCoord;
|
import{l as Re,j as g,m as Ge,o as Be,E as u,p as b,q as Ue,s as N,F as q,t as Ae,k as m,S as p,d as G,w as K,v as Ie,b as z,B as k,h as B,u as C,i as _,R as w,x as Fe,a as De,C as S,y as Y,z as Ee,G as Oe,H as ze,I as J,e as X,J as Le,P as He,c as We,D as Q,K as Ve,L as je,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";import{b as $e,S as Z,G as ee,f as te,U as re,T as L,h as H,B as Ne,i as qe,R as se,__tla as __tla_1}from"./colorToUniform-Bf80N278.js";let Rt,T,Pt,Gt,Ct,Bt,st,wt,M,Mt,kt,Tt,St;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{const ae=class U extends $e{constructor(e){e={...U.defaultOptions,...e},super(e),this.enabled=!0,this._state=Z.for2d(),this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.addResource("uTexture",0,1)}apply(e,t,r,a){e.applyFilter(this,t,r,a)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:t,gl:r,...a}=e;let n,i;return t&&(n=ee.from(t)),r&&(i=te.from(r)),new U({gpuProgram:n,glProgram:i,...a})}};ae.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1};let Ke=ae;var Ye=`in vec2 vMaskCoord;
|
||||||
in vec2 vTextureCoord;
|
in vec2 vTextureCoord;
|
||||||
|
|
||||||
uniform sampler2D uTexture;
|
uniform sampler2D uTexture;
|
||||||
@@ -306,6 +306,6 @@ fn mainFragment(
|
|||||||
data[offset + 1] = v[1];
|
data[offset + 1] = v[1];
|
||||||
data[offset + 2] = v[2];
|
data[offset + 2] = v[2];
|
||||||
data[offset + 3] = v[3];
|
data[offset + 3] = v[3];
|
||||||
`};function at(s,e,t,r,a,n){const i=n?1:-1;return s.identity(),s.a=1/r*2,s.d=i*(1/a*2),s.tx=-1-e*s.a,s.ty=-i-t*s.d,s}const x=new Map;function de(s,e){if(!x.has(s)){const t=new m({source:new B({resource:s,...e})}),r=()=>{x.get(s)===t&&x.delete(s)};t.once("destroy",r),t.source.once("destroy",r),x.set(s,t)}return x.get(s)}function nt(s){const e=s.colorTexture.source.resource;return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement&&document.body.contains(e)}const ce=class he{constructor(e={}){if(this.uid=C("renderTarget"),this.colorTextures=[],this.dirtyId=0,this.isRoot=!1,this._size=new Float32Array(2),e={...he.defaultOptions,...e},this.stencil=e.stencil,this.depth=e.depth,this.isRoot=e.isRoot,typeof e.colorTextures=="number")for(let t=0;t<e.colorTextures;t++)this.colorTextures.push(new _({width:e.width,height:e.height,resolution:e.resolution,antialias:e.antialias}));else{this.colorTextures=[...e.colorTextures.map(r=>r.source)];const t=this.colorTexture.source;this.resize(t.width,t.height,t._resolution)}this.colorTexture.source.on("resize",this.onSourceResize,this),(e.depthStencilTexture||this.stencil)&&(e.depthStencilTexture instanceof m||e.depthStencilTexture instanceof _?this.depthStencilTexture=e.depthStencilTexture.source:this.ensureDepthStencilTexture())}get size(){const e=this._size;return e[0]=this.pixelWidth,e[1]=this.pixelHeight,e}get width(){return this.colorTexture.source.width}get height(){return this.colorTexture.source.height}get pixelWidth(){return this.colorTexture.source.pixelWidth}get pixelHeight(){return this.colorTexture.source.pixelHeight}get resolution(){return this.colorTexture.source._resolution}get colorTexture(){return this.colorTextures[0]}onSourceResize(e){this.resize(e.width,e.height,e._resolution,!0)}ensureDepthStencilTexture(){this.depthStencilTexture||(this.depthStencilTexture=new _({width:this.width,height:this.height,resolution:this.resolution,format:"depth24plus-stencil8",autoGenerateMipmaps:!1,antialias:!1,mipLevelCount:1}))}resize(e,t,r=this.resolution,a=!1){this.dirtyId++,this.colorTextures.forEach((n,i)=>{a&&i===0||n.source.resize(e,t,r)}),this.depthStencilTexture&&this.depthStencilTexture.source.resize(e,t,r)}destroy(){this.colorTexture.source.off("resize",this.onSourceResize,this),this.depthStencilTexture&&(this.depthStencilTexture.destroy(),delete this.depthStencilTexture)}};ce.defaultOptions={width:0,height:0,resolution:1,colorTextures:1,stencil:!1,depth:!1,antialias:!1,isRoot:!1};let A=ce;Pt=class{constructor(e){this.rootViewPort=new w,this.viewport=new w,this.onRenderTargetChange=new Fe("onRenderTargetChange"),this.projectionMatrix=new g,this.defaultClearColor=[0,0,0,0],this._renderSurfaceToRenderTargetHash=new Map,this._gpuRenderTargetHash=Object.create(null),this._renderTargetStack=[],this._renderer=e}finishRenderPass(){this.adaptor.finishRenderPass(this.renderTarget)}renderStart({target:e,clear:t,clearColor:r,frame:a}){this._renderTargetStack.length=0,this.push(e,t,r,a),this.rootViewPort.copyFrom(this.viewport),this.rootRenderTarget=this.renderTarget,this.renderingToScreen=nt(this.rootRenderTarget)}bind(e,t=!0,r,a){const n=this.getRenderTarget(e),i=this.renderTarget!==n;this.renderTarget=n,this.renderSurface=e;const l=this.getGpuRenderTarget(n);(n.pixelWidth!==l.width||n.pixelHeight!==l.height)&&(this.adaptor.resizeGpuRenderTarget(n),l.width=n.pixelWidth,l.height=n.pixelHeight);const o=n.colorTexture,d=this.viewport,c=o.pixelWidth,h=o.pixelHeight;if(!a&&e instanceof m&&(a=e.frame),a){const f=o._resolution;d.x=a.x*f+.5|0,d.y=a.y*f+.5|0,d.width=a.width*f+.5|0,d.height=a.height*f+.5|0}else d.x=0,d.y=0,d.width=c,d.height=h;return at(this.projectionMatrix,0,0,d.width/o.resolution,d.height/o.resolution,!n.isRoot),this.adaptor.startRenderPass(n,t,r,d),i&&this.onRenderTargetChange.emit(n),n}clear(e,t=G.ALL,r){t&&(e&&(e=this.getRenderTarget(e)),this.adaptor.clear(e||this.renderTarget,t,r,this.viewport))}contextChange(){this._gpuRenderTargetHash=Object.create(null)}push(e,t=G.ALL,r,a){const n=this.bind(e,t,r,a);return this._renderTargetStack.push({renderTarget:n,frame:a}),n}pop(){this._renderTargetStack.pop();const e=this._renderTargetStack[this._renderTargetStack.length-1];this.bind(e.renderTarget,!1,null,e.frame)}getRenderTarget(e){return e.isTexture&&(e=e.source),this._renderSurfaceToRenderTargetHash.get(e)??this._initRenderTarget(e)}copyToTexture(e,t,r,a,n){r.x<0&&(a.width+=r.x,n.x-=r.x,r.x=0),r.y<0&&(a.height+=r.y,n.y-=r.y,r.y=0);const{pixelWidth:i,pixelHeight:l}=e;return a.width=Math.min(a.width,i-r.x),a.height=Math.min(a.height,l-r.y),this.adaptor.copyToTexture(e,t,r,a,n)}ensureDepthStencil(){this.renderTarget.stencil||(this.renderTarget.stencil=!0,this.adaptor.startRenderPass(this.renderTarget,!1,null,this.viewport))}destroy(){this._renderer=null,this._renderSurfaceToRenderTargetHash.forEach((e,t)=>{e!==t&&e.destroy()}),this._renderSurfaceToRenderTargetHash.clear(),this._gpuRenderTargetHash=Object.create(null)}_initRenderTarget(e){let t=null;return B.test(e)&&(e=de(e)),e instanceof A?t=e:e instanceof _&&(t=new A({colorTextures:[e]}),B.test(e.source.resource)&&(t.isRoot=!0),e.on("destroy",()=>{t.destroy()})),this._renderSurfaceToRenderTargetHash.set(e,t),t}getGpuRenderTarget(e){return this._gpuRenderTargetHash[e.uid]||(this._gpuRenderTargetHash[e.uid]=this.adaptor.initGpuRenderTarget(e))}};Rt=class extends De{constructor({buffer:e,offset:t,size:r}){super(),this.uid=C("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=C("resource"),this._bufferResource=!0,this.buffer=e,this.offset=t|0,this.size=r,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=C("resource"),this.emit("change",this)}destroy(e=!1){e&&this.buffer.destroy(),this.buffer=null}};class fe{constructor(e){this._renderer=e}addRenderable(e,t){this._renderer.renderPipes.batch.break(t),t.add(e)}execute(e){e.isRenderable&&e.render(this._renderer)}destroy(){this._renderer=null}}fe.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"customRender"};function pe(s,e){const t=s.instructionSet,r=t.instructions;for(let a=0;a<t.instructionSize;a++){const n=r[a];e[n.renderPipeId].execute(n)}}class me{constructor(e){this._renderer=e}addRenderGroup(e,t){this._renderer.renderPipes.batch.break(t),t.add(e)}execute(e){e.isRenderable&&(this._renderer.globalUniforms.push({worldTransformMatrix:e.worldTransform,worldColor:e.worldColorAlpha}),pe(e,this._renderer.renderPipes),this._renderer.globalUniforms.pop())}destroy(){this._renderer=null}}me.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"renderGroup"};function ge(s,e=[]){e.push(s);for(let t=0;t<s.renderGroupChildren.length;t++)ge(s.renderGroupChildren[t],e);return e}const it=new S;function ve(s,e=!1){ot(s);const t=s.childrenToUpdate,r=s.updateTick;s.updateTick++;for(const a in t){const n=t[a],i=n.list,l=n.index;for(let o=0;o<l;o++)xe(i[o],r,0);n.index=0}if(e)for(let a=0;a<s.renderGroupChildren.length;a++)ve(s.renderGroupChildren[a],e)}function ot(s){const e=s.root;let t;if(s.renderGroupParent){const r=s.renderGroupParent;s.worldTransform.appendFrom(e.relativeGroupTransform,r.worldTransform),s.worldColor=Y(e.groupColor,r.worldColor),t=e.groupAlpha*r.worldAlpha}else s.worldTransform.copyFrom(e.localTransform),s.worldColor=e.localColor,t=e.localAlpha;t=t<0?0:t>1?1:t,s.worldAlpha=t,s.worldColorAlpha=s.worldColor+((t*255|0)<<24)}function xe(s,e,t){if(e===s.updateTick)return;s.updateTick=e,s.didChange=!1;const r=s.localTransform;s.updateLocalTransform();const a=s.parent;if(a&&!a.isRenderGroupRoot?(t=t|s._updateFlags,s.relativeGroupTransform.appendFrom(r,a.relativeGroupTransform),t&&V(s,a,t)):(t=s._updateFlags,s.relativeGroupTransform.copyFrom(r),t&&V(s,it,t)),!s.isRenderGroupRoot){const n=s.children,i=n.length;for(let o=0;o<i;o++)xe(n[o],e,t);const l=s.renderGroup;s.renderPipeId&&!l.structureDidChange&&l.updateRenderable(s)}}function V(s,e,t){if(t&Ee){s.groupColor=Y(s.localColor,e.groupColor);let r=s.localAlpha*e.groupAlpha;r=r<0?0:r>1?1:r,s.groupAlpha=r,s.groupColorAlpha=s.groupColor+((r*255|0)<<24)}t&Oe&&(s.groupBlendMode=s.localBlendMode==="inherit"?e.groupBlendMode:s.localBlendMode),t&ze&&(s.globalDisplayStatus=s.localDisplayStatus&e.globalDisplayStatus),s._updateFlags=0}function lt(s,e){const{list:t,index:r}=s.childrenRenderablesToUpdate;let a=!1;for(let n=0;n<r;n++){const i=t[n];if(a=e[i.renderPipeId].validateRenderable(i),a)break}return s.structureDidChange=a,a}const ut=new g;class be{constructor(e){this._renderer=e}render({container:e,transform:t}){e.isRenderGroup=!0;const r=e.parent,a=e.renderGroup.renderGroupParent;e.parent=null,e.renderGroup.renderGroupParent=null;const n=this._renderer,i=ge(e.renderGroup,[]);let l=ut;t&&(l=l.copyFrom(e.renderGroup.localTransform),e.renderGroup.localTransform.copyFrom(t));const o=n.renderPipes;for(let d=0;d<i.length;d++){const c=i[d];c.runOnRender(),c.instructionSet.renderPipes=o,c.structureDidChange||lt(c,o),ve(c),c.structureDidChange?(c.structureDidChange=!1,Qe(c,o)):dt(c),c.childrenRenderablesToUpdate.index=0,n.renderPipes.batch.upload(c.instructionSet)}n.globalUniforms.start({worldTransformMatrix:t?e.renderGroup.localTransform:e.renderGroup.worldTransform,worldColor:e.renderGroup.worldColorAlpha}),pe(e.renderGroup,o),o.uniformBatch&&o.uniformBatch.renderEnd(),t&&e.renderGroup.localTransform.copyFrom(l),e.parent=r,e.renderGroup.renderGroupParent=a}destroy(){this._renderer=null}}be.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"renderGroup"};function dt(s){const{list:e,index:t}=s.childrenRenderablesToUpdate;for(let r=0;r<t;r++){const a=e[r];a.didViewUpdate&&s.updateRenderable(a)}}class _e{constructor(e){this._gpuSpriteHash=Object.create(null),this._renderer=e}addRenderable(e,t){const r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t.batcher.updateElement(t)}validateRenderable(e){const t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source?!r.batcher.checkAndUpdateTexture(r,t):!1}destroyRenderable(e){const t=this._gpuSpriteHash[e.uid];b.return(t),this._gpuSpriteHash[e.uid]=null}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.bounds=e.bounds,t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){const t=b.get(Ne);return t.renderable=e,t.texture=e._texture,t.bounds=e.bounds,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e._didSpriteUpdate=!1,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuSpriteHash)b.return(this._gpuSpriteHash[e]);this._gpuSpriteHash=null,this._renderer=null}}_e.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"sprite"};const I=class ye{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new J(0),this.color=this._backgroundColor,this.alpha=1}init(e){e={...ye.defaultOptions,...e},this.clearBeforeRender=e.clearBeforeRender,this.color=e.background||e.backgroundColor||this._backgroundColor,this.alpha=e.backgroundAlpha,this._backgroundColor.setAlpha(e.backgroundAlpha)}get color(){return this._backgroundColor}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get colorRgba(){return this._backgroundColor.toArray()}destroy(){}};I.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"background",priority:0};I.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};let ct=I;const y={};X.handle(u.BlendMode,s=>{if(!s.name)throw new Error("BlendMode extension must have a name property");y[s.name]=s.ref},s=>{delete y[s.name]});class Te{constructor(e){this._isAdvanced=!1,this._filterHash=Object.create(null),this._renderer=e}setBlendMode(e,t,r){if(this._activeBlendMode===t){this._isAdvanced&&this._renderableList.push(e);return}this._activeBlendMode=t,this._isAdvanced&&this._endAdvancedBlendMode(r),this._isAdvanced=!!y[t],this._isAdvanced&&(this._beginAdvancedBlendMode(r),this._renderableList.push(e))}_beginAdvancedBlendMode(e){this._renderer.renderPipes.batch.break(e);const t=this._activeBlendMode;if(!y[t]){K(`Unable to assign BlendMode: '${t}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);return}this._filterHash[t]||(this._filterHash[t]=new q({filters:[new y[t]]}));const r={renderPipeId:"filter",action:"pushFilter",renderables:[],filterEffect:this._filterHash[t],canBundle:!1};this._renderableList=r.renderables,e.add(r)}_endAdvancedBlendMode(e){this._renderableList=null,this._renderer.renderPipes.batch.break(e),e.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}buildStart(){this._isAdvanced=!1}buildEnd(e){this._isAdvanced&&this._endAdvancedBlendMode(e)}destroy(){this._renderer=null,this._renderableList=null;for(const e in this._filterHash)this._filterHash[e].destroy();this._filterHash=null}}Te.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"blendMode"};const R={png:"image/png",jpg:"image/jpeg",webp:"image/webp"},F=class ke{constructor(e){this._renderer=e}_normalizeOptions(e,t={}){return e instanceof S||e instanceof m?{target:e,...t}:{...t,...e}}async image(e){const t=new Image;return t.src=await this.base64(e),t}async base64(e){e=this._normalizeOptions(e,ke.defaultImageOptions);const{format:t,quality:r}=e,a=this.canvas(e);if(a.toBlob!==void 0)return new Promise((n,i)=>{a.toBlob(l=>{if(!l){i(new Error("ICanvas.toBlob failed!"));return}const o=new FileReader;o.onload=()=>n(o.result),o.onerror=i,o.readAsDataURL(l)},R[t],r)});if(a.toDataURL!==void 0)return a.toDataURL(R[t],r);if(a.convertToBlob!==void 0){const n=await a.convertToBlob({type:R[t],quality:r});return new Promise((i,l)=>{const o=new FileReader;o.onload=()=>i(o.result),o.onerror=l,o.readAsDataURL(n)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e){e=this._normalizeOptions(e);const t=e.target,r=this._renderer;if(t instanceof m)return r.texture.generateCanvas(t);const a=r.textureGenerator.generateTexture(e),n=r.texture.generateCanvas(a);return a.destroy(),n}pixels(e){e=this._normalizeOptions(e);const t=e.target,r=this._renderer,a=t instanceof m?t:r.textureGenerator.generateTexture(e),n=r.texture.getPixels(a);return t instanceof S&&a.destroy(),n}texture(e){return e=this._normalizeOptions(e),e.target instanceof m?e.target:this._renderer.textureGenerator.generateTexture(e)}download(e){e=this._normalizeOptions(e);const t=this.canvas(e),r=document.createElement("a");r.download=e.filename??"image.png",r.href=t.toDataURL("image/png"),document.body.appendChild(r),r.click(),document.body.removeChild(r)}log(e){const t=e.width??200;e=this._normalizeOptions(e);const r=this.canvas(e),a=r.toDataURL();console.log(`[Pixi Texture] ${r.width}px ${r.height}px`);const n=["font-size: 1px;",`padding: ${t}px 300px;`,`background: url(${a}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n)}destroy(){this._renderer=null}};F.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"extract"};F.defaultImageOptions={format:"png",quality:1};let ht=F;class ft extends m{static create(e){return new m({source:new _(e)})}resize(e,t,r){return this.source.resize(e,t,r),this}}const pt=new w,mt=new N,gt=[0,0,0,0];class Me{constructor(e){this._renderer=e}generateTexture(e){e instanceof S&&(e={target:e,frame:void 0,textureSourceOptions:{},resolution:void 0});const t=e.resolution||this._renderer.resolution,r=e.antialias||this._renderer.view.antialias,a=e.target;let n=e.clearColor;n?n=Array.isArray(n)&&n.length===4?n:J.shared.setValue(n).toArray():n=gt;const i=e.frame?.copyTo(pt)||Le(a,mt).rectangle;i.width=Math.max(i.width,1/t)|0,i.height=Math.max(i.height,1/t)|0;const l=ft.create({...e.textureSourceOptions,width:i.width,height:i.height,resolution:t,antialias:r}),o=g.shared.translate(-i.x,-i.y);return this._renderer.render({container:a,transform:o,target:l,clearColor:n}),l}destroy(){this._renderer=null}}Me.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"textureGenerator"};class Ce{constructor(e){this._stackIndex=0,this._globalUniformDataStack=[],this._uniformsPool=[],this._activeUniforms=[],this._bindGroupPool=[],this._activeBindGroups=[],this._renderer=e}reset(){this._stackIndex=0;for(let e=0;e<this._activeUniforms.length;e++)this._uniformsPool.push(this._activeUniforms[e]);for(let e=0;e<this._activeBindGroups.length;e++)this._bindGroupPool.push(this._activeBindGroups[e]);this._activeUniforms.length=0,this._activeBindGroups.length=0}start(e){this.reset(),this.push(e)}bind({size:e,projectionMatrix:t,worldTransformMatrix:r,worldColor:a,offset:n}){const i=this._renderer.renderTarget.renderTarget,l=this._stackIndex?this._globalUniformDataStack[this._stackIndex-1]:{projectionData:i,worldTransformMatrix:new g,worldColor:4294967295,offset:new He},o={projectionMatrix:t||this._renderer.renderTarget.projectionMatrix,resolution:e||i.size,worldTransformMatrix:r||l.worldTransformMatrix,worldColor:a||l.worldColor,offset:n||l.offset,bindGroup:null},d=this._uniformsPool.pop()||this._createUniforms();this._activeUniforms.push(d);const c=d.uniforms;c.uProjectionMatrix=o.projectionMatrix,c.uResolution=o.resolution,c.uWorldTransformMatrix.copyFrom(o.worldTransformMatrix),c.uWorldTransformMatrix.tx-=o.offset.x,c.uWorldTransformMatrix.ty-=o.offset.y,qe(o.worldColor,c.uWorldColorAlpha,0),d.update();let h;this._renderer.renderPipes.uniformBatch?h=this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d,!1):(h=this._bindGroupPool.pop()||new We,this._activeBindGroups.push(h),h.setResource(d,0)),o.bindGroup=h,this._currentGlobalUniformData=o}push(e){this.bind(e),this._globalUniformDataStack[this._stackIndex++]=this._currentGlobalUniformData}pop(){this._currentGlobalUniformData=this._globalUniformDataStack[--this._stackIndex-1],this._renderer.type===se.WEBGL&&this._currentGlobalUniformData.bindGroup.resources[0].update()}get bindGroup(){return this._currentGlobalUniformData.bindGroup}get uniformGroup(){return this._currentGlobalUniformData.bindGroup.resources[0]}_createUniforms(){return new re({uProjectionMatrix:{value:new g,type:"mat3x3<f32>"},uWorldTransformMatrix:{value:new g,type:"mat3x3<f32>"},uWorldColorAlpha:{value:new Float32Array(4),type:"vec4<f32>"},uResolution:{value:[0,0],type:"vec2<f32>"}},{isStatic:!0})}destroy(){this._renderer=null}}Ce.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"globalUniforms"};let j=!1;const $="8.0.4";function vt(s){if(!j){if(Q.get().getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){const e=[`%c %c %c %c %c PixiJS %c v${$} (${s}) http://www.pixijs.com/
|
`};function at(s,e,t,r,a,n){const i=n?1:-1;return s.identity(),s.a=1/r*2,s.d=i*(1/a*2),s.tx=-1-e*s.a,s.ty=-i-t*s.d,s}const x=new Map;function de(s,e){if(!x.has(s)){const t=new m({source:new B({resource:s,...e})}),r=()=>{x.get(s)===t&&x.delete(s)};t.once("destroy",r),t.source.once("destroy",r),x.set(s,t)}return x.get(s)}function nt(s){const e=s.colorTexture.source.resource;return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement&&document.body.contains(e)}const ce=class he{constructor(e={}){if(this.uid=C("renderTarget"),this.colorTextures=[],this.dirtyId=0,this.isRoot=!1,this._size=new Float32Array(2),e={...he.defaultOptions,...e},this.stencil=e.stencil,this.depth=e.depth,this.isRoot=e.isRoot,typeof e.colorTextures=="number")for(let t=0;t<e.colorTextures;t++)this.colorTextures.push(new _({width:e.width,height:e.height,resolution:e.resolution,antialias:e.antialias}));else{this.colorTextures=[...e.colorTextures.map(r=>r.source)];const t=this.colorTexture.source;this.resize(t.width,t.height,t._resolution)}this.colorTexture.source.on("resize",this.onSourceResize,this),(e.depthStencilTexture||this.stencil)&&(e.depthStencilTexture instanceof m||e.depthStencilTexture instanceof _?this.depthStencilTexture=e.depthStencilTexture.source:this.ensureDepthStencilTexture())}get size(){const e=this._size;return e[0]=this.pixelWidth,e[1]=this.pixelHeight,e}get width(){return this.colorTexture.source.width}get height(){return this.colorTexture.source.height}get pixelWidth(){return this.colorTexture.source.pixelWidth}get pixelHeight(){return this.colorTexture.source.pixelHeight}get resolution(){return this.colorTexture.source._resolution}get colorTexture(){return this.colorTextures[0]}onSourceResize(e){this.resize(e.width,e.height,e._resolution,!0)}ensureDepthStencilTexture(){this.depthStencilTexture||(this.depthStencilTexture=new _({width:this.width,height:this.height,resolution:this.resolution,format:"depth24plus-stencil8",autoGenerateMipmaps:!1,antialias:!1,mipLevelCount:1}))}resize(e,t,r=this.resolution,a=!1){this.dirtyId++,this.colorTextures.forEach((n,i)=>{a&&i===0||n.source.resize(e,t,r)}),this.depthStencilTexture&&this.depthStencilTexture.source.resize(e,t,r)}destroy(){this.colorTexture.source.off("resize",this.onSourceResize,this),this.depthStencilTexture&&(this.depthStencilTexture.destroy(),delete this.depthStencilTexture)}};ce.defaultOptions={width:0,height:0,resolution:1,colorTextures:1,stencil:!1,depth:!1,antialias:!1,isRoot:!1};let A=ce;Pt=class{constructor(e){this.rootViewPort=new w,this.viewport=new w,this.onRenderTargetChange=new Fe("onRenderTargetChange"),this.projectionMatrix=new g,this.defaultClearColor=[0,0,0,0],this._renderSurfaceToRenderTargetHash=new Map,this._gpuRenderTargetHash=Object.create(null),this._renderTargetStack=[],this._renderer=e}finishRenderPass(){this.adaptor.finishRenderPass(this.renderTarget)}renderStart({target:e,clear:t,clearColor:r,frame:a}){this._renderTargetStack.length=0,this.push(e,t,r,a),this.rootViewPort.copyFrom(this.viewport),this.rootRenderTarget=this.renderTarget,this.renderingToScreen=nt(this.rootRenderTarget)}bind(e,t=!0,r,a){const n=this.getRenderTarget(e),i=this.renderTarget!==n;this.renderTarget=n,this.renderSurface=e;const l=this.getGpuRenderTarget(n);(n.pixelWidth!==l.width||n.pixelHeight!==l.height)&&(this.adaptor.resizeGpuRenderTarget(n),l.width=n.pixelWidth,l.height=n.pixelHeight);const o=n.colorTexture,d=this.viewport,c=o.pixelWidth,h=o.pixelHeight;if(!a&&e instanceof m&&(a=e.frame),a){const f=o._resolution;d.x=a.x*f+.5|0,d.y=a.y*f+.5|0,d.width=a.width*f+.5|0,d.height=a.height*f+.5|0}else d.x=0,d.y=0,d.width=c,d.height=h;return at(this.projectionMatrix,0,0,d.width/o.resolution,d.height/o.resolution,!n.isRoot),this.adaptor.startRenderPass(n,t,r,d),i&&this.onRenderTargetChange.emit(n),n}clear(e,t=G.ALL,r){t&&(e&&(e=this.getRenderTarget(e)),this.adaptor.clear(e||this.renderTarget,t,r,this.viewport))}contextChange(){this._gpuRenderTargetHash=Object.create(null)}push(e,t=G.ALL,r,a){const n=this.bind(e,t,r,a);return this._renderTargetStack.push({renderTarget:n,frame:a}),n}pop(){this._renderTargetStack.pop();const e=this._renderTargetStack[this._renderTargetStack.length-1];this.bind(e.renderTarget,!1,null,e.frame)}getRenderTarget(e){return e.isTexture&&(e=e.source),this._renderSurfaceToRenderTargetHash.get(e)??this._initRenderTarget(e)}copyToTexture(e,t,r,a,n){r.x<0&&(a.width+=r.x,n.x-=r.x,r.x=0),r.y<0&&(a.height+=r.y,n.y-=r.y,r.y=0);const{pixelWidth:i,pixelHeight:l}=e;return a.width=Math.min(a.width,i-r.x),a.height=Math.min(a.height,l-r.y),this.adaptor.copyToTexture(e,t,r,a,n)}ensureDepthStencil(){this.renderTarget.stencil||(this.renderTarget.stencil=!0,this.adaptor.startRenderPass(this.renderTarget,!1,null,this.viewport))}destroy(){this._renderer=null,this._renderSurfaceToRenderTargetHash.forEach((e,t)=>{e!==t&&e.destroy()}),this._renderSurfaceToRenderTargetHash.clear(),this._gpuRenderTargetHash=Object.create(null)}_initRenderTarget(e){let t=null;return B.test(e)&&(e=de(e)),e instanceof A?t=e:e instanceof _&&(t=new A({colorTextures:[e]}),B.test(e.source.resource)&&(t.isRoot=!0),e.on("destroy",()=>{t.destroy()})),this._renderSurfaceToRenderTargetHash.set(e,t),t}getGpuRenderTarget(e){return this._gpuRenderTargetHash[e.uid]||(this._gpuRenderTargetHash[e.uid]=this.adaptor.initGpuRenderTarget(e))}};Rt=class extends De{constructor({buffer:e,offset:t,size:r}){super(),this.uid=C("buffer"),this._resourceType="bufferResource",this._touched=0,this._resourceId=C("resource"),this._bufferResource=!0,this.destroyed=!1,this.buffer=e,this.offset=t|0,this.size=r,this.buffer.on("change",this.onBufferChange,this)}onBufferChange(){this._resourceId=C("resource"),this.emit("change",this)}destroy(e=!1){this.destroyed=!0,e&&this.buffer.destroy(),this.emit("change",this),this.buffer=null}};class fe{constructor(e){this._renderer=e}addRenderable(e,t){this._renderer.renderPipes.batch.break(t),t.add(e)}execute(e){e.isRenderable&&e.render(this._renderer)}destroy(){this._renderer=null}}fe.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"customRender"};function pe(s,e){const t=s.instructionSet,r=t.instructions;for(let a=0;a<t.instructionSize;a++){const n=r[a];e[n.renderPipeId].execute(n)}}class me{constructor(e){this._renderer=e}addRenderGroup(e,t){this._renderer.renderPipes.batch.break(t),t.add(e)}execute(e){e.isRenderable&&(this._renderer.globalUniforms.push({worldTransformMatrix:e.worldTransform,worldColor:e.worldColorAlpha}),pe(e,this._renderer.renderPipes),this._renderer.globalUniforms.pop())}destroy(){this._renderer=null}}me.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"renderGroup"};function ge(s,e=[]){e.push(s);for(let t=0;t<s.renderGroupChildren.length;t++)ge(s.renderGroupChildren[t],e);return e}const it=new S;function ve(s,e=!1){ot(s);const t=s.childrenToUpdate,r=s.updateTick;s.updateTick++;for(const a in t){const n=t[a],i=n.list,l=n.index;for(let o=0;o<l;o++)xe(i[o],r,0);n.index=0}if(e)for(let a=0;a<s.renderGroupChildren.length;a++)ve(s.renderGroupChildren[a],e)}function ot(s){const e=s.root;let t;if(s.renderGroupParent){const r=s.renderGroupParent;s.worldTransform.appendFrom(e.relativeGroupTransform,r.worldTransform),s.worldColor=Y(e.groupColor,r.worldColor),t=e.groupAlpha*r.worldAlpha}else s.worldTransform.copyFrom(e.localTransform),s.worldColor=e.localColor,t=e.localAlpha;t=t<0?0:t>1?1:t,s.worldAlpha=t,s.worldColorAlpha=s.worldColor+((t*255|0)<<24)}function xe(s,e,t){if(e===s.updateTick)return;s.updateTick=e,s.didChange=!1;const r=s.localTransform;s.updateLocalTransform();const a=s.parent;if(a&&!a.isRenderGroupRoot?(t=t|s._updateFlags,s.relativeGroupTransform.appendFrom(r,a.relativeGroupTransform),t&&V(s,a,t)):(t=s._updateFlags,s.relativeGroupTransform.copyFrom(r),t&&V(s,it,t)),!s.isRenderGroupRoot){const n=s.children,i=n.length;for(let o=0;o<i;o++)xe(n[o],e,t);const l=s.renderGroup;s.renderPipeId&&!l.structureDidChange&&l.updateRenderable(s)}}function V(s,e,t){if(t&Ee){s.groupColor=Y(s.localColor,e.groupColor);let r=s.localAlpha*e.groupAlpha;r=r<0?0:r>1?1:r,s.groupAlpha=r,s.groupColorAlpha=s.groupColor+((r*255|0)<<24)}t&Oe&&(s.groupBlendMode=s.localBlendMode==="inherit"?e.groupBlendMode:s.localBlendMode),t&ze&&(s.globalDisplayStatus=s.localDisplayStatus&e.globalDisplayStatus),s._updateFlags=0}function lt(s,e){const{list:t,index:r}=s.childrenRenderablesToUpdate;let a=!1;for(let n=0;n<r;n++){const i=t[n];if(a=e[i.renderPipeId].validateRenderable(i),a)break}return s.structureDidChange=a,a}const ut=new g;class be{constructor(e){this._renderer=e}render({container:e,transform:t}){e.isRenderGroup=!0;const r=e.parent,a=e.renderGroup.renderGroupParent;e.parent=null,e.renderGroup.renderGroupParent=null;const n=this._renderer,i=ge(e.renderGroup,[]);let l=ut;t&&(l=l.copyFrom(e.renderGroup.localTransform),e.renderGroup.localTransform.copyFrom(t));const o=n.renderPipes;for(let d=0;d<i.length;d++){const c=i[d];c.runOnRender(),c.instructionSet.renderPipes=o,c.structureDidChange||lt(c,o),ve(c),c.structureDidChange?(c.structureDidChange=!1,Qe(c,o)):dt(c),c.childrenRenderablesToUpdate.index=0,n.renderPipes.batch.upload(c.instructionSet)}n.globalUniforms.start({worldTransformMatrix:t?e.renderGroup.localTransform:e.renderGroup.worldTransform,worldColor:e.renderGroup.worldColorAlpha}),pe(e.renderGroup,o),o.uniformBatch&&o.uniformBatch.renderEnd(),t&&e.renderGroup.localTransform.copyFrom(l),e.parent=r,e.renderGroup.renderGroupParent=a}destroy(){this._renderer=null}}be.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"renderGroup"};function dt(s){const{list:e,index:t}=s.childrenRenderablesToUpdate;for(let r=0;r<t;r++){const a=e[r];a.didViewUpdate&&s.updateRenderable(a)}}class _e{constructor(e){this._gpuSpriteHash=Object.create(null),this._renderer=e}addRenderable(e,t){const r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t.batcher.updateElement(t)}validateRenderable(e){const t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source?!r.batcher.checkAndUpdateTexture(r,t):!1}destroyRenderable(e){const t=this._gpuSpriteHash[e.uid];b.return(t),this._gpuSpriteHash[e.uid]=null}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.bounds=e.bounds,t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){const t=b.get(Ne);return t.renderable=e,t.texture=e._texture,t.bounds=e.bounds,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e._didSpriteUpdate=!1,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuSpriteHash)b.return(this._gpuSpriteHash[e]);this._gpuSpriteHash=null,this._renderer=null}}_e.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"sprite"};const I=class ye{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new J(0),this.color=this._backgroundColor,this.alpha=1}init(e){e={...ye.defaultOptions,...e},this.clearBeforeRender=e.clearBeforeRender,this.color=e.background||e.backgroundColor||this._backgroundColor,this.alpha=e.backgroundAlpha,this._backgroundColor.setAlpha(e.backgroundAlpha)}get color(){return this._backgroundColor}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get colorRgba(){return this._backgroundColor.toArray()}destroy(){}};I.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"background",priority:0};I.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};let ct=I;const y={};X.handle(u.BlendMode,s=>{if(!s.name)throw new Error("BlendMode extension must have a name property");y[s.name]=s.ref},s=>{delete y[s.name]});class Te{constructor(e){this._isAdvanced=!1,this._filterHash=Object.create(null),this._renderer=e}setBlendMode(e,t,r){if(this._activeBlendMode===t){this._isAdvanced&&this._renderableList.push(e);return}this._activeBlendMode=t,this._isAdvanced&&this._endAdvancedBlendMode(r),this._isAdvanced=!!y[t],this._isAdvanced&&(this._beginAdvancedBlendMode(r),this._renderableList.push(e))}_beginAdvancedBlendMode(e){this._renderer.renderPipes.batch.break(e);const t=this._activeBlendMode;if(!y[t]){K(`Unable to assign BlendMode: '${t}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);return}this._filterHash[t]||(this._filterHash[t]=new q({filters:[new y[t]]}));const r={renderPipeId:"filter",action:"pushFilter",renderables:[],filterEffect:this._filterHash[t],canBundle:!1};this._renderableList=r.renderables,e.add(r)}_endAdvancedBlendMode(e){this._renderableList=null,this._renderer.renderPipes.batch.break(e),e.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}buildStart(){this._isAdvanced=!1}buildEnd(e){this._isAdvanced&&this._endAdvancedBlendMode(e)}destroy(){this._renderer=null,this._renderableList=null;for(const e in this._filterHash)this._filterHash[e].destroy();this._filterHash=null}}Te.extension={type:[u.WebGLPipes,u.WebGPUPipes,u.CanvasPipes],name:"blendMode"};const R={png:"image/png",jpg:"image/jpeg",webp:"image/webp"},F=class ke{constructor(e){this._renderer=e}_normalizeOptions(e,t={}){return e instanceof S||e instanceof m?{target:e,...t}:{...t,...e}}async image(e){const t=new Image;return t.src=await this.base64(e),t}async base64(e){e=this._normalizeOptions(e,ke.defaultImageOptions);const{format:t,quality:r}=e,a=this.canvas(e);if(a.toBlob!==void 0)return new Promise((n,i)=>{a.toBlob(l=>{if(!l){i(new Error("ICanvas.toBlob failed!"));return}const o=new FileReader;o.onload=()=>n(o.result),o.onerror=i,o.readAsDataURL(l)},R[t],r)});if(a.toDataURL!==void 0)return a.toDataURL(R[t],r);if(a.convertToBlob!==void 0){const n=await a.convertToBlob({type:R[t],quality:r});return new Promise((i,l)=>{const o=new FileReader;o.onload=()=>i(o.result),o.onerror=l,o.readAsDataURL(n)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(e){e=this._normalizeOptions(e);const t=e.target,r=this._renderer;if(t instanceof m)return r.texture.generateCanvas(t);const a=r.textureGenerator.generateTexture(e),n=r.texture.generateCanvas(a);return a.destroy(),n}pixels(e){e=this._normalizeOptions(e);const t=e.target,r=this._renderer,a=t instanceof m?t:r.textureGenerator.generateTexture(e),n=r.texture.getPixels(a);return t instanceof S&&a.destroy(),n}texture(e){return e=this._normalizeOptions(e),e.target instanceof m?e.target:this._renderer.textureGenerator.generateTexture(e)}download(e){e=this._normalizeOptions(e);const t=this.canvas(e),r=document.createElement("a");r.download=e.filename??"image.png",r.href=t.toDataURL("image/png"),document.body.appendChild(r),r.click(),document.body.removeChild(r)}log(e){const t=e.width??200;e=this._normalizeOptions(e);const r=this.canvas(e),a=r.toDataURL();console.log(`[Pixi Texture] ${r.width}px ${r.height}px`);const n=["font-size: 1px;",`padding: ${t}px 300px;`,`background: url(${a}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n)}destroy(){this._renderer=null}};F.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"extract"};F.defaultImageOptions={format:"png",quality:1};let ht=F;class ft extends m{static create(e){return new m({source:new _(e)})}resize(e,t,r){return this.source.resize(e,t,r),this}}const pt=new w,mt=new N,gt=[0,0,0,0];class Me{constructor(e){this._renderer=e}generateTexture(e){e instanceof S&&(e={target:e,frame:void 0,textureSourceOptions:{},resolution:void 0});const t=e.resolution||this._renderer.resolution,r=e.antialias||this._renderer.view.antialias,a=e.target;let n=e.clearColor;n?n=Array.isArray(n)&&n.length===4?n:J.shared.setValue(n).toArray():n=gt;const i=e.frame?.copyTo(pt)||Le(a,mt).rectangle;i.width=Math.max(i.width,1/t)|0,i.height=Math.max(i.height,1/t)|0;const l=ft.create({...e.textureSourceOptions,width:i.width,height:i.height,resolution:t,antialias:r}),o=g.shared.translate(-i.x,-i.y);return this._renderer.render({container:a,transform:o,target:l,clearColor:n}),l}destroy(){this._renderer=null}}Me.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"textureGenerator"};class Ce{constructor(e){this._stackIndex=0,this._globalUniformDataStack=[],this._uniformsPool=[],this._activeUniforms=[],this._bindGroupPool=[],this._activeBindGroups=[],this._renderer=e}reset(){this._stackIndex=0;for(let e=0;e<this._activeUniforms.length;e++)this._uniformsPool.push(this._activeUniforms[e]);for(let e=0;e<this._activeBindGroups.length;e++)this._bindGroupPool.push(this._activeBindGroups[e]);this._activeUniforms.length=0,this._activeBindGroups.length=0}start(e){this.reset(),this.push(e)}bind({size:e,projectionMatrix:t,worldTransformMatrix:r,worldColor:a,offset:n}){const i=this._renderer.renderTarget.renderTarget,l=this._stackIndex?this._globalUniformDataStack[this._stackIndex-1]:{projectionData:i,worldTransformMatrix:new g,worldColor:4294967295,offset:new He},o={projectionMatrix:t||this._renderer.renderTarget.projectionMatrix,resolution:e||i.size,worldTransformMatrix:r||l.worldTransformMatrix,worldColor:a||l.worldColor,offset:n||l.offset,bindGroup:null},d=this._uniformsPool.pop()||this._createUniforms();this._activeUniforms.push(d);const c=d.uniforms;c.uProjectionMatrix=o.projectionMatrix,c.uResolution=o.resolution,c.uWorldTransformMatrix.copyFrom(o.worldTransformMatrix),c.uWorldTransformMatrix.tx-=o.offset.x,c.uWorldTransformMatrix.ty-=o.offset.y,qe(o.worldColor,c.uWorldColorAlpha,0),d.update();let h;this._renderer.renderPipes.uniformBatch?h=this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d,!1):(h=this._bindGroupPool.pop()||new We,this._activeBindGroups.push(h),h.setResource(d,0)),o.bindGroup=h,this._currentGlobalUniformData=o}push(e){this.bind(e),this._globalUniformDataStack[this._stackIndex++]=this._currentGlobalUniformData}pop(){this._currentGlobalUniformData=this._globalUniformDataStack[--this._stackIndex-1],this._renderer.type===se.WEBGL&&this._currentGlobalUniformData.bindGroup.resources[0].update()}get bindGroup(){return this._currentGlobalUniformData.bindGroup}get uniformGroup(){return this._currentGlobalUniformData.bindGroup.resources[0]}_createUniforms(){return new re({uProjectionMatrix:{value:new g,type:"mat3x3<f32>"},uWorldTransformMatrix:{value:new g,type:"mat3x3<f32>"},uWorldColorAlpha:{value:new Float32Array(4),type:"vec4<f32>"},uResolution:{value:[0,0],type:"vec2<f32>"}},{isStatic:!0})}destroy(){this._renderer=null}}Ce.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"globalUniforms"};let j=!1;const $="8.1.0";function vt(s){if(!j){if(Q.get().getNavigator().userAgent.toLowerCase().indexOf("chrome")>-1){const e=[`%c %c %c %c %c PixiJS %c v${$} (${s}) http://www.pixijs.com/
|
||||||
|
|
||||||
`,"background: #E72264; padding:5px 0;","background: #6CA2EA; padding:5px 0;","background: #B5D33D; padding:5px 0;","background: #FED23F; padding:5px 0;","color: #FFFFFF; background: #E72264; padding:5px 0;","color: #E72264; background: #FFFFFF; padding:5px 0;"];globalThis.console.log(...e)}else globalThis.console&&globalThis.console.log(`PixiJS ${$} - ${s} - http://www.pixijs.com/`);j=!0}}class D{constructor(e){this._renderer=e}init(e){if(e.hello){let t=this._renderer.name;this._renderer.type===se.WEBGL&&(t+=` ${this._renderer.context.webGLVersion}`),vt(t)}}}D.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"hello",priority:-2};D.defaultOptions={hello:!1};const E=class we{constructor(e){this._renderer=e,this.count=0,this.checkCount=0}init(e){e={...we.defaultOptions,...e},this.checkCountMax=e.textureGCCheckCountMax,this.maxIdle=e.textureGCAMaxIdle,this.active=e.textureGCActive}postrender(){this._renderer.renderingToScreen&&(this.count++,this.active&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this._renderer.texture.managedTextures;for(let t=0;t<e.length;t++){const r=e[t];r.autoGarbageCollect&&r.resource&&r._touched>-1&&this.count-r._touched>this.maxIdle&&(r._touched=-1,r.unload())}}destroy(){this._renderer=null}};E.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"textureGC"};E.defaultOptions={textureGCActive:!0,textureGCAMaxIdle:60*60,textureGCCheckCountMax:600};let Se=E;X.add(Se);const O=class Pe{get resolution(){return this.texture.source._resolution}set resolution(e){this.texture.source.resize(this.texture.source.width,this.texture.source.height,e)}init(e){e={...Pe.defaultOptions,...e},e.view&&(Ve(je,"ViewSystem.view has been renamed to ViewSystem.canvas"),e.canvas=e.view),this.screen=new w(0,0,e.width,e.height),this.canvas=e.canvas||Q.get().createCanvas(),this.antialias=!!e.antialias,this.texture=de(this.canvas,e),this.renderTarget=new A({colorTextures:[this.texture],depth:!!e.depth,isRoot:!0}),this.texture.source.transparent=e.backgroundAlpha<1,this.multiView=!!e.multiView,this.autoDensity&&(this.canvas.style.width=`${this.texture.width}px`,this.canvas.style.height=`${this.texture.height}px`),this.resolution=e.resolution}resize(e,t,r){this.texture.source.resize(e,t,r),this.screen.width=this.texture.frame.width,this.screen.height=this.texture.frame.height,this.autoDensity&&(this.canvas.style.width=`${e}px`,this.canvas.style.height=`${t}px`)}destroy(e=!1){(typeof e=="boolean"?e:!!e?.removeView)&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}};O.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"view",priority:0};O.defaultOptions={width:800,height:600,autoDensity:!1,antialias:!1};let xt=O;Gt=[ct,Ce,D,xt,be,Se,Me,ht];Bt=[Te,ne,_e,me,oe,ue,le,fe]});export{Rt as B,T as G,Pt as R,Gt as S,Ct as U,Bt as a,st as b,wt as c,M as d,Mt as e,kt as f,Tt as t,St as u,__tla};
|
`,"background: #E72264; padding:5px 0;","background: #6CA2EA; padding:5px 0;","background: #B5D33D; padding:5px 0;","background: #FED23F; padding:5px 0;","color: #FFFFFF; background: #E72264; padding:5px 0;","color: #E72264; background: #FFFFFF; padding:5px 0;"];globalThis.console.log(...e)}else globalThis.console&&globalThis.console.log(`PixiJS ${$} - ${s} - http://www.pixijs.com/`);j=!0}}class D{constructor(e){this._renderer=e}init(e){if(e.hello){let t=this._renderer.name;this._renderer.type===se.WEBGL&&(t+=` ${this._renderer.context.webGLVersion}`),vt(t)}}}D.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"hello",priority:-2};D.defaultOptions={hello:!1};const E=class we{constructor(e){this._renderer=e,this.count=0,this.checkCount=0}init(e){e={...we.defaultOptions,...e},this.checkCountMax=e.textureGCCheckCountMax,this.maxIdle=e.textureGCAMaxIdle,this.active=e.textureGCActive}postrender(){this._renderer.renderingToScreen&&(this.count++,this.active&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this._renderer.texture.managedTextures;for(let t=0;t<e.length;t++){const r=e[t];r.autoGarbageCollect&&r.resource&&r._touched>-1&&this.count-r._touched>this.maxIdle&&(r._touched=-1,r.unload())}}destroy(){this._renderer=null}};E.extension={type:[u.WebGLSystem,u.WebGPUSystem],name:"textureGC"};E.defaultOptions={textureGCActive:!0,textureGCAMaxIdle:60*60,textureGCCheckCountMax:600};let Se=E;X.add(Se);const O=class Pe{get resolution(){return this.texture.source._resolution}set resolution(e){this.texture.source.resize(this.texture.source.width,this.texture.source.height,e)}init(e){e={...Pe.defaultOptions,...e},e.view&&(Ve(je,"ViewSystem.view has been renamed to ViewSystem.canvas"),e.canvas=e.view),this.screen=new w(0,0,e.width,e.height),this.canvas=e.canvas||Q.get().createCanvas(),this.antialias=!!e.antialias,this.texture=de(this.canvas,e),this.renderTarget=new A({colorTextures:[this.texture],depth:!!e.depth,isRoot:!0}),this.texture.source.transparent=e.backgroundAlpha<1,this.multiView=!!e.multiView,this.autoDensity&&(this.canvas.style.width=`${this.texture.width}px`,this.canvas.style.height=`${this.texture.height}px`),this.resolution=e.resolution}resize(e,t,r){this.texture.source.resize(e,t,r),this.screen.width=this.texture.frame.width,this.screen.height=this.texture.frame.height,this.autoDensity&&(this.canvas.style.width=`${e}px`,this.canvas.style.height=`${t}px`)}destroy(e=!1){(typeof e=="boolean"?e:!!e?.removeView)&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)}};O.extension={type:[u.WebGLSystem,u.WebGPUSystem,u.CanvasSystem],name:"view",priority:0};O.defaultOptions={width:800,height:600,autoDensity:!1,antialias:!1};let xt=O;Gt=[ct,Ce,D,xt,be,Se,Me,ht];Bt=[Te,ne,_e,me,oe,ue,le,fe]});export{Rt as B,T as G,Pt as R,Gt as S,Ct as U,Bt as a,st as b,wt as c,M as d,Mt as e,kt as f,Tt as t,St as u,__tla};
|
||||||
13
qbit/vuetorrent/public/assets/TorrentDetail-BJ8OBcoO.js
Normal file
13
qbit/vuetorrent/public/assets/TorrentDetail-BJ8OBcoO.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
.spacer[data-v-68d0ffb7]{margin-left:8px;margin-right:16px}.v-theme--darkTheme .selected[data-v-68d0ffb7]{background-color:rgb(var(--v-theme-surface));filter:brightness(135%)}.v-theme--lightTheme .selected[data-v-68d0ffb7]{background-color:rgb(var(--v-theme-surface));filter:brightness(75%)}#_tree-root{font-size:medium;list-style-type:none}#_tree-root div.v-virtual-scroll__item{padding-top:8px}#_tree-root div.v-virtual-scroll__item:first-child{padding-top:0}#_tree-root div.v-virtual-scroll__item:last-child{padding-bottom:8px}.gap[data-v-074ad8b6]{gap:8px}canvas[data-v-212dd1f4]{height:100%;width:100%}.chipgap[data-v-aeeb04ab]{gap:4px}.gap[data-v-ceb5c391]{gap:8px}.cursor-help[data-v-ceb5c391]{cursor:help}.gap[data-v-ed947913]{gap:8px}.v-theme--darkTheme .tracker-disabled[data-v-ed947913]{color:#c6c6c6}.v-theme--darkTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--darkTheme .tracker-working[data-v-ed947913]{color:#90ee90}.v-theme--darkTheme .tracker-not_working[data-v-ed947913]{color:#f08080}.v-theme--darkTheme .tracker-updating[data-v-ed947913]{color:#add8e6}.v-theme--lightTheme .tracker-disabled[data-v-ed947913]{color:gray}.v-theme--lightTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--lightTheme .tracker-working[data-v-ed947913]{color:green}.v-theme--lightTheme .tracker-not_working[data-v-ed947913]{color:red}.v-theme--lightTheme .tracker-updating[data-v-ed947913]{color:#1e90ff}
|
.spacer[data-v-68d0ffb7]{margin-left:8px;margin-right:16px}.v-theme--darkTheme .selected[data-v-68d0ffb7]{background-color:rgb(var(--v-theme-surface));filter:brightness(135%)}.v-theme--lightTheme .selected[data-v-68d0ffb7]{background-color:rgb(var(--v-theme-surface));filter:brightness(75%)}#_tree-root{font-size:medium;list-style-type:none}#_tree-root div.v-virtual-scroll__item{padding-top:8px}#_tree-root div.v-virtual-scroll__item:first-child{padding-top:0}#_tree-root div.v-virtual-scroll__item:last-child{padding-bottom:8px}.gap[data-v-074ad8b6]{gap:8px}canvas[data-v-212dd1f4]{height:100%;width:100%}.chipgap[data-v-e0346fb1]{gap:4px}.gap[data-v-ceb5c391]{gap:8px}.cursor-help[data-v-ceb5c391]{cursor:help}.gap[data-v-ed947913]{gap:8px}.v-theme--darkTheme .tracker-disabled[data-v-ed947913]{color:#c6c6c6}.v-theme--darkTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--darkTheme .tracker-working[data-v-ed947913]{color:#90ee90}.v-theme--darkTheme .tracker-not_working[data-v-ed947913]{color:#f08080}.v-theme--darkTheme .tracker-updating[data-v-ed947913]{color:#add8e6}.v-theme--lightTheme .tracker-disabled[data-v-ed947913]{color:gray}.v-theme--lightTheme .tracker-not_yet_contacted[data-v-ed947913]{color:orange}.v-theme--lightTheme .tracker-working[data-v-ed947913]{color:green}.v-theme--lightTheme .tracker-not_working[data-v-ed947913]{color:red}.v-theme--lightTheme .tracker-updating[data-v-ed947913]{color:#1e90ff}
|
||||||
156
qbit/vuetorrent/public/assets/WebGLRenderer-BJRUYaxc.js
Normal file
156
qbit/vuetorrent/public/assets/WebGLRenderer-BJRUYaxc.js
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
import{M as K,E as l,B as A,D as G,w as m,N as Ae,k as S,i as $,S as g,R as H,h as Be,d as B,j as z,e as v,A as Ne,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";import{S as U,j as O,k as Y,m as q,n as P,b as x,h as Z,f as Ie,U as F,o as Q,R as De,__tla as __tla_1}from"./colorToUniform-Bf80N278.js";import{b as J,__tla as __tla_2}from"./batchSamplersUniformGroup-CKEGmRNN.js";import{e as ye,G as Ce,c as Ge,b as Ue,U as Oe,R as Pe,B as ee,d as N,f as Fe,S as Me,a as Le,__tla as __tla_3}from"./SharedSystems-DuYq6R0P.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Cz5dpnUF.js";import{__tla as __tla_5}from"./index-CfNDsQKB.js";import"./vue--7UcA1iU.js";import"./vuetify-GhifFkZ7.js";import"./FileIcon-DH65fwz5.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-BvP4_KF0.js";let wt;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{class te{constructor(){this._didUpload=!1,this._tempState=U.for2d()}init(e){const r=O({name:"batch",bits:[Y,q(K),P]});this._shader=new x({glProgram:r,resources:{batchSamplers:J}}),e.renderer.runners.contextChange.add(this)}contextChange(){this._didUpload=!1}start(e,r){const s=e.renderer;s.shader.bind(this._shader,this._didUpload),s.shader.updateUniformGroup(s.globalUniforms.uniformGroup),s.geometry.bind(r,this._shader.glProgram)}execute(e,r){const s=e.renderer;this._didUpload=!0,this._tempState.blendMode=r.blendMode,s.state.set(this._tempState);const n=r.textures.textures;for(let i=0;i<n.length;i++)s.texture.bind(n[i],i);s.geometry.draw("triangle-list",r.size,r.start)}destroy(){this._shader.destroy(!0),this._shader=null}}te.extension={type:[l.WebGLPipesAdaptor],name:"batch"};var T=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(T||{});class He{constructor(e,r){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.type=r}}class re{constructor(e){this._gpuBuffers=Object.create(null),this._boundBufferBases=Object.create(null),this._renderer=e}destroy(){this._renderer=null,this._gl=null,this._gpuBuffers=null,this._boundBufferBases=null}contextChange(){this._gpuBuffers=Object.create(null),this._gl=this._renderer.gl}getGlBuffer(e){return this._gpuBuffers[e.uid]||this.createGLBuffer(e)}bind(e){const{_gl:r}=this,s=this.getGlBuffer(e);r.bindBuffer(s.type,s.buffer)}bindBufferBase(e,r){const{_gl:s}=this;if(this._boundBufferBases[r]!==e){const n=this.getGlBuffer(e);this._boundBufferBases[r]=e,s.bindBufferBase(s.UNIFORM_BUFFER,r,n.buffer)}}bindBufferRange(e,r,s){const{_gl:n}=this;s=s||0;const i=this.getGlBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,r||0,i.buffer,s*256,256)}updateBuffer(e){const{_gl:r}=this,s=this.getGlBuffer(e);if(e._updateID===s.updateID)return s;s.updateID=e._updateID,r.bindBuffer(s.type,s.buffer);const n=e.data;if(s.byteLength>=e.data.byteLength)r.bufferSubData(s.type,0,n,0,e._updateSize/n.BYTES_PER_ELEMENT);else{const i=e.descriptor.usage&A.STATIC?r.STATIC_DRAW:r.DYNAMIC_DRAW;s.byteLength=n.byteLength,r.bufferData(s.type,n,i)}return s}destroyAll(){const e=this._gl;for(const r in this._gpuBuffers)e.deleteBuffer(this._gpuBuffers[r].buffer);this._gpuBuffers=Object.create(null)}onBufferDestroy(e,r){const s=this._gpuBuffers[e.uid],n=this._gl;r||n.deleteBuffer(s.buffer),this._gpuBuffers[e.uid]=null}createGLBuffer(e){const{_gl:r}=this;let s=T.ARRAY_BUFFER;e.descriptor.usage&A.INDEX?s=T.ELEMENT_ARRAY_BUFFER:e.descriptor.usage&A.UNIFORM&&(s=T.UNIFORM_BUFFER);const n=new He(r.createBuffer(),s);return this._gpuBuffers[e.uid]=n,e.on("destroy",this.onBufferDestroy,this),n}}re.extension={type:[l.WebGLSystem],name:"buffer"};const M=class se{constructor(e){this.supports={uint32Indices:!0,uniformBufferObject:!0,vertexArrayObject:!0,srgbTextures:!0,nonPowOf2wrapping:!0,msaa:!0,nonPowOf2mipmaps:!0},this._renderer=e,this.extensions=Object.create(null),this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this._renderer.gl=e}init(e){if(e={...se.defaultOptions,...e},e.context)this.initFromContext(e.context);else{const r=this._renderer.background.alpha<1,s=e.premultipliedAlpha??!0,n=e.antialias&&!this._renderer.backBuffer.useBackBuffer;this.createContext(e.preferWebGLVersion,{alpha:r,premultipliedAlpha:s,antialias:n,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference??"default"})}}initFromContext(e){this.gl=e,this.webGLVersion=e instanceof G.get().getWebGLRenderingContext()?1:2,this.getExtensions(),this.validateContext(e),this._renderer.runners.contextChange.emit(e);const r=this._renderer.view.canvas;r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}createContext(e,r){let s;const n=this._renderer.view.canvas;if(e===2&&(s=n.getContext("webgl2",r)),!s&&(s=n.getContext("webgl",r),!s))throw new Error("This browser does not support WebGL. Try using the canvas renderer");this.gl=s,this.initFromContext(this.gl)}getExtensions(){const{gl:e}=this,r={anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc"),rgtc:e.getExtension("EXT_texture_compression_rgtc"),loseContext:e.getExtension("WEBGL_lose_context")};if(this.webGLVersion===1)this.extensions={...r,drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear"),vertexAttribDivisorANGLE:e.getExtension("ANGLE_instanced_arrays"),srgb:e.getExtension("EXT_sRGB")};else{this.extensions={...r,colorBufferFloat:e.getExtension("EXT_color_buffer_float")};const s=e.getExtension("WEBGL_provoking_vertex");s&&s.provokingVertexWEBGL(s.FIRST_VERTEX_CONVENTION_WEBGL)}}handleContextLost(e){e.preventDefault(),this._contextLossForced&&(this._contextLossForced=!1,setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0))}handleContextRestored(){this._renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this._renderer.view.canvas;this._renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext?.loseContext()}forceContextLoss(){this.extensions.loseContext?.loseContext(),this._contextLossForced=!0}validateContext(e){const r=e.getContextAttributes();r&&!r.stencil&&m("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=this.supports,n=this.webGLVersion===2,i=this.extensions;s.uint32Indices=n||!!i.uint32ElementIndex,s.uniformBufferObject=n,s.vertexArrayObject=n||!!i.vertexArrayObject,s.srgbTextures=n||!!i.srgb,s.nonPowOf2wrapping=n,s.nonPowOf2mipmaps=n,s.msaa=n,s.uint32Indices||m("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")}};M.extension={type:[l.WebGLSystem],name:"context"};M.defaultOptions={context:null,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:void 0,preferWebGLVersion:2};let we=M;var y=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(y||{}),ne=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(ne||{}),f=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(f||{});const w={uint8x2:f.UNSIGNED_BYTE,uint8x4:f.UNSIGNED_BYTE,sint8x2:f.BYTE,sint8x4:f.BYTE,unorm8x2:f.UNSIGNED_BYTE,unorm8x4:f.UNSIGNED_BYTE,snorm8x2:f.BYTE,snorm8x4:f.BYTE,uint16x2:f.UNSIGNED_SHORT,uint16x4:f.UNSIGNED_SHORT,sint16x2:f.SHORT,sint16x4:f.SHORT,unorm16x2:f.UNSIGNED_SHORT,unorm16x4:f.UNSIGNED_SHORT,snorm16x2:f.SHORT,snorm16x4:f.SHORT,float16x2:f.HALF_FLOAT,float16x4:f.HALF_FLOAT,float32:f.FLOAT,float32x2:f.FLOAT,float32x3:f.FLOAT,float32x4:f.FLOAT,uint32:f.UNSIGNED_INT,uint32x2:f.UNSIGNED_INT,uint32x3:f.UNSIGNED_INT,uint32x4:f.UNSIGNED_INT,sint32:f.INT,sint32x2:f.INT,sint32x3:f.INT,sint32x4:f.INT};function ke(t){return w[t]??w.float32}const Ve={"point-list":0,"line-list":1,"line-strip":3,"triangle-list":4,"triangle-strip":5};class ie{constructor(e){this._geometryVaoHash=Object.create(null),this._renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0}contextChange(){const e=this.gl=this._renderer.gl;if(!this._renderer.context.supports.vertexArrayObject)throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");const r=this._renderer.context.extensions.vertexArrayObject;r&&(e.createVertexArray=()=>r.createVertexArrayOES(),e.bindVertexArray=n=>r.bindVertexArrayOES(n),e.deleteVertexArray=n=>r.deleteVertexArrayOES(n));const s=this._renderer.context.extensions.vertexAttribDivisorANGLE;s&&(e.drawArraysInstanced=(n,i,a,o)=>{s.drawArraysInstancedANGLE(n,i,a,o)},e.drawElementsInstanced=(n,i,a,o,c)=>{s.drawElementsInstancedANGLE(n,i,a,o,c)},e.vertexAttribDivisor=(n,i)=>s.vertexAttribDivisorANGLE(n,i)),this._activeGeometry=null,this._activeVao=null,this._geometryVaoHash=Object.create(null)}bind(e,r){const s=this.gl;this._activeGeometry=e;const n=this.getVao(e,r);this._activeVao!==n&&(this._activeVao=n,s.bindVertexArray(n)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this._renderer.buffer;for(let s=0;s<e.buffers.length;s++){const n=e.buffers[s];r.updateBuffer(n)}}checkCompatibility(e,r){const s=e.attributes,n=r._attributeData;for(const i in n)if(!s[i])throw new Error(`shader and geometry incompatible, geometry missing the "${i}" attribute`)}getSignature(e,r){const s=e.attributes,n=r._attributeData,i=["g",e.uid];for(const a in s)n[a]&&i.push(a,n[a].location);return i.join("-")}getVao(e,r){return this._geometryVaoHash[e.uid]?.[r._key]||this.initGeometryVao(e,r)}initGeometryVao(e,r,s=!0){const n=this._renderer.gl,i=this._renderer.buffer;this._renderer.shader._getProgramData(r),this.checkCompatibility(e,r);const a=this.getSignature(e,r);this._geometryVaoHash[e.uid]||(this._geometryVaoHash[e.uid]=Object.create(null),e.on("destroy",this.onGeometryDestroy,this));const o=this._geometryVaoHash[e.uid];let c=o[a];if(c)return o[r._key]=c,c;ye(e,r._attributeData);const u=e.buffers;c=n.createVertexArray(),n.bindVertexArray(c);for(let _=0;_<u.length;_++){const h=u[_];i.bind(h)}return this.activateVao(e,r),o[r._key]=c,o[a]=c,n.bindVertexArray(null),c}onGeometryDestroy(e,r){const s=this._geometryVaoHash[e.uid],n=this.gl;if(s){if(r)for(const i in s)this._activeVao!==s[i]&&this.unbind(),n.deleteVertexArray(s[i]);this._geometryVaoHash[e.uid]=null}}destroyAll(e=!1){const r=this.gl;for(const s in this._geometryVaoHash){if(e)for(const n in this._geometryVaoHash[s]){const i=this._geometryVaoHash[s];this._activeVao!==i&&this.unbind(),r.deleteVertexArray(i[n])}this._geometryVaoHash[s]=null}}activateVao(e,r){const s=this._renderer.gl,n=this._renderer.buffer,i=e.attributes;e.indexBuffer&&n.bind(e.indexBuffer);let a=null;for(const o in i){const c=i[o],u=c.buffer,_=n.getGlBuffer(u),h=r._attributeData[o];if(h){a!==_&&(n.bind(u),a=_);const d=c.location;s.enableVertexAttribArray(d);const E=Z(c.format),b=ke(c.format);if(h.format?.substring(1,4)==="int"?s.vertexAttribIPointer(d,E.size,b,c.stride,c.offset):s.vertexAttribPointer(d,E.size,b,E.normalised,c.stride,c.offset),c.instance)if(this.hasInstance)s.vertexAttribDivisor(d,1);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,s,n){const{gl:i}=this._renderer,a=this._activeGeometry,o=Ve[a.topology||e];if(n||(n=a.instanceCount),a.indexBuffer){const c=a.indexBuffer.data.BYTES_PER_ELEMENT,u=c===2?i.UNSIGNED_SHORT:i.UNSIGNED_INT;n>1?i.drawElementsInstanced(o,r||a.indexBuffer.data.length,u,(s||0)*c,n):i.drawElements(o,r||a.indexBuffer.data.length,u,(s||0)*c)}else n>1?i.drawArraysInstanced(o,s||0,r||a.getSize(),n):i.drawArrays(o,s||0,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this._renderer=null,this.gl=null,this._activeVao=null,this._activeGeometry=null}}ie.extension={type:[l.WebGLSystem],name:"geometry"};const Xe=new Ae({attributes:{aPosition:[-1,-1,3,-1,-1,3]}}),L=class ae{constructor(e){this.useBackBuffer=!1,this._useBackBufferThisRender=!1,this._renderer=e}init(e={}){const{useBackBuffer:r,antialias:s}={...ae.defaultOptions,...e};this.useBackBuffer=r,this._antialias=s,this._renderer.context.supports.msaa||(m("antialiasing, is not supported on when using the back buffer"),this._antialias=!1),this._state=U.for2d();const n=new Ie({vertex:`
|
||||||
|
attribute vec2 aPosition;
|
||||||
|
out vec2 vUv;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
gl_Position = vec4(aPosition, 0.0, 1.0);
|
||||||
|
|
||||||
|
vUv = (aPosition + 1.0) / 2.0;
|
||||||
|
|
||||||
|
// flip dem UVs
|
||||||
|
vUv.y = 1.0 - vUv.y;
|
||||||
|
}`,fragment:`
|
||||||
|
in vec2 vUv;
|
||||||
|
out vec4 finalColor;
|
||||||
|
|
||||||
|
uniform sampler2D uTexture;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
finalColor = texture(uTexture, vUv);
|
||||||
|
}`,name:"big-triangle"});this._bigTriangleShader=new x({glProgram:n,resources:{uTexture:S.WHITE.source}})}renderStart(e){const r=this._renderer.renderTarget.getRenderTarget(e.target);if(this._useBackBufferThisRender=this.useBackBuffer&&!!r.isRoot,this._useBackBufferThisRender){const s=this._renderer.renderTarget.getRenderTarget(e.target);this._targetTexture=s.colorTexture,e.target=this._getBackBufferTexture(s.colorTexture)}}renderEnd(){this._presentBackBuffer()}_presentBackBuffer(){const e=this._renderer;e.renderTarget.finishRenderPass(),this._useBackBufferThisRender&&(e.renderTarget.bind(this._targetTexture,!1),this._bigTriangleShader.resources.uTexture=this._backBufferTexture.source,e.encoder.draw({geometry:Xe,shader:this._bigTriangleShader,state:this._state}))}_getBackBufferTexture(e){return this._backBufferTexture=this._backBufferTexture||new S({source:new $({width:e.width,height:e.height,resolution:e._resolution,antialias:this._antialias})}),this._backBufferTexture.source.resize(e.width,e.height,e._resolution),this._backBufferTexture}destroy(){this._backBufferTexture&&(this._backBufferTexture.destroy(),this._backBufferTexture=null)}};L.extension={type:[l.WebGLSystem],name:"backBuffer",priority:1};L.defaultOptions={useBackBuffer:!1};let We=L;class oe{constructor(e){this._colorMaskCache=15,this._renderer=e}setMask(e){this._colorMaskCache!==e&&(this._colorMaskCache=e,this._renderer.gl.colorMask(!!(e&8),!!(e&4),!!(e&2),!!(e&1)))}}oe.extension={type:[l.WebGLSystem],name:"colorMask"};class ce{constructor(e){this.commandFinished=Promise.resolve(),this._renderer=e}setGeometry(e,r){this._renderer.geometry.bind(e,r.glProgram)}finishRenderPass(){}draw(e){const r=this._renderer,{geometry:s,shader:n,state:i,skipSync:a,topology:o,size:c,start:u,instanceCount:_}=e;r.shader.bind(n,a),r.geometry.bind(s,r.shader._activeProgram),i&&r.state.set(i),r.geometry.draw(o,c,u,_??s.instanceCount)}destroy(){this._renderer=null}}ce.extension={type:[l.WebGLSystem],name:"encoder"};class je{constructor(){this.width=-1,this.height=-1,this.msaa=!1,this.msaaRenderBuffer=[]}}class ue{constructor(e){this._stencilCache={enabled:!1,stencilReference:0,stencilMode:g.NONE},this._renderTargetStencilState=Object.create(null),e.renderTarget.onRenderTargetChange.add(this)}contextChange(e){this._gl=e,this._comparisonFuncMapping={always:e.ALWAYS,never:e.NEVER,equal:e.EQUAL,"not-equal":e.NOTEQUAL,less:e.LESS,"less-equal":e.LEQUAL,greater:e.GREATER,"greater-equal":e.GEQUAL},this._stencilOpsMapping={keep:e.KEEP,zero:e.ZERO,replace:e.REPLACE,invert:e.INVERT,"increment-clamp":e.INCR,"decrement-clamp":e.DECR,"increment-wrap":e.INCR_WRAP,"decrement-wrap":e.DECR_WRAP},this._stencilCache.enabled=!1,this._stencilCache.stencilMode=g.NONE,this._stencilCache.stencilReference=0}onRenderTargetChange(e){if(this._activeRenderTarget===e)return;this._activeRenderTarget=e;let r=this._renderTargetStencilState[e.uid];r||(r=this._renderTargetStencilState[e.uid]={stencilMode:g.DISABLED,stencilReference:0}),this.setStencilMode(r.stencilMode,r.stencilReference)}setStencilMode(e,r){const s=this._renderTargetStencilState[this._activeRenderTarget.uid],n=this._gl,i=Ce[e],a=this._stencilCache;if(s.stencilMode=e,s.stencilReference=r,e===g.DISABLED){this._stencilCache.enabled&&(this._stencilCache.enabled=!1,n.disable(n.STENCIL_TEST));return}this._stencilCache.enabled||(this._stencilCache.enabled=!0,n.enable(n.STENCIL_TEST)),(e!==a.stencilMode||a.stencilReference!==r)&&(a.stencilMode=e,a.stencilReference=r,n.stencilFunc(this._comparisonFuncMapping[i.stencilBack.compare],r,255),n.stencilOp(n.KEEP,n.KEEP,this._stencilOpsMapping[i.stencilBack.passOp]))}}ue.extension={type:[l.WebGLSystem],name:"stencil"};const _e={f32:4,"vec2<f32>":8,"vec3<f32>":12,"vec4<f32>":16,"mat2x2<f32>":16*2,"mat3x3<f32>":16*3,"mat4x4<f32>":16*4};function Ke(t){const e=t.map(i=>({data:i,offset:0,size:0}));let r=0,s=0,n=0;for(let i=0;i<e.length;i++){const a=e[i];if(r=_e[a.data.type],!r)throw new Error(`Unknown type ${a.data.type}`);if(a.data.size>1&&(r=Math.max(r,16)*a.data.size),a.size=r,s%r!==0&&s<16){const o=s%r%16;s+=o,n+=o}s+r>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=r,s=r):(a.offset=n,s+=r,n+=r)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function $e(t,e){const r=Math.max(_e[t.data.type]/16,1),s=t.data.value.length/t.data.size,n=(4-s%4)%4;return`
|
||||||
|
v = uv.${t.data.name};
|
||||||
|
offset += ${e};
|
||||||
|
|
||||||
|
arrayOffset = offset;
|
||||||
|
|
||||||
|
t = 0;
|
||||||
|
|
||||||
|
for(var i=0; i < ${t.data.size*r}; i++)
|
||||||
|
{
|
||||||
|
for(var j = 0; j < ${s}; j++)
|
||||||
|
{
|
||||||
|
data[arrayOffset++] = v[t++];
|
||||||
|
}
|
||||||
|
${n!==0?`arrayOffset += ${n};`:""}
|
||||||
|
}
|
||||||
|
`}function ze(t){return Ge(t,"uboStd40",$e,Ue)}class fe extends Oe{constructor(){super({createUboElements:Ke,generateUboSync:ze})}}fe.extension={type:[l.WebGLSystem],name:"ubo"};class Ye{constructor(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new H}init(e,r){this._renderer=e,this._renderTargetSystem=r,e.runners.contextChange.add(this)}contextChange(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new H}copyToTexture(e,r,s,n,i){const a=this._renderTargetSystem,o=this._renderer,c=a.getGpuRenderTarget(e),u=o.gl;return this.finishRenderPass(e),u.bindFramebuffer(u.FRAMEBUFFER,c.resolveTargetFramebuffer),o.texture.bind(r,0),u.copyTexSubImage2D(u.TEXTURE_2D,0,i.x,i.y,s.x,s.y,n.width,n.height),r}startRenderPass(e,r=!0,s,n){const i=this._renderTargetSystem,a=e.colorTexture,o=i.getGpuRenderTarget(e);let c=n.y;e.isRoot&&(c=a.pixelHeight-n.height),e.colorTextures.forEach(h=>{this._renderer.texture.unbind(h)});const u=this._renderer.gl;u.bindFramebuffer(u.FRAMEBUFFER,o.framebuffer);const _=this._viewPortCache;(_.x!==n.x||_.y!==c||_.width!==n.width||_.height!==n.height)&&(_.x=n.x,_.y=c,_.width=n.width,_.height=n.height,u.viewport(n.x,c,n.width,n.height)),!o.depthStencilRenderBuffer&&(e.stencil||e.depth)&&this._initStencil(o),this.clear(e,r,s)}finishRenderPass(e){const s=this._renderTargetSystem.getGpuRenderTarget(e);if(!s.msaa)return;const n=this._renderer.gl;n.bindFramebuffer(n.FRAMEBUFFER,s.resolveTargetFramebuffer),n.bindFramebuffer(n.READ_FRAMEBUFFER,s.framebuffer),n.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,n.COLOR_BUFFER_BIT,n.NEAREST),n.bindFramebuffer(n.FRAMEBUFFER,s.framebuffer)}initGpuRenderTarget(e){const s=this._renderer.gl,n=new je;return Be.test(e.colorTexture.resource)?(n.framebuffer=null,n):(this._initColor(e,n),s.bindFramebuffer(s.FRAMEBUFFER,null),n)}clear(e,r,s){if(!r)return;const n=this._renderTargetSystem;typeof r=="boolean"&&(r=r?B.ALL:B.NONE);const i=this._renderer.gl;if(r&B.COLOR){s??(s=n.defaultClearColor);const a=this._clearColorCache,o=s;(a[0]!==o[0]||a[1]!==o[1]||a[2]!==o[2]||a[3]!==o[3])&&(a[0]=o[0],a[1]=o[1],a[2]=o[2],a[3]=o[3],i.clearColor(o[0],o[1],o[2],o[3]))}i.clear(r)}resizeGpuRenderTarget(e){if(e.isRoot)return;const s=this._renderTargetSystem.getGpuRenderTarget(e);this._resizeColor(e,s),e.stencil&&this._resizeStencil(s)}_initColor(e,r){const s=this._renderer,n=s.gl,i=n.createFramebuffer();if(r.resolveTargetFramebuffer=i,n.bindFramebuffer(n.FRAMEBUFFER,i),r.width=e.colorTexture.source.pixelWidth,r.height=e.colorTexture.source.pixelHeight,e.colorTextures.forEach((a,o)=>{const c=a.source;c.antialias&&(s.context.supports.msaa?r.msaa=!0:m("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),s.texture.bindSource(c,0);const _=s.texture.getGlSource(c).texture;n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+o,3553,_,0)}),r.msaa){const a=n.createFramebuffer();r.framebuffer=a,n.bindFramebuffer(n.FRAMEBUFFER,a),e.colorTextures.forEach((o,c)=>{const u=n.createRenderbuffer();r.msaaRenderBuffer[c]=u})}else r.framebuffer=i;this._resizeColor(e,r)}_resizeColor(e,r){const s=e.colorTexture.source;if(r.width=s.pixelWidth,r.height=s.pixelHeight,e.colorTextures.forEach((n,i)=>{i!==0&&n.source.resize(s.width,s.height,s._resolution)}),r.msaa){const n=this._renderer,i=n.gl,a=r.framebuffer;i.bindFramebuffer(i.FRAMEBUFFER,a),e.colorTextures.forEach((o,c)=>{const u=o.source;n.texture.bindSource(u,0);const h=n.texture.getGlSource(u).internalFormat,d=r.msaaRenderBuffer[c];i.bindRenderbuffer(i.RENDERBUFFER,d),i.renderbufferStorageMultisample(i.RENDERBUFFER,4,h,u.pixelWidth,u.pixelHeight),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+c,i.RENDERBUFFER,d)})}}_initStencil(e){if(e.framebuffer===null)return;const r=this._renderer.gl,s=r.createRenderbuffer();e.depthStencilRenderBuffer=s,r.bindRenderbuffer(r.RENDERBUFFER,s),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,s),this._resizeStencil(e)}_resizeStencil(e){const r=this._renderer.gl;r.bindRenderbuffer(r.RENDERBUFFER,e.depthStencilRenderBuffer),e.msaa?r.renderbufferStorageMultisample(r.RENDERBUFFER,4,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,this._renderer.context.webGLVersion===2?r.DEPTH24_STENCIL8:r.DEPTH_STENCIL,e.width,e.height)}}class he extends Pe{constructor(e){super(e),this.adaptor=new Ye,this.adaptor.init(e,this)}}he.extension={type:[l.WebGLSystem],name:"renderTarget"};function qe(t,e){const r=[],s=[`
|
||||||
|
var g = s.groups;
|
||||||
|
var sS = r.shader;
|
||||||
|
var p = s.glProgram;
|
||||||
|
var ugS = r.uniformGroup;
|
||||||
|
var resources;
|
||||||
|
`];let n=!1,i=0,a=0;const o=e._getProgramData(t.glProgram);for(const u in t.groups){const _=t.groups[u];r.push(`
|
||||||
|
resources = g[${u}].resources;
|
||||||
|
`);for(const h in _.resources){const d=_.resources[h];if(d instanceof F)d.ubo?r.push(`
|
||||||
|
sS.bindUniformBlock(
|
||||||
|
resources[${h}],
|
||||||
|
sS._uniformBindMap[${u}[${h}],
|
||||||
|
${i++}
|
||||||
|
);
|
||||||
|
`):r.push(`
|
||||||
|
ugS.updateUniformGroup(resources[${h}], p, sD);
|
||||||
|
`);else if(d instanceof ee)r.push(`
|
||||||
|
sS.bindUniformBlock(
|
||||||
|
resources[${h}],
|
||||||
|
sS._uniformBindMap[${u}[${h}],
|
||||||
|
${i++}
|
||||||
|
);
|
||||||
|
`);else if(d instanceof $){const E=t._uniformBindMap[u][h],b=o.uniformData[E];b&&(n||(n=!0,s.push(`
|
||||||
|
var tS = r.texture;
|
||||||
|
`)),e._gl.uniform1i(b.location,a),r.push(`
|
||||||
|
tS.bind(resources[${h}], ${a});
|
||||||
|
`),a++)}}}const c=[...s,...r].join(`
|
||||||
|
`);return new Function("r","s","sD",c)}class Ze{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}function k(t,e,r){const s=t.createShader(e);return t.shaderSource(s,r),t.compileShader(s),s}function I(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function le(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return I(2*e);case"bvec3":return I(3*e);case"bvec4":return I(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}let p=null;const V={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"},Qe={float:"float32",vec2:"float32x2",vec3:"float32x3",vec4:"float32x4",int:"sint32",ivec2:"sint32x2",ivec3:"sint32x3",ivec4:"sint32x4",uint:"uint32",uvec2:"uint32x2",uvec3:"uint32x3",uvec4:"uint32x4",bool:"uint32",bvec2:"uint32x2",bvec3:"uint32x3",bvec4:"uint32x4"};function de(t,e){if(!p){const r=Object.keys(V);p={};for(let s=0;s<r.length;++s){const n=r[s];p[t[n]]=V[n]}}return p[e]}function Je(t,e){const r=de(t,e);return Qe[r]||"float32"}function et(t,e,r=!1){const s={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a<n;a++){const o=e.getActiveAttrib(t,a);if(o.name.startsWith("gl_"))continue;const c=Je(e,o.type);s[o.name]={location:0,format:c,stride:Z(c).stride,offset:0,instance:!1,start:0}}const i=Object.keys(s);if(r){i.sort((a,o)=>a>o?1:-1);for(let a=0;a<i.length;a++)s[i[a]].location=a,e.bindAttribLocation(t,a,i[a]);e.linkProgram(t)}else for(let a=0;a<i.length;a++)s[i[a]].location=e.getAttribLocation(t,i[a]);return s}function tt(t,e){if(!e.ACTIVE_UNIFORM_BLOCKS)return{};const r={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORM_BLOCKS);for(let n=0;n<s;n++){const i=e.getActiveUniformBlockName(t,n),a=e.getUniformBlockIndex(t,i),o=e.getActiveUniformBlockParameter(t,n,e.UNIFORM_BLOCK_DATA_SIZE);r[i]={name:i,index:a,size:o}}return r}function rt(t,e){const r={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<s;n++){const i=e.getActiveUniform(t,n),a=i.name.replace(/\[.*?\]$/,""),o=!!i.name.match(/\[.*?\]$/),c=de(e,i.type);r[a]={name:a,index:n,type:c,size:i.size,isArray:o,value:le(c,i.size)}}return r}function X(t,e){const r=t.getShaderSource(e).split(`
|
||||||
|
`).map((u,_)=>`${_}: ${u}`),s=t.getShaderInfoLog(e),n=s.split(`
|
||||||
|
`),i={},a=n.map(u=>parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(u=>u&&!i[u]?(i[u]=!0,!0):!1),o=[""];a.forEach(u=>{r[u-1]=`%c${r[u-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=r.join(`
|
||||||
|
`);o[0]=c,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function st(t,e,r,s){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||X(t,r),t.getShaderParameter(s,t.COMPILE_STATUS)||X(t,s),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}function nt(t,e){const r=k(t,t.VERTEX_SHADER,e.vertex),s=k(t,t.FRAGMENT_SHADER,e.fragment),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,s);const i=e.transformFeedbackVaryings;i&&(typeof t.transformFeedbackVaryings!="function"?m("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(n,i.names,i.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||st(t,n,r,s),e._attributeData=et(n,t,!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex)),e._uniformData=rt(n,t),e._uniformBlockData=tt(n,t),t.deleteShader(r),t.deleteShader(s);const a={};for(const c in e._uniformData){const u=e._uniformData[c];a[c]={location:t.getUniformLocation(n,c),value:le(u.type,u.size)}}return new Ze(n,a)}const R={textureCount:0,blockIndex:0};class me{constructor(e){this._activeProgram=null,this._programDataHash=Object.create(null),this._nextIndex=0,this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=e}contextChange(e){this._gl=e,this._maxBindings=e.MAX_UNIFORM_BUFFER_BINDINGS?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0,this._programDataHash=Object.create(null),this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._activeProgram=null}bind(e,r){if(this._setProgram(e.glProgram),r)return;R.textureCount=0,R.blockIndex=0;let s=this._shaderSyncFunctions[e.glProgram._key];s||(s=this._shaderSyncFunctions[e.glProgram._key]=this._generateShaderSync(e,this)),s(this._renderer,e,R)}updateUniformGroup(e){this._renderer.uniformGroup.updateUniformGroup(e,this._activeProgram,R)}bindUniformBlock(e,r,s=0){const n=this._renderer.buffer,i=this._getProgramData(this._activeProgram),a=e._bufferResource;a&&this._renderer.ubo.updateUniformGroup(e),n.updateBuffer(e.buffer);let o=this._boundUniformsIdsToIndexHash[e.uid];if(o===void 0){const _=this._nextIndex++%this._maxBindings,h=this._boundIndexToUniformsHash[_];h&&(this._boundUniformsIdsToIndexHash[h.uid]=void 0),o=this._boundUniformsIdsToIndexHash[e.uid]=_,this._boundIndexToUniformsHash[_]=e,a?n.bindBufferRange(e.buffer,_,e.offset):n.bindBufferBase(e.buffer,_)}const c=this._gl,u=this._activeProgram._uniformBlockData[r].index;i.uniformBlockBindings[s]!==o&&(i.uniformBlockBindings[s]=o,c.uniformBlockBinding(i.program,u,o))}_setProgram(e){if(this._activeProgram===e)return;this._activeProgram=e;const r=this._getProgramData(e);this._gl.useProgram(r.program)}_getProgramData(e){return this._programDataHash[e._key]||this._createProgramData(e)}_createProgramData(e){const r=e._key;return this._programDataHash[r]=nt(this._gl,e),this._programDataHash[r]}destroy(){for(const e of Object.keys(this._programDataHash))this._programDataHash[e].destroy(),this._programDataHash[e]=null;this._programDataHash=null,this._boundUniformsIdsToIndexHash=null}_generateShaderSync(e,r){return qe(e,r)}}me.extension={type:[l.WebGLSystem],name:"shader"};const it={f32:`if (cv !== v) {
|
||||||
|
cu.value = v;
|
||||||
|
gl.uniform1f(location, v);
|
||||||
|
}`,"vec2<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
gl.uniform2f(location, v[0], v[1]);
|
||||||
|
}`,"vec3<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
gl.uniform3f(location, v[0], v[1], v[2]);
|
||||||
|
}`,"vec4<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
cv[3] = v[3];
|
||||||
|
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
||||||
|
}`,i32:`if (cv !== v) {
|
||||||
|
cu.value = v;
|
||||||
|
gl.uniform1i(location, v);
|
||||||
|
}`,"vec2<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
gl.uniform2i(location, v[0], v[1]);
|
||||||
|
}`,"vec3<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
||||||
|
}`,"vec4<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
cv[3] = v[3];
|
||||||
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||||||
|
}`,u32:`if (cv !== v) {
|
||||||
|
cu.value = v;
|
||||||
|
gl.uniform1ui(location, v);
|
||||||
|
}`,"vec2<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
gl.uniform2ui(location, v[0], v[1]);
|
||||||
|
}`,"vec3<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
gl.uniform3ui(location, v[0], v[1], v[2]);
|
||||||
|
}`,"vec4<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
cv[3] = v[3];
|
||||||
|
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
||||||
|
}`,bool:`if (cv !== v) {
|
||||||
|
cu.value = v;
|
||||||
|
gl.uniform1i(location, v);
|
||||||
|
}`,"vec2<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
gl.uniform2i(location, v[0], v[1]);
|
||||||
|
}`,"vec3<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
||||||
|
}`,"vec4<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
||||||
|
cv[0] = v[0];
|
||||||
|
cv[1] = v[1];
|
||||||
|
cv[2] = v[2];
|
||||||
|
cv[3] = v[3];
|
||||||
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
||||||
|
}`,"mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);"},at={f32:"gl.uniform1fv(location, v);","vec2<f32>":"gl.uniform2fv(location, v);","vec3<f32>":"gl.uniform3fv(location, v);","vec4<f32>":"gl.uniform4fv(location, v);","mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2<i32>":"gl.uniform2iv(location, v);","vec3<i32>":"gl.uniform3iv(location, v);","vec4<i32>":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2<u32>":"gl.uniform2iv(location, v);","vec3<u32>":"gl.uniform3iv(location, v);","vec4<u32>":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2<bool>":"gl.uniform2iv(location, v);","vec3<bool>":"gl.uniform3iv(location, v);","vec4<bool>":"gl.uniform4iv(location, v);"};function ot(t,e){const r=[`
|
||||||
|
var v = null;
|
||||||
|
var cv = null;
|
||||||
|
var cu = null;
|
||||||
|
var t = 0;
|
||||||
|
var gl = renderer.gl;
|
||||||
|
var name = null;
|
||||||
|
`];for(const s in t.uniforms){if(!e[s]){t.uniforms[s]instanceof F?t.uniforms[s].ubo?r.push(`
|
||||||
|
renderer.shader.bindUniformBlock(uv.${s}, "${s}");
|
||||||
|
`):r.push(`
|
||||||
|
renderer.shader.updateUniformGroup(uv.${s});
|
||||||
|
`):t.uniforms[s]instanceof ee&&r.push(`
|
||||||
|
renderer.shader.bindBufferResource(uv.${s}, "${s}");
|
||||||
|
`);continue}const n=t.uniformStructures[s];let i=!1;for(let a=0;a<N.length;a++){const o=N[a];if(n.type===o.type&&o.test(n)){r.push(`name = "${s}";`,N[a].uniform),i=!0;break}}if(!i){const o=(n.size===1?it:at)[n.type].replace("location",`ud["${s}"].location`);r.push(`
|
||||||
|
cu = ud["${s}"];
|
||||||
|
cv = cu.value;
|
||||||
|
v = uv["${s}"];
|
||||||
|
${o};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
|
||||||
|
`))}class Ee{constructor(e){this._cache={},this._uniformGroupSyncHash={},this._renderer=e,this.gl=null,this._cache={}}contextChange(e){this.gl=e}updateUniformGroup(e,r,s){const n=this._renderer.shader._getProgramData(r);(!e.isStatic||e._dirtyId!==n.uniformDirtyGroups[e.uid])&&(n.uniformDirtyGroups[e.uid]=e._dirtyId,this._getUniformSyncFunction(e,r)(n.uniformData,e.uniforms,this._renderer,s))}_getUniformSyncFunction(e,r){return this._uniformGroupSyncHash[e._signature]?.[r._key]||this._createUniformSyncFunction(e,r)}_createUniformSyncFunction(e,r){const s=this._uniformGroupSyncHash[e._signature]||(this._uniformGroupSyncHash[e._signature]={}),n=this._getSignature(e,r._uniformData,"u");return this._cache[n]||(this._cache[n]=this._generateUniformsSync(e,r._uniformData)),s[r._key]=this._cache[n],s[r._key]}_generateUniformsSync(e,r){return ot(e,r)}_getSignature(e,r,s){const n=e.uniforms,i=[`${s}-`];for(const a in n)i.push(a),r[a]&&i.push(r[a].type);return i.join("-")}destroy(){this._renderer=null,this._cache=null}}Ee.extension={type:[l.WebGLSystem],name:"uniformGroup"};function ct(t){const e={};return e.normal=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e.add=[t.ONE,t.ONE],e.multiply=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.screen=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.none=[0,0],e["normal-npm"]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e["add-npm"]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e["screen-npm"]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.erase=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e}const ut=0,_t=1,ft=2,ht=3,lt=4,dt=5,be=class C{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode="none",this._blendEq=!1,this.map=[],this.map[ut]=this.setBlend,this.map[_t]=this.setOffset,this.map[ft]=this.setCullFace,this.map[ht]=this.setDepthTest,this.map[lt]=this.setFrontFace,this.map[dt]=this.setDepthMask,this.checks=[],this.defaultState=U.for2d()}contextChange(e){this.gl=e,this.blendModesMap=ct(e),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let r=this.stateId^e.data,s=0;for(;r;)r&1&&this.map[s].call(this,!!(e.data&1<<s)),r=r>>1,s++;this.stateId=e.data}for(let r=0;r<this.checks.length;r++)this.checks[r](this,e)}forceState(e){e=e||this.defaultState;for(let r=0;r<this.map.length;r++)this.map[r].call(this,!!(e.data&1<<r));for(let r=0;r<this.checks.length;r++)this.checks[r](this,e);this.stateId=e.data}setBlend(e){this._updateCheck(C._checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this._updateCheck(C._checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(this.blendModesMap[e]||(e="normal"),e===this.blendMode)return;this.blendMode=e;const r=this.blendModesMap[e],s=this.gl;r.length===2?s.blendFunc(r[0],r[1]):s.blendFuncSeparate(r[0],r[1],r[2],r[3]),r.length===6?(this._blendEq=!0,s.blendEquationSeparate(r[4],r[5])):this._blendEq&&(this._blendEq=!1,s.blendEquationSeparate(s.FUNC_ADD,s.FUNC_ADD))}setPolygonOffset(e,r){this.gl.polygonOffset(e,r)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode="",this.setBlendMode("normal")}_updateCheck(e,r){const s=this.checks.indexOf(e);r&&s===-1?this.checks.push(e):!r&&s!==-1&&this.checks.splice(s,1)}static _checkBlendMode(e,r){e.setBlendMode(r.blendMode)}static _checkPolygonOffset(e,r){e.setPolygonOffset(1,r.polygonOffset)}destroy(){this.gl=null,this.checks.length=0}};be.extension={type:[l.WebGLSystem],name:"state"};let mt=be;class Et{constructor(e){this.target=ne.TEXTURE_2D,this.texture=e,this.width=-1,this.height=-1,this.type=f.UNSIGNED_BYTE,this.internalFormat=y.RGBA,this.format=y.RGBA,this.samplerType=0}}const bt={id:"image",upload(t,e,r){e.width===t.width||e.height===t.height?r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource):r.texImage2D(e.target,0,e.internalFormat,t.width,t.height,0,e.format,e.type,t.resource),e.width=t.width,e.height=t.height}},St={"bc1-rgba-unorm":!0,"bc1-rgba-unorm-srgb":!0,"bc2-rgba-unorm":!0,"bc2-rgba-unorm-srgb":!0,"bc3-rgba-unorm":!0,"bc3-rgba-unorm-srgb":!0,"bc4-r-unorm":!0,"bc4-r-snorm":!0,"bc5-rg-unorm":!0,"bc5-rg-snorm":!0,"bc6h-rgb-ufloat":!0,"bc6h-rgb-float":!0,"bc7-rgba-unorm":!0,"bc7-rgba-unorm-srgb":!0,"etc2-rgb8unorm":!0,"etc2-rgb8unorm-srgb":!0,"etc2-rgb8a1unorm":!0,"etc2-rgb8a1unorm-srgb":!0,"etc2-rgba8unorm":!0,"etc2-rgba8unorm-srgb":!0,"eac-r11unorm":!0,"eac-r11snorm":!0,"eac-rg11unorm":!0,"eac-rg11snorm":!0,"astc-4x4-unorm":!0,"astc-4x4-unorm-srgb":!0,"astc-5x4-unorm":!0,"astc-5x4-unorm-srgb":!0,"astc-5x5-unorm":!0,"astc-5x5-unorm-srgb":!0,"astc-6x5-unorm":!0,"astc-6x5-unorm-srgb":!0,"astc-6x6-unorm":!0,"astc-6x6-unorm-srgb":!0,"astc-8x5-unorm":!0,"astc-8x5-unorm-srgb":!0,"astc-8x6-unorm":!0,"astc-8x6-unorm-srgb":!0,"astc-8x8-unorm":!0,"astc-8x8-unorm-srgb":!0,"astc-10x5-unorm":!0,"astc-10x5-unorm-srgb":!0,"astc-10x6-unorm":!0,"astc-10x6-unorm-srgb":!0,"astc-10x8-unorm":!0,"astc-10x8-unorm-srgb":!0,"astc-10x10-unorm":!0,"astc-10x10-unorm-srgb":!0,"astc-12x10-unorm":!0,"astc-12x10-unorm-srgb":!0,"astc-12x12-unorm":!0,"astc-12x12-unorm-srgb":!0},gt={id:"compressed",upload(t,e,r){r.pixelStorei(r.UNPACK_ALIGNMENT,4);let s=t.pixelWidth,n=t.pixelHeight;const i=!!St[t.format];for(let a=0;a<t.resource.length;a++){const o=t.resource[a];i?r.compressedTexImage2D(r.TEXTURE_2D,a,e.internalFormat,s,n,0,o):r.texImage2D(r.TEXTURE_2D,a,e.internalFormat,s,n,0,e.format,e.type,o),s=Math.max(s>>1,1),n=Math.max(n>>1,1)}}},Se={id:"image",upload(t,e,r,s){const n=t.alphaMode==="premultiply-alpha-on-upload";r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n);const i=e.width,a=e.height,o=t.pixelWidth,c=t.pixelHeight,u=t.resourceWidth,_=t.resourceHeight;u<o||_<c?((i!==o||a!==c)&&r.texImage2D(e.target,0,e.internalFormat,o,c,0,e.format,e.type,null),s===2?r.texSubImage2D(r.TEXTURE_2D,0,0,0,u,_,e.format,e.type,t.resource):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource)):i===o||a===c?r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource):s===2?r.texImage2D(e.target,0,e.internalFormat,o,c,0,e.format,e.type,t.resource):r.texImage2D(e.target,0,e.internalFormat,e.format,e.type,t.resource),e.width=o,e.height=c}},pt={id:"video",upload(t,e,r,s){if(!t.isValid){r.texImage2D(e.target,0,e.internalFormat,1,1,0,e.format,e.type,null);return}Se.upload(t,e,r,s)}},W={linear:9729,nearest:9728},Rt={linear:{linear:9987,nearest:9985},nearest:{linear:9986,nearest:9984}},D={"clamp-to-edge":33071,repeat:10497,"mirror-repeat":33648},Tt={never:512,less:513,equal:514,"less-equal":515,greater:516,"not-equal":517,"greater-equal":518,always:519};function j(t,e,r,s,n,i,a,o){const c=i;if(!o||t.addressModeU!=="repeat"||t.addressModeV!=="repeat"||t.addressModeW!=="repeat"){const u=D[a?"clamp-to-edge":t.addressModeU],_=D[a?"clamp-to-edge":t.addressModeV],h=D[a?"clamp-to-edge":t.addressModeW];e[n](c,e.TEXTURE_WRAP_S,u),e[n](c,e.TEXTURE_WRAP_T,_),e.TEXTURE_WRAP_R&&e[n](c,e.TEXTURE_WRAP_R,h)}if((!o||t.magFilter!=="linear")&&e[n](c,e.TEXTURE_MAG_FILTER,W[t.magFilter]),r){if(!o||t.mipmapFilter!=="linear"){const u=Rt[t.minFilter][t.mipmapFilter];e[n](c,e.TEXTURE_MIN_FILTER,u)}}else e[n](c,e.TEXTURE_MIN_FILTER,W[t.minFilter]);if(s&&t.maxAnisotropy>1){const u=Math.min(t.maxAnisotropy,e.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));e[n](c,s.TEXTURE_MAX_ANISOTROPY_EXT,u)}t.compare&&e[n](c,e.TEXTURE_COMPARE_FUNC,Tt[t.compare])}function vt(t){return{r8unorm:t.RED,r8snorm:t.RED,r8uint:t.RED,r8sint:t.RED,r16uint:t.RED,r16sint:t.RED,r16float:t.RED,rg8unorm:t.RG,rg8snorm:t.RG,rg8uint:t.RG,rg8sint:t.RG,r32uint:t.RED,r32sint:t.RED,r32float:t.RED,rg16uint:t.RG,rg16sint:t.RG,rg16float:t.RG,rgba8unorm:t.RGBA,"rgba8unorm-srgb":t.RGBA,rgba8snorm:t.RGBA,rgba8uint:t.RGBA,rgba8sint:t.RGBA,bgra8unorm:t.RGBA,"bgra8unorm-srgb":t.RGBA,rgb9e5ufloat:t.RGB,rgb10a2unorm:t.RGBA,rg11b10ufloat:t.RGB,rg32uint:t.RG,rg32sint:t.RG,rg32float:t.RG,rgba16uint:t.RGBA,rgba16sint:t.RGBA,rgba16float:t.RGBA,rgba32uint:t.RGBA,rgba32sint:t.RGBA,rgba32float:t.RGBA,stencil8:t.STENCIL_INDEX8,depth16unorm:t.DEPTH_COMPONENT,depth24plus:t.DEPTH_COMPONENT,"depth24plus-stencil8":t.DEPTH_STENCIL,depth32float:t.DEPTH_COMPONENT,"depth32float-stencil8":t.DEPTH_STENCIL}}function xt(t,e){let r={},s=t.RGBA;return t instanceof G.get().getWebGLRenderingContext()?e.srgb&&(r={"rgba8unorm-srgb":e.srgb.SRGB8_ALPHA8_EXT,"bgra8unorm-srgb":e.srgb.SRGB8_ALPHA8_EXT}):(r={"rgba8unorm-srgb":t.SRGB8_ALPHA8,"bgra8unorm-srgb":t.SRGB8_ALPHA8},s=t.RGBA8),{r8unorm:t.R8,r8snorm:t.R8_SNORM,r8uint:t.R8UI,r8sint:t.R8I,r16uint:t.R16UI,r16sint:t.R16I,r16float:t.R16F,rg8unorm:t.RG8,rg8snorm:t.RG8_SNORM,rg8uint:t.RG8UI,rg8sint:t.RG8I,r32uint:t.R32UI,r32sint:t.R32I,r32float:t.R32F,rg16uint:t.RG16UI,rg16sint:t.RG16I,rg16float:t.RG16F,rgba8unorm:t.RGBA,...r,rgba8snorm:t.RGBA8_SNORM,rgba8uint:t.RGBA8UI,rgba8sint:t.RGBA8I,bgra8unorm:s,rgb9e5ufloat:t.RGB9_E5,rgb10a2unorm:t.RGB10_A2,rg11b10ufloat:t.R11F_G11F_B10F,rg32uint:t.RG32UI,rg32sint:t.RG32I,rg32float:t.RG32F,rgba16uint:t.RGBA16UI,rgba16sint:t.RGBA16I,rgba16float:t.RGBA16F,rgba32uint:t.RGBA32UI,rgba32sint:t.RGBA32I,rgba32float:t.RGBA32F,stencil8:t.STENCIL_INDEX8,depth16unorm:t.DEPTH_COMPONENT16,depth24plus:t.DEPTH_COMPONENT24,"depth24plus-stencil8":t.DEPTH24_STENCIL8,depth32float:t.DEPTH_COMPONENT32F,"depth32float-stencil8":t.DEPTH32F_STENCIL8,...e.s3tc?{"bc1-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,"bc2-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,"bc3-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{},...e.s3tc_sRGB?{"bc1-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,"bc2-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,"bc3-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}:{},...e.rgtc?{"bc4-r-unorm":e.rgtc.COMPRESSED_RED_RGTC1_EXT,"bc4-r-snorm":e.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,"bc5-rg-unorm":e.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,"bc5-rg-snorm":e.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}:{},...e.bptc?{"bc6h-rgb-float":e.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,"bc6h-rgb-ufloat":e.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,"bc7-rgba-unorm":e.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,"bc7-rgba-unorm-srgb":e.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT}:{},...e.etc?{"etc2-rgb8unorm":e.etc.COMPRESSED_RGB8_ETC2,"etc2-rgb8unorm-srgb":e.etc.COMPRESSED_SRGB8_ETC2,"etc2-rgb8a1unorm":e.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgb8a1unorm-srgb":e.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgba8unorm":e.etc.COMPRESSED_RGBA8_ETC2_EAC,"etc2-rgba8unorm-srgb":e.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,"eac-r11unorm":e.etc.COMPRESSED_R11_EAC,"eac-rg11unorm":e.etc.COMPRESSED_SIGNED_RG11_EAC}:{},...e.astc?{"astc-4x4-unorm":e.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,"astc-4x4-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,"astc-5x4-unorm":e.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,"astc-5x4-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,"astc-5x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,"astc-5x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,"astc-6x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,"astc-6x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,"astc-6x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,"astc-6x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,"astc-8x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,"astc-8x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,"astc-8x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,"astc-8x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,"astc-8x8-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,"astc-8x8-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,"astc-10x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,"astc-10x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,"astc-10x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,"astc-10x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,"astc-10x8-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,"astc-10x8-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,"astc-10x10-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,"astc-10x10-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,"astc-12x10-unorm":e.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,"astc-12x10-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,"astc-12x12-unorm":e.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,"astc-12x12-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR}:{}}}function At(t){return{r8unorm:t.UNSIGNED_BYTE,r8snorm:t.BYTE,r8uint:t.UNSIGNED_BYTE,r8sint:t.BYTE,r16uint:t.UNSIGNED_SHORT,r16sint:t.SHORT,r16float:t.HALF_FLOAT,rg8unorm:t.UNSIGNED_BYTE,rg8snorm:t.BYTE,rg8uint:t.UNSIGNED_BYTE,rg8sint:t.BYTE,r32uint:t.UNSIGNED_INT,r32sint:t.INT,r32float:t.FLOAT,rg16uint:t.UNSIGNED_SHORT,rg16sint:t.SHORT,rg16float:t.HALF_FLOAT,rgba8unorm:t.UNSIGNED_BYTE,"rgba8unorm-srgb":t.UNSIGNED_BYTE,rgba8snorm:t.BYTE,rgba8uint:t.UNSIGNED_BYTE,rgba8sint:t.BYTE,bgra8unorm:t.UNSIGNED_BYTE,"bgra8unorm-srgb":t.UNSIGNED_BYTE,rgb9e5ufloat:t.UNSIGNED_INT_5_9_9_9_REV,rgb10a2unorm:t.UNSIGNED_INT_2_10_10_10_REV,rg11b10ufloat:t.UNSIGNED_INT_10F_11F_11F_REV,rg32uint:t.UNSIGNED_INT,rg32sint:t.INT,rg32float:t.FLOAT,rgba16uint:t.UNSIGNED_SHORT,rgba16sint:t.SHORT,rgba16float:t.HALF_FLOAT,rgba32uint:t.UNSIGNED_INT,rgba32sint:t.INT,rgba32float:t.FLOAT,stencil8:t.UNSIGNED_BYTE,depth16unorm:t.UNSIGNED_SHORT,depth24plus:t.UNSIGNED_INT,"depth24plus-stencil8":t.UNSIGNED_INT_24_8,depth32float:t.FLOAT,"depth32float-stencil8":t.FLOAT_32_UNSIGNED_INT_24_8_REV}}const Bt=4;class ge{constructor(e){this.managedTextures=[],this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundTextures=[],this._activeTextureLocation=-1,this._boundSamplers=Object.create(null),this._uploads={image:Se,buffer:bt,video:pt,compressed:gt},this._useSeparateSamplers=!1,this._renderer=e}contextChange(e){this._gl=e,this._mapFormatToInternalFormat||(this._mapFormatToInternalFormat=xt(e,this._renderer.context.extensions),this._mapFormatToType=At(e),this._mapFormatToFormat=vt(e)),this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundSamplers=Object.create(null);for(let r=0;r<16;r++)this.bind(S.EMPTY,r)}initSource(e){this.bind(e)}bind(e,r=0){const s=e.source;e?(this.bindSource(s,r),this._useSeparateSamplers&&this._bindSampler(s.style,r)):(this.bindSource(null,r),this._useSeparateSamplers&&this._bindSampler(null,r))}bindSource(e,r=0){const s=this._gl;if(e._touched=this._renderer.textureGC.count,this._boundTextures[r]!==e){this._boundTextures[r]=e,this._activateLocation(r),e=e||S.EMPTY.source;const n=this.getGlSource(e);s.bindTexture(n.target,n.texture)}}_bindSampler(e,r=0){const s=this._gl;if(!e){this._boundSamplers[r]=null,s.bindSampler(r,null);return}const n=this._getGlSampler(e);this._boundSamplers[r]!==n&&(this._boundSamplers[r]=n,s.bindSampler(r,n))}unbind(e){const r=e.source,s=this._boundTextures,n=this._gl;for(let i=0;i<s.length;i++)if(s[i]===r){this._activateLocation(i);const a=this.getGlSource(r);n.bindTexture(a.target,null),s[i]=null}}_activateLocation(e){this._activeTextureLocation!==e&&(this._activeTextureLocation=e,this._gl.activeTexture(this._gl.TEXTURE0+e))}_initSource(e){const r=this._gl,s=new Et(r.createTexture());if(s.type=this._mapFormatToType[e.format],s.internalFormat=this._mapFormatToInternalFormat[e.format],s.format=this._mapFormatToFormat[e.format],e.autoGenerateMipmaps&&(this._renderer.context.supports.nonPowOf2mipmaps||e.isPowerOfTwo)){const n=Math.max(e.width,e.height);e.mipLevelCount=Math.floor(Math.log2(n))+1}return this._glTextures[e.uid]=s,this.managedTextures.includes(e)||(e.on("update",this.onSourceUpdate,this),e.on("resize",this.onSourceUpdate,this),e.on("styleChange",this.onStyleChange,this),e.on("destroy",this.onSourceDestroy,this),e.on("unload",this.onSourceUnload,this),e.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(e)),this.onSourceUpdate(e),this.updateStyle(e,!1),s}onStyleChange(e){this.updateStyle(e,!1)}updateStyle(e,r){const s=this._gl,n=this.getGlSource(e);s.bindTexture(s.TEXTURE_2D,n.texture),this._boundTextures[this._activeTextureLocation]=e,j(e.style,s,e.mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"texParameteri",s.TEXTURE_2D,!this._renderer.context.supports.nonPowOf2wrapping&&!e.isPowerOfTwo,r)}onSourceUnload(e){const r=this._glTextures[e.uid];r&&(this.unbind(e),this._glTextures[e.uid]=null,this._gl.deleteTexture(r.texture))}onSourceUpdate(e){const r=this._gl,s=this.getGlSource(e);r.bindTexture(r.TEXTURE_2D,s.texture),this._boundTextures[this._activeTextureLocation]=e,this._uploads[e.uploadMethodId]?this._uploads[e.uploadMethodId].upload(e,s,r,this._renderer.context.webGLVersion):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e.pixelWidth,e.pixelHeight,0,r.RGBA,r.UNSIGNED_BYTE,null),e.autoGenerateMipmaps&&e.mipLevelCount>1&&this.onUpdateMipmaps(e,!1)}onUpdateMipmaps(e,r=!0){r&&this.bindSource(e,0);const s=this.getGlSource(e);this._gl.generateMipmap(s.target)}onSourceDestroy(e){e.off("destroy",this.onSourceDestroy,this),e.off("update",this.onSourceUpdate,this),e.off("resize",this.onSourceUpdate,this),e.off("unload",this.onSourceUnload,this),e.off("styleChange",this.onStyleChange,this),e.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(e),1),this.onSourceUnload(e)}_initSampler(e){const r=this._gl,s=this._gl.createSampler();return this._glSamplers[e._resourceId]=s,j(e,r,this._boundTextures[this._activeTextureLocation].mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"samplerParameteri",s,!1,!0),this._glSamplers[e._resourceId]}_getGlSampler(e){return this._glSamplers[e._resourceId]||this._initSampler(e)}getGlSource(e){return this._glTextures[e.uid]||this._initSource(e)}generateCanvas(e){const{pixels:r,width:s,height:n}=this.getPixels(e),i=G.get().createCanvas();i.width=s,i.height=n;const a=i.getContext("2d");if(a){const o=a.createImageData(s,n);o.data.set(r),a.putImageData(o,0,0)}return i}getPixels(e){const r=e.source.resolution,s=e.frame,n=Math.max(Math.round(s.width*r),1),i=Math.max(Math.round(s.height*r),1),a=new Uint8Array(Bt*n*i),o=this._renderer,c=o.renderTarget.getRenderTarget(e),u=o.renderTarget.getGpuRenderTarget(c),_=o.gl;return _.bindFramebuffer(_.FRAMEBUFFER,u.resolveTargetFramebuffer),_.readPixels(Math.round(s.x*r),Math.round(s.y*r),n,i,_.RGBA,_.UNSIGNED_BYTE,a),{pixels:new Uint8ClampedArray(a.buffer),width:n,height:i}}destroy(){this.managedTextures.slice().forEach(e=>this.onSourceDestroy(e)),this.managedTextures=null,this._renderer=null}}ge.extension={type:[l.WebGLSystem],name:"texture"};class pe{init(){const e=new F({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new z,type:"mat3x3<f32>"},uRound:{value:0,type:"f32"}}),r=O({name:"graphics",bits:[Y,q(K),Q,P]});this.shader=new x({glProgram:r,resources:{localUniforms:e,batchSamplers:J}})}execute(e,r){const s=r.context,n=s.customShader||this.shader,i=e.renderer,a=i.graphicsContext,{geometry:o,instructions:c}=a.getContextRenderData(s);n.groups[0]=i.globalUniforms.bindGroup,i.shader.bind(n),i.geometry.bind(o,n.glProgram);const u=c.instructions;for(let _=0;_<c.instructionSize;_++){const h=u[_];if(h.size){for(let d=0;d<h.textures.textures.length;d++)i.texture.bind(h.textures.textures[d],d);i.geometry.draw("triangle-list",h.size,h.start)}}}destroy(){this.shader.destroy(!0),this.shader=null}}pe.extension={type:[l.WebGLPipesAdaptor],name:"graphics"};class Re{init(){const e=O({name:"mesh",bits:[Q,Fe,P]});this._shader=new x({glProgram:e,resources:{uTexture:S.EMPTY.source,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new z}}}})}execute(e,r){const s=e.renderer;let n=r._shader;if(n){if(!n.glProgram){m("Mesh shader has no glProgram",r.shader);return}}else{n=this._shader;const i=r.texture,a=i.source;n.resources.uTexture=a,n.resources.uSampler=a.style,n.resources.textureUniforms.uniforms.uTextureMatrix=i.textureMatrix.mapCoord}n.groups[100]=s.globalUniforms.bindGroup,n.groups[101]=e.localUniformsBindGroup,s.encoder.draw({geometry:r._geometry,shader:n,state:r.state})}destroy(){this._shader.destroy(!0),this._shader=null}}Re.extension={type:[l.WebGLPipesAdaptor],name:"mesh"};const Nt=[...Me,fe,We,we,re,ge,he,ie,Ee,me,ce,mt,ue,oe],It=[...Le],Dt=[te,Re,pe],Te=[],ve=[],xe=[];v.handleByNamedList(l.WebGLSystem,Te);v.handleByNamedList(l.WebGLPipes,ve);v.handleByNamedList(l.WebGLPipesAdaptor,xe);v.add(...Nt,...It,...Dt);wt=class extends Ne{constructor(){const e={name:"webgl",type:De.WEBGL,systems:Te,renderPipes:ve,renderPipeAdaptors:xe};super(e)}}});export{wt as WebGLRenderer,__tla};
|
||||||
@@ -1,156 +0,0 @@
|
|||||||
import{M as j,E as l,B as T,D as y,w as m,N as Ae,k as E,i as K,S as v,R as L,h as Be,d as x,j as $,e as p,A as Ne,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{S as C,j as U,k as z,m as Y,n as G,b as R,h as q,f as Ie,U as P,o as Z,R as De,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";import{b as Q,__tla as __tla_2}from"./batchSamplersUniformGroup-CKlXTtMl.js";import{e as ye,G as Ce,c as Ue,b as Ge,U as Pe,R as Oe,B as J,d as A,f as Fe,S as Me,a as Le,__tla as __tla_3}from"./SharedSystems-Do60oLa7.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_5}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";let Ht;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{class ee{constructor(){this._didUpload=!1,this._tempState=C.for2d()}init(e){const r=U({name:"batch",bits:[z,Y(j),G]});this._shader=new R({glProgram:r,resources:{batchSamplers:Q}}),e.renderer.runners.contextChange.add(this)}contextChange(){this._didUpload=!1}start(e,r){const s=e.renderer;s.shader.bind(this._shader,this._didUpload),s.shader.updateUniformGroup(s.globalUniforms.uniformGroup),s.geometry.bind(r,this._shader.glProgram)}execute(e,r){const s=e.renderer;this._didUpload=!0,this._tempState.blendMode=r.blendMode,s.state.set(this._tempState);const n=r.textures.textures;for(let i=0;i<n.length;i++)s.texture.bind(n[i],i);s.geometry.draw("triangle-list",r.size,r.start)}destroy(){this._shader.destroy(!0),this._shader=null}}ee.extension={type:[l.WebGLPipesAdaptor],name:"batch"};var g=(t=>(t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",t))(g||{});class He{constructor(e,r){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.type=r}}class te{constructor(e){this._gpuBuffers=Object.create(null),this._boundBufferBases=Object.create(null),this._renderer=e}destroy(){this._renderer=null,this._gl=null,this._gpuBuffers=null,this._boundBufferBases=null}contextChange(){this._gpuBuffers=Object.create(null),this._gl=this._renderer.gl}getGlBuffer(e){return this._gpuBuffers[e.uid]||this.createGLBuffer(e)}bind(e){const{_gl:r}=this,s=this.getGlBuffer(e);r.bindBuffer(s.type,s.buffer)}bindBufferBase(e,r){const{_gl:s}=this;if(this._boundBufferBases[r]!==e){const n=this.getGlBuffer(e);this._boundBufferBases[r]=e,s.bindBufferBase(s.UNIFORM_BUFFER,r,n.buffer)}}bindBufferRange(e,r,s){const{_gl:n}=this;s=s||0;const i=this.getGlBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,r||0,i.buffer,s*256,256)}updateBuffer(e){const{_gl:r}=this,s=this.getGlBuffer(e);if(e._updateID===s.updateID)return s;s.updateID=e._updateID,r.bindBuffer(s.type,s.buffer);const n=e.data;if(s.byteLength>=e.data.byteLength)r.bufferSubData(s.type,0,n,0,e._updateSize/n.BYTES_PER_ELEMENT);else{const i=e.descriptor.usage&T.STATIC?r.STATIC_DRAW:r.DYNAMIC_DRAW;s.byteLength=n.byteLength,r.bufferData(s.type,n,i)}return s}destroyAll(){const e=this._gl;for(const r in this._gpuBuffers)e.deleteBuffer(this._gpuBuffers[r].buffer);this._gpuBuffers=Object.create(null)}onBufferDestroy(e,r){const s=this._gpuBuffers[e.uid],n=this._gl;r||n.deleteBuffer(s.buffer),this._gpuBuffers[e.uid]=null}createGLBuffer(e){const{_gl:r}=this;let s=g.ARRAY_BUFFER;e.descriptor.usage&T.INDEX?s=g.ELEMENT_ARRAY_BUFFER:e.descriptor.usage&T.UNIFORM&&(s=g.UNIFORM_BUFFER);const n=new He(r.createBuffer(),s);return this._gpuBuffers[e.uid]=n,e.on("destroy",this.onBufferDestroy,this),n}}te.extension={type:[l.WebGLSystem],name:"buffer"};const O=class re{constructor(e){this.supports={uint32Indices:!0,uniformBufferObject:!0,vertexArrayObject:!0,srgbTextures:!0,nonPowOf2wrapping:!0,msaa:!0,nonPowOf2mipmaps:!0},this._renderer=e,this.extensions=Object.create(null),this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this._renderer.gl=e}init(e){if(e={...re.defaultOptions,...e},e.context)this.initFromContext(e.context);else{const r=this._renderer.background.alpha<1,s=e.premultipliedAlpha??!0,n=e.antialias&&!this._renderer.backBuffer.useBackBuffer;this.createContext(e.preferWebGLVersion,{alpha:r,premultipliedAlpha:s,antialias:n,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference??"default"})}}initFromContext(e){this.gl=e,this.webGLVersion=e instanceof y.get().getWebGL2RenderingContext()?2:1,this.getExtensions(),this.validateContext(e),this._renderer.runners.contextChange.emit(e);const r=this._renderer.view.canvas;r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}createContext(e,r){let s;const n=this._renderer.view.canvas;if(e===2&&(s=n.getContext("webgl2",r)),!s&&(s=n.getContext("webgl",r),!s))throw new Error("This browser does not support WebGL. Try using the canvas renderer");this.gl=s,this.initFromContext(this.gl)}getExtensions(){const{gl:e}=this,r={anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc"),bptc:e.getExtension("EXT_texture_compression_bptc"),rgtc:e.getExtension("EXT_texture_compression_rgtc"),loseContext:e.getExtension("WEBGL_lose_context")};this.webGLVersion===1?this.extensions={...r,drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear"),vertexAttribDivisorANGLE:e.getExtension("ANGLE_instanced_arrays"),srgb:e.getExtension("EXT_sRGB")}:this.extensions={...r,colorBufferFloat:e.getExtension("EXT_color_buffer_float")}}handleContextLost(e){e.preventDefault(),this._contextLossForced&&(this._contextLossForced=!1,setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext?.restoreContext()},0))}handleContextRestored(){this._renderer.runners.contextChange.emit(this.gl)}destroy(){const e=this._renderer.view.canvas;this._renderer=null,e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext?.loseContext()}forceContextLoss(){this.extensions.loseContext?.loseContext(),this._contextLossForced=!0}validateContext(e){const r=e.getContextAttributes();r&&!r.stencil&&m("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=this.supports,n=this.webGLVersion===2,i=this.extensions;s.uint32Indices=n||!!i.uint32ElementIndex,s.uniformBufferObject=n,s.vertexArrayObject=n||!!i.vertexArrayObject,s.srgbTextures=n||!!i.srgb,s.nonPowOf2wrapping=n,s.nonPowOf2mipmaps=n,s.msaa=n,s.uint32Indices||m("Provided WebGL context does not support 32 index buffer, large scenes may not render correctly")}};O.extension={type:[l.WebGLSystem],name:"context"};O.defaultOptions={context:null,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:void 0,preferWebGLVersion:2};let we=O;var I=(t=>(t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL",t))(I||{}),se=(t=>(t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",t))(se||{}),f=(t=>(t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT",t))(f||{});const H={uint8x2:f.UNSIGNED_BYTE,uint8x4:f.UNSIGNED_BYTE,sint8x2:f.BYTE,sint8x4:f.BYTE,unorm8x2:f.UNSIGNED_BYTE,unorm8x4:f.UNSIGNED_BYTE,snorm8x2:f.BYTE,snorm8x4:f.BYTE,uint16x2:f.UNSIGNED_SHORT,uint16x4:f.UNSIGNED_SHORT,sint16x2:f.SHORT,sint16x4:f.SHORT,unorm16x2:f.UNSIGNED_SHORT,unorm16x4:f.UNSIGNED_SHORT,snorm16x2:f.SHORT,snorm16x4:f.SHORT,float16x2:f.HALF_FLOAT,float16x4:f.HALF_FLOAT,float32:f.FLOAT,float32x2:f.FLOAT,float32x3:f.FLOAT,float32x4:f.FLOAT,uint32:f.UNSIGNED_INT,uint32x2:f.UNSIGNED_INT,uint32x3:f.UNSIGNED_INT,uint32x4:f.UNSIGNED_INT,sint32:f.INT,sint32x2:f.INT,sint32x3:f.INT,sint32x4:f.INT};function ke(t){return H[t]??H.float32}const Ve={"point-list":0,"line-list":1,"line-strip":3,"triangle-list":4,"triangle-strip":5};class ne{constructor(e){this._geometryVaoHash=Object.create(null),this._renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0}contextChange(){const e=this.gl=this._renderer.gl;if(!this._renderer.context.supports.vertexArrayObject)throw new Error("[PixiJS] Vertex Array Objects are not supported on this device");const r=this._renderer.context.extensions.vertexArrayObject;r&&(e.createVertexArray=()=>r.createVertexArrayOES(),e.bindVertexArray=n=>r.bindVertexArrayOES(n),e.deleteVertexArray=n=>r.deleteVertexArrayOES(n));const s=this._renderer.context.extensions.vertexAttribDivisorANGLE;s&&(e.drawArraysInstanced=(n,i,a,o)=>{s.drawArraysInstancedANGLE(n,i,a,o)},e.drawElementsInstanced=(n,i,a,o,c)=>{s.drawElementsInstancedANGLE(n,i,a,o,c)},e.vertexAttribDivisor=(n,i)=>s.vertexAttribDivisorANGLE(n,i)),this._activeGeometry=null,this._activeVao=null,this._geometryVaoHash=Object.create(null)}bind(e,r){const s=this.gl;this._activeGeometry=e;const n=this.getVao(e,r);this._activeVao!==n&&(this._activeVao=n,s.bindVertexArray(n)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const e=this._activeGeometry,r=this._renderer.buffer;for(let s=0;s<e.buffers.length;s++){const n=e.buffers[s];r.updateBuffer(n)}}checkCompatibility(e,r){const s=e.attributes,n=r._attributeData;for(const i in n)if(!s[i])throw new Error(`shader and geometry incompatible, geometry missing the "${i}" attribute`)}getSignature(e,r){const s=e.attributes,n=r._attributeData,i=["g",e.uid];for(const a in s)n[a]&&i.push(a,n[a].location);return i.join("-")}getVao(e,r){return this._geometryVaoHash[e.uid]?.[r._key]||this.initGeometryVao(e,r)}initGeometryVao(e,r,s=!0){const n=this._renderer.gl,i=this._renderer.buffer;this._renderer.shader._getProgramData(r),this.checkCompatibility(e,r);const a=this.getSignature(e,r);this._geometryVaoHash[e.uid]||(this._geometryVaoHash[e.uid]=Object.create(null),e.on("destroy",this.onGeometryDestroy,this));const o=this._geometryVaoHash[e.uid];let c=o[a];if(c)return o[r._key]=c,c;ye(e,r._attributeData);const u=e.buffers;c=n.createVertexArray(),n.bindVertexArray(c);for(let _=0;_<u.length;_++){const h=u[_];i.bind(h)}return this.activateVao(e,r),o[r._key]=c,o[a]=c,n.bindVertexArray(null),c}onGeometryDestroy(e,r){const s=this._geometryVaoHash[e.uid],n=this.gl;if(s){if(r)for(const i in s)this._activeVao!==s[i]&&this.unbind(),n.deleteVertexArray(s[i]);this._geometryVaoHash[e.uid]=null}}destroyAll(e=!1){const r=this.gl;for(const s in this._geometryVaoHash){if(e)for(const n in this._geometryVaoHash[s]){const i=this._geometryVaoHash[s];this._activeVao!==i&&this.unbind(),r.deleteVertexArray(i[n])}this._geometryVaoHash[s]=null}}activateVao(e,r){const s=this._renderer.gl,n=this._renderer.buffer,i=e.attributes;e.indexBuffer&&n.bind(e.indexBuffer);let a=null;for(const o in i){const c=i[o],u=c.buffer,_=n.getGlBuffer(u);if(r._attributeData[o]){a!==_&&(n.bind(u),a=_);const h=c.location;s.enableVertexAttribArray(h);const d=q(c.format);if(s.vertexAttribPointer(h,d.size,ke(c.format),d.normalised,c.stride,c.offset),c.instance)if(this.hasInstance)s.vertexAttribDivisor(h,1);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,r,s,n){const{gl:i}=this._renderer,a=this._activeGeometry,o=Ve[a.topology||e];if(n||(n=a.instanceCount),a.indexBuffer){const c=a.indexBuffer.data.BYTES_PER_ELEMENT,u=c===2?i.UNSIGNED_SHORT:i.UNSIGNED_INT;n>1?i.drawElementsInstanced(o,r||a.indexBuffer.data.length,u,(s||0)*c,n):i.drawElements(o,r||a.indexBuffer.data.length,u,(s||0)*c)}else n>1?i.drawArraysInstanced(o,s||0,r||a.getSize(),n):i.drawArrays(o,s||0,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this._renderer=null,this.gl=null,this._activeVao=null,this._activeGeometry=null}}ne.extension={type:[l.WebGLSystem],name:"geometry"};const Xe=new Ae({attributes:{aPosition:[-1,-1,3,-1,-1,3]}}),F=class ie{constructor(e){this.useBackBuffer=!1,this._useBackBufferThisRender=!1,this._renderer=e}init(e={}){const{useBackBuffer:r,antialias:s}={...ie.defaultOptions,...e};this.useBackBuffer=r,this._antialias=s,this._renderer.context.supports.msaa||(m("antialiasing, is not supported on when using the back buffer"),this._antialias=!1),this._state=C.for2d();const n=new Ie({vertex:`
|
|
||||||
attribute vec2 aPosition;
|
|
||||||
out vec2 vUv;
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
gl_Position = vec4(aPosition, 0.0, 1.0);
|
|
||||||
|
|
||||||
vUv = (aPosition + 1.0) / 2.0;
|
|
||||||
|
|
||||||
// flip dem UVs
|
|
||||||
vUv.y = 1.0 - vUv.y;
|
|
||||||
}`,fragment:`
|
|
||||||
in vec2 vUv;
|
|
||||||
out vec4 finalColor;
|
|
||||||
|
|
||||||
uniform sampler2D uTexture;
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
finalColor = texture(uTexture, vUv);
|
|
||||||
}`,name:"big-triangle"});this._bigTriangleShader=new R({glProgram:n,resources:{uTexture:E.WHITE.source}})}renderStart(e){const r=this._renderer.renderTarget.getRenderTarget(e.target);if(this._useBackBufferThisRender=this.useBackBuffer&&!!r.isRoot,this._useBackBufferThisRender){const s=this._renderer.renderTarget.getRenderTarget(e.target);this._targetTexture=s.colorTexture,e.target=this._getBackBufferTexture(s.colorTexture)}}renderEnd(){this._presentBackBuffer()}_presentBackBuffer(){const e=this._renderer;e.renderTarget.finishRenderPass(),this._useBackBufferThisRender&&(e.renderTarget.bind(this._targetTexture,!1),this._bigTriangleShader.resources.uTexture=this._backBufferTexture.source,e.encoder.draw({geometry:Xe,shader:this._bigTriangleShader,state:this._state}))}_getBackBufferTexture(e){return this._backBufferTexture=this._backBufferTexture||new E({source:new K({width:e.width,height:e.height,resolution:e._resolution,antialias:this._antialias})}),this._backBufferTexture.source.resize(e.width,e.height,e._resolution),this._backBufferTexture}destroy(){this._backBufferTexture&&(this._backBufferTexture.destroy(),this._backBufferTexture=null)}};F.extension={type:[l.WebGLSystem],name:"backBuffer",priority:1};F.defaultOptions={useBackBuffer:!1};let We=F;class ae{constructor(e){this._colorMaskCache=15,this._renderer=e}setMask(e){this._colorMaskCache!==e&&(this._colorMaskCache=e,this._renderer.gl.colorMask(!!(e&8),!!(e&4),!!(e&2),!!(e&1)))}}ae.extension={type:[l.WebGLSystem],name:"colorMask"};class oe{constructor(e){this.commandFinished=Promise.resolve(),this._renderer=e}setGeometry(e,r){this._renderer.geometry.bind(e,r.glProgram)}finishRenderPass(){}draw(e){const r=this._renderer,{geometry:s,shader:n,state:i,skipSync:a,topology:o,size:c,start:u,instanceCount:_}=e;r.shader.bind(n,a),r.geometry.bind(s,r.shader._activeProgram),i&&r.state.set(i),r.geometry.draw(o,c,u,_??s.instanceCount)}destroy(){this._renderer=null}}oe.extension={type:[l.WebGLSystem],name:"encoder"};class je{constructor(){this.width=-1,this.height=-1,this.msaa=!1,this.msaaRenderBuffer=[]}}class ce{constructor(e){this._stencilCache={enabled:!1,stencilReference:0,stencilMode:v.NONE},this._renderTargetStencilState=Object.create(null),e.renderTarget.onRenderTargetChange.add(this)}contextChange(e){this._gl=e,this._comparisonFuncMapping={always:e.ALWAYS,never:e.NEVER,equal:e.EQUAL,"not-equal":e.NOTEQUAL,less:e.LESS,"less-equal":e.LEQUAL,greater:e.GREATER,"greater-equal":e.GEQUAL},this._stencilOpsMapping={keep:e.KEEP,zero:e.ZERO,replace:e.REPLACE,invert:e.INVERT,"increment-clamp":e.INCR,"decrement-clamp":e.DECR,"increment-wrap":e.INCR_WRAP,"decrement-wrap":e.DECR_WRAP}}onRenderTargetChange(e){if(this._activeRenderTarget===e)return;this._activeRenderTarget=e;let r=this._renderTargetStencilState[e.uid];r||(r=this._renderTargetStencilState[e.uid]={stencilMode:v.DISABLED,stencilReference:0}),this.setStencilMode(r.stencilMode,r.stencilReference)}setStencilMode(e,r){const s=this._renderTargetStencilState[this._activeRenderTarget.uid],n=this._gl,i=Ce[e],a=this._stencilCache;if(s.stencilMode=e,s.stencilReference=r,e===v.DISABLED){this._stencilCache.enabled&&(this._stencilCache.enabled=!1,n.disable(n.STENCIL_TEST));return}this._stencilCache.enabled||(this._stencilCache.enabled=!0,n.enable(n.STENCIL_TEST)),(e!==a.stencilMode||a.stencilReference!==r)&&(a.stencilMode=e,a.stencilReference=r,n.stencilFunc(this._comparisonFuncMapping[i.stencilBack.compare],r,255),n.stencilOp(n.KEEP,n.KEEP,this._stencilOpsMapping[i.stencilBack.passOp]))}}ce.extension={type:[l.WebGLSystem],name:"stencil"};const ue={f32:4,"vec2<f32>":8,"vec3<f32>":12,"vec4<f32>":16,"mat2x2<f32>":16*2,"mat3x3<f32>":16*3,"mat4x4<f32>":16*4};function Ke(t){const e=t.map(i=>({data:i,offset:0,size:0}));let r=0,s=0,n=0;for(let i=0;i<e.length;i++){const a=e[i];if(r=ue[a.data.type],!r)throw new Error(`Unknown type ${a.data.type}`);if(a.data.size>1&&(r=Math.max(r,16)*a.data.size),a.size=r,s%r!==0&&s<16){const o=s%r%16;s+=o,n+=o}s+r>16?(n=Math.ceil(n/16)*16,a.offset=n,n+=r,s=r):(a.offset=n,s+=r,n+=r)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function $e(t,e){const r=Math.max(ue[t.data.type]/16,1),s=t.data.value.length/t.data.size,n=(4-s%4)%4;return`
|
|
||||||
v = uv.${t.data.name};
|
|
||||||
offset += ${e};
|
|
||||||
|
|
||||||
arrayOffset = offset;
|
|
||||||
|
|
||||||
t = 0;
|
|
||||||
|
|
||||||
for(var i=0; i < ${t.data.size*r}; i++)
|
|
||||||
{
|
|
||||||
for(var j = 0; j < ${s}; j++)
|
|
||||||
{
|
|
||||||
data[arrayOffset++] = v[t++];
|
|
||||||
}
|
|
||||||
${n!==0?`arrayOffset += ${n};`:""}
|
|
||||||
}
|
|
||||||
`}function ze(t){return Ue(t,"uboStd40",$e,Ge)}class _e extends Pe{constructor(){super({createUboElements:Ke,generateUboSync:ze})}}_e.extension={type:[l.WebGLSystem],name:"ubo"};class Ye{constructor(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new L}init(e,r){this._renderer=e,this._renderTargetSystem=r,e.runners.contextChange.add(this)}contextChange(){this._clearColorCache=[0,0,0,0],this._viewPortCache=new L}copyToTexture(e,r,s,n,i){const a=this._renderTargetSystem,o=this._renderer,c=a.getGpuRenderTarget(e),u=o.gl;return this.finishRenderPass(e),u.bindFramebuffer(u.FRAMEBUFFER,c.resolveTargetFramebuffer),o.texture.bind(r,0),u.copyTexSubImage2D(u.TEXTURE_2D,0,i.x,i.y,s.x,s.y,n.width,n.height),r}startRenderPass(e,r=!0,s,n){const i=this._renderTargetSystem,a=e.colorTexture,o=i.getGpuRenderTarget(e);let c=n.y;e.isRoot&&(c=a.pixelHeight-n.height),e.colorTextures.forEach(h=>{this._renderer.texture.unbind(h)});const u=this._renderer.gl;u.bindFramebuffer(u.FRAMEBUFFER,o.framebuffer);const _=this._viewPortCache;(_.x!==n.x||_.y!==c||_.width!==n.width||_.height!==n.height)&&(_.x=n.x,_.y=c,_.width=n.width,_.height=n.height,u.viewport(n.x,c,n.width,n.height)),!o.depthStencilRenderBuffer&&(e.stencil||e.depth)&&this._initStencil(o),this.clear(e,r,s)}finishRenderPass(e){const s=this._renderTargetSystem.getGpuRenderTarget(e);if(!s.msaa)return;const n=this._renderer.gl;n.bindFramebuffer(n.FRAMEBUFFER,s.resolveTargetFramebuffer),n.bindFramebuffer(n.READ_FRAMEBUFFER,s.framebuffer),n.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,n.COLOR_BUFFER_BIT,n.NEAREST),n.bindFramebuffer(n.FRAMEBUFFER,s.framebuffer)}initGpuRenderTarget(e){const s=this._renderer.gl,n=new je;return Be.test(e.colorTexture.resource)?(n.framebuffer=null,n):(this._initColor(e,n),s.bindFramebuffer(s.FRAMEBUFFER,null),n)}clear(e,r,s){if(!r)return;const n=this._renderTargetSystem;typeof r=="boolean"&&(r=r?x.ALL:x.NONE);const i=this._renderer.gl;if(r&x.COLOR){s??(s=n.defaultClearColor);const a=this._clearColorCache,o=s;(a[0]!==o[0]||a[1]!==o[1]||a[2]!==o[2]||a[3]!==o[3])&&(a[0]=o[0],a[1]=o[1],a[2]=o[2],a[3]=o[3],i.clearColor(o[0],o[1],o[2],o[3]))}i.clear(r)}resizeGpuRenderTarget(e){if(e.isRoot)return;const s=this._renderTargetSystem.getGpuRenderTarget(e);this._resizeColor(e,s),e.stencil&&this._resizeStencil(s)}_initColor(e,r){const s=this._renderer,n=s.gl,i=n.createFramebuffer();if(r.resolveTargetFramebuffer=i,n.bindFramebuffer(n.FRAMEBUFFER,i),r.width=e.colorTexture.source.pixelWidth,r.height=e.colorTexture.source.pixelHeight,e.colorTextures.forEach((a,o)=>{const c=a.source;c.antialias&&(s.context.supports.msaa?r.msaa=!0:m("[RenderTexture] Antialiasing on textures is not supported in WebGL1")),s.texture.bindSource(c,0);const _=s.texture.getGlSource(c).texture;n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+o,3553,_,0)}),r.msaa){const a=n.createFramebuffer();r.framebuffer=a,n.bindFramebuffer(n.FRAMEBUFFER,a),e.colorTextures.forEach((o,c)=>{const u=n.createRenderbuffer();r.msaaRenderBuffer[c]=u})}else r.framebuffer=i;this._resizeColor(e,r)}_resizeColor(e,r){const s=e.colorTexture.source;if(r.width=s.pixelWidth,r.height=s.pixelHeight,e.colorTextures.forEach((n,i)=>{i!==0&&n.source.resize(s.width,s.height,s._resolution)}),r.msaa){const n=this._renderer,i=n.gl,a=r.framebuffer;i.bindFramebuffer(i.FRAMEBUFFER,a),e.colorTextures.forEach((o,c)=>{const u=o.source;n.texture.bindSource(u,0);const h=n.texture.getGlSource(u).internalFormat,d=r.msaaRenderBuffer[c];i.bindRenderbuffer(i.RENDERBUFFER,d),i.renderbufferStorageMultisample(i.RENDERBUFFER,4,h,u.pixelWidth,u.pixelHeight),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+c,i.RENDERBUFFER,d)})}}_initStencil(e){if(e.framebuffer===null)return;const r=this._renderer.gl,s=r.createRenderbuffer();e.depthStencilRenderBuffer=s,r.bindRenderbuffer(r.RENDERBUFFER,s),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,s),this._resizeStencil(e)}_resizeStencil(e){const r=this._renderer.gl;r.bindRenderbuffer(r.RENDERBUFFER,e.depthStencilRenderBuffer),e.msaa?r.renderbufferStorageMultisample(r.RENDERBUFFER,4,r.DEPTH24_STENCIL8,e.width,e.height):r.renderbufferStorage(r.RENDERBUFFER,this._renderer.context.webGLVersion===2?r.DEPTH24_STENCIL8:r.DEPTH_STENCIL,e.width,e.height)}}class fe extends Oe{constructor(e){super(e),this.adaptor=new Ye,this.adaptor.init(e,this)}}fe.extension={type:[l.WebGLSystem],name:"renderTarget"};function qe(t,e){const r=[],s=[`
|
|
||||||
var g = s.groups;
|
|
||||||
var sS = r.shader;
|
|
||||||
var p = s.glProgram;
|
|
||||||
var ugS = r.uniformGroup;
|
|
||||||
var resources;
|
|
||||||
`];let n=!1,i=0,a=0;const o=e._getProgramData(t.glProgram);for(const u in t.groups){const _=t.groups[u];r.push(`
|
|
||||||
resources = g[${u}].resources;
|
|
||||||
`);for(const h in _.resources){const d=_.resources[h];if(d instanceof P)d.ubo?r.push(`
|
|
||||||
sS.bindUniformBlock(
|
|
||||||
resources[${h}],
|
|
||||||
sS._uniformBindMap[${u}[${h}],
|
|
||||||
${i++}
|
|
||||||
);
|
|
||||||
`):r.push(`
|
|
||||||
ugS.updateUniformGroup(resources[${h}], p, sD);
|
|
||||||
`);else if(d instanceof J)r.push(`
|
|
||||||
sS.bindUniformBlock(
|
|
||||||
resources[${h}],
|
|
||||||
sS._uniformBindMap[${u}[${h}],
|
|
||||||
${i++}
|
|
||||||
);
|
|
||||||
`);else if(d instanceof K){const xe=t._uniformBindMap[u][h],M=o.uniformData[xe];M&&(n||(n=!0,s.push(`
|
|
||||||
var tS = r.texture;
|
|
||||||
`)),e._gl.uniform1i(M.location,a),r.push(`
|
|
||||||
tS.bind(resources[${h}], ${a});
|
|
||||||
`),a++)}}}const c=[...s,...r].join(`
|
|
||||||
`);return new Function("r","s","sD",c)}class Ze{constructor(e,r){this.program=e,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBlockBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBlockBindings=null,this.program=null}}function w(t,e,r){const s=t.createShader(e);return t.shaderSource(s,r),t.compileShader(s),s}function B(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function he(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return B(2*e);case"bvec3":return B(3*e);case"bvec4":return B(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}let b=null;const k={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"},Qe={float:"float32",vec2:"float32x2",vec3:"float32x3",vec4:"float32x4",int:"sint32",ivec2:"sint32x2",ivec3:"sint32x3",ivec4:"sint32x4",uint:"uint32",uvec2:"uint32x2",uvec3:"uint32x3",uvec4:"uint32x4",bool:"uint32",bvec2:"uint32x2",bvec3:"uint32x3",bvec4:"uint32x4"};function le(t,e){if(!b){const r=Object.keys(k);b={};for(let s=0;s<r.length;++s){const n=r[s];b[t[n]]=k[n]}}return b[e]}function Je(t,e){const r=le(t,e);return Qe[r]||"float32"}function et(t,e,r=!1){const s={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a<n;a++){const o=e.getActiveAttrib(t,a);if(o.name.startsWith("gl_"))continue;const c=Je(e,o.type);s[o.name]={location:0,format:c,stride:q(c).stride,offset:0,instance:!1,start:0}}const i=Object.keys(s);if(r){i.sort((a,o)=>a>o?1:-1);for(let a=0;a<i.length;a++)s[i[a]].location=a,e.bindAttribLocation(t,a,i[a]);e.linkProgram(t)}else for(let a=0;a<i.length;a++)s[i[a]].location=e.getAttribLocation(t,i[a]);return s}function tt(t,e){if(!e.ACTIVE_UNIFORM_BLOCKS)return{};const r={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORM_BLOCKS);for(let n=0;n<s;n++){const i=e.getActiveUniformBlockName(t,n),a=e.getUniformBlockIndex(t,i),o=e.getActiveUniformBlockParameter(t,n,e.UNIFORM_BLOCK_DATA_SIZE);r[i]={name:i,index:a,size:o}}return r}function rt(t,e){const r={},s=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let n=0;n<s;n++){const i=e.getActiveUniform(t,n),a=i.name.replace(/\[.*?\]$/,""),o=!!i.name.match(/\[.*?\]$/),c=le(e,i.type);r[a]={name:a,index:n,type:c,size:i.size,isArray:o,value:he(c,i.size)}}return r}function V(t,e){const r=t.getShaderSource(e).split(`
|
|
||||||
`).map((u,_)=>`${_}: ${u}`),s=t.getShaderInfoLog(e),n=s.split(`
|
|
||||||
`),i={},a=n.map(u=>parseFloat(u.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(u=>u&&!i[u]?(i[u]=!0,!0):!1),o=[""];a.forEach(u=>{r[u-1]=`%c${r[u-1]}%c`,o.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=r.join(`
|
|
||||||
`);o[0]=c,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...o),console.groupEnd()}function st(t,e,r,s){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||V(t,r),t.getShaderParameter(s,t.COMPILE_STATUS)||V(t,s),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}function nt(t,e){const r=w(t,t.VERTEX_SHADER,e.vertex),s=w(t,t.FRAGMENT_SHADER,e.fragment),n=t.createProgram();t.attachShader(n,r),t.attachShader(n,s);const i=e.transformFeedbackVaryings;i&&(typeof t.transformFeedbackVaryings!="function"?m("TransformFeedback is not supported but TransformFeedbackVaryings are given."):t.transformFeedbackVaryings(n,i.names,i.bufferMode==="separate"?t.SEPARATE_ATTRIBS:t.INTERLEAVED_ATTRIBS)),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||st(t,n,r,s),e._attributeData=et(n,t,!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertex)),e._uniformData=rt(n,t),e._uniformBlockData=tt(n,t),t.deleteShader(r),t.deleteShader(s);const a={};for(const c in e._uniformData){const u=e._uniformData[c];a[c]={location:t.getUniformLocation(n,c),value:he(u.type,u.size)}}return new Ze(n,a)}const S={textureCount:0,blockIndex:0};class de{constructor(e){this._activeProgram=null,this._programDataHash=Object.create(null),this._nextIndex=0,this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._shaderSyncFunctions=Object.create(null),this._renderer=e}contextChange(e){this._gl=e,this._maxBindings=e.MAX_UNIFORM_BUFFER_BINDINGS?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0,this._programDataHash=Object.create(null),this._boundUniformsIdsToIndexHash=Object.create(null),this._boundIndexToUniformsHash=Object.create(null),this._activeProgram=null}bind(e,r){if(this._setProgram(e.glProgram),r)return;S.textureCount=0,S.blockIndex=0;let s=this._shaderSyncFunctions[e.glProgram._key];s||(s=this._shaderSyncFunctions[e.glProgram._key]=this._generateShaderSync(e,this)),s(this._renderer,e,S)}updateUniformGroup(e){this._renderer.uniformGroup.updateUniformGroup(e,this._activeProgram,S)}bindUniformBlock(e,r,s=0){const n=this._renderer.buffer,i=this._getProgramData(this._activeProgram),a=e._bufferResource;a&&this._renderer.ubo.updateUniformGroup(e),n.updateBuffer(e.buffer);let o=this._boundUniformsIdsToIndexHash[e.uid];if(o===void 0){const _=this._nextIndex++%this._maxBindings,h=this._boundIndexToUniformsHash[_];h&&(this._boundUniformsIdsToIndexHash[h.uid]=void 0),o=this._boundUniformsIdsToIndexHash[e.uid]=_,this._boundIndexToUniformsHash[_]=e,a?n.bindBufferRange(e.buffer,_,e.offset):n.bindBufferBase(e.buffer,_)}const c=this._gl,u=this._activeProgram._uniformBlockData[r].index;i.uniformBlockBindings[s]!==o&&(i.uniformBlockBindings[s]=o,c.uniformBlockBinding(i.program,u,o))}_setProgram(e){if(this._activeProgram===e)return;this._activeProgram=e;const r=this._getProgramData(e);this._gl.useProgram(r.program)}_getProgramData(e){return this._programDataHash[e._key]||this._createProgramData(e)}_createProgramData(e){const r=e._key;return this._programDataHash[r]=nt(this._gl,e),this._programDataHash[r]}destroy(){for(const e of Object.keys(this._programDataHash))this._programDataHash[e].destroy(),this._programDataHash[e]=null;this._programDataHash=null,this._boundUniformsIdsToIndexHash=null}_generateShaderSync(e,r){return qe(e,r)}}de.extension={type:[l.WebGLSystem],name:"shader"};const it={f32:`if (cv !== v) {
|
|
||||||
cu.value = v;
|
|
||||||
gl.uniform1f(location, v);
|
|
||||||
}`,"vec2<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
gl.uniform2f(location, v[0], v[1]);
|
|
||||||
}`,"vec3<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
gl.uniform3f(location, v[0], v[1], v[2]);
|
|
||||||
}`,"vec4<f32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
cv[3] = v[3];
|
|
||||||
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
|
||||||
}`,i32:`if (cv !== v) {
|
|
||||||
cu.value = v;
|
|
||||||
gl.uniform1i(location, v);
|
|
||||||
}`,"vec2<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
gl.uniform2i(location, v[0], v[1]);
|
|
||||||
}`,"vec3<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
gl.uniform3i(location, v[0], v[1], v[2]);
|
|
||||||
}`,"vec4<i32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
cv[3] = v[3];
|
|
||||||
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
|
||||||
}`,u32:`if (cv !== v) {
|
|
||||||
cu.value = v;
|
|
||||||
gl.uniform1ui(location, v);
|
|
||||||
}`,"vec2<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
gl.uniform2ui(location, v[0], v[1]);
|
|
||||||
}`,"vec3<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
gl.uniform3ui(location, v[0], v[1], v[2]);
|
|
||||||
}`,"vec4<u32>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
cv[3] = v[3];
|
|
||||||
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
|
||||||
}`,bool:`if (cv !== v) {
|
|
||||||
cu.value = v;
|
|
||||||
gl.uniform1i(location, v);
|
|
||||||
}`,"vec2<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
gl.uniform2i(location, v[0], v[1]);
|
|
||||||
}`,"vec3<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
gl.uniform3i(location, v[0], v[1], v[2]);
|
|
||||||
}`,"vec4<bool>":`if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3]) {
|
|
||||||
cv[0] = v[0];
|
|
||||||
cv[1] = v[1];
|
|
||||||
cv[2] = v[2];
|
|
||||||
cv[3] = v[3];
|
|
||||||
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
|
||||||
}`,"mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);"},at={f32:"gl.uniform1fv(location, v);","vec2<f32>":"gl.uniform2fv(location, v);","vec3<f32>":"gl.uniform3fv(location, v);","vec4<f32>":"gl.uniform4fv(location, v);","mat2x2<f32>":"gl.uniformMatrix2fv(location, false, v);","mat3x3<f32>":"gl.uniformMatrix3fv(location, false, v);","mat4x4<f32>":"gl.uniformMatrix4fv(location, false, v);",i32:"gl.uniform1iv(location, v);","vec2<i32>":"gl.uniform2iv(location, v);","vec3<i32>":"gl.uniform3iv(location, v);","vec4<i32>":"gl.uniform4iv(location, v);",u32:"gl.uniform1iv(location, v);","vec2<u32>":"gl.uniform2iv(location, v);","vec3<u32>":"gl.uniform3iv(location, v);","vec4<u32>":"gl.uniform4iv(location, v);",bool:"gl.uniform1iv(location, v);","vec2<bool>":"gl.uniform2iv(location, v);","vec3<bool>":"gl.uniform3iv(location, v);","vec4<bool>":"gl.uniform4iv(location, v);"};function ot(t,e){const r=[`
|
|
||||||
var v = null;
|
|
||||||
var cv = null;
|
|
||||||
var cu = null;
|
|
||||||
var t = 0;
|
|
||||||
var gl = renderer.gl;
|
|
||||||
var name = null;
|
|
||||||
`];for(const s in t.uniforms){if(!e[s]){t.uniforms[s]instanceof P?t.uniforms[s].ubo?r.push(`
|
|
||||||
renderer.shader.bindUniformBlock(uv.${s}, "${s}");
|
|
||||||
`):r.push(`
|
|
||||||
renderer.shader.updateUniformGroup(uv.${s});
|
|
||||||
`):t.uniforms[s]instanceof J&&r.push(`
|
|
||||||
renderer.shader.bindBufferResource(uv.${s}, "${s}");
|
|
||||||
`);continue}const n=t.uniformStructures[s];let i=!1;for(let a=0;a<A.length;a++){const o=A[a];if(n.type===o.type&&o.test(n)){r.push(`name = "${s}";`,A[a].uniform),i=!0;break}}if(!i){const o=(n.size===1?it:at)[n.type].replace("location",`ud["${s}"].location`);r.push(`
|
|
||||||
cu = ud["${s}"];
|
|
||||||
cv = cu.value;
|
|
||||||
v = uv["${s}"];
|
|
||||||
${o};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
|
|
||||||
`))}class me{constructor(e){this._cache={},this._uniformGroupSyncHash={},this._renderer=e,this.gl=null,this._cache={}}contextChange(e){this.gl=e}updateUniformGroup(e,r,s){const n=this._renderer.shader._getProgramData(r);(!e.isStatic||e._dirtyId!==n.uniformDirtyGroups[e.uid])&&(n.uniformDirtyGroups[e.uid]=e._dirtyId,this._getUniformSyncFunction(e,r)(n.uniformData,e.uniforms,this._renderer,s))}_getUniformSyncFunction(e,r){return this._uniformGroupSyncHash[e._signature]?.[r._key]||this._createUniformSyncFunction(e,r)}_createUniformSyncFunction(e,r){const s=this._uniformGroupSyncHash[e._signature]||(this._uniformGroupSyncHash[e._signature]={}),n=this._getSignature(e,r._uniformData,"u");return this._cache[n]||(this._cache[n]=this._generateUniformsSync(e,r._uniformData)),s[r._key]=this._cache[n],s[r._key]}_generateUniformsSync(e,r){return ot(e,r)}_getSignature(e,r,s){const n=e.uniforms,i=[`${s}-`];for(const a in n)i.push(a),r[a]&&i.push(r[a].type);return i.join("-")}destroy(){this._renderer=null,this._cache=null}}me.extension={type:[l.WebGLSystem],name:"uniformGroup"};function ct(t){const e={};return e.normal=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e.add=[t.ONE,t.ONE],e.multiply=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.screen=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.none=[0,0],e["normal-npm"]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e["add-npm"]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e["screen-npm"]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e.erase=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e}const ut=0,_t=1,ft=2,ht=3,lt=4,dt=5,Ee=class D{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode="none",this._blendEq=!1,this.map=[],this.map[ut]=this.setBlend,this.map[_t]=this.setOffset,this.map[ft]=this.setCullFace,this.map[ht]=this.setDepthTest,this.map[lt]=this.setFrontFace,this.map[dt]=this.setDepthMask,this.checks=[],this.defaultState=C.for2d()}contextChange(e){this.gl=e,this.blendModesMap=ct(e),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let r=this.stateId^e.data,s=0;for(;r;)r&1&&this.map[s].call(this,!!(e.data&1<<s)),r=r>>1,s++;this.stateId=e.data}for(let r=0;r<this.checks.length;r++)this.checks[r](this,e)}forceState(e){e=e||this.defaultState;for(let r=0;r<this.map.length;r++)this.map[r].call(this,!!(e.data&1<<r));for(let r=0;r<this.checks.length;r++)this.checks[r](this,e);this.stateId=e.data}setBlend(e){this._updateCheck(D._checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this._updateCheck(D._checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(this.blendModesMap[e]||(e="normal"),e===this.blendMode)return;this.blendMode=e;const r=this.blendModesMap[e],s=this.gl;r.length===2?s.blendFunc(r[0],r[1]):s.blendFuncSeparate(r[0],r[1],r[2],r[3]),r.length===6?(this._blendEq=!0,s.blendEquationSeparate(r[4],r[5])):this._blendEq&&(this._blendEq=!1,s.blendEquationSeparate(s.FUNC_ADD,s.FUNC_ADD))}setPolygonOffset(e,r){this.gl.polygonOffset(e,r)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode="",this.setBlendMode("normal")}_updateCheck(e,r){const s=this.checks.indexOf(e);r&&s===-1?this.checks.push(e):!r&&s!==-1&&this.checks.splice(s,1)}static _checkBlendMode(e,r){e.setBlendMode(r.blendMode)}static _checkPolygonOffset(e,r){e.setPolygonOffset(1,r.polygonOffset)}destroy(){this.gl=null,this.checks.length=0}};Ee.extension={type:[l.WebGLSystem],name:"state"};let mt=Ee;class Et{constructor(e){this.target=se.TEXTURE_2D,this.texture=e,this.width=-1,this.height=-1,this.type=f.UNSIGNED_BYTE,this.internalFormat=I.RGBA,this.format=I.RGBA,this.samplerType=0}}const bt={id:"image",upload(t,e,r){e.width===t.width||e.height===t.height?r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource):r.texImage2D(e.target,0,e.internalFormat,t.width,t.height,0,e.format,e.type,t.resource),e.width=t.width,e.height=t.height}},St={"bc1-rgba-unorm":!0,"bc1-rgba-unorm-srgb":!0,"bc2-rgba-unorm":!0,"bc2-rgba-unorm-srgb":!0,"bc3-rgba-unorm":!0,"bc3-rgba-unorm-srgb":!0,"bc4-r-unorm":!0,"bc4-r-snorm":!0,"bc5-rg-unorm":!0,"bc5-rg-snorm":!0,"bc6h-rgb-ufloat":!0,"bc6h-rgb-float":!0,"bc7-rgba-unorm":!0,"bc7-rgba-unorm-srgb":!0,"etc2-rgb8unorm":!0,"etc2-rgb8unorm-srgb":!0,"etc2-rgb8a1unorm":!0,"etc2-rgb8a1unorm-srgb":!0,"etc2-rgba8unorm":!0,"etc2-rgba8unorm-srgb":!0,"eac-r11unorm":!0,"eac-r11snorm":!0,"eac-rg11unorm":!0,"eac-rg11snorm":!0,"astc-4x4-unorm":!0,"astc-4x4-unorm-srgb":!0,"astc-5x4-unorm":!0,"astc-5x4-unorm-srgb":!0,"astc-5x5-unorm":!0,"astc-5x5-unorm-srgb":!0,"astc-6x5-unorm":!0,"astc-6x5-unorm-srgb":!0,"astc-6x6-unorm":!0,"astc-6x6-unorm-srgb":!0,"astc-8x5-unorm":!0,"astc-8x5-unorm-srgb":!0,"astc-8x6-unorm":!0,"astc-8x6-unorm-srgb":!0,"astc-8x8-unorm":!0,"astc-8x8-unorm-srgb":!0,"astc-10x5-unorm":!0,"astc-10x5-unorm-srgb":!0,"astc-10x6-unorm":!0,"astc-10x6-unorm-srgb":!0,"astc-10x8-unorm":!0,"astc-10x8-unorm-srgb":!0,"astc-10x10-unorm":!0,"astc-10x10-unorm-srgb":!0,"astc-12x10-unorm":!0,"astc-12x10-unorm-srgb":!0,"astc-12x12-unorm":!0,"astc-12x12-unorm-srgb":!0},gt={id:"compressed",upload(t,e,r){r.pixelStorei(r.UNPACK_ALIGNMENT,4);let s=t.pixelWidth,n=t.pixelHeight;const i=!!St[t.format];for(let a=0;a<t.resource.length;a++){const o=t.resource[a];i?r.compressedTexImage2D(r.TEXTURE_2D,a,e.internalFormat,s,n,0,o):r.texImage2D(r.TEXTURE_2D,a,e.internalFormat,s,n,0,e.format,e.type,o),s=Math.max(s>>1,1),n=Math.max(n>>1,1)}}},be={id:"image",upload(t,e,r,s){const n=t.alphaMode==="premultiply-alpha-on-upload";r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n);const i=e.width,a=e.height,o=t.pixelWidth,c=t.pixelHeight,u=t.resourceWidth,_=t.resourceHeight;u<o||_<c?((i!==o||a!==c)&&r.texImage2D(e.target,0,e.internalFormat,o,c,0,e.format,e.type,null),s===2?r.texSubImage2D(r.TEXTURE_2D,0,0,0,u,_,e.format,e.type,t.resource):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource)):i===o||a===c?r.texSubImage2D(r.TEXTURE_2D,0,0,0,e.format,e.type,t.resource):s===2?r.texImage2D(e.target,0,e.internalFormat,o,c,0,e.format,e.type,t.resource):r.texImage2D(e.target,0,e.internalFormat,e.format,e.type,t.resource),e.width=o,e.height=c}},pt={id:"video",upload(t,e,r,s){if(!t.isValid){r.texImage2D(e.target,0,e.internalFormat,1,1,0,e.format,e.type,null);return}be.upload(t,e,r,s)}},X={linear:9729,nearest:9728},Rt={linear:{linear:9987,nearest:9985},nearest:{linear:9986,nearest:9984}},N={"clamp-to-edge":33071,repeat:10497,"mirror-repeat":33648},Tt={never:512,less:513,equal:514,"less-equal":515,greater:516,"not-equal":517,"greater-equal":518,always:519};function W(t,e,r,s,n,i,a,o){const c=i;if(!o||t.addressModeU!=="repeat"||t.addressModeV!=="repeat"||t.addressModeW!=="repeat"){const u=N[a?"clamp-to-edge":t.addressModeU],_=N[a?"clamp-to-edge":t.addressModeV],h=N[a?"clamp-to-edge":t.addressModeW];e[n](c,e.TEXTURE_WRAP_S,u),e[n](c,e.TEXTURE_WRAP_T,_),e.TEXTURE_WRAP_R&&e[n](c,e.TEXTURE_WRAP_R,h)}if((!o||t.magFilter!=="linear")&&e[n](c,e.TEXTURE_MAG_FILTER,X[t.magFilter]),r){if(!o||t.mipmapFilter!=="linear"){const u=Rt[t.minFilter][t.mipmapFilter];e[n](c,e.TEXTURE_MIN_FILTER,u)}}else e[n](c,e.TEXTURE_MIN_FILTER,X[t.minFilter]);if(s&&t.maxAnisotropy>1){const u=Math.min(t.maxAnisotropy,e.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));e[n](c,s.TEXTURE_MAX_ANISOTROPY_EXT,u)}t.compare&&e[n](c,e.TEXTURE_COMPARE_FUNC,Tt[t.compare])}function vt(t){return{r8unorm:t.RED,r8snorm:t.RED,r8uint:t.RED,r8sint:t.RED,r16uint:t.RED,r16sint:t.RED,r16float:t.RED,rg8unorm:t.RG,rg8snorm:t.RG,rg8uint:t.RG,rg8sint:t.RG,r32uint:t.RED,r32sint:t.RED,r32float:t.RED,rg16uint:t.RG,rg16sint:t.RG,rg16float:t.RG,rgba8unorm:t.RGBA,"rgba8unorm-srgb":t.RGBA,rgba8snorm:t.RGBA,rgba8uint:t.RGBA,rgba8sint:t.RGBA,bgra8unorm:t.RGBA,"bgra8unorm-srgb":t.RGBA,rgb9e5ufloat:t.RGB,rgb10a2unorm:t.RGBA,rg11b10ufloat:t.RGB,rg32uint:t.RG,rg32sint:t.RG,rg32float:t.RG,rgba16uint:t.RGBA,rgba16sint:t.RGBA,rgba16float:t.RGBA,rgba32uint:t.RGBA,rgba32sint:t.RGBA,rgba32float:t.RGBA,stencil8:t.STENCIL_INDEX8,depth16unorm:t.DEPTH_COMPONENT,depth24plus:t.DEPTH_COMPONENT,"depth24plus-stencil8":t.DEPTH_STENCIL,depth32float:t.DEPTH_COMPONENT,"depth32float-stencil8":t.DEPTH_STENCIL}}function xt(t,e){let r={},s=t.RGBA;return t instanceof y.get().getWebGL2RenderingContext()?(r={"rgba8unorm-srgb":t.SRGB8_ALPHA8,"bgra8unorm-srgb":t.SRGB8_ALPHA8},s=t.RGBA8):e.srgb&&(r={"rgba8unorm-srgb":e.srgb.SRGB8_ALPHA8_EXT,"bgra8unorm-srgb":e.srgb.SRGB8_ALPHA8_EXT}),{r8unorm:t.R8,r8snorm:t.R8_SNORM,r8uint:t.R8UI,r8sint:t.R8I,r16uint:t.R16UI,r16sint:t.R16I,r16float:t.R16F,rg8unorm:t.RG8,rg8snorm:t.RG8_SNORM,rg8uint:t.RG8UI,rg8sint:t.RG8I,r32uint:t.R32UI,r32sint:t.R32I,r32float:t.R32F,rg16uint:t.RG16UI,rg16sint:t.RG16I,rg16float:t.RG16F,rgba8unorm:t.RGBA,...r,rgba8snorm:t.RGBA8_SNORM,rgba8uint:t.RGBA8UI,rgba8sint:t.RGBA8I,bgra8unorm:s,rgb9e5ufloat:t.RGB9_E5,rgb10a2unorm:t.RGB10_A2,rg11b10ufloat:t.R11F_G11F_B10F,rg32uint:t.RG32UI,rg32sint:t.RG32I,rg32float:t.RG32F,rgba16uint:t.RGBA16UI,rgba16sint:t.RGBA16I,rgba16float:t.RGBA16F,rgba32uint:t.RGBA32UI,rgba32sint:t.RGBA32I,rgba32float:t.RGBA32F,stencil8:t.STENCIL_INDEX8,depth16unorm:t.DEPTH_COMPONENT16,depth24plus:t.DEPTH_COMPONENT24,"depth24plus-stencil8":t.DEPTH24_STENCIL8,depth32float:t.DEPTH_COMPONENT32F,"depth32float-stencil8":t.DEPTH32F_STENCIL8,...e.s3tc?{"bc1-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT1_EXT,"bc2-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT3_EXT,"bc3-rgba-unorm":e.s3tc.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{},...e.s3tc_sRGB?{"bc1-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,"bc2-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,"bc3-rgba-unorm-srgb":e.s3tc_sRGB.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}:{},...e.rgtc?{"bc4-r-unorm":e.rgtc.COMPRESSED_RED_RGTC1_EXT,"bc4-r-snorm":e.rgtc.COMPRESSED_SIGNED_RED_RGTC1_EXT,"bc5-rg-unorm":e.rgtc.COMPRESSED_RED_GREEN_RGTC2_EXT,"bc5-rg-snorm":e.rgtc.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}:{},...e.bptc?{"bc6h-rgb-float":e.bptc.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT,"bc6h-rgb-ufloat":e.bptc.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT,"bc7-rgba-unorm":e.bptc.COMPRESSED_RGBA_BPTC_UNORM_EXT,"bc7-rgba-unorm-srgb":e.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT}:{},...e.etc?{"etc2-rgb8unorm":e.etc.COMPRESSED_RGB8_ETC2,"etc2-rgb8unorm-srgb":e.etc.COMPRESSED_SRGB8_ETC2,"etc2-rgb8a1unorm":e.etc.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgb8a1unorm-srgb":e.etc.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,"etc2-rgba8unorm":e.etc.COMPRESSED_RGBA8_ETC2_EAC,"etc2-rgba8unorm-srgb":e.etc.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,"eac-r11unorm":e.etc.COMPRESSED_R11_EAC,"eac-rg11unorm":e.etc.COMPRESSED_SIGNED_RG11_EAC}:{},...e.astc?{"astc-4x4-unorm":e.astc.COMPRESSED_RGBA_ASTC_4x4_KHR,"astc-4x4-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,"astc-5x4-unorm":e.astc.COMPRESSED_RGBA_ASTC_5x4_KHR,"astc-5x4-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,"astc-5x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_5x5_KHR,"astc-5x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,"astc-6x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_6x5_KHR,"astc-6x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,"astc-6x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_6x6_KHR,"astc-6x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,"astc-8x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x5_KHR,"astc-8x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,"astc-8x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x6_KHR,"astc-8x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,"astc-8x8-unorm":e.astc.COMPRESSED_RGBA_ASTC_8x8_KHR,"astc-8x8-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,"astc-10x5-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x5_KHR,"astc-10x5-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,"astc-10x6-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x6_KHR,"astc-10x6-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,"astc-10x8-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x8_KHR,"astc-10x8-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,"astc-10x10-unorm":e.astc.COMPRESSED_RGBA_ASTC_10x10_KHR,"astc-10x10-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,"astc-12x10-unorm":e.astc.COMPRESSED_RGBA_ASTC_12x10_KHR,"astc-12x10-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,"astc-12x12-unorm":e.astc.COMPRESSED_RGBA_ASTC_12x12_KHR,"astc-12x12-unorm-srgb":e.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR}:{}}}function At(t){return{r8unorm:t.UNSIGNED_BYTE,r8snorm:t.BYTE,r8uint:t.UNSIGNED_BYTE,r8sint:t.BYTE,r16uint:t.UNSIGNED_SHORT,r16sint:t.SHORT,r16float:t.HALF_FLOAT,rg8unorm:t.UNSIGNED_BYTE,rg8snorm:t.BYTE,rg8uint:t.UNSIGNED_BYTE,rg8sint:t.BYTE,r32uint:t.UNSIGNED_INT,r32sint:t.INT,r32float:t.FLOAT,rg16uint:t.UNSIGNED_SHORT,rg16sint:t.SHORT,rg16float:t.HALF_FLOAT,rgba8unorm:t.UNSIGNED_BYTE,"rgba8unorm-srgb":t.UNSIGNED_BYTE,rgba8snorm:t.BYTE,rgba8uint:t.UNSIGNED_BYTE,rgba8sint:t.BYTE,bgra8unorm:t.UNSIGNED_BYTE,"bgra8unorm-srgb":t.UNSIGNED_BYTE,rgb9e5ufloat:t.UNSIGNED_INT_5_9_9_9_REV,rgb10a2unorm:t.UNSIGNED_INT_2_10_10_10_REV,rg11b10ufloat:t.UNSIGNED_INT_10F_11F_11F_REV,rg32uint:t.UNSIGNED_INT,rg32sint:t.INT,rg32float:t.FLOAT,rgba16uint:t.UNSIGNED_SHORT,rgba16sint:t.SHORT,rgba16float:t.HALF_FLOAT,rgba32uint:t.UNSIGNED_INT,rgba32sint:t.INT,rgba32float:t.FLOAT,stencil8:t.UNSIGNED_BYTE,depth16unorm:t.UNSIGNED_SHORT,depth24plus:t.UNSIGNED_INT,"depth24plus-stencil8":t.UNSIGNED_INT_24_8,depth32float:t.FLOAT,"depth32float-stencil8":t.FLOAT_32_UNSIGNED_INT_24_8_REV}}const Bt=4;class Se{constructor(e){this.managedTextures=[],this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundTextures=[],this._activeTextureLocation=-1,this._boundSamplers=Object.create(null),this._uploads={image:be,buffer:bt,video:pt,compressed:gt},this._useSeparateSamplers=!1,this._renderer=e}contextChange(e){this._gl=e,this._mapFormatToInternalFormat||(this._mapFormatToInternalFormat=xt(e,this._renderer.context.extensions),this._mapFormatToType=At(e),this._mapFormatToFormat=vt(e)),this._glTextures=Object.create(null),this._glSamplers=Object.create(null),this._boundSamplers=Object.create(null);for(let r=0;r<16;r++)this.bind(E.EMPTY,r)}initSource(e){this.bind(e)}bind(e,r=0){const s=e.source;e?(this.bindSource(s,r),this._useSeparateSamplers&&this._bindSampler(s.style,r)):(this.bindSource(null,r),this._useSeparateSamplers&&this._bindSampler(null,r))}bindSource(e,r=0){const s=this._gl;if(e._touched=this._renderer.textureGC.count,this._boundTextures[r]!==e){this._boundTextures[r]=e,this._activateLocation(r),e=e||E.EMPTY.source;const n=this.getGlSource(e);s.bindTexture(n.target,n.texture)}}_bindSampler(e,r=0){const s=this._gl;if(!e){this._boundSamplers[r]=null,s.bindSampler(r,null);return}const n=this._getGlSampler(e);this._boundSamplers[r]!==n&&(this._boundSamplers[r]=n,s.bindSampler(r,n))}unbind(e){const r=e.source,s=this._boundTextures,n=this._gl;for(let i=0;i<s.length;i++)if(s[i]===r){this._activateLocation(i);const a=this.getGlSource(r);n.bindTexture(a.target,null),s[i]=null}}_activateLocation(e){this._activeTextureLocation!==e&&(this._activeTextureLocation=e,this._gl.activeTexture(this._gl.TEXTURE0+e))}_initSource(e){const r=this._gl,s=new Et(r.createTexture());if(s.type=this._mapFormatToType[e.format],s.internalFormat=this._mapFormatToInternalFormat[e.format],s.format=this._mapFormatToFormat[e.format],e.autoGenerateMipmaps&&(this._renderer.context.supports.nonPowOf2mipmaps||e.isPowerOfTwo)){const n=Math.max(e.width,e.height);e.mipLevelCount=Math.floor(Math.log2(n))+1}return this._glTextures[e.uid]=s,this.managedTextures.includes(e)||(e.on("update",this.onSourceUpdate,this),e.on("resize",this.onSourceUpdate,this),e.on("styleChange",this.onStyleChange,this),e.on("destroy",this.onSourceDestroy,this),e.on("unload",this.onSourceUnload,this),e.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(e)),this.onSourceUpdate(e),this.updateStyle(e,!1),s}onStyleChange(e){this.updateStyle(e,!1)}updateStyle(e,r){const s=this._gl,n=this.getGlSource(e);s.bindTexture(s.TEXTURE_2D,n.texture),this._boundTextures[this._activeTextureLocation]=e,W(e.style,s,e.mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"texParameteri",s.TEXTURE_2D,!this._renderer.context.supports.nonPowOf2wrapping&&!e.isPowerOfTwo,r)}onSourceUnload(e){const r=this._glTextures[e.uid];r&&(this.unbind(e),this._glTextures[e.uid]=null,this._gl.deleteTexture(r.texture))}onSourceUpdate(e){const r=this._gl,s=this.getGlSource(e);r.bindTexture(r.TEXTURE_2D,s.texture),this._boundTextures[this._activeTextureLocation]=e,this._uploads[e.uploadMethodId]?this._uploads[e.uploadMethodId].upload(e,s,r,this._renderer.context.webGLVersion):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e.pixelWidth,e.pixelHeight,0,r.RGBA,r.UNSIGNED_BYTE,null),e.autoGenerateMipmaps&&e.mipLevelCount>1&&this.onUpdateMipmaps(e,!1)}onUpdateMipmaps(e,r=!0){r&&this.bindSource(e,0);const s=this.getGlSource(e);this._gl.generateMipmap(s.target)}onSourceDestroy(e){e.off("destroy",this.onSourceDestroy,this),e.off("update",this.onSourceUpdate,this),e.off("resize",this.onSourceUpdate,this),e.off("unload",this.onSourceUnload,this),e.off("styleChange",this.onStyleChange,this),e.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(e),1),this.onSourceUnload(e)}_initSampler(e){const r=this._gl,s=this._gl.createSampler();return this._glSamplers[e._resourceId]=s,W(e,r,this._boundTextures[this._activeTextureLocation].mipLevelCount>1,this._renderer.context.extensions.anisotropicFiltering,"samplerParameteri",s,!1,!0),this._glSamplers[e._resourceId]}_getGlSampler(e){return this._glSamplers[e._resourceId]||this._initSampler(e)}getGlSource(e){return this._glTextures[e.uid]||this._initSource(e)}generateCanvas(e){const{pixels:r,width:s,height:n}=this.getPixels(e),i=y.get().createCanvas();i.width=s,i.height=n;const a=i.getContext("2d");if(a){const o=a.createImageData(s,n);o.data.set(r),a.putImageData(o,0,0)}return i}getPixels(e){const r=e.source.resolution,s=e.frame,n=Math.max(Math.round(s.width*r),1),i=Math.max(Math.round(s.height*r),1),a=new Uint8Array(Bt*n*i),o=this._renderer,c=o.renderTarget.getRenderTarget(e),u=o.renderTarget.getGpuRenderTarget(c),_=o.gl;return _.bindFramebuffer(_.FRAMEBUFFER,u.resolveTargetFramebuffer),_.readPixels(Math.round(s.x*r),Math.round(s.y*r),n,i,_.RGBA,_.UNSIGNED_BYTE,a),{pixels:new Uint8ClampedArray(a.buffer),width:n,height:i}}destroy(){this.managedTextures.slice().forEach(e=>this.onSourceDestroy(e)),this.managedTextures=null,this._renderer=null}}Se.extension={type:[l.WebGLSystem],name:"texture"};class ge{init(){const e=new P({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new $,type:"mat3x3<f32>"},uRound:{value:0,type:"f32"}}),r=U({name:"graphics",bits:[z,Y(j),Z,G]});this.shader=new R({glProgram:r,resources:{localUniforms:e,batchSamplers:Q}})}execute(e,r){const s=r.context,n=s.customShader||this.shader,i=e.renderer,a=i.graphicsContext,{geometry:o,instructions:c}=a.getContextRenderData(s);n.groups[0]=i.globalUniforms.bindGroup,i.shader.bind(n),i.geometry.bind(o,n.glProgram);const u=c.instructions;for(let _=0;_<c.instructionSize;_++){const h=u[_];if(h.size){for(let d=0;d<h.textures.textures.length;d++)i.texture.bind(h.textures.textures[d],d);i.geometry.draw("triangle-list",h.size,h.start)}}}destroy(){this.shader.destroy(!0),this.shader=null}}ge.extension={type:[l.WebGLPipesAdaptor],name:"graphics"};class pe{init(){const e=U({name:"mesh",bits:[Z,Fe,G]});this._shader=new R({glProgram:e,resources:{uTexture:E.EMPTY.source,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new $}}}})}execute(e,r){const s=e.renderer;let n=r._shader;if(n){if(!n.glProgram){m("Mesh shader has no glProgram",r.shader);return}}else{n=this._shader;const i=r.texture,a=i.source;n.resources.uTexture=a,n.resources.uSampler=a.style,n.resources.textureUniforms.uniforms.uTextureMatrix=i.textureMatrix.mapCoord}n.groups[100]=s.globalUniforms.bindGroup,n.groups[101]=e.localUniformsBindGroup,s.encoder.draw({geometry:r._geometry,shader:n,state:r.state})}destroy(){this._shader.destroy(!0),this._shader=null}}pe.extension={type:[l.WebGLPipesAdaptor],name:"mesh"};const Nt=[...Me,_e,We,we,te,Se,fe,ne,me,de,oe,mt,ce,ae],It=[...Le],Dt=[ee,pe,ge],Re=[],Te=[],ve=[];p.handleByNamedList(l.WebGLSystem,Re);p.handleByNamedList(l.WebGLPipes,Te);p.handleByNamedList(l.WebGLPipesAdaptor,ve);p.add(...Nt,...It,...Dt);Ht=class extends Ne{constructor(){const e={name:"webgl",type:De.WEBGL,systems:Re,renderPipes:Te,renderPipeAdaptors:ve};super(e)}}});export{Ht as WebGLRenderer,__tla};
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import{M as R,g as E,E as l,f as ie,S as P,B as S,b as ne,c as A,d as b,h as oe,i as ae,D as ue,j as k,k as M,w as ce,e as G,A as de,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{S as D,c as T,a as z,g as L,r as C,b as v,d as he,U as pe,l as le,e as fe,R as ge,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";import{c as me,u as _e,U as be,B as ye,G as xe,e as Ge,R as Be,t as Se,S as Pe,a as Te,__tla as __tla_2}from"./SharedSystems-Do60oLa7.js";import{C as w,__tla as __tla_3}from"./CanvasPool-CW8lNMNV.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_5}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";let Qe;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{const y=D.for2d();class O{init(){const e=T({name:"batch",bits:[z,L(R),C]});this._shader=new v({gpuProgram:e,groups:{}})}start(e,t){const r=e.renderer,s=r.encoder,i=this._shader.gpuProgram;this._geometry=t,s.setGeometry(t),y.blendMode="normal",r.pipeline.getPipeline(t,i,y);const n=r.globalUniforms.bindGroup;s.resetBindGroup(1),s.setBindGroup(0,n,i)}execute(e,t){const r=this._shader.gpuProgram,s=e.renderer,i=s.encoder;if(!t.bindGroup){const u=t.textures;t.bindGroup=E(u.textures,u.count)}y.blendMode=t.blendMode;const n=s.bindGroup.getBindGroup(t.bindGroup,r,1),o=s.pipeline.getPipeline(this._geometry,r,y);t.bindGroup._touch(s.textureGC.count),i.setPipeline(o),i.renderPassEncoder.setBindGroup(1,n),i.renderPassEncoder.drawIndexed(t.size,1,t.start)}destroy(){this._shader.destroy(!0),this._shader=null}}O.extension={type:[l.WebGPUPipesAdaptor],name:"batch"};class H{constructor(e){this._hash=Object.create(null),this._renderer=e}contextChange(e){this._gpu=e}getBindGroup(e,t,r){return e._updateKey(),this._hash[e._key]||this._createBindGroup(e,t,r)}_createBindGroup(e,t,r){const s=this._gpu.device,i=t.layout[r],n=[],o=this._renderer;for(const f in i){const h=e.resources[f]??e.resources[i[f]];let p;if(h._resourceType==="uniformGroup"){const d=h;o.ubo.updateUniformGroup(d);const g=d.buffer;p={buffer:o.buffer.getGPUBuffer(g),offset:0,size:g.descriptor.size}}else if(h._resourceType==="buffer"){const d=h;p={buffer:o.buffer.getGPUBuffer(d),offset:0,size:d.descriptor.size}}else if(h._resourceType==="bufferResource"){const d=h;p={buffer:o.buffer.getGPUBuffer(d.buffer),offset:d.offset,size:d.size}}else if(h._resourceType==="textureSampler"){const d=h;p=o.texture.getGpuSampler(d)}else if(h._resourceType==="textureSource"){const d=h;p=o.texture.getGpuSource(d).createView({})}n.push({binding:i[f],resource:p})}const u=o.shader.getProgramData(t).bindGroups[r],c=s.createBindGroup({layout:u,entries:n});return this._hash[e._key]=c,c}destroy(){for(const e of Object.keys(this._hash))this._hash[e]=null;this._hash=null,this._renderer=null}}H.extension={type:[l.WebGPUSystem],name:"bindGroup"};class F{constructor(){this._gpuBuffers=Object.create(null),this._managedBuffers=[]}contextChange(e){this._gpu=e}getGPUBuffer(e){return this._gpuBuffers[e.uid]||this.createGPUBuffer(e)}updateBuffer(e){const t=this._gpuBuffers[e.uid]||this.createGPUBuffer(e),r=e.data;return e._updateID&&r&&(e._updateID=0,this._gpu.device.queue.writeBuffer(t,0,r.buffer,0,(e._updateSize||r.byteLength)+3&-4)),t}destroyAll(){for(const e in this._gpuBuffers)this._gpuBuffers[e].destroy();this._gpuBuffers={}}createGPUBuffer(e){this._gpuBuffers[e.uid]||(e.on("update",this.updateBuffer,this),e.on("change",this.onBufferChange,this),e.on("destroy",this.onBufferDestroy,this));const t=this._gpu.device.createBuffer(e.descriptor);return e._updateID=0,e.data&&(ie(e.data.buffer,t.getMappedRange()),t.unmap()),this._gpuBuffers[e.uid]=t,this._managedBuffers.push(e),t}onBufferChange(e){this._gpuBuffers[e.uid].destroy(),e._updateID=0,this._gpuBuffers[e.uid]=this.createGPUBuffer(e)}onBufferDestroy(e){this._managedBuffers.splice(this._managedBuffers.indexOf(e),1),this._destroyBuffer(e)}destroy(){this._managedBuffers.forEach(e=>this._destroyBuffer(e)),this._managedBuffers=null,this._gpuBuffers=null}_destroyBuffer(e){this._gpuBuffers[e.uid].destroy(),e.off("update",this.updateBuffer,this),e.off("change",this.onBufferChange,this),e.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[e.uid]=null}}F.extension={type:[l.WebGPUSystem],name:"buffer"};class Ce{constructor({minUniformOffsetAlignment:e}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=e,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(e){if(e>this._minUniformOffsetAlignment/4)throw new Error(`UniformBufferBatch: array is too large: ${e*4}`);const t=this.byteIndex;let r=t+e*4;if(r=Math.ceil(r/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,r>this.data.length*4)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=r,t}addGroup(e){const t=this.addEmptyGroup(e.length);for(let r=0;r<e.length;r++)this.data[t/4+r]=e[r];return t}destroy(){this._buffer.destroy(),this._buffer=null,this.data=null}}class I{constructor(e){this._colorMaskCache=15,this._renderer=e}setMask(e){this._colorMaskCache!==e&&(this._colorMaskCache=e,this._renderer.pipeline.setColorMask(e))}destroy(){this._renderer=null,this._colorMaskCache=null}}I.extension={type:[l.WebGPUSystem],name:"colorMask"};class U{constructor(e){this._renderer=e}async init(e){return this._initPromise?this._initPromise:(this._initPromise=this._createDeviceAndAdaptor(e).then(t=>{this.gpu=t,this._renderer.runners.contextChange.emit(this.gpu)}),this._initPromise)}contextChange(e){this._renderer.gpu=e}async _createDeviceAndAdaptor(e){const t=await navigator.gpu.requestAdapter({powerPreference:e.powerPreference,forceFallbackAdapter:e.forceFallbackAdapter}),r=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter(i=>t.features.has(i)),s=await t.requestDevice({requiredFeatures:r});return{adapter:t,device:s}}destroy(){this.gpu=null,this._renderer=null}}U.extension={type:[l.WebGPUSystem],name:"device"};U.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1};class W{constructor(e){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=e}renderStart(){this.commandFinished=new Promise(e=>{this._resolveCommandFinished=e}),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(e){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(e.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(e){this.renderPassEncoder.setViewport(e.x,e.y,e.width,e.height,0,1)}setPipelineFromGeometryProgramAndState(e,t,r,s){const i=this._renderer.pipeline.getPipeline(e,t,r,s);this.setPipeline(i)}setPipeline(e){this._boundPipeline!==e&&(this._boundPipeline=e,this.renderPassEncoder.setPipeline(e))}_setVertexBuffer(e,t){this._boundVertexBuffer[e]!==t&&(this._boundVertexBuffer[e]=t,this.renderPassEncoder.setVertexBuffer(e,this._renderer.buffer.updateBuffer(t)))}_setIndexBuffer(e){if(this._boundIndexBuffer===e)return;this._boundIndexBuffer=e;const t=e.data.BYTES_PER_ELEMENT===2?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(e),t)}resetBindGroup(e){this._boundBindGroup[e]=null}setBindGroup(e,t,r){if(this._boundBindGroup[e]===t)return;this._boundBindGroup[e]=t,t._touch(this._renderer.textureGC.count);const s=this._renderer.bindGroup.getBindGroup(t,r,e);this.renderPassEncoder.setBindGroup(e,s)}setGeometry(e){for(const t in e.attributes){const r=e.attributes[t];this._setVertexBuffer(r.location,r.buffer)}e.indexBuffer&&this._setIndexBuffer(e.indexBuffer)}_setShaderBindGroups(e,t){for(const r in e.groups){const s=e.groups[r];t||this._syncBindGroup(s),this.setBindGroup(r,s,e.gpuProgram)}}_syncBindGroup(e){for(const t in e.resources){const r=e.resources[t];r.isUniformGroup&&this._renderer.ubo.updateUniformGroup(r)}}draw(e){const{geometry:t,shader:r,state:s,topology:i,size:n,start:o,instanceCount:u,skipSync:c}=e;this.setPipelineFromGeometryProgramAndState(t,r.gpuProgram,s,i),this.setGeometry(t),this._setShaderBindGroups(r,c),t.indexBuffer?this.renderPassEncoder.drawIndexed(n||t.indexBuffer.data.length,u||t.instanceCount,o||0):this.renderPassEncoder.draw(n||t.getSize(),u||t.instanceCount,o||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){const e=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(e);const t=this._boundPipeline,r={...this._boundVertexBuffer},s=this._boundIndexBuffer,i={...this._boundBindGroup};this._clearCache();const n=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(n.x,n.y,n.width,n.height,0,1),this.setPipeline(t);for(const o in r)this._setVertexBuffer(o,r[o]);for(const o in i)this.setBindGroup(o,i[o],null);this._setIndexBuffer(s)}_clearCache(){for(let e=0;e<16;e++)this._boundBindGroup[e]=null,this._boundVertexBuffer[e]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(e){this._gpu=e}}W.extension={type:[l.WebGPUSystem],name:"encoder",priority:1};class V{constructor(e){this._renderTargetStencilState=Object.create(null),this._renderer=e,e.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(e){let t=this._renderTargetStencilState[e.uid];t||(t=this._renderTargetStencilState[e.uid]={stencilMode:P.DISABLED,stencilReference:0}),this._activeRenderTarget=e,this.setStencilMode(t.stencilMode,t.stencilReference)}setStencilMode(e,t){const r=this._renderTargetStencilState[this._activeRenderTarget.uid];r.stencilMode=e,r.stencilReference=t;const s=this._renderer;s.pipeline.setStencilMode(e),s.encoder.renderPassEncoder.setStencilReference(t)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}}V.extension={type:[l.WebGPUSystem],name:"stencil"};const x={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2<i32>":{align:8,size:8},"vec2<u32>":{align:8,size:8},"vec2<f32>":{align:8,size:8},"vec2<f16>":{align:4,size:4},"vec3<i32>":{align:16,size:12},"vec3<u32>":{align:16,size:12},"vec3<f32>":{align:16,size:12},"vec3<f16>":{align:8,size:6},"vec4<i32>":{align:16,size:16},"vec4<u32>":{align:16,size:16},"vec4<f32>":{align:16,size:16},"vec4<f16>":{align:8,size:8},"mat2x2<f32>":{align:8,size:16},"mat2x2<f16>":{align:4,size:8},"mat3x2<f32>":{align:8,size:24},"mat3x2<f16>":{align:4,size:12},"mat4x2<f32>":{align:8,size:32},"mat4x2<f16>":{align:4,size:16},"mat2x3<f32>":{align:16,size:32},"mat2x3<f16>":{align:8,size:16},"mat3x3<f32>":{align:16,size:48},"mat3x3<f16>":{align:8,size:24},"mat4x3<f32>":{align:16,size:64},"mat4x3<f16>":{align:8,size:32},"mat2x4<f32>":{align:16,size:32},"mat2x4<f16>":{align:8,size:16},"mat3x4<f32>":{align:16,size:48},"mat3x4<f16>":{align:8,size:24},"mat4x4<f32>":{align:16,size:64},"mat4x4<f16>":{align:8,size:32}};function ve(a){const e=a.map(r=>({data:r,offset:0,size:0}));let t=0;for(let r=0;r<e.length;r++){const s=e[r];let i=x[s.data.type].size;const n=x[s.data.type].align;if(!x[s.data.type])throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${s.data.type}`);s.data.size>1&&(i=Math.max(i,n)*s.data.size),t=Math.ceil(t/n)*n,s.size=i,s.offset=t,t+=i}return t=Math.ceil(t/16)*16,{uboElements:e,size:t}}function Ue(a,e){const{size:t,align:r}=x[a.data.type],s=(r-t)/4;return`
|
import{M as R,g as E,E as l,f as ie,S as P,B as S,b as ne,c as A,d as b,h as oe,i as ae,D as ue,j as k,k as M,w as ce,e as G,A as de,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";import{S as D,c as T,a as z,g as L,r as C,b as v,d as he,U as pe,l as le,e as fe,R as ge,__tla as __tla_1}from"./colorToUniform-Bf80N278.js";import{c as me,u as _e,U as be,B as ye,G as xe,e as Ge,R as Be,t as Se,S as Pe,a as Te,__tla as __tla_2}from"./SharedSystems-DuYq6R0P.js";import{C as w,__tla as __tla_3}from"./CanvasPool-E3p4G6BL.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Cz5dpnUF.js";import{__tla as __tla_5}from"./index-CfNDsQKB.js";import"./vue--7UcA1iU.js";import"./vuetify-GhifFkZ7.js";import"./FileIcon-DH65fwz5.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-BvP4_KF0.js";let et;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{const y=D.for2d();class O{init(){const e=T({name:"batch",bits:[z,L(R),C]});this._shader=new v({gpuProgram:e,groups:{}})}start(e,t){const r=e.renderer,s=r.encoder,i=this._shader.gpuProgram;this._geometry=t,s.setGeometry(t),y.blendMode="normal",r.pipeline.getPipeline(t,i,y);const n=r.globalUniforms.bindGroup;s.resetBindGroup(1),s.setBindGroup(0,n,i)}execute(e,t){const r=this._shader.gpuProgram,s=e.renderer,i=s.encoder;if(!t.bindGroup){const u=t.textures;t.bindGroup=E(u.textures,u.count)}y.blendMode=t.blendMode;const n=s.bindGroup.getBindGroup(t.bindGroup,r,1),o=s.pipeline.getPipeline(this._geometry,r,y);t.bindGroup._touch(s.textureGC.count),i.setPipeline(o),i.renderPassEncoder.setBindGroup(1,n),i.renderPassEncoder.drawIndexed(t.size,1,t.start)}destroy(){this._shader.destroy(!0),this._shader=null}}O.extension={type:[l.WebGPUPipesAdaptor],name:"batch"};class H{constructor(e){this._hash=Object.create(null),this._renderer=e}contextChange(e){this._gpu=e}getBindGroup(e,t,r){return e._updateKey(),this._hash[e._key]||this._createBindGroup(e,t,r)}_createBindGroup(e,t,r){const s=this._gpu.device,i=t.layout[r],n=[],o=this._renderer;for(const f in i){const h=e.resources[f]??e.resources[i[f]];let p;if(h._resourceType==="uniformGroup"){const d=h;o.ubo.updateUniformGroup(d);const g=d.buffer;p={buffer:o.buffer.getGPUBuffer(g),offset:0,size:g.descriptor.size}}else if(h._resourceType==="buffer"){const d=h;p={buffer:o.buffer.getGPUBuffer(d),offset:0,size:d.descriptor.size}}else if(h._resourceType==="bufferResource"){const d=h;p={buffer:o.buffer.getGPUBuffer(d.buffer),offset:d.offset,size:d.size}}else if(h._resourceType==="textureSampler"){const d=h;p=o.texture.getGpuSampler(d)}else if(h._resourceType==="textureSource"){const d=h;p=o.texture.getGpuSource(d).createView({})}n.push({binding:i[f],resource:p})}const u=o.shader.getProgramData(t).bindGroups[r],c=s.createBindGroup({layout:u,entries:n});return this._hash[e._key]=c,c}destroy(){for(const e of Object.keys(this._hash))this._hash[e]=null;this._hash=null,this._renderer=null}}H.extension={type:[l.WebGPUSystem],name:"bindGroup"};class F{constructor(){this._gpuBuffers=Object.create(null),this._managedBuffers=[]}contextChange(e){this._gpu=e}getGPUBuffer(e){return this._gpuBuffers[e.uid]||this.createGPUBuffer(e)}updateBuffer(e){const t=this._gpuBuffers[e.uid]||this.createGPUBuffer(e),r=e.data;return e._updateID&&r&&(e._updateID=0,this._gpu.device.queue.writeBuffer(t,0,r.buffer,0,(e._updateSize||r.byteLength)+3&-4)),t}destroyAll(){for(const e in this._gpuBuffers)this._gpuBuffers[e].destroy();this._gpuBuffers={}}createGPUBuffer(e){this._gpuBuffers[e.uid]||(e.on("update",this.updateBuffer,this),e.on("change",this.onBufferChange,this),e.on("destroy",this.onBufferDestroy,this));const t=this._gpu.device.createBuffer(e.descriptor);return e._updateID=0,e.data&&(ie(e.data.buffer,t.getMappedRange()),t.unmap()),this._gpuBuffers[e.uid]=t,this._managedBuffers.push(e),t}onBufferChange(e){this._gpuBuffers[e.uid].destroy(),e._updateID=0,this._gpuBuffers[e.uid]=this.createGPUBuffer(e)}onBufferDestroy(e){this._managedBuffers.splice(this._managedBuffers.indexOf(e),1),this._destroyBuffer(e)}destroy(){this._managedBuffers.forEach(e=>this._destroyBuffer(e)),this._managedBuffers=null,this._gpuBuffers=null}_destroyBuffer(e){this._gpuBuffers[e.uid].destroy(),e.off("update",this.updateBuffer,this),e.off("change",this.onBufferChange,this),e.off("destroy",this.onBufferDestroy,this),this._gpuBuffers[e.uid]=null}}F.extension={type:[l.WebGPUSystem],name:"buffer"};class Ce{constructor({minUniformOffsetAlignment:e}){this._minUniformOffsetAlignment=256,this.byteIndex=0,this._minUniformOffsetAlignment=e,this.data=new Float32Array(65535)}clear(){this.byteIndex=0}addEmptyGroup(e){if(e>this._minUniformOffsetAlignment/4)throw new Error(`UniformBufferBatch: array is too large: ${e*4}`);const t=this.byteIndex;let r=t+e*4;if(r=Math.ceil(r/this._minUniformOffsetAlignment)*this._minUniformOffsetAlignment,r>this.data.length*4)throw new Error("UniformBufferBatch: ubo batch got too big");return this.byteIndex=r,t}addGroup(e){const t=this.addEmptyGroup(e.length);for(let r=0;r<e.length;r++)this.data[t/4+r]=e[r];return t}destroy(){this._buffer.destroy(),this._buffer=null,this.data=null}}class I{constructor(e){this._colorMaskCache=15,this._renderer=e}setMask(e){this._colorMaskCache!==e&&(this._colorMaskCache=e,this._renderer.pipeline.setColorMask(e))}destroy(){this._renderer=null,this._colorMaskCache=null}}I.extension={type:[l.WebGPUSystem],name:"colorMask"};class U{constructor(e){this._renderer=e}async init(e){return this._initPromise?this._initPromise:(this._initPromise=this._createDeviceAndAdaptor(e).then(t=>{this.gpu=t,this._renderer.runners.contextChange.emit(this.gpu)}),this._initPromise)}contextChange(e){this._renderer.gpu=e}async _createDeviceAndAdaptor(e){const t=await navigator.gpu.requestAdapter({powerPreference:e.powerPreference,forceFallbackAdapter:e.forceFallbackAdapter}),r=["texture-compression-bc","texture-compression-astc","texture-compression-etc2"].filter(i=>t.features.has(i)),s=await t.requestDevice({requiredFeatures:r});return{adapter:t,device:s}}destroy(){this.gpu=null,this._renderer=null}}U.extension={type:[l.WebGPUSystem],name:"device"};U.defaultOptions={powerPreference:void 0,forceFallbackAdapter:!1};class W{constructor(e){this._boundBindGroup=Object.create(null),this._boundVertexBuffer=Object.create(null),this._renderer=e}renderStart(){this.commandFinished=new Promise(e=>{this._resolveCommandFinished=e}),this.commandEncoder=this._renderer.gpu.device.createCommandEncoder()}beginRenderPass(e){this.endRenderPass(),this._clearCache(),this.renderPassEncoder=this.commandEncoder.beginRenderPass(e.descriptor)}endRenderPass(){this.renderPassEncoder&&this.renderPassEncoder.end(),this.renderPassEncoder=null}setViewport(e){this.renderPassEncoder.setViewport(e.x,e.y,e.width,e.height,0,1)}setPipelineFromGeometryProgramAndState(e,t,r,s){const i=this._renderer.pipeline.getPipeline(e,t,r,s);this.setPipeline(i)}setPipeline(e){this._boundPipeline!==e&&(this._boundPipeline=e,this.renderPassEncoder.setPipeline(e))}_setVertexBuffer(e,t){this._boundVertexBuffer[e]!==t&&(this._boundVertexBuffer[e]=t,this.renderPassEncoder.setVertexBuffer(e,this._renderer.buffer.updateBuffer(t)))}_setIndexBuffer(e){if(this._boundIndexBuffer===e)return;this._boundIndexBuffer=e;const t=e.data.BYTES_PER_ELEMENT===2?"uint16":"uint32";this.renderPassEncoder.setIndexBuffer(this._renderer.buffer.updateBuffer(e),t)}resetBindGroup(e){this._boundBindGroup[e]=null}setBindGroup(e,t,r){if(this._boundBindGroup[e]===t)return;this._boundBindGroup[e]=t,t._touch(this._renderer.textureGC.count);const s=this._renderer.bindGroup.getBindGroup(t,r,e);this.renderPassEncoder.setBindGroup(e,s)}setGeometry(e){for(const t in e.attributes){const r=e.attributes[t];this._setVertexBuffer(r.location,r.buffer)}e.indexBuffer&&this._setIndexBuffer(e.indexBuffer)}_setShaderBindGroups(e,t){for(const r in e.groups){const s=e.groups[r];t||this._syncBindGroup(s),this.setBindGroup(r,s,e.gpuProgram)}}_syncBindGroup(e){for(const t in e.resources){const r=e.resources[t];r.isUniformGroup&&this._renderer.ubo.updateUniformGroup(r)}}draw(e){const{geometry:t,shader:r,state:s,topology:i,size:n,start:o,instanceCount:u,skipSync:c}=e;this.setPipelineFromGeometryProgramAndState(t,r.gpuProgram,s,i),this.setGeometry(t),this._setShaderBindGroups(r,c),t.indexBuffer?this.renderPassEncoder.drawIndexed(n||t.indexBuffer.data.length,u||t.instanceCount,o||0):this.renderPassEncoder.draw(n||t.getSize(),u||t.instanceCount,o||0)}finishRenderPass(){this.renderPassEncoder&&(this.renderPassEncoder.end(),this.renderPassEncoder=null)}postrender(){this.finishRenderPass(),this._gpu.device.queue.submit([this.commandEncoder.finish()]),this._resolveCommandFinished(),this.commandEncoder=null}restoreRenderPass(){const e=this._renderer.renderTarget.adaptor.getDescriptor(this._renderer.renderTarget.renderTarget,!1,[0,0,0,1]);this.renderPassEncoder=this.commandEncoder.beginRenderPass(e);const t=this._boundPipeline,r={...this._boundVertexBuffer},s=this._boundIndexBuffer,i={...this._boundBindGroup};this._clearCache();const n=this._renderer.renderTarget.viewport;this.renderPassEncoder.setViewport(n.x,n.y,n.width,n.height,0,1),this.setPipeline(t);for(const o in r)this._setVertexBuffer(o,r[o]);for(const o in i)this.setBindGroup(o,i[o],null);this._setIndexBuffer(s)}_clearCache(){for(let e=0;e<16;e++)this._boundBindGroup[e]=null,this._boundVertexBuffer[e]=null;this._boundIndexBuffer=null,this._boundPipeline=null}destroy(){this._renderer=null,this._gpu=null,this._boundBindGroup=null,this._boundVertexBuffer=null,this._boundIndexBuffer=null,this._boundPipeline=null}contextChange(e){this._gpu=e}}W.extension={type:[l.WebGPUSystem],name:"encoder",priority:1};class V{constructor(e){this._renderTargetStencilState=Object.create(null),this._renderer=e,e.renderTarget.onRenderTargetChange.add(this)}onRenderTargetChange(e){let t=this._renderTargetStencilState[e.uid];t||(t=this._renderTargetStencilState[e.uid]={stencilMode:P.DISABLED,stencilReference:0}),this._activeRenderTarget=e,this.setStencilMode(t.stencilMode,t.stencilReference)}setStencilMode(e,t){const r=this._renderTargetStencilState[this._activeRenderTarget.uid];r.stencilMode=e,r.stencilReference=t;const s=this._renderer;s.pipeline.setStencilMode(e),s.encoder.renderPassEncoder.setStencilReference(t)}destroy(){this._renderer.renderTarget.onRenderTargetChange.remove(this),this._renderer=null,this._activeRenderTarget=null,this._renderTargetStencilState=null}}V.extension={type:[l.WebGPUSystem],name:"stencil"};const x={i32:{align:4,size:4},u32:{align:4,size:4},f32:{align:4,size:4},f16:{align:2,size:2},"vec2<i32>":{align:8,size:8},"vec2<u32>":{align:8,size:8},"vec2<f32>":{align:8,size:8},"vec2<f16>":{align:4,size:4},"vec3<i32>":{align:16,size:12},"vec3<u32>":{align:16,size:12},"vec3<f32>":{align:16,size:12},"vec3<f16>":{align:8,size:6},"vec4<i32>":{align:16,size:16},"vec4<u32>":{align:16,size:16},"vec4<f32>":{align:16,size:16},"vec4<f16>":{align:8,size:8},"mat2x2<f32>":{align:8,size:16},"mat2x2<f16>":{align:4,size:8},"mat3x2<f32>":{align:8,size:24},"mat3x2<f16>":{align:4,size:12},"mat4x2<f32>":{align:8,size:32},"mat4x2<f16>":{align:4,size:16},"mat2x3<f32>":{align:16,size:32},"mat2x3<f16>":{align:8,size:16},"mat3x3<f32>":{align:16,size:48},"mat3x3<f16>":{align:8,size:24},"mat4x3<f32>":{align:16,size:64},"mat4x3<f16>":{align:8,size:32},"mat2x4<f32>":{align:16,size:32},"mat2x4<f16>":{align:8,size:16},"mat3x4<f32>":{align:16,size:48},"mat3x4<f16>":{align:8,size:24},"mat4x4<f32>":{align:16,size:64},"mat4x4<f16>":{align:8,size:32}};function ve(a){const e=a.map(r=>({data:r,offset:0,size:0}));let t=0;for(let r=0;r<e.length;r++){const s=e[r];let i=x[s.data.type].size;const n=x[s.data.type].align;if(!x[s.data.type])throw new Error(`[Pixi.js] WebGPU UniformBuffer: Unknown type ${s.data.type}`);s.data.size>1&&(i=Math.max(i,n)*s.data.size),t=Math.ceil(t/n)*n,s.size=i,s.offset=t,t+=i}return t=Math.ceil(t/16)*16,{uboElements:e,size:t}}function Ue(a,e){const{size:t,align:r}=x[a.data.type],s=(r-t)/4;return`
|
||||||
v = uv.${a.data.name};
|
v = uv.${a.data.name};
|
||||||
${e!==0?`offset += ${e};`:""}
|
${e!==0?`offset += ${e};`:""}
|
||||||
|
|
||||||
@@ -38,4 +38,4 @@ import{M as R,g as E,E as l,f as ie,S as P,B as S,b as ne,c as A,d as b,h as oe,
|
|||||||
fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {
|
fn fragmentMain(@location(0) texCoord : vec2<f32>) -> @location(0) vec4<f32> {
|
||||||
return textureSample(img, imgSampler, texCoord);
|
return textureSample(img, imgSampler, texCoord);
|
||||||
}
|
}
|
||||||
`})),t=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format:e}]}}),this.pipelines[e]=t),t}generateMipmap(e){const t=this._getMipmapPipeline(e.format);if(e.dimension==="3d"||e.dimension==="1d")throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let r=e;const s=e.depthOrArrayLayers||1,i=e.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!i){const u={size:{width:Math.ceil(e.width/2),height:Math.ceil(e.height/2),depthOrArrayLayers:s},format:e.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:e.mipLevelCount-1};r=this.device.createTexture(u)}const n=this.device.createCommandEncoder({}),o=t.getBindGroupLayout(0);for(let u=0;u<s;++u){let c=e.createView({baseMipLevel:0,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),f=i?1:0;for(let h=1;h<e.mipLevelCount;++h){const p=r.createView({baseMipLevel:f++,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),d=n.beginRenderPass({colorAttachments:[{view:p,storeOp:"store",loadOp:"clear",clearValue:{r:0,g:0,b:0,a:0}}]}),g=this.device.createBindGroup({layout:o,entries:[{binding:0,resource:this.sampler},{binding:1,resource:c}]});d.setPipeline(t),d.setBindGroup(0,g),d.draw(3,1,0,0),d.end(),c=p}}if(!i){const u={width:Math.ceil(e.width/2),height:Math.ceil(e.height/2),depthOrArrayLayers:s};for(let c=1;c<e.mipLevelCount;++c)n.copyTextureToTexture({texture:r,mipLevel:c-1},{texture:e,mipLevel:c},u),u.width=Math.ceil(u.width/2),u.height=Math.ceil(u.height/2)}return this.device.queue.submit([n.finish()]),i||r.destroy(),e}}class J{constructor(e){this.managedTextures=[],this._gpuSources=Object.create(null),this._gpuSamplers=Object.create(null),this._bindGroupHash=Object.create(null),this._textureViewHash=Object.create(null),this._uploads={image:Z,buffer:De,video:Oe,compressed:Le},this._renderer=e}contextChange(e){this._gpu=e}initSource(e){if(e.autoGenerateMipmaps){const u=Math.max(e.pixelWidth,e.pixelHeight);e.mipLevelCount=Math.floor(Math.log2(u))+1}let t=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST;e.uploadMethodId!=="compressed"&&(t|=GPUTextureUsage.RENDER_ATTACHMENT,t|=GPUTextureUsage.COPY_SRC);const r=X[e.format]||{blockBytes:4,blockWidth:1,blockHeight:1},s=Math.ceil(e.pixelWidth/r.blockWidth)*r.blockWidth,i=Math.ceil(e.pixelHeight/r.blockHeight)*r.blockHeight,n={label:e.label,size:{width:s,height:i},format:e.format,sampleCount:e.sampleCount,mipLevelCount:e.mipLevelCount,dimension:e.dimension,usage:t},o=this._gpu.device.createTexture(n);return this._gpuSources[e.uid]=o,this.managedTextures.includes(e)||(e.on("update",this.onSourceUpdate,this),e.on("resize",this.onSourceResize,this),e.on("destroy",this.onSourceDestroy,this),e.on("unload",this.onSourceUnload,this),e.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(e)),this.onSourceUpdate(e),o}onSourceUpdate(e){const t=this.getGpuSource(e);t&&(this._uploads[e.uploadMethodId]&&this._uploads[e.uploadMethodId].upload(e,t,this._gpu),e.autoGenerateMipmaps&&e.mipLevelCount>1&&this.onUpdateMipmaps(e))}onSourceUnload(e){const t=this._gpuSources[e.uid];t&&(this._gpuSources[e.uid]=null,t.destroy())}onUpdateMipmaps(e){this._mipmapGenerator||(this._mipmapGenerator=new He(this._gpu.device));const t=this.getGpuSource(e);this._mipmapGenerator.generateMipmap(t)}onSourceDestroy(e){e.off("update",this.onSourceUpdate,this),e.off("unload",this.onSourceUnload,this),e.off("destroy",this.onSourceDestroy,this),e.off("resize",this.onSourceResize,this),e.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(e),1),this.onSourceUnload(e)}onSourceResize(e){const t=this._gpuSources[e.uid];t?(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(this._textureViewHash[e.uid]=null,this._bindGroupHash[e.uid]=null,this.onSourceUnload(e),this.initSource(e)):this.initSource(e)}_initSampler(e){return this._gpuSamplers[e._resourceId]=this._gpu.device.createSampler(e),this._gpuSamplers[e._resourceId]}getGpuSampler(e){return this._gpuSamplers[e._resourceId]||this._initSampler(e)}getGpuSource(e){return this._gpuSources[e.uid]||this.initSource(e)}getTextureBindGroup(e){return this._bindGroupHash[e.uid]??this._createTextureBindGroup(e)}_createTextureBindGroup(e){const t=e.source,r=t.uid;return this._bindGroupHash[r]=new A({0:t,1:t.style}),this._bindGroupHash[r]}getTextureView(e){const t=e.source;return this._textureViewHash[t.uid]??this._createTextureView(t)}_createTextureView(e){return this._textureViewHash[e.uid]=this.getGpuSource(e).createView(),this._textureViewHash[e.uid]}generateCanvas(e){const t=this._renderer,r=t.gpu.device.createCommandEncoder(),s=ue.get().createCanvas();s.width=e.source.pixelWidth,s.height=e.source.pixelHeight;const i=s.getContext("webgpu");return i.configure({device:t.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:navigator.gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),r.copyTextureToTexture({texture:t.texture.getGpuSource(e.source),origin:{x:0,y:0}},{texture:i.getCurrentTexture()},{width:s.width,height:s.height}),t.gpu.device.queue.submit([r.finish()]),s}getPixels(e){const t=this.generateCanvas(e),r=w.getOptimalCanvasAndContext(t.width,t.height),s=r.context;s.drawImage(t,0,0);const{width:i,height:n}=t,o=s.getImageData(0,0,i,n),u=new Uint8ClampedArray(o.data.buffer);return w.returnCanvasAndContext(r),{pixels:u,width:i,height:n}}destroy(){this.managedTextures.slice().forEach(e=>this.onSourceDestroy(e)),this.managedTextures=null;for(const e of Object.keys(this._bindGroupHash)){const t=Number(e);this._bindGroupHash[t]?.destroy(),this._bindGroupHash[t]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}}J.extension={type:[l.WebGPUSystem],name:"texture"};class Q{init(){const e=new pe({uTransformMatrix:{value:new k,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),t=T({name:"graphics",bits:[z,L(R),le,C]});this.shader=new v({gpuProgram:t,resources:{localUniforms:e}})}execute(e,t){const r=t.context,s=r.customShader||this.shader,i=e.renderer,n=i.graphicsContext,{geometry:o,instructions:u}=n.getContextRenderData(r),c=i.encoder;c.setPipelineFromGeometryProgramAndState(o,s.gpuProgram,e.state),c.setGeometry(o);const f=i.globalUniforms.bindGroup;c.setBindGroup(0,f,s.gpuProgram);const h=i.renderPipes.uniformBatch.getUniformBindGroup(s.resources.localUniforms,!0);c.setBindGroup(2,h,s.gpuProgram);const p=u.instructions;for(let d=0;d<u.instructionSize;d++){const g=p[d];if(s.groups[1]=g.bindGroup,!g.gpuBindGroup){const B=g.textures;g.bindGroup=E(B.textures,B.count),g.gpuBindGroup=i.bindGroup.getBindGroup(g.bindGroup,s.gpuProgram,1)}c.setBindGroup(1,g.bindGroup,s.gpuProgram),c.renderPassEncoder.drawIndexed(g.size,1,g.start)}}destroy(){this.shader.destroy(!0),this.shader=null}}Q.extension={type:[l.WebGPUPipesAdaptor],name:"graphics"};class ee{init(){const e=T({name:"mesh",bits:[fe,Se,C]});this._shader=new v({gpuProgram:e,resources:{uTexture:M.EMPTY._source,uSampler:M.EMPTY._source.style,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new k}}}})}execute(e,t){const r=e.renderer;let s=t._shader;if(!s)s=this._shader,s.resources.uTexture=t.texture.source,s.resources.uSampler=t.texture.source.style,s.resources.textureUniforms.uniforms.uTextureMatrix=t.texture.textureMatrix.mapCoord;else if(!s.gpuProgram){ce("Mesh shader has no gpuProgram",t.shader);return}const i=s.gpuProgram;if(i.autoAssignGlobalUniforms&&(s.groups[0]=r.globalUniforms.bindGroup),i.autoAssignLocalUniforms){const n=e.localUniforms;s.groups[1]=r.renderPipes.uniformBatch.getUniformBindGroup(n,!0)}r.encoder.draw({geometry:t._geometry,shader:s,state:t.state})}destroy(){this._shader.destroy(!0),this._shader=null}}ee.extension={type:[l.WebGPUPipesAdaptor],name:"mesh"};const Fe=[...Pe,j,W,U,F,J,q,Y,$,K,I,V,H],Ie=[...Te,N],We=[O,ee,Q],te=[],re=[],se=[];G.handleByNamedList(l.WebGPUSystem,te);G.handleByNamedList(l.WebGPUPipes,re);G.handleByNamedList(l.WebGPUPipesAdaptor,se);G.add(...Fe,...Ie,...We);Qe=class extends de{constructor(){const e={name:"webgpu",type:ge.WEBGPU,systems:te,renderPipes:re,renderPipeAdaptors:se};super(e)}}});export{Qe as WebGPURenderer,__tla};
|
`})),t=this.device.createRenderPipeline({layout:"auto",vertex:{module:this.mipmapShaderModule,entryPoint:"vertexMain"},fragment:{module:this.mipmapShaderModule,entryPoint:"fragmentMain",targets:[{format:e}]}}),this.pipelines[e]=t),t}generateMipmap(e){const t=this._getMipmapPipeline(e.format);if(e.dimension==="3d"||e.dimension==="1d")throw new Error("Generating mipmaps for non-2d textures is currently unsupported!");let r=e;const s=e.depthOrArrayLayers||1,i=e.usage&GPUTextureUsage.RENDER_ATTACHMENT;if(!i){const u={size:{width:Math.ceil(e.width/2),height:Math.ceil(e.height/2),depthOrArrayLayers:s},format:e.format,usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC|GPUTextureUsage.RENDER_ATTACHMENT,mipLevelCount:e.mipLevelCount-1};r=this.device.createTexture(u)}const n=this.device.createCommandEncoder({}),o=t.getBindGroupLayout(0);for(let u=0;u<s;++u){let c=e.createView({baseMipLevel:0,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),f=i?1:0;for(let h=1;h<e.mipLevelCount;++h){const p=r.createView({baseMipLevel:f++,mipLevelCount:1,dimension:"2d",baseArrayLayer:u,arrayLayerCount:1}),d=n.beginRenderPass({colorAttachments:[{view:p,storeOp:"store",loadOp:"clear",clearValue:{r:0,g:0,b:0,a:0}}]}),g=this.device.createBindGroup({layout:o,entries:[{binding:0,resource:this.sampler},{binding:1,resource:c}]});d.setPipeline(t),d.setBindGroup(0,g),d.draw(3,1,0,0),d.end(),c=p}}if(!i){const u={width:Math.ceil(e.width/2),height:Math.ceil(e.height/2),depthOrArrayLayers:s};for(let c=1;c<e.mipLevelCount;++c)n.copyTextureToTexture({texture:r,mipLevel:c-1},{texture:e,mipLevel:c},u),u.width=Math.ceil(u.width/2),u.height=Math.ceil(u.height/2)}return this.device.queue.submit([n.finish()]),i||r.destroy(),e}}class J{constructor(e){this.managedTextures=[],this._gpuSources=Object.create(null),this._gpuSamplers=Object.create(null),this._bindGroupHash=Object.create(null),this._textureViewHash=Object.create(null),this._uploads={image:Z,buffer:De,video:Oe,compressed:Le},this._renderer=e}contextChange(e){this._gpu=e}initSource(e){if(e.autoGenerateMipmaps){const u=Math.max(e.pixelWidth,e.pixelHeight);e.mipLevelCount=Math.floor(Math.log2(u))+1}let t=GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST;e.uploadMethodId!=="compressed"&&(t|=GPUTextureUsage.RENDER_ATTACHMENT,t|=GPUTextureUsage.COPY_SRC);const r=X[e.format]||{blockBytes:4,blockWidth:1,blockHeight:1},s=Math.ceil(e.pixelWidth/r.blockWidth)*r.blockWidth,i=Math.ceil(e.pixelHeight/r.blockHeight)*r.blockHeight,n={label:e.label,size:{width:s,height:i},format:e.format,sampleCount:e.sampleCount,mipLevelCount:e.mipLevelCount,dimension:e.dimension,usage:t},o=this._gpu.device.createTexture(n);return this._gpuSources[e.uid]=o,this.managedTextures.includes(e)||(e.on("update",this.onSourceUpdate,this),e.on("resize",this.onSourceResize,this),e.on("destroy",this.onSourceDestroy,this),e.on("unload",this.onSourceUnload,this),e.on("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.push(e)),this.onSourceUpdate(e),o}onSourceUpdate(e){const t=this.getGpuSource(e);t&&(this._uploads[e.uploadMethodId]&&this._uploads[e.uploadMethodId].upload(e,t,this._gpu),e.autoGenerateMipmaps&&e.mipLevelCount>1&&this.onUpdateMipmaps(e))}onSourceUnload(e){const t=this._gpuSources[e.uid];t&&(this._gpuSources[e.uid]=null,t.destroy())}onUpdateMipmaps(e){this._mipmapGenerator||(this._mipmapGenerator=new He(this._gpu.device));const t=this.getGpuSource(e);this._mipmapGenerator.generateMipmap(t)}onSourceDestroy(e){e.off("update",this.onSourceUpdate,this),e.off("unload",this.onSourceUnload,this),e.off("destroy",this.onSourceDestroy,this),e.off("resize",this.onSourceResize,this),e.off("updateMipmaps",this.onUpdateMipmaps,this),this.managedTextures.splice(this.managedTextures.indexOf(e),1),this.onSourceUnload(e)}onSourceResize(e){const t=this._gpuSources[e.uid];t?(t.width!==e.pixelWidth||t.height!==e.pixelHeight)&&(this._textureViewHash[e.uid]=null,this._bindGroupHash[e.uid]=null,this.onSourceUnload(e),this.initSource(e)):this.initSource(e)}_initSampler(e){return this._gpuSamplers[e._resourceId]=this._gpu.device.createSampler(e),this._gpuSamplers[e._resourceId]}getGpuSampler(e){return this._gpuSamplers[e._resourceId]||this._initSampler(e)}getGpuSource(e){return this._gpuSources[e.uid]||this.initSource(e)}getTextureBindGroup(e){return this._bindGroupHash[e.uid]??this._createTextureBindGroup(e)}_createTextureBindGroup(e){const t=e.source,r=t.uid;return this._bindGroupHash[r]=new A({0:t,1:t.style}),this._bindGroupHash[r]}getTextureView(e){const t=e.source;return this._textureViewHash[t.uid]??this._createTextureView(t)}_createTextureView(e){return this._textureViewHash[e.uid]=this.getGpuSource(e).createView(),this._textureViewHash[e.uid]}generateCanvas(e){const t=this._renderer,r=t.gpu.device.createCommandEncoder(),s=ue.get().createCanvas();s.width=e.source.pixelWidth,s.height=e.source.pixelHeight;const i=s.getContext("webgpu");return i.configure({device:t.gpu.device,usage:GPUTextureUsage.COPY_DST|GPUTextureUsage.COPY_SRC,format:navigator.gpu.getPreferredCanvasFormat(),alphaMode:"premultiplied"}),r.copyTextureToTexture({texture:t.texture.getGpuSource(e.source),origin:{x:0,y:0}},{texture:i.getCurrentTexture()},{width:s.width,height:s.height}),t.gpu.device.queue.submit([r.finish()]),s}getPixels(e){const t=this.generateCanvas(e),r=w.getOptimalCanvasAndContext(t.width,t.height),s=r.context;s.drawImage(t,0,0);const{width:i,height:n}=t,o=s.getImageData(0,0,i,n),u=new Uint8ClampedArray(o.data.buffer);return w.returnCanvasAndContext(r),{pixels:u,width:i,height:n}}destroy(){this.managedTextures.slice().forEach(e=>this.onSourceDestroy(e)),this.managedTextures=null;for(const e of Object.keys(this._bindGroupHash)){const t=Number(e);this._bindGroupHash[t]?.destroy(),this._bindGroupHash[t]=null}this._gpu=null,this._mipmapGenerator=null,this._gpuSources=null,this._bindGroupHash=null,this._textureViewHash=null,this._gpuSamplers=null}}J.extension={type:[l.WebGPUSystem],name:"texture"};class Q{init(){const e=new pe({uTransformMatrix:{value:new k,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),t=T({name:"graphics",bits:[z,L(R),le,C]});this.shader=new v({gpuProgram:t,resources:{localUniforms:e}})}execute(e,t){const r=t.context,s=r.customShader||this.shader,i=e.renderer,n=i.graphicsContext,{geometry:o,instructions:u}=n.getContextRenderData(r),c=i.encoder;c.setPipelineFromGeometryProgramAndState(o,s.gpuProgram,e.state),c.setGeometry(o);const f=i.globalUniforms.bindGroup;c.setBindGroup(0,f,s.gpuProgram);const h=i.renderPipes.uniformBatch.getUniformBindGroup(s.resources.localUniforms,!0);c.setBindGroup(2,h,s.gpuProgram);const p=u.instructions;for(let d=0;d<u.instructionSize;d++){const g=p[d];if(s.groups[1]=g.bindGroup,!g.gpuBindGroup){const B=g.textures;g.bindGroup=E(B.textures,B.count),g.gpuBindGroup=i.bindGroup.getBindGroup(g.bindGroup,s.gpuProgram,1)}c.setBindGroup(1,g.bindGroup,s.gpuProgram),c.renderPassEncoder.drawIndexed(g.size,1,g.start)}}destroy(){this.shader.destroy(!0),this.shader=null}}Q.extension={type:[l.WebGPUPipesAdaptor],name:"graphics"};class ee{init(){const e=T({name:"mesh",bits:[fe,Se,C]});this._shader=new v({gpuProgram:e,resources:{uTexture:M.EMPTY._source,uSampler:M.EMPTY._source.style,textureUniforms:{uTextureMatrix:{type:"mat3x3<f32>",value:new k}}}})}execute(e,t){const r=e.renderer;let s=t._shader;if(!s)s=this._shader,s.resources.uTexture=t.texture.source,s.resources.uSampler=t.texture.source.style,s.resources.textureUniforms.uniforms.uTextureMatrix=t.texture.textureMatrix.mapCoord;else if(!s.gpuProgram){ce("Mesh shader has no gpuProgram",t.shader);return}const i=s.gpuProgram;if(i.autoAssignGlobalUniforms&&(s.groups[0]=r.globalUniforms.bindGroup),i.autoAssignLocalUniforms){const n=e.localUniforms;s.groups[1]=r.renderPipes.uniformBatch.getUniformBindGroup(n,!0)}r.encoder.draw({geometry:t._geometry,shader:s,state:t.state})}destroy(){this._shader.destroy(!0),this._shader=null}}ee.extension={type:[l.WebGPUPipesAdaptor],name:"mesh"};const Fe=[...Pe,j,W,U,F,J,q,Y,$,K,I,V,H],Ie=[...Te,N],We=[O,ee,Q],te=[],re=[],se=[];G.handleByNamedList(l.WebGPUSystem,te);G.handleByNamedList(l.WebGPUPipes,re);G.handleByNamedList(l.WebGPUPipesAdaptor,se);G.add(...Fe,...Ie,...We);et=class extends de{constructor(){const e={name:"webgpu",type:ge.WEBGPU,systems:te,renderPipes:re,renderPipeAdaptors:se};super(e)}}});export{et as WebGPURenderer,__tla};
|
||||||
@@ -1 +1 @@
|
|||||||
import{M as e,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{U as o,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";let i;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{const t=new Int32Array(e);for(let r=0;r<e;r++)t[r]=r;i=new o({uTextures:{value:t,type:"i32",size:e}},{isStatic:!0})});export{i as b,__tla};
|
import{M as e,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";import{U as o,__tla as __tla_1}from"./colorToUniform-Bf80N278.js";let i;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})()]).then(async()=>{const t=new Int32Array(e);for(let r=0;r<e;r++)t[r]=r;i=new o({uTextures:{value:t,type:"i32",size:e}},{isStatic:!0})});export{i as b,__tla};
|
||||||
1
qbit/vuetorrent/public/assets/browserAll-BT1z9cKE.js
Normal file
1
qbit/vuetorrent/public/assets/browserAll-BT1z9cKE.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{P as m,r as J,E as w,T as B,U as Q,a as ee,w as y,e as z,C as Z,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";import{__tla as __tla_1}from"./webworkerAll-DPPv9Ibl.js";import{__tla as __tla_2}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Cz5dpnUF.js";import{__tla as __tla_3}from"./index-CfNDsQKB.js";import"./vue--7UcA1iU.js";import"./vuetify-GhifFkZ7.js";import"./FileIcon-DH65fwz5.js";import{__tla as __tla_4}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-BvP4_KF0.js";import{__tla as __tla_5}from"./colorToUniform-Bf80N278.js";import{__tla as __tla_6}from"./CanvasPool-E3p4G6BL.js";import{__tla as __tla_7}from"./batchSamplersUniformGroup-CKEGmRNN.js";Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})(),(()=>{try{return __tla_7}catch{}})()]).then(async()=>{class M{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=M.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new m,this.page=new m,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,s){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}var O=/iPhone/i,C=/iPod/i,S=/iPad/i,U=/\biOS-universal(?:.+)Mac\b/i,k=/\bAndroid(?:.+)Mobile\b/i,H=/Android/i,b=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,A=/Silk/i,g=/Windows Phone/i,X=/\bWindows(?:.+)ARM\b/i,R=/BlackBerry/i,F=/BB10/i,Y=/Opera Mini/i,K=/\b(CriOS|Chrome)(?:.+)Mobile/i,$=/Mobile(?:.+)Firefox\b/i,G=function(o){return typeof o<"u"&&o.platform==="MacIntel"&&typeof o.maxTouchPoints=="number"&&o.maxTouchPoints>1&&typeof MSStream>"u"};function te(o){return function(e){return e.test(o)}}function W(o){var e={userAgent:"",platform:"",maxTouchPoints:0};!o&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof o=="string"?e.userAgent=o:o&&o.userAgent&&(e={userAgent:o.userAgent,platform:o.platform,maxTouchPoints:o.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=te(t),s={apple:{phone:n(O)&&!n(g),ipod:n(C),tablet:!n(O)&&(n(S)||G(e))&&!n(g),universal:n(U),device:(n(O)||n(C)||n(S)||n(U)||G(e))&&!n(g)},amazon:{phone:n(b),tablet:!n(b)&&n(A),device:n(b)||n(A)},android:{phone:!n(g)&&n(b)||!n(g)&&n(k),tablet:!n(g)&&!n(b)&&!n(k)&&(n(A)||n(H)),device:!n(g)&&(n(b)||n(A)||n(k)||n(H))||n(/\bokhttp\b/i)},windows:{phone:n(g),tablet:n(X),device:n(g)||n(X)},other:{blackberry:n(R),blackberry10:n(F),opera:n(Y),firefox:n($),chrome:n(K),device:n(R)||n(F)||n(Y)||n($)||n(K)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const ie=W.default??W,ne=ie(globalThis.navigator),se=9,I=100,oe=0,re=0,j=2,N=1,ae=-1e3,he=-1e3,le=2;class V{constructor(e,t=ne){this._mobileInfo=t,this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this._pool=[],this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook();const i=document.createElement("div");i.style.width=`${I}px`,i.style.height=`${I}px`,i.style.position="absolute",i.style.top=`${oe}px`,i.style.left=`${re}px`,i.style.zIndex=j.toString(),this._div=i,this._renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}_createTouchHook(){const e=document.createElement("button");e.style.width=`${N}px`,e.style.height=`${N}px`,e.style.position="absolute",e.style.top=`${ae}px`,e.style.left=`${he}px`,e.style.zIndex=le.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.add(this),this._renderer.view.canvas.parentNode?.appendChild(this._div))}_deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.remove(this),this._div.parentNode?.removeChild(this._div))}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);const t=e.children;if(t)for(let i=0;i<t.length;i++)this._updateAccessibleObjects(t[i])}init(e){this.debug=e?.debug??this.debug,this._renderer.runners.postrender.remove(this)}postrender(){const e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,!this._renderer.renderingToScreen||!this._renderer.view.canvas))return;this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered);const{x:t,y:i,width:n,height:s}=this._renderer.view.canvas.getBoundingClientRect(),{width:r,height:a,resolution:c}=this._renderer,p=n/r*c,h=s/a*c;let l=this._div;l.style.left=`${t}px`,l.style.top=`${i}px`,l.style.width=`${r}px`,l.style.height=`${a}px`;for(let d=0;d<this._children.length;d++){const u=this._children[d];if(u._renderId!==this._renderId)u._accessibleActive=!1,J(this._children,d,1),this._div.removeChild(u._accessibleDiv),this._pool.push(u._accessibleDiv),u._accessibleDiv=null,d--;else{l=u._accessibleDiv;let v=u.hitArea;const _=u.worldTransform;u.hitArea?(l.style.left=`${(_.tx+v.x*_.a)*p}px`,l.style.top=`${(_.ty+v.y*_.d)*h}px`,l.style.width=`${v.width*_.a*p}px`,l.style.height=`${v.height*_.d*h}px`):(v=u.getBounds().rectangle,this._capHitArea(v),l.style.left=`${v.x*p}px`,l.style.top=`${v.y*h}px`,l.style.width=`${v.width*p}px`,l.style.height=`${v.height*h}px`,l.title!==u.accessibleTitle&&u.accessibleTitle!==null&&(l.title=u.accessibleTitle||""),l.getAttribute("aria-label")!==u.accessibleHint&&u.accessibleHint!==null&&l.setAttribute("aria-label",u.accessibleHint||"")),(u.accessibleTitle!==l.title||u.tabIndex!==l.tabIndex)&&(l.title=u.accessibleTitle||"",l.tabIndex=u.tabIndex,this.debug&&this._updateDebugHTML(l))}}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}_addChild(e){let t=this._pool.pop();t||(t=document.createElement("button"),t.style.width=`${I}px`,t.style.height=`${I}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=j.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{container:i}=e.target,n=this._renderer.events.rootBoundary,s=Object.assign(new M(n),{target:i});n.rootTarget=this._renderer.lastObjectRendered,t.forEach(r=>n.dispatchEvent(s,r))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===se&&this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._destroyTouchHook(),this._div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this._pool=null,this._children=null,this._renderer=null}}V.extension={type:[w.WebGLSystem,w.WebGPUSystem],name:"accessibility"};const ue={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,_renderId:-1};class de{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(B.system.add(this._tickerUpdate,this,Q.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(B.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}}const E=new de;class D extends M{constructor(){super(...arguments),this.client=new m,this.movement=new m,this.offset=new m,this.global=new m,this.screen=new m}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,s,r,a,c,p,h,l,d,u,v,_){throw new Error("Method not implemented.")}}class f extends D{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class T extends D{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}T.DOM_DELTA_PIXEL=0;T.DOM_DELTA_LINE=1;T.DOM_DELTA_PAGE=2;const ce=2048,pe=new m,P=new m;class ve{constructor(e){this.dispatch=new ee,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((i,n)=>i.priority-n.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,n=t.length;i<n;i++)t[i].fn(e);else y(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){E.pauseUpdate=!0;const n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",s=this[n](this.rootTarget,this.rootTarget.eventMode,pe.set(e,t),this.hitTestFn,this.hitPruneFn);return s&&s[0]}propagate(e,t){if(!e.target)return;const i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let n=0,s=i.length-1;n<s;n++)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let n=i.length-2;n>=0;n--)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const n=Array.isArray(t)?t:[t];for(let s=i.length-1;s>=0;s--)n.forEach(r=>{e.currentTarget=i[s],this.notifyTarget(e,r)})}propagationPath(e){const t=[e];for(let i=0;i<ce&&e!==this.rootTarget&&e.parent;i++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,i,n,s,r=!1){let a=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(E.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let l=h.length-1;l>=0;l--){const d=h[l],u=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,n,s,r||s(e,i));if(u){if(u.length>0&&!u[u.length-1].parent)continue;const v=e.isInteractive();(u.length>0||v)&&(v&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),a=!0}}}const c=this._isInteractive(t),p=e.isInteractive();return p&&p&&this._allInteractiveElements.push(e),r||this._hitElements.length>0?null:a?this._hitElements:c&&!s(e,i)&&n(e,i)?p?[e]:[]:null}hitTestRecursive(e,t,i,n,s){if(this._interactivePrune(e)||s(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(E.pauseUpdate=!1),e.interactiveChildren&&e.children){const c=e.children,p=i;for(let h=c.length-1;h>=0;h--){const l=c[h],d=this.hitTestRecursive(l,this._isInteractive(t)?t:l.eventMode,p,n,s);if(d){if(d.length>0&&!d[d.length-1].parent)continue;const u=e.isInteractive();return(d.length>0||u)&&d.push(e),d}}}const r=this._isInteractive(t),a=e.isInteractive();return r&&n(e,i)?a?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!e||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,P),!e.hitArea.contains(P.x,P.y)))return!0;if(e.effects&&e.effects.length)for(let i=0;i<e.effects.length;i++){const n=e.effects[i];if(n.containsPoint&&!n.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,P),e.containsPoint(P)):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const n=t.button===2;this.dispatchEvent(t,n?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",n=this.trackingData(e.pointerId),s=this.findMountedTarget(n.overTargets);if(n.overTargets?.length>0&&s!==t.target){const c=e.type==="mousemove"?"mouseout":"pointerout",p=this.createPointerEvent(e,c,s);if(this.dispatchEvent(p,"pointerout"),i&&this.dispatchEvent(p,"mouseout"),!t.composedPath().includes(s)){const h=this.createPointerEvent(e,"pointerleave",s);for(h.eventPhase=h.AT_TARGET;h.target&&!t.composedPath().includes(h.target);)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseleave"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(p)}if(s!==t.target){const c=e.type==="mousemove"?"mouseover":"pointerover",p=this.clonePointerEvent(t,c);this.dispatchEvent(p,"pointerover"),i&&this.dispatchEvent(p,"mouseover");let h=s?.parent;for(;h&&h!==this.rootTarget.parent&&h!==t.target;)h=h.parent;if(!h||h===this.rootTarget.parent){const d=this.clonePointerEvent(t,"pointerenter");for(d.eventPhase=d.AT_TARGET;d.target&&d.target!==s&&d.target!==this.rootTarget.parent;)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseenter"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(p)}const r=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?r.push("pointermove"):this.dispatchEvent(t,"pointermove"),a&&r.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?r.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),a&&r.push("globaltouchmove")),i&&(this.moveOnAll?r.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),a&&r.push("globalmousemove"),this.cursor=t.target?.cursor),r.length>0&&this.all(t,r),this._allInteractiveElements.length=0,this._hitElements.length=0,n.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),n=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),n&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const s=this.clonePointerEvent(i,"pointerenter");for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),n&&this.notifyTarget(s,"mouseenter"),s.target=s.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(s)}mapPointerOut(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",n=this.findMountedTarget(t.overTargets),s=this.createPointerEvent(e,"pointerout",n);this.dispatchEvent(s),i&&this.dispatchEvent(s,"mouseout");const r=this.createPointerEvent(e,"pointerleave",n);for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==this.rootTarget.parent;)r.currentTarget=r.target,this.notifyTarget(r),i&&this.notifyTarget(r,"mouseleave"),r.target=r.target.parent;t.overTargets=null,this.freeEvent(s),this.freeEvent(r)}this.cursor=null}mapPointerUp(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}const n=this.trackingData(e.pointerId),s=this.findMountedTarget(n.pressTargetsByButton[e.button]);let r=s;if(s&&!i.composedPath().includes(s)){let a=s;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const c=i.button===2;this.notifyTarget(i,c?"rightupoutside":"mouseupoutside")}a=a.parent}delete n.pressTargetsByButton[e.button],r=a}if(r){const a=this.clonePointerEvent(i,"click");a.target=r,a.path=null,n.clicksByButton[e.button]||(n.clicksByButton[e.button]={clickCount:0,target:a.target,timeStamp:t});const c=n.clicksByButton[e.button];if(c.target===a.target&&t-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=a.target,c.timeStamp=t,a.detail=c.clickCount,a.pointerType==="mouse"){const p=a.button===2;this.dispatchEvent(a,p?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),n=this.createPointerEvent(e);if(i){let s=i;for(;s;)n.currentTarget=s,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch"?this.notifyTarget(n,"touchendoutside"):(n.pointerType==="mouse"||n.pointerType==="pen")&&this.notifyTarget(n,n.button===2?"rightupoutside":"mouseupoutside"),s=s.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(n)}mapWheel(e){if(!(e instanceof T)){y("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i<e.length&&e[i].parent===t;i++)t=e[i];return t}createPointerEvent(e,t,i){const n=this.allocateEvent(f);return this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,n.target=i??this.hitTest(n.global.x,n.global.y)??this._hitElements[0],typeof t=="string"&&(n.type=t),n}createWheelEvent(e){const t=this.allocateEvent(T);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){const i=this.allocateEvent(f);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=t??i.type,i}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof f&&t instanceof f&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof D&&t instanceof D&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);const t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){const i=e.currentTarget._events[t];if(i&&e.currentTarget.isInteractive())if("fn"in i)i.once&&e.currentTarget.removeListener(t,i.fn,void 0,!0),i.fn.call(i.context,e);else for(let n=0,s=i.length;n<s&&!e.propagationImmediatelyStopped;n++)i[n].once&&e.currentTarget.removeListener(t,i[n].fn,void 0,!0),i[n].fn.call(i[n].context,e)}}const fe=1,ge={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},L=class x{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new ve(null),E.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new f(null),this._rootWheelEvent=new T(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...x.defaultEventFeatures},{set:(t,i,n)=>(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=n),t[i]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{canvas:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,x._defaultEventMode=e.eventMode??"passive",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,n=t.length;i<n;i++){const s=t[i],r=this._bootstrapEvent(this._rootPointerEvent,s);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,E.pointerMoved();const t=this._normalizeToPointerData(e);for(let i=0,n=t.length;i<n;i++){const s=this._bootstrapEvent(this._rootPointerEvent,t[i]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",n=this._normalizeToPointerData(e);for(let s=0,r=n.length;s<r;s++){const a=this._bootstrapEvent(this._rootPointerEvent,n[s]);a.type+=i,this.rootBoundary.mapEvent(a)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this._normalizeToPointerData(e);for(let i=0,n=t.length;i<n;i++){const s=this._bootstrapEvent(this._rootPointerEvent,t[i]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,E.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;E.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this._onPointerMove,!0),this.domElement.addEventListener("pointerdown",this._onPointerDown,!0),this.domElement.addEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this._onPointerOverOut,!0),globalThis.addEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this._onPointerMove,!0),this.domElement.addEventListener("mousedown",this._onPointerDown,!0),this.domElement.addEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this._onPointerOverOut,!0),globalThis.addEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this._onPointerDown,!0),this.domElement.addEventListener("touchend",this._onPointerUp,!0),this.domElement.addEventListener("touchmove",this._onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;E.removeTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction="")),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this._onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this._onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this._onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this._onPointerMove,!0),this.domElement.removeEventListener("mousedown",this._onPointerDown,!0),this.domElement.removeEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this._onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this._onPointerDown,!0),this.domElement.removeEventListener("touchend",this._onPointerUp,!0),this.domElement.removeEventListener("touchmove",this._onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,i){const n=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},s=1/this.resolution;e.x=(t-n.left)*(this.domElement.width/n.width)*s,e.y=(i-n.top)*(this.domElement.height/n.height)*s}_normalizeToPointerData(e){const t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let i=0,n=e.changedTouches.length;i<n;i++){const s=e.changedTouches[i];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=e.type,t.push(s)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=fe),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=ge[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};L.extension={name:"events",type:[w.WebGLSystem,w.CanvasSystem,w.WebGPUSystem],priority:-1};L.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let q=L;const me={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode==="dynamic"||this.eventMode==="static"},set interactive(o){this.eventMode=o?"static":"passive"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??q.defaultEventMode},set eventMode(o){this._internalEventMode=o},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(o,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof t=="object"?t.signal:void 0,s=typeof t=="object"?t.once===!0:!1,r=typeof e=="function"?void 0:e;o=i?`${o}capture`:o;const a=typeof e=="function"?e:e.handleEvent,c=this;n&&n.addEventListener("abort",()=>{c.off(o,a,r)}),s?c.once(o,a,r):c.on(o,a,r)},removeEventListener(o,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof e=="function"?void 0:e;o=i?`${o}capture`:o,e=typeof e=="function"?e:e.handleEvent,this.off(o,e,n)},dispatchEvent(o){if(!(o instanceof M))throw new Error("Container cannot propagate events outside of the Federated Events API");return o.defaultPrevented=!1,o.path=null,o.target=this,o.manager.dispatchEvent(o),!o.defaultPrevented}};z.add(V);Z.mixin(ue);z.add(q);Z.mixin(me)});
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{P as m,r as J,E as w,T as B,U as Q,a as ee,w as y,e as z,C as Z,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{__tla as __tla_1}from"./webworkerAll-D8hnRv3W.js";import{__tla as __tla_2}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_3}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_4}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";import{__tla as __tla_5}from"./colorToUniform-DavgjoLv.js";import{__tla as __tla_6}from"./CanvasPool-CW8lNMNV.js";import{__tla as __tla_7}from"./batchSamplersUniformGroup-CKlXTtMl.js";Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})(),(()=>{try{return __tla_7}catch{}})()]).then(async()=>{class M{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=M.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new m,this.page=new m,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,n,s){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}var O=/iPhone/i,C=/iPod/i,S=/iPad/i,U=/\biOS-universal(?:.+)Mac\b/i,k=/\bAndroid(?:.+)Mobile\b/i,H=/Android/i,b=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,A=/Silk/i,g=/Windows Phone/i,X=/\bWindows(?:.+)ARM\b/i,R=/BlackBerry/i,F=/BB10/i,Y=/Opera Mini/i,K=/\b(CriOS|Chrome)(?:.+)Mobile/i,$=/Mobile(?:.+)Firefox\b/i,G=function(o){return typeof o<"u"&&o.platform==="MacIntel"&&typeof o.maxTouchPoints=="number"&&o.maxTouchPoints>1&&typeof MSStream>"u"};function te(o){return function(e){return e.test(o)}}function W(o){var e={userAgent:"",platform:"",maxTouchPoints:0};!o&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof o=="string"?e.userAgent=o:o&&o.userAgent&&(e={userAgent:o.userAgent,platform:o.platform,maxTouchPoints:o.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var n=te(t),s={apple:{phone:n(O)&&!n(g),ipod:n(C),tablet:!n(O)&&(n(S)||G(e))&&!n(g),universal:n(U),device:(n(O)||n(C)||n(S)||n(U)||G(e))&&!n(g)},amazon:{phone:n(b),tablet:!n(b)&&n(A),device:n(b)||n(A)},android:{phone:!n(g)&&n(b)||!n(g)&&n(k),tablet:!n(g)&&!n(b)&&!n(k)&&(n(A)||n(H)),device:!n(g)&&(n(b)||n(A)||n(k)||n(H))||n(/\bokhttp\b/i)},windows:{phone:n(g),tablet:n(X),device:n(g)||n(X)},other:{blackberry:n(R),blackberry10:n(F),opera:n(Y),firefox:n($),chrome:n(K),device:n(R)||n(F)||n(Y)||n($)||n(K)},any:!1,phone:!1,tablet:!1};return s.any=s.apple.device||s.android.device||s.windows.device||s.other.device,s.phone=s.apple.phone||s.android.phone||s.windows.phone,s.tablet=s.apple.tablet||s.android.tablet||s.windows.tablet,s}const ie=W.default??W,ne=ie(globalThis.navigator),se=9,I=100,oe=0,re=0,j=2,N=1,ae=-1e3,he=-1e3,le=2;class V{constructor(e,t=ne){this._mobileInfo=t,this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this._pool=[],this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._hookDiv=null,(t.tablet||t.phone)&&this._createTouchHook();const i=document.createElement("div");i.style.width=`${I}px`,i.style.height=`${I}px`,i.style.position="absolute",i.style.top=`${oe}px`,i.style.left=`${re}px`,i.style.zIndex=j.toString(),this._div=i,this._renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}_createTouchHook(){const e=document.createElement("button");e.style.width=`${N}px`,e.style.height=`${N}px`,e.style.position="absolute",e.style.top=`${ae}px`,e.style.left=`${he}px`,e.style.zIndex=le.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.add(this),this._renderer.view.canvas.parentNode?.appendChild(this._div))}_deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this._renderer.runners.postrender.remove(this),this._div.parentNode?.removeChild(this._div))}_updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this._addChild(e),e._renderId=this._renderId);const t=e.children;if(t)for(let i=0;i<t.length;i++)this._updateAccessibleObjects(t[i])}init(e){this.debug=e?.debug??this.debug,this._renderer.runners.postrender.remove(this)}postrender(){const e=performance.now();if(this._mobileInfo.android.device&&e<this._androidUpdateCount||(this._androidUpdateCount=e+this._androidUpdateFrequency,!this._renderer.renderingToScreen||!this._renderer.view.canvas))return;this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered);const{x:t,y:i,width:n,height:s}=this._renderer.view.canvas.getBoundingClientRect(),{width:r,height:a,resolution:c}=this._renderer,p=n/r*c,h=s/a*c;let l=this._div;l.style.left=`${t}px`,l.style.top=`${i}px`,l.style.width=`${r}px`,l.style.height=`${a}px`;for(let d=0;d<this._children.length;d++){const u=this._children[d];if(u._renderId!==this._renderId)u._accessibleActive=!1,J(this._children,d,1),this._div.removeChild(u._accessibleDiv),this._pool.push(u._accessibleDiv),u._accessibleDiv=null,d--;else{l=u._accessibleDiv;let v=u.hitArea;const _=u.worldTransform;u.hitArea?(l.style.left=`${(_.tx+v.x*_.a)*p}px`,l.style.top=`${(_.ty+v.y*_.d)*h}px`,l.style.width=`${v.width*_.a*p}px`,l.style.height=`${v.height*_.d*h}px`):(v=u.getBounds().rectangle,this._capHitArea(v),l.style.left=`${v.x*p}px`,l.style.top=`${v.y*h}px`,l.style.width=`${v.width*p}px`,l.style.height=`${v.height*h}px`,l.title!==u.accessibleTitle&&u.accessibleTitle!==null&&(l.title=u.accessibleTitle||""),l.getAttribute("aria-label")!==u.accessibleHint&&u.accessibleHint!==null&&l.setAttribute("aria-label",u.accessibleHint||"")),(u.accessibleTitle!==l.title||u.tabIndex!==l.tabIndex)&&(l.title=u.accessibleTitle||"",l.tabIndex=u.tabIndex,this.debug&&this._updateDebugHTML(l))}}this._renderId++}_updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}_capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);const{width:t,height:i}=this._renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}_addChild(e){let t=this._pool.pop();t||(t=document.createElement("button"),t.style.width=`${I}px`,t.style.height=`${I}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=j.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`container ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this._updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.container=e,this._children.push(e),this._div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){const{container:i}=e.target,n=this._renderer.events.rootBoundary,s=Object.assign(new M(n),{target:i});n.rootTarget=this._renderer.lastObjectRendered,t.forEach(r=>n.dispatchEvent(s,r))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===se&&this._activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this._deactivate()}destroy(){this._destroyTouchHook(),this._div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this._pool=null,this._children=null,this._renderer=null}}V.extension={type:[w.WebGLSystem,w.WebGPUSystem],name:"accessibility"};const ue={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,_renderId:-1};class de{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this._tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this._tickerAdded||!this.domElement||(B.system.add(this._tickerUpdate,this,Q.INTERACTION),this._tickerAdded=!0)}removeTickerListener(){this._tickerAdded&&(B.system.remove(this._tickerUpdate,this),this._tickerAdded=!1)}pointerMoved(){this._didMove=!0}_update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}const e=this.events._rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}_tickerUpdate(e){this._deltaTime+=e.deltaTime,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this._update())}}const E=new de;class D extends M{constructor(){super(...arguments),this.client=new m,this.movement=new m,this.offset=new m,this.global=new m,this.screen=new m}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,n,s,r,a,c,p,h,l,d,u,v,_){throw new Error("Method not implemented.")}}class f extends D{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}}class T extends D{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}T.DOM_DELTA_PIXEL=0;T.DOM_DELTA_LINE=1;T.DOM_DELTA_PAGE=2;const ce=2048,pe=new m,P=new m;class ve{constructor(e){this.dispatch=new ee,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((i,n)=>i.priority-n.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;const t=this.mappingTable[e.type];if(t)for(let i=0,n=t.length;i<n;i++)t[i].fn(e);else y(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){E.pauseUpdate=!0;const n=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",s=this[n](this.rootTarget,this.rootTarget.eventMode,pe.set(e,t),this.hitTestFn,this.hitPruneFn);return s&&s[0]}propagate(e,t){if(!e.target)return;const i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let n=0,s=i.length-1;n<s;n++)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let n=i.length-2;n>=0;n--)if(e.currentTarget=i[n],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;const n=Array.isArray(t)?t:[t];for(let s=i.length-1;s>=0;s--)n.forEach(r=>{e.currentTarget=i[s],this.notifyTarget(e,r)})}propagationPath(e){const t=[e];for(let i=0;i<ce&&e!==this.rootTarget&&e.parent;i++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,i,n,s,r=!1){let a=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(E.pauseUpdate=!1),e.interactiveChildren&&e.children){const h=e.children;for(let l=h.length-1;l>=0;l--){const d=h[l],u=this.hitTestMoveRecursive(d,this._isInteractive(t)?t:d.eventMode,i,n,s,r||s(e,i));if(u){if(u.length>0&&!u[u.length-1].parent)continue;const v=e.isInteractive();(u.length>0||v)&&(v&&this._allInteractiveElements.push(e),u.push(e)),this._hitElements.length===0&&(this._hitElements=u),a=!0}}}const c=this._isInteractive(t),p=e.isInteractive();return p&&p&&this._allInteractiveElements.push(e),r||this._hitElements.length>0?null:a?this._hitElements:c&&!s(e,i)&&n(e,i)?p?[e]:[]:null}hitTestRecursive(e,t,i,n,s){if(this._interactivePrune(e)||s(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(E.pauseUpdate=!1),e.interactiveChildren&&e.children){const c=e.children,p=i;for(let h=c.length-1;h>=0;h--){const l=c[h],d=this.hitTestRecursive(l,this._isInteractive(t)?t:l.eventMode,p,n,s);if(d){if(d.length>0&&!d[d.length-1].parent)continue;const u=e.isInteractive();return(d.length>0||u)&&d.push(e),d}}}const r=this._isInteractive(t),a=e.isInteractive();return r&&n(e,i)?a?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!e||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,P),!e.hitArea.contains(P.x,P.y)))return!0;if(e.effects&&e.effects.length)for(let i=0;i<e.effects.length;i++){const n=e.effects[i];if(n.containsPoint&&!n.containsPoint(t,this.hitTestFn))return!0}return!1}hitTestFn(e,t){return e.hitArea?!0:e?.containsPoint?(e.worldTransform.applyInverse(t,P),e.containsPoint(P)):!1}notifyTarget(e,t){t=t??e.type;const i=`on${t}`;e.currentTarget[i]?.(e);const n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this._notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this._notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){const n=t.button===2;this.dispatchEvent(t,n?"rightdown":"mousedown")}const i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;const t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;const i=t.pointerType==="mouse"||t.pointerType==="pen",n=this.trackingData(e.pointerId),s=this.findMountedTarget(n.overTargets);if(n.overTargets?.length>0&&s!==t.target){const c=e.type==="mousemove"?"mouseout":"pointerout",p=this.createPointerEvent(e,c,s);if(this.dispatchEvent(p,"pointerout"),i&&this.dispatchEvent(p,"mouseout"),!t.composedPath().includes(s)){const h=this.createPointerEvent(e,"pointerleave",s);for(h.eventPhase=h.AT_TARGET;h.target&&!t.composedPath().includes(h.target);)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseleave"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(p)}if(s!==t.target){const c=e.type==="mousemove"?"mouseover":"pointerover",p=this.clonePointerEvent(t,c);this.dispatchEvent(p,"pointerover"),i&&this.dispatchEvent(p,"mouseover");let h=s?.parent;for(;h&&h!==this.rootTarget.parent&&h!==t.target;)h=h.parent;if(!h||h===this.rootTarget.parent){const d=this.clonePointerEvent(t,"pointerenter");for(d.eventPhase=d.AT_TARGET;d.target&&d.target!==s&&d.target!==this.rootTarget.parent;)d.currentTarget=d.target,this.notifyTarget(d),i&&this.notifyTarget(d,"mouseenter"),d.target=d.target.parent;this.freeEvent(d)}this.freeEvent(p)}const r=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?r.push("pointermove"):this.dispatchEvent(t,"pointermove"),a&&r.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?r.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),a&&r.push("globaltouchmove")),i&&(this.moveOnAll?r.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),a&&r.push("globalmousemove"),this.cursor=t.target?.cursor),r.length>0&&this.all(t,r),this._allInteractiveElements.length=0,this._hitElements.length=0,n.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),n=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),n&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);const s=this.clonePointerEvent(i,"pointerenter");for(s.eventPhase=s.AT_TARGET;s.target&&s.target!==this.rootTarget.parent;)s.currentTarget=s.target,this.notifyTarget(s),n&&this.notifyTarget(s,"mouseenter"),s.target=s.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(s)}mapPointerOut(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId);if(t.overTargets){const i=e.pointerType==="mouse"||e.pointerType==="pen",n=this.findMountedTarget(t.overTargets),s=this.createPointerEvent(e,"pointerout",n);this.dispatchEvent(s),i&&this.dispatchEvent(s,"mouseout");const r=this.createPointerEvent(e,"pointerleave",n);for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==this.rootTarget.parent;)r.currentTarget=r.target,this.notifyTarget(r),i&&this.notifyTarget(r,"mouseleave"),r.target=r.target.parent;t.overTargets=null,this.freeEvent(s),this.freeEvent(r)}this.cursor=null}mapPointerUp(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}const n=this.trackingData(e.pointerId),s=this.findMountedTarget(n.pressTargetsByButton[e.button]);let r=s;if(s&&!i.composedPath().includes(s)){let a=s;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){const c=i.button===2;this.notifyTarget(i,c?"rightupoutside":"mouseupoutside")}a=a.parent}delete n.pressTargetsByButton[e.button],r=a}if(r){const a=this.clonePointerEvent(i,"click");a.target=r,a.path=null,n.clicksByButton[e.button]||(n.clicksByButton[e.button]={clickCount:0,target:a.target,timeStamp:t});const c=n.clicksByButton[e.button];if(c.target===a.target&&t-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=a.target,c.timeStamp=t,a.detail=c.clickCount,a.pointerType==="mouse"){const p=a.button===2;this.dispatchEvent(a,p?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof f)){y("EventBoundary cannot map a non-pointer event as a pointer event");return}const t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),n=this.createPointerEvent(e);if(i){let s=i;for(;s;)n.currentTarget=s,this.notifyTarget(n,"pointerupoutside"),n.pointerType==="touch"?this.notifyTarget(n,"touchendoutside"):(n.pointerType==="mouse"||n.pointerType==="pen")&&this.notifyTarget(n,n.button===2?"rightupoutside":"mouseupoutside"),s=s.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(n)}mapWheel(e){if(!(e instanceof T)){y("EventBoundary cannot map a non-wheel event as a wheel event");return}const t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i<e.length&&e[i].parent===t;i++)t=e[i];return t}createPointerEvent(e,t,i){const n=this.allocateEvent(f);return this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,n.target=i??this.hitTest(n.global.x,n.global.y)??this._hitElements[0],typeof t=="string"&&(n.type=t),n}createWheelEvent(e){const t=this.allocateEvent(T);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){const i=this.allocateEvent(f);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=t??i.type,i}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof f&&t instanceof f&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof D&&t instanceof D&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);const t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");const t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}_notifyListeners(e,t){const i=e.currentTarget._events[t];if(i&&e.currentTarget.isInteractive())if("fn"in i)i.once&&e.currentTarget.removeListener(t,i.fn,void 0,!0),i.fn.call(i.context,e);else for(let n=0,s=i.length;n<s&&!e.propagationImmediatelyStopped;n++)i[n].once&&e.currentTarget.removeListener(t,i[n].fn,void 0,!0),i[n].fn.call(i[n].context,e)}}const fe=1,ge={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},L=class x{constructor(e){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=e,this.rootBoundary=new ve(null),E.init(this),this.autoPreventDefault=!0,this._eventsAdded=!1,this._rootPointerEvent=new f(null),this._rootWheelEvent=new T(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...x.defaultEventFeatures},{set:(t,i,n)=>(i==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=n),t[i]=n,!0)}),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),this._onPointerUp=this._onPointerUp.bind(this),this._onPointerOverOut=this._onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(e){const{canvas:t,resolution:i}=this.renderer;this.setTargetElement(t),this.resolution=i,x._defaultEventMode=e.eventMode??"passive",Object.assign(this.features,e.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(e){this.resolution=e}destroy(){this.setTargetElement(null),this.renderer=null,this._currentCursor=null}setCursor(e){e=e||"default";let t=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(t=!1),this._currentCursor===e)return;this._currentCursor=e;const i=this.cursorStyles[e];if(i)switch(typeof i){case"string":t&&(this.domElement.style.cursor=i);break;case"function":i(e);break;case"object":t&&Object.assign(this.domElement.style,i);break}else t&&typeof e=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,e)&&(this.domElement.style.cursor=e)}get pointer(){return this._rootPointerEvent}_onPointerDown(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this._normalizeToPointerData(e);this.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();for(let i=0,n=t.length;i<n;i++){const s=t[i],r=this._bootstrapEvent(this._rootPointerEvent,s);this.rootBoundary.mapEvent(r)}this.setCursor(this.rootBoundary.cursor)}_onPointerMove(e){if(!this.features.move)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,E.pointerMoved();const t=this._normalizeToPointerData(e);for(let i=0,n=t.length;i<n;i++){const s=this._bootstrapEvent(this._rootPointerEvent,t[i]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}_onPointerUp(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;let t=e.target;e.composedPath&&e.composedPath().length>0&&(t=e.composedPath()[0]);const i=t!==this.domElement?"outside":"",n=this._normalizeToPointerData(e);for(let s=0,r=n.length;s<r;s++){const a=this._bootstrapEvent(this._rootPointerEvent,n[s]);a.type+=i,this.rootBoundary.mapEvent(a)}this.setCursor(this.rootBoundary.cursor)}_onPointerOverOut(e){if(!this.features.click)return;this.rootBoundary.rootTarget=this.renderer.lastObjectRendered;const t=this._normalizeToPointerData(e);for(let i=0,n=t.length;i<n;i++){const s=this._bootstrapEvent(this._rootPointerEvent,t[i]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(e){if(!this.features.wheel)return;const t=this.normalizeWheelEvent(e);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(t)}setTargetElement(e){this._removeEvents(),this.domElement=e,E.domElement=e,this._addEvents()}_addEvents(){if(this._eventsAdded||!this.domElement)return;E.addTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this._onPointerMove,!0),this.domElement.addEventListener("pointerdown",this._onPointerDown,!0),this.domElement.addEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this._onPointerOverOut,!0),globalThis.addEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this._onPointerMove,!0),this.domElement.addEventListener("mousedown",this._onPointerDown,!0),this.domElement.addEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this._onPointerOverOut,!0),globalThis.addEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this._onPointerDown,!0),this.domElement.addEventListener("touchend",this._onPointerUp,!0),this.domElement.addEventListener("touchmove",this._onPointerMove,!0))),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this._eventsAdded=!0}_removeEvents(){if(!this._eventsAdded||!this.domElement)return;E.removeTickerListener();const e=this.domElement.style;e&&(globalThis.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction="")),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this._onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this._onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this._onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this._onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this._onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this._onPointerMove,!0),this.domElement.removeEventListener("mousedown",this._onPointerDown,!0),this.domElement.removeEventListener("mouseout",this._onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this._onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this._onPointerUp,!0),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this._onPointerDown,!0),this.domElement.removeEventListener("touchend",this._onPointerUp,!0),this.domElement.removeEventListener("touchmove",this._onPointerMove,!0))),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this._eventsAdded=!1}mapPositionToPoint(e,t,i){const n=this.domElement.isConnected?this.domElement.getBoundingClientRect():{x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0},s=1/this.resolution;e.x=(t-n.left)*(this.domElement.width/n.width)*s,e.y=(i-n.top)*(this.domElement.height/n.height)*s}_normalizeToPointerData(e){const t=[];if(this.supportsTouchEvents&&e instanceof TouchEvent)for(let i=0,n=e.changedTouches.length;i<n;i++){const s=e.changedTouches[i];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=e.type,t.push(s)}else if(!globalThis.MouseEvent||e instanceof MouseEvent&&(!this.supportsPointerEvents||!(e instanceof globalThis.PointerEvent))){const i=e;typeof i.isPrimary>"u"&&(i.isPrimary=!0),typeof i.width>"u"&&(i.width=1),typeof i.height>"u"&&(i.height=1),typeof i.tiltX>"u"&&(i.tiltX=0),typeof i.tiltY>"u"&&(i.tiltY=0),typeof i.pointerType>"u"&&(i.pointerType="mouse"),typeof i.pointerId>"u"&&(i.pointerId=fe),typeof i.pressure>"u"&&(i.pressure=.5),typeof i.twist>"u"&&(i.twist=0),typeof i.tangentialPressure>"u"&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(e);return t}normalizeWheelEvent(e){const t=this._rootWheelEvent;return this._transferMouseData(t,e),t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ,t.deltaMode=e.deltaMode,this.mapPositionToPoint(t.screen,e.clientX,e.clientY),t.global.copyFrom(t.screen),t.offset.copyFrom(t.screen),t.nativeEvent=e,t.type=e.type,t}_bootstrapEvent(e,t){return e.originalEvent=null,e.nativeEvent=t,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this._transferMouseData(e,t),this.mapPositionToPoint(e.screen,t.clientX,t.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.isTrusted=t.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=ge[e.type]||e.type),e}_transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.relatedTarget=null,e.shiftKey=t.shiftKey}};L.extension={name:"events",type:[w.WebGLSystem,w.CanvasSystem,w.WebGPUSystem],priority:-1};L.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};let q=L;const me={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,get interactive(){return this.eventMode==="dynamic"||this.eventMode==="static"},set interactive(o){this.eventMode=o?"static":"passive"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??q.defaultEventMode},set eventMode(o){this._internalEventMode=o},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(o,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof t=="object"?t.signal:void 0,s=typeof t=="object"?t.once===!0:!1,r=typeof e=="function"?void 0:e;o=i?`${o}capture`:o;const a=typeof e=="function"?e:e.handleEvent,c=this;n&&n.addEventListener("abort",()=>{c.off(o,a,r)}),s?c.once(o,a,r):c.on(o,a,r)},removeEventListener(o,e,t){const i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,n=typeof e=="function"?void 0:e;o=i?`${o}capture`:o,e=typeof e=="function"?e:e.handleEvent,this.off(o,e,n)},dispatchEvent(o){if(!(o instanceof M))throw new Error("Container cannot propagate events outside of the Federated Events API");return o.defaultPrevented=!1,o.path=null,o.target=this,o.manager.dispatchEvent(o),!o.defaultPrevented}};z.add(V);Z.mixin(ue);z.add(q);Z.mixin(me)});
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import{D as ft,u as K,a as dt,c as T,i as mt,k as ht,n as X,w as pt,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";let de,C,H,te,ee,Et,ne,at,re,V,L,nt,ie,St,me,oe,se,le,ae,ce,fe,ue;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{const $=Object.create(null),q=Object.create(null);V=function(o,t){let e=q[o];return e===void 0&&($[t]===void 0&&($[t]=1),q[o]=e=$[t]++),e};let M;function gt(){return(!M||M?.isContextLost())&&(M=ft.get().createCanvas().getContext("webgl",{})),M}let S;function xt(){if(!S){S="mediump";const o=gt();o&&o.getShaderPrecisionFormat&&(S=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_FLOAT).precision?"highp":"mediump")}return S}function vt(o,t,e){return t?o:e?(o=o.replace("out vec4 finalColor;",""),`
|
import{D as ft,u as K,a as dt,c as T,i as mt,k as ht,n as X,w as pt,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";let de,C,H,te,ee,Et,ne,at,re,V,L,nt,ie,St,me,oe,se,le,ae,ce,fe,ue;let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})()]).then(async()=>{const $=Object.create(null),q=Object.create(null);V=function(o,t){let e=q[o];return e===void 0&&($[t]===void 0&&($[t]=1),q[o]=e=$[t]++),e};let M;function gt(){return(!M||M?.isContextLost())&&(M=ft.get().createCanvas().getContext("webgl",{})),M}let S;function xt(){if(!S){S="mediump";const o=gt();o&&o.getShaderPrecisionFormat&&(S=o.getShaderPrecisionFormat(o.FRAGMENT_SHADER,o.HIGH_FLOAT).precision?"highp":"mediump")}return S}function vt(o,t,e){return t?o:e?(o=o.replace("out vec4 finalColor;",""),`
|
||||||
|
|
||||||
#ifdef GL_ES // This checks if it is WebGL1
|
#ifdef GL_ES // This checks if it is WebGL1
|
||||||
#define in varying
|
#define in varying
|
||||||
@@ -16,7 +16,7 @@ import{D as ft,u as K,a as dt,c as T,i as mt,k as ht,n as X,w as pt,__tla as __t
|
|||||||
`}function bt(o,t,e){const r=e?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(o.substring(0,9)!=="precision"){let n=e?t.requestedFragmentPrecision:t.requestedVertexPrecision;return n==="highp"&&r!=="highp"&&(n="mediump"),`precision ${n} float;
|
`}function bt(o,t,e){const r=e?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(o.substring(0,9)!=="precision"){let n=e?t.requestedFragmentPrecision:t.requestedVertexPrecision;return n==="highp"&&r!=="highp"&&(n="mediump"),`precision ${n} float;
|
||||||
${o}`}else if(r!=="highp"&&o.substring(0,15)==="precision highp")return o.replace("precision highp","precision mediump");return o}function Pt(o,t){return t?`#version 300 es
|
${o}`}else if(r!=="highp"&&o.substring(0,15)==="precision highp")return o.replace("precision highp","precision mediump");return o}function Pt(o,t){return t?`#version 300 es
|
||||||
${o}`:o}const yt={},_t={};function Gt(o,{name:t="pixi-program"},e=!0){t=t.replace(/\s+/g,"-"),t+=e?"-fragment":"-vertex";const r=e?yt:_t;return r[t]?(r[t]++,t+=`-${r[t]}`):r[t]=1,o.indexOf("#define SHADER_NAME")!==-1?o:`${`#define SHADER_NAME ${t}`}
|
${o}`:o}const yt={},_t={};function Gt(o,{name:t="pixi-program"},e=!0){t=t.replace(/\s+/g,"-"),t+=e?"-fragment":"-vertex";const r=e?yt:_t;return r[t]?(r[t]++,t+=`-${r[t]}`):r[t]=1,o.indexOf("#define SHADER_NAME")!==-1?o:`${`#define SHADER_NAME ${t}`}
|
||||||
${o}`}function Mt(o,t){return t?o.replace("#version 300 es",""):o}const U={stripVersion:Mt,ensurePrecision:bt,addProgramDefines:vt,setProgramName:Gt,insertVersion:Pt},A=Object.create(null),ot=class N{constructor(t){t={...N.defaultOptions,...t};const e=t.fragment.indexOf("#version 300 es")!==-1,r={stripVersion:e,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:xt()},setProgramName:{name:t.name},addProgramDefines:e,insertVersion:e};let n=t.fragment,s=t.vertex;Object.keys(U).forEach(a=>{const i=r[a];n=U[a](n,i,!0),s=U[a](s,i,!1)}),this.fragment=n,this.vertex=s,this._key=V(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(t){const e=`${t.vertex}:${t.fragment}`;return A[e]||(A[e]=new N(t)),A[e]}};ot.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};nt=ot;const Y={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};St=function(o){return Y[o]??Y.float32};const Ct={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"};function Tt({source:o,entryPoint:t}){const e={},r=o.indexOf(`fn ${t}`);if(r!==-1){const n=o.indexOf("->",r);if(n!==-1){const s=o.substring(r,n),a=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;let i;for(;(i=a.exec(s))!==null;){const u=Ct[i[3]]??"float32";e[i[2]]={location:parseInt(i[1],10),format:u,stride:St(u).stride,offset:0,instance:!1,start:0}}}}return e}function w(o){const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,e=/@group\((\d+)\)/,r=/@binding\((\d+)\)/,n=/var(<[^>]+>)? (\w+)/,s=/:\s*(\w+)/,a=/struct\s+(\w+)\s*{([^}]+)}/g,i=/(\w+)\s*:\s*([\w\<\>]+)/g,u=/struct\s+(\w+)/,f=o.match(t)?.map(l=>({group:parseInt(l.match(e)[1],10),binding:parseInt(l.match(r)[1],10),name:l.match(n)[2],isUniform:l.match(n)[1]==="<uniform>",type:l.match(s)[1]}));if(!f)return{groups:[],structs:[]};const c=o.match(a)?.map(l=>{const d=l.match(u)[1],p=l.match(i).reduce((g,x)=>{const[v,b]=x.split(":");return g[v.trim()]=b.trim(),g},{});return p?{name:d,members:p}:null}).filter(({name:l})=>f.some(d=>d.type===l))??[];return{groups:f,structs:c}}var P=(o=>(o[o.VERTEX=1]="VERTEX",o[o.FRAGMENT=2]="FRAGMENT",o[o.COMPUTE=4]="COMPUTE",o))(P||{});function $t({groups:o}){const t=[];for(let e=0;e<o.length;e++){const r=o[e];t[r.group]||(t[r.group]=[]),r.isUniform?t[r.group].push({binding:r.binding,visibility:P.VERTEX|P.FRAGMENT,buffer:{type:"uniform"}}):r.type==="sampler"?t[r.group].push({binding:r.binding,visibility:P.FRAGMENT,sampler:{type:"filtering"}}):r.type==="texture_2d"&&t[r.group].push({binding:r.binding,visibility:P.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}})}return t}function Ut({groups:o}){const t=[];for(let e=0;e<o.length;e++){const r=o[e];t[r.group]||(t[r.group]={}),t[r.group][r.name]=r.binding}return t}function At(o,t){const e=new Set,r=new Set,n=[...o.structs,...t.structs].filter(a=>e.has(a.name)?!1:(e.add(a.name),!0)),s=[...o.groups,...t.groups].filter(a=>{const i=`${a.name}-${a.binding}`;return r.has(i)?!1:(r.add(i),!0)});return{structs:n,groups:s}}const E=Object.create(null);C=class{constructor(t){this._layoutKey=0;const{fragment:e,vertex:r,layout:n,gpuLayout:s,name:a}=t;if(this.name=a,this.fragment=e,this.vertex=r,e.source===r.source){const i=w(e.source);this.structsAndGroups=i}else{const i=w(r.source),u=w(e.source);this.structsAndGroups=At(i,u)}this.layout=n??Ut(this.structsAndGroups),this.gpuLayout=s??$t(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:e}=this,r=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=V(r,"program")}get attributeData(){return this._attributeData??(this._attributeData=Tt(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){const e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return E[e]||(E[e]=new C(t)),E[e]}};function wt(o,t){switch(o){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const st=class it{constructor(t,e){this._touched=0,this.uid=K("uniform"),this._resourceType="uniformGroup",this._resourceId=K("resource"),this.isUniformGroup=!0,this._dirtyId=0,e={...it.defaultOptions,...e},this.uniformStructures=t;const r={};for(const n in t){const s=t[n];s.name=n,s.size=s.size??1,s.value??(s.value=wt(s.type,s.size)),r[n]=s.value}this.uniforms=r,this._dirtyId=1,this.ubo=e.ubo,this.isStatic=e.isStatic,this._signature=V(Object.keys(r).map(n=>`${n}-${t[n].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};st.defaultOptions={ubo:!1,isStatic:!1};Et=st;H=(o=>(o[o.WEBGL=1]="WEBGL",o[o.WEBGPU=2]="WEBGPU",o[o.BOTH=3]="BOTH",o))(H||{});at=class extends dt{constructor(t){super(),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:r,groups:n,resources:s,compatibleRenderers:a,groupMap:i}=t;this.gpuProgram=e,this.glProgram=r,a===void 0&&(a=0,e&&(a|=H.WEBGPU),r&&(a|=H.WEBGL)),this.compatibleRenderers=a;const u={};if(!s&&!n&&(s={}),s&&n)throw new Error("[Shader] Cannot have both resources and groups");if(!e&&n&&!i)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!e&&n&&i)for(const f in i)for(const c in i[f]){const l=i[f][c];u[l]={group:f,binding:c,name:l}}else if(e&&n&&!i){const f=e.structsAndGroups.groups;i={},f.forEach(c=>{i[c.group]=i[c.group]||{},i[c.group][c.binding]=c.name,u[c.name]=c})}else if(s){if(e){const f=e.structsAndGroups.groups;i={},f.forEach(c=>{i[c.group]=i[c.group]||{},i[c.group][c.binding]=c.name,u[c.name]=c})}else{i={},n={99:new T},this._ownedBindGroups.push(n[99]);let f=0;for(const c in s)u[c]={group:99,binding:f,name:c},i[99]=i[99]||{},i[99][f]=c,f++}n={};for(const f in s){const c=f;let l=s[f];!l.source&&!l._resourceType&&(l=new Et(l));const d=u[c];d&&(n[d.group]||(n[d.group]=new T,this._ownedBindGroups.push(n[d.group])),n[d.group].setResource(l,d.binding))}}this.groups=n,this._uniformBindMap=i,this.resources=this._buildResourceAccessor(n,u)}addResource(t,e,r){var n,s;(n=this._uniformBindMap)[e]||(n[e]={}),(s=this._uniformBindMap[e])[r]||(s[r]=t),this.groups[e]||(this.groups[e]=new T,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){const r={};for(const n in e){const s=e[n];Object.defineProperty(r,s.name,{get(){return t[s.group].getResource(s.binding)},set(a){t[s.group].setResource(a,s.binding)}})}return r}destroy(t=!1){this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(e=>{e.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){const{gpu:e,gl:r,...n}=t;let s,a;return e&&(s=C.from(e)),r&&(a=nt.from(r)),new at({gpuProgram:s,glProgram:a,...n})}};const Ft={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8},F=0,z=1,O=2,B=3,R=4,j=5,W=class ut{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<F)}set blend(t){!!(this.data&1<<F)!==t&&(this.data^=1<<F)}get offsets(){return!!(this.data&1<<z)}set offsets(t){!!(this.data&1<<z)!==t&&(this.data^=1<<z)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<O)}set culling(t){!!(this.data&1<<O)!==t&&(this.data^=1<<O)}get depthTest(){return!!(this.data&1<<B)}set depthTest(t){!!(this.data&1<<B)!==t&&(this.data^=1<<B)}get depthMask(){return!!(this.data&1<<j)}set depthMask(t){!!(this.data&1<<j)!==t&&(this.data^=1<<j)}get clockwiseFrontFace(){return!!(this.data&1<<R)}set clockwiseFrontFace(t){!!(this.data&1<<R)!==t&&(this.data^=1<<R)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=Ft[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ut;return t.depthTest=!1,t.blend=!0,t}};W.default2d=W.for2d();let zt;te=W;zt=0;class Ot{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,r){const n=new mt({...this.textureOptions,width:t,height:e,resolution:1,antialias:r,autoGarbageCollect:!0});return new ht({source:n,label:`texturePool_${zt++}`})}getOptimalTexture(t,e,r=1,n){let s=Math.ceil(t*r-1e-6),a=Math.ceil(e*r-1e-6);s=X(s),a=X(a);const i=(s<<17)+(a<<1)+(n?1:0);this._texturePool[i]||(this._texturePool[i]=[]);let u=this._texturePool[i].pop();return u||(u=this.createTexture(s,a,n)),u.source._resolution=r,u.source.width=s/r,u.source.height=a/r,u.source.pixelWidth=s,u.source.pixelHeight=a,u.frame.x=0,u.frame.y=0,u.frame.width=t,u.frame.height=e,u.updateUvs(),this._poolKeyHash[u.uid]=i,u}getSameSizeTexture(t,e=!1){const r=t.source;return this.getOptimalTexture(t.width,t.height,r._resolution,e)}returnTexture(t){const e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=t!==!1,t)for(const e in this._texturePool){const r=this._texturePool[e];if(r)for(let n=0;n<r.length;n++)r[n].destroy(!0)}this._texturePool={}}}ee=new Ot;function Z(o,t,e){if(o)for(const r in o){const n=r.toLocaleLowerCase(),s=t[n];if(s){let a=o[r];r==="header"&&(a=a.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),e&&s.push(`//----${e}----//`),s.push(a)}else pt(`${r} placement hook does not exist in shader`)}}const Bt=/\{\{(.*?)\}\}/g;function J(o){const t={};return(o.match(Bt)?.map(r=>r.replace(/[{()}]/g,""))??[]).forEach(r=>{t[r]=[]}),t}function Q(o,t){let e;const r=/@in\s+([^;]+);/g;for(;(e=r.exec(o))!==null;)t.push(e[1])}function tt(o,t,e=!1){const r=[];Q(t,r),o.forEach(i=>{i.header&&Q(i.header,r)});const n=r;e&&n.sort();const s=n.map((i,u)=>` @location(${u}) ${i},`).join(`
|
${o}`}function Mt(o,t){return t?o.replace("#version 300 es",""):o}const U={stripVersion:Mt,ensurePrecision:bt,addProgramDefines:vt,setProgramName:Gt,insertVersion:Pt},A=Object.create(null),ot=class N{constructor(t){t={...N.defaultOptions,...t};const e=t.fragment.indexOf("#version 300 es")!==-1,r={stripVersion:e,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:xt()},setProgramName:{name:t.name},addProgramDefines:e,insertVersion:e};let n=t.fragment,s=t.vertex;Object.keys(U).forEach(a=>{const i=r[a];n=U[a](n,i,!0),s=U[a](s,i,!1)}),this.fragment=n,this.vertex=s,this._key=V(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null}static from(t){const e=`${t.vertex}:${t.fragment}`;return A[e]||(A[e]=new N(t)),A[e]}};ot.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};nt=ot;const Y={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};St=function(o){return Y[o]??Y.float32};const Ct={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"};function Tt({source:o,entryPoint:t}){const e={},r=o.indexOf(`fn ${t}`);if(r!==-1){const n=o.indexOf("->",r);if(n!==-1){const s=o.substring(r,n),a=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|$)/g;let i;for(;(i=a.exec(s))!==null;){const u=Ct[i[3]]??"float32";e[i[2]]={location:parseInt(i[1],10),format:u,stride:St(u).stride,offset:0,instance:!1,start:0}}}}return e}function w(o){const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,e=/@group\((\d+)\)/,r=/@binding\((\d+)\)/,n=/var(<[^>]+>)? (\w+)/,s=/:\s*(\w+)/,a=/struct\s+(\w+)\s*{([^}]+)}/g,i=/(\w+)\s*:\s*([\w\<\>]+)/g,u=/struct\s+(\w+)/,f=o.match(t)?.map(l=>({group:parseInt(l.match(e)[1],10),binding:parseInt(l.match(r)[1],10),name:l.match(n)[2],isUniform:l.match(n)[1]==="<uniform>",type:l.match(s)[1]}));if(!f)return{groups:[],structs:[]};const c=o.match(a)?.map(l=>{const d=l.match(u)[1],p=l.match(i).reduce((g,x)=>{const[v,b]=x.split(":");return g[v.trim()]=b.trim(),g},{});return p?{name:d,members:p}:null}).filter(({name:l})=>f.some(d=>d.type===l))??[];return{groups:f,structs:c}}var P=(o=>(o[o.VERTEX=1]="VERTEX",o[o.FRAGMENT=2]="FRAGMENT",o[o.COMPUTE=4]="COMPUTE",o))(P||{});function $t({groups:o}){const t=[];for(let e=0;e<o.length;e++){const r=o[e];t[r.group]||(t[r.group]=[]),r.isUniform?t[r.group].push({binding:r.binding,visibility:P.VERTEX|P.FRAGMENT,buffer:{type:"uniform"}}):r.type==="sampler"?t[r.group].push({binding:r.binding,visibility:P.FRAGMENT,sampler:{type:"filtering"}}):r.type==="texture_2d"&&t[r.group].push({binding:r.binding,visibility:P.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}})}return t}function Ut({groups:o}){const t=[];for(let e=0;e<o.length;e++){const r=o[e];t[r.group]||(t[r.group]={}),t[r.group][r.name]=r.binding}return t}function At(o,t){const e=new Set,r=new Set,n=[...o.structs,...t.structs].filter(a=>e.has(a.name)?!1:(e.add(a.name),!0)),s=[...o.groups,...t.groups].filter(a=>{const i=`${a.name}-${a.binding}`;return r.has(i)?!1:(r.add(i),!0)});return{structs:n,groups:s}}const E=Object.create(null);C=class{constructor(t){this._layoutKey=0;const{fragment:e,vertex:r,layout:n,gpuLayout:s,name:a}=t;if(this.name=a,this.fragment=e,this.vertex=r,e.source===r.source){const i=w(e.source);this.structsAndGroups=i}else{const i=w(r.source),u=w(e.source);this.structsAndGroups=At(i,u)}this.layout=n??Ut(this.structsAndGroups),this.gpuLayout=s??$t(this.structsAndGroups),this.autoAssignGlobalUniforms=this.layout[0]?.globalUniforms!==void 0,this.autoAssignLocalUniforms=this.layout[1]?.localUniforms!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:e}=this,r=t.source+e.source+t.entryPoint+e.entryPoint;this._layoutKey=V(r,"program")}get attributeData(){return this._attributeData??(this._attributeData=Tt(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null}static from(t){const e=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return E[e]||(E[e]=new C(t)),E[e]}};function wt(o,t){switch(o){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const st=class it{constructor(t,e){this._touched=0,this.uid=K("uniform"),this._resourceType="uniformGroup",this._resourceId=K("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,e={...it.defaultOptions,...e},this.uniformStructures=t;const r={};for(const n in t){const s=t[n];s.name=n,s.size=s.size??1,s.value??(s.value=wt(s.type,s.size)),r[n]=s.value}this.uniforms=r,this._dirtyId=1,this.ubo=e.ubo,this.isStatic=e.isStatic,this._signature=V(Object.keys(r).map(n=>`${n}-${t[n].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};st.defaultOptions={ubo:!1,isStatic:!1};Et=st;H=(o=>(o[o.WEBGL=1]="WEBGL",o[o.WEBGPU=2]="WEBGPU",o[o.BOTH=3]="BOTH",o))(H||{});at=class extends dt{constructor(t){super(),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[];let{gpuProgram:e,glProgram:r,groups:n,resources:s,compatibleRenderers:a,groupMap:i}=t;this.gpuProgram=e,this.glProgram=r,a===void 0&&(a=0,e&&(a|=H.WEBGPU),r&&(a|=H.WEBGL)),this.compatibleRenderers=a;const u={};if(!s&&!n&&(s={}),s&&n)throw new Error("[Shader] Cannot have both resources and groups");if(!e&&n&&!i)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!e&&n&&i)for(const f in i)for(const c in i[f]){const l=i[f][c];u[l]={group:f,binding:c,name:l}}else if(e&&n&&!i){const f=e.structsAndGroups.groups;i={},f.forEach(c=>{i[c.group]=i[c.group]||{},i[c.group][c.binding]=c.name,u[c.name]=c})}else if(s){if(e){const f=e.structsAndGroups.groups;i={},f.forEach(c=>{i[c.group]=i[c.group]||{},i[c.group][c.binding]=c.name,u[c.name]=c})}else{i={},n={99:new T},this._ownedBindGroups.push(n[99]);let f=0;for(const c in s)u[c]={group:99,binding:f,name:c},i[99]=i[99]||{},i[99][f]=c,f++}n={};for(const f in s){const c=f;let l=s[f];!l.source&&!l._resourceType&&(l=new Et(l));const d=u[c];d&&(n[d.group]||(n[d.group]=new T,this._ownedBindGroups.push(n[d.group])),n[d.group].setResource(l,d.binding))}}this.groups=n,this._uniformBindMap=i,this.resources=this._buildResourceAccessor(n,u)}addResource(t,e,r){var n,s;(n=this._uniformBindMap)[e]||(n[e]={}),(s=this._uniformBindMap[e])[r]||(s[r]=t),this.groups[e]||(this.groups[e]=new T,this._ownedBindGroups.push(this.groups[e]))}_buildResourceAccessor(t,e){const r={};for(const n in e){const s=e[n];Object.defineProperty(r,s.name,{get(){return t[s.group].getResource(s.binding)},set(a){t[s.group].setResource(a,s.binding)}})}return r}destroy(t=!1){this.emit("destroy",this),t&&(this.gpuProgram?.destroy(),this.glProgram?.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(e=>{e.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null}static from(t){const{gpu:e,gl:r,...n}=t;let s,a;return e&&(s=C.from(e)),r&&(a=nt.from(r)),new at({gpuProgram:s,glProgram:a,...n})}};const Ft={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8},F=0,z=1,O=2,B=3,R=4,j=5,W=class ut{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<F)}set blend(t){!!(this.data&1<<F)!==t&&(this.data^=1<<F)}get offsets(){return!!(this.data&1<<z)}set offsets(t){!!(this.data&1<<z)!==t&&(this.data^=1<<z)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<O)}set culling(t){!!(this.data&1<<O)!==t&&(this.data^=1<<O)}get depthTest(){return!!(this.data&1<<B)}set depthTest(t){!!(this.data&1<<B)!==t&&(this.data^=1<<B)}get depthMask(){return!!(this.data&1<<j)}set depthMask(t){!!(this.data&1<<j)!==t&&(this.data^=1<<j)}get clockwiseFrontFace(){return!!(this.data&1<<R)}set clockwiseFrontFace(t){!!(this.data&1<<R)!==t&&(this.data^=1<<R)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=Ft[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ut;return t.depthTest=!1,t.blend=!0,t}};W.default2d=W.for2d();let zt;te=W;zt=0;class Ot{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1}createTexture(t,e,r){const n=new mt({...this.textureOptions,width:t,height:e,resolution:1,antialias:r,autoGarbageCollect:!0});return new ht({source:n,label:`texturePool_${zt++}`})}getOptimalTexture(t,e,r=1,n){let s=Math.ceil(t*r-1e-6),a=Math.ceil(e*r-1e-6);s=X(s),a=X(a);const i=(s<<17)+(a<<1)+(n?1:0);this._texturePool[i]||(this._texturePool[i]=[]);let u=this._texturePool[i].pop();return u||(u=this.createTexture(s,a,n)),u.source._resolution=r,u.source.width=s/r,u.source.height=a/r,u.source.pixelWidth=s,u.source.pixelHeight=a,u.frame.x=0,u.frame.y=0,u.frame.width=t,u.frame.height=e,u.updateUvs(),this._poolKeyHash[u.uid]=i,u}getSameSizeTexture(t,e=!1){const r=t.source;return this.getOptimalTexture(t.width,t.height,r._resolution,e)}returnTexture(t){const e=this._poolKeyHash[t.uid];this._texturePool[e].push(t)}clear(t){if(t=t!==!1,t)for(const e in this._texturePool){const r=this._texturePool[e];if(r)for(let n=0;n<r.length;n++)r[n].destroy(!0)}this._texturePool={}}}ee=new Ot;function Z(o,t,e){if(o)for(const r in o){const n=r.toLocaleLowerCase(),s=t[n];if(s){let a=o[r];r==="header"&&(a=a.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),e&&s.push(`//----${e}----//`),s.push(a)}else pt(`${r} placement hook does not exist in shader`)}}const Bt=/\{\{(.*?)\}\}/g;function J(o){const t={};return(o.match(Bt)?.map(r=>r.replace(/[{()}]/g,""))??[]).forEach(r=>{t[r]=[]}),t}function Q(o,t){let e;const r=/@in\s+([^;]+);/g;for(;(e=r.exec(o))!==null;)t.push(e[1])}function tt(o,t,e=!1){const r=[];Q(t,r),o.forEach(i=>{i.header&&Q(i.header,r)});const n=r;e&&n.sort();const s=n.map((i,u)=>` @location(${u}) ${i},`).join(`
|
||||||
`);let a=t.replace(/@in\s+[^;]+;\s*/g,"");return a=a.replace("{{in}}",`
|
`);let a=t.replace(/@in\s+[^;]+;\s*/g,"");return a=a.replace("{{in}}",`
|
||||||
${s}
|
${s}
|
||||||
`),a}function et(o,t){let e;const r=/@out\s+([^;]+);/g;for(;(e=r.exec(o))!==null;)t.push(e[1])}function Rt(o){const e=/\b(\w+)\s*:/g.exec(o);return e?e[1]:""}function jt(o){const t=/@.*?\s+/g;return o.replace(t,"")}function It(o,t){const e=[];et(t,e),o.forEach(u=>{u.header&&et(u.header,e)});let r=0;const n=e.sort().map(u=>u.indexOf("builtin")>-1?u:`@location(${r++}) ${u}`).join(`,
|
`),a}function et(o,t){let e;const r=/@out\s+([^;]+);/g;for(;(e=r.exec(o))!==null;)t.push(e[1])}function Rt(o){const e=/\b(\w+)\s*:/g.exec(o);return e?e[1]:""}function jt(o){const t=/@.*?\s+/g;return o.replace(t,"")}function It(o,t){const e=[];et(t,e),o.forEach(u=>{u.header&&et(u.header,e)});let r=0;const n=e.sort().map(u=>u.indexOf("builtin")>-1?u:`@location(${r++}) ${u}`).join(`,
|
||||||
@@ -217,12 +217,12 @@ ${n.join(`
|
|||||||
`}}),k[o]};ue={name:"round-pixels-bit",vertex:{header:`
|
`}}),k[o]};ue={name:"round-pixels-bit",vertex:{header:`
|
||||||
fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
|
fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
|
||||||
{
|
{
|
||||||
return (floor((position * 0.5 + 0.5) * targetSize) / targetSize) * 2.0 - 1.0;
|
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
||||||
}
|
}
|
||||||
`}};ce={name:"round-pixels-bit",vertex:{header:`
|
`}};ce={name:"round-pixels-bit",vertex:{header:`
|
||||||
vec2 roundPixels(vec2 position, vec2 targetSize)
|
vec2 roundPixels(vec2 position, vec2 targetSize)
|
||||||
{
|
{
|
||||||
return (floor((position * 0.5 + 0.5) * targetSize) / targetSize) * 2.0 - 1.0;
|
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
||||||
}
|
}
|
||||||
`}};L={name:"local-uniform-bit",vertex:{header:`
|
`}};L={name:"local-uniform-bit",vertex:{header:`
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
748
qbit/vuetorrent/public/assets/index-CfNDsQKB.js
Normal file
748
qbit/vuetorrent/public/assets/index-CfNDsQKB.js
Normal file
File diff suppressed because one or more lines are too long
5
qbit/vuetorrent/public/assets/index-DG91Wfig.css
Normal file
5
qbit/vuetorrent/public/assets/index-DG91Wfig.css
Normal file
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{B as g,D as B}from"./vue-BSryv7ps.js";var F="Expected a function",S=NaN,M="[object Symbol]",N=/^\s+|\s+$/g,W=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,D=/^0o[0-7]+$/i,R=parseInt,_=typeof g=="object"&&g&&g.Object===Object&&g,G=typeof self=="object"&&self&&self.Object===Object&&self,P=_||G||Function("return this")(),H=Object.prototype,U=H.toString,X=Math.max,q=Math.min,T=function(){return P.Date.now()};function z(e,t,i){var a,s,l,c,r,f,u=0,x=!1,d=!1,y=!0;if(typeof e!="function")throw new TypeError(F);t=E(t)||0,v(i)&&(x=!!i.leading,d="maxWait"in i,l=d?X(E(i.maxWait)||0,t):l,y="trailing"in i?!!i.trailing:y);function p(n){var o=a,m=s;return a=s=void 0,u=n,c=e.apply(m,o),c}function k(n){return u=n,r=setTimeout(b,t),x?p(n):c}function C(n){var o=n-f,m=n-u,h=t-o;return d?q(h,l-m):h}function I(n){var o=n-f,m=n-u;return f===void 0||o>=t||o<0||d&&m>=l}function b(){var n=T();if(I(n))return O(n);r=setTimeout(b,C(n))}function O(n){return r=void 0,y&&a?p(n):(a=s=void 0,c)}function L(){r!==void 0&&clearTimeout(r),u=0,a=f=s=r=void 0}function $(){return r===void 0?c:O(T())}function j(){var n=T(),o=I(n);if(a=arguments,s=this,f=n,o){if(r===void 0)return k(f);if(d)return r=setTimeout(b,t),p(f)}return r===void 0&&(r=setTimeout(b,t)),c}return j.cancel=L,j.flush=$,j}function v(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function J(e){return!!e&&typeof e=="object"}function K(e){return typeof e=="symbol"||J(e)&&U.call(e)==M}function E(e){if(typeof e=="number")return e;if(K(e))return S;if(v(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=v(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(N,"");var i=A.test(e);return i||D.test(e)?R(e.slice(2),i?2:8):W.test(e)?S:+e}var Q=z;const Y=B(Q);export{Y as d};
|
import{B as g,D as B}from"./vue--7UcA1iU.js";var F="Expected a function",S=NaN,M="[object Symbol]",N=/^\s+|\s+$/g,W=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,D=/^0o[0-7]+$/i,R=parseInt,_=typeof g=="object"&&g&&g.Object===Object&&g,G=typeof self=="object"&&self&&self.Object===Object&&self,P=_||G||Function("return this")(),H=Object.prototype,U=H.toString,X=Math.max,q=Math.min,T=function(){return P.Date.now()};function z(e,t,i){var a,s,l,c,r,f,u=0,x=!1,d=!1,y=!0;if(typeof e!="function")throw new TypeError(F);t=E(t)||0,v(i)&&(x=!!i.leading,d="maxWait"in i,l=d?X(E(i.maxWait)||0,t):l,y="trailing"in i?!!i.trailing:y);function p(n){var o=a,m=s;return a=s=void 0,u=n,c=e.apply(m,o),c}function k(n){return u=n,r=setTimeout(b,t),x?p(n):c}function C(n){var o=n-f,m=n-u,h=t-o;return d?q(h,l-m):h}function I(n){var o=n-f,m=n-u;return f===void 0||o>=t||o<0||d&&m>=l}function b(){var n=T();if(I(n))return O(n);r=setTimeout(b,C(n))}function O(n){return r=void 0,y&&a?p(n):(a=s=void 0,c)}function L(){r!==void 0&&clearTimeout(r),u=0,a=f=s=r=void 0}function $(){return r===void 0?c:O(T())}function j(){var n=T(),o=I(n);if(a=arguments,s=this,f=n,o){if(r===void 0)return k(f);if(d)return r=setTimeout(b,t),p(f)}return r===void 0&&(r=setTimeout(b,t)),c}return j.cancel=L,j.flush=$,j}function v(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function J(e){return!!e&&typeof e=="object"}function K(e){return typeof e=="symbol"||J(e)&&U.call(e)==M}function E(e){if(typeof e=="number")return e;if(K(e))return S;if(v(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=v(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(N,"");var i=A.test(e);return i||D.test(e)?R(e.slice(2),i?2:8):W.test(e)?S:+e}var Q=z;const Y=B(Q);export{Y as d};
|
||||||
File diff suppressed because one or more lines are too long
56
qbit/vuetorrent/public/assets/vue--7UcA1iU.js
Normal file
56
qbit/vuetorrent/public/assets/vue--7UcA1iU.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
|||||||
import{w as B,o as Kt,e as _t,F as lt,i as Zt,C as Xt,r as F,c as h,a as de,t as ft,b as dt,u as G,d as T,f as M,p as Z,s as I,g as Qt,h as Jt,j as mt,k as qt,l as en,m as E,n as tn,q as gt,v as nn,x as rn,y as on,z as sn,A as an}from"./vue-BSryv7ps.js";function un(e,t){let n;function r(){n=_t(),n.run(()=>t.length?t(()=>{n?.stop(),r()}):t())}B(e,o=>{o&&!n?r():o||(n?.stop(),n=void 0)},{immediate:!0}),Kt(()=>{n?.stop()})}const D=typeof window<"u",co=D&&"IntersectionObserver"in window,cn=D&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),lo=D&&"EyeDropper"in window;function $e(e,t,n){ln(e,t),t.set(e,n)}function ln(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fn(e,t,n){var r=ht(e,t,"set");return dn(e,r,n),n}function dn(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function R(e,t){var n=ht(e,t,"get");return mn(e,n)}function ht(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function mn(e,t){return t.get?t.get.call(e):t.value}function pt(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let o=0;o<r;o++){if(e==null)return n;e=e[t[o]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function gn(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>gn(e[r],t[r]))}function be(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),pt(e,t.split("."),n))}function fo(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const o=t(e,n);return typeof o>"u"?n:o}if(typeof t=="string")return be(e,t,n);if(Array.isArray(t))return pt(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function yt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function te(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(e==null||e===""))return isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}function Re(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Le(e){if(e&&"$el"in e){const t=e.$el;return t?.nodeType===Node.TEXT_NODE?t.nextElementSibling:t}return e}const mo=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),go=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function ho(e){return Object.keys(e)}function ye(e,t){return t.every(n=>e.hasOwnProperty(n))}function hn(e,t){const n={},r=new Set(Object.keys(e));for(const o of t)r.has(o)&&(n[o]=e[o]);return n}function Ne(e,t,n){const r=Object.create(null),o=Object.create(null);for(const s in e)t.some(a=>a instanceof RegExp?a.test(s):a===s)&&!n?.some(a=>a===s)?r[s]=e[s]:o[s]=e[s];return[r,o]}function pn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}function po(e,t){const n={};return t.forEach(r=>n[r]=e[r]),n}const vt=/^on[^a-z]/,Ae=e=>vt.test(e),yn=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],vn=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function yo(e){return e.isComposing&&vn.includes(e.key)}function vo(e){const[t,n]=Ne(e,[vt]),r=pn(t,yn),[o,s]=Ne(n,["class","style","id",/^data-/]);return Object.assign(o,t),Object.assign(s,r),[o,s]}function bo(e){return e==null?[]:Array.isArray(e)?e:[e]}function wo(e,t){let n=0;const r=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];clearTimeout(n),n=setTimeout(()=>e(...s),G(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function bn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function Do(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function He(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function wn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function So(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function x(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const o in e)r[o]=e[o];for(const o in t){const s=e[o],a=t[o];if(Re(s)&&Re(a)){r[o]=x(s,a,n);continue}if(Array.isArray(s)&&Array.isArray(a)&&n){r[o]=n(s,a);continue}r[o]=a}return r}function Dn(e){return e.map(t=>t.type===lt?Dn(t.children):t).flat()}function N(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(N.cache.has(e))return N.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return N.cache.set(e,t),t}N.cache=new Map;function ae(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>ae(e,n)).flat(1);if(Array.isArray(t.children))return t.children.map(n=>ae(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return ae(e,t.component.subTree).flat(1)}return[]}var ne=new WeakMap,j=new WeakMap;class xo{constructor(t){$e(this,ne,{writable:!0,value:[]}),$e(this,j,{writable:!0,value:0}),this.size=t}push(t){R(this,ne)[R(this,j)]=t,fn(this,j,(R(this,j)+1)%this.size)}values(){return R(this,ne).slice(R(this,j)).concat(R(this,ne).slice(0,R(this,j)))}}function Co(e){return"touches"in e?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}function Mo(e){const t=F({}),n=h(e);return de(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),ft(t)}function we(e,t){return e.includes(t)}function bt(e){return e[2].toLowerCase()+e.slice(3)}const Ao=()=>[Function,Array];function To(e,t){return t="on"+dt(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Oo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const o of e)o(...n);else typeof e=="function"&&e(...n)}function Sn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function xn(e,t,n){let r,o=e.indexOf(document.activeElement);const s=t==="next"?1:-1;do o+=s,r=e[o];while((!r||r.offsetParent==null||!(n?.(r)??!0))&&o<e.length&&o>=0);return r}function Cn(e,t){const n=Sn(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&n[0]?.focus();else if(t==="first")n[0]?.focus();else if(t==="last")n.at(-1)?.focus();else if(typeof t=="number")n[t]?.focus();else{const r=xn(n,t);r?r.focus():Cn(e,t==="next"?"first":"last")}}function Fo(e){return e==null||typeof e=="string"&&e.trim()===""}function Eo(){}function ko(e,t){if(!(D&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function Mn(e){return e.some(t=>Zt(t)?t.type===Xt?!1:t.type!==lt||Mn(t.children):!0)?e:null}function Po(e,t){if(!D||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function Io(e,t){const n=e.clientX,r=e.clientY,o=t.getBoundingClientRect(),s=o.left,a=o.top,i=o.right,u=o.bottom;return n>=s&&n<=i&&r>=a&&r<=u}const wt=["top","bottom"],An=["start","end","left","right"];function $o(e,t){let[n,r]=e.split(" ");return r||(r=we(wt,n)?"start":we(An,n)?"top":"center"),{side:Ve(n,t),align:Ve(r,t)}}function Ve(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function Ro(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function Lo(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function No(e){return{side:e.align,align:e.side}}function Bo(e){return we(wt,e.side)?"y":"x"}class ie{constructor(t){let{x:n,y:r,width:o,height:s}=t;this.x=n,this.y=r,this.width=o,this.height=s}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function Ho(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function Vo(e){return Array.isArray(e)?new ie({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function Yo(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let o,s,a,i,u;if(r.startsWith("matrix3d("))o=r.slice(9,-1).split(/, /),s=+o[0],a=+o[5],i=+o[12],u=+o[13];else if(r.startsWith("matrix("))o=r.slice(7,-1).split(/, /),s=+o[0],a=+o[3],i=+o[4],u=+o[5];else return new ie(t);const c=n.transformOrigin,f=t.x-i-(1-s)*parseFloat(c),l=t.y-u-(1-a)*parseFloat(c.slice(c.indexOf(" ")+1)),m=s?t.width/s:e.offsetWidth+1,p=a?t.height/a:e.offsetHeight+1;return new ie({x:f,y:l,width:m,height:p})}else return new ie(t)}function Wo(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(o=>{r.onfinish=()=>{o(r)}})),r}const ue=new WeakMap;function jo(e,t){Object.keys(t).forEach(n=>{if(Ae(n)){const r=bt(n),o=ue.get(e);if(t[n]==null)o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))});else if(!o||![...o].some(s=>s[0]===r&&s[1]===t[n])){e.addEventListener(r,t[n]);const s=o||new Set;s.add([r,t[n]]),ue.has(e)||ue.set(e,s)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function zo(e,t){Object.keys(t).forEach(n=>{if(Ae(n)){const r=bt(n),o=ue.get(e);o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))})}else e.removeAttribute(n)})}const z=2.4,Ye=.2126729,We=.7151522,je=.072175,Tn=.55,On=.58,Fn=.57,En=.62,re=.03,ze=1.45,kn=5e-4,Pn=1.25,In=1.25,Ue=.078,Ge=12.82051282051282,oe=.06,Ke=.001;function _e(e,t){const n=(e.r/255)**z,r=(e.g/255)**z,o=(e.b/255)**z,s=(t.r/255)**z,a=(t.g/255)**z,i=(t.b/255)**z;let u=n*Ye+r*We+o*je,c=s*Ye+a*We+i*je;if(u<=re&&(u+=(re-u)**ze),c<=re&&(c+=(re-c)**ze),Math.abs(c-u)<kn)return 0;let f;if(c>u){const l=(c**Tn-u**On)*Pn;f=l<Ke?0:l<Ue?l-l*Ge*oe:l-oe}else{const l=(c**En-u**Fn)*In;f=l>-Ke?0:l>-Ue?l-l*Ge*oe:l+oe}return f*100}function Uo(e){}function Go(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const le=.20689655172413793,$n=e=>e>le**3?Math.cbrt(e):e/(3*le**2)+4/29,Rn=e=>e>le?e**3:3*le**2*(e-4/29);function Dt(e){const t=$n,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function St(e){const t=Rn,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const Ln=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Nn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,Bn=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],Hn=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function xt(e){const t=Array(3),n=Nn,r=Ln;for(let o=0;o<3;++o)t[o]=Math.round(bn(n(r[o][0]*e[0]+r[o][1]*e[1]+r[o][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Te(e){let{r:t,g:n,b:r}=e;const o=[0,0,0],s=Hn,a=Bn;t=s(t/255),n=s(n/255),r=s(r/255);for(let i=0;i<3;++i)o[i]=a[i][0]*t+a[i][1]*n+a[i][2]*r;return o}function Vn(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function Ko(e){return Vn(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Ze=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,Yn={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>Xe({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>Xe({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>H({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>H({h:e,s:t,v:n,a:r})};function k(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Ze.test(e)){const{groups:t}=e.match(Ze),{fn:n,values:r}=t,o=r.split(/,\s*/).map(s=>s.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(s)/100:parseFloat(s));return Yn[n](...o)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),At(t)}else if(typeof e=="object"){if(ye(e,["r","g","b"]))return e;if(ye(e,["h","s","l"]))return H(Ct(e));if(ye(e,["h","s","v"]))return H(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
import{w as B,o as Kt,e as _t,F as lt,i as Zt,C as Xt,r as F,c as h,a as de,t as ft,b as dt,u as G,d as T,f as M,p as Z,s as I,g as Qt,h as Jt,j as mt,k as qt,l as en,m as E,n as tn,q as gt,v as nn,x as rn,y as on,z as sn,A as an}from"./vue--7UcA1iU.js";function un(e,t){let n;function r(){n=_t(),n.run(()=>t.length?t(()=>{n?.stop(),r()}):t())}B(e,o=>{o&&!n?r():o||(n?.stop(),n=void 0)},{immediate:!0}),Kt(()=>{n?.stop()})}const D=typeof window<"u",fo=D&&"IntersectionObserver"in window,cn=D&&("ontouchstart"in window||window.navigator.maxTouchPoints>0),mo=D&&"EyeDropper"in window;function $e(e,t,n){ln(e,t),t.set(e,n)}function ln(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fn(e,t,n){var r=ht(e,t,"set");return dn(e,r,n),n}function dn(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function R(e,t){var n=ht(e,t,"get");return mn(e,n)}function ht(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function mn(e,t){return t.get?t.get.call(e):t.value}function pt(e,t,n){const r=t.length-1;if(r<0)return e===void 0?n:e;for(let o=0;o<r;o++){if(e==null)return n;e=e[t[o]]}return e==null||e[t[r]]===void 0?n:e[t[r]]}function gn(e,t){if(e===t)return!0;if(e instanceof Date&&t instanceof Date&&e.getTime()!==t.getTime()||e!==Object(e)||t!==Object(t))return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>gn(e[r],t[r]))}function be(e,t,n){return e==null||!t||typeof t!="string"?n:e[t]!==void 0?e[t]:(t=t.replace(/\[(\w+)\]/g,".$1"),t=t.replace(/^\./,""),pt(e,t.split("."),n))}function go(e,t,n){if(t===!0)return e===void 0?n:e;if(t==null||typeof t=="boolean")return n;if(e!==Object(e)){if(typeof t!="function")return n;const o=t(e,n);return typeof o>"u"?n:o}if(typeof t=="string")return be(e,t,n);if(Array.isArray(t))return pt(e,t,n);if(typeof t!="function")return n;const r=t(e,n);return typeof r>"u"?n:r}function yt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.from({length:e},(n,r)=>t+r)}function te(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"px";if(!(e==null||e===""))return isNaN(+e)?String(e):isFinite(+e)?`${Number(e)}${t}`:void 0}function Re(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Le(e){if(e&&"$el"in e){const t=e.$el;return t?.nodeType===Node.TEXT_NODE?t.nextElementSibling:t}return e}const ho=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16}),po=Object.freeze({enter:"Enter",tab:"Tab",delete:"Delete",esc:"Escape",space:"Space",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",end:"End",home:"Home",del:"Delete",backspace:"Backspace",insert:"Insert",pageup:"PageUp",pagedown:"PageDown",shift:"Shift"});function yo(e){return Object.keys(e)}function ye(e,t){return t.every(n=>e.hasOwnProperty(n))}function hn(e,t){const n={},r=new Set(Object.keys(e));for(const o of t)r.has(o)&&(n[o]=e[o]);return n}function Ne(e,t,n){const r=Object.create(null),o=Object.create(null);for(const s in e)t.some(a=>a instanceof RegExp?a.test(s):a===s)&&!n?.some(a=>a===s)?r[s]=e[s]:o[s]=e[s];return[r,o]}function pn(e,t){const n={...e};return t.forEach(r=>delete n[r]),n}function vo(e,t){const n={};return t.forEach(r=>n[r]=e[r]),n}const vt=/^on[^a-z]/,Ae=e=>vt.test(e),yn=["onAfterscriptexecute","onAnimationcancel","onAnimationend","onAnimationiteration","onAnimationstart","onAuxclick","onBeforeinput","onBeforescriptexecute","onChange","onClick","onCompositionend","onCompositionstart","onCompositionupdate","onContextmenu","onCopy","onCut","onDblclick","onFocusin","onFocusout","onFullscreenchange","onFullscreenerror","onGesturechange","onGestureend","onGesturestart","onGotpointercapture","onInput","onKeydown","onKeypress","onKeyup","onLostpointercapture","onMousedown","onMousemove","onMouseout","onMouseover","onMouseup","onMousewheel","onPaste","onPointercancel","onPointerdown","onPointerenter","onPointerleave","onPointermove","onPointerout","onPointerover","onPointerup","onReset","onSelect","onSubmit","onTouchcancel","onTouchend","onTouchmove","onTouchstart","onTransitioncancel","onTransitionend","onTransitionrun","onTransitionstart","onWheel"],vn=["ArrowUp","ArrowDown","ArrowRight","ArrowLeft","Enter","Escape","Tab"," "];function bo(e){return e.isComposing&&vn.includes(e.key)}function wo(e){const[t,n]=Ne(e,[vt]),r=pn(t,yn),[o,s]=Ne(n,["class","style","id",/^data-/]);return Object.assign(o,t),Object.assign(s,r),[o,s]}function Do(e){return e==null?[]:Array.isArray(e)?e:[e]}function So(e,t){let n=0;const r=function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];clearTimeout(n),n=setTimeout(()=>e(...s),G(t))};return r.clear=()=>{clearTimeout(n)},r.immediate=e,r}function bn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return Math.max(t,Math.min(n,e))}function xo(e){const t=e.toString().trim();return t.includes(".")?t.length-t.indexOf(".")-1:0}function Be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0";return e+n.repeat(Math.max(0,t-e.length))}function He(e,t){return(arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0").repeat(Math.max(0,t-e.length))+e}function wn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}function Co(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e3;if(e<t)return`${e} B`;const n=t===1024?["Ki","Mi","Gi"]:["k","M","G"];let r=-1;for(;Math.abs(e)>=t&&r<n.length-1;)e/=t,++r;return`${e.toFixed(1)} ${n[r]}B`}function x(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r={};for(const o in e)r[o]=e[o];for(const o in t){const s=e[o],a=t[o];if(Re(s)&&Re(a)){r[o]=x(s,a,n);continue}if(Array.isArray(s)&&Array.isArray(a)&&n){r[o]=n(s,a);continue}r[o]=a}return r}function Dn(e){return e.map(t=>t.type===lt?Dn(t.children):t).flat()}function N(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(N.cache.has(e))return N.cache.get(e);const t=e.replace(/[^a-z]/gi,"-").replace(/\B([A-Z])/g,"-$1").toLowerCase();return N.cache.set(e,t),t}N.cache=new Map;function ae(e,t){if(!t||typeof t!="object")return[];if(Array.isArray(t))return t.map(n=>ae(e,n)).flat(1);if(Array.isArray(t.children))return t.children.map(n=>ae(e,n)).flat(1);if(t.component){if(Object.getOwnPropertySymbols(t.component.provides).includes(e))return[t.component];if(t.component.subTree)return ae(e,t.component.subTree).flat(1)}return[]}var ne=new WeakMap,j=new WeakMap;class Mo{constructor(t){$e(this,ne,{writable:!0,value:[]}),$e(this,j,{writable:!0,value:0}),this.size=t}push(t){R(this,ne)[R(this,j)]=t,fn(this,j,(R(this,j)+1)%this.size)}values(){return R(this,ne).slice(R(this,j)).concat(R(this,ne).slice(0,R(this,j)))}}function Ao(e){return"touches"in e?{clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}:{clientX:e.clientX,clientY:e.clientY}}function To(e){const t=F({}),n=h(e);return de(()=>{for(const r in n.value)t[r]=n.value[r]},{flush:"sync"}),ft(t)}function we(e,t){return e.includes(t)}function bt(e){return e[2].toLowerCase()+e.slice(3)}const Oo=()=>[Function,Array];function Fo(e,t){return t="on"+dt(t),!!(e[t]||e[`${t}Once`]||e[`${t}Capture`]||e[`${t}OnceCapture`]||e[`${t}CaptureOnce`])}function Eo(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(Array.isArray(e))for(const o of e)o(...n);else typeof e=="function"&&e(...n)}function Sn(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=["button","[href]",'input:not([type="hidden"])',"select","textarea","[tabindex]"].map(r=>`${r}${t?':not([tabindex="-1"])':""}:not([disabled])`).join(", ");return[...e.querySelectorAll(n)]}function xn(e,t,n){let r,o=e.indexOf(document.activeElement);const s=t==="next"?1:-1;do o+=s,r=e[o];while((!r||r.offsetParent==null||!(n?.(r)??!0))&&o<e.length&&o>=0);return r}function Cn(e,t){const n=Sn(e);if(!t)(e===document.activeElement||!e.contains(document.activeElement))&&n[0]?.focus();else if(t==="first")n[0]?.focus();else if(t==="last")n.at(-1)?.focus();else if(typeof t=="number")n[t]?.focus();else{const r=xn(n,t);r?r.focus():Cn(e,t==="next"?"first":"last")}}function ko(e){return e==null||typeof e=="string"&&e.trim()===""}function Po(){}function Io(e,t){if(!(D&&typeof CSS<"u"&&typeof CSS.supports<"u"&&CSS.supports(`selector(${t})`)))return null;try{return!!e&&e.matches(t)}catch{return null}}function Mn(e){return e.some(t=>Zt(t)?t.type===Xt?!1:t.type!==lt||Mn(t.children):!0)?e:null}function $o(e,t){if(!D||e===0)return t(),()=>{};const n=window.setTimeout(t,e);return()=>window.clearTimeout(n)}function Ro(e,t){const n=e.clientX,r=e.clientY,o=t.getBoundingClientRect(),s=o.left,a=o.top,i=o.right,u=o.bottom;return n>=s&&n<=i&&r>=a&&r<=u}const wt=["top","bottom"],An=["start","end","left","right"];function Lo(e,t){let[n,r]=e.split(" ");return r||(r=we(wt,n)?"start":we(An,n)?"top":"center"),{side:Ve(n,t),align:Ve(r,t)}}function Ve(e,t){return e==="start"?t?"right":"left":e==="end"?t?"left":"right":e}function No(e){return{side:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.side],align:e.align}}function Bo(e){return{side:e.side,align:{center:"center",top:"bottom",bottom:"top",left:"right",right:"left"}[e.align]}}function Ho(e){return{side:e.align,align:e.side}}function Vo(e){return we(wt,e.side)?"y":"x"}class ie{constructor(t){let{x:n,y:r,width:o,height:s}=t;this.x=n,this.y=r,this.width=o,this.height=s}get top(){return this.y}get bottom(){return this.y+this.height}get left(){return this.x}get right(){return this.x+this.width}}function Yo(e,t){return{x:{before:Math.max(0,t.left-e.left),after:Math.max(0,e.right-t.right)},y:{before:Math.max(0,t.top-e.top),after:Math.max(0,e.bottom-t.bottom)}}}function Wo(e){return Array.isArray(e)?new ie({x:e[0],y:e[1],width:0,height:0}):e.getBoundingClientRect()}function jo(e){const t=e.getBoundingClientRect(),n=getComputedStyle(e),r=n.transform;if(r){let o,s,a,i,u;if(r.startsWith("matrix3d("))o=r.slice(9,-1).split(/, /),s=+o[0],a=+o[5],i=+o[12],u=+o[13];else if(r.startsWith("matrix("))o=r.slice(7,-1).split(/, /),s=+o[0],a=+o[3],i=+o[4],u=+o[5];else return new ie(t);const c=n.transformOrigin,f=t.x-i-(1-s)*parseFloat(c),l=t.y-u-(1-a)*parseFloat(c.slice(c.indexOf(" ")+1)),m=s?t.width/s:e.offsetWidth+1,p=a?t.height/a:e.offsetHeight+1;return new ie({x:f,y:l,width:m,height:p})}else return new ie(t)}function zo(e,t,n){if(typeof e.animate>"u")return{finished:Promise.resolve()};let r;try{r=e.animate(t,n)}catch{return{finished:Promise.resolve()}}return typeof r.finished>"u"&&(r.finished=new Promise(o=>{r.onfinish=()=>{o(r)}})),r}const ue=new WeakMap;function Uo(e,t){Object.keys(t).forEach(n=>{if(Ae(n)){const r=bt(n),o=ue.get(e);if(t[n]==null)o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))});else if(!o||![...o].some(s=>s[0]===r&&s[1]===t[n])){e.addEventListener(r,t[n]);const s=o||new Set;s.add([r,t[n]]),ue.has(e)||ue.set(e,s)}}else t[n]==null?e.removeAttribute(n):e.setAttribute(n,t[n])})}function Go(e,t){Object.keys(t).forEach(n=>{if(Ae(n)){const r=bt(n),o=ue.get(e);o?.forEach(s=>{const[a,i]=s;a===r&&(e.removeEventListener(r,i),o.delete(s))})}else e.removeAttribute(n)})}const z=2.4,Ye=.2126729,We=.7151522,je=.072175,Tn=.55,On=.58,Fn=.57,En=.62,re=.03,ze=1.45,kn=5e-4,Pn=1.25,In=1.25,Ue=.078,Ge=12.82051282051282,oe=.06,Ke=.001;function _e(e,t){const n=(e.r/255)**z,r=(e.g/255)**z,o=(e.b/255)**z,s=(t.r/255)**z,a=(t.g/255)**z,i=(t.b/255)**z;let u=n*Ye+r*We+o*je,c=s*Ye+a*We+i*je;if(u<=re&&(u+=(re-u)**ze),c<=re&&(c+=(re-c)**ze),Math.abs(c-u)<kn)return 0;let f;if(c>u){const l=(c**Tn-u**On)*Pn;f=l<Ke?0:l<Ue?l-l*Ge*oe:l-oe}else{const l=(c**En-u**Fn)*In;f=l>-Ke?0:l>-Ue?l-l*Ge*oe:l+oe}return f*100}function Ko(e){}function _o(e,t){t=Array.isArray(t)?t.slice(0,-1).map(n=>`'${n}'`).join(", ")+` or '${t.at(-1)}'`:`'${t}'`}const le=.20689655172413793,$n=e=>e>le**3?Math.cbrt(e):e/(3*le**2)+4/29,Rn=e=>e>le?e**3:3*le**2*(e-4/29);function Dt(e){const t=$n,n=t(e[1]);return[116*n-16,500*(t(e[0]/.95047)-n),200*(n-t(e[2]/1.08883))]}function St(e){const t=Rn,n=(e[0]+16)/116;return[t(n+e[1]/500)*.95047,t(n),t(n-e[2]/200)*1.08883]}const Ln=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]],Nn=e=>e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055,Bn=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],Hn=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;function xt(e){const t=Array(3),n=Nn,r=Ln;for(let o=0;o<3;++o)t[o]=Math.round(bn(n(r[o][0]*e[0]+r[o][1]*e[1]+r[o][2]*e[2]))*255);return{r:t[0],g:t[1],b:t[2]}}function Te(e){let{r:t,g:n,b:r}=e;const o=[0,0,0],s=Hn,a=Bn;t=s(t/255),n=s(n/255),r=s(r/255);for(let i=0;i<3;++i)o[i]=a[i][0]*t+a[i][1]*n+a[i][2]*r;return o}function Vn(e){return!!e&&/^(#|var\(--|(rgb|hsl)a?\()/.test(e)}function Zo(e){return Vn(e)&&!/^((rgb|hsl)a?\()?var\(--/.test(e)}const Ze=/^(?<fn>(?:rgb|hsl)a?)\((?<values>.+)\)/,Yn={rgb:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),rgba:(e,t,n,r)=>({r:e,g:t,b:n,a:r}),hsl:(e,t,n,r)=>Xe({h:e,s:t,l:n,a:r}),hsla:(e,t,n,r)=>Xe({h:e,s:t,l:n,a:r}),hsv:(e,t,n,r)=>H({h:e,s:t,v:n,a:r}),hsva:(e,t,n,r)=>H({h:e,s:t,v:n,a:r})};function k(e){if(typeof e=="number")return{r:(e&16711680)>>16,g:(e&65280)>>8,b:e&255};if(typeof e=="string"&&Ze.test(e)){const{groups:t}=e.match(Ze),{fn:n,values:r}=t,o=r.split(/,\s*/).map(s=>s.endsWith("%")&&["hsl","hsla","hsv","hsva"].includes(n)?parseFloat(s)/100:parseFloat(s));return Yn[n](...o)}else if(typeof e=="string"){let t=e.startsWith("#")?e.slice(1):e;return[3,4].includes(t.length)?t=t.split("").map(n=>n+n).join(""):[6,8].includes(t.length),At(t)}else if(typeof e=="object"){if(ye(e,["r","g","b"]))return e;if(ye(e,["h","s","l"]))return H(Ct(e));if(ye(e,["h","s","v"]))return H(e)}throw new TypeError(`Invalid color: ${e==null?e:String(e)||e.constructor.name}
|
||||||
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function H(e){const{h:t,s:n,v:r,a:o}=e,s=i=>{const u=(i+t/60)%6;return r-r*n*Math.max(Math.min(u,4-u,1),0)},a=[s(5),s(3),s(1)].map(i=>Math.round(i*255));return{r:a[0],g:a[1],b:a[2],a:o}}function Xe(e){return H(Ct(e))}function Wn(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r);let a=0;o!==s&&(o===t?a=60*(0+(n-r)/(o-s)):o===n?a=60*(2+(r-t)/(o-s)):o===r&&(a=60*(4+(t-n)/(o-s)))),a<0&&(a=a+360);const i=o===0?0:(o-s)/o,u=[a,i,o];return{h:u[0],s:u[1],v:u[2],a:e.a}}function _o(e){const{h:t,s:n,v:r,a:o}=e,s=r-r*n/2,a=s===1||s===0?0:(r-s)/Math.min(s,1-s);return{h:t,s:a,l:s,a:o}}function Ct(e){const{h:t,s:n,l:r,a:o}=e,s=r+n*Math.min(r,1-r),a=s===0?0:2-2*r/s;return{h:t,s:a,v:s,a:o}}function jn(e){let{r:t,g:n,b:r,a:o}=e;return o===void 0?`rgb(${t}, ${n}, ${r})`:`rgba(${t}, ${n}, ${r}, ${o})`}function Zo(e){return jn(H(e))}function se(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function Mt(e){let{r:t,g:n,b:r,a:o}=e;return`#${[se(t),se(n),se(r),o!==void 0?se(Math.round(o*255)):""].join("")}`}function At(e){e=zn(e);let[t,n,r,o]=wn(e,2).map(s=>parseInt(s,16));return o=o===void 0?o:o/255,{r:t,g:n,b:r,a:o}}function Xo(e){const t=At(e);return Wn(t)}function Qo(e){return Mt(H(e))}function zn(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=Be(Be(e,6),8,"F")),e}function Un(e,t){const n=Dt(Te(e));return n[0]=n[0]+t*10,xt(St(n))}function Gn(e,t){const n=Dt(Te(e));return n[0]=n[0]-t*10,xt(St(n))}function De(e){const t=k(e);return Te(t)[1]}function Jo(e,t){const n=De(e),r=De(t),o=Math.max(n,r),s=Math.min(n,r);return(o+.05)/(s+.05)}function Kn(e){const t=Math.abs(_e(k(0),k(e)));return Math.abs(_e(k(16777215),k(e)))>Math.min(t,50)?"#fff":"#000"}function V(e,t){return n=>Object.keys(e).reduce((r,o)=>{const a=typeof e[o]=="object"&&e[o]!=null&&!Array.isArray(e[o])?e[o]:{type:e[o]};return n&&o in n?r[o]={...a,default:n[o]}:r[o]=a,t&&!r[o].source&&(r[o].source=t),r},{})}const _n=V({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),K=Symbol.for("vuetify:defaults");function Zn(e){return T(e)}function Oe(){const e=M(K);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function qo(e,t){const n=Oe(),r=T(e),o=h(()=>{if(G(t?.disabled))return n.value;const a=G(t?.scoped),i=G(t?.reset),u=G(t?.root);if(r.value==null&&!(a||i||u))return n.value;let c=x(r.value,{prev:n.value});if(a)return c;if(i||u){const f=Number(i||1/0);for(let l=0;l<=f&&!(!c||!("prev"in c));l++)c=c.prev;return c&&typeof u=="string"&&u in c&&(c=x(x(c,{prev:c}),c[u])),c}return c.prev?x(c.prev,c):c});return Z(K,o),o}function Xn(e,t){return typeof e.props?.[t]<"u"||typeof e.props?.[N(t)]<"u"}function Qn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oe();const r=O("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const o=h(()=>n.value?.[e._as??t]),s=new Proxy(e,{get(u,c){const f=Reflect.get(u,c);return c==="class"||c==="style"?[o.value?.[c],f].filter(l=>l!=null):typeof c=="string"&&!Xn(r.vnode,c)?o.value?.[c]??n.value?.global?.[c]??f:f}}),a=I();de(()=>{if(o.value){const u=Object.entries(o.value).filter(c=>{let[f]=c;return f.startsWith(f[0].toUpperCase())});a.value=u.length?Object.fromEntries(u):void 0}else a.value=void 0});function i(){const u=er(K,r);Z(K,h(()=>a.value?x(u?.value??{},a.value):u?.value))}return{props:s,provideSubDefaults:i}}function ee(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=V(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return hn(r,t)},e.props._as=String,e.setup=function(r,o){const s=Oe();if(!s.value)return e._setup(r,o);const{props:a,provideSubDefaults:i}=Qn(r,r._as??e.name,s),u=e._setup(a,o);return i(),u}}return e}function Tt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?ee:Qt)(t)}function es(e,t){return t.props=e,t}function ts(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return Tt()({name:n??dt(Jt(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},..._n()},setup(r,o){let{slots:s}=o;return()=>mt(r.tag,{class:[e,r.class],style:r.style},s.default?.())}})}function ns(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const rs="cubic-bezier(0.4, 0, 0.2, 1)",os="cubic-bezier(0.0, 0, 0.2, 1)",ss="cubic-bezier(0.4, 0, 1, 1)";function as(e,t,n){return Object.keys(e).filter(r=>Ae(r)&&r.endsWith(t)).reduce((r,o)=>(r[o.slice(0,-t.length)]=s=>e[o](s,n(s)),r),{})}function O(e,t){const n=qt();if(!n)throw new Error(`[Vuetify] ${e} ${t||"must be called from inside a setup function"}`);return n}function Jn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=O(e).type;return N(t?.aliasName||t?.name)}let Ot=0,ce=new WeakMap;function Fe(){const e=O("getUid");if(ce.has(e))return ce.get(e);{const t=Ot++;return ce.set(e,t),t}}Fe.reset=()=>{Ot=0,ce=new WeakMap};function is(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?qn(e):Ft(e))return e;e=e.parentElement}return document.scrollingElement}function us(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Ft(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Ft(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function qn(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function er(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}function cs(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function ls(e){const t=O("useRender");t.render=e}function tr(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:l=>l,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:l=>l;const s=O("useProxiedModel"),a=T(e[t]!==void 0?e[t]:n),i=N(t),c=i!==t?h(()=>(e[t],!!((s.vnode.props?.hasOwnProperty(t)||s.vnode.props?.hasOwnProperty(i))&&(s.vnode.props?.hasOwnProperty(`onUpdate:${t}`)||s.vnode.props?.hasOwnProperty(`onUpdate:${i}`))))):h(()=>(e[t],!!(s.vnode.props?.hasOwnProperty(t)&&s.vnode.props?.hasOwnProperty(`onUpdate:${t}`))));un(()=>!c.value,()=>{B(()=>e[t],l=>{a.value=l})});const f=h({get(){const l=e[t];return r(c.value?l:a.value)},set(l){const m=o(l),p=en(c.value?e[t]:a.value);p===m||r(p)===l||(a.value=m,s?.emit(`update:${t}`,m))}});return Object.defineProperty(f,"externalValue",{get:()=>c.value?e[t]:a.value}),f}const nr={badge:"Badge",open:"Open",close:"Close",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},Qe="$vuetify.",Je=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[+r])),Et=(e,t,n)=>function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(!r.startsWith(Qe))return Je(r,s);const i=r.replace(Qe,""),u=e.value&&n.value[e.value],c=t.value&&n.value[t.value];let f=be(u,i,null);return f||(`${r}${e.value}`,f=be(c,i,null)),f||(f=r),typeof f!="string"&&(f=r),Je(f,s)};function kt(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function ve(e,t,n){const r=tr(e,t,e[t]??n.value);return r.value=e[t]??n.value,B(n,o=>{e[t]==null&&(r.value=n.value)}),r}function Pt(e){return t=>{const n=ve(t,"locale",e.current),r=ve(t,"fallback",e.fallback),o=ve(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:o,t:Et(n,r,o),n:kt(n,r),provide:Pt({current:n,fallback:r,messages:o})}}}function rr(e){const t=I(e?.locale??"en"),n=I(e?.fallback??"en"),r=T({en:nr,...e?.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:Et(t,n,r),n:kt(t,n),provide:Pt({current:t,fallback:n,messages:r})}}const _=Symbol.for("vuetify:locale");function or(e){return e.name!=null}function sr(e){const t=e?.adapter&&or(e?.adapter)?e?.adapter:rr(e),n=ur(t,e);return{...t,...n}}function ar(){const e=M(_);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function fs(e){const t=M(_);if(!t)throw new Error("[Vuetify] Could not find injected locale instance");const n=t.provide(e),r=cr(n,t.rtl,e),o={...n,...r};return Z(_,o),o}function ir(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function ur(e,t){const n=T(t?.rtl??ir()),r=h(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:h(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function cr(e,t,n){const r=h(()=>n.rtl??t.value[e.current.value]??!1);return{isRtl:r,rtl:t,rtlClasses:h(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function ds(){const e=M(_);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const Se={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function lr(e,t){const n=[];let r=[];const o=It(e),s=$t(e),a=(o.getDay()-Se[t.slice(-2).toUpperCase()]+7)%7,i=(s.getDay()-Se[t.slice(-2).toUpperCase()]+7)%7;for(let u=0;u<a;u++){const c=new Date(o);c.setDate(c.getDate()-(a-u)),r.push(c)}for(let u=1;u<=s.getDate();u++){const c=new Date(e.getFullYear(),e.getMonth(),u);r.push(c),r.length===7&&(n.push(r),r=[])}for(let u=1;u<7-i;u++){const c=new Date(s);c.setDate(c.getDate()+u),r.push(c)}return r.length>0&&n.push(r),n}function fr(e){const t=new Date(e);for(;t.getDay()!==0;)t.setDate(t.getDate()-1);return t}function dr(e){const t=new Date(e);for(;t.getDay()!==6;)t.setDate(t.getDate()+1);return t}function It(e){return new Date(e.getFullYear(),e.getMonth(),1)}function $t(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function mr(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const gr=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function Rt(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(gr.test(e))return mr(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const qe=new Date(2e3,0,2);function hr(e){const t=Se[e.slice(-2).toUpperCase()];return yt(7).map(n=>{const r=new Date(qe);return r.setDate(qe.getDate()+t+n),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(r)})}function pr(e,t,n,r){const o=Rt(e)??new Date,s=r?.[t];if(typeof s=="function")return s(o,t,n);let a={};switch(t){case"fullDateWithWeekday":a={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"hours12h":a={hour:"numeric",hour12:!0};break;case"normalDateWithWeekday":a={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":a={day:"2-digit",month:"2-digit",year:"numeric"};break;case"monthAndDate":a={month:"long",day:"numeric"};break;case"monthAndYear":a={month:"long",year:"numeric"};break;case"month":a={month:"long"};break;case"monthShort":a={month:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(o.getDate());case"shortDate":a={year:"2-digit",month:"numeric",day:"numeric"};break;case"weekdayShort":a={weekday:"short"};break;case"year":a={year:"numeric"};break;default:a=s??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,a).format(o)}function yr(e,t){const n=e.toJsDate(t),r=n.getFullYear(),o=He(String(n.getMonth()+1),2,"0"),s=He(String(n.getDate()),2,"0");return`${r}-${o}-${s}`}function vr(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function br(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function wr(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function Dr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function Sr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function xr(e,t){const n=new Date(e);return n.setMonth(n.getMonth()+t),n}function Cr(e){return e.getFullYear()}function Mr(e){return e.getMonth()}function Ar(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function Tr(e){return e.getHours()}function Or(e){return e.getMinutes()}function Fr(e){return new Date(e.getFullYear(),0,1)}function Er(e){return new Date(e.getFullYear(),11,31)}function kr(e,t){return xe(e,t[0])&&Ir(e,t[1])}function Pr(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function xe(e,t){return e.getTime()>t.getTime()}function Ir(e,t){return e.getTime()<t.getTime()}function et(e,t){return e.getTime()===t.getTime()}function $r(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Rr(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Lr(e,t,n){const r=new Date(e),o=new Date(t);switch(n){case"years":return r.getFullYear()-o.getFullYear();case"quarters":return Math.floor((r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12)/4);case"months":return r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12;case"weeks":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24));case"hours":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60));case"minutes":return Math.floor((r.getTime()-o.getTime())/(1e3*60));case"seconds":return Math.floor((r.getTime()-o.getTime())/1e3);default:return r.getTime()-o.getTime()}}function Nr(e,t){const n=new Date(e);return n.setHours(t),n}function Br(e,t){const n=new Date(e);return n.setMinutes(t),n}function Hr(e,t){const n=new Date(e);return n.setMonth(t),n}function Vr(e,t){const n=new Date(e);return n.setFullYear(t),n}function Yr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function Wr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class jr{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return Rt(t)}toJsDate(t){return t}toISO(t){return yr(this,t)}parseISO(t){return vr(t)}addMinutes(t,n){return br(t,n)}addHours(t,n){return wr(t,n)}addDays(t,n){return Dr(t,n)}addWeeks(t,n){return Sr(t,n)}addMonths(t,n){return xr(t,n)}getWeekArray(t){return lr(t,this.locale)}startOfWeek(t){return fr(t)}endOfWeek(t){return dr(t)}startOfMonth(t){return It(t)}endOfMonth(t){return $t(t)}format(t,n){return pr(t,n,this.locale,this.formats)}isEqual(t,n){return et(t,n)}isValid(t){return Pr(t)}isWithinRange(t,n){return kr(t,n)}isAfter(t,n){return xe(t,n)}isBefore(t,n){return!xe(t,n)&&!et(t,n)}isSameDay(t,n){return $r(t,n)}isSameMonth(t,n){return Rr(t,n)}setMinutes(t,n){return Br(t,n)}setHours(t,n){return Nr(t,n)}setMonth(t,n){return Hr(t,n)}setYear(t,n){return Vr(t,n)}getDiff(t,n,r){return Lr(t,n,r)}getWeekdays(){return hr(this.locale)}getYear(t){return Cr(t)}getMonth(t){return Mr(t)}getNextMonth(t){return Ar(t)}getHours(t){return Tr(t)}getMinutes(t){return Or(t)}startOfDay(t){return Yr(t)}endOfDay(t){return Wr(t)}startOfYear(t){return Fr(t)}endOfYear(t){return Er(t)}}const Lt=Symbol.for("vuetify:date-options"),tt=Symbol.for("vuetify:date-adapter");function zr(e,t){const n=x({adapter:jr,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:Nt(n,t)}}function Nt(e,t){const n=F(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return B(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}function ms(){const e=M(Lt);if(!e)throw new Error("[Vuetify] Could not find injected date options");const t=ar();return Nt(e,t)}function gs(e,t){const n=e.toJsDate(t);let r=n.getFullYear(),o=new Date(r,0,1);if(n<o)r=r-1,o=new Date(r,0,1);else{const i=new Date(r+1,0,1);n>=i&&(r=r+1,o=i)}const s=Math.abs(n.getTime()-o.getTime()),a=Math.ceil(s/(1e3*60*60*24));return Math.floor(a/7)+1}const hs=["sm","md","lg","xl","xxl"],Ce=Symbol.for("vuetify:display"),nt={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Ur=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nt;return x(nt,e)};function rt(e){return D&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function ot(e){return D&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function st(e){const t=D&&!e?window.navigator.userAgent:"ssr";function n(d){return!!t.match(d)}const r=n(/android/i),o=n(/iphone|ipad|ipod/i),s=n(/cordova/i),a=n(/electron/i),i=n(/chrome/i),u=n(/edge/i),c=n(/firefox/i),f=n(/opera/i),l=n(/win/i),m=n(/mac/i),p=n(/linux/i);return{android:r,ios:o,cordova:s,electron:a,chrome:i,edge:u,firefox:c,opera:f,win:l,mac:m,linux:p,touch:cn,ssr:t==="ssr"}}function Gr(e,t){const{thresholds:n,mobileBreakpoint:r}=Ur(e),o=I(ot(t)),s=I(st(t)),a=F({}),i=I(rt(t));function u(){o.value=ot(),i.value=rt()}function c(){u(),s.value=st()}return de(()=>{const f=i.value<n.sm,l=i.value<n.md&&!f,m=i.value<n.lg&&!(l||f),p=i.value<n.xl&&!(m||l||f),d=i.value<n.xxl&&!(p||m||l||f),g=i.value>=n.xxl,y=f?"xs":l?"sm":m?"md":p?"lg":d?"xl":"xxl",P=typeof r=="number"?r:n[r],Y=i.value<P;a.xs=f,a.sm=l,a.md=m,a.lg=p,a.xl=d,a.xxl=g,a.smAndUp=!f,a.mdAndUp=!(f||l),a.lgAndUp=!(f||l||m),a.xlAndUp=!(f||l||m||p),a.smAndDown=!(m||p||d||g),a.mdAndDown=!(p||d||g),a.lgAndDown=!(d||g),a.xlAndDown=!g,a.name=y,a.height=o.value,a.width=i.value,a.mobile=Y,a.mobileBreakpoint=r,a.platform=s.value,a.thresholds=n}),D&&window.addEventListener("resize",u,{passive:!0}),{...ft(a),update:c,ssr:!!t}}const ps=V({mobileBreakpoint:[Number,String]},"display");function ys(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jn();const n=M(Ce);if(!n)throw new Error("Could not find Vuetify display injection");const r=h(()=>{if(!e.mobileBreakpoint)return n.mobile.value;const s=typeof e.mobileBreakpoint=="number"?e.mobileBreakpoint:n.thresholds.value[e.mobileBreakpoint];return n.width.value<s}),o=h(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:o,mobile:r}}const Kr=Symbol.for("vuetify:goto");function _r(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5}}}function Zr(e,t){return{rtl:t.isRtl,options:x(_r(),e)}}const Xr={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",eyeDropper:"mdi-eyedropper"},Qr={component:e=>mt(Ht,{...e,class:"mdi"})},Jr=[String,Function,Object,Array],Me=Symbol.for("vuetify:icons"),me=V({icon:{type:Jr},tag:{type:String,required:!0}},"icon"),at=Tt()({name:"VComponentIcon",props:me(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return E(e.tag,null,{default:()=>[e.icon?E(r,null,null):n.default?.()]})}}}),Bt=ee({name:"VSvgIcon",inheritAttrs:!1,props:me(),setup(e,t){let{attrs:n}=t;return()=>E(e.tag,tn(n,{style:null}),{default:()=>[E("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?E("path",{d:r[0],"fill-opacity":r[1]},null):E("path",{d:r},null)):E("path",{d:e.icon},null)])]})}}),vs=ee({name:"VLigatureIcon",props:me(),setup(e){return()=>E(e.tag,null,{default:()=>[e.icon]})}}),Ht=ee({name:"VClassIcon",props:me(),setup(e){return()=>E(e.tag,{class:e.icon},null)}});function qr(){return{svg:{component:Bt},class:{component:Ht}}}function eo(e){const t=qr(),n=e?.defaultSet??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=Qr),x({defaultSet:n,sets:t,aliases:{...Xr,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},e)}const bs=e=>{const t=M(Me);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:h(()=>{const r=G(e);if(!r)return{component:at};let o=r;if(typeof o=="string"&&(o=o.trim(),o.startsWith("$")&&(o=t.aliases?.[o.slice(1)])),!o)throw new Error(`Could not find aliased icon "${r}"`);if(Array.isArray(o))return{component:Bt,icon:o};if(typeof o!="string")return{component:at,icon:o};const s=Object.keys(t.sets).find(u=>typeof o=="string"&&o.startsWith(`${u}:`)),a=s?o.slice(s.length+1):o;return{component:t.sets[s??t.defaultSet].component,icon:a}})}},q=Symbol.for("vuetify:theme"),ws=V({theme:String},"theme");function it(){return{defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#a3a3a3","on-surface-variant":"#424242",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}}}function to(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:it();const t=it();if(!e)return{...t,isDisabled:!0};const n={};for(const[r,o]of Object.entries(e.themes??{})){const s=o.dark||r==="dark"?t.themes?.dark:t.themes?.light;n[r]=x(s,o)}return x(t,{...e,themes:n})}function no(e){const t=to(e),n=T(t.defaultTheme),r=T(t.themes),o=h(()=>{const f={};for(const[l,m]of Object.entries(r.value)){const p=f[l]={...m,colors:{...m.colors}};if(t.variations)for(const d of t.variations.colors){const g=p.colors[d];if(g)for(const y of["lighten","darken"]){const P=y==="lighten"?Un:Gn;for(const Y of yt(t.variations[y],1))p.colors[`${d}-${y}-${Y}`]=Mt(P(k(g),Y))}}for(const d of Object.keys(p.colors)){if(/^on-[a-z]/.test(d)||p.colors[`on-${d}`])continue;const g=`on-${d}`,y=k(p.colors[d]);p.colors[g]=Kn(y)}}return f}),s=h(()=>o.value[n.value]),a=h(()=>{const f=[];s.value?.dark&&L(f,":root",["color-scheme: dark"]),L(f,":root",ut(s.value));for(const[d,g]of Object.entries(o.value))L(f,`.v-theme--${d}`,[`color-scheme: ${g.dark?"dark":"normal"}`,...ut(g)]);const l=[],m=[],p=new Set(Object.values(o.value).flatMap(d=>Object.keys(d.colors)));for(const d of p)/^on-[a-z]/.test(d)?L(m,`.${d}`,[`color: rgb(var(--v-theme-${d})) !important`]):(L(l,`.bg-${d}`,[`--v-theme-overlay-multiplier: var(--v-theme-${d}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${d})) !important`,`color: rgb(var(--v-theme-on-${d})) !important`]),L(m,`.text-${d}`,[`color: rgb(var(--v-theme-${d})) !important`]),L(m,`.border-${d}`,[`--v-border-color: var(--v-theme-${d})`]));return f.push(...l,...m),f.map((d,g)=>g===0?d:` ${d}`).join("")});function i(){return{style:[{children:a.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function u(f){if(t.isDisabled)return;const l=f._context.provides.usehead;if(l)if(l.push){const m=l.push(i);D&&B(a,()=>{m.patch(i)})}else D?(l.addHeadObjs(h(i)),de(()=>l.updateDOM())):l.addHeadObjs(i());else{let p=function(){if(typeof document<"u"&&!m){const d=document.createElement("style");d.type="text/css",d.id="vuetify-theme-stylesheet",t.cspNonce&&d.setAttribute("nonce",t.cspNonce),m=d,document.head.appendChild(m)}m&&(m.innerHTML=a.value)},m=D?document.getElementById("vuetify-theme-stylesheet"):null;D?B(a,p,{immediate:!0}):p()}}const c=h(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:u,isDisabled:t.isDisabled,name:n,themes:r,current:s,computedThemes:o,themeClasses:c,styles:a,global:{name:n,current:s}}}function Ds(e){O("provideTheme");const t=M(q,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=h(()=>e.theme??t.name.value),r=h(()=>t.themes.value[n.value]),o=h(()=>t.isDisabled?void 0:`v-theme--${n.value}`),s={...t,name:n,current:r,themeClasses:o};return Z(q,s),s}function Ss(){O("useTheme");const e=M(q,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function L(e,t,n){e.push(`${t} {
|
Expected #hex, #hexa, rgb(), rgba(), hsl(), hsla(), object or number`)}function H(e){const{h:t,s:n,v:r,a:o}=e,s=i=>{const u=(i+t/60)%6;return r-r*n*Math.max(Math.min(u,4-u,1),0)},a=[s(5),s(3),s(1)].map(i=>Math.round(i*255));return{r:a[0],g:a[1],b:a[2],a:o}}function Xe(e){return H(Ct(e))}function Wn(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),s=Math.min(t,n,r);let a=0;o!==s&&(o===t?a=60*(0+(n-r)/(o-s)):o===n?a=60*(2+(r-t)/(o-s)):o===r&&(a=60*(4+(t-n)/(o-s)))),a<0&&(a=a+360);const i=o===0?0:(o-s)/o,u=[a,i,o];return{h:u[0],s:u[1],v:u[2],a:e.a}}function Xo(e){const{h:t,s:n,v:r,a:o}=e,s=r-r*n/2,a=s===1||s===0?0:(r-s)/Math.min(s,1-s);return{h:t,s:a,l:s,a:o}}function Ct(e){const{h:t,s:n,l:r,a:o}=e,s=r+n*Math.min(r,1-r),a=s===0?0:2-2*r/s;return{h:t,s:a,v:s,a:o}}function jn(e){let{r:t,g:n,b:r,a:o}=e;return o===void 0?`rgb(${t}, ${n}, ${r})`:`rgba(${t}, ${n}, ${r}, ${o})`}function Qo(e){return jn(H(e))}function se(e){const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()}function Mt(e){let{r:t,g:n,b:r,a:o}=e;return`#${[se(t),se(n),se(r),o!==void 0?se(Math.round(o*255)):""].join("")}`}function At(e){e=zn(e);let[t,n,r,o]=wn(e,2).map(s=>parseInt(s,16));return o=o===void 0?o:o/255,{r:t,g:n,b:r,a:o}}function Jo(e){const t=At(e);return Wn(t)}function qo(e){return Mt(H(e))}function zn(e){return e.startsWith("#")&&(e=e.slice(1)),e=e.replace(/([^0-9a-f])/gi,"F"),(e.length===3||e.length===4)&&(e=e.split("").map(t=>t+t).join("")),e.length!==6&&(e=Be(Be(e,6),8,"F")),e}function Un(e,t){const n=Dt(Te(e));return n[0]=n[0]+t*10,xt(St(n))}function Gn(e,t){const n=Dt(Te(e));return n[0]=n[0]-t*10,xt(St(n))}function De(e){const t=k(e);return Te(t)[1]}function es(e,t){const n=De(e),r=De(t),o=Math.max(n,r),s=Math.min(n,r);return(o+.05)/(s+.05)}function Kn(e){const t=Math.abs(_e(k(0),k(e)));return Math.abs(_e(k(16777215),k(e)))>Math.min(t,50)?"#fff":"#000"}function V(e,t){return n=>Object.keys(e).reduce((r,o)=>{const a=typeof e[o]=="object"&&e[o]!=null&&!Array.isArray(e[o])?e[o]:{type:e[o]};return n&&o in n?r[o]={...a,default:n[o]}:r[o]=a,t&&!r[o].source&&(r[o].source=t),r},{})}const _n=V({class:[String,Array],style:{type:[String,Array,Object],default:null}},"component"),K=Symbol.for("vuetify:defaults");function Zn(e){return T(e)}function Oe(){const e=M(K);if(!e)throw new Error("[Vuetify] Could not find defaults instance");return e}function ts(e,t){const n=Oe(),r=T(e),o=h(()=>{if(G(t?.disabled))return n.value;const a=G(t?.scoped),i=G(t?.reset),u=G(t?.root);if(r.value==null&&!(a||i||u))return n.value;let c=x(r.value,{prev:n.value});if(a)return c;if(i||u){const f=Number(i||1/0);for(let l=0;l<=f&&!(!c||!("prev"in c));l++)c=c.prev;return c&&typeof u=="string"&&u in c&&(c=x(x(c,{prev:c}),c[u])),c}return c.prev?x(c.prev,c):c});return Z(K,o),o}function Xn(e,t){return typeof e.props?.[t]<"u"||typeof e.props?.[N(t)]<"u"}function Qn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Oe();const r=O("useDefaults");if(t=t??r.type.name??r.type.__name,!t)throw new Error("[Vuetify] Could not determine component name");const o=h(()=>n.value?.[e._as??t]),s=new Proxy(e,{get(u,c){const f=Reflect.get(u,c);return c==="class"||c==="style"?[o.value?.[c],f].filter(l=>l!=null):typeof c=="string"&&!Xn(r.vnode,c)?o.value?.[c]??n.value?.global?.[c]??f:f}}),a=I();de(()=>{if(o.value){const u=Object.entries(o.value).filter(c=>{let[f]=c;return f.startsWith(f[0].toUpperCase())});a.value=u.length?Object.fromEntries(u):void 0}else a.value=void 0});function i(){const u=er(K,r);Z(K,h(()=>a.value?x(u?.value??{},a.value):u?.value))}return{props:s,provideSubDefaults:i}}function ee(e){if(e._setup=e._setup??e.setup,!e.name)return e;if(e._setup){e.props=V(e.props??{},e.name)();const t=Object.keys(e.props).filter(n=>n!=="class"&&n!=="style");e.filterProps=function(r){return hn(r,t)},e.props._as=String,e.setup=function(r,o){const s=Oe();if(!s.value)return e._setup(r,o);const{props:a,provideSubDefaults:i}=Qn(r,r._as??e.name,s),u=e._setup(a,o);return i(),u}}return e}function Tt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return t=>(e?ee:Qt)(t)}function ns(e,t){return t.props=e,t}function rs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"div",n=arguments.length>2?arguments[2]:void 0;return Tt()({name:n??dt(Jt(e.replace(/__/g,"-"))),props:{tag:{type:String,default:t},..._n()},setup(r,o){let{slots:s}=o;return()=>mt(r.tag,{class:[e,r.class],style:r.style},s.default?.())}})}function os(e){if(typeof e.getRootNode!="function"){for(;e.parentNode;)e=e.parentNode;return e!==document?null:document}const t=e.getRootNode();return t!==document&&t.getRootNode({composed:!0})!==document?null:t}const ss="cubic-bezier(0.4, 0, 0.2, 1)",as="cubic-bezier(0.0, 0, 0.2, 1)",is="cubic-bezier(0.4, 0, 1, 1)";function us(e,t,n){return Object.keys(e).filter(r=>Ae(r)&&r.endsWith(t)).reduce((r,o)=>(r[o.slice(0,-t.length)]=s=>e[o](s,n(s)),r),{})}function O(e,t){const n=qt();if(!n)throw new Error(`[Vuetify] ${e} ${t||"must be called from inside a setup function"}`);return n}function Jn(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"composables";const t=O(e).type;return N(t?.aliasName||t?.name)}let Ot=0,ce=new WeakMap;function Fe(){const e=O("getUid");if(ce.has(e))return ce.get(e);{const t=Ot++;return ce.set(e,t),t}}Fe.reset=()=>{Ot=0,ce=new WeakMap};function cs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(;e;){if(t?qn(e):Ft(e))return e;e=e.parentElement}return document.scrollingElement}function ls(e,t){const n=[];if(t&&e&&!t.contains(e))return n;for(;e&&(Ft(e)&&n.push(e),e!==t);)e=e.parentElement;return n}function Ft(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return t.overflowY==="scroll"||t.overflowY==="auto"&&e.scrollHeight>e.clientHeight}function qn(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return["scroll","auto"].includes(t.overflowY)}function er(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O("injectSelf");const{provides:n}=t;if(n&&e in n)return n[e]}function fs(e){for(;e;){if(window.getComputedStyle(e).position==="fixed")return!0;e=e.offsetParent}return!1}function ds(e){const t=O("useRender");t.render=e}function tr(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:l=>l,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:l=>l;const s=O("useProxiedModel"),a=T(e[t]!==void 0?e[t]:n),i=N(t),c=i!==t?h(()=>(e[t],!!((s.vnode.props?.hasOwnProperty(t)||s.vnode.props?.hasOwnProperty(i))&&(s.vnode.props?.hasOwnProperty(`onUpdate:${t}`)||s.vnode.props?.hasOwnProperty(`onUpdate:${i}`))))):h(()=>(e[t],!!(s.vnode.props?.hasOwnProperty(t)&&s.vnode.props?.hasOwnProperty(`onUpdate:${t}`))));un(()=>!c.value,()=>{B(()=>e[t],l=>{a.value=l})});const f=h({get(){const l=e[t];return r(c.value?l:a.value)},set(l){const m=o(l),p=en(c.value?e[t]:a.value);p===m||r(p)===l||(a.value=m,s?.emit(`update:${t}`,m))}});return Object.defineProperty(f,"externalValue",{get:()=>c.value?e[t]:a.value}),f}const nr={badge:"Badge",open:"Open",close:"Close",confirmEdit:{ok:"OK",cancel:"Cancel"},dataIterator:{noResultsText:"No matching records found",loadingText:"Loading items..."},dataTable:{itemsPerPageText:"Rows per page:",ariaLabel:{sortDescending:"Sorted descending.",sortAscending:"Sorted ascending.",sortNone:"Not sorted.",activateNone:"Activate to remove sorting.",activateDescending:"Activate to sort descending.",activateAscending:"Activate to sort ascending."},sortBy:"Sort by"},dataFooter:{itemsPerPageText:"Items per page:",itemsPerPageAll:"All",nextPage:"Next page",prevPage:"Previous page",firstPage:"First page",lastPage:"Last page",pageText:"{0}-{1} of {2}"},dateRangeInput:{divider:"to"},datePicker:{itemsSelected:"{0} selected",range:{title:"Select dates",header:"Enter dates"},title:"Select date",header:"Enter date",input:{placeholder:"Enter date"}},noDataText:"No data available",carousel:{prev:"Previous visual",next:"Next visual",ariaLabel:{delimiter:"Carousel slide {0} of {1}"}},calendar:{moreEvents:"{0} more",today:"Today"},input:{clear:"Clear {0}",prependAction:"{0} prepended action",appendAction:"{0} appended action",otp:"Please enter OTP character {0}"},fileInput:{counter:"{0} files",counterSize:"{0} files ({1} in total)"},timePicker:{am:"AM",pm:"PM",title:"Select Time"},pagination:{ariaLabel:{root:"Pagination Navigation",next:"Next page",previous:"Previous page",page:"Go to page {0}",currentPage:"Page {0}, Current page",first:"First page",last:"Last page"}},stepper:{next:"Next",prev:"Previous"},rating:{ariaLabel:{item:"Rating {0} of {1}"}},loading:"Loading...",infiniteScroll:{loadMore:"Load more",empty:"No more"}},Qe="$vuetify.",Je=(e,t)=>e.replace(/\{(\d+)\}/g,(n,r)=>String(t[+r])),Et=(e,t,n)=>function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];if(!r.startsWith(Qe))return Je(r,s);const i=r.replace(Qe,""),u=e.value&&n.value[e.value],c=t.value&&n.value[t.value];let f=be(u,i,null);return f||(`${r}${e.value}`,f=be(c,i,null)),f||(f=r),typeof f!="string"&&(f=r),Je(f,s)};function kt(e,t){return(n,r)=>new Intl.NumberFormat([e.value,t.value],r).format(n)}function ve(e,t,n){const r=tr(e,t,e[t]??n.value);return r.value=e[t]??n.value,B(n,o=>{e[t]==null&&(r.value=n.value)}),r}function Pt(e){return t=>{const n=ve(t,"locale",e.current),r=ve(t,"fallback",e.fallback),o=ve(t,"messages",e.messages);return{name:"vuetify",current:n,fallback:r,messages:o,t:Et(n,r,o),n:kt(n,r),provide:Pt({current:n,fallback:r,messages:o})}}}function rr(e){const t=I(e?.locale??"en"),n=I(e?.fallback??"en"),r=T({en:nr,...e?.messages});return{name:"vuetify",current:t,fallback:n,messages:r,t:Et(t,n,r),n:kt(t,n),provide:Pt({current:t,fallback:n,messages:r})}}const _=Symbol.for("vuetify:locale");function or(e){return e.name!=null}function sr(e){const t=e?.adapter&&or(e?.adapter)?e?.adapter:rr(e),n=ur(t,e);return{...t,...n}}function ar(){const e=M(_);if(!e)throw new Error("[Vuetify] Could not find injected locale instance");return e}function ms(e){const t=M(_);if(!t)throw new Error("[Vuetify] Could not find injected locale instance");const n=t.provide(e),r=cr(n,t.rtl,e),o={...n,...r};return Z(_,o),o}function ir(){return{af:!1,ar:!0,bg:!1,ca:!1,ckb:!1,cs:!1,de:!1,el:!1,en:!1,es:!1,et:!1,fa:!0,fi:!1,fr:!1,hr:!1,hu:!1,he:!0,id:!1,it:!1,ja:!1,km:!1,ko:!1,lv:!1,lt:!1,nl:!1,no:!1,pl:!1,pt:!1,ro:!1,ru:!1,sk:!1,sl:!1,srCyrl:!1,srLatn:!1,sv:!1,th:!1,tr:!1,az:!1,uk:!1,vi:!1,zhHans:!1,zhHant:!1}}function ur(e,t){const n=T(t?.rtl??ir()),r=h(()=>n.value[e.current.value]??!1);return{isRtl:r,rtl:n,rtlClasses:h(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function cr(e,t,n){const r=h(()=>n.rtl??t.value[e.current.value]??!1);return{isRtl:r,rtl:t,rtlClasses:h(()=>`v-locale--is-${r.value?"rtl":"ltr"}`)}}function gs(){const e=M(_);if(!e)throw new Error("[Vuetify] Could not find injected rtl instance");return{isRtl:e.isRtl,rtlClasses:e.rtlClasses}}const Se={"001":1,AD:1,AE:6,AF:6,AG:0,AI:1,AL:1,AM:1,AN:1,AR:1,AS:0,AT:1,AU:1,AX:1,AZ:1,BA:1,BD:0,BE:1,BG:1,BH:6,BM:1,BN:1,BR:0,BS:0,BT:0,BW:0,BY:1,BZ:0,CA:0,CH:1,CL:1,CM:1,CN:1,CO:0,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DM:0,DO:0,DZ:6,EC:1,EE:1,EG:6,ES:1,ET:0,FI:1,FJ:1,FO:1,FR:1,GB:1,"GB-alt-variant":0,GE:1,GF:1,GP:1,GR:1,GT:0,GU:0,HK:0,HN:0,HR:1,HU:1,ID:0,IE:1,IL:0,IN:0,IQ:6,IR:6,IS:1,IT:1,JM:0,JO:6,JP:0,KE:0,KG:1,KH:0,KR:0,KW:6,KZ:1,LA:0,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MH:0,MK:1,MM:0,MN:1,MO:0,MQ:1,MT:0,MV:5,MX:0,MY:1,MZ:0,NI:0,NL:1,NO:1,NP:0,NZ:1,OM:6,PA:0,PE:0,PH:0,PK:0,PL:1,PR:0,PT:0,PY:0,QA:6,RE:1,RO:1,RS:1,RU:1,SA:0,SD:6,SE:1,SG:0,SI:1,SK:1,SM:1,SV:0,SY:6,TH:0,TJ:1,TM:1,TR:1,TT:0,TW:0,UA:1,UM:0,US:0,UY:1,UZ:1,VA:1,VE:0,VI:0,VN:1,WS:0,XK:1,YE:0,ZA:0,ZW:0};function lr(e,t){const n=[];let r=[];const o=It(e),s=$t(e),a=(o.getDay()-Se[t.slice(-2).toUpperCase()]+7)%7,i=(s.getDay()-Se[t.slice(-2).toUpperCase()]+7)%7;for(let u=0;u<a;u++){const c=new Date(o);c.setDate(c.getDate()-(a-u)),r.push(c)}for(let u=1;u<=s.getDate();u++){const c=new Date(e.getFullYear(),e.getMonth(),u);r.push(c),r.length===7&&(n.push(r),r=[])}for(let u=1;u<7-i;u++){const c=new Date(s);c.setDate(c.getDate()+u),r.push(c)}return r.length>0&&n.push(r),n}function fr(e){const t=new Date(e);for(;t.getDay()!==0;)t.setDate(t.getDate()-1);return t}function dr(e){const t=new Date(e);for(;t.getDay()!==6;)t.setDate(t.getDate()+1);return t}function It(e){return new Date(e.getFullYear(),e.getMonth(),1)}function $t(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function mr(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}const gr=/^([12]\d{3}-([1-9]|0[1-9]|1[0-2])-([1-9]|0[1-9]|[12]\d|3[01]))$/;function Rt(e){if(e==null)return new Date;if(e instanceof Date)return e;if(typeof e=="string"){let t;if(gr.test(e))return mr(e);if(t=Date.parse(e),!isNaN(t))return new Date(t)}return null}const qe=new Date(2e3,0,2);function hr(e){const t=Se[e.slice(-2).toUpperCase()];return yt(7).map(n=>{const r=new Date(qe);return r.setDate(qe.getDate()+t+n),new Intl.DateTimeFormat(e,{weekday:"narrow"}).format(r)})}function pr(e,t,n,r){const o=Rt(e)??new Date,s=r?.[t];if(typeof s=="function")return s(o,t,n);let a={};switch(t){case"fullDateWithWeekday":a={weekday:"long",day:"numeric",month:"long",year:"numeric"};break;case"hours12h":a={hour:"numeric",hour12:!0};break;case"normalDateWithWeekday":a={weekday:"short",day:"numeric",month:"short"};break;case"keyboardDate":a={day:"2-digit",month:"2-digit",year:"numeric"};break;case"monthAndDate":a={month:"long",day:"numeric"};break;case"monthAndYear":a={month:"long",year:"numeric"};break;case"month":a={month:"long"};break;case"monthShort":a={month:"short"};break;case"dayOfMonth":return new Intl.NumberFormat(n).format(o.getDate());case"shortDate":a={year:"2-digit",month:"numeric",day:"numeric"};break;case"weekdayShort":a={weekday:"short"};break;case"year":a={year:"numeric"};break;default:a=s??{timeZone:"UTC",timeZoneName:"short"}}return new Intl.DateTimeFormat(n,a).format(o)}function yr(e,t){const n=e.toJsDate(t),r=n.getFullYear(),o=He(String(n.getMonth()+1),2,"0"),s=He(String(n.getDate()),2,"0");return`${r}-${o}-${s}`}function vr(e){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}function br(e,t){const n=new Date(e);return n.setMinutes(n.getMinutes()+t),n}function wr(e,t){const n=new Date(e);return n.setHours(n.getHours()+t),n}function Dr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),n}function Sr(e,t){const n=new Date(e);return n.setDate(n.getDate()+t*7),n}function xr(e,t){const n=new Date(e);return n.setMonth(n.getMonth()+t),n}function Cr(e){return e.getFullYear()}function Mr(e){return e.getMonth()}function Ar(e){return e.getDate()}function Tr(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function Or(e){return e.getHours()}function Fr(e){return e.getMinutes()}function Er(e){return new Date(e.getFullYear(),0,1)}function kr(e){return new Date(e.getFullYear(),11,31)}function Pr(e,t){return xe(e,t[0])&&$r(e,t[1])}function Ir(e){const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())}function xe(e,t){return e.getTime()>t.getTime()}function $r(e,t){return e.getTime()<t.getTime()}function et(e,t){return e.getTime()===t.getTime()}function Rr(e,t){return e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Lr(e,t){return e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear()}function Nr(e,t,n){const r=new Date(e),o=new Date(t);switch(n){case"years":return r.getFullYear()-o.getFullYear();case"quarters":return Math.floor((r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12)/4);case"months":return r.getMonth()-o.getMonth()+(r.getFullYear()-o.getFullYear())*12;case"weeks":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24*7));case"days":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60*24));case"hours":return Math.floor((r.getTime()-o.getTime())/(1e3*60*60));case"minutes":return Math.floor((r.getTime()-o.getTime())/(1e3*60));case"seconds":return Math.floor((r.getTime()-o.getTime())/1e3);default:return r.getTime()-o.getTime()}}function Br(e,t){const n=new Date(e);return n.setHours(t),n}function Hr(e,t){const n=new Date(e);return n.setMinutes(t),n}function Vr(e,t){const n=new Date(e);return n.setMonth(t),n}function Yr(e,t){const n=new Date(e);return n.setDate(t),n}function Wr(e,t){const n=new Date(e);return n.setFullYear(t),n}function jr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0,0)}function zr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59,59,999)}class Ur{constructor(t){this.locale=t.locale,this.formats=t.formats}date(t){return Rt(t)}toJsDate(t){return t}toISO(t){return yr(this,t)}parseISO(t){return vr(t)}addMinutes(t,n){return br(t,n)}addHours(t,n){return wr(t,n)}addDays(t,n){return Dr(t,n)}addWeeks(t,n){return Sr(t,n)}addMonths(t,n){return xr(t,n)}getWeekArray(t){return lr(t,this.locale)}startOfWeek(t){return fr(t)}endOfWeek(t){return dr(t)}startOfMonth(t){return It(t)}endOfMonth(t){return $t(t)}format(t,n){return pr(t,n,this.locale,this.formats)}isEqual(t,n){return et(t,n)}isValid(t){return Ir(t)}isWithinRange(t,n){return Pr(t,n)}isAfter(t,n){return xe(t,n)}isBefore(t,n){return!xe(t,n)&&!et(t,n)}isSameDay(t,n){return Rr(t,n)}isSameMonth(t,n){return Lr(t,n)}setMinutes(t,n){return Hr(t,n)}setHours(t,n){return Br(t,n)}setMonth(t,n){return Vr(t,n)}setDate(t,n){return Yr(t,n)}setYear(t,n){return Wr(t,n)}getDiff(t,n,r){return Nr(t,n,r)}getWeekdays(){return hr(this.locale)}getYear(t){return Cr(t)}getMonth(t){return Mr(t)}getDate(t){return Ar(t)}getNextMonth(t){return Tr(t)}getHours(t){return Or(t)}getMinutes(t){return Fr(t)}startOfDay(t){return jr(t)}endOfDay(t){return zr(t)}startOfYear(t){return Er(t)}endOfYear(t){return kr(t)}}const Lt=Symbol.for("vuetify:date-options"),tt=Symbol.for("vuetify:date-adapter");function Gr(e,t){const n=x({adapter:Ur,locale:{af:"af-ZA",bg:"bg-BG",ca:"ca-ES",ckb:"",cs:"cs-CZ",de:"de-DE",el:"el-GR",en:"en-US",et:"et-EE",fa:"fa-IR",fi:"fi-FI",hr:"hr-HR",hu:"hu-HU",he:"he-IL",id:"id-ID",it:"it-IT",ja:"ja-JP",ko:"ko-KR",lv:"lv-LV",lt:"lt-LT",nl:"nl-NL",no:"no-NO",pl:"pl-PL",pt:"pt-PT",ro:"ro-RO",ru:"ru-RU",sk:"sk-SK",sl:"sl-SI",srCyrl:"sr-SP",srLatn:"sr-SP",sv:"sv-SE",th:"th-TH",tr:"tr-TR",az:"az-AZ",uk:"uk-UA",vi:"vi-VN",zhHans:"zh-CN",zhHant:"zh-TW"}},e);return{options:n,instance:Nt(n,t)}}function Nt(e,t){const n=F(typeof e.adapter=="function"?new e.adapter({locale:e.locale[t.current.value]??t.current.value,formats:e.formats}):e.adapter);return B(t.current,r=>{n.locale=e.locale[r]??r??n.locale}),n}function hs(){const e=M(Lt);if(!e)throw new Error("[Vuetify] Could not find injected date options");const t=ar();return Nt(e,t)}function ps(e,t){const n=e.toJsDate(t);let r=n.getFullYear(),o=new Date(r,0,1);if(n<o)r=r-1,o=new Date(r,0,1);else{const i=new Date(r+1,0,1);n>=i&&(r=r+1,o=i)}const s=Math.abs(n.getTime()-o.getTime()),a=Math.ceil(s/(1e3*60*60*24));return Math.floor(a/7)+1}const ys=["sm","md","lg","xl","xxl"],Ce=Symbol.for("vuetify:display"),nt={mobileBreakpoint:"lg",thresholds:{xs:0,sm:600,md:960,lg:1280,xl:1920,xxl:2560}},Kr=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nt;return x(nt,e)};function rt(e){return D&&!e?window.innerWidth:typeof e=="object"&&e.clientWidth||0}function ot(e){return D&&!e?window.innerHeight:typeof e=="object"&&e.clientHeight||0}function st(e){const t=D&&!e?window.navigator.userAgent:"ssr";function n(d){return!!t.match(d)}const r=n(/android/i),o=n(/iphone|ipad|ipod/i),s=n(/cordova/i),a=n(/electron/i),i=n(/chrome/i),u=n(/edge/i),c=n(/firefox/i),f=n(/opera/i),l=n(/win/i),m=n(/mac/i),p=n(/linux/i);return{android:r,ios:o,cordova:s,electron:a,chrome:i,edge:u,firefox:c,opera:f,win:l,mac:m,linux:p,touch:cn,ssr:t==="ssr"}}function _r(e,t){const{thresholds:n,mobileBreakpoint:r}=Kr(e),o=I(ot(t)),s=I(st(t)),a=F({}),i=I(rt(t));function u(){o.value=ot(),i.value=rt()}function c(){u(),s.value=st()}return de(()=>{const f=i.value<n.sm,l=i.value<n.md&&!f,m=i.value<n.lg&&!(l||f),p=i.value<n.xl&&!(m||l||f),d=i.value<n.xxl&&!(p||m||l||f),g=i.value>=n.xxl,y=f?"xs":l?"sm":m?"md":p?"lg":d?"xl":"xxl",P=typeof r=="number"?r:n[r],Y=i.value<P;a.xs=f,a.sm=l,a.md=m,a.lg=p,a.xl=d,a.xxl=g,a.smAndUp=!f,a.mdAndUp=!(f||l),a.lgAndUp=!(f||l||m),a.xlAndUp=!(f||l||m||p),a.smAndDown=!(m||p||d||g),a.mdAndDown=!(p||d||g),a.lgAndDown=!(d||g),a.xlAndDown=!g,a.name=y,a.height=o.value,a.width=i.value,a.mobile=Y,a.mobileBreakpoint=r,a.platform=s.value,a.thresholds=n}),D&&window.addEventListener("resize",u,{passive:!0}),{...ft(a),update:c,ssr:!!t}}const vs=V({mobileBreakpoint:[Number,String]},"display");function bs(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jn();const n=M(Ce);if(!n)throw new Error("Could not find Vuetify display injection");const r=h(()=>{if(!e.mobileBreakpoint)return n.mobile.value;const s=typeof e.mobileBreakpoint=="number"?e.mobileBreakpoint:n.thresholds.value[e.mobileBreakpoint];return n.width.value<s}),o=h(()=>t?{[`${t}--mobile`]:r.value}:{});return{...n,displayClasses:o,mobile:r}}const Zr=Symbol.for("vuetify:goto");function Xr(){return{container:void 0,duration:300,layout:!1,offset:0,easing:"easeInOutCubic",patterns:{linear:e=>e,easeInQuad:e=>e**2,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e**2:-1+(4-2*e)*e,easeInCubic:e=>e**3,easeOutCubic:e=>--e**3+1,easeInOutCubic:e=>e<.5?4*e**3:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e**4,easeOutQuart:e=>1- --e**4,easeInOutQuart:e=>e<.5?8*e**4:1-8*--e**4,easeInQuint:e=>e**5,easeOutQuint:e=>1+--e**5,easeInOutQuint:e=>e<.5?16*e**5:1+16*--e**5}}}function Qr(e,t){return{rtl:t.isRtl,options:x(Xr(),e)}}const Jr={collapse:"mdi-chevron-up",complete:"mdi-check",cancel:"mdi-close-circle",close:"mdi-close",delete:"mdi-close-circle",clear:"mdi-close-circle",success:"mdi-check-circle",info:"mdi-information",warning:"mdi-alert-circle",error:"mdi-close-circle",prev:"mdi-chevron-left",next:"mdi-chevron-right",checkboxOn:"mdi-checkbox-marked",checkboxOff:"mdi-checkbox-blank-outline",checkboxIndeterminate:"mdi-minus-box",delimiter:"mdi-circle",sortAsc:"mdi-arrow-up",sortDesc:"mdi-arrow-down",expand:"mdi-chevron-down",menu:"mdi-menu",subgroup:"mdi-menu-down",dropdown:"mdi-menu-down",radioOn:"mdi-radiobox-marked",radioOff:"mdi-radiobox-blank",edit:"mdi-pencil",ratingEmpty:"mdi-star-outline",ratingFull:"mdi-star",ratingHalf:"mdi-star-half-full",loading:"mdi-cached",first:"mdi-page-first",last:"mdi-page-last",unfold:"mdi-unfold-more-horizontal",file:"mdi-paperclip",plus:"mdi-plus",minus:"mdi-minus",calendar:"mdi-calendar",treeviewCollapse:"mdi-menu-down",treeviewExpand:"mdi-menu-right",eyeDropper:"mdi-eyedropper"},qr={component:e=>mt(Ht,{...e,class:"mdi"})},eo=[String,Function,Object,Array],Me=Symbol.for("vuetify:icons"),me=V({icon:{type:eo},tag:{type:String,required:!0}},"icon"),at=Tt()({name:"VComponentIcon",props:me(),setup(e,t){let{slots:n}=t;return()=>{const r=e.icon;return E(e.tag,null,{default:()=>[e.icon?E(r,null,null):n.default?.()]})}}}),Bt=ee({name:"VSvgIcon",inheritAttrs:!1,props:me(),setup(e,t){let{attrs:n}=t;return()=>E(e.tag,tn(n,{style:null}),{default:()=>[E("svg",{class:"v-icon__svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true"},[Array.isArray(e.icon)?e.icon.map(r=>Array.isArray(r)?E("path",{d:r[0],"fill-opacity":r[1]},null):E("path",{d:r},null)):E("path",{d:e.icon},null)])]})}}),ws=ee({name:"VLigatureIcon",props:me(),setup(e){return()=>E(e.tag,null,{default:()=>[e.icon]})}}),Ht=ee({name:"VClassIcon",props:me(),setup(e){return()=>E(e.tag,{class:e.icon},null)}});function to(){return{svg:{component:Bt},class:{component:Ht}}}function no(e){const t=to(),n=e?.defaultSet??"mdi";return n==="mdi"&&!t.mdi&&(t.mdi=qr),x({defaultSet:n,sets:t,aliases:{...Jr,vuetify:["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z",["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z",.6]],"vuetify-outline":"svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z"}},e)}const Ds=e=>{const t=M(Me);if(!t)throw new Error("Missing Vuetify Icons provide!");return{iconData:h(()=>{const r=G(e);if(!r)return{component:at};let o=r;if(typeof o=="string"&&(o=o.trim(),o.startsWith("$")&&(o=t.aliases?.[o.slice(1)])),!o)throw new Error(`Could not find aliased icon "${r}"`);if(Array.isArray(o))return{component:Bt,icon:o};if(typeof o!="string")return{component:at,icon:o};const s=Object.keys(t.sets).find(u=>typeof o=="string"&&o.startsWith(`${u}:`)),a=s?o.slice(s.length+1):o;return{component:t.sets[s??t.defaultSet].component,icon:a}})}},q=Symbol.for("vuetify:theme"),Ss=V({theme:String},"theme");function it(){return{defaultTheme:"light",variations:{colors:[],lighten:0,darken:0},themes:{light:{dark:!1,colors:{background:"#FFFFFF",surface:"#FFFFFF","surface-bright":"#FFFFFF","surface-light":"#EEEEEE","surface-variant":"#424242","on-surface-variant":"#EEEEEE",primary:"#1867C0","primary-darken-1":"#1F5592",secondary:"#48A9A6","secondary-darken-1":"#018786",error:"#B00020",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#000000","border-opacity":.12,"high-emphasis-opacity":.87,"medium-emphasis-opacity":.6,"disabled-opacity":.38,"idle-opacity":.04,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.12,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#F5F5F5","theme-on-code":"#000000"}},dark:{dark:!0,colors:{background:"#121212",surface:"#212121","surface-bright":"#ccbfd6","surface-light":"#424242","surface-variant":"#a3a3a3","on-surface-variant":"#424242",primary:"#2196F3","primary-darken-1":"#277CC1",secondary:"#54B6B2","secondary-darken-1":"#48A9A6",error:"#CF6679",info:"#2196F3",success:"#4CAF50",warning:"#FB8C00"},variables:{"border-color":"#FFFFFF","border-opacity":.12,"high-emphasis-opacity":1,"medium-emphasis-opacity":.7,"disabled-opacity":.5,"idle-opacity":.1,"hover-opacity":.04,"focus-opacity":.12,"selected-opacity":.08,"activated-opacity":.12,"pressed-opacity":.16,"dragged-opacity":.08,"theme-kbd":"#212529","theme-on-kbd":"#FFFFFF","theme-code":"#343434","theme-on-code":"#CCCCCC"}}}}}function ro(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:it();const t=it();if(!e)return{...t,isDisabled:!0};const n={};for(const[r,o]of Object.entries(e.themes??{})){const s=o.dark||r==="dark"?t.themes?.dark:t.themes?.light;n[r]=x(s,o)}return x(t,{...e,themes:n})}function oo(e){const t=ro(e),n=T(t.defaultTheme),r=T(t.themes),o=h(()=>{const f={};for(const[l,m]of Object.entries(r.value)){const p=f[l]={...m,colors:{...m.colors}};if(t.variations)for(const d of t.variations.colors){const g=p.colors[d];if(g)for(const y of["lighten","darken"]){const P=y==="lighten"?Un:Gn;for(const Y of yt(t.variations[y],1))p.colors[`${d}-${y}-${Y}`]=Mt(P(k(g),Y))}}for(const d of Object.keys(p.colors)){if(/^on-[a-z]/.test(d)||p.colors[`on-${d}`])continue;const g=`on-${d}`,y=k(p.colors[d]);p.colors[g]=Kn(y)}}return f}),s=h(()=>o.value[n.value]),a=h(()=>{const f=[];s.value?.dark&&L(f,":root",["color-scheme: dark"]),L(f,":root",ut(s.value));for(const[d,g]of Object.entries(o.value))L(f,`.v-theme--${d}`,[`color-scheme: ${g.dark?"dark":"normal"}`,...ut(g)]);const l=[],m=[],p=new Set(Object.values(o.value).flatMap(d=>Object.keys(d.colors)));for(const d of p)/^on-[a-z]/.test(d)?L(m,`.${d}`,[`color: rgb(var(--v-theme-${d})) !important`]):(L(l,`.bg-${d}`,[`--v-theme-overlay-multiplier: var(--v-theme-${d}-overlay-multiplier)`,`background-color: rgb(var(--v-theme-${d})) !important`,`color: rgb(var(--v-theme-on-${d})) !important`]),L(m,`.text-${d}`,[`color: rgb(var(--v-theme-${d})) !important`]),L(m,`.border-${d}`,[`--v-border-color: var(--v-theme-${d})`]));return f.push(...l,...m),f.map((d,g)=>g===0?d:` ${d}`).join("")});function i(){return{style:[{children:a.value,id:"vuetify-theme-stylesheet",nonce:t.cspNonce||!1}]}}function u(f){if(t.isDisabled)return;const l=f._context.provides.usehead;if(l)if(l.push){const m=l.push(i);D&&B(a,()=>{m.patch(i)})}else D?(l.addHeadObjs(h(i)),de(()=>l.updateDOM())):l.addHeadObjs(i());else{let p=function(){if(typeof document<"u"&&!m){const d=document.createElement("style");d.type="text/css",d.id="vuetify-theme-stylesheet",t.cspNonce&&d.setAttribute("nonce",t.cspNonce),m=d,document.head.appendChild(m)}m&&(m.innerHTML=a.value)},m=D?document.getElementById("vuetify-theme-stylesheet"):null;D?B(a,p,{immediate:!0}):p()}}const c=h(()=>t.isDisabled?void 0:`v-theme--${n.value}`);return{install:u,isDisabled:t.isDisabled,name:n,themes:r,current:s,computedThemes:o,themeClasses:c,styles:a,global:{name:n,current:s}}}function xs(e){O("provideTheme");const t=M(q,null);if(!t)throw new Error("Could not find Vuetify theme injection");const n=h(()=>e.theme??t.name.value),r=h(()=>t.themes.value[n.value]),o=h(()=>t.isDisabled?void 0:`v-theme--${n.value}`),s={...t,name:n,current:r,themeClasses:o};return Z(q,s),s}function Cs(){O("useTheme");const e=M(q,null);if(!e)throw new Error("Could not find Vuetify theme injection");return e}function L(e,t,n){e.push(`${t} {
|
||||||
`,...n.map(r=>` ${r};
|
`,...n.map(r=>` ${r};
|
||||||
`),`}
|
`),`}
|
||||||
`)}function ut(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[o,s]of Object.entries(e.colors)){const a=k(s);r.push(`--v-theme-${o}: ${a.r},${a.g},${a.b}`),o.startsWith("on-")||r.push(`--v-theme-${o}-overlay-multiplier: ${De(s)>.18?t:n}`)}for(const[o,s]of Object.entries(e.variables)){const a=typeof s=="string"&&s.startsWith("#")?k(s):void 0,i=a?`${a.r}, ${a.g}, ${a.b}`:void 0;r.push(`--v-${o}: ${i??s}`)}return r}function ro(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=T(),r=T();if(D){const o=new ResizeObserver(s=>{e?.(s,o),s.length&&(t==="content"?r.value=s[0].contentRect:r.value=s[0].target.getBoundingClientRect())});gt(()=>{o.disconnect()}),B(n,(s,a)=>{a&&(o.unobserve(Le(a)),r.value=void 0),s&&o.observe(Le(s))},{flush:"post"})}return{resizeRef:n,contentRect:nn(r)}}const fe=Symbol.for("vuetify:layout"),Vt=Symbol.for("vuetify:layout-item"),ct=1e3,xs=V({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),Cs=V({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function Ms(){const e=M(fe);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function As(e){const t=M(fe);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Fe()}`,r=O("useLayoutItem");Z(Vt,{id:n});const o=I(!1);on(()=>o.value=!0),sn(()=>o.value=!1);const{layoutItemStyles:s,layoutItemScrimStyles:a}=t.register(r,{...e,active:h(()=>o.value?!1:e.active.value),id:n});return gt(()=>t.unregister(n)),{layoutItemStyles:s,layoutRect:t.layoutRect,layoutItemScrimStyles:a}}const oo=(e,t,n,r)=>{let o={top:0,left:0,right:0,bottom:0};const s=[{id:"",layer:{...o}}];for(const a of e){const i=t.get(a),u=n.get(a),c=r.get(a);if(!i||!u||!c)continue;const f={...o,[i.value]:parseInt(o[i.value],10)+(c.value?parseInt(u.value,10):0)};s.push({id:a,layer:f}),o=f}return s};function Ts(e){const t=M(fe,null),n=h(()=>t?t.rootZIndex.value-100:ct),r=T([]),o=F(new Map),s=F(new Map),a=F(new Map),i=F(new Map),u=F(new Map),{resizeRef:c,contentRect:f}=ro(),l=h(()=>{const b=new Map,C=e.overlaps??[];for(const v of C.filter(S=>S.includes(":"))){const[S,w]=v.split(":");if(!r.value.includes(S)||!r.value.includes(w))continue;const W=o.get(S),$=o.get(w),X=s.get(S),Q=s.get(w);!W||!$||!X||!Q||(b.set(w,{position:W.value,amount:parseInt(X.value,10)}),b.set(S,{position:$.value,amount:-parseInt(Q.value,10)}))}return b}),m=h(()=>{const b=[...new Set([...a.values()].map(v=>v.value))].sort((v,S)=>v-S),C=[];for(const v of b){const S=r.value.filter(w=>a.get(w)?.value===v);C.push(...S)}return oo(C,o,s,i)}),p=h(()=>!Array.from(u.values()).some(b=>b.value)),d=h(()=>m.value[m.value.length-1].layer),g=h(()=>({"--v-layout-left":te(d.value.left),"--v-layout-right":te(d.value.right),"--v-layout-top":te(d.value.top),"--v-layout-bottom":te(d.value.bottom),...p.value?void 0:{transition:"none"}})),y=h(()=>m.value.slice(1).map((b,C)=>{let{id:v}=b;const{layer:S}=m.value[C],w=s.get(v),W=o.get(v);return{id:v,...S,size:Number(w.value),position:W.value}})),P=b=>y.value.find(C=>C.id===b),Y=O("createLayout"),Ee=I(!1);rn(()=>{Ee.value=!0}),Z(fe,{register:(b,C)=>{let{id:v,order:S,position:w,layoutSize:W,elementSize:$,active:X,disableTransitions:Q,absolute:jt}=C;a.set(v,S),o.set(v,w),s.set(v,W),i.set(v,X),Q&&u.set(v,Q);const ke=ae(Vt,Y?.vnode).indexOf(b);ke>-1?r.value.splice(ke,0,v):r.value.push(v);const Pe=h(()=>y.value.findIndex(J=>J.id===v)),ge=h(()=>n.value+m.value.length*2-Pe.value*2),zt=h(()=>{const J=w.value==="left"||w.value==="right",he=w.value==="right",Gt=w.value==="bottom",Ie={[w.value]:0,zIndex:ge.value,transform:`translate${J?"X":"Y"}(${(X.value?0:-110)*(he||Gt?-1:1)}%)`,position:jt.value||n.value!==ct?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!Ee.value)return Ie;const A=y.value[Pe.value];if(!A)throw new Error(`[Vuetify] Could not find layout item "${v}"`);const pe=l.value.get(v);return pe&&(A[pe.position]+=pe.amount),{...Ie,height:J?`calc(100% - ${A.top}px - ${A.bottom}px)`:$.value?`${$.value}px`:void 0,left:he?void 0:`${A.left}px`,right:he?`${A.right}px`:void 0,top:w.value!=="bottom"?`${A.top}px`:void 0,bottom:w.value!=="top"?`${A.bottom}px`:void 0,width:J?$.value?`${$.value}px`:void 0:`calc(100% - ${A.left}px - ${A.right}px)`}}),Ut=h(()=>({zIndex:ge.value-1}));return{layoutItemStyles:zt,layoutItemScrimStyles:Ut,zIndex:ge}},unregister:b=>{a.delete(b),o.delete(b),s.delete(b),i.delete(b),u.delete(b),r.value=r.value.filter(C=>C!==b)},mainRect:d,mainStyles:g,getLayoutItem:P,items:y,layoutRect:f,rootZIndex:n});const Yt=h(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),Wt=h(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:Yt,layoutStyles:Wt,getLayoutItem:P,items:y,layoutRect:f,layoutRef:c}}function so(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=x(t,n),{aliases:o={},components:s={},directives:a={}}=r,i=Zn(r.defaults),u=Gr(r.display,r.ssr),c=no(r.theme),f=eo(r.icons),l=sr(r.locale),m=zr(r.date,l),p=Zr(r.goTo,l);return{install:g=>{for(const y in a)g.directive(y,a[y]);for(const y in s)g.component(y,s[y]);for(const y in o)g.component(y,ee({...o[y],name:y,aliasName:o[y].name}));if(c.install(g),g.provide(K,i),g.provide(Ce,u),g.provide(q,c),g.provide(Me,f),g.provide(_,l),g.provide(Lt,m.options),g.provide(tt,m.instance),g.provide(Kr,p),D&&r.ssr)if(g.$nuxt)g.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:y}=g;g.mount=function(){const P=y(...arguments);return an(()=>u.update()),g.mount=y,P}}Fe.reset(),g.mixin({computed:{$vuetify(){return F({defaults:U.call(this,K),display:U.call(this,Ce),theme:U.call(this,q),icons:U.call(this,Me),locale:U.call(this,_),date:U.call(this,tt)})}}})},defaults:i,display:u,theme:c,icons:f,locale:l,date:m,goTo:p}}const ao="3.5.13";so.version=ao;function U(e){const t=this.$,n=t.parent?.provides??t.vnode.appContext?.provides;if(n&&e in n)return n[e]}export{Sn as $,bn as A,Cs as B,tr as C,un as D,As as E,gn as F,Fe as G,bo as H,ae as I,we as J,Jr as K,bs as L,Dn as M,ro as N,$o as O,To as P,D as Q,Re as R,co as S,mo as T,ts as U,ar as V,Ao as W,vo as X,ko as Y,pn as Z,ps as _,Ss as a,so as a$,ee as a0,Go as a1,fo as a2,Cn as a3,cs as a4,Ro as a5,Lo as a6,No as a7,us as a8,ie as a9,Xo as aA,Do as aB,yt as aC,go as aD,lo as aE,Zo as aF,jn as aG,Jo as aH,yo as aI,be as aJ,Fo as aK,es as aL,Uo as aM,as as aN,hs as aO,ms as aP,gs as aQ,So as aR,fs as aS,Ms as aT,xo as aU,Ve as aV,po as aW,Ht as aX,at as aY,vs as aZ,Bt as a_,Bo as aa,Ho as ab,Ft as ac,Po as ad,Le as ae,jo as af,zo as ag,ns as ah,is as ai,Io as aj,xn as ak,Ae as al,hn as am,Oo as an,wo as ao,Mn as ap,Eo as aq,Ne as ar,ho as as,Co as at,Qo as au,ye as av,H as aw,_o as ax,Wn as ay,Ct as az,xs as b,ws as c,Ds as d,Ts as e,ds as f,Tt as g,ls as h,Wo as i,os as j,ss as k,Vo as l,_n as m,Yo as n,qo as o,V as p,te as q,Mo as r,rs as s,Vn as t,ys as u,Ko as v,k as w,Kn as x,Jn as y,O as z};
|
`)}function ut(e){const t=e.dark?2:1,n=e.dark?1:2,r=[];for(const[o,s]of Object.entries(e.colors)){const a=k(s);r.push(`--v-theme-${o}: ${a.r},${a.g},${a.b}`),o.startsWith("on-")||r.push(`--v-theme-${o}-overlay-multiplier: ${De(s)>.18?t:n}`)}for(const[o,s]of Object.entries(e.variables)){const a=typeof s=="string"&&s.startsWith("#")?k(s):void 0,i=a?`${a.r}, ${a.g}, ${a.b}`:void 0;r.push(`--v-${o}: ${i??s}`)}return r}function so(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"content";const n=T(),r=T();if(D){const o=new ResizeObserver(s=>{e?.(s,o),s.length&&(t==="content"?r.value=s[0].contentRect:r.value=s[0].target.getBoundingClientRect())});gt(()=>{o.disconnect()}),B(n,(s,a)=>{a&&(o.unobserve(Le(a)),r.value=void 0),s&&o.observe(Le(s))},{flush:"post"})}return{resizeRef:n,contentRect:nn(r)}}const fe=Symbol.for("vuetify:layout"),Vt=Symbol.for("vuetify:layout-item"),ct=1e3,Ms=V({overlaps:{type:Array,default:()=>[]},fullHeight:Boolean},"layout"),As=V({name:{type:String},order:{type:[Number,String],default:0},absolute:Boolean},"layout-item");function Ts(){const e=M(fe);if(!e)throw new Error("[Vuetify] Could not find injected layout");return{getLayoutItem:e.getLayoutItem,mainRect:e.mainRect,mainStyles:e.mainStyles}}function Os(e){const t=M(fe);if(!t)throw new Error("[Vuetify] Could not find injected layout");const n=e.id??`layout-item-${Fe()}`,r=O("useLayoutItem");Z(Vt,{id:n});const o=I(!1);on(()=>o.value=!0),sn(()=>o.value=!1);const{layoutItemStyles:s,layoutItemScrimStyles:a}=t.register(r,{...e,active:h(()=>o.value?!1:e.active.value),id:n});return gt(()=>t.unregister(n)),{layoutItemStyles:s,layoutRect:t.layoutRect,layoutItemScrimStyles:a}}const ao=(e,t,n,r)=>{let o={top:0,left:0,right:0,bottom:0};const s=[{id:"",layer:{...o}}];for(const a of e){const i=t.get(a),u=n.get(a),c=r.get(a);if(!i||!u||!c)continue;const f={...o,[i.value]:parseInt(o[i.value],10)+(c.value?parseInt(u.value,10):0)};s.push({id:a,layer:f}),o=f}return s};function Fs(e){const t=M(fe,null),n=h(()=>t?t.rootZIndex.value-100:ct),r=T([]),o=F(new Map),s=F(new Map),a=F(new Map),i=F(new Map),u=F(new Map),{resizeRef:c,contentRect:f}=so(),l=h(()=>{const b=new Map,C=e.overlaps??[];for(const v of C.filter(S=>S.includes(":"))){const[S,w]=v.split(":");if(!r.value.includes(S)||!r.value.includes(w))continue;const W=o.get(S),$=o.get(w),X=s.get(S),Q=s.get(w);!W||!$||!X||!Q||(b.set(w,{position:W.value,amount:parseInt(X.value,10)}),b.set(S,{position:$.value,amount:-parseInt(Q.value,10)}))}return b}),m=h(()=>{const b=[...new Set([...a.values()].map(v=>v.value))].sort((v,S)=>v-S),C=[];for(const v of b){const S=r.value.filter(w=>a.get(w)?.value===v);C.push(...S)}return ao(C,o,s,i)}),p=h(()=>!Array.from(u.values()).some(b=>b.value)),d=h(()=>m.value[m.value.length-1].layer),g=h(()=>({"--v-layout-left":te(d.value.left),"--v-layout-right":te(d.value.right),"--v-layout-top":te(d.value.top),"--v-layout-bottom":te(d.value.bottom),...p.value?void 0:{transition:"none"}})),y=h(()=>m.value.slice(1).map((b,C)=>{let{id:v}=b;const{layer:S}=m.value[C],w=s.get(v),W=o.get(v);return{id:v,...S,size:Number(w.value),position:W.value}})),P=b=>y.value.find(C=>C.id===b),Y=O("createLayout"),Ee=I(!1);rn(()=>{Ee.value=!0}),Z(fe,{register:(b,C)=>{let{id:v,order:S,position:w,layoutSize:W,elementSize:$,active:X,disableTransitions:Q,absolute:jt}=C;a.set(v,S),o.set(v,w),s.set(v,W),i.set(v,X),Q&&u.set(v,Q);const ke=ae(Vt,Y?.vnode).indexOf(b);ke>-1?r.value.splice(ke,0,v):r.value.push(v);const Pe=h(()=>y.value.findIndex(J=>J.id===v)),ge=h(()=>n.value+m.value.length*2-Pe.value*2),zt=h(()=>{const J=w.value==="left"||w.value==="right",he=w.value==="right",Gt=w.value==="bottom",Ie={[w.value]:0,zIndex:ge.value,transform:`translate${J?"X":"Y"}(${(X.value?0:-110)*(he||Gt?-1:1)}%)`,position:jt.value||n.value!==ct?"absolute":"fixed",...p.value?void 0:{transition:"none"}};if(!Ee.value)return Ie;const A=y.value[Pe.value];if(!A)throw new Error(`[Vuetify] Could not find layout item "${v}"`);const pe=l.value.get(v);return pe&&(A[pe.position]+=pe.amount),{...Ie,height:J?`calc(100% - ${A.top}px - ${A.bottom}px)`:$.value?`${$.value}px`:void 0,left:he?void 0:`${A.left}px`,right:he?`${A.right}px`:void 0,top:w.value!=="bottom"?`${A.top}px`:void 0,bottom:w.value!=="top"?`${A.bottom}px`:void 0,width:J?$.value?`${$.value}px`:void 0:`calc(100% - ${A.left}px - ${A.right}px)`}}),Ut=h(()=>({zIndex:ge.value-1}));return{layoutItemStyles:zt,layoutItemScrimStyles:Ut,zIndex:ge}},unregister:b=>{a.delete(b),o.delete(b),s.delete(b),i.delete(b),u.delete(b),r.value=r.value.filter(C=>C!==b)},mainRect:d,mainStyles:g,getLayoutItem:P,items:y,layoutRect:f,rootZIndex:n});const Yt=h(()=>["v-layout",{"v-layout--full-height":e.fullHeight}]),Wt=h(()=>({zIndex:t?n.value:void 0,position:t?"relative":void 0,overflow:t?"hidden":void 0}));return{layoutClasses:Yt,layoutStyles:Wt,getLayoutItem:P,items:y,layoutRect:f,layoutRef:c}}function io(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{blueprint:t,...n}=e,r=x(t,n),{aliases:o={},components:s={},directives:a={}}=r,i=Zn(r.defaults),u=_r(r.display,r.ssr),c=oo(r.theme),f=no(r.icons),l=sr(r.locale),m=Gr(r.date,l),p=Qr(r.goTo,l);return{install:g=>{for(const y in a)g.directive(y,a[y]);for(const y in s)g.component(y,s[y]);for(const y in o)g.component(y,ee({...o[y],name:y,aliasName:o[y].name}));if(c.install(g),g.provide(K,i),g.provide(Ce,u),g.provide(q,c),g.provide(Me,f),g.provide(_,l),g.provide(Lt,m.options),g.provide(tt,m.instance),g.provide(Zr,p),D&&r.ssr)if(g.$nuxt)g.$nuxt.hook("app:suspense:resolve",()=>{u.update()});else{const{mount:y}=g;g.mount=function(){const P=y(...arguments);return an(()=>u.update()),g.mount=y,P}}Fe.reset(),g.mixin({computed:{$vuetify(){return F({defaults:U.call(this,K),display:U.call(this,Ce),theme:U.call(this,q),icons:U.call(this,Me),locale:U.call(this,_),date:U.call(this,tt)})}}})},defaults:i,display:u,theme:c,icons:f,locale:l,date:m,goTo:p}}const uo="3.5.15";io.version=uo;function U(e){const t=this.$,n=t.parent?.provides??t.vnode.appContext?.provides;if(n&&e in n)return n[e]}export{Sn as $,bn as A,As as B,tr as C,un as D,Os as E,gn as F,Fe as G,Do as H,ae as I,we as J,eo as K,Ds as L,Dn as M,so as N,Lo as O,Fo as P,D as Q,Re as R,fo as S,ho as T,rs as U,ar as V,Oo as W,wo as X,Io as Y,pn as Z,vs as _,Cs as a,io as a$,ee as a0,_o as a1,go as a2,Cn as a3,fs as a4,No as a5,Bo as a6,Ho as a7,ls as a8,ie as a9,Jo as aA,xo as aB,yt as aC,po as aD,mo as aE,Qo as aF,jn as aG,es as aH,bo as aI,be as aJ,ko as aK,ns as aL,Ko as aM,us as aN,ys as aO,hs as aP,ps as aQ,Co as aR,ms as aS,Ts as aT,Mo as aU,Ve as aV,vo as aW,Ht as aX,at as aY,ws as aZ,Bt as a_,Vo as aa,Yo as ab,Ft as ac,$o as ad,Le as ae,Uo as af,Go as ag,os as ah,cs as ai,Ro as aj,xn as ak,Ae as al,hn as am,Eo as an,So as ao,Mn as ap,Po as aq,Ne as ar,yo as as,Ao as at,qo as au,ye as av,H as aw,Xo as ax,Wn as ay,Ct as az,Ms as b,Ss as c,xs as d,Fs as e,gs as f,Tt as g,ds as h,zo as i,as as j,is as k,Wo as l,_n as m,jo as n,ts as o,V as p,te as q,To as r,ss as s,Vn as t,bs as u,Zo as v,k as w,Kn as x,Jn as y,O as z};
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import{E as S,U as wt,T as pe,O as Q,j as z,N as Ae,c as We,w as $,k as A,P as yt,s as Ue,K as M,L as R,b as Z,B as O,D as H,a as ze,Q as ge,V as me,W as Ie,I,X as Tt,R as j,Y as vt,Z as k,p as F,_ as Ct,$ as Bt,a0 as J,a1 as Ft,M as xe,a2 as Pt,a3 as se,n as _e,e as P,a4 as kt,__tla as __tla_0}from"./TorrentDetail-DUzghTWr.js";import{U as V,T as U,R as ae,S as Ge,i as oe,b as He,c as Le,j as Oe,e as Mt,r as De,o as Rt,n as Ee,a as At,g as Wt,k as Ut,m as zt,B as $e,__tla as __tla_1}from"./colorToUniform-DavgjoLv.js";import{C as E,__tla as __tla_2}from"./CanvasPool-CW8lNMNV.js";import{b as It,__tla as __tla_3}from"./batchSamplersUniformGroup-CKlXTtMl.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Bt9E0pwX.js";import{__tla as __tla_5}from"./index-bUuJUL5l.js";import"./vue-BSryv7ps.js";import"./vuetify-i5Qjiq6M.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-CJmQtbIM.js";let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{class Ve{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let t,r;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:n}=this._resizeTo;t=i,r=n}this.renderer.resize(t,r),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Ve.extension=S.Application;class Ye{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,wt.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?pe.shared:new pe,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Ye.extension=S.Application;class Xe{constructor(e){this._renderer=e}push(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:t,filterEffect:e})}pop(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(e){e.action==="pushFilter"?this._renderer.filter.push(e):e.action==="popFilter"&&this._renderer.filter.pop()}destroy(){this._renderer=null}}Xe.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"filter"};const Gt=new z;function Ht(s,e){return e.clear(),je(s,e),e.isValid||e.set(0,0,0,0),s.isRenderGroupRoot?e.applyMatrix(s.renderGroup.localTransform):e.applyMatrix(s.renderGroup.worldTransform),e}function je(s,e){if(s.localDisplayStatus!==7||!s.measurable)return;const t=!!s.effects.length;let r=e;if((s.isRenderGroupRoot||t)&&(r=Q.get().clear()),s.boundsArea)e.addRect(s.boundsArea,s.worldTransform);else{if(s.renderPipeId){const n=s.bounds;r.addFrame(n.minX,n.minY,n.maxX,n.maxY,s.groupTransform)}const i=s.children;for(let n=0;n<i.length;n++)je(i[n],r)}if(t){let i=!1;for(let n=0;n<s.effects.length;n++)s.effects[n].addBounds&&(i||(i=!0,r.applyMatrix(s.renderGroup.worldTransform)),s.effects[n].addBounds(r,!0));i&&(r.applyMatrix(s.renderGroup.worldTransform.copyTo(Gt).invert()),e.addBounds(r,s.relativeGroupTransform)),e.addBounds(r),Q.return(r)}else s.isRenderGroupRoot&&(e.addBounds(r,s.relativeGroupTransform),Q.return(r))}function Lt(s,e){e.clear();const t=e.matrix;for(let r=0;r<s.length;r++){const i=s[r];i.globalDisplayStatus<7||(e.matrix=i.worldTransform,i.addBounds(e))}return e.matrix=t,e}const Ot=new Ae({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),location:0,format:"float32x2",stride:2*4,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])});class Ke{constructor(e){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new V({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new We({}),this.renderer=e}get activeBackTexture(){return this._activeFilterData?.backTexture}push(e){const t=this.renderer,r=e.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());const i=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,r.length===0){i.skip=!0;return}const n=i.bounds;e.renderables?Lt(e.renderables,n):e.filterEffect.filterArea?(n.clear(),n.addRect(e.filterEffect.filterArea),n.applyMatrix(e.container.worldTransform)):Ht(e.container,n);const a=t.renderTarget.rootRenderTarget.colorTexture.source;let o=a._resolution,c=0,h=a.antialias,l=!1,d=!1;for(let f=0;f<r.length;f++){const u=r[f];if(o=Math.min(o,u.resolution),c+=u.padding,u.antialias!=="inherit"&&(u.antialias==="on"?h=!0:h=!1),!!!(u.compatibleRenderers&t.type)){d=!1;break}if(u.blendRequired&&!(t.backBuffer?.useBackBuffer??!0)){$("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),d=!1;break}d=u.enabled||d,l=l||u.blendRequired}if(!d){i.skip=!0;return}if(n.scale(o).fit(t.renderTarget.rootViewPort).scale(1/o).pad(c).ceil(),!n.isPositive){i.skip=!0;return}i.skip=!1,i.bounds=n,i.blendRequired=l,i.container=e.container,i.filterEffect=e.filterEffect,i.previousRenderSurface=t.renderTarget.renderSurface,i.inputTexture=U.getOptimalTexture(n.width,n.height,o,h),t.renderTarget.bind(i.inputTexture,!0),t.globalUniforms.push({offset:n})}pop(){const e=this.renderer;this._filterStackIndex--;const t=this._filterStack[this._filterStackIndex];if(t.skip)return;this._activeFilterData=t;const r=t.inputTexture,i=t.bounds;let n=A.EMPTY;if(e.renderTarget.finishRenderPass(),t.blendRequired){const o=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,c=e.renderTarget.getRenderTarget(t.previousRenderSurface);n=this.getBackTexture(c,i,o)}t.backTexture=n;const a=t.filterEffect.filters;if(this._globalFilterBindGroup.setResource(r.source.style,2),this._globalFilterBindGroup.setResource(n.source,3),e.globalUniforms.pop(),a.length===1)a[0].apply(this,r,t.previousRenderSurface,!1),U.returnTexture(r);else{let o=t.inputTexture,c=U.getOptimalTexture(i.width,i.height,o.source._resolution,!1),h=0;for(h=0;h<a.length-1;++h){a[h].apply(this,o,c,!0);const d=o;o=c,c=d}a[h].apply(this,o,t.previousRenderSurface,!1),U.returnTexture(o),U.returnTexture(c)}t.blendRequired&&U.returnTexture(n)}getBackTexture(e,t,r){const i=e.colorTexture.source._resolution,n=U.getOptimalTexture(t.width,t.height,i,!1);let a=t.minX,o=t.minY;r&&(a-=r.minX,o-=r.minY),a=Math.floor(a*i),o=Math.floor(o*i);const c=Math.ceil(t.width*i),h=Math.ceil(t.height*i);return this.renderer.renderTarget.copyToTexture(e,n,{x:a,y:o},{width:c,height:h},{x:0,y:0}),n}applyFilter(e,t,r,i){const n=this.renderer,a=this._filterStack[this._filterStackIndex],o=a.bounds,c=yt.shared,l=a.previousRenderSurface===r;let d=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,f=this._filterStackIndex-1;for(;f>0&&this._filterStack[f].skip;)--f;f>0&&(d=this._filterStack[f].inputTexture.source._resolution);const u=this._filterGlobalUniforms,p=u.uniforms,m=p.uOutputFrame,x=p.uInputSize,_=p.uInputPixel,b=p.uInputClamp,w=p.uGlobalFrame,y=p.uOutputTexture;if(l){let v=this._filterStackIndex;for(;v>0;){v--;const T=this._filterStack[this._filterStackIndex-1];if(!T.skip){c.x=T.bounds.minX,c.y=T.bounds.minY;break}}m[0]=o.minX-c.x,m[1]=o.minY-c.y}else m[0]=0,m[1]=0;m[2]=t.frame.width,m[3]=t.frame.height,x[0]=t.source.width,x[1]=t.source.height,x[2]=1/x[0],x[3]=1/x[1],_[0]=t.source.pixelWidth,_[1]=t.source.pixelHeight,_[2]=1/_[0],_[3]=1/_[1],b[0]=.5*_[2],b[1]=.5*_[3],b[2]=t.frame.width*x[2]-.5*_[2],b[3]=t.frame.height*x[3]-.5*_[3];const C=this.renderer.renderTarget.rootRenderTarget.colorTexture;w[0]=c.x*d,w[1]=c.y*d,w[2]=C.source.width*d,w[3]=C.source.height*d;const B=this.renderer.renderTarget.getRenderTarget(r);if(n.renderTarget.bind(r,!!i),r instanceof A?(y[0]=r.frame.width,y[1]=r.frame.height):(y[0]=B.width,y[1]=B.height),y[2]=B.isRoot?-1:1,u.update(),n.renderPipes.uniformBatch){const v=n.renderPipes.uniformBatch.getUboResource(u);this._globalFilterBindGroup.setResource(v,0)}else this._globalFilterBindGroup.setResource(u,0);this._globalFilterBindGroup.setResource(t.source,1),this._globalFilterBindGroup.setResource(t.source.style,2),e.groups[0]=this._globalFilterBindGroup,n.encoder.draw({geometry:Ot,shader:e,state:e._state,topology:"triangle-list"}),n.type===ae.WEBGL&&n.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new Ue,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(e,t){const r=this._activeFilterData,i=e.set(r.inputTexture._source.width,0,0,r.inputTexture._source.height,r.bounds.minX,r.bounds.minY),n=t.worldTransform.copyTo(z.shared);return n.invert(),i.prepend(n),i.scale(1/t.texture.frame.width,1/t.texture.frame.height),i.translate(t.anchor.x,t.anchor.y),i}}Ke.extension={type:[S.WebGLSystem,S.WebGPUSystem],name:"filter"};const Ne=class qe extends Ae{constructor(...e){let t=e[0]??{};t instanceof Float32Array&&(M(R,"use new MeshGeometry({ positions, uvs, indices }) instead"),t={positions:t,uvs:e[1],indices:e[2]}),t={...qe.defaultOptions,...t};const r=t.positions||new Float32Array([0,0,1,0,1,1,0,1]),i=t.uvs||new Float32Array([0,0,1,0,1,1,0,1]),n=t.indices||new Uint32Array([0,1,2,0,2,3]),a=t.shrinkBuffersToFit,o=new Z({data:r,label:"attribute-mesh-positions",shrinkToFit:a,usage:O.VERTEX|O.COPY_DST}),c=new Z({data:i,label:"attribute-mesh-uvs",shrinkToFit:a,usage:O.VERTEX|O.COPY_DST}),h=new Z({data:n,label:"index-mesh-buffer",shrinkToFit:a,usage:O.INDEX|O.COPY_DST});super({attributes:{aPosition:{buffer:o,format:"float32x2",stride:2*4,offset:0},aUV:{buffer:c,format:"float32x2",stride:2*4,offset:0}},indexBuffer:h,topology:t.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(e){this.attributes.aPosition.buffer.data=e}get uvs(){return this.attributes.aUV.buffer.data}set uvs(e){this.attributes.aUV.buffer.data=e}get indices(){return this.indexBuffer.data}set indices(e){this.indexBuffer.data=e}};Ne.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};let ce=Ne;const Dt=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function K(s){const e=typeof s.fontSize=="number"?`${s.fontSize}px`:s.fontSize;let t=s.fontFamily;Array.isArray(s.fontFamily)||(t=s.fontFamily.split(","));for(let r=t.length-1;r>=0;r--){let i=t[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!Dt.includes(i)&&(i=`"${i}"`),t[r]=i}return`${s.fontStyle} ${s.fontVariant} ${s.fontWeight} ${e} ${t.join(",")}`}const ee={willReadFrequently:!0},W=class g{static get experimentalLetterSpacingSupported(){let e=g._experimentalLetterSpacingSupported;if(e!==void 0){const t=H.get().getCanvasRenderingContext2D().prototype;e=g._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,r,i,n,a,o,c,h){this.text=e,this.style=t,this.width=r,this.height=i,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=c,this.fontProperties=h}static measureText(e=" ",t,r=g._canvas,i=t.wordWrap){const n=`${e}:${t.styleKey}`;if(g._measurementCache[n])return g._measurementCache[n];const a=K(t),o=g.measureFont(a);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const c=g.__context;c.font=a;const l=(i?g._wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(l.length);let f=0;for(let b=0;b<l.length;b++){const w=g._measureText(l[b],t.letterSpacing,c);d[b]=w,f=Math.max(f,w)}const u=t._stroke?.width||0;let p=f+u;t.dropShadow&&(p+=t.dropShadow.distance);const m=t.lineHeight||o.fontSize+u;let x=Math.max(m,o.fontSize+u*2)+(l.length-1)*(m+t.leading);return t.dropShadow&&(x+=t.dropShadow.distance),new g(e,t,p,x,l,d,m+t.leading,f,o)}static _measureText(e,t,r){let i=!1;g.experimentalLetterSpacingSupported&&(g.experimentalLetterSpacing?(r.letterSpacing=`${t}px`,r.textLetterSpacing=`${t}px`,i=!0):(r.letterSpacing="0px",r.textLetterSpacing="0px"));let n=r.measureText(e).width;return n>0&&(i?n-=t:n+=(g.graphemeSegmenter(e).length-1)*t),n}static _wordWrap(e,t,r=g._canvas){const i=r.getContext("2d",ee);let n=0,a="",o="";const c=Object.create(null),{letterSpacing:h,whiteSpace:l}=t,d=g._collapseSpaces(l),f=g._collapseNewlines(l);let u=!d;const p=t.wordWrapWidth+h,m=g._tokenize(e);for(let x=0;x<m.length;x++){let _=m[x];if(g._isNewline(_)){if(!f){o+=g._addLine(a),u=!d,a="",n=0;continue}_=" "}if(d){const w=g.isBreakingSpace(_),y=g.isBreakingSpace(a[a.length-1]);if(w&&y)continue}const b=g._getFromCache(_,h,c,i);if(b>p)if(a!==""&&(o+=g._addLine(a),a="",n=0),g.canBreakWords(_,t.breakWords)){const w=g.wordWrapSplit(_);for(let y=0;y<w.length;y++){let C=w[y],B=C,v=1;for(;w[y+v];){const L=w[y+v];if(!g.canBreakChars(B,L,_,y,t.breakWords))C+=L;else break;B=L,v++}y+=v-1;const T=g._getFromCache(C,h,c,i);T+n>p&&(o+=g._addLine(a),u=!1,a="",n=0),a+=C,n+=T}}else{a.length>0&&(o+=g._addLine(a),a="",n=0);const w=x===m.length-1;o+=g._addLine(_,!w),u=!1,a="",n=0}else b+n>p&&(u=!1,o+=g._addLine(a),a="",n=0),(a.length>0||!g.isBreakingSpace(_)||u)&&(a+=_,n+=b)}return o+=g._addLine(a,!1),o}static _addLine(e,t=!0){return e=g._trimRight(e),e=t?`${e}
|
import{E as S,U as wt,T as pe,O as Q,j as z,N as Ae,c as We,w as $,k as A,P as yt,s as Ue,K as M,L as R,b as Z,B as O,D as H,a as ze,Q as ge,V as me,W as Ie,I,X as Tt,R as j,Y as vt,Z as k,p as F,_ as Ct,$ as Bt,a0 as J,a1 as Ft,M as xe,a2 as Pt,a3 as se,n as _e,e as P,a4 as kt,__tla as __tla_0}from"./TorrentDetail-BJ8OBcoO.js";import{U as V,T as U,R as ae,S as Ge,i as oe,b as He,c as Le,j as Oe,e as Mt,r as De,o as Rt,n as Ee,a as At,g as Wt,k as Ut,m as zt,B as $e,__tla as __tla_1}from"./colorToUniform-Bf80N278.js";import{C as E,__tla as __tla_2}from"./CanvasPool-E3p4G6BL.js";import{b as It,__tla as __tla_3}from"./batchSamplersUniformGroup-CKEGmRNN.js";import{__tla as __tla_4}from"./MoveTorrentDialog.vue_vue_type_script_setup_true_lang-Cz5dpnUF.js";import{__tla as __tla_5}from"./index-CfNDsQKB.js";import"./vue--7UcA1iU.js";import"./vuetify-GhifFkZ7.js";import"./FileIcon-DH65fwz5.js";import{__tla as __tla_6}from"./MoveTorrentFileDialog.vue_vue_type_script_setup_true_lang-BvP4_KF0.js";let __tla=Promise.all([(()=>{try{return __tla_0}catch{}})(),(()=>{try{return __tla_1}catch{}})(),(()=>{try{return __tla_2}catch{}})(),(()=>{try{return __tla_3}catch{}})(),(()=>{try{return __tla_4}catch{}})(),(()=>{try{return __tla_5}catch{}})(),(()=>{try{return __tla_6}catch{}})()]).then(async()=>{class Ve{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let t,r;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,r=globalThis.innerHeight;else{const{clientWidth:i,clientHeight:n}=this._resizeTo;t=i,r=n}this.renderer.resize(t,r),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}Ve.extension=S.Application;class Ye{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,wt.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?pe.shared:new pe,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}Ye.extension=S.Application;class Xe{constructor(e){this._renderer=e}push(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:t,filterEffect:e})}pop(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(e){e.action==="pushFilter"?this._renderer.filter.push(e):e.action==="popFilter"&&this._renderer.filter.pop()}destroy(){this._renderer=null}}Xe.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"filter"};const Gt=new z;function Ht(s,e){return e.clear(),je(s,e),e.isValid||e.set(0,0,0,0),s.isRenderGroupRoot?e.applyMatrix(s.renderGroup.localTransform):e.applyMatrix(s.renderGroup.worldTransform),e}function je(s,e){if(s.localDisplayStatus!==7||!s.measurable)return;const t=!!s.effects.length;let r=e;if((s.isRenderGroupRoot||t)&&(r=Q.get().clear()),s.boundsArea)e.addRect(s.boundsArea,s.worldTransform);else{if(s.renderPipeId){const n=s.bounds;r.addFrame(n.minX,n.minY,n.maxX,n.maxY,s.groupTransform)}const i=s.children;for(let n=0;n<i.length;n++)je(i[n],r)}if(t){let i=!1;for(let n=0;n<s.effects.length;n++)s.effects[n].addBounds&&(i||(i=!0,r.applyMatrix(s.renderGroup.worldTransform)),s.effects[n].addBounds(r,!0));i&&(r.applyMatrix(s.renderGroup.worldTransform.copyTo(Gt).invert()),e.addBounds(r,s.relativeGroupTransform)),e.addBounds(r),Q.return(r)}else s.isRenderGroupRoot&&(e.addBounds(r,s.relativeGroupTransform),Q.return(r))}function Lt(s,e){e.clear();const t=e.matrix;for(let r=0;r<s.length;r++){const i=s[r];i.globalDisplayStatus<7||(e.matrix=i.worldTransform,i.addBounds(e))}return e.matrix=t,e}const Ot=new Ae({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),location:0,format:"float32x2",stride:2*4,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])});class Ke{constructor(e){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new V({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new We({}),this.renderer=e}get activeBackTexture(){return this._activeFilterData?.backTexture}push(e){const t=this.renderer,r=e.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());const i=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,r.length===0){i.skip=!0;return}const n=i.bounds;e.renderables?Lt(e.renderables,n):e.filterEffect.filterArea?(n.clear(),n.addRect(e.filterEffect.filterArea),n.applyMatrix(e.container.worldTransform)):Ht(e.container,n);const a=t.renderTarget.rootRenderTarget.colorTexture.source;let o=a._resolution,c=0,h=a.antialias,l=!1,d=!1;for(let u=0;u<r.length;u++){const p=r[u];if(o=Math.min(o,p.resolution),c+=p.padding,p.antialias!=="inherit"&&(p.antialias==="on"?h=!0:h=!1),!!!(p.compatibleRenderers&t.type)){d=!1;break}if(p.blendRequired&&!(t.backBuffer?.useBackBuffer??!0)){$("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),d=!1;break}d=p.enabled||d,l=l||p.blendRequired}if(!d){i.skip=!0;return}const f=t.renderTarget.rootViewPort;if(n.scale(o).fitBounds(0,f.width,0,f.height).scale(1/o).pad(c).ceil(),!n.isPositive){i.skip=!0;return}i.skip=!1,i.bounds=n,i.blendRequired=l,i.container=e.container,i.filterEffect=e.filterEffect,i.previousRenderSurface=t.renderTarget.renderSurface,i.inputTexture=U.getOptimalTexture(n.width,n.height,o,h),t.renderTarget.bind(i.inputTexture,!0),t.globalUniforms.push({offset:n})}pop(){const e=this.renderer;this._filterStackIndex--;const t=this._filterStack[this._filterStackIndex];if(t.skip)return;this._activeFilterData=t;const r=t.inputTexture,i=t.bounds;let n=A.EMPTY;if(e.renderTarget.finishRenderPass(),t.blendRequired){const o=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,c=e.renderTarget.getRenderTarget(t.previousRenderSurface);n=this.getBackTexture(c,i,o)}t.backTexture=n;const a=t.filterEffect.filters;if(this._globalFilterBindGroup.setResource(r.source.style,2),this._globalFilterBindGroup.setResource(n.source,3),e.globalUniforms.pop(),a.length===1)a[0].apply(this,r,t.previousRenderSurface,!1),U.returnTexture(r);else{let o=t.inputTexture,c=U.getOptimalTexture(i.width,i.height,o.source._resolution,!1),h=0;for(h=0;h<a.length-1;++h){a[h].apply(this,o,c,!0);const d=o;o=c,c=d}a[h].apply(this,o,t.previousRenderSurface,!1),U.returnTexture(o),U.returnTexture(c)}t.blendRequired&&U.returnTexture(n)}getBackTexture(e,t,r){const i=e.colorTexture.source._resolution,n=U.getOptimalTexture(t.width,t.height,i,!1);let a=t.minX,o=t.minY;r&&(a-=r.minX,o-=r.minY),a=Math.floor(a*i),o=Math.floor(o*i);const c=Math.ceil(t.width*i),h=Math.ceil(t.height*i);return this.renderer.renderTarget.copyToTexture(e,n,{x:a,y:o},{width:c,height:h},{x:0,y:0}),n}applyFilter(e,t,r,i){const n=this.renderer,a=this._filterStack[this._filterStackIndex],o=a.bounds,c=yt.shared,l=a.previousRenderSurface===r;let d=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,f=this._filterStackIndex-1;for(;f>0&&this._filterStack[f].skip;)--f;f>0&&(d=this._filterStack[f].inputTexture.source._resolution);const u=this._filterGlobalUniforms,p=u.uniforms,m=p.uOutputFrame,x=p.uInputSize,_=p.uInputPixel,b=p.uInputClamp,w=p.uGlobalFrame,y=p.uOutputTexture;if(l){let v=this._filterStackIndex;for(;v>0;){v--;const T=this._filterStack[this._filterStackIndex-1];if(!T.skip){c.x=T.bounds.minX,c.y=T.bounds.minY;break}}m[0]=o.minX-c.x,m[1]=o.minY-c.y}else m[0]=0,m[1]=0;m[2]=t.frame.width,m[3]=t.frame.height,x[0]=t.source.width,x[1]=t.source.height,x[2]=1/x[0],x[3]=1/x[1],_[0]=t.source.pixelWidth,_[1]=t.source.pixelHeight,_[2]=1/_[0],_[3]=1/_[1],b[0]=.5*_[2],b[1]=.5*_[3],b[2]=t.frame.width*x[2]-.5*_[2],b[3]=t.frame.height*x[3]-.5*_[3];const C=this.renderer.renderTarget.rootRenderTarget.colorTexture;w[0]=c.x*d,w[1]=c.y*d,w[2]=C.source.width*d,w[3]=C.source.height*d;const B=this.renderer.renderTarget.getRenderTarget(r);if(n.renderTarget.bind(r,!!i),r instanceof A?(y[0]=r.frame.width,y[1]=r.frame.height):(y[0]=B.width,y[1]=B.height),y[2]=B.isRoot?-1:1,u.update(),n.renderPipes.uniformBatch){const v=n.renderPipes.uniformBatch.getUboResource(u);this._globalFilterBindGroup.setResource(v,0)}else this._globalFilterBindGroup.setResource(u,0);this._globalFilterBindGroup.setResource(t.source,1),this._globalFilterBindGroup.setResource(t.source.style,2),e.groups[0]=this._globalFilterBindGroup,n.encoder.draw({geometry:Ot,shader:e,state:e._state,topology:"triangle-list"}),n.type===ae.WEBGL&&n.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new Ue,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(e,t){const r=this._activeFilterData,i=e.set(r.inputTexture._source.width,0,0,r.inputTexture._source.height,r.bounds.minX,r.bounds.minY),n=t.worldTransform.copyTo(z.shared);return n.invert(),i.prepend(n),i.scale(1/t.texture.frame.width,1/t.texture.frame.height),i.translate(t.anchor.x,t.anchor.y),i}}Ke.extension={type:[S.WebGLSystem,S.WebGPUSystem],name:"filter"};const Ne=class qe extends Ae{constructor(...e){let t=e[0]??{};t instanceof Float32Array&&(M(R,"use new MeshGeometry({ positions, uvs, indices }) instead"),t={positions:t,uvs:e[1],indices:e[2]}),t={...qe.defaultOptions,...t};const r=t.positions||new Float32Array([0,0,1,0,1,1,0,1]),i=t.uvs||new Float32Array([0,0,1,0,1,1,0,1]),n=t.indices||new Uint32Array([0,1,2,0,2,3]),a=t.shrinkBuffersToFit,o=new Z({data:r,label:"attribute-mesh-positions",shrinkToFit:a,usage:O.VERTEX|O.COPY_DST}),c=new Z({data:i,label:"attribute-mesh-uvs",shrinkToFit:a,usage:O.VERTEX|O.COPY_DST}),h=new Z({data:n,label:"index-mesh-buffer",shrinkToFit:a,usage:O.INDEX|O.COPY_DST});super({attributes:{aPosition:{buffer:o,format:"float32x2",stride:2*4,offset:0},aUV:{buffer:c,format:"float32x2",stride:2*4,offset:0}},indexBuffer:h,topology:t.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(e){this.attributes.aPosition.buffer.data=e}get uvs(){return this.attributes.aUV.buffer.data}set uvs(e){this.attributes.aUV.buffer.data=e}get indices(){return this.indexBuffer.data}set indices(e){this.indexBuffer.data=e}};Ne.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};let ce=Ne;const Dt=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function K(s){const e=typeof s.fontSize=="number"?`${s.fontSize}px`:s.fontSize;let t=s.fontFamily;Array.isArray(s.fontFamily)||(t=s.fontFamily.split(","));for(let r=t.length-1;r>=0;r--){let i=t[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!Dt.includes(i)&&(i=`"${i}"`),t[r]=i}return`${s.fontStyle} ${s.fontVariant} ${s.fontWeight} ${e} ${t.join(",")}`}const ee={willReadFrequently:!0},W=class g{static get experimentalLetterSpacingSupported(){let e=g._experimentalLetterSpacingSupported;if(e!==void 0){const t=H.get().getCanvasRenderingContext2D().prototype;e=g._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,r,i,n,a,o,c,h){this.text=e,this.style=t,this.width=r,this.height=i,this.lines=n,this.lineWidths=a,this.lineHeight=o,this.maxLineWidth=c,this.fontProperties=h}static measureText(e=" ",t,r=g._canvas,i=t.wordWrap){const n=`${e}:${t.styleKey}`;if(g._measurementCache[n])return g._measurementCache[n];const a=K(t),o=g.measureFont(a);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const c=g.__context;c.font=a;const l=(i?g._wordWrap(e,t,r):e).split(/(?:\r\n|\r|\n)/),d=new Array(l.length);let f=0;for(let b=0;b<l.length;b++){const w=g._measureText(l[b],t.letterSpacing,c);d[b]=w,f=Math.max(f,w)}const u=t._stroke?.width||0;let p=f+u;t.dropShadow&&(p+=t.dropShadow.distance);const m=t.lineHeight||o.fontSize+u;let x=Math.max(m,o.fontSize+u*2)+(l.length-1)*(m+t.leading);return t.dropShadow&&(x+=t.dropShadow.distance),new g(e,t,p,x,l,d,m+t.leading,f,o)}static _measureText(e,t,r){let i=!1;g.experimentalLetterSpacingSupported&&(g.experimentalLetterSpacing?(r.letterSpacing=`${t}px`,r.textLetterSpacing=`${t}px`,i=!0):(r.letterSpacing="0px",r.textLetterSpacing="0px"));let n=r.measureText(e).width;return n>0&&(i?n-=t:n+=(g.graphemeSegmenter(e).length-1)*t),n}static _wordWrap(e,t,r=g._canvas){const i=r.getContext("2d",ee);let n=0,a="",o="";const c=Object.create(null),{letterSpacing:h,whiteSpace:l}=t,d=g._collapseSpaces(l),f=g._collapseNewlines(l);let u=!d;const p=t.wordWrapWidth+h,m=g._tokenize(e);for(let x=0;x<m.length;x++){let _=m[x];if(g._isNewline(_)){if(!f){o+=g._addLine(a),u=!d,a="",n=0;continue}_=" "}if(d){const w=g.isBreakingSpace(_),y=g.isBreakingSpace(a[a.length-1]);if(w&&y)continue}const b=g._getFromCache(_,h,c,i);if(b>p)if(a!==""&&(o+=g._addLine(a),a="",n=0),g.canBreakWords(_,t.breakWords)){const w=g.wordWrapSplit(_);for(let y=0;y<w.length;y++){let C=w[y],B=C,v=1;for(;w[y+v];){const L=w[y+v];if(!g.canBreakChars(B,L,_,y,t.breakWords))C+=L;else break;B=L,v++}y+=v-1;const T=g._getFromCache(C,h,c,i);T+n>p&&(o+=g._addLine(a),u=!1,a="",n=0),a+=C,n+=T}}else{a.length>0&&(o+=g._addLine(a),a="",n=0);const w=x===m.length-1;o+=g._addLine(_,!w),u=!1,a="",n=0}else b+n>p&&(u=!1,o+=g._addLine(a),a="",n=0),(a.length>0||!g.isBreakingSpace(_)||u)&&(a+=_,n+=b)}return o+=g._addLine(a,!1),o}static _addLine(e,t=!0){return e=g._trimRight(e),e=t?`${e}
|
||||||
`:e,e}static _getFromCache(e,t,r,i){let n=r[e];return typeof n!="number"&&(n=g._measureText(e,t,i)+t,r[e]=n),n}static _collapseSpaces(e){return e==="normal"||e==="pre-line"}static _collapseNewlines(e){return e==="normal"}static _trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const r=e[t];if(!g.isBreakingSpace(r))break;e=e.slice(0,-1)}return e}static _isNewline(e){return typeof e!="string"?!1:g._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:g._breakingSpaces.includes(e.charCodeAt(0))}static _tokenize(e){const t=[];let r="";if(typeof e!="string")return t;for(let i=0;i<e.length;i++){const n=e[i],a=e[i+1];if(g.isBreakingSpace(n,a)||g._isNewline(n)){r!==""&&(t.push(r),r=""),t.push(n);continue}r+=n}return r!==""&&t.push(r),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,r,i,n){return!0}static wordWrapSplit(e){return g.graphemeSegmenter(e)}static measureFont(e){if(g._fonts[e])return g._fonts[e];const t=g._context;t.font=e;const r=t.measureText(g.METRICS_STRING+g.BASELINE_SYMBOL),i={ascent:r.actualBoundingBoxAscent,descent:r.actualBoundingBoxDescent,fontSize:r.actualBoundingBoxAscent+r.actualBoundingBoxDescent};return g._fonts[e]=i,i}static clearMetrics(e=""){e?delete g._fonts[e]:g._fonts={}}static get _canvas(){if(!g.__canvas){let e;try{const t=new OffscreenCanvas(0,0);if(t.getContext("2d",ee)?.measureText)return g.__canvas=t,t;e=H.get().createCanvas()}catch{e=H.get().createCanvas()}e.width=e.height=10,g.__canvas=e}return g.__canvas}static get _context(){return g.__context||(g.__context=g._canvas.getContext("2d",ee)),g.__context}};W.METRICS_STRING="|\xc9q\xc5";W.BASELINE_SYMBOL="M";W.BASELINE_MULTIPLIER=1.4;W.HEIGHT_MULTIPLIER=2;W.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})();W.experimentalLetterSpacing=!1;W._fonts={};W._newlines=[10,13];W._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];W._measurementCache={};let G=W;const be=["_fontFamily","_fontStyle","_fontSize","_fontVariant","_fontWeight","_breakWords","_align","_leading","_letterSpacing","_lineHeight","_textBaseline","_whiteSpace","_wordWrap","_wordWrapWidth","_padding","_cssOverrides","_trim"];function Qe(s){const e=[];let t=0;for(let r=0;r<be.length;r++){const i=be[r];e[t++]=s[i]}return t=Ze(s._fill,e,t),t=Et(s._stroke,e,t),e.join("-")}function Ze(s,e,t){return s&&(e[t++]=s.color,e[t++]=s.alpha,e[t++]=s.fill?.uid),t}function Et(s,e,t){return s&&(t=Ze(s,e,t),e[t++]=s.width,e[t++]=s.alignment,e[t++]=s.cap,e[t++]=s.join,e[t++]=s.miterLimit),t}const le=class D extends ze{constructor(e={}){super(),$t(e);const t={...D.defaultTextStyle,...e};for(const r in t){const i=r;this[i]=t[r]}this.update()}get align(){return this._align}set align(e){this._align=e,this.update()}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords=e,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(e){e!==null&&typeof e=="object"?this._dropShadow={...D.defaultDropShadow,...e}:this._dropShadow=e?{...D.defaultDropShadow}:null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(e){this._fontFamily=e,this.update()}get fontSize(){return this._fontSize}set fontSize(e){typeof e=="string"?this._fontSize=parseInt(e,10):this._fontSize=e,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle=e,this.update()}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant=e,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight=e,this.update()}get leading(){return this._leading}set leading(e){this._leading=e,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing=e,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight=e,this.update()}get padding(){return this._padding}set padding(e){this._padding=e,this.update()}get trim(){return this._trim}set trim(e){this._trim=e,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline=e,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace=e,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap=e,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth=e,this.update()}get fill(){return this._originalFill}set fill(e){e!==this._originalFill&&(this._originalFill=e,this._fill=ge(e===0?"black":e,me.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(e){e!==this._originalStroke&&(this._originalStroke=e,this._stroke=ge(e,me.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=Qe(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){const e=D.defaultTextStyle;for(const t in e)this[t]=e[t]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new D({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(e=!1){if(this.removeAllListeners(),typeof e=="boolean"?e:e?.texture){const r=typeof e=="boolean"?e:e?.textureSource;this._fill?.texture&&this._fill.texture.destroy(r),this._originalFill?.texture&&this._originalFill.texture.destroy(r),this._stroke?.texture&&this._stroke.texture.destroy(r),this._originalStroke?.texture&&this._originalStroke.texture.destroy(r)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}};le.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};le.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let N=le;function $t(s){const e=s;if(typeof e.dropShadow=="boolean"&&e.dropShadow){const t=N.defaultDropShadow;s.dropShadow={alpha:e.dropShadowAlpha??t.alpha,angle:e.dropShadowAngle??t.angle,blur:e.dropShadowBlur??t.blur,color:e.dropShadowColor??t.color,distance:e.dropShadowDistance??t.distance}}if(e.strokeThickness){M(R,"strokeThickness is now a part of stroke");const t=e.stroke;s.stroke={color:t,width:e.strokeThickness}}if(Array.isArray(e.fill)){M(R,"gradient fill is now a fill pattern: `new FillGradient(...)`");const t=new Ie(0,0,0,s.fontSize*1.7),r=e.fill.map(i=>I.shared.setValue(i).toNumber());r.forEach((i,n)=>{const a=e.fillGradientStops[n]??n/r.length;t.addColorStop(a,i)}),s.fill={fill:t}}}function q(s,e){if(s.texture===A.WHITE&&!s.fill)return I.shared.setValue(s.color).toHex();if(s.fill){if(s.fill instanceof Tt){const t=s.fill,r=e.createPattern(t.texture.source.resource,"repeat"),i=t.transform.copyTo(z.shared);return i.scale(t.texture.frame.width,t.texture.frame.height),r.setTransform(i),r}else if(s.fill instanceof Ie){const t=s.fill;if(t.type==="linear"){const r=e.createLinearGradient(t.x0,t.y0,t.x1,t.y1);return t.gradientStops.forEach(i=>{r.addColorStop(i.offset,I.shared.setValue(i.color).toHex())}),r}}}else{const t=e.createPattern(s.texture.source.resource,"repeat"),r=s.matrix.copyTo(z.shared);return r.scale(s.texture.frame.width,s.texture.frame.height),t.setTransform(r),t}return $("FillStyle not recognised",s),"red"}class Je extends ze{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return M(R,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return M(R,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return M(R,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return M(R,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return M(R,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(e=!1){this.emit("destroy",this),this.removeAllListeners();for(const t in this.chars)this.chars[t].texture.destroy();this.chars=null,e&&(this.pages.forEach(t=>t.texture.destroy(!0)),this.pages=null)}}function et(s){if(s==="")return[];typeof s=="string"&&(s=[s]);const e=[];for(let t=0,r=s.length;t<r;t++){const i=s[t];if(Array.isArray(i)){if(i.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);if(i[0].length===0||i[1].length===0)throw new Error("[BitmapFont]: Invalid character delimiter.");const n=i[0].charCodeAt(0),a=i[1].charCodeAt(0);if(a<n)throw new Error("[BitmapFont]: Invalid character range.");for(let o=n,c=a;o<=c;o++)e.push(String.fromCharCode(o))}else e.push(...Array.from(i))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}class Se extends Je{constructor(e){super(),this.resolution=1,this.pages=[],this._padding=4,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentPageIndex=-1,this._skipKerning=!1;const t=e,r=t.style.clone();t.overrideFill&&(r._fill.color=16777215,r._fill.alpha=1,r._fill.texture=A.WHITE,r._fill.fill=null);const i=r.fontSize;r.fontSize=this.baseMeasurementFontSize;const n=K(r);t.overrideSize?r._stroke&&(r._stroke.width*=this.baseRenderedFontSize/i):r.fontSize=this.baseRenderedFontSize=i,this._style=r,this._skipKerning=t.skipKerning??!1,this.resolution=t.resolution??1,this._padding=t.padding??4,this.fontMetrics=G.measureFont(n),this.lineHeight=r.lineHeight||this.fontMetrics.fontSize||r.fontSize}ensureCharacters(e){const t=et(e).filter(m=>!this._currentChars.includes(m)).filter((m,x,_)=>_.indexOf(m)===x);if(!t.length)return;this._currentChars=[...this._currentChars,...t];let r;this._currentPageIndex===-1?r=this._nextPage():r=this.pages[this._currentPageIndex];let{canvas:i,context:n}=r.canvasAndContext,a=r.texture.source;const o=this._style;let c=this._currentX,h=this._currentY;const l=this.baseRenderedFontSize/this.baseMeasurementFontSize,d=this._padding*l,f=o.fontStyle==="italic"?2:1;let u=0,p=!1;for(let m=0;m<t.length;m++){const x=t[m],_=G.measureText(x,o,i,!1);_.lineHeight=_.height;const b=f*_.width*l,w=_.height*l,y=b+d*2,C=w+d*2;if(p=!1,x!==`
|
`:e,e}static _getFromCache(e,t,r,i){let n=r[e];return typeof n!="number"&&(n=g._measureText(e,t,i)+t,r[e]=n),n}static _collapseSpaces(e){return e==="normal"||e==="pre-line"}static _collapseNewlines(e){return e==="normal"}static _trimRight(e){if(typeof e!="string")return"";for(let t=e.length-1;t>=0;t--){const r=e[t];if(!g.isBreakingSpace(r))break;e=e.slice(0,-1)}return e}static _isNewline(e){return typeof e!="string"?!1:g._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:g._breakingSpaces.includes(e.charCodeAt(0))}static _tokenize(e){const t=[];let r="";if(typeof e!="string")return t;for(let i=0;i<e.length;i++){const n=e[i],a=e[i+1];if(g.isBreakingSpace(n,a)||g._isNewline(n)){r!==""&&(t.push(r),r=""),t.push(n);continue}r+=n}return r!==""&&t.push(r),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,r,i,n){return!0}static wordWrapSplit(e){return g.graphemeSegmenter(e)}static measureFont(e){if(g._fonts[e])return g._fonts[e];const t=g._context;t.font=e;const r=t.measureText(g.METRICS_STRING+g.BASELINE_SYMBOL),i={ascent:r.actualBoundingBoxAscent,descent:r.actualBoundingBoxDescent,fontSize:r.actualBoundingBoxAscent+r.actualBoundingBoxDescent};return g._fonts[e]=i,i}static clearMetrics(e=""){e?delete g._fonts[e]:g._fonts={}}static get _canvas(){if(!g.__canvas){let e;try{const t=new OffscreenCanvas(0,0);if(t.getContext("2d",ee)?.measureText)return g.__canvas=t,t;e=H.get().createCanvas()}catch{e=H.get().createCanvas()}e.width=e.height=10,g.__canvas=e}return g.__canvas}static get _context(){return g.__context||(g.__context=g._canvas.getContext("2d",ee)),g.__context}};W.METRICS_STRING="|\xc9q\xc5";W.BASELINE_SYMBOL="M";W.BASELINE_MULTIPLIER=1.4;W.HEIGHT_MULTIPLIER=2;W.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){const s=new Intl.Segmenter;return e=>[...s.segment(e)].map(t=>t.segment)}return s=>[...s]})();W.experimentalLetterSpacing=!1;W._fonts={};W._newlines=[10,13];W._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];W._measurementCache={};let G=W;const be=["_fontFamily","_fontStyle","_fontSize","_fontVariant","_fontWeight","_breakWords","_align","_leading","_letterSpacing","_lineHeight","_textBaseline","_whiteSpace","_wordWrap","_wordWrapWidth","_padding","_cssOverrides","_trim"];function Qe(s){const e=[];let t=0;for(let r=0;r<be.length;r++){const i=be[r];e[t++]=s[i]}return t=Ze(s._fill,e,t),t=Et(s._stroke,e,t),e.join("-")}function Ze(s,e,t){return s&&(e[t++]=s.color,e[t++]=s.alpha,e[t++]=s.fill?.uid),t}function Et(s,e,t){return s&&(t=Ze(s,e,t),e[t++]=s.width,e[t++]=s.alignment,e[t++]=s.cap,e[t++]=s.join,e[t++]=s.miterLimit),t}const le=class D extends ze{constructor(e={}){super(),$t(e);const t={...D.defaultTextStyle,...e};for(const r in t){const i=r;this[i]=t[r]}this.update()}get align(){return this._align}set align(e){this._align=e,this.update()}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords=e,this.update()}get dropShadow(){return this._dropShadow}set dropShadow(e){e!==null&&typeof e=="object"?this._dropShadow={...D.defaultDropShadow,...e}:this._dropShadow=e?{...D.defaultDropShadow}:null,this.update()}get fontFamily(){return this._fontFamily}set fontFamily(e){this._fontFamily=e,this.update()}get fontSize(){return this._fontSize}set fontSize(e){typeof e=="string"?this._fontSize=parseInt(e,10):this._fontSize=e,this.update()}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle=e,this.update()}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant=e,this.update()}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight=e,this.update()}get leading(){return this._leading}set leading(e){this._leading=e,this.update()}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing=e,this.update()}get lineHeight(){return this._lineHeight}set lineHeight(e){this._lineHeight=e,this.update()}get padding(){return this._padding}set padding(e){this._padding=e,this.update()}get trim(){return this._trim}set trim(e){this._trim=e,this.update()}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline=e,this.update()}get whiteSpace(){return this._whiteSpace}set whiteSpace(e){this._whiteSpace=e,this.update()}get wordWrap(){return this._wordWrap}set wordWrap(e){this._wordWrap=e,this.update()}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(e){this._wordWrapWidth=e,this.update()}get fill(){return this._originalFill}set fill(e){e!==this._originalFill&&(this._originalFill=e,this._fill=ge(e===0?"black":e,me.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(e){e!==this._originalStroke&&(this._originalStroke=e,this._stroke=ge(e,me.defaultStrokeStyle),this.update())}_generateKey(){return this._styleKey=Qe(this),this._styleKey}update(){this._styleKey=null,this.emit("update",this)}reset(){const e=D.defaultTextStyle;for(const t in e)this[t]=e[t]}get styleKey(){return this._styleKey||this._generateKey()}clone(){return new D({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,textBaseline:this.textBaseline,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth})}destroy(e=!1){if(this.removeAllListeners(),typeof e=="boolean"?e:e?.texture){const r=typeof e=="boolean"?e:e?.textureSource;this._fill?.texture&&this._fill.texture.destroy(r),this._originalFill?.texture&&this._originalFill.texture.destroy(r),this._stroke?.texture&&this._stroke.texture.destroy(r),this._originalStroke?.texture&&this._originalStroke.texture.destroy(r)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}};le.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};le.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let N=le;function $t(s){const e=s;if(typeof e.dropShadow=="boolean"&&e.dropShadow){const t=N.defaultDropShadow;s.dropShadow={alpha:e.dropShadowAlpha??t.alpha,angle:e.dropShadowAngle??t.angle,blur:e.dropShadowBlur??t.blur,color:e.dropShadowColor??t.color,distance:e.dropShadowDistance??t.distance}}if(e.strokeThickness){M(R,"strokeThickness is now a part of stroke");const t=e.stroke;s.stroke={color:t,width:e.strokeThickness}}if(Array.isArray(e.fill)){M(R,"gradient fill is now a fill pattern: `new FillGradient(...)`");const t=new Ie(0,0,0,s.fontSize*1.7),r=e.fill.map(i=>I.shared.setValue(i).toNumber());r.forEach((i,n)=>{const a=e.fillGradientStops[n]??n/r.length;t.addColorStop(a,i)}),s.fill={fill:t}}}function q(s,e){if(s.texture===A.WHITE&&!s.fill)return I.shared.setValue(s.color).toHex();if(s.fill){if(s.fill instanceof Tt){const t=s.fill,r=e.createPattern(t.texture.source.resource,"repeat"),i=t.transform.copyTo(z.shared);return i.scale(t.texture.frame.width,t.texture.frame.height),r.setTransform(i),r}else if(s.fill instanceof Ie){const t=s.fill;if(t.type==="linear"){const r=e.createLinearGradient(t.x0,t.y0,t.x1,t.y1);return t.gradientStops.forEach(i=>{r.addColorStop(i.offset,I.shared.setValue(i.color).toHex())}),r}}}else{const t=e.createPattern(s.texture.source.resource,"repeat"),r=s.matrix.copyTo(z.shared);return r.scale(s.texture.frame.width,s.texture.frame.height),t.setTransform(r),t}return $("FillStyle not recognised",s),"red"}class Je extends ze{constructor(){super(...arguments),this.chars=Object.create(null),this.lineHeight=0,this.fontFamily="",this.fontMetrics={fontSize:0,ascent:0,descent:0},this.baseLineOffset=0,this.distanceField={type:"none",range:0},this.pages=[],this.baseMeasurementFontSize=100,this.baseRenderedFontSize=100}get font(){return M(R,"BitmapFont.font is deprecated, please use BitmapFont.fontFamily instead."),this.fontFamily}get pageTextures(){return M(R,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}get size(){return M(R,"BitmapFont.size is deprecated, please use BitmapFont.fontMetrics.fontSize instead."),this.fontMetrics.fontSize}get distanceFieldRange(){return M(R,"BitmapFont.distanceFieldRange is deprecated, please use BitmapFont.distanceField.range instead."),this.distanceField.range}get distanceFieldType(){return M(R,"BitmapFont.distanceFieldType is deprecated, please use BitmapFont.distanceField.type instead."),this.distanceField.type}destroy(e=!1){this.emit("destroy",this),this.removeAllListeners();for(const t in this.chars)this.chars[t].texture.destroy();this.chars=null,e&&(this.pages.forEach(t=>t.texture.destroy(!0)),this.pages=null)}}function et(s){if(s==="")return[];typeof s=="string"&&(s=[s]);const e=[];for(let t=0,r=s.length;t<r;t++){const i=s[t];if(Array.isArray(i)){if(i.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${i.length}.`);if(i[0].length===0||i[1].length===0)throw new Error("[BitmapFont]: Invalid character delimiter.");const n=i[0].charCodeAt(0),a=i[1].charCodeAt(0);if(a<n)throw new Error("[BitmapFont]: Invalid character range.");for(let o=n,c=a;o<=c;o++)e.push(String.fromCharCode(o))}else e.push(...Array.from(i))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}class Se extends Je{constructor(e){super(),this.resolution=1,this.pages=[],this._padding=4,this._measureCache=Object.create(null),this._currentChars=[],this._currentX=0,this._currentY=0,this._currentPageIndex=-1,this._skipKerning=!1;const t=e,r=t.style.clone();t.overrideFill&&(r._fill.color=16777215,r._fill.alpha=1,r._fill.texture=A.WHITE,r._fill.fill=null);const i=r.fontSize;r.fontSize=this.baseMeasurementFontSize;const n=K(r);t.overrideSize?r._stroke&&(r._stroke.width*=this.baseRenderedFontSize/i):r.fontSize=this.baseRenderedFontSize=i,this._style=r,this._skipKerning=t.skipKerning??!1,this.resolution=t.resolution??1,this._padding=t.padding??4,this.fontMetrics=G.measureFont(n),this.lineHeight=r.lineHeight||this.fontMetrics.fontSize||r.fontSize}ensureCharacters(e){const t=et(e).filter(m=>!this._currentChars.includes(m)).filter((m,x,_)=>_.indexOf(m)===x);if(!t.length)return;this._currentChars=[...this._currentChars,...t];let r;this._currentPageIndex===-1?r=this._nextPage():r=this.pages[this._currentPageIndex];let{canvas:i,context:n}=r.canvasAndContext,a=r.texture.source;const o=this._style;let c=this._currentX,h=this._currentY;const l=this.baseRenderedFontSize/this.baseMeasurementFontSize,d=this._padding*l,f=o.fontStyle==="italic"?2:1;let u=0,p=!1;for(let m=0;m<t.length;m++){const x=t[m],_=G.measureText(x,o,i,!1);_.lineHeight=_.height;const b=f*_.width*l,w=_.height*l,y=b+d*2,C=w+d*2;if(p=!1,x!==`
|
||||||
`&&x!=="\r"&&x!==" "&&x!==" "&&(p=!0,u=Math.ceil(Math.max(C,u))),c+y>512&&(h+=u,u=C,c=0,h+u>512)){a.update();const v=this._nextPage();i=v.canvasAndContext.canvas,n=v.canvasAndContext.context,a=v.texture.source,h=0}const B=b/l-(o.dropShadow?.distance??0)-(o._stroke?.width??0);if(this.chars[x]={id:x.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:B,kerning:{}},p){this._drawGlyph(n,_,c+d,h+d,l,o);const v=a.width*l,T=a.height*l,L=new j(c/v*a.width,h/T*a.height,y/v*a.width,C/T*a.height);this.chars[x].texture=new A({source:a,frame:L}),c+=Math.ceil(y)}}a.update(),this._currentX=c,this._currentY=h,this._skipKerning&&this._applyKerning(t,n)}get pageTextures(){return M(R,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(e,t){const r=this._measureCache;for(let i=0;i<e.length;i++){const n=e[i];for(let a=0;a<this._currentChars.length;a++){const o=this._currentChars[a];let c=r[n];c||(c=r[n]=t.measureText(n).width);let h=r[o];h||(h=r[o]=t.measureText(o).width);let l=t.measureText(n+o).width,d=l-(c+h);d&&(this.chars[n].kerning[o]=d),l=t.measureText(n+o).width,d=l-(c+h),d&&(this.chars[o].kerning[n]=d)}}}_nextPage(){this._currentPageIndex++;const e=this.resolution,t=E.getOptimalCanvasAndContext(512,512,e);this._setupContext(t.context,this._style,e);const r=e*(this.baseRenderedFontSize/this.baseMeasurementFontSize),i=new A({source:new vt({resource:t.canvas,resolution:r,alphaMode:"premultiply-alpha-on-upload"})}),n={canvasAndContext:t,texture:i};return this.pages[this._currentPageIndex]=n,n}_setupContext(e,t,r){t.fontSize=this.baseRenderedFontSize,e.scale(r,r),e.font=K(t),t.fontSize=this.baseMeasurementFontSize,e.textBaseline=t.textBaseline;const i=t._stroke,n=i?.width??0;if(i&&(e.lineWidth=n,e.lineJoin=i.join,e.miterLimit=i.miterLimit,e.strokeStyle=q(i,e)),t._fill&&(e.fillStyle=q(t._fill,e)),t.dropShadow){const a=t.dropShadow,o=I.shared.setValue(a.color).toArray(),c=a.blur*r,h=a.distance*r;e.shadowColor=`rgba(${o[0]*255},${o[1]*255},${o[2]*255},${a.alpha})`,e.shadowBlur=c,e.shadowOffsetX=Math.cos(a.angle)*h,e.shadowOffsetY=Math.sin(a.angle)*h}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0}_drawGlyph(e,t,r,i,n,a){const o=t.text,c=t.fontProperties,l=(a._stroke?.width??0)*n,d=r+l/2,f=i-l/2,u=c.descent*n,p=t.lineHeight*n;a.stroke&&l&&e.strokeText(o,d,f+p-u),a._fill&&e.fillText(o,d,f+p-u)}destroy(){super.destroy();for(let e=0;e<this.pages.length;e++){const{canvasAndContext:t,texture:r}=this.pages[e];E.returnCanvasAndContext(t),r.destroy(!0)}this.pages=null}}function tt(s,e,t){const r={width:0,height:0,offsetY:0,scale:e.fontSize/t.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};r.offsetY=t.baseLineOffset;let i=r.lines[0],n=null,a=!0;const o={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},c=u=>{const p=i.width;for(let m=0;m<o.index;m++){const x=u.positions[m];i.chars.push(u.chars[m]),i.charPositions.push(x+p)}i.width+=u.width,a=!1,o.width=0,o.index=0,o.chars.length=0},h=()=>{let u=i.chars.length-1,p=i.chars[u];for(;p===" ";)i.width-=t.chars[p].xAdvance,p=i.chars[--u];r.width=Math.max(r.width,i.width),i={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},a=!0,r.lines.push(i),r.height+=t.lineHeight},l=t.baseMeasurementFontSize/e.fontSize,d=e.letterSpacing*l,f=e.wordWrapWidth*l;for(let u=0;u<s.length+1;u++){let p;const m=u===s.length;m||(p=s[u]);const x=t.chars[p]||t.chars[" "];if(/(?:\s)/.test(p)||p==="\r"||p===`
|
`&&x!=="\r"&&x!==" "&&x!==" "&&(p=!0,u=Math.ceil(Math.max(C,u))),c+y>512&&(h+=u,u=C,c=0,h+u>512)){a.update();const v=this._nextPage();i=v.canvasAndContext.canvas,n=v.canvasAndContext.context,a=v.texture.source,h=0}const B=b/l-(o.dropShadow?.distance??0)-(o._stroke?.width??0);if(this.chars[x]={id:x.codePointAt(0),xOffset:-this._padding,yOffset:-this._padding,xAdvance:B,kerning:{}},p){this._drawGlyph(n,_,c+d,h+d,l,o);const v=a.width*l,T=a.height*l,L=new j(c/v*a.width,h/T*a.height,y/v*a.width,C/T*a.height);this.chars[x].texture=new A({source:a,frame:L}),c+=Math.ceil(y)}}a.update(),this._currentX=c,this._currentY=h,this._skipKerning&&this._applyKerning(t,n)}get pageTextures(){return M(R,"BitmapFont.pageTextures is deprecated, please use BitmapFont.pages instead."),this.pages}_applyKerning(e,t){const r=this._measureCache;for(let i=0;i<e.length;i++){const n=e[i];for(let a=0;a<this._currentChars.length;a++){const o=this._currentChars[a];let c=r[n];c||(c=r[n]=t.measureText(n).width);let h=r[o];h||(h=r[o]=t.measureText(o).width);let l=t.measureText(n+o).width,d=l-(c+h);d&&(this.chars[n].kerning[o]=d),l=t.measureText(n+o).width,d=l-(c+h),d&&(this.chars[o].kerning[n]=d)}}}_nextPage(){this._currentPageIndex++;const e=this.resolution,t=E.getOptimalCanvasAndContext(512,512,e);this._setupContext(t.context,this._style,e);const r=e*(this.baseRenderedFontSize/this.baseMeasurementFontSize),i=new A({source:new vt({resource:t.canvas,resolution:r,alphaMode:"premultiply-alpha-on-upload"})}),n={canvasAndContext:t,texture:i};return this.pages[this._currentPageIndex]=n,n}_setupContext(e,t,r){t.fontSize=this.baseRenderedFontSize,e.scale(r,r),e.font=K(t),t.fontSize=this.baseMeasurementFontSize,e.textBaseline=t.textBaseline;const i=t._stroke,n=i?.width??0;if(i&&(e.lineWidth=n,e.lineJoin=i.join,e.miterLimit=i.miterLimit,e.strokeStyle=q(i,e)),t._fill&&(e.fillStyle=q(t._fill,e)),t.dropShadow){const a=t.dropShadow,o=I.shared.setValue(a.color).toArray(),c=a.blur*r,h=a.distance*r;e.shadowColor=`rgba(${o[0]*255},${o[1]*255},${o[2]*255},${a.alpha})`,e.shadowBlur=c,e.shadowOffsetX=Math.cos(a.angle)*h,e.shadowOffsetY=Math.sin(a.angle)*h}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0}_drawGlyph(e,t,r,i,n,a){const o=t.text,c=t.fontProperties,l=(a._stroke?.width??0)*n,d=r+l/2,f=i-l/2,u=c.descent*n,p=t.lineHeight*n;a.stroke&&l&&e.strokeText(o,d,f+p-u),a._fill&&e.fillText(o,d,f+p-u)}destroy(){super.destroy();for(let e=0;e<this.pages.length;e++){const{canvasAndContext:t,texture:r}=this.pages[e];E.returnCanvasAndContext(t),r.destroy(!0)}this.pages=null}}function tt(s,e,t){const r={width:0,height:0,offsetY:0,scale:e.fontSize/t.baseMeasurementFontSize,lines:[{width:0,charPositions:[],spaceWidth:0,spacesIndex:[],chars:[]}]};r.offsetY=t.baseLineOffset;let i=r.lines[0],n=null,a=!0;const o={spaceWord:!1,width:0,start:0,index:0,positions:[],chars:[]},c=u=>{const p=i.width;for(let m=0;m<o.index;m++){const x=u.positions[m];i.chars.push(u.chars[m]),i.charPositions.push(x+p)}i.width+=u.width,a=!1,o.width=0,o.index=0,o.chars.length=0},h=()=>{let u=i.chars.length-1,p=i.chars[u];for(;p===" ";)i.width-=t.chars[p].xAdvance,p=i.chars[--u];r.width=Math.max(r.width,i.width),i={width:0,charPositions:[],chars:[],spaceWidth:0,spacesIndex:[]},a=!0,r.lines.push(i),r.height+=t.lineHeight},l=t.baseMeasurementFontSize/e.fontSize,d=e.letterSpacing*l,f=e.wordWrapWidth*l;for(let u=0;u<s.length+1;u++){let p;const m=u===s.length;m||(p=s[u]);const x=t.chars[p]||t.chars[" "];if(/(?:\s)/.test(p)||p==="\r"||p===`
|
||||||
`||m){if(!a&&e.wordWrap&&i.width+o.width-d>f?(h(),c(o),m||i.charPositions.push(0)):(o.start=i.width,c(o),m||i.charPositions.push(0)),p==="\r"||p===`
|
`||m){if(!a&&e.wordWrap&&i.width+o.width-d>f?(h(),c(o),m||i.charPositions.push(0)):(o.start=i.width,c(o),m||i.charPositions.push(0)),p==="\r"||p===`
|
||||||
`)i.width!==0&&h();else if(!m){const y=x.xAdvance+(x.kerning[n]||0)+d;i.width+=y,i.spaceWidth=y,i.spacesIndex.push(i.charPositions.length),i.chars.push(p)}}else{const w=x.kerning[n]||0,y=x.xAdvance+w+d;o.positions[o.index++]=o.width+w,o.chars.push(p),o.width+=y}n=p}return h(),e.align==="center"?Vt(r):e.align==="right"?Yt(r):e.align==="justify"&&Xt(r),r}function Vt(s){for(let e=0;e<s.lines.length;e++){const t=s.lines[e],r=s.width/2-t.width/2;for(let i=0;i<t.charPositions.length;i++)t.charPositions[i]+=r}}function Yt(s){for(let e=0;e<s.lines.length;e++){const t=s.lines[e],r=s.width-t.width;for(let i=0;i<t.charPositions.length;i++)t.charPositions[i]+=r}}function Xt(s){const e=s.width;for(let t=0;t<s.lines.length;t++){const r=s.lines[t];let i=0,n=r.spacesIndex[i++],a=0;const o=r.spacesIndex.length,h=(e-r.width)/o;for(let l=0;l<r.charPositions.length;l++)l===n&&(n=r.spacesIndex[i++],a+=h),r.charPositions[l]+=a}}class jt{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(e,t){let r=`${t.fontFamily}-bitmap`,i=!0;if(t._fill.fill&&(r+=t._fill.fill.uid,i=!1),!k.has(r)){const a=new Se({style:t,overrideFill:i,overrideSize:!0,...this.defaultOptions});a.once("destroy",()=>k.remove(r)),k.set(r,a)}const n=k.get(r);return n.ensureCharacters?.(e),n}getLayout(e,t){const r=this.getFont(e,t);return tt(e.split(""),t,r)}measureText(e,t){return this.getLayout(e,t)}install(...e){let t=e[0];typeof t=="string"&&(t={name:t,style:e[1],chars:e[2]?.chars,resolution:e[2]?.resolution,padding:e[2]?.padding,skipKerning:e[2]?.skipKerning},M(R,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));const r=t?.name;if(!r)throw new Error("[BitmapFontManager] Property `name` is required.");t={...this.defaultOptions,...t};const i=t.style,n=i instanceof N?i:new N(i),a=n._fill.fill!==null&&n._fill.fill!==void 0,o=new Se({style:n,overrideFill:a,skipKerning:t.skipKerning,padding:t.padding,resolution:t.resolution,overrideSize:!1}),c=et(t.chars);return o.ensureCharacters(c.join("")),k.set(`${r}-bitmap`,o),o.once("destroy",()=>k.remove(`${r}-bitmap`)),o}uninstall(e){const t=`${e}-bitmap`,r=k.get(t);r&&(k.remove(t),r.destroy())}}const ne=new jt;function Kt(s){const e=s._stroke,t=s._fill,i=[`div { ${[`color: ${I.shared.setValue(t.color).toHex()}`,`font-size: ${s.fontSize}px`,`font-family: ${s.fontFamily}`,`font-weight: ${s.fontWeight}`,`font-style: ${s.fontStyle}`,`font-variant: ${s.fontVariant}`,`letter-spacing: ${s.letterSpacing}px`,`text-align: ${s.align}`,`padding: ${s.padding}px`,`white-space: ${s.whiteSpace==="pre"&&s.wordWrap?"pre-wrap":s.whiteSpace}`,...s.lineHeight?[`line-height: ${s.lineHeight}px`]:[],...s.wordWrap?[`word-wrap: ${s.breakWords?"break-all":"break-word"}`,`max-width: ${s.wordWrapWidth}px`]:[],...e?[it(e)]:[],...s.dropShadow?[rt(s.dropShadow)]:[],...s.cssOverrides].join(";")} }`];return Nt(s.tagStyles,i),i.join(" ")}function rt(s){const e=I.shared.setValue(s.color).setAlpha(s.alpha).toHexa(),t=Math.round(Math.cos(s.angle)*s.distance),r=Math.round(Math.sin(s.angle)*s.distance),i=`${t}px ${r}px`;return s.blur>0?`text-shadow: ${i} ${s.blur}px ${e}`:`text-shadow: ${i} ${e}`}function it(s){return[`-webkit-text-stroke-width: ${s.width}px`,`-webkit-text-stroke-color: ${I.shared.setValue(s.color).toHex()}`,`text-stroke-width: ${s.width}px`,`text-stroke-color: ${I.shared.setValue(s.color).toHex()}`,"paint-order: stroke"].join(";")}const we={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},ye={fill:s=>`color: ${I.shared.setValue(s).toHex()}`,breakWords:s=>`word-wrap: ${s?"break-all":"break-word"}`,stroke:it,dropShadow:rt};function Nt(s,e){for(const t in s){const r=s[t],i=[];for(const n in r)ye[n]?i.push(ye[n](r[n])):we[n]&&i.push(we[n].replace("{{VALUE}}",r[n]));e.push(`${t} { ${i.join(";")} }`)}}class he extends N{constructor(e={}){super(e),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=e.cssOverrides),this.tagStyles=e.tagStyles??{}}set cssOverrides(e){this._cssOverrides=e instanceof Array?e:[e],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=Qe(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new he({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=Kt(this)),this._cssStyle}addOverride(...e){const t=e.filter(r=>!this.cssOverrides.includes(r));t.length>0&&(this.cssOverrides.push(...t),this.update())}removeOverride(...e){const t=e.filter(r=>this.cssOverrides.includes(r));t.length>0&&(this.cssOverrides=this.cssOverrides.filter(r=>!t.includes(r)),this.update())}set fill(e){typeof e!="string"&&typeof e!="number"&&$("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=e}set stroke(e){e&&typeof e!="string"&&typeof e!="number"&&$("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=e}}const Te="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";class st{constructor(){this.svgRoot=document.createElementNS(Te,"svg"),this.foreignObject=document.createElementNS(Te,"foreignObject"),this.domElement=document.createElementNS(ve,"div"),this.styleElement=document.createElementNS(ve,"style"),this.image=new Image;const{foreignObject:e,svgRoot:t,styleElement:r,domElement:i}=this;e.setAttribute("width","10000"),e.setAttribute("height","10000"),e.style.overflow="hidden",t.appendChild(e),e.appendChild(r),e.appendChild(i)}}let Ce;function qt(s,e,t,r){r=r||Ce||(Ce=new st);const{domElement:i,styleElement:n,svgRoot:a}=r;i.innerHTML=`<style>${e.cssStyle}</style><div>${s}</div>`,i.setAttribute("style","transform-origin: top left; display: inline-block"),t&&(n.textContent=t),document.body.appendChild(a);const o=i.getBoundingClientRect();a.remove();const c=G.measureFont(e.fontStyle).descent;return{width:o.width,height:o.height+c}}class nt{constructor(e,t){this.state=Ge.for2d(),this._graphicsBatchesHash=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){const t=e.context,r=!!this._graphicsBatchesHash[e.uid],i=this.renderer.graphicsContext.updateGpuContext(t);return!!(i.isBatchable||r!==i.isBatchable)}addRenderable(e,t){const r=this.renderer.graphicsContext.updateGpuContext(e.context);e._didGraphicsUpdate&&(e._didGraphicsUpdate=!1,this._rebuild(e)),r.isBatchable?this._addToBatcher(e,t):(this.renderer.renderPipes.batch.break(t),t.add(e))}updateRenderable(e){const t=this._graphicsBatchesHash[e.uid];if(t)for(let r=0;r<t.length;r++){const i=t[r];i.batcher.updateElement(i)}}destroyRenderable(e){this._graphicsBatchesHash[e.uid]&&this._removeBatchForRenderable(e.uid)}execute(e){if(!e.isRenderable)return;const t=this.renderer,r=e.context;if(!t.graphicsContext.getGpuContext(r).batches.length)return;const n=r.customShader||this._adaptor.shader;this.state.blendMode=e.groupBlendMode;const a=n.resources.localUniforms.uniforms;a.uTransformMatrix=e.groupTransform,a.uRound=t._roundPixels|e._roundPixels,oe(e.groupColorAlpha,a.uColor,0),this._adaptor.execute(this,e)}_rebuild(e){const t=!!this._graphicsBatchesHash[e.uid],r=this.renderer.graphicsContext.updateGpuContext(e.context);t&&this._removeBatchForRenderable(e.uid),r.isBatchable&&this._initBatchesForRenderable(e),e.batched=r.isBatchable}_addToBatcher(e,t){const r=this.renderer.renderPipes.batch,i=this._getBatchesForRenderable(e);for(let n=0;n<i.length;n++){const a=i[n];r.addToBatch(a,t)}}_getBatchesForRenderable(e){return this._graphicsBatchesHash[e.uid]||this._initBatchesForRenderable(e)}_initBatchesForRenderable(e){const t=e.context,r=this.renderer.graphicsContext.getGpuContext(t),i=this.renderer._roundPixels|e._roundPixels,n=r.batches.map(a=>{const o=F.get(Ct);return a.copyTo(o),o.renderable=e,o.roundPixels=i,o});return this._graphicsBatchesHash[e.uid]=n,e.on("destroyed",()=>{this.destroyRenderable(e)}),n}_removeBatchForRenderable(e){this._graphicsBatchesHash[e].forEach(t=>{F.return(t)}),this._graphicsBatchesHash[e]=null}destroy(){this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null;for(const e in this._graphicsBatchesHash)this._removeBatchForRenderable(e);this._graphicsBatchesHash=null}}nt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"graphics"};const at=class ot extends ce{constructor(...e){super({});let t=e[0]??{};typeof t=="number"&&(M(R,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),t={width:t,height:e[1],verticesX:e[2],verticesY:e[3]}),this.build(t)}build(e){e={...ot.defaultOptions,...e},this.verticesX=this.verticesX??e.verticesX,this.verticesY=this.verticesY??e.verticesY,this.width=this.width??e.width,this.height=this.height??e.height;const t=this.verticesX*this.verticesY,r=[],i=[],n=[],a=this.verticesX-1,o=this.verticesY-1,c=this.width/a,h=this.height/o;for(let d=0;d<t;d++){const f=d%this.verticesX,u=d/this.verticesX|0;r.push(f*c,u*h),i.push(f/a,u/o)}const l=a*o;for(let d=0;d<l;d++){const f=d%a,u=d/a|0,p=u*this.verticesX+f,m=u*this.verticesX+f+1,x=(u+1)*this.verticesX+f,_=(u+1)*this.verticesX+f+1;n.push(p,m,x,m,_,x)}this.buffers[0].data=new Float32Array(r),this.buffers[1].data=new Float32Array(i),this.indexBuffer.data=new Uint32Array(n),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};at.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};let Qt=at;class de{constructor(){this.batcher=null,this.batch=null,this.roundPixels=0,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get blendMode(){return this.mesh.groupBlendMode}reset(){this.mesh=null,this.texture=null,this.batcher=null,this.batch=null}packIndex(e,t,r){const i=this.geometry.indices;for(let n=0;n<i.length;n++)e[t++]=i[n]+r}packAttributes(e,t,r,i){const n=this.mesh,a=this.geometry,o=n.groupTransform,c=i<<16|this.roundPixels&65535,h=o.a,l=o.b,d=o.c,f=o.d,u=o.tx,p=o.ty,m=a.positions,x=a.getBuffer("aUV"),_=x.data;let b=_;const w=this.texture.textureMatrix;w.isSimple||(b=this._transformedUvs,(this._textureMatrixUpdateId!==w._updateID||this._uvUpdateId!==x._updateID)&&((!b||b.length<_.length)&&(b=this._transformedUvs=new Float32Array(_.length)),this._textureMatrixUpdateId=w._updateID,this._uvUpdateId=x._updateID,w.multiplyUvs(_,b)));const y=n.groupColorAlpha;for(let C=0;C<m.length;C+=2){const B=m[C],v=m[C+1];e[r]=h*B+d*v+u,e[r+1]=l*B+f*v+p,e[r+2]=b[C],e[r+3]=b[C+1],t[r+4]=y,t[r+5]=c,r+=6}}get vertexSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}class ct{constructor(e,t){this.localUniforms=new V({uTransformMatrix:{value:new z,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new We({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){const t=this._getMeshData(e),r=t.batched,i=e.batched;if(t.batched=i,r!==i)return!0;if(i){const n=e._geometry;if(n.indices.length!==t.indexSize||n.positions.length!==t.vertexSize)return t.indexSize=n.indices.length,t.vertexSize=n.positions.length,!0;const a=this._getBatchableMesh(e),o=e.texture;if(a.texture._source!==o._source&&a.texture._source!==o._source)return!a.batcher.checkAndUpdateTexture(a,o)}return!1}addRenderable(e,t){const r=this.renderer.renderPipes.batch,{batched:i}=this._getMeshData(e);if(i){const n=this._getBatchableMesh(e);n.texture=e._texture,n.geometry=e._geometry,r.addToBatch(n)}else r.break(t),t.add({renderPipeId:"mesh",mesh:e})}updateRenderable(e){if(e.batched){const t=this._gpuBatchableMeshHash[e.uid];t.texture=e._texture,t.geometry=e._geometry,t.batcher.updateElement(t)}}destroyRenderable(e){this._meshDataHash[e.uid]=null;const t=this._gpuBatchableMeshHash[e.uid];F.return(t),this._gpuBatchableMeshHash[e.uid]=null}execute({mesh:e}){if(!e.isRenderable)return;e.state.blendMode=e.groupBlendMode;const t=this.localUniforms;t.uniforms.uTransformMatrix=e.groupTransform,t.uniforms.uRound=this.renderer._roundPixels|e._roundPixels,t.update(),oe(e.groupColorAlpha,t.uniforms.uColor,0),this._adaptor.execute(this,e)}_getMeshData(e){return this._meshDataHash[e.uid]||this._initMeshData(e)}_initMeshData(e){return this._meshDataHash[e.uid]={batched:e.batched,indexSize:e._geometry.indices?.length,vertexSize:e._geometry.positions?.length},e.on("destroyed",()=>{this.destroyRenderable(e)}),this._meshDataHash[e.uid]}_getBatchableMesh(e){return this._gpuBatchableMeshHash[e.uid]||this._initBatchableMesh(e)}_initBatchableMesh(e){const t=F.get(de);return t.mesh=e,t.texture=e._texture,t.roundPixels=this.renderer._roundPixels|e._roundPixels,this._gpuBatchableMeshHash[e.uid]=t,t.mesh=e,t}destroy(){for(const e in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[e]&&F.return(this._gpuBatchableMeshHash[e]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.destroy(),this._adaptor=null,this.renderer=null}}ct.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"mesh"};const lt=class ht extends Qt{constructor(e={}){e={...ht.defaultOptions,...e},super({width:e.width,height:e.height,verticesX:4,verticesY:4}),this.update(e)}update(e){this.width=e.width??this.width,this.height=e.height??this.height,this._originalWidth=e.originalWidth??this._originalWidth,this._originalHeight=e.originalHeight??this._originalHeight,this._leftWidth=e.leftWidth??this._leftWidth,this._rightWidth=e.rightWidth??this._rightWidth,this._topHeight=e.topHeight??this._topHeight,this._bottomHeight=e.bottomHeight??this._bottomHeight,this.updateUvs(),this.updatePositions()}updatePositions(){const e=this.positions,t=this._leftWidth+this._rightWidth,r=this.width>t?1:this.width/t,i=this._topHeight+this._bottomHeight,n=this.height>i?1:this.height/i,a=Math.min(r,n);e[9]=e[11]=e[13]=e[15]=this._topHeight*a,e[17]=e[19]=e[21]=e[23]=this.height-this._bottomHeight*a,e[25]=e[27]=e[29]=e[31]=this.height,e[2]=e[10]=e[18]=e[26]=this._leftWidth*a,e[4]=e[12]=e[20]=e[28]=this.width-this._rightWidth*a,e[6]=e[14]=e[22]=e[30]=this.width,this.getBuffer("aPosition").update()}updateUvs(){const e=this.uvs;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1;const t=1/this._originalWidth,r=1/this._originalHeight;e[2]=e[10]=e[18]=e[26]=t*this._leftWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[4]=e[12]=e[20]=e[28]=1-t*this._rightWidth,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.getBuffer("aUV").update()}};lt.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};let Zt=lt;class dt{constructor(e){this._gpuSpriteHash=Object.create(null),this._renderer=e}addRenderable(e,t){const r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t.batcher.updateElement(t)}validateRenderable(e){const t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source?!r.batcher.checkAndUpdateTexture(r,t):!1}destroyRenderable(e){const t=this._gpuSpriteHash[e.uid];F.return(t),this._gpuSpriteHash[e.uid]=null}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.geometry.update(e),t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){const t=new de;return t.geometry=new Zt,t.mesh=e,t.texture=e._texture,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuSpriteHash)this._gpuSpriteHash[e].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}}dt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"nineSliceSprite"};const Jt={name:"tiling-bit",vertex:{header:`
|
`)i.width!==0&&h();else if(!m){const y=x.xAdvance+(x.kerning[n]||0)+d;i.width+=y,i.spaceWidth=y,i.spacesIndex.push(i.charPositions.length),i.chars.push(p)}}else{const w=x.kerning[n]||0,y=x.xAdvance+w+d;o.positions[o.index++]=o.width+w,o.chars.push(p),o.width+=y}n=p}return h(),e.align==="center"?Vt(r):e.align==="right"?Yt(r):e.align==="justify"&&Xt(r),r}function Vt(s){for(let e=0;e<s.lines.length;e++){const t=s.lines[e],r=s.width/2-t.width/2;for(let i=0;i<t.charPositions.length;i++)t.charPositions[i]+=r}}function Yt(s){for(let e=0;e<s.lines.length;e++){const t=s.lines[e],r=s.width-t.width;for(let i=0;i<t.charPositions.length;i++)t.charPositions[i]+=r}}function Xt(s){const e=s.width;for(let t=0;t<s.lines.length;t++){const r=s.lines[t];let i=0,n=r.spacesIndex[i++],a=0;const o=r.spacesIndex.length,h=(e-r.width)/o;for(let l=0;l<r.charPositions.length;l++)l===n&&(n=r.spacesIndex[i++],a+=h),r.charPositions[l]+=a}}class jt{constructor(){this.ALPHA=[["a","z"],["A","Z"]," "],this.NUMERIC=[["0","9"]],this.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],this.ASCII=[[" ","~"]],this.defaultOptions={chars:this.ALPHANUMERIC,resolution:1,padding:4,skipKerning:!1}}getFont(e,t){let r=`${t.fontFamily}-bitmap`,i=!0;if(t._fill.fill&&(r+=t._fill.fill.uid,i=!1),!k.has(r)){const a=new Se({style:t,overrideFill:i,overrideSize:!0,...this.defaultOptions});a.once("destroy",()=>k.remove(r)),k.set(r,a)}const n=k.get(r);return n.ensureCharacters?.(e),n}getLayout(e,t){const r=this.getFont(e,t);return tt(e.split(""),t,r)}measureText(e,t){return this.getLayout(e,t)}install(...e){let t=e[0];typeof t=="string"&&(t={name:t,style:e[1],chars:e[2]?.chars,resolution:e[2]?.resolution,padding:e[2]?.padding,skipKerning:e[2]?.skipKerning},M(R,"BitmapFontManager.install(name, style, options) is deprecated, use BitmapFontManager.install({name, style, ...options})"));const r=t?.name;if(!r)throw new Error("[BitmapFontManager] Property `name` is required.");t={...this.defaultOptions,...t};const i=t.style,n=i instanceof N?i:new N(i),a=n._fill.fill!==null&&n._fill.fill!==void 0,o=new Se({style:n,overrideFill:a,skipKerning:t.skipKerning,padding:t.padding,resolution:t.resolution,overrideSize:!1}),c=et(t.chars);return o.ensureCharacters(c.join("")),k.set(`${r}-bitmap`,o),o.once("destroy",()=>k.remove(`${r}-bitmap`)),o}uninstall(e){const t=`${e}-bitmap`,r=k.get(t);r&&(k.remove(t),r.destroy())}}const ne=new jt;function Kt(s){const e=s._stroke,t=s._fill,i=[`div { ${[`color: ${I.shared.setValue(t.color).toHex()}`,`font-size: ${s.fontSize}px`,`font-family: ${s.fontFamily}`,`font-weight: ${s.fontWeight}`,`font-style: ${s.fontStyle}`,`font-variant: ${s.fontVariant}`,`letter-spacing: ${s.letterSpacing}px`,`text-align: ${s.align}`,`padding: ${s.padding}px`,`white-space: ${s.whiteSpace==="pre"&&s.wordWrap?"pre-wrap":s.whiteSpace}`,...s.lineHeight?[`line-height: ${s.lineHeight}px`]:[],...s.wordWrap?[`word-wrap: ${s.breakWords?"break-all":"break-word"}`,`max-width: ${s.wordWrapWidth}px`]:[],...e?[it(e)]:[],...s.dropShadow?[rt(s.dropShadow)]:[],...s.cssOverrides].join(";")} }`];return Nt(s.tagStyles,i),i.join(" ")}function rt(s){const e=I.shared.setValue(s.color).setAlpha(s.alpha).toHexa(),t=Math.round(Math.cos(s.angle)*s.distance),r=Math.round(Math.sin(s.angle)*s.distance),i=`${t}px ${r}px`;return s.blur>0?`text-shadow: ${i} ${s.blur}px ${e}`:`text-shadow: ${i} ${e}`}function it(s){return[`-webkit-text-stroke-width: ${s.width}px`,`-webkit-text-stroke-color: ${I.shared.setValue(s.color).toHex()}`,`text-stroke-width: ${s.width}px`,`text-stroke-color: ${I.shared.setValue(s.color).toHex()}`,"paint-order: stroke"].join(";")}const we={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},ye={fill:s=>`color: ${I.shared.setValue(s).toHex()}`,breakWords:s=>`word-wrap: ${s?"break-all":"break-word"}`,stroke:it,dropShadow:rt};function Nt(s,e){for(const t in s){const r=s[t],i=[];for(const n in r)ye[n]?i.push(ye[n](r[n])):we[n]&&i.push(we[n].replace("{{VALUE}}",r[n]));e.push(`${t} { ${i.join(";")} }`)}}class he extends N{constructor(e={}){super(e),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=e.cssOverrides),this.tagStyles=e.tagStyles??{}}set cssOverrides(e){this._cssOverrides=e instanceof Array?e:[e],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=Qe(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new he({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=Kt(this)),this._cssStyle}addOverride(...e){const t=e.filter(r=>!this.cssOverrides.includes(r));t.length>0&&(this.cssOverrides.push(...t),this.update())}removeOverride(...e){const t=e.filter(r=>this.cssOverrides.includes(r));t.length>0&&(this.cssOverrides=this.cssOverrides.filter(r=>!t.includes(r)),this.update())}set fill(e){typeof e!="string"&&typeof e!="number"&&$("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=e}set stroke(e){e&&typeof e!="string"&&typeof e!="number"&&$("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=e}}const Te="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";class st{constructor(){this.svgRoot=document.createElementNS(Te,"svg"),this.foreignObject=document.createElementNS(Te,"foreignObject"),this.domElement=document.createElementNS(ve,"div"),this.styleElement=document.createElementNS(ve,"style"),this.image=new Image;const{foreignObject:e,svgRoot:t,styleElement:r,domElement:i}=this;e.setAttribute("width","10000"),e.setAttribute("height","10000"),e.style.overflow="hidden",t.appendChild(e),e.appendChild(r),e.appendChild(i)}}let Ce;function qt(s,e,t,r){r=r||Ce||(Ce=new st);const{domElement:i,styleElement:n,svgRoot:a}=r;i.innerHTML=`<style>${e.cssStyle}</style><div>${s}</div>`,i.setAttribute("style","transform-origin: top left; display: inline-block"),t&&(n.textContent=t),document.body.appendChild(a);const o=i.getBoundingClientRect();a.remove();const c=G.measureFont(e.fontStyle).descent;return{width:o.width,height:o.height+c}}class nt{constructor(e,t){this.state=Ge.for2d(),this._graphicsBatchesHash=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){const t=e.context,r=!!this._graphicsBatchesHash[e.uid],i=this.renderer.graphicsContext.updateGpuContext(t);return!!(i.isBatchable||r!==i.isBatchable)}addRenderable(e,t){const r=this.renderer.graphicsContext.updateGpuContext(e.context);e._didGraphicsUpdate&&(e._didGraphicsUpdate=!1,this._rebuild(e)),r.isBatchable?this._addToBatcher(e,t):(this.renderer.renderPipes.batch.break(t),t.add(e))}updateRenderable(e){const t=this._graphicsBatchesHash[e.uid];if(t)for(let r=0;r<t.length;r++){const i=t[r];i.batcher.updateElement(i)}}destroyRenderable(e){this._graphicsBatchesHash[e.uid]&&this._removeBatchForRenderable(e.uid)}execute(e){if(!e.isRenderable)return;const t=this.renderer,r=e.context;if(!t.graphicsContext.getGpuContext(r).batches.length)return;const n=r.customShader||this._adaptor.shader;this.state.blendMode=e.groupBlendMode;const a=n.resources.localUniforms.uniforms;a.uTransformMatrix=e.groupTransform,a.uRound=t._roundPixels|e._roundPixels,oe(e.groupColorAlpha,a.uColor,0),this._adaptor.execute(this,e)}_rebuild(e){const t=!!this._graphicsBatchesHash[e.uid],r=this.renderer.graphicsContext.updateGpuContext(e.context);t&&this._removeBatchForRenderable(e.uid),r.isBatchable&&this._initBatchesForRenderable(e),e.batched=r.isBatchable}_addToBatcher(e,t){const r=this.renderer.renderPipes.batch,i=this._getBatchesForRenderable(e);for(let n=0;n<i.length;n++){const a=i[n];r.addToBatch(a,t)}}_getBatchesForRenderable(e){return this._graphicsBatchesHash[e.uid]||this._initBatchesForRenderable(e)}_initBatchesForRenderable(e){const t=e.context,r=this.renderer.graphicsContext.getGpuContext(t),i=this.renderer._roundPixels|e._roundPixels,n=r.batches.map(a=>{const o=F.get(Ct);return a.copyTo(o),o.renderable=e,o.roundPixels=i,o});return this._graphicsBatchesHash[e.uid]=n,e.on("destroyed",()=>{this.destroyRenderable(e)}),n}_removeBatchForRenderable(e){this._graphicsBatchesHash[e].forEach(t=>{F.return(t)}),this._graphicsBatchesHash[e]=null}destroy(){this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null;for(const e in this._graphicsBatchesHash)this._removeBatchForRenderable(e);this._graphicsBatchesHash=null}}nt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"graphics"};const at=class ot extends ce{constructor(...e){super({});let t=e[0]??{};typeof t=="number"&&(M(R,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),t={width:t,height:e[1],verticesX:e[2],verticesY:e[3]}),this.build(t)}build(e){e={...ot.defaultOptions,...e},this.verticesX=this.verticesX??e.verticesX,this.verticesY=this.verticesY??e.verticesY,this.width=this.width??e.width,this.height=this.height??e.height;const t=this.verticesX*this.verticesY,r=[],i=[],n=[],a=this.verticesX-1,o=this.verticesY-1,c=this.width/a,h=this.height/o;for(let d=0;d<t;d++){const f=d%this.verticesX,u=d/this.verticesX|0;r.push(f*c,u*h),i.push(f/a,u/o)}const l=a*o;for(let d=0;d<l;d++){const f=d%a,u=d/a|0,p=u*this.verticesX+f,m=u*this.verticesX+f+1,x=(u+1)*this.verticesX+f,_=(u+1)*this.verticesX+f+1;n.push(p,m,x,m,_,x)}this.buffers[0].data=new Float32Array(r),this.buffers[1].data=new Float32Array(i),this.indexBuffer.data=new Uint32Array(n),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};at.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};let Qt=at;class de{constructor(){this.batcher=null,this.batch=null,this.roundPixels=0,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get blendMode(){return this.mesh.groupBlendMode}reset(){this.mesh=null,this.texture=null,this.batcher=null,this.batch=null}packIndex(e,t,r){const i=this.geometry.indices;for(let n=0;n<i.length;n++)e[t++]=i[n]+r}packAttributes(e,t,r,i){const n=this.mesh,a=this.geometry,o=n.groupTransform,c=i<<16|this.roundPixels&65535,h=o.a,l=o.b,d=o.c,f=o.d,u=o.tx,p=o.ty,m=a.positions,x=a.getBuffer("aUV"),_=x.data;let b=_;const w=this.texture.textureMatrix;w.isSimple||(b=this._transformedUvs,(this._textureMatrixUpdateId!==w._updateID||this._uvUpdateId!==x._updateID)&&((!b||b.length<_.length)&&(b=this._transformedUvs=new Float32Array(_.length)),this._textureMatrixUpdateId=w._updateID,this._uvUpdateId=x._updateID,w.multiplyUvs(_,b)));const y=n.groupColorAlpha;for(let C=0;C<m.length;C+=2){const B=m[C],v=m[C+1];e[r]=h*B+d*v+u,e[r+1]=l*B+f*v+p,e[r+2]=b[C],e[r+3]=b[C+1],t[r+4]=y,t[r+5]=c,r+=6}}get vertexSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}class ct{constructor(e,t){this.localUniforms=new V({uTransformMatrix:{value:new z,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new We({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){const t=this._getMeshData(e),r=t.batched,i=e.batched;if(t.batched=i,r!==i)return!0;if(i){const n=e._geometry;if(n.indices.length!==t.indexSize||n.positions.length!==t.vertexSize)return t.indexSize=n.indices.length,t.vertexSize=n.positions.length,!0;const a=this._getBatchableMesh(e),o=e.texture;if(a.texture._source!==o._source&&a.texture._source!==o._source)return!a.batcher.checkAndUpdateTexture(a,o)}return!1}addRenderable(e,t){const r=this.renderer.renderPipes.batch,{batched:i}=this._getMeshData(e);if(i){const n=this._getBatchableMesh(e);n.texture=e._texture,n.geometry=e._geometry,r.addToBatch(n)}else r.break(t),t.add({renderPipeId:"mesh",mesh:e})}updateRenderable(e){if(e.batched){const t=this._gpuBatchableMeshHash[e.uid];t.texture=e._texture,t.geometry=e._geometry,t.batcher.updateElement(t)}}destroyRenderable(e){this._meshDataHash[e.uid]=null;const t=this._gpuBatchableMeshHash[e.uid];t&&(F.return(t),this._gpuBatchableMeshHash[e.uid]=null)}execute({mesh:e}){if(!e.isRenderable)return;e.state.blendMode=e.groupBlendMode;const t=this.localUniforms;t.uniforms.uTransformMatrix=e.groupTransform,t.uniforms.uRound=this.renderer._roundPixels|e._roundPixels,t.update(),oe(e.groupColorAlpha,t.uniforms.uColor,0),this._adaptor.execute(this,e)}_getMeshData(e){return this._meshDataHash[e.uid]||this._initMeshData(e)}_initMeshData(e){return this._meshDataHash[e.uid]={batched:e.batched,indexSize:e._geometry.indices?.length,vertexSize:e._geometry.positions?.length},e.on("destroyed",()=>{this.destroyRenderable(e)}),this._meshDataHash[e.uid]}_getBatchableMesh(e){return this._gpuBatchableMeshHash[e.uid]||this._initBatchableMesh(e)}_initBatchableMesh(e){const t=F.get(de);return t.mesh=e,t.texture=e._texture,t.roundPixels=this.renderer._roundPixels|e._roundPixels,this._gpuBatchableMeshHash[e.uid]=t,t.mesh=e,t}destroy(){for(const e in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[e]&&F.return(this._gpuBatchableMeshHash[e]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.destroy(),this._adaptor=null,this.renderer=null}}ct.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"mesh"};const lt=class ht extends Qt{constructor(e={}){e={...ht.defaultOptions,...e},super({width:e.width,height:e.height,verticesX:4,verticesY:4}),this.update(e)}update(e){this.width=e.width??this.width,this.height=e.height??this.height,this._originalWidth=e.originalWidth??this._originalWidth,this._originalHeight=e.originalHeight??this._originalHeight,this._leftWidth=e.leftWidth??this._leftWidth,this._rightWidth=e.rightWidth??this._rightWidth,this._topHeight=e.topHeight??this._topHeight,this._bottomHeight=e.bottomHeight??this._bottomHeight,this.updateUvs(),this.updatePositions()}updatePositions(){const e=this.positions,t=this._leftWidth+this._rightWidth,r=this.width>t?1:this.width/t,i=this._topHeight+this._bottomHeight,n=this.height>i?1:this.height/i,a=Math.min(r,n);e[9]=e[11]=e[13]=e[15]=this._topHeight*a,e[17]=e[19]=e[21]=e[23]=this.height-this._bottomHeight*a,e[25]=e[27]=e[29]=e[31]=this.height,e[2]=e[10]=e[18]=e[26]=this._leftWidth*a,e[4]=e[12]=e[20]=e[28]=this.width-this._rightWidth*a,e[6]=e[14]=e[22]=e[30]=this.width,this.getBuffer("aPosition").update()}updateUvs(){const e=this.uvs;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1;const t=1/this._originalWidth,r=1/this._originalHeight;e[2]=e[10]=e[18]=e[26]=t*this._leftWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[4]=e[12]=e[20]=e[28]=1-t*this._rightWidth,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.getBuffer("aUV").update()}};lt.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};let Zt=lt;class dt{constructor(e){this._gpuSpriteHash=Object.create(null),this._renderer=e}addRenderable(e,t){const r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r)}updateRenderable(e){const t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t.batcher.updateElement(t)}validateRenderable(e){const t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source?!r.batcher.checkAndUpdateTexture(r,t):!1}destroyRenderable(e){const t=this._gpuSpriteHash[e.uid];F.return(t),this._gpuSpriteHash[e.uid]=null}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.geometry.update(e),t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){const t=new de;return t.geometry=new Zt,t.mesh=e,t.texture=e._texture,t.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuSpriteHash[e.uid]=t,e.on("destroyed",()=>{this.destroyRenderable(e)}),t}destroy(){for(const e in this._gpuSpriteHash)this._gpuSpriteHash[e].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}}dt.extension={type:[S.WebGLPipes,S.WebGPUPipes,S.CanvasPipes],name:"nineSliceSprite"};const Jt={name:"tiling-bit",vertex:{header:`
|
||||||
struct TilingUniforms {
|
struct TilingUniforms {
|
||||||
uMapCoord:mat3x3<f32>,
|
uMapCoord:mat3x3<f32>,
|
||||||
uClampFrame:vec4<f32>,
|
uClampFrame:vec4<f32>,
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
<!-- PWA setup -->
|
<!-- PWA setup -->
|
||||||
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials" />
|
<link rel="manifest" href="manifest.webmanifest" crossorigin="use-credentials" />
|
||||||
<script src="registerSW.js"></script>
|
<script src="registerSW.js"></script>
|
||||||
<script type="module" crossorigin src="./assets/index-bUuJUL5l.js"></script>
|
<script type="module" crossorigin src="./assets/index-CfNDsQKB.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="./assets/vue-BSryv7ps.js">
|
<link rel="modulepreload" crossorigin href="./assets/vue--7UcA1iU.js">
|
||||||
<link rel="modulepreload" crossorigin href="./assets/vuetify-i5Qjiq6M.js">
|
<link rel="modulepreload" crossorigin href="./assets/vuetify-GhifFkZ7.js">
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-B-0i0kz8.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-DG91Wfig.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.7.3
|
2.8.0
|
||||||
Reference in New Issue
Block a user