修改标题,独立系统设置,可缓存
This commit is contained in:
1 parent
1e49d2b99d
commit
96ee180564
18 files changed
+283
-3013
No files matched your search
Vendored
-4
@@ -2,9 +2,5 @@
|
||||
{
|
||||
"name": "粒子-序列帧-拖尾-碰撞-路径-spine",
|
||||
"file": "粒子-序列帧-拖尾-碰撞-路径-spine.json"
|
||||
},
|
||||
{
|
||||
"name": "粒子序列帧拖尾",
|
||||
"file": "粒子序列帧拖尾.json"
|
||||
}
|
||||
]
|
||||
+5
-16
@@ -1,29 +1,18 @@
|
||||
{
|
||||
"format": "SpineParticle.EditorConfig",
|
||||
"version": 1,
|
||||
"savedAt": "2026-09-01T09:14:16.879Z",
|
||||
"savedAt": "2026-09-01T09:56:02.078Z",
|
||||
"editor": {
|
||||
"viewScale": 0.3606100249815796,
|
||||
"viewX": -86.72420252825225,
|
||||
"viewY": 43.3444575964476
|
||||
"viewScale": 0.25667509294538904,
|
||||
"viewX": -108.03375430502649,
|
||||
"viewY": 58.10811303956338
|
||||
},
|
||||
"settings": {
|
||||
"tickEnabled": false,
|
||||
"axisFontSize": 12,
|
||||
"tickWidth": 1,
|
||||
"showAxisLabels": true,
|
||||
"axisColor": "#7a86ad",
|
||||
"undoLimit": 20,
|
||||
"backgroundX": 0,
|
||||
"backgroundY": 0,
|
||||
"backgroundOpacity": 1,
|
||||
"backgroundImageName": "",
|
||||
"backgroundImageData": "",
|
||||
"showEmitter": true,
|
||||
"showBones": false,
|
||||
"bonePointDrawSize": 1,
|
||||
"boneAxisDrawSize": 2,
|
||||
"showSkinMesh": false,
|
||||
"showGrid": true,
|
||||
"exportSettings": {
|
||||
"imagesPath": "./images/",
|
||||
@@ -2387,7 +2376,7 @@
|
||||
"depth": 7
|
||||
}
|
||||
],
|
||||
"assetVersion": 3,
|
||||
"assetVersion": 4,
|
||||
"status": "ready",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
Vendored
-1440
File diff suppressed because it is too large.
Load diff
Vendored
-1
@@ -1 +0,0 @@
|
||||
.stage-wrap[data-v-0a918645]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-0a918645]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-0a918645]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-0a918645]:active{cursor:grabbing}.topbar[data-v-0a918645]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-0a918645]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-0a918645]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-0a918645]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-0a918645]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-0a918645]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-0a918645]{position:relative;flex:0 0 auto}.background-btn[data-v-0a918645]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-0a918645]:hover,.background-btn.on[data-v-0a918645]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-0a918645]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-0a918645]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-0a918645]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-0a918645]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-0a918645]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-0a918645]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-0a918645]{display:none}.background-file-name[data-v-0a918645]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-0a918645]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-0a918645]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-0a918645]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-0a918645]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-0a918645]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-0a918645]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-0a918645]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-0a918645]:hover,.help-btn.on[data-v-0a918645]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-0a918645]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.help-overlay[data-v-0a918645]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-0a918645]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-0a918645]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-0a918645]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-0a918645]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-0a918645]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-0a918645]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-0a918645]{min-height:0;overflowLine truncated
|
||||
+70
-70
@@ -1,42 +1,42 @@
|
||||
var yx=Object.defineProperty;var xx=(i,e,t)=>e in i?yx(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>xx(i,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();/**
|
||||
var Tx=Object.defineProperty;var Mx=(i,e,t)=>e in i?Tx(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var A=(i,e,t)=>Mx(i,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function s(n){if(n.ep)return;n.ep=!0;const r=t(n);fetch(n.href,r)}})();/**
|
||||
* @vue/shared v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function Id(i){const e=Object.create(null);for(const t of i.split(","))e[t]=1;return t=>t in e}const Bt={},io=[],Xs=()=>{},_g=()=>!1,lh=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),hh=i=>i.startsWith("onUpdate:"),mi=Object.assign,Rd=(i,e)=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)},bx=Object.prototype.hasOwnProperty,Rt=(i,e)=>bx.call(i,e),tt=Array.isArray,so=i=>ya(i)==="[object Map]",xo=i=>ya(i)==="[object Set]",gf=i=>ya(i)==="[object Date]",at=i=>typeof i=="function",qt=i=>typeof i=="string",Xi=i=>typeof i=="symbol",Ot=i=>i!==null&&typeof i=="object",Sg=i=>(Ot(i)||at(i))&&at(i.then)&&at(i.catch),Tg=Object.prototype.toString,ya=i=>Tg.call(i),wx=i=>ya(i).slice(8,-1),Mg=i=>ya(i)==="[object Object]",ch=i=>qt(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,qo=Id(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),uh=i=>{const e=Object.create(null);return(t=>e[t]||(e[t]=i(t)))},_x=/-\w/g,ls=uh(i=>i.replace(_x,e=>e.slice(1).toUpperCase())),Sx=/\B([A-Z])/g,Jn=uh(i=>i.replace(Sx,"-$1").toLowerCase()),Eg=uh(i=>i.charAt(0).toUpperCase()+i.slice(1)),Vh=uh(i=>i?`on${Eg(i)}`:""),Ls=(i,e)=>!Object.is(i,e),al=(i,...e)=>{for(let t=0;t<i.length;t++)i[t](...e)},Ag=(i,e,t,s=!1)=>{Object.defineProperty(i,e,{configurable:!0,enumerable:!1,writable:s,value:t})},dh=i=>{const e=parseFloat(i);return isNaN(e)?i:e};let vf;const fh=()=>vf||(vf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pi(i){if(tt(i)){const e={};for(let t=0;t<i.length;t++){const s=i[t],n=qt(s)?Ax(s):Pi(s);if(n)for(const r in n)e[r]=n[r]}return e}else if(qt(i)||Ot(i))return i}const Tx=/;(?![^(]*\))/g,Mx=/:([^]+)/,Ex=/\/\*[^]*?\*\//g;function Ax(i){const e={};return i.replace(Ex,"").split(Tx).forEach(t=>{if(t){const s=t.split(Mx);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Je(i){let e="";if(qt(i))e=i;else if(tt(i))for(let t=0;t<i.length;t++){const s=Je(i[t]);s&&(e+=s+" ")}else if(Ot(i))for(const t in i)i[t]&&(e+=t+" ");return e.trim()}const Cx="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ix=Id(Cx);function Cg(i){return!!i||i===""}function Rx(i,e){if(i.length!==e.length)return!1;let t=!0;for(let s=0;t&&s<i.length;s++)t=bo(i[s],e[s]);return t}function bo(i,e){if(i===e)return!0;let t=gf(i),s=gf(e);if(t||s)return t&&s?i.getTime()===e.getTime():!1;if(t=Xi(i),s=Xi(e),t||s)return i===e;if(t=tt(i),s=tt(e),t||s)return t&&s?Rx(i,e):!1;if(t=Ot(i),s=Ot(e),t||s){if(!t||!s)return!1;const n=Object.keys(i).length,r=Object.keys(e).length;if(n!==r)return!1;for(const o in i){const a=i.hasOwnProperty(o),h=e.hasOwnProperty(o);if(a&&!h||!a&&h||!bo(i[o],e[o]))return!1}}return String(i)===String(e)}function Pd(i,e){return i.findIndex(t=>bo(t,e))}const Ig=i=>!!(i&&i.__v_isRef===!0),$e=i=>qt(i)?i:i==null?"":tt(i)||Ot(i)&&(i.toString===Tg||!at(i.toString))?Ig(i)?$e(i.value):JSON.stringify(i,Rg,2):String(i),Rg=(i,e)=>Ig(e)?Rg(i,e.value):so(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[s,n],r)=>(t[Xh(s,r)+" =>"]=n,t),{})}:xo(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>Xh(t))}:Xi(e)?Xh(e):Ot(e)&&!tt(e)&&!Mg(e)?String(e):e,Xh=(i,e="")=>{var t;return Xi(i)?`Symbol(${(t=i.description)!=null?t:e})`:i};/**
|
||||
**/function kd(i){const e=Object.create(null);for(const t of i.split(","))e[t]=1;return t=>t in e}const Ot={},io=[],Ys=()=>{},Mg=()=>!1,uh=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&(i.charCodeAt(2)>122||i.charCodeAt(2)<97),dh=i=>i.startsWith("onUpdate:"),mi=Object.assign,Fd=(i,e)=>{const t=i.indexOf(e);t>-1&&i.splice(t,1)},Ex=Object.prototype.hasOwnProperty,Rt=(i,e)=>Ex.call(i,e),tt=Array.isArray,so=i=>xa(i)==="[object Map]",xo=i=>xa(i)==="[object Set]",xf=i=>xa(i)==="[object Date]",at=i=>typeof i=="function",qt=i=>typeof i=="string",Xi=i=>typeof i=="symbol",Ft=i=>i!==null&&typeof i=="object",Eg=i=>(Ft(i)||at(i))&&at(i.then)&&at(i.catch),Ag=Object.prototype.toString,xa=i=>Ag.call(i),Ax=i=>xa(i).slice(8,-1),Cg=i=>xa(i)==="[object Object]",fh=i=>qt(i)&&i!=="NaN"&&i[0]!=="-"&&""+parseInt(i,10)===i,Ko=kd(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ph=i=>{const e=Object.create(null);return(t=>e[t]||(e[t]=i(t)))},Cx=/-\w/g,ls=ph(i=>i.replace(Cx,e=>e.slice(1).toUpperCase())),Ix=/\B([A-Z])/g,Jn=ph(i=>i.replace(Ix,"-$1").toLowerCase()),Ig=ph(i=>i.charAt(0).toUpperCase()+i.slice(1)),Yh=ph(i=>i?`on${Ig(i)}`:""),Ds=(i,e)=>!Object.is(i,e),cl=(i,...e)=>{for(let t=0;t<i.length;t++)i[t](...e)},Rg=(i,e,t,s=!1)=>{Object.defineProperty(i,e,{configurable:!0,enumerable:!1,writable:s,value:t})},mh=i=>{const e=parseFloat(i);return isNaN(e)?i:e};let bf;const gh=()=>bf||(bf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Pi(i){if(tt(i)){const e={};for(let t=0;t<i.length;t++){const s=i[t],n=qt(s)?Fx(s):Pi(s);if(n)for(const r in n)e[r]=n[r]}return e}else if(qt(i)||Ft(i))return i}const Rx=/;(?![^(]*\))/g,Px=/:([^]+)/,kx=/\/\*[^]*?\*\//g;function Fx(i){const e={};return i.replace(kx,"").split(Rx).forEach(t=>{if(t){const s=t.split(Px);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function Ze(i){let e="";if(qt(i))e=i;else if(tt(i))for(let t=0;t<i.length;t++){const s=Ze(i[t]);s&&(e+=s+" ")}else if(Ft(i))for(const t in i)i[t]&&(e+=t+" ");return e.trim()}const Ox="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Bx=kd(Ox);function Pg(i){return!!i||i===""}function Lx(i,e){if(i.length!==e.length)return!1;let t=!0;for(let s=0;t&&s<i.length;s++)t=bo(i[s],e[s]);return t}function bo(i,e){if(i===e)return!0;let t=xf(i),s=xf(e);if(t||s)return t&&s?i.getTime()===e.getTime():!1;if(t=Xi(i),s=Xi(e),t||s)return i===e;if(t=tt(i),s=tt(e),t||s)return t&&s?Lx(i,e):!1;if(t=Ft(i),s=Ft(e),t||s){if(!t||!s)return!1;const n=Object.keys(i).length,r=Object.keys(e).length;if(n!==r)return!1;for(const o in i){const a=i.hasOwnProperty(o),h=e.hasOwnProperty(o);if(a&&!h||!a&&h||!bo(i[o],e[o]))return!1}}return String(i)===String(e)}function Od(i,e){return i.findIndex(t=>bo(t,e))}const kg=i=>!!(i&&i.__v_isRef===!0),Ye=i=>qt(i)?i:i==null?"":tt(i)||Ft(i)&&(i.toString===Ag||!at(i.toString))?kg(i)?Ye(i.value):JSON.stringify(i,Fg,2):String(i),Fg=(i,e)=>kg(e)?Fg(i,e.value):so(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[s,n],r)=>(t[$h(s,r)+" =>"]=n,t),{})}:xo(e)?{[`Set(${e.size})`]:[...e.values()].map(t=>$h(t))}:Xi(e)?$h(e):Ft(e)&&!tt(e)&&!Cg(e)?String(e):e,$h=(i,e="")=>{var t;return Xi(i)?`Symbol(${(t=i.description)!=null?t:e})`:i};/**
|
||||
* @vue/reactivity v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let ri;class Pg{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&ri&&(ri.active?(this.parent=ri,this.index=(ri.scopes||(ri.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const s=this.scopes.slice();for(e=0,t=s.length;e<t;e++)s[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const s=this.effects.slice();for(e=0,t=s.length;e<t;e++)s[e].resume()}}run(e){if(this._active){const t=ri;try{return ri=this,e()}finally{ri=t}}}on(){++this._on===1&&(this.prevScope=ri,ri=this)}off(){if(this._on>0&&--this._on===0){if(ri===this)ri=this.prevScope;else{let e=ri;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,s;for(t=0,s=this.effects.length;t<s;t++)this.effects[t].stop();for(this.effects.length=0,t=0,s=this.cleanups.length;t<s;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function kg(i){return new Pg(i)}function Fg(){return ri}function Px(i,e=!1){ri&&ri.cleanups.push(i)}let Dt;const Yh=new WeakSet;class Og{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ri&&(ri.active?ri.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Yh.has(this)&&(Yh.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Lg(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,yf(this),Dg(this);const e=Dt,t=hs;Dt=this,hs=!0;try{return this.fn()}finally{Ng(this),Dt=e,hs=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Od(e);this.deps=this.depsTail=void 0,yf(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Yh.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Eu(this)&&this.run()}get dirty(){return Eu(this)}}let Bg=0,Ko,Zo;function Lg(i,e=!1){if(i.flags|=8,e){i.next=Zo,Zo=i;return}i.next=Ko,Ko=i}function kd(){Bg++}function Fd(){if(--Bg>0)return;if(Zo){let e=Zo;for(Zo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let i;for(;Ko;){let e=Ko;for(Ko=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){i||(i=s)}e=t}}if(i)throw i}function Dg(i){for(let e=i.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Ng(i){let e,t=i.depsTail,s=t;for(;s;){const n=s.prevDep;s.version===-1?(s===t&&(t=n),Od(s),kx(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=n}i.deps=e,i.depsTail=t}function Eu(i){for(let e=i.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Ug(e.dep.computed)||e.dep.version!==e.version))return!0;return!!i._dirty}function Ug(i){if(i.flags&4&&!(i.flags&16)||(i.flags&=-17,i.globalVersion===na)||(i.globalVersion=na,!i.isSSR&&i.flags&128&&(!i.deps&&!i._dirty||!Eu(i))))return;i.flags|=2;const e=i.dep,t=Dt,s=hs;Dt=i,hs=!0;try{Dg(i);const n=i.fn(i._value);(e.version===0||Ls(n,i._value))&&(i.flags|=128,i._value=n,e.version++)}catch(n){throw e.version++,n}finally{Dt=t,hs=s,Ng(i),i.flags&=-3}}function Od(i,e=!1){const{dep:t,prevSub:s,nextSub:n}=i;if(s&&(s.nextSub=n,i.prevSub=void 0),n&&(n.prevSub=s,i.nextSub=void 0),t.subs===i&&(t.subs=s,!s&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)Od(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function kx(i){const{prevDep:e,nextDep:t}=i;e&&(e.nextDep=t,i.prevDep=void 0),t&&(t.prevDep=e,i.nextDep=void 0)}let hs=!0;const Vg=[];function xn(){Vg.push(hs),hs=!1}function bn(){const i=Vg.pop();hs=i===void 0?!0:i}function yf(i){const{cleanup:e}=i;if(i.cleanup=void 0,e){const t=Dt;Dt=void 0;try{e()}finally{Dt=t}}}let na=0;class Fx{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Bd{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Dt||!hs||Dt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Dt)t=this.activeLink=new Fx(Dt,this),Dt.deps?(t.prevDep=Dt.depsTail,Dt.depsTail.nextDep=t,Dt.depsTail=t):Dt.deps=Dt.depsTail=t,Xg(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const s=t.nextDep;s.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=s),t.prevDep=Dt.depsTailLine truncated
|
||||
**/let ri;class Og{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&ri&&(ri.active?(this.parent=ri,this.index=(ri.scopes||(ri.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){const s=this.scopes.slice();for(e=0,t=s.length;e<t;e++)s[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){const n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}const s=this.effects.slice();for(e=0,t=s.length;e<t;e++)s[e].resume()}}run(e){if(this._active){const t=ri;try{return ri=this,e()}finally{ri=t}}}on(){++this._on===1&&(this.prevScope=ri,ri=this)}off(){if(this._on>0&&--this._on===0){if(ri===this)ri=this.prevScope;else{let e=ri;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,s;for(t=0,s=this.effects.length;t<s;t++)this.effects[t].stop();for(this.effects.length=0,t=0,s=this.cleanups.length;t<s;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(t=0,s=n.length;t<s;t++)n[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function Bg(i){return new Og(i)}function Lg(){return ri}function Dx(i,e=!1){ri&&ri.cleanups.push(i)}let Dt;const Gh=new WeakSet;class Dg{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ri&&(ri.active?ri.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Gh.has(this)&&(Gh.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ug(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,wf(this),Vg(this);const e=Dt,t=hs;Dt=this,hs=!0;try{return this.fn()}finally{Xg(this),Dt=e,hs=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Dd(e);this.deps=this.depsTail=void 0,wf(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Gh.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Iu(this)&&this.run()}get dirty(){return Iu(this)}}let Ng=0,Zo,Jo;function Ug(i,e=!1){if(i.flags|=8,e){i.next=Jo,Jo=i;return}i.next=Zo,Zo=i}function Bd(){Ng++}function Ld(){if(--Ng>0)return;if(Jo){let e=Jo;for(Jo=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let i;for(;Zo;){let e=Zo;for(Zo=void 0;e;){const t=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){i||(i=s)}e=t}}if(i)throw i}function Vg(i){for(let e=i.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function Xg(i){let e,t=i.depsTail,s=t;for(;s;){const n=s.prevDep;s.version===-1?(s===t&&(t=n),Dd(s),Nx(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=n}i.deps=e,i.depsTail=t}function Iu(i){for(let e=i.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(Yg(e.dep.computed)||e.dep.version!==e.version))return!0;return!!i._dirty}function Yg(i){if(i.flags&4&&!(i.flags&16)||(i.flags&=-17,i.globalVersion===ra)||(i.globalVersion=ra,!i.isSSR&&i.flags&128&&(!i.deps&&!i._dirty||!Iu(i))))return;i.flags|=2;const e=i.dep,t=Dt,s=hs;Dt=i,hs=!0;try{Vg(i);const n=i.fn(i._value);(e.version===0||Ds(n,i._value))&&(i.flags|=128,i._value=n,e.version++)}catch(n){throw e.version++,n}finally{Dt=t,hs=s,Xg(i),i.flags&=-3}}function Dd(i,e=!1){const{dep:t,prevSub:s,nextSub:n}=i;if(s&&(s.nextSub=n,i.prevSub=void 0),n&&(n.prevSub=s,i.nextSub=void 0),t.subs===i&&(t.subs=s,!s&&t.computed)){t.computed.flags&=-5;for(let r=t.computed.deps;r;r=r.nextDep)Dd(r,!0)}!e&&!--t.sc&&t.map&&t.map.delete(t.key)}function Nx(i){const{prevDep:e,nextDep:t}=i;e&&(e.nextDep=t,i.prevDep=void 0),t&&(t.prevDep=e,i.nextDep=void 0)}let hs=!0;const $g=[];function xn(){$g.push(hs),hs=!1}function bn(){const i=$g.pop();hs=i===void 0?!0:i}function wf(i){const{cleanup:e}=i;if(i.cleanup=void 0,e){const t=Dt;Dt=void 0;try{e()}finally{Dt=t}}}let ra=0;class Ux{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Nd{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Dt||!hs||Dt===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Dt)t=this.activeLink=new Ux(Dt,this),Dt.deps?(t.prevDep=Dt.depsTail,Dt.depsTail.nextDep=t,Dt.depsTail=t):Dt.deps=Dt.depsTail=t,Gg(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){const s=t.nextDep;s.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=s),t.prevDep=Dt.depsTailLine truncated
|
||||
* @vue/runtime-core v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/function xa(i,e,t,s){try{return s?i(...s):i()}catch(n){gh(n,e,t)}}function ms(i,e,t,s){if(at(i)){const n=xa(i,e,t,s);return n&&Sg(n)&&n.catch(r=>{gh(r,e,t)}),n}if(tt(i)){const n=[];for(let r=0;r<i.length;r++)n.push(ms(i[r],e,t,s));return n}}function gh(i,e,t,s=!0){const n=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||Bt;if(e){let a=e.parent;const h=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const c=a.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](i,h,l)===!1)return}a=a.parent}if(r){xn(),xa(r,null,10,[i,h,l]),bn();return}}a1(i,t,n,s,o)}function a1(i,e,t,s=!0,n=!1){if(n)throw i;console.error(i)}const Si=[];let Is=-1;const no=[];let On=null,Gr=0;const qg=Promise.resolve();let wl=null;function Nd(i){const e=wl||qg;return i?e.then(this?i.bind(this):i):e}function l1(i){let e=Is+1,t=Si.length;for(;e<t;){const s=e+t>>>1,n=Si[s],r=oa(n);r<i||r===i&&n.flags&2?e=s+1:t=s}return e}function Ud(i){if(!(i.flags&1)){const e=oa(i),t=Si[Si.length-1];!t||!(i.flags&2)&&e>=oa(t)?Si.push(i):Si.splice(l1(e),0,i),i.flags|=1,Kg()}}function Kg(){wl||(wl=qg.then(Jg))}function h1(i){if(!tt(i))On&&i.id===-1?On.splice(Gr+1,0,i):i.flags&1||(no.push(i),i.flags|=1);else for(let e=0;e<i.length;e++)no.push(i[e]);Kg()}function bf(i,e,t=Is+1){for(;t<Si.length;t++){const s=Si[t];if(s&&s.flags&2){if(i&&s.id!==i.uid)continue;Si.splice(t,1),t--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Zg(i){if(no.length){const e=[...new Set(no)].sort((t,s)=>oa(t)-oa(s));if(no.length=0,On){for(let t=0;t<e.length;t++)On.push(e[t]);return}for(On=e,Gr=0;Gr<On.length;Gr++){const t=On[Gr];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}On=null,Gr=0}}const oa=i=>i.id==null?i.flags&2?-1:1/0:i.id;function Jg(i){try{for(Is=0;Is<Si.length;Is++){const e=Si[Is];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),xa(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Is<Si.length;Is++){const e=Si[Is];e&&(e.flags&=-2)}Is=-1,Si.length=0,Zg(),wl=null,(Si.length||no.length)&&Jg()}}let bi=null,Qg=null;function _l(i){const e=bi;return bi=i,Qg=i&&i.type.__scopeId||null,e}function Ru(i,e=bi,t){if(!e||i._n)return i;const s=(...n)=>{s._d&&Pf(-1);const r=_l(e),o=vn.length;let a;try{a=i(...n)}finally{for(let h=vn.length;h>o;h--)jd();_l(r),s._d&&Pf(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function be(i,e){if(bi===null)return i;const t=wh(bi),s=i.dirs||(i.dirs=[]);for(let n=0;n<e.length;n++){let[r,o,a,h=Bt]=e[n];r&&(at(r)&&(r={mounted:r,updated:r}),r.deep&&un(o),s.push({dir:r,instance:t,value:o,oldValue:void 0,arg:a,modifiers:h}))}return i}function sr(i,e,t,s){const n=i.dirs,r=e&&e.dirs;for(let o=0;o<n.length;o++){const a=n[o];r&&(a.oldValue=r[o].value);let h=a.dir[s];h&&(xn(),ms(h,t,8,[i.el,a,i,e]),bn())}}function c1(i,e){if(Ti){let t=Ti.provides;const s=Ti.parent&&Ti.parent.provides;s===t&&(t=Ti.provides=Object.create(s)),t[i]=e}}function Jo(i,e,t=!1){const s=M0();if(s||gr){let n=gr?gr._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(n&&i in n)return n[i];if(arguments.length>1)return t&&at(e)?e.call(s&&s.proxy):e}}function u1(){return!!(M0()||gr)}const d1=Symbol.for("v-scx"),f1=()=>Jo(d1);function Do(i,e){return Vd(i,null,e)}function Ys(i,e,t){return Vd(i,e,t)}function Vd(i,e,t=Bt){const{immediate:s,deep:n,flush:r,once:o}=t,a=mi({},t),h=e&&s||!e&&r!=="post";let l;if(ha){if(r==="sync"){const d=f1();l=d.__watcherHandles||(d.__watcherHandles=[])}else if(!h){const d=()=>{};return d.stop=Xs,d.resume=Xs,d.pause=Xs,d}}const c=Ti;a.call=(d,m,g)=>ms(d,c,m,g);let u=!1;r==="post"?a.scheduler=d=>{Ai(d,c&&c.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(d,m)=>{m?d():Ud(d)}),a.augmentJob=d=>{e&&(d.flags|=4),u&&(d.flags|=2,c&&(d.id=c.uid,d.i=c))};const f=o1(i,e,a);return ha&&(l?l.push(f):h&&f()),f}function p1(i,e,t){const s=this.proxy,n=qt(i)?i.includes(".")?e0(s,i):()=>s[i]:i.bind(s,s);let r;at(e)?r=e:(r=e.handler,t=e);const o=wa(this),a=Vd(n,r.bind(s),t);return o(),a}function e0(i,e){const t=e.split(".");return()=>{let s=i;for(let n=0;n<t.length&&s;n++)s=s[t[n]];return s}}const m1=Symbol("_vte"),vh=i=>i.__isTeleport,jh=Symbol("_leaveCb");function g1(i){let e=i[0];if(i.length>1){for(const t of i)if(t.type!==js){e=t;break}}return e}function t0(i){if(!Yd(i))return vh(i.type)&&i.children?g1(i.children):i;if(i.component)return i.component.subTree;const{shapeFlag:e,children:t}=i;if(t){if(e&16)return t[0];if(e&32&&at(t.default))return t.default()}}function Xd(i,e){if(i.shapeFlag&6&&i.component){i.transition=e;const t=i.component.subTree;Xd(vh(t.type)&&t0(t)||t,e)}else i.shapeFlag&128?(i.ssContent.transition=e.clone(i.ssContent),i.ssFallback.transition=e.clone(i.ssFallback)):i.transition=e}function Ws(i,e){return at(i)?mi({name:i.name},e,{setup:i}):i}function i0(i){i.ids=[i.ids[0]+i.ids[2]+++"-",0,0]}function wf(i,e){let t;return!!((t=Object.getOwnPropertyDescriptor(i,e))&&!t.configurable)}const Sl=new WeakMap;function Qo(i,e,t,s,n=!1){if(tt(i)){i.for
Line truncated
|
||||
**/function ba(i,e,t,s){try{return s?i(...s):i()}catch(n){xh(n,e,t)}}function gs(i,e,t,s){if(at(i)){const n=ba(i,e,t,s);return n&&Eg(n)&&n.catch(r=>{xh(r,e,t)}),n}if(tt(i)){const n=[];for(let r=0;r<i.length;r++)n.push(gs(i[r],e,t,s));return n}}function xh(i,e,t,s=!0){const n=e?e.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||Ot;if(e){let a=e.parent;const h=e.proxy,l=`https://vuejs.org/error-reference/#runtime-${t}`;for(;a;){const c=a.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](i,h,l)===!1)return}a=a.parent}if(r){xn(),ba(r,null,10,[i,h,l]),bn();return}}f1(i,t,n,s,o)}function f1(i,e,t,s=!0,n=!1){if(n)throw i;console.error(i)}const Si=[];let Rs=-1;const no=[];let On=null,Gr=0;const Jg=Promise.resolve();let Tl=null;function Xd(i){const e=Tl||Jg;return i?e.then(this?i.bind(this):i):e}function p1(i){let e=Rs+1,t=Si.length;for(;e<t;){const s=e+t>>>1,n=Si[s],r=aa(n);r<i||r===i&&n.flags&2?e=s+1:t=s}return e}function Yd(i){if(!(i.flags&1)){const e=aa(i),t=Si[Si.length-1];!t||!(i.flags&2)&&e>=aa(t)?Si.push(i):Si.splice(p1(e),0,i),i.flags|=1,Qg()}}function Qg(){Tl||(Tl=Jg.then(t0))}function m1(i){if(!tt(i))On&&i.id===-1?On.splice(Gr+1,0,i):i.flags&1||(no.push(i),i.flags|=1);else for(let e=0;e<i.length;e++)no.push(i[e]);Qg()}function Sf(i,e,t=Rs+1){for(;t<Si.length;t++){const s=Si[t];if(s&&s.flags&2){if(i&&s.id!==i.uid)continue;Si.splice(t,1),t--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function e0(i){if(no.length){const e=[...new Set(no)].sort((t,s)=>aa(t)-aa(s));if(no.length=0,On){for(let t=0;t<e.length;t++)On.push(e[t]);return}for(On=e,Gr=0;Gr<On.length;Gr++){const t=On[Gr];t.flags&4&&(t.flags&=-2),t.flags&8||t(),t.flags&=-2}On=null,Gr=0}}const aa=i=>i.id==null?i.flags&2?-1:1/0:i.id;function t0(i){try{for(Rs=0;Rs<Si.length;Rs++){const e=Si[Rs];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),ba(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Rs<Si.length;Rs++){const e=Si[Rs];e&&(e.flags&=-2)}Rs=-1,Si.length=0,e0(),Tl=null,(Si.length||no.length)&&t0()}}let bi=null,i0=null;function Ml(i){const e=bi;return bi=i,i0=i&&i.type.__scopeId||null,e}function Fu(i,e=bi,t){if(!e||i._n)return i;const s=(...n)=>{s._d&&Of(-1);const r=Ml(e),o=vn.length;let a;try{a=i(...n)}finally{for(let h=vn.length;h>o;h--)zd();Ml(r),s._d&&Of(1)}return a};return s._n=!0,s._c=!0,s._d=!0,s}function xe(i,e){if(bi===null)return i;const t=Th(bi),s=i.dirs||(i.dirs=[]);for(let n=0;n<e.length;n++){let[r,o,a,h=Ot]=e[n];r&&(at(r)&&(r={mounted:r,updated:r}),r.deep&&un(o),s.push({dir:r,instance:t,value:o,oldValue:void 0,arg:a,modifiers:h}))}return i}function sr(i,e,t,s){const n=i.dirs,r=e&&e.dirs;for(let o=0;o<n.length;o++){const a=n[o];r&&(a.oldValue=r[o].value);let h=a.dir[s];h&&(xn(),gs(h,t,8,[i.el,a,i,e]),bn())}}function g1(i,e){if(Ti){let t=Ti.provides;const s=Ti.parent&&Ti.parent.provides;s===t&&(t=Ti.provides=Object.create(s)),t[i]=e}}function Qo(i,e,t=!1){const s=C0();if(s||gr){let n=gr?gr._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(n&&i in n)return n[i];if(arguments.length>1)return t&&at(e)?e.call(s&&s.proxy):e}}function v1(){return!!(C0()||gr)}const y1=Symbol.for("v-scx"),x1=()=>Qo(y1);function No(i,e){return $d(i,null,e)}function cs(i,e,t){return $d(i,e,t)}function $d(i,e,t=Ot){const{immediate:s,deep:n,flush:r,once:o}=t,a=mi({},t),h=e&&s||!e&&r!=="post";let l;if(ca){if(r==="sync"){const d=x1();l=d.__watcherHandles||(d.__watcherHandles=[])}else if(!h){const d=()=>{};return d.stop=Ys,d.resume=Ys,d.pause=Ys,d}}const c=Ti;a.call=(d,m,g)=>gs(d,c,m,g);let u=!1;r==="post"?a.scheduler=d=>{Ai(d,c&&c.suspense)}:r!=="sync"&&(u=!0,a.scheduler=(d,m)=>{m?d():Yd(d)}),a.augmentJob=d=>{e&&(d.flags|=4),u&&(d.flags|=2,c&&(d.id=c.uid,d.i=c))};const f=d1(i,e,a);return ca&&(l?l.push(f):h&&f()),f}function b1(i,e,t){const s=this.proxy,n=qt(i)?i.includes(".")?s0(s,i):()=>s[i]:i.bind(s,s);let r;at(e)?r=e:(r=e.handler,t=e);const o=_a(this),a=$d(n,r.bind(s),t);return o(),a}function s0(i,e){const t=e.split(".");return()=>{let s=i;for(let n=0;n<t.length&&s;n++)s=s[t[n]];return s}}const w1=Symbol("_vte"),bh=i=>i.__isTeleport,Wh=Symbol("_leaveCb");function _1(i){let e=i[0];if(i.length>1){for(const t of i)if(t.type!==js){e=t;break}}return e}function n0(i){if(!jd(i))return bh(i.type)&&i.children?_1(i.children):i;if(i.component)return i.component.subTree;const{shapeFlag:e,children:t}=i;if(t){if(e&16)return t[0];if(e&32&&at(t.default))return t.default()}}function Gd(i,e){if(i.shapeFlag&6&&i.component){i.transition=e;const t=i.component.subTree;Gd(bh(t.type)&&n0(t)||t,e)}else i.shapeFlag&128?(i.ssContent.transition=e.clone(i.ssContent),i.ssFallback.transition=e.clone(i.ssFallback)):i.transition=e}function Ws(i,e){return at(i)?mi({name:i.name},e,{setup:i}):i}function r0(i){i.ids=[i.ids[0]+i.ids[2]+++"-",0,0]}function Tf(i,e){let t;return!!((t=Object.getOwnPropertyDescriptor(i,e))&&!t.configurable)}const El=new WeakMap;function ea(i,e,t,s,n=!1){if(tt(i)){i.for
Line truncated
|
||||
* @vue/runtime-dom v3.5.41
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/let Bu;const Of=typeof window<"u"&&window.trustedTypes;if(Of)try{Bu=Of.createPolicy("vue",{createHTML:i=>i})}catch{}const C0=Bu?i=>Bu.createHTML(i):i=>i,fb="http://www.w3.org/2000/svg",pb="http://www.w3.org/1998/Math/MathML",rn=typeof document<"u"?document:null,Bf=rn&&rn.createElement("template"),mb={insert:(i,e,t)=>{e.insertBefore(i,t||null)},remove:i=>{const e=i.parentNode;e&&e.removeChild(i)},createElement:(i,e,t,s)=>{const n=e==="svg"?rn.createElementNS(fb,i):e==="mathml"?rn.createElementNS(pb,i):t?rn.createElement(i,{is:t}):rn.createElement(i);return i==="select"&&s&&s.multiple!=null&&n.setAttribute("multiple",s.multiple),n},createText:i=>rn.createTextNode(i),createComment:i=>rn.createComment(i),setText:(i,e)=>{i.nodeValue=e},setElementText:(i,e)=>{i.textContent=e},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>rn.querySelector(i),setScopeId(i,e){i.setAttribute(e,"")},insertStaticContent(i,e,t,s,n,r){const o=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{Bf.innerHTML=C0(s==="svg"?`<svg>${i}</svg>`:s==="mathml"?`<math>${i}</math>`:i);const a=Bf.content;if(s==="svg"||s==="mathml"){const h=a.firstChild;for(;h.firstChild;)a.appendChild(h.firstChild);a.removeChild(h)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},gb=Symbol("_vtc");function vb(i,e,t){const s=i[gb];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?i.removeAttribute("class"):t?i.setAttribute("class",e):i.className=e}const Al=Symbol("_vod"),I0=Symbol("_vsh"),Cn={name:"show",beforeMount(i,{value:e},{transition:t}){i[Al]=i.style.display==="none"?"":i.style.display,t&&e?t.beforeEnter(i):Po(i,e)},mounted(i,{value:e},{transition:t}){t&&e&&t.enter(i)},updated(i,{value:e,oldValue:t},{transition:s}){!e!=!t&&(s?e?(s.beforeEnter(i),Po(i,!0),s.enter(i)):s.leave(i,()=>{Po(i,!1)}):Po(i,e))},beforeUnmount(i,{value:e}){Po(i,e)}};function Po(i,e){i.style.display=e?i[Al]:"none",i[I0]=!e}const yb=Symbol(""),xb=/(?:^|;)\s*display\s*:/;function bb(i,e,t){const s=i.style,n=qt(t);let r=!1;if(t&&!n){if(e)if(qt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Vo(s,a,"")}else for(const o in e)t[o]==null&&Vo(s,o,"");for(const o in t){o==="display"&&(r=!0);const a=t[o];a!=null?_b(i,o,!qt(e)&&e?e[o]:void 0,a)||Vo(s,o,a):Vo(s,o,"")}}else if(n){if(e!==t){const o=s[yb];o&&(t+=";"+o),s.cssText=t,r=xb.test(t)}}else e&&i.removeAttribute("style");Al in i&&(i[Al]=r?s.display:"",i[I0]&&(s.display="none"))}const Lf=/\s*!important$/;function Vo(i,e,t){if(tt(t))t.forEach(s=>Vo(i,e,s));else if(t==null&&(t=""),e.startsWith("--"))i.setProperty(e,t);else{const s=wb(i,e);Lf.test(t)?i.setProperty(Jn(s),t.replace(Lf,""),"important"):i[s]=t}}const Df=["Webkit","Moz","ms"],zh={};function wb(i,e){const t=zh[e];if(t)return t;let s=ls(e);if(s!=="filter"&&s in i)return zh[e]=s;s=Eg(s);for(let n=0;n<Df.length;n++){const r=Df[n]+s;if(r in i)return zh[e]=r}return e}function _b(i,e,t,s){return i.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&qt(s)&&t===s}const Nf="http://www.w3.org/1999/xlink";function Uf(i,e,t,s,n,r=Ix(e)){s&&e.startsWith("xlink:")?t==null?i.removeAttributeNS(Nf,e.slice(6,e.length)):i.setAttributeNS(Nf,e,t):t==null||r&&!Cg(t)?i.removeAttribute(e):i.setAttribute(e,r?"":Xi(t)?String(t):t)}function Vf(i,e,t,s,n){if(e==="innerHTML"||e==="textContent"){t!=null&&(i[e]=e==="innerHTML"?C0(t):t);return}const r=i.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?i.getAttribute("value")||"":i.value,h=t==null?i.type==="checkbox"?"on":"":String(t);(a!==h||!("_value"in i))&&(i.value=h),t==null&&i.removeAttribute(e),i._value=t;return}let o=!1;if(t===""||t==null){const a=typeof i[e];a==="boolean"?t=Cg(t):t==null&&a==="string"?(t="",o=!0):a==="number"&&(t=0,o=!0)}try{i[e]=t}catch{}o&&i.removeAttribute(n||e)}function Un(i,e,t,s){i.addEventListener(e,t,s)}function Sb(i,e,t,s){i.removeEventListener(e,t,s)}const Xf=Symbol("_vei");function Tb(i,e,t,s,n=null){const r=i[Xf]||(i[Xf]={}),o=r[e];if(s&&o)o.value=s;else{const[a,h]=Ab(e);if(s){const l=r[e]=Rb(s,n);Un(i,a,l,h)}else o&&(Sb(i,a,o,h),r[e]=void 0)}}const Mb=/(Once|Passive|Capture)$/,Eb=/^on:?(?:Once|Passive|Capture)$/;function Ab(i){let e,t;for(;(t=i.match(Mb))&&!Eb.test(i);)e||(e={}),i=i.slice(0,i.length-t[1].length),e[t[1].toLowerCase()]=!0;return[i[2]===":"?i.slice(3):Jn(i.slice(2)),e]}let qh=0;const Cb=Promise.resolve(),Ib=()=>qh||(Cb.then(()=>qh=0),qh=Date.now());function Rb(i,e){const t=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=t.attached)return;const n=t.value;if(tt(n)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const o=n.slice(),a=[s];for(let h=0;h<o.length&&!s._stopped;h++){const l=o[h];l&&ms(l,e,5,a)}}else ms(n,e,5,[s])};return t.value=i,t.attached=Ib(),t}const Yf=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,Pb=(i,e,t,s
Line truncated
|
||||
`))),i[Ds]=go(n);const r=s||n.props&&n.props.type==="number";Un(i,e?"change":"input",o=>{o.target.composing||i[Ds](Kh(i.value,t,r))}),(t||r)&&Un(i,"change",()=>{i.value=Kh(i.value,t,r)}),e||(Un(i,"compositionstart",Ob),Un(i,"compositionend",$f),Un(i,"change",$f))},mounted(i,{value:e,modifiers:{trim:t,number:s}}){const n=e??"",r=i[Ra];delete i[Ra],r!==void 0&&(i.type==="text"||i.type==="textarea")&&i.value!==r?i[Ds](Kh(i.value,t,s)):i.value=n},beforeUpdate(i,{value:e,oldValue:t,modifiers:{lazy:s,trim:n,number:r}},o){if(i[Ds]=go(o),i.composing)return;const a=(r||i.type==="number")&&!/^0\d/.test(i.value)?dh(i.value):i.value,h=e??"";if(a===h)return;const l=i.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===i&&i.type!=="range"&&(s&&e===t||n&&i.value.trim()===h)||(i.value=h)}},Vt={deep:!0,created(i,e,t){i[Ds]=go(t),Un(i,"change",()=>{const s=i._modelValue,n=ca(i),r=i.checked,o=i[Ds];if(tt(s)){const a=Pd(s,n),h=a!==-1;if(r&&!h)o(s.concat(n));else if(!r&&h){const l=[...s];l.splice(a,1),o(l)}}else if(xo(s)){const a=new Set(s);r?a.add(n):a.delete(n),o(a)}else o(R0(i,r))})},mounted:Gf,beforeUpdate(i,e,t){i[Ds]=go(t),Gf(i,e,t)}};function Gf(i,{value:e,oldValue:t},s){i._modelValue=e;let n;if(tt(e))n=Pd(e,s.props.value)>-1;else if(xo(e))n=e.has(s.props.value);else{if(e===t)return;n=bo(e,R0(i,!0))}i.checked!==n&&(i.checked=n)}const kt={deep:!0,created(i,{value:e,modifiers:{number:t}},s){i._modelValue=e,Un(i,"change",()=>{const n=Array.prototype.filter.call(i.options,r=>r.selected).map(r=>t?dh(ca(r)):ca(r));i[Ds](i.multiple?xo(i._modelValue)?new Set(n):n:n[0]),i._assigning=!0,Nd(()=>{i._assigning=!1})}),i[Ds]=go(s)},mounted(i,{value:e}){jf(i,e)},beforeUpdate(i,{value:e},t){i._modelValue=e,i[Ds]=go(t)},updated(i,{value:e}){i._assigning||jf(i,e)}};function jf(i,e){const t=i.multiple,s=tt(e);if(!(t&&!s&&!xo(e))){for(let n=0,r=i.options.length;n<r;n++){const o=i.options[n],a=ca(o);if(t)if(s){const h=typeof a;h==="string"||h==="number"?o.selected=e.some(l=>String(l)===String(a)):o.selected=Pd(e,a)>-1}else o.selected=e.has(a);else if(bo(ca(o),e)){i.selectedIndex!==n&&(i.selectedIndex=n);return}}!t&&i.selectedIndex!==-1&&(i.selectedIndex=-1)}}function ca(i){return"_value"in i?i._value:i.value}function R0(i,e){const t=e?"_trueValue":"_falseValue";return t in i?i[t]:e}const Bb=["ctrl","shift","alt","meta"],Lb={stop:i=>i.stopPropagation(),prevent:i=>i.preventDefault(),self:i=>i.target!==i.currentTarget,ctrl:i=>!i.ctrlKey,shift:i=>!i.shiftKey,alt:i=>!i.altKey,meta:i=>!i.metaKey,left:i=>"button"in i&&i.button!==0,middle:i=>"button"in i&&i.button!==1,right:i=>"button"in i&&i.button!==2,exact:(i,e)=>Bb.some(t=>i[`${t}Key`]&&!e.includes(t))},xt=(i,e)=>{if(!i)return i;const t=i._withMods||(i._withMods={}),s=e.join(".");return t[s]||(t[s]=((n,...r)=>{for(let o=0;o<e.length;o++){const a=Lb[e[o]];if(a&&a(n,e))return}return i(n,...r)}))},Db={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ua=(i,e)=>{const t=i._withKeys||(i._withKeys={}),s=e.join(".");return t[s]||(t[s]=(n=>{if(!("key"in n))return;const r=Jn(n.key);if(e.some(o=>o===r||Db[o]===r))return i(n)}))},Nb=mi({patchProp:Pb},mb);let Hf;function Ub(){return Hf||(Hf=K1(Nb))}const Vb=((...i)=>{const e=Ub().createApp(...i),{mount:t}=e;return e.mount=s=>{const n=Yb(s);if(!n)return;const r=e._component;!at(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,Xb(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e});function Xb(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function Yb(i){return qt(i)?document.querySelector(i):i}/*!
|
||||
**/let Nu;const Df=typeof window<"u"&&window.trustedTypes;if(Df)try{Nu=Df.createPolicy("vue",{createHTML:i=>i})}catch{}const P0=Nu?i=>Nu.createHTML(i):i=>i,xb="http://www.w3.org/2000/svg",bb="http://www.w3.org/1998/Math/MathML",rn=typeof document<"u"?document:null,Nf=rn&&rn.createElement("template"),wb={insert:(i,e,t)=>{e.insertBefore(i,t||null)},remove:i=>{const e=i.parentNode;e&&e.removeChild(i)},createElement:(i,e,t,s)=>{const n=e==="svg"?rn.createElementNS(xb,i):e==="mathml"?rn.createElementNS(bb,i):t?rn.createElement(i,{is:t}):rn.createElement(i);return i==="select"&&s&&s.multiple!=null&&n.setAttribute("multiple",s.multiple),n},createText:i=>rn.createTextNode(i),createComment:i=>rn.createComment(i),setText:(i,e)=>{i.nodeValue=e},setElementText:(i,e)=>{i.textContent=e},parentNode:i=>i.parentNode,nextSibling:i=>i.nextSibling,querySelector:i=>rn.querySelector(i),setScopeId(i,e){i.setAttribute(e,"")},insertStaticContent(i,e,t,s,n,r){const o=t?t.previousSibling:e.lastChild;if(n&&(n===r||n.nextSibling))for(;e.insertBefore(n.cloneNode(!0),t),!(n===r||!(n=n.nextSibling)););else{Nf.innerHTML=P0(s==="svg"?`<svg>${i}</svg>`:s==="mathml"?`<math>${i}</math>`:i);const a=Nf.content;if(s==="svg"||s==="mathml"){const h=a.firstChild;for(;h.firstChild;)a.appendChild(h.firstChild);a.removeChild(h)}e.insertBefore(a,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}},_b=Symbol("_vtc");function Sb(i,e,t){const s=i[_b];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?i.removeAttribute("class"):t?i.setAttribute("class",e):i.className=e}const Rl=Symbol("_vod"),k0=Symbol("_vsh"),Cn={name:"show",beforeMount(i,{value:e},{transition:t}){i[Rl]=i.style.display==="none"?"":i.style.display,t&&e?t.beforeEnter(i):Po(i,e)},mounted(i,{value:e},{transition:t}){t&&e&&t.enter(i)},updated(i,{value:e,oldValue:t},{transition:s}){!e!=!t&&(s?e?(s.beforeEnter(i),Po(i,!0),s.enter(i)):s.leave(i,()=>{Po(i,!1)}):Po(i,e))},beforeUnmount(i,{value:e}){Po(i,e)}};function Po(i,e){i.style.display=e?i[Rl]:"none",i[k0]=!e}const Tb=Symbol(""),Mb=/(?:^|;)\s*display\s*:/;function Eb(i,e,t){const s=i.style,n=qt(t);let r=!1;if(t&&!n){if(e)if(qt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();t[a]==null&&Xo(s,a,"")}else for(const o in e)t[o]==null&&Xo(s,o,"");for(const o in t){o==="display"&&(r=!0);const a=t[o];a!=null?Cb(i,o,!qt(e)&&e?e[o]:void 0,a)||Xo(s,o,a):Xo(s,o,"")}}else if(n){if(e!==t){const o=s[Tb];o&&(t+=";"+o),s.cssText=t,r=Mb.test(t)}}else e&&i.removeAttribute("style");Rl in i&&(i[Rl]=r?s.display:"",i[k0]&&(s.display="none"))}const Uf=/\s*!important$/;function Xo(i,e,t){if(tt(t))t.forEach(s=>Xo(i,e,s));else if(t==null&&(t=""),e.startsWith("--"))i.setProperty(e,t);else{const s=Ab(i,e);Uf.test(t)?i.setProperty(Jn(s),t.replace(Uf,""),"important"):i[s]=t}}const Vf=["Webkit","Moz","ms"],Kh={};function Ab(i,e){const t=Kh[e];if(t)return t;let s=ls(e);if(s!=="filter"&&s in i)return Kh[e]=s;s=Ig(s);for(let n=0;n<Vf.length;n++){const r=Vf[n]+s;if(r in i)return Kh[e]=r}return e}function Cb(i,e,t,s){return i.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&qt(s)&&t===s}const Xf="http://www.w3.org/1999/xlink";function Yf(i,e,t,s,n,r=Bx(e)){s&&e.startsWith("xlink:")?t==null?i.removeAttributeNS(Xf,e.slice(6,e.length)):i.setAttributeNS(Xf,e,t):t==null||r&&!Pg(t)?i.removeAttribute(e):i.setAttribute(e,r?"":Xi(t)?String(t):t)}function $f(i,e,t,s,n){if(e==="innerHTML"||e==="textContent"){t!=null&&(i[e]=e==="innerHTML"?P0(t):t);return}const r=i.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?i.getAttribute("value")||"":i.value,h=t==null?i.type==="checkbox"?"on":"":String(t);(a!==h||!("_value"in i))&&(i.value=h),t==null&&i.removeAttribute(e),i._value=t;return}let o=!1;if(t===""||t==null){const a=typeof i[e];a==="boolean"?t=Pg(t):t==null&&a==="string"?(t="",o=!0):a==="number"&&(t=0,o=!0)}try{i[e]=t}catch{}o&&i.removeAttribute(n||e)}function Un(i,e,t,s){i.addEventListener(e,t,s)}function Ib(i,e,t,s){i.removeEventListener(e,t,s)}const Gf=Symbol("_vei");function Rb(i,e,t,s,n=null){const r=i[Gf]||(i[Gf]={}),o=r[e];if(s&&o)o.value=s;else{const[a,h]=Fb(e);if(s){const l=r[e]=Lb(s,n);Un(i,a,l,h)}else o&&(Ib(i,a,o,h),r[e]=void 0)}}const Pb=/(Once|Passive|Capture)$/,kb=/^on:?(?:Once|Passive|Capture)$/;function Fb(i){let e,t;for(;(t=i.match(Pb))&&!kb.test(i);)e||(e={}),i=i.slice(0,i.length-t[1].length),e[t[1].toLowerCase()]=!0;return[i[2]===":"?i.slice(3):Jn(i.slice(2)),e]}let Zh=0;const Ob=Promise.resolve(),Bb=()=>Zh||(Ob.then(()=>Zh=0),Zh=Date.now());function Lb(i,e){const t=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=t.attached)return;const n=t.value;if(tt(n)){const r=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{r.call(s),s._stopped=!0};const o=n.slice(),a=[s];for(let h=0;h<o.length&&!s._stopped;h++){const l=o[h];l&&gs(l,e,5,a)}}else gs(n,e,5,[s])};return t.value=i,t.attached=Bb(),t}const jf=i=>i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)>96&&i.charCodeAt(2)<123,Db=(i,e,t,s
Line truncated
|
||||
`))),i[Ns]=go(n);const r=s||n.props&&n.props.type==="number";Un(i,e?"change":"input",o=>{o.target.composing||i[Ns](Jh(i.value,t,r))}),(t||r)&&Un(i,"change",()=>{i.value=Jh(i.value,t,r)}),e||(Un(i,"compositionstart",Vb),Un(i,"compositionend",Hf),Un(i,"change",Hf))},mounted(i,{value:e,modifiers:{trim:t,number:s}}){const n=e??"",r=i[ka];delete i[ka],r!==void 0&&(i.type==="text"||i.type==="textarea")&&i.value!==r?i[Ns](Jh(i.value,t,s)):i.value=n},beforeUpdate(i,{value:e,oldValue:t,modifiers:{lazy:s,trim:n,number:r}},o){if(i[Ns]=go(o),i.composing)return;const a=(r||i.type==="number")&&!/^0\d/.test(i.value)?mh(i.value):i.value,h=e??"";if(a===h)return;const l=i.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===i&&i.type!=="range"&&(s&&e===t||n&&i.value.trim()===h)||(i.value=h)}},Lt={deep:!0,created(i,e,t){i[Ns]=go(t),Un(i,"change",()=>{const s=i._modelValue,n=ua(i),r=i.checked,o=i[Ns];if(tt(s)){const a=Od(s,n),h=a!==-1;if(r&&!h)o(s.concat(n));else if(!r&&h){const l=[...s];l.splice(a,1),o(l)}}else if(xo(s)){const a=new Set(s);r?a.add(n):a.delete(n),o(a)}else o(F0(i,r))})},mounted:Wf,beforeUpdate(i,e,t){i[Ns]=go(t),Wf(i,e,t)}};function Wf(i,{value:e,oldValue:t},s){i._modelValue=e;let n;if(tt(e))n=Od(e,s.props.value)>-1;else if(xo(e))n=e.has(s.props.value);else{if(e===t)return;n=bo(e,F0(i,!0))}i.checked!==n&&(i.checked=n)}const kt={deep:!0,created(i,{value:e,modifiers:{number:t}},s){i._modelValue=e,Un(i,"change",()=>{const n=Array.prototype.filter.call(i.options,r=>r.selected).map(r=>t?mh(ua(r)):ua(r));i[Ns](i.multiple?xo(i._modelValue)?new Set(n):n:n[0]),i._assigning=!0,Xd(()=>{i._assigning=!1})}),i[Ns]=go(s)},mounted(i,{value:e}){zf(i,e)},beforeUpdate(i,{value:e},t){i._modelValue=e,i[Ns]=go(t)},updated(i,{value:e}){i._assigning||zf(i,e)}};function zf(i,e){const t=i.multiple,s=tt(e);if(!(t&&!s&&!xo(e))){for(let n=0,r=i.options.length;n<r;n++){const o=i.options[n],a=ua(o);if(t)if(s){const h=typeof a;h==="string"||h==="number"?o.selected=e.some(l=>String(l)===String(a)):o.selected=Od(e,a)>-1}else o.selected=e.has(a);else if(bo(ua(o),e)){i.selectedIndex!==n&&(i.selectedIndex=n);return}}!t&&i.selectedIndex!==-1&&(i.selectedIndex=-1)}}function ua(i){return"_value"in i?i._value:i.value}function F0(i,e){const t=e?"_trueValue":"_falseValue";return t in i?i[t]:e}const Xb=["ctrl","shift","alt","meta"],Yb={stop:i=>i.stopPropagation(),prevent:i=>i.preventDefault(),self:i=>i.target!==i.currentTarget,ctrl:i=>!i.ctrlKey,shift:i=>!i.shiftKey,alt:i=>!i.altKey,meta:i=>!i.metaKey,left:i=>"button"in i&&i.button!==0,middle:i=>"button"in i&&i.button!==1,right:i=>"button"in i&&i.button!==2,exact:(i,e)=>Xb.some(t=>i[`${t}Key`]&&!e.includes(t))},xt=(i,e)=>{if(!i)return i;const t=i._withMods||(i._withMods={}),s=e.join(".");return t[s]||(t[s]=((n,...r)=>{for(let o=0;o<e.length;o++){const a=Yb[e[o]];if(a&&a(n,e))return}return i(n,...r)}))},$b={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},da=(i,e)=>{const t=i._withKeys||(i._withKeys={}),s=e.join(".");return t[s]||(t[s]=(n=>{if(!("key"in n))return;const r=Jn(n.key);if(e.some(o=>o===r||$b[o]===r))return i(n)}))},Gb=mi({patchProp:Db},wb);let qf;function jb(){return qf||(qf=ib(Gb))}const Hb=((...i)=>{const e=jb().createApp(...i),{mount:t}=e;return e.mount=s=>{const n=zb(s);if(!n)return;const r=e._component;!at(r)&&!r.render&&!r.template&&(r.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const o=t(n,!1,Wb(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),o},e});function Wb(i){if(i instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&i instanceof MathMLElement)return"mathml"}function zb(i){return qt(i)?document.querySelector(i):i}/*!
|
||||
* pinia v4.0.3
|
||||
* (c) 2026 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/let P0;const _h=i=>P0=i,k0=Symbol();function Wf(i){return i&&typeof i=="object"&&Object.prototype.toString.call(i)==="[object Object]"&&typeof i.toJSON!="function"}function $b(){const i=kg(!0),e=i.run(()=>it({}));let t=[],s=[];const n=$n({install(r){_h(n),n._a=r,r.provide(k0,n),r.config.globalProperties.$pinia=n,s.forEach(o=>t.push(o)),s=[]},use(r){return this._a?t.push(r):s.push(r),this},_p:t,_a:null,_e:i,_s:new Map,state:e});return n}const Lu=()=>{};function zf(i,e,t,s=Lu){i.add(e);const n=()=>{i.delete(e)&&s()};return!t&&Fg()&&Px(n),n}function Br(i,...e){i.forEach(t=>{t(...e)})}const Gb=i=>i(),qf=Symbol(),Zh=Symbol();function Du(i,e){i instanceof Map&&e instanceof Map?e.forEach((t,s)=>i.set(s,t)):i instanceof Set&&e instanceof Set&&e.forEach(i.add,i);for(const t in e){if(!Object.hasOwn(e,t))continue;const s=e[t],n=i[t];Wf(n)&&Wf(s)&&Object.hasOwn(i,t)&&!Kt(s)&&!gn(s)?i[t]=Du(n,s):i[t]=s}return i}const jb=Symbol();function Hb(i){return!i||typeof i!="object"||!Object.hasOwn(i,jb)}const{assign:Pn}=Object;function Wb(i){return!!(Kt(i)&&i.effect)}function zb(i,e,t,s){const{state:n,actions:r,getters:o}=e,a=t.state.value[i];let h;function l(){a||(t.state.value[i]=n?n():{});const c=e1(t.state.value[i]);return Pn(c,r,Object.keys(o||{}).reduce((u,f)=>(u[f]=$n(ut(()=>{_h(t);const d=t._s.get(i);return o[f].call(d,d)})),u),{}))}return h=F0(i,l,e,t,s,!0),h}function F0(i,e,t={},s,n,r){let o;const a=Pn({actions:{}},t),h={deep:!0};let l,c,u=new Set,f=new Set,d;const m=s.state.value[i];!r&&!m&&(s.state.value[i]={});let g;function x(E){let C;l=c=!1,typeof E=="function"?(E(s.state.value[i]),C={type:"patch function",storeId:i,events:d}):(Du(s.state.value[i],E),C={type:"patch object",payload:E,storeId:i,events:d});const R=g=Symbol();Nd().then(()=>{g===R&&(l=!0)}),c=!0,Br(u,C,s.state.value[i])}const _=r?function(){const{state:C}=t,R=C?C():{};this.$patch(B=>{Pn(B,R)})}:Lu;function T(){o.stop(),u.clear(),f.clear(),s._s.delete(i)}const v=(E,C="")=>{if(qf in E)return E[Zh]=C,E;const R=function(){_h(s);const B=Array.from(arguments),k=new Set,F=new Set;function D(O){k.add(O)}function N(O){F.add(O)}Br(f,{args:B,name:R[Zh],store:y,after:D,onError:N});let j;try{j=E.apply(this&&this.$id===i?this:y,B)}catch(O){throw Br(F,O),O}return j instanceof Promise?j.then(O=>(Br(k,O),O)).catch(O=>(Br(F,O),Promise.reject(O))):(Br(k,j),j)};return R[qf]=!0,R[Zh]=C,R},S={_p:s,$id:i,$onAction:zf.bind(null,f),$patch:x,$reset:_,$subscribe(E,C={}){if(u.has(E))return Lu;const R=zf(u,E,C.detached,()=>B()),B=o.run(()=>Ys(()=>s.state.value[i],k=>{(C.flush==="sync"?c:l)&&E({storeId:i,type:"direct",events:d},k)},Pn({},h,C)));return R},$dispose:T},y=wo(S);s._s.set(i,y);const I=(s._a&&s._a.runWithContext||Gb)(()=>s._e.run(()=>(o=kg()).run(()=>e({action:v}))));for(const E in I){const C=I[E];Kt(C)&&!Wb(C)||gn(C)?r||(m&&Hb(C)&&(Kt(C)?C.value=m[E]:((C instanceof Set||C instanceof Map)&&C.clear(),Du(C,m[E]))),s.state.value[i][E]=C):typeof C=="function"&&(I[E]=v(C,E),a.actions[E]=C)}return Pn(y,I),Pn(Tt(y),I),Object.defineProperty(y,"$state",{get:()=>s.state.value[i],set:E=>{x(C=>{Pn(C,E)})}}),s._p.forEach(E=>{const C=o.run(()=>E({store:y,app:s._a,pinia:s,options:a}));Pn(y,C)}),m&&r&&t.hydrate&&t.hydrate(y.$state,m),l=!0,c=!0,y}/*! #__NO_SIDE_EFFECTS__ */function qb(i,e,t){let s;const n=typeof e=="function";s=n?t:e;function r(o,a){const h=u1();return o=o||(h?Jo(k0,null):null),o&&_h(o),o=P0,o._s.has(i)||(n?F0(i,e,s,o):zb(i,s,o)),o._s.get(i)}return r.$id=i,r}var Cr=(i=>(i[i.WEBGL_LEGACY=0]="WEBGL_LEGACY",i[i.WEBGL=1]="WEBGL",i[i.WEBGL2=2]="WEBGL2",i))(Cr||{}),O0=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.WEBGL=1]="WEBGL",i[i.CANVAS=2]="CANVAS",i))(O0||{}),Nu=(i=>(i[i.COLOR=16384]="COLOR",i[i.DEPTH=256]="DEPTH",i[i.STENCIL=1024]="STENCIL",i))(Nu||{}),Qe=(i=>(i[i.NORMAL=0]="NORMAL",i[i.ADD=1]="ADD",i[i.MULTIPLY=2]="MULTIPLY",i[i.SCREEN=3]="SCREEN",i[i.OVERLAY=4]="OVERLAY",i[i.DARKEN=5]="DARKEN",i[i.LIGHTEN=6]="LIGHTEN",i[i.COLOR_DODGE=7]="COLOR_DODGE",i[i.COLOR_BURN=8]="COLOR_BURN",i[i.HARD_LIGHT=9]="HARD_LIGHT",i[i.SOFT_LIGHT=10]="SOFT_LIGHT",i[i.DIFFERENCE=11]="DIFFERENCE",i[i.EXCLUSION=12]="EXCLUSION",i[i.HUE=13]="HUE",i[i.SATURATION=14]="SATURATION",i[i.COLOR=15]="COLOR",i[i.LUMINOSITY=16]="LUMINOSITY",i[i.NORMAL_NPM=17]="NORMAL_NPM",i[i.ADD_NPM=18]="ADD_NPM",i[i.SCREEN_NPM=19]="SCREEN_NPM",i[i.NONE=20]="NONE",i[i.SRC_OVER=0]="SRC_OVER",i[i.SRC_IN=21]="SRC_IN",i[i.SRC_OUT=22]="SRC_OUT",i[i.SRC_ATOP=23]="SRC_ATOP",i[i.DST_OVER=24]="DST_OVER",i[i.DST_IN=25]="DST_IN",i[i.DST_OUT=26]="DST_OUT",i[i.DST_ATOP=27]="DST_ATOP",i[i.ERASE=26]="ERASE",i[i.SUBTRACT=28]="SUBTRACT",i[i.XOR=29]="XOR",i))(Qe||{}),Ns=(i=>(i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i))(Ns||{}),Re=(i=>(i[i.RGBA=6408]="RGBA",i[i.RGB=6407]="RGB",i[i.RG=33319]="RG",i[i.RED=6403]="RED",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTELine truncated
|
||||
`)>=0)return!1;return!0}function Zi(re,le){var ft;if(re.indent===" ")ft=" ";else if(typeof re.indent=="number"&&re.indent>0)ft=C.call(Array(re.indent+1)," ");else return null;return{base:ft,prev:C.call(Array(le+1),ft)}}function ys(re,le){if(re.length===0)return"";var ft=`
|
||||
*/let O0;const Mh=i=>O0=i,B0=Symbol();function Kf(i){return i&&typeof i=="object"&&Object.prototype.toString.call(i)==="[object Object]"&&typeof i.toJSON!="function"}function qb(){const i=Bg(!0),e=i.run(()=>it({}));let t=[],s=[];const n=$n({install(r){Mh(n),n._a=r,r.provide(B0,n),r.config.globalProperties.$pinia=n,s.forEach(o=>t.push(o)),s=[]},use(r){return this._a?t.push(r):s.push(r),this},_p:t,_a:null,_e:i,_s:new Map,state:e});return n}const Uu=()=>{};function Zf(i,e,t,s=Uu){i.add(e);const n=()=>{i.delete(e)&&s()};return!t&&Lg()&&Dx(n),n}function Br(i,...e){i.forEach(t=>{t(...e)})}const Kb=i=>i(),Jf=Symbol(),Qh=Symbol();function Vu(i,e){i instanceof Map&&e instanceof Map?e.forEach((t,s)=>i.set(s,t)):i instanceof Set&&e instanceof Set&&e.forEach(i.add,i);for(const t in e){if(!Object.hasOwn(e,t))continue;const s=e[t],n=i[t];Kf(n)&&Kf(s)&&Object.hasOwn(i,t)&&!Kt(s)&&!gn(s)?i[t]=Vu(n,s):i[t]=s}return i}const Zb=Symbol();function Jb(i){return!i||typeof i!="object"||!Object.hasOwn(i,Zb)}const{assign:Pn}=Object;function Qb(i){return!!(Kt(i)&&i.effect)}function ew(i,e,t,s){const{state:n,actions:r,getters:o}=e,a=t.state.value[i];let h;function l(){a||(t.state.value[i]=n?n():{});const c=o1(t.state.value[i]);return Pn(c,r,Object.keys(o||{}).reduce((u,f)=>(u[f]=$n(ut(()=>{Mh(t);const d=t._s.get(i);return o[f].call(d,d)})),u),{}))}return h=L0(i,l,e,t,s,!0),h}function L0(i,e,t={},s,n,r){let o;const a=Pn({actions:{}},t),h={deep:!0};let l,c,u=new Set,f=new Set,d;const m=s.state.value[i];!r&&!m&&(s.state.value[i]={});let g;function b(E){let C;l=c=!1,typeof E=="function"?(E(s.state.value[i]),C={type:"patch function",storeId:i,events:d}):(Vu(s.state.value[i],E),C={type:"patch object",payload:E,storeId:i,events:d});const R=g=Symbol();Xd().then(()=>{g===R&&(l=!0)}),c=!0,Br(u,C,s.state.value[i])}const _=r?function(){const{state:C}=t,R=C?C():{};this.$patch(B=>{Pn(B,R)})}:Uu;function M(){o.stop(),u.clear(),f.clear(),s._s.delete(i)}const v=(E,C="")=>{if(Jf in E)return E[Qh]=C,E;const R=function(){Mh(s);const B=Array.from(arguments),k=new Set,F=new Set;function D(O){k.add(O)}function N(O){F.add(O)}Br(f,{args:B,name:R[Qh],store:y,after:D,onError:N});let j;try{j=E.apply(this&&this.$id===i?this:y,B)}catch(O){throw Br(F,O),O}return j instanceof Promise?j.then(O=>(Br(k,O),O)).catch(O=>(Br(F,O),Promise.reject(O))):(Br(k,j),j)};return R[Jf]=!0,R[Qh]=C,R},S={_p:s,$id:i,$onAction:Zf.bind(null,f),$patch:b,$reset:_,$subscribe(E,C={}){if(u.has(E))return Uu;const R=Zf(u,E,C.detached,()=>B()),B=o.run(()=>cs(()=>s.state.value[i],k=>{(C.flush==="sync"?c:l)&&E({storeId:i,type:"direct",events:d},k)},Pn({},h,C)));return R},$dispose:M},y=wo(S);s._s.set(i,y);const I=(s._a&&s._a.runWithContext||Kb)(()=>s._e.run(()=>(o=Bg()).run(()=>e({action:v}))));for(const E in I){const C=I[E];Kt(C)&&!Qb(C)||gn(C)?r||(m&&Jb(C)&&(Kt(C)?C.value=m[E]:((C instanceof Set||C instanceof Map)&&C.clear(),Vu(C,m[E]))),s.state.value[i][E]=C):typeof C=="function"&&(I[E]=v(C,E),a.actions[E]=C)}return Pn(y,I),Pn(Tt(y),I),Object.defineProperty(y,"$state",{get:()=>s.state.value[i],set:E=>{b(C=>{Pn(C,E)})}}),s._p.forEach(E=>{const C=o.run(()=>E({store:y,app:s._a,pinia:s,options:a}));Pn(y,C)}),m&&r&&t.hydrate&&t.hydrate(y.$state,m),l=!0,c=!0,y}/*! #__NO_SIDE_EFFECTS__ */function tw(i,e,t){let s;const n=typeof e=="function";s=n?t:e;function r(o,a){const h=v1();return o=o||(h?Qo(B0,null):null),o&&Mh(o),o=O0,o._s.has(i)||(n?L0(i,e,s,o):ew(i,s,o)),o._s.get(i)}return r.$id=i,r}var Cr=(i=>(i[i.WEBGL_LEGACY=0]="WEBGL_LEGACY",i[i.WEBGL=1]="WEBGL",i[i.WEBGL2=2]="WEBGL2",i))(Cr||{}),D0=(i=>(i[i.UNKNOWN=0]="UNKNOWN",i[i.WEBGL=1]="WEBGL",i[i.CANVAS=2]="CANVAS",i))(D0||{}),Xu=(i=>(i[i.COLOR=16384]="COLOR",i[i.DEPTH=256]="DEPTH",i[i.STENCIL=1024]="STENCIL",i))(Xu||{}),Qe=(i=>(i[i.NORMAL=0]="NORMAL",i[i.ADD=1]="ADD",i[i.MULTIPLY=2]="MULTIPLY",i[i.SCREEN=3]="SCREEN",i[i.OVERLAY=4]="OVERLAY",i[i.DARKEN=5]="DARKEN",i[i.LIGHTEN=6]="LIGHTEN",i[i.COLOR_DODGE=7]="COLOR_DODGE",i[i.COLOR_BURN=8]="COLOR_BURN",i[i.HARD_LIGHT=9]="HARD_LIGHT",i[i.SOFT_LIGHT=10]="SOFT_LIGHT",i[i.DIFFERENCE=11]="DIFFERENCE",i[i.EXCLUSION=12]="EXCLUSION",i[i.HUE=13]="HUE",i[i.SATURATION=14]="SATURATION",i[i.COLOR=15]="COLOR",i[i.LUMINOSITY=16]="LUMINOSITY",i[i.NORMAL_NPM=17]="NORMAL_NPM",i[i.ADD_NPM=18]="ADD_NPM",i[i.SCREEN_NPM=19]="SCREEN_NPM",i[i.NONE=20]="NONE",i[i.SRC_OVER=0]="SRC_OVER",i[i.SRC_IN=21]="SRC_IN",i[i.SRC_OUT=22]="SRC_OUT",i[i.SRC_ATOP=23]="SRC_ATOP",i[i.DST_OVER=24]="DST_OVER",i[i.DST_IN=25]="DST_IN",i[i.DST_OUT=26]="DST_OUT",i[i.DST_ATOP=27]="DST_ATOP",i[i.ERASE=26]="ERASE",i[i.SUBTRACT=28]="SUBTRACT",i[i.XOR=29]="XOR",i))(Qe||{}),Us=(i=>(i[i.POINTS=0]="POINTS",i[i.LINES=1]="LINES",i[i.LINE_LOOP=2]="LINE_LOOP",i[i.LINE_STRIP=3]="LINE_STRIP",i[i.TRIANGLES=4]="TRIANGLES",i[i.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",i[i.TRIANGLE_FAN=6]="TRIANGLE_FAN",i))(Us||{}),Re=(i=>(i[i.RGBA=6408]="RGBA",i[i.RGB=6407]="RGB",i[i.RG=33319]="RG",i[i.RED=6403]="RED",i[i.RGBA_INTEGER=36249]="RGBA_INTEGER",i[i.RGB_INTEGER=36248]="RGB_INTELine truncated
|
||||
`)>=0)return!1;return!0}function Zi(re,le){var ft;if(re.indent===" ")ft=" ";else if(typeof re.indent=="number"&&re.indent>0)ft=C.call(Array(re.indent+1)," ");else return null;return{base:ft,prev:C.call(Array(le+1),ft)}}function xs(re,le){if(re.length===0)return"";var ft=`
|
||||
`+le.prev+le.base;return ft+C.call(re,","+ft)+`
|
||||
`+le.prev}function $t(re,le){var ft=ae(re),It=[];if(ft){It.length=re.length;for(var Pt=0;Pt<re.length;Pt++)It[Pt]=ue(re,Pt)?le(re[Pt],re):""}var nt=typeof F=="function"?F(re):[],$i;if(N){$i={};for(var Ji=0;Ji<nt.length;Ji++)$i["$"+nt[Ji]]=nt[Ji]}for(var li in re)ue(re,li)&&(ft&&String(Number(li))===li&&li<re.length||N&&$i["$"+li]instanceof Symbol||(I.call(/[^\w$]/,li)?It.push(le(li,re)+": "+le(re[li],re)):It.push(li+": "+le(re[li],re))));if(typeof F=="function")for(var Gi=0;Gi<nt.length;Gi++)O.call(re,nt[Gi])&&It.push("["+le(nt[Gi])+"]: "+le(re[nt[Gi]],re));return It}return ic}var sc,fp;function cw(){if(fp)return sc;fp=1;var i=Sh(),e=So(),t=function(a,h,l){for(var c=a,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=a.next,a.next=u),u},s=function(a,h){if(a){var l=t(a,h);return l&&l.value}},n=function(a,h,l){var c=t(a,h);c?c.value=l:a.next={key:h,next:a.next,value:l}},r=function(a,h){return a?!!t(a,h):!1},o=function(a,h){if(a)return t(a,h,!0)};return sc=function(){var h,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+i(c))},delete:function(c){var u=o(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return s(h,c)},has:function(c){return r(h,c)},set:function(c,u){h||(h={next:void 0}),n(h,c,u)}};return l},sc}var nc,pp;function L0(){return pp||(pp=1,nc=Object),nc}var rc,mp;function uw(){return mp||(mp=1,rc=Error),rc}var oc,gp;function dw(){return gp||(gp=1,oc=EvalError),oc}var ac,vp;function fw(){return vp||(vp=1,ac=RangeError),ac}var lc,yp;function pw(){return yp||(yp=1,lc=ReferenceError),lc}var hc,xp;function mw(){return xp||(xp=1,hc=SyntaxError),hc}var cc,bp;function gw(){return bp||(bp=1,cc=URIError),cc}var uc,wp;function vw(){return wp||(wp=1,uc=Math.abs),uc}var dc,_p;function yw(){return _p||(_p=1,dc=Math.floor),dc}var fc,Sp;function xw(){return Sp||(Sp=1,fc=Math.max),fc}var pc,Tp;function bw(){return Tp||(Tp=1,pc=Math.min),pc}var mc,Mp;function ww(){return Mp||(Mp=1,mc=Math.pow),mc}var gc,Ep;function _w(){return Ep||(Ep=1,gc=Math.round),gc}var vc,Ap;function Sw(){return Ap||(Ap=1,vc=Number.isNaN||function(e){return e!==e}),vc}var yc,Cp;function Tw(){if(Cp)return yc;Cp=1;var i=Sw();return yc=function(t){return i(t)||t===0?t:t<0?-1:1},yc}var xc,Ip;function Mw(){return Ip||(Ip=1,xc=Object.getOwnPropertyDescriptor),xc}var bc,Rp;function D0(){if(Rp)return bc;Rp=1;var i=Mw();if(i)try{i([],"length")}catch{i=null}return bc=i,bc}var wc,Pp;function N0(){if(Pp)return wc;Pp=1;var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return wc=i,wc}var _c,kp;function Ew(){return kp||(kp=1,_c=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==n||a.enumerable!==!0)return!1}return!0}),_c}var Sc,Fp;function Aw(){if(Fp)return Sc;Fp=1;var i=typeof Symbol<"u"&&Symbol,e=Ew();return Sc=function(){return typeof i!="function"||typeof Symbol!="function"||typeof i("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Sc}var Tc,Op;function U0(){return Op||(Op=1,Tc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Tc}var Mc,Bp;function V0(){if(Bp)return Mc;Bp=1;var i=L0();return Mc=i.getPrototypeOf||null,Mc}var Ec,Lp;function Cw(){if(Lp)return Ec;Lp=1;var i="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,s="[object Function]",n=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var f=0;f<l.length;f+=1)c[f+h.length]=l[f];return c},r=function(h,l){for(var c=[],u=l,f=0;u<h.length;u+=1,f+=1)c[f]=h[u];return c},o=function(a,h){for(var l="",c=0;c<a.length;c+=1)l+=a[c],c+1<a.length&&(l+=h);return l};return Ec=function(h){var l=this;if(typeof l!="function"||e.apply(l)!==s)throw new TypeError(i+l);for(var c=r(arguments,1),u,f=function(){if(this instanceof u){var _=l.apply(this,n(c,arguments));return Object(_)===_?_:this}return l.apply(h,n(c,arguments))},d=t(0,l.length-c.length),m=[],g=0;g<d;g++)m[g]="$"+g;if(u=Function("binder","return function ("+o(m,",")+"){ return binder.apply(this,arguments); }")(f),l.prototype){var x=function(){};x.prototype=l.prototype,u.prototype=new x,x.prototype=null}return u},Ec}var Ac,Dp;function Th(){if(Dp)return Ac;Dp=1;var i=Cw();return Ac=Function.prototype.bind||i,Ac}var Cc,Np;function zd(){return Np||(Np=1,Cc=Function.prototype.call),Cc}var Ic,Up;function X0(){return Up||(Up=1,Ic=Function.p
Line truncated
|
||||
`," "],o=["{","}","|","\\","^","`"].concat(r),a=["'"].concat(o),h=["%","/","?",";","#"].concat(a),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=Dw();function _(y,I,E){if(y&&typeof y=="object"&&y instanceof e)return y;var C=new e;return C.parse(y,I,E),C}e.prototype.parse=function(y,I,E){if(typeof y!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof y);var C=y.indexOf("?"),R=C!==-1&&C<y.indexOf("#")?"?":"#",B=y.split(R),k=/\\/g;B[0]=B[0].replace(k,"/"),y=B.join(R);var F=y;if(F=F.trim(),!E&&y.split("#").length===1){var D=n.exec(F);if(D)return this.path=F,this.href=F,this.pathname=D[1],D[2]?(this.search=D[2],I?this.query=x.parse(this.search.substr(1)):this.query=this.search.substr(1)):I&&(this.search="",this.query={}),this}var N=t.exec(F);if(N){N=N[0];var j=N.toLowerCase();this.protocol=j,F=F.substr(N.length)}if(E||N||F.match(/^\/\/[^@/]+@[^@/]+/)){var O=F.substr(0,2)==="//";O&&!(N&&m[N])&&(F=F.substr(2),this.slashes=!0)}if(!m[N]&&(O||N&&!g[N])){for(var L=-1,P=0;P<l.length;P++){var X=F.indexOf(l[P]);X!==-1&&(L===-1||X<L)&&(L=X)}var U,Y;L===-1?Y=F.lastIndexOf("@"):Y=F.lastIndexOf("@",L),Y!==-1&&(U=F.slice(0,Y),F=F.slice(Y+1),this.auth=decodeURIComponent(U)),L=-1;for(var P=0;P<h.length;P++){var X=F.indexOf(h[P]);X!==-1&&(L===-1||X<L)&&(L=X)}L===-1&&(L=F.length),this.host=F.slice(0,L),F=F.slice(L),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var z=this.hostname.split(/\./),P=0,ne=z.length;P<ne;P++){var H=z[P];if(H&&!H.match(u)){for(var Z="",ae=0,me=H.length;ae<me;ae++)H.charCodeAt(ae)>127?Z+="x":Z+=H[ae];if(!Z.match(u)){var _e=z.slice(0,P),te=z.slice(P+1),ve=H.match(f);ve&&(_e.push(ve[1]),te.unshift(ve[2])),te.length&&(F="/"+te.join(".")+F),this.hostname=_e.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=i.toASCII(this.hostname));var $=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+$,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!d[j])for(var P=0,ne=a.length;P<ne;P++){var J=a[P];if(F.indexOf(J)!==-1){var Q=encodeURIComponent(J);Q===J&&(Q=escape(J)),F=F.split(J).join(Q)}}var ie=F.indexOf("#");ie!==-1&&(this.hash=F.substr(ie),F=F.slice(0,ie));var ue=F.indexOf("?");if(ue!==-1?(this.search=F.substr(ue),this.query=F.substr(ue+1),I&&(this.query=x.parse(this.query)),F=F.slice(0,ue)):I&&(this.search="",this.query={}),F&&(this.pathname=F),g[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var $=this.pathname||"",Se=this.search||"";this.path=$+Se}return this.href=this.format(),this};function T(y){return typeof y=="string"&&(y=_(y)),y instanceof e?y.format():e.prototype.format.call(y)}e.prototype.format=function(){var y=this.auth||"";y&&(y=encodeURIComponent(y),y=y.replace(/%3A/i,":"),y+="@");var I=this.protocol||"",E=this.pathname||"",C=this.hash||"",R=!1,B="";this.host?R=y+this.host:this.hostname&&(R=y+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(R+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(B=x.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var k=this.search||B&&"?"+B||"";return I&&I.substr(-1)!==":"&&(I+=":"),this.slashes||(!I||g[I])&&R!==!1?(R="//"+(R||""),E&&E.charAt(0)!=="/"&&(E="/"+E)):R||(R=""),C&&C.charAt(0)!=="#"&&(C="#"+C),k&&k.charAt(0)!=="?"&&(k="?"+k),E=E.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),k=k.replace("#","%23"),I+R+E+k+C};function v(y,I){return _(y,!1,!0).resolve(I)}e.prototype.resolve=function(y){return this.resolveObject(_(y,!1,!0)).format()};function S(y,I){return y?_(y,!1,!0).resolveObject(I):I}return e.prototype.resolveObject=function(y){if(typeof y=="string"){var I=new e;I.parse(y,!1,!0),y=I}for(var E=new e,C=Object.keys(this),R=0;R<C.length;R++){var B=C[R];E[B]=this[B]}if(E.hash=y.hash,y.href==="")return E.href=E.format(),E;if(y.slashes&&!y.protocol){for(var k=Object.keys(y),F=0;F<k.length;F++){var D=k[F];D!=="protocol"&&(E[D]=y[D])}return g[E.protocol]&&E.hostname&&!E.pathname&&(E.pathname="/",E.path=E.pathname),E.href=E.format(),E}if(y.protocol&&y.protocol!==E.protocol){if(!g[y.protocol]){for(var N=Object.keys(y),j=0;j<N.length;j++){var O=N[j];E[O]=y[O]}return E.href=E.format(),E}if(E.protocol=y.protocol,!y.host&&!m[y.protocol]){for(var ne=(y.pathname||"").split("/");ne.length&&!(y.host=ne.shift()););y.host||(y.host=""),y.hostname||(y.hostname=""),ne[0]!==""&&ne.unshift(""),ne.length<2&&ne.unshift(""),E.pathname=ne.join("/")}else E.pathname=y.pathname;if(E.search=y.search,E.query=y.query,E.host=y.host||"",E.auth=y.auth,E.hostname=y.hostname||y.host,E.port=y.port,E.pathname||E.se
Line truncated
|
||||
`+le.prev}function $t(re,le){var ft=ae(re),It=[];if(ft){It.length=re.length;for(var Pt=0;Pt<re.length;Pt++)It[Pt]=ue(re,Pt)?le(re[Pt],re):""}var nt=typeof F=="function"?F(re):[],$i;if(N){$i={};for(var Ji=0;Ji<nt.length;Ji++)$i["$"+nt[Ji]]=nt[Ji]}for(var li in re)ue(re,li)&&(ft&&String(Number(li))===li&&li<re.length||N&&$i["$"+li]instanceof Symbol||(I.call(/[^\w$]/,li)?It.push(le(li,re)+": "+le(re[li],re)):It.push(li+": "+le(re[li],re))));if(typeof F=="function")for(var Gi=0;Gi<nt.length;Gi++)O.call(re,nt[Gi])&&It.push("["+le(nt[Gi])+"]: "+le(re[nt[Gi]],re));return It}return nc}var rc,gp;function gw(){if(gp)return rc;gp=1;var i=Eh(),e=So(),t=function(a,h,l){for(var c=a,u;(u=c.next)!=null;c=u)if(u.key===h)return c.next=u.next,l||(u.next=a.next,a.next=u),u},s=function(a,h){if(a){var l=t(a,h);return l&&l.value}},n=function(a,h,l){var c=t(a,h);c?c.value=l:a.next={key:h,next:a.next,value:l}},r=function(a,h){return a?!!t(a,h):!1},o=function(a,h){if(a)return t(a,h,!0)};return rc=function(){var h,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+i(c))},delete:function(c){var u=o(h,c);return u&&h&&!h.next&&(h=void 0),!!u},get:function(c){return s(h,c)},has:function(c){return r(h,c)},set:function(c,u){h||(h={next:void 0}),n(h,c,u)}};return l},rc}var oc,vp;function U0(){return vp||(vp=1,oc=Object),oc}var ac,yp;function vw(){return yp||(yp=1,ac=Error),ac}var lc,xp;function yw(){return xp||(xp=1,lc=EvalError),lc}var hc,bp;function xw(){return bp||(bp=1,hc=RangeError),hc}var cc,wp;function bw(){return wp||(wp=1,cc=ReferenceError),cc}var uc,_p;function ww(){return _p||(_p=1,uc=SyntaxError),uc}var dc,Sp;function _w(){return Sp||(Sp=1,dc=URIError),dc}var fc,Tp;function Sw(){return Tp||(Tp=1,fc=Math.abs),fc}var pc,Mp;function Tw(){return Mp||(Mp=1,pc=Math.floor),pc}var mc,Ep;function Mw(){return Ep||(Ep=1,mc=Math.max),mc}var gc,Ap;function Ew(){return Ap||(Ap=1,gc=Math.min),gc}var vc,Cp;function Aw(){return Cp||(Cp=1,vc=Math.pow),vc}var yc,Ip;function Cw(){return Ip||(Ip=1,yc=Math.round),yc}var xc,Rp;function Iw(){return Rp||(Rp=1,xc=Number.isNaN||function(e){return e!==e}),xc}var bc,Pp;function Rw(){if(Pp)return bc;Pp=1;var i=Iw();return bc=function(t){return i(t)||t===0?t:t<0?-1:1},bc}var wc,kp;function Pw(){return kp||(kp=1,wc=Object.getOwnPropertyDescriptor),wc}var _c,Fp;function V0(){if(Fp)return _c;Fp=1;var i=Pw();if(i)try{i([],"length")}catch{i=null}return _c=i,_c}var Sc,Op;function X0(){if(Op)return Sc;Op=1;var i=Object.defineProperty||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return Sc=i,Sc}var Tc,Bp;function kw(){return Bp||(Bp=1,Tc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),s=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(var r in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,t);if(a.value!==n||a.enumerable!==!0)return!1}return!0}),Tc}var Mc,Lp;function Fw(){if(Lp)return Mc;Lp=1;var i=typeof Symbol<"u"&&Symbol,e=kw();return Mc=function(){return typeof i!="function"||typeof Symbol!="function"||typeof i("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Mc}var Ec,Dp;function Y0(){return Dp||(Dp=1,Ec=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ec}var Ac,Np;function $0(){if(Np)return Ac;Np=1;var i=U0();return Ac=i.getPrototypeOf||null,Ac}var Cc,Up;function Ow(){if(Up)return Cc;Up=1;var i="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,s="[object Function]",n=function(h,l){for(var c=[],u=0;u<h.length;u+=1)c[u]=h[u];for(var f=0;f<l.length;f+=1)c[f+h.length]=l[f];return c},r=function(h,l){for(var c=[],u=l,f=0;u<h.length;u+=1,f+=1)c[f]=h[u];return c},o=function(a,h){for(var l="",c=0;c<a.length;c+=1)l+=a[c],c+1<a.length&&(l+=h);return l};return Cc=function(h){var l=this;if(typeof l!="function"||e.apply(l)!==s)throw new TypeError(i+l);for(var c=r(arguments,1),u,f=function(){if(this instanceof u){var _=l.apply(this,n(c,arguments));return Object(_)===_?_:this}return l.apply(h,n(c,arguments))},d=t(0,l.length-c.length),m=[],g=0;g<d;g++)m[g]="$"+g;if(u=Function("binder","return function ("+o(m,",")+"){ return binder.apply(this,arguments); }")(f),l.prototype){var b=function(){};b.prototype=l.prototype,u.prototype=new b,b.prototype=null}return u},Cc}var Ic,Vp;function Ah(){if(Vp)return Ic;Vp=1;var i=Ow();return Ic=Function.prototype.bind||i,Ic}var Rc,Xp;function Zd(){return Xp||(Xp=1,Rc=Function.prototype.call),Rc}var Pc,Yp;function G0(){return Yp||(Yp=1,Pc=Function.p
Line truncated
|
||||
`," "],o=["{","}","|","\\","^","`"].concat(r),a=["'"].concat(o),h=["%","/","?",";","#"].concat(a),l=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=$w();function _(y,I,E){if(y&&typeof y=="object"&&y instanceof e)return y;var C=new e;return C.parse(y,I,E),C}e.prototype.parse=function(y,I,E){if(typeof y!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof y);var C=y.indexOf("?"),R=C!==-1&&C<y.indexOf("#")?"?":"#",B=y.split(R),k=/\\/g;B[0]=B[0].replace(k,"/"),y=B.join(R);var F=y;if(F=F.trim(),!E&&y.split("#").length===1){var D=n.exec(F);if(D)return this.path=F,this.href=F,this.pathname=D[1],D[2]?(this.search=D[2],I?this.query=b.parse(this.search.substr(1)):this.query=this.search.substr(1)):I&&(this.search="",this.query={}),this}var N=t.exec(F);if(N){N=N[0];var j=N.toLowerCase();this.protocol=j,F=F.substr(N.length)}if(E||N||F.match(/^\/\/[^@/]+@[^@/]+/)){var O=F.substr(0,2)==="//";O&&!(N&&m[N])&&(F=F.substr(2),this.slashes=!0)}if(!m[N]&&(O||N&&!g[N])){for(var L=-1,P=0;P<l.length;P++){var X=F.indexOf(l[P]);X!==-1&&(L===-1||X<L)&&(L=X)}var U,Y;L===-1?Y=F.lastIndexOf("@"):Y=F.lastIndexOf("@",L),Y!==-1&&(U=F.slice(0,Y),F=F.slice(Y+1),this.auth=decodeURIComponent(U)),L=-1;for(var P=0;P<h.length;P++){var X=F.indexOf(h[P]);X!==-1&&(L===-1||X<L)&&(L=X)}L===-1&&(L=F.length),this.host=F.slice(0,L),F=F.slice(L),this.parseHost(),this.hostname=this.hostname||"";var q=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!q)for(var z=this.hostname.split(/\./),P=0,ne=z.length;P<ne;P++){var H=z[P];if(H&&!H.match(u)){for(var Z="",ae=0,me=H.length;ae<me;ae++)H.charCodeAt(ae)>127?Z+="x":Z+=H[ae];if(!Z.match(u)){var _e=z.slice(0,P),te=z.slice(P+1),ve=H.match(f);ve&&(_e.push(ve[1]),te.unshift(ve[2])),te.length&&(F="/"+te.join(".")+F),this.hostname=_e.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),q||(this.hostname=i.toASCII(this.hostname));var $=this.port?":"+this.port:"",W=this.hostname||"";this.host=W+$,this.href+=this.host,q&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),F[0]!=="/"&&(F="/"+F))}if(!d[j])for(var P=0,ne=a.length;P<ne;P++){var J=a[P];if(F.indexOf(J)!==-1){var Q=encodeURIComponent(J);Q===J&&(Q=escape(J)),F=F.split(J).join(Q)}}var ie=F.indexOf("#");ie!==-1&&(this.hash=F.substr(ie),F=F.slice(0,ie));var ue=F.indexOf("?");if(ue!==-1?(this.search=F.substr(ue),this.query=F.substr(ue+1),I&&(this.query=b.parse(this.query)),F=F.slice(0,ue)):I&&(this.search="",this.query={}),F&&(this.pathname=F),g[j]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var $=this.pathname||"",Se=this.search||"";this.path=$+Se}return this.href=this.format(),this};function M(y){return typeof y=="string"&&(y=_(y)),y instanceof e?y.format():e.prototype.format.call(y)}e.prototype.format=function(){var y=this.auth||"";y&&(y=encodeURIComponent(y),y=y.replace(/%3A/i,":"),y+="@");var I=this.protocol||"",E=this.pathname||"",C=this.hash||"",R=!1,B="";this.host?R=y+this.host:this.hostname&&(R=y+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(R+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(B=b.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var k=this.search||B&&"?"+B||"";return I&&I.substr(-1)!==":"&&(I+=":"),this.slashes||(!I||g[I])&&R!==!1?(R="//"+(R||""),E&&E.charAt(0)!=="/"&&(E="/"+E)):R||(R=""),C&&C.charAt(0)!=="#"&&(C="#"+C),k&&k.charAt(0)!=="?"&&(k="?"+k),E=E.replace(/[?#]/g,function(F){return encodeURIComponent(F)}),k=k.replace("#","%23"),I+R+E+k+C};function v(y,I){return _(y,!1,!0).resolve(I)}e.prototype.resolve=function(y){return this.resolveObject(_(y,!1,!0)).format()};function S(y,I){return y?_(y,!1,!0).resolveObject(I):I}return e.prototype.resolveObject=function(y){if(typeof y=="string"){var I=new e;I.parse(y,!1,!0),y=I}for(var E=new e,C=Object.keys(this),R=0;R<C.length;R++){var B=C[R];E[B]=this[B]}if(E.hash=y.hash,y.href==="")return E.href=E.format(),E;if(y.slashes&&!y.protocol){for(var k=Object.keys(y),F=0;F<k.length;F++){var D=k[F];D!=="protocol"&&(E[D]=y[D])}return g[E.protocol]&&E.hostname&&!E.pathname&&(E.pathname="/",E.path=E.pathname),E.href=E.format(),E}if(y.protocol&&y.protocol!==E.protocol){if(!g[y.protocol]){for(var N=Object.keys(y),j=0;j<N.length;j++){var O=N[j];E[O]=y[O]}return E.href=E.format(),E}if(E.protocol=y.protocol,!y.host&&!m[y.protocol]){for(var ne=(y.pathname||"").split("/");ne.length&&!(y.host=ne.shift()););y.host||(y.host=""),y.hostname||(y.hostname=""),ne[0]!==""&&ne.unshift(""),ne.length<2&&ne.unshift(""),E.pathname=ne.join("/")}else E.pathname=y.pathname;if(E.search=y.search,E.query=y.query,E.host=y.host||"",E.auth=y.auth,E.hostname=y.hostname||y.host,E.port=y.port,E.pathname||E.se
Line truncated
|
||||
Deprecated since v${i}`):(s=s.split(`
|
||||
`).splice(t).join(`
|
||||
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
|
||||
Deprecated since v${i}`),console.warn(s),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
|
||||
Deprecated since v${i}`),console.warn(s))),sm[e]=!0}function ts(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function ko(i){return i.split("?")[0].split("#")[0]}function Uw(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Vw(i,e,t){return i.replace(new RegExp(Uw(e),"g"),t)}function Xw(i,e){let t="",s=0,n=-1,r=0,o=-1;for(let a=0;a<=i.length;++a){if(a<i.length)o=i.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(n===a-1||r===1))if(n!==a-1&&r===2){if(t.length<2||s!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",s=0):(t=t.slice(0,h),s=t.length-1-t.lastIndexOf("/")),n=a,r=0;continue}}else if(t.length===2||t.length===1){t="",s=0,n=a,r=0;continue}}}else t.length>0?t+=`/${i.slice(n+1,a)}`:t=i.slice(n+1,a),s=a-n-1;n=a,r=0}else o===46&&r!==-1?++r:r=-1}return t}const zt={toPosix(i){return Vw(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){ts(i),i=this.toPosix(i);const e=/^file:\/\/\//.exec(i);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(i);return t?t[0]:""},toAbsolute(i,e,t){if(ts(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const s=ko(this.toPosix(e??Ve.ADAPTER.getBaseUrl())),n=ko(this.toPosix(t??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?zt.join(n,i.slice(1)):this.isAbsolute(i)?i:this.join(s,i)},normalize(i){if(ts(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let e="";const t=i.startsWith("/");this.hasProtocol(i)&&(e=this.rootname(i),i=i.slice(e.length));const s=i.endsWith("/");return i=Xw(i),i.length>0&&s&&(i+="/"),t?`/${i}`:e+i},isAbsolute(i){return ts(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let e;for(let t=0;t<i.length;++t){const s=i[t];if(ts(s),s.length>0)if(e===void 0)e=s;else{const n=i[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${s}`:e+=`/${s}`}}return e===void 0?".":this.normalize(e)},dirname(i){if(ts(i),i.length===0)return".";i=this.toPosix(i);let e=i.charCodeAt(0);const t=e===47;let s=-1,n=!0;const r=this.getProtocol(i),o=i;i=i.slice(r.length);for(let a=i.length-1;a>=1;--a)if(e=i.charCodeAt(a),e===47){if(!n){s=a;break}}else n=!1;return s===-1?t?"/":this.isUrl(o)?r+i:r:t&&s===1?"//":r+i.slice(0,s)},rootname(i){ts(i),i=this.toPosix(i);let e="";if(i.startsWith("/")?e="/":e=this.getProtocol(i),this.isUrl(i)){const t=i.indexOf("/",e.length);t!==-1?e=i.slice(0,t):e=i,e.endsWith("/")||(e+="/")}return e},basename(i,e){ts(i),e&&ts(e),i=ko(this.toPosix(i));let t=0,s=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e.length===i.length&&e===i)return"";let o=e.length-1,a=-1;for(r=i.length-1;r>=0;--r){const h=i.charCodeAt(r);if(h===47){if(!n){t=r+1;break}}else a===-1&&(n=!1,a=r+1),o>=0&&(h===e.charCodeAt(o)?--o===-1&&(s=r):(o=-1,s=a))}return t===s?s=a:s===-1&&(s=i.length),i.slice(t,s)}for(r=i.length-1;r>=0;--r)if(i.charCodeAt(r)===47){if(!n){t=r+1;break}}else s===-1&&(n=!1,s=r+1);return s===-1?"":i.slice(t,s)},extname(i){ts(i),i=ko(this.toPosix(i));let e=-1,t=0,s=-1,n=!0,r=0;for(let o=i.length-1;o>=0;--o){const a=i.charCodeAt(o);if(a===47){if(!n){t=o+1;break}continue}s===-1&&(n=!1,s=o+1),a===46?e===-1?e=o:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||s===-1||r===0||r===1&&e===s-1&&e===t+1?"":i.slice(e,s)},parse(i){ts(i);const e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;i=ko(this.toPosix(i));let t=i.charCodeAt(0);const s=this.isAbsolute(i);let n;e.root=this.rootname(i),s||this.hasProtocol(i)?n=1:n=0;let r=-1,o=0,a=-1,h=!0,l=i.length-1,c=0;for(;l>=n;--l){if(t=i.charCodeAt(l),t===47){if(!h){o=l+1;break}continue}a===-1&&(h=!1,a=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||a===-1||c===0||c===1&&r===a-1&&r===o+1?a!==-1&&(o===0&&s?e.base=e.name=i.slice(1,a):e.base=e.name=i.slice(o,a)):(o===0&&s?(e.name=i.slice(1,r),e.base=i.slice(1,a)):(e.name=i.slice(o,r),e.base=i.slice(o,a)),e.ext=i.slice(r,a)),e.dir=this.dirname(i),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let Hc;async function Yw(){return Hc??(Hc=(async()=>{var r;const i=document.createElement("canvas").getContext("webgl");if(!i)return ui.UNPACK;const e=await new Promise(o=>{const a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Line truncated
|
||||
`);function h_(i){let e="";for(let t=0;t<i;++t)t>0&&(e+=`
|
||||
else `),t<i-1&&(e+=`if(test == ${t}.0){}`);return e}function c_(i,e){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const s=l_.replace(/%forloop%/gi,h_(i));if(e.shaderSource(t,s),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))i=i/2|0;else break}return i}const Zc=0,Jc=1,Qc=2,eu=3,tu=4,iu=5;class zs{constructor(){this.data=0,this.blendMode=Qe.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Zc)}set blend(e){!!(this.data&1<<Zc)!==e&&(this.data^=1<<Zc)}get offsets(){return!!(this.data&1<<Jc)}set offsets(e){!!(this.data&1<<Jc)!==e&&(this.data^=1<<Jc)}get culling(){return!!(this.data&1<<Qc)}set culling(e){!!(this.data&1<<Qc)!==e&&(this.data^=1<<Qc)}get depthTest(){return!!(this.data&1<<eu)}set depthTest(e){!!(this.data&1<<eu)!==e&&(this.data^=1<<eu)}get depthMask(){return!!(this.data&1<<iu)}set depthMask(e){!!(this.data&1<<iu)!==e&&(this.data^=1<<iu)}get clockwiseFrontFace(){return!!(this.data&1<<tu)}set clockwiseFrontFace(e){!!(this.data&1<<tu)!==e&&(this.data^=1<<tu)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==Qe.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new zs;return e.depthTest=!1,e.blend=!0,e}}zs.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Gu=[];function Q0(i,e){if(!i)return null;let t="";if(typeof i=="string"){const s=/\.(\w{3,4})(?:$|\?|#)/i.exec(i);s&&(t=s[1].toLowerCase())}for(let s=Gu.length-1;s>=0;--s){const n=Gu[s];if(n.test&&n.test(i,t))return new n(i,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class us{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,s,n,r,o,a,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,f=c.length;u<f;u++)c[u][l](e,t,s,n,r,o,a,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(us.prototype,{dispatch:{value:us.prototype.emit},run:{value:us.prototype.emit}});class da{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new us("setRealSize"),this.onUpdate=new us("update"),this.onError=new us("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,s){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class Mh extends da{constructor(e,t){const{width:s,height:n}=t||{};if(!s||!n)throw new Error("BufferResource width or height invalid");super(s,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,s){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===ui.UNPACK);const r=t.realWidth,o=t.realHeight;return s.width===r&&s.height===o?n.texSubImage2D(t.target,0,0,0,r,o,t.format,s.type,this.data):(s.width=r,s.height=o,n.texImage2D(t.target,0,s.internalFormat,r,o,0,t.format,s.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const u_={scaleMode:as.NEAREST,alphaMode:ui.NPM},ju=class Hr extends _a{constructor(e=null,t=null){super(),t=Object.assign({},Hr.defaultOptions,t);const{alphaMode:s,mipmap:n,anisotropicLevel:r,scaleMode:o,width:a,height:h,wrapMode:l,format:c,type:u,target:f,resolution:
Line truncated
|
||||
Deprecated since v${i}`),console.warn(s))),om[e]=!0}function ts(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function ko(i){return i.split("?")[0].split("#")[0]}function jw(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Hw(i,e,t){return i.replace(new RegExp(jw(e),"g"),t)}function Ww(i,e){let t="",s=0,n=-1,r=0,o=-1;for(let a=0;a<=i.length;++a){if(a<i.length)o=i.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(n===a-1||r===1))if(n!==a-1&&r===2){if(t.length<2||s!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){const h=t.lastIndexOf("/");if(h!==t.length-1){h===-1?(t="",s=0):(t=t.slice(0,h),s=t.length-1-t.lastIndexOf("/")),n=a,r=0;continue}}else if(t.length===2||t.length===1){t="",s=0,n=a,r=0;continue}}}else t.length>0?t+=`/${i.slice(n+1,a)}`:t=i.slice(n+1,a),s=a-n-1;n=a,r=0}else o===46&&r!==-1?++r:r=-1}return t}const zt={toPosix(i){return Hw(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){ts(i),i=this.toPosix(i);const e=/^file:\/\/\//.exec(i);if(e)return e[0];const t=/^[^/:]+:\/{0,2}/.exec(i);return t?t[0]:""},toAbsolute(i,e,t){if(ts(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const s=ko(this.toPosix(e??Ve.ADAPTER.getBaseUrl())),n=ko(this.toPosix(t??this.rootname(s)));return i=this.toPosix(i),i.startsWith("/")?zt.join(n,i.slice(1)):this.isAbsolute(i)?i:this.join(s,i)},normalize(i){if(ts(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let e="";const t=i.startsWith("/");this.hasProtocol(i)&&(e=this.rootname(i),i=i.slice(e.length));const s=i.endsWith("/");return i=Ww(i),i.length>0&&s&&(i+="/"),t?`/${i}`:e+i},isAbsolute(i){return ts(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let e;for(let t=0;t<i.length;++t){const s=i[t];if(ts(s),s.length>0)if(e===void 0)e=s;else{const n=i[t-1]??"";this.joinExtensions.includes(this.extname(n).toLowerCase())?e+=`/../${s}`:e+=`/${s}`}}return e===void 0?".":this.normalize(e)},dirname(i){if(ts(i),i.length===0)return".";i=this.toPosix(i);let e=i.charCodeAt(0);const t=e===47;let s=-1,n=!0;const r=this.getProtocol(i),o=i;i=i.slice(r.length);for(let a=i.length-1;a>=1;--a)if(e=i.charCodeAt(a),e===47){if(!n){s=a;break}}else n=!1;return s===-1?t?"/":this.isUrl(o)?r+i:r:t&&s===1?"//":r+i.slice(0,s)},rootname(i){ts(i),i=this.toPosix(i);let e="";if(i.startsWith("/")?e="/":e=this.getProtocol(i),this.isUrl(i)){const t=i.indexOf("/",e.length);t!==-1?e=i.slice(0,t):e=i,e.endsWith("/")||(e+="/")}return e},basename(i,e){ts(i),e&&ts(e),i=ko(this.toPosix(i));let t=0,s=-1,n=!0,r;if(e!==void 0&&e.length>0&&e.length<=i.length){if(e.length===i.length&&e===i)return"";let o=e.length-1,a=-1;for(r=i.length-1;r>=0;--r){const h=i.charCodeAt(r);if(h===47){if(!n){t=r+1;break}}else a===-1&&(n=!1,a=r+1),o>=0&&(h===e.charCodeAt(o)?--o===-1&&(s=r):(o=-1,s=a))}return t===s?s=a:s===-1&&(s=i.length),i.slice(t,s)}for(r=i.length-1;r>=0;--r)if(i.charCodeAt(r)===47){if(!n){t=r+1;break}}else s===-1&&(n=!1,s=r+1);return s===-1?"":i.slice(t,s)},extname(i){ts(i),i=ko(this.toPosix(i));let e=-1,t=0,s=-1,n=!0,r=0;for(let o=i.length-1;o>=0;--o){const a=i.charCodeAt(o);if(a===47){if(!n){t=o+1;break}continue}s===-1&&(n=!1,s=o+1),a===46?e===-1?e=o:r!==1&&(r=1):e!==-1&&(r=-1)}return e===-1||s===-1||r===0||r===1&&e===s-1&&e===t+1?"":i.slice(e,s)},parse(i){ts(i);const e={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return e;i=ko(this.toPosix(i));let t=i.charCodeAt(0);const s=this.isAbsolute(i);let n;e.root=this.rootname(i),s||this.hasProtocol(i)?n=1:n=0;let r=-1,o=0,a=-1,h=!0,l=i.length-1,c=0;for(;l>=n;--l){if(t=i.charCodeAt(l),t===47){if(!h){o=l+1;break}continue}a===-1&&(h=!1,a=l+1),t===46?r===-1?r=l:c!==1&&(c=1):r!==-1&&(c=-1)}return r===-1||a===-1||c===0||c===1&&r===a-1&&r===o+1?a!==-1&&(o===0&&s?e.base=e.name=i.slice(1,a):e.base=e.name=i.slice(o,a)):(o===0&&s?(e.name=i.slice(1,r),e.base=i.slice(1,a)):(e.name=i.slice(o,r),e.base=i.slice(o,a)),e.ext=i.slice(r,a)),e.dir=this.dirname(i),e},sep:"/",delimiter:":",joinExtensions:[".html"]};let zc;async function zw(){return zc??(zc=(async()=>{var r;const i=document.createElement("canvas").getContext("webgl");if(!i)return ui.UNPACK;const e=await new Promise(o=>{const a=document.createElement("video");a.onloadeddata=()=>o(a),a.onerror=()=>o(null),a.autoplay=!1,a.crossOrigin="anonymous",a.preload="auto",a.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Line truncated
|
||||
`);function m_(i){let e="";for(let t=0;t<i;++t)t>0&&(e+=`
|
||||
else `),t<i-1&&(e+=`if(test == ${t}.0){}`);return e}function g_(i,e){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const t=e.createShader(e.FRAGMENT_SHADER);for(;;){const s=p_.replace(/%forloop%/gi,m_(i));if(e.shaderSource(t,s),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))i=i/2|0;else break}return i}const Qc=0,eu=1,tu=2,iu=3,su=4,nu=5;class zs{constructor(){this.data=0,this.blendMode=Qe.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Qc)}set blend(e){!!(this.data&1<<Qc)!==e&&(this.data^=1<<Qc)}get offsets(){return!!(this.data&1<<eu)}set offsets(e){!!(this.data&1<<eu)!==e&&(this.data^=1<<eu)}get culling(){return!!(this.data&1<<tu)}set culling(e){!!(this.data&1<<tu)!==e&&(this.data^=1<<tu)}get depthTest(){return!!(this.data&1<<iu)}set depthTest(e){!!(this.data&1<<iu)!==e&&(this.data^=1<<iu)}get depthMask(){return!!(this.data&1<<nu)}set depthMask(e){!!(this.data&1<<nu)!==e&&(this.data^=1<<nu)}get clockwiseFrontFace(){return!!(this.data&1<<su)}set clockwiseFrontFace(e){!!(this.data&1<<su)!==e&&(this.data^=1<<su)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==Qe.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}static for2d(){const e=new zs;return e.depthTest=!1,e.blend=!0,e}}zs.prototype.toString=function(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`};const Wu=[];function iv(i,e){if(!i)return null;let t="";if(typeof i=="string"){const s=/\.(\w{3,4})(?:$|\?|#)/i.exec(i);s&&(t=s[1].toLowerCase())}for(let s=Wu.length-1;s>=0;--s){const n=Wu[s];if(n.test&&n.test(i,t))return new n(i,e)}throw new Error("Unrecognized source type to auto-detect Resource")}class ds{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,s,n,r,o,a,h){if(arguments.length>8)throw new Error("max arguments reached");const{name:l,items:c}=this;this._aliasCount++;for(let u=0,f=c.length;u<f;u++)c[u][l](e,t,s,n,r,o,a,h);return c===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){const t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(ds.prototype,{dispatch:{value:ds.prototype.emit},run:{value:ds.prototype.emit}});class fa{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new ds("setRealSize"),this.onUpdate=new ds("update"),this.onError=new ds("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,s){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}}class Ch extends fa{constructor(e,t){const{width:s,height:n}=t||{};if(!s||!n)throw new Error("BufferResource width or height invalid");super(s,n),this.data=e,this.unpackAlignment=t.unpackAlignment??4}upload(e,t,s){const n=e.gl;n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===ui.UNPACK);const r=t.realWidth,o=t.realHeight;return s.width===r&&s.height===o?n.texSubImage2D(t.target,0,0,0,r,o,t.format,s.type,this.data):(s.width=r,s.height=o,n.texImage2D(t.target,0,s.internalFormat,r,o,0,t.format,s.type,this.data)),!0}dispose(){this.data=null}static test(e){return e===null||e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}const v_={scaleMode:as.NEAREST,alphaMode:ui.NPM},zu=class Hr extends Sa{constructor(e=null,t=null){super(),t=Object.assign({},Hr.defaultOptions,t);const{alphaMode:s,mipmap:n,anisotropicLevel:r,scaleMode:o,width:a,height:h,wrapMode:l,format:c,type:u,target:f,resolution:
Line truncated
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
|
||||
void main(void){
|
||||
gl_FragColor *= texture2D(uSampler, vTextureCoord);
|
||||
}`,w_=`attribute vec2 aVertexPosition;
|
||||
}`,A_=`attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -47,7 +47,7 @@ void main(void){
|
||||
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||||
vTextureCoord = aTextureCoord;
|
||||
}
|
||||
`;function xm(i,e,t){const s=i.createShader(e);return i.shaderSource(s,t),i.compileShader(s),s}function su(i){const e=new Array(i);for(let t=0;t<e.length;t++)e[t]=!1;return e}function iv(i,e){switch(i){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 su(2*e);case"bvec3":return su(3*e);case"bvec4":return su(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}const lo=[{test:i=>i.type==="float"&&i.size===1&&!i.isArray,code:i=>`
|
||||
`;function _m(i,e,t){const s=i.createShader(e);return i.shaderSource(s,t),i.compileShader(s),s}function ru(i){const e=new Array(i);for(let t=0;t<e.length;t++)e[t]=!1;return e}function rv(i,e){switch(i){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 ru(2*e);case"bvec3":return ru(3*e);case"bvec4":return ru(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}const lo=[{test:i=>i.type==="float"&&i.size===1&&!i.isArray,code:i=>`
|
||||
if(uv["${i}"] !== ud["${i}"].value)
|
||||
{
|
||||
ud["${i}"].value = uv["${i}"]
|
||||
@@ -167,7 +167,7 @@ void main(void){
|
||||
cv[3] = v[3];
|
||||
|
||||
gl.uniform4f(ud["${i}"].location, v[0], v[1], v[2], v[3])
|
||||
}`}],__={float:`
|
||||
}`}],C_={float:`
|
||||
if (cv !== v)
|
||||
{
|
||||
cu.value = v;
|
||||
@@ -303,7 +303,7 @@ void main(void){
|
||||
cu.value = v;
|
||||
|
||||
gl.uniform1i(location, v);
|
||||
}`},S_={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function T_(i,e){var s;const t=[`
|
||||
}`},I_={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function R_(i,e){var s;const t=[`
|
||||
var v = null;
|
||||
var cv = null;
|
||||
var cu = null;
|
||||
@@ -313,18 +313,18 @@ void main(void){
|
||||
renderer.shader.syncUniformBufferGroup(uv.${n}, '${n}');
|
||||
`):t.push(`
|
||||
renderer.shader.syncUniformGroup(uv.${n}, syncData);
|
||||
`));continue}const o=i.uniforms[n];let a=!1;for(let h=0;h<lo.length;h++)if(lo[h].test(r,o)){t.push(lo[h].code(n,o)),a=!0;break}if(!a){const h=(r.size===1&&!r.isArray?__:S_)[r.type].replace("location",`ud["${n}"].location`);t.push(`
|
||||
`));continue}const o=i.uniforms[n];let a=!1;for(let h=0;h<lo.length;h++)if(lo[h].test(r,o)){t.push(lo[h].code(n,o)),a=!0;break}if(!a){const h=(r.size===1&&!r.isArray?C_:I_)[r.type].replace("location",`ud["${n}"].location`);t.push(`
|
||||
cu = ud["${n}"];
|
||||
cv = cu.value;
|
||||
v = uv["${n}"];
|
||||
${h};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
|
||||
`))}const sv={};let Dr=sv;function M_(){if(Dr===sv||Dr!=null&&Dr.isContextLost()){const i=Ve.ADAPTER.createCanvas();let e;Ve.PREFER_ENV>=Cr.WEBGL2&&(e=i.getContext("webgl2",{})),e||(e=i.getContext("webgl",{})||i.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Dr=e}return Dr}let La;function E_(){if(!La){La=zi.MEDIUM;const i=M_();if(i&&i.getShaderPrecisionFormat){const e=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);e&&(La=e.precision?zi.HIGH:zi.MEDIUM)}}return La}function bm(i,e){const t=i.getShaderSource(e).split(`
|
||||
`))}const ov={};let Dr=ov;function P_(){if(Dr===ov||Dr!=null&&Dr.isContextLost()){const i=Ve.ADAPTER.createCanvas();let e;Ve.PREFER_ENV>=Cr.WEBGL2&&(e=i.getContext("webgl2",{})),e||(e=i.getContext("webgl",{})||i.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Dr=e}return Dr}let Na;function k_(){if(!Na){Na=zi.MEDIUM;const i=P_();if(i&&i.getShaderPrecisionFormat){const e=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT);e&&(Na=e.precision?zi.HIGH:zi.MEDIUM)}}return Na}function Sm(i,e){const t=i.getShaderSource(e).split(`
|
||||
`).map((l,c)=>`${c}: ${l}`),s=i.getShaderInfoLog(e),n=s.split(`
|
||||
`),r={},o=n.map(l=>parseFloat(l.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(l=>l&&!r[l]?(r[l]=!0,!0):!1),a=[""];o.forEach(l=>{t[l-1]=`%c${t[l-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const h=t.join(`
|
||||
`);a[0]=h,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function A_(i,e,t,s){i.getProgramParameter(e,i.LINK_STATUS)||(i.getShaderParameter(t,i.COMPILE_STATUS)||bm(i,t),i.getShaderParameter(s,i.COMPILE_STATUS)||bm(i,s),console.error("PixiJS Error: Could not initialize shader."),i.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",i.getProgramInfoLog(e)))}const C_={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function nv(i){return C_[i]}let Da=null;const wm={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"};function rv(i,e){if(!Da){const t=Object.keys(wm);Da={};for(let s=0;s<t.length;++s){const n=t[s];Da[i[n]]=wm[n]}}return Da[e]}function _m(i,e,t){if(i.substring(0,9)!=="precision"){let s=e;return e===zi.HIGH&&t!==zi.HIGH&&(s=zi.MEDIUM),`precision ${s} float;
|
||||
${i}`}else if(t!==zi.HIGH&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}let Fo;function I_(){if(typeof Fo=="boolean")return Fo;try{Fo=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Fo=!1}return Fo}let R_=0;const Na={},qu=class Wr{constructor(e,t,s="pixi-shader",n={}){this.extra={},this.id=R_++,this.vertexSrc=e||Wr.defaultVertexSrc,this.fragmentSrc=t||Wr.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(s=s.replace(/\s+/g,"-"),Na[s]?(Na[s]++,s+=`-${Na[s]}`):Na[s]=1,this.vertexSrc=`#define SHADER_NAME ${s}
|
||||
`);a[0]=h,console.error(s),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function F_(i,e,t,s){i.getProgramParameter(e,i.LINK_STATUS)||(i.getShaderParameter(t,i.COMPILE_STATUS)||Sm(i,t),i.getShaderParameter(s,i.COMPILE_STATUS)||Sm(i,s),console.error("PixiJS Error: Could not initialize shader."),i.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",i.getProgramInfoLog(e)))}const O_={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function av(i){return O_[i]}let Ua=null;const Tm={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"};function lv(i,e){if(!Ua){const t=Object.keys(Tm);Ua={};for(let s=0;s<t.length;++s){const n=t[s];Ua[i[n]]=Tm[n]}}return Ua[e]}function Mm(i,e,t){if(i.substring(0,9)!=="precision"){let s=e;return e===zi.HIGH&&t!==zi.HIGH&&(s=zi.MEDIUM),`precision ${s} float;
|
||||
${i}`}else if(t!==zi.HIGH&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}let Fo;function B_(){if(typeof Fo=="boolean")return Fo;try{Fo=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Fo=!1}return Fo}let L_=0;const Va={},Ju=class Wr{constructor(e,t,s="pixi-shader",n={}){this.extra={},this.id=L_++,this.vertexSrc=e||Wr.defaultVertexSrc,this.fragmentSrc=t||Wr.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(s=s.replace(/\s+/g,"-"),Va[s]?(Va[s]++,s+=`-${Va[s]}`):Va[s]=1,this.vertexSrc=`#define SHADER_NAME ${s}
|
||||
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${s}
|
||||
${this.fragmentSrc}`,this.vertexSrc=_m(this.vertexSrc,Wr.defaultVertexPrecision,zi.HIGH),this.fragmentSrc=_m(this.fragmentSrc,Wr.defaultFragmentPrecision,E_())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return w_}static get defaultFragmentSrc(){return b_}static from(e,t,s){const n=e+t;let r=pm[n];return r||(pm[n]=r=new Wr(e,t,s)),r}};qu.defaultVertexPrecision=zi.HIGH,qu.defaultFragmentPrecision=dn.apple.device?zi.HIGH:zi.MEDIUM;let Us=qu,P_=0;class ds{constructor(e,t,s){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=P_++,this.static=!!t,this.ubo=!!s,e instanceof Nt?(this.buffer=e,this.buffer.type=$s.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Nt(new Float32Array(1)),this.buffer.type=$s.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,s){if(!this.ubo)this.uniforms[e]=new ds(t,s);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,s){return new ds(e,t,s)}static uboFrom(e,t){return new ds(e,t??!0,!0)}}class fs{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof ds?this.uniformGroup=t:this.uniformGroup=new ds(t):this.uniformGroup=new ds({}),this.disposeRunner=new us("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const s in t.uniforms){const n=t.uniforms[s];if(n.group===!0&&this.checkUniformExists(e,n))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,s){const n=Us.from(e,t);return new fs(n,s)}}class ov{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const s=new Int32Array(e);for(let r=0;r<e;r++)s[r]=r;this.defaultGroupCache[e]=ds.from({uSamplers:s},!0);let n=this.fragTemplate;n=n.replace(/%count%/gi,`${e}`),n=n.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new Us(this.vertexSrc,n)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new Ut,default:this.defaultGroupCache[e]};return new fs(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
|
||||
${this.fragmentSrc}`,this.vertexSrc=Mm(this.vertexSrc,Wr.defaultVertexPrecision,zi.HIGH),this.fragmentSrc=Mm(this.fragmentSrc,Wr.defaultFragmentPrecision,k_())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return A_}static get defaultFragmentSrc(){return E_}static from(e,t,s){const n=e+t;let r=vm[n];return r||(vm[n]=r=new Wr(e,t,s)),r}};Ju.defaultVertexPrecision=zi.HIGH,Ju.defaultFragmentPrecision=dn.apple.device?zi.HIGH:zi.MEDIUM;let Vs=Ju,D_=0;class fs{constructor(e,t,s){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=D_++,this.static=!!t,this.ubo=!!s,e instanceof Nt?(this.buffer=e,this.buffer.type=$s.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Nt(new Float32Array(1)),this.buffer.type=$s.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,s){if(!this.ubo)this.uniforms[e]=new fs(t,s);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,s){return new fs(e,t,s)}static uboFrom(e,t){return new fs(e,t??!0,!0)}}class ps{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof fs?this.uniformGroup=t:this.uniformGroup=new fs(t):this.uniformGroup=new fs({}),this.disposeRunner=new ds("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(const s in t.uniforms){const n=t.uniforms[s];if(n.group===!0&&this.checkUniformExists(e,n))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,s){const n=Vs.from(e,t);return new ps(n,s)}}class hv{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){const s=new Int32Array(e);for(let r=0;r<e;r++)s[r]=r;this.defaultGroupCache[e]=fs.from({uSamplers:s},!0);let n=this.fragTemplate;n=n.replace(/%count%/gi,`${e}`),n=n.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new Vs(this.vertexSrc,n)}const t={tint:new Float32Array([1,1,1,1]),translationMatrix:new Vt,default:this.defaultGroupCache[e]};return new ps(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
|
||||
`,t+=`
|
||||
`;for(let s=0;s<e;s++)s>0&&(t+=`
|
||||
else `),s<e-1&&(t+=`if(vTextureId < ${s}.5)`),t+=`
|
||||
@@ -332,7 +332,7 @@ else `),s<e-1&&(t+=`if(vTextureId < ${s}.5)`),t+=`
|
||||
color = texture2D(uSamplers[${s}], vTextureCoord);`,t+=`
|
||||
}`;return t+=`
|
||||
`,t+=`
|
||||
`,t}}class Ku{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function k_(){return!dn.apple.device}function F_(i){let e=!0;const t=Ve.ADAPTER.getNavigator();if(dn.tablet||dn.phone){if(dn.apple.device){const s=t.userAgent.match(/OS (\d+)_(\d+)?/);s&&parseInt(s[1],10)<11&&(e=!1)}if(dn.android.device){const s=t.userAgent.match(/Android\s([0-9.]*)/);s&&parseInt(s[1],10)<7&&(e=!1)}}return e?i:4}class Ih{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var O_=`varying vec2 vTextureCoord;
|
||||
`,t}}class Qu{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}}function N_(){return!dn.apple.device}function U_(i){let e=!0;const t=Ve.ADAPTER.getNavigator();if(dn.tablet||dn.phone){if(dn.apple.device){const s=t.userAgent.match(/OS (\d+)_(\d+)?/);s&&parseInt(s[1],10)<11&&(e=!1)}if(dn.android.device){const s=t.userAgent.match(/Android\s([0-9.]*)/);s&&parseInt(s[1],10)<7&&(e=!1)}}return e?i:4}class kh{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var V_=`varying vec2 vTextureCoord;
|
||||
varying vec4 vColor;
|
||||
varying float vTextureId;
|
||||
uniform sampler2D uSamplers[%count%];
|
||||
@@ -342,7 +342,7 @@ void main(void){
|
||||
%forloop%
|
||||
gl_FragColor = color * vColor;
|
||||
}
|
||||
`,B_=`precision highp float;
|
||||
`,X_=`precision highp float;
|
||||
attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
attribute vec4 aColor;
|
||||
@@ -363,14 +363,14 @@ void main(void){
|
||||
vTextureId = aTextureId;
|
||||
vColor = aColor * tint;
|
||||
}
|
||||
`;const Yo=class ns extends Ih{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ev,this.vertexSize=6,this.state=zs.for2d(),this.size=ns.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??F_(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??k_(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return pt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return B_}static get defaultFragmentTemplate(){return O_}setShaderGenerator({vertex:e=ns.defaultVertexSrc,fragment:t=ns.defaultFragmentTemplate}={}){this.shaderGenerator=new ov(e,t)}contextChange(){const e=this.renderer.gl;Ve.PREFER_ENV===Cr.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),ns.defaultMaxTextures),this.maxTextures=c_(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=ns,s=this.size/4,n=Math.floor(s/this.maxTextures)+1;for(;e.length<s;)e.push(new Hu);for(;t.length<n;)t.push(new Ku);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,s=ns._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++st._globalBatch,h=0,l=s[0],c=0;n.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const f=e[u];e[u]=null,f._batchEnabled!==a&&(l.count>=t&&(n.boundArray(l,r,a,t),this.buildDrawCalls(l,c,u),c=u,l=s[++h],++a),f._batchEnabled=a,f.touched=o,l.elements[l.count++]=f)}l.count>0&&(n.boundArray(l,r,a,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++a);for(let u=0;u<r.length;u++)r[u]=null;st._globalBatch=a}buildDrawCalls(e,t,s){const{_bufferedElements:n,_attributeBuffer:r,_indexBuffer:o,vertexSize:a}=this,h=ns._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,f=h[l];f.start=this._iIndex,f.texArray=e;for(let d=t;d<s;++d){const m=n[d],g=m._texture.baseTexture,x=K0[g.alphaMode?1:0][m.blendMode];n[d]=null,t<d&&f.blend!==x&&(f.size=u-f.start,t=d,f=h[++l],f.texArray=e,f.start=u),this.packInterleavedGeometry(m,r,o,c,u),c+=m.vertexData.length/2*a,u+=m.indices.length,f.blend=x}t<s&&(f.size=u-f.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let s=0;s<e.count;s++)t.bind(e.elements[s],e.ids[s]),e.elements[s]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:s}=this;ns.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(s),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(s),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:s}=this.renderer,n=ns._drawCallPool;let r=null;for(let o=0;o<e;o++){const{texArray:a,type:h,size:l,start:c,blend:u}=n[o];r!==a&&(r=a,this.bindAndClearTexArray(a)),this.state.blendMode=u,s.set(this.state),t.drawElements(h,l,t.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),ns.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f
Line truncated
|
||||
`;const $o=class ns extends kh{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=sv,this.vertexSize=6,this.state=zs.for2d(),this.size=ns.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??U_(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??N_(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return pt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return X_}static get defaultFragmentTemplate(){return V_}setShaderGenerator({vertex:e=ns.defaultVertexSrc,fragment:t=ns.defaultFragmentTemplate}={}){this.shaderGenerator=new hv(e,t)}contextChange(){const e=this.renderer.gl;Ve.PREFER_ENV===Cr.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),ns.defaultMaxTextures),this.maxTextures=g_(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=ns,s=this.size/4,n=Math.floor(s/this.maxTextures)+1;for(;e.length<s;)e.push(new qu);for(;t.length<n;)t.push(new Qu);for(let r=0;r<this.maxTextures;r++)this._tempBoundTextures[r]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,s=ns._textureArrayPool,n=this.renderer.batch,r=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++st._globalBatch,h=0,l=s[0],c=0;n.copyBoundTextures(r,t);for(let u=0;u<this._bufferSize;++u){const f=e[u];e[u]=null,f._batchEnabled!==a&&(l.count>=t&&(n.boundArray(l,r,a,t),this.buildDrawCalls(l,c,u),c=u,l=s[++h],++a),f._batchEnabled=a,f.touched=o,l.elements[l.count++]=f)}l.count>0&&(n.boundArray(l,r,a,t),this.buildDrawCalls(l,c,this._bufferSize),++h,++a);for(let u=0;u<r.length;u++)r[u]=null;st._globalBatch=a}buildDrawCalls(e,t,s){const{_bufferedElements:n,_attributeBuffer:r,_indexBuffer:o,vertexSize:a}=this,h=ns._drawCallPool;let l=this._dcIndex,c=this._aIndex,u=this._iIndex,f=h[l];f.start=this._iIndex,f.texArray=e;for(let d=t;d<s;++d){const m=n[d],g=m._texture.baseTexture,b=Q0[g.alphaMode?1:0][m.blendMode];n[d]=null,t<d&&f.blend!==b&&(f.size=u-f.start,t=d,f=h[++l],f.texArray=e,f.start=u),this.packInterleavedGeometry(m,r,o,c,u),c+=m.vertexData.length/2*a,u+=m.indices.length,f.blend=b}t<s&&(f.size=u-f.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=u}bindAndClearTexArray(e){const t=this.renderer.texture;for(let s=0;s<e.count;s++)t.bind(e.elements[s],e.ids[s]),e.elements[s]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:s}=this;ns.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(s),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(s),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:s}=this.renderer,n=ns._drawCallPool;let r=null;for(let o=0;o<e;o++){const{texArray:a,type:h,size:l,start:c,blend:u}=n[o];r!==a&&(r=a,this.bindAndClearTexArray(a)),this.state.blendMode=u,s.set(this.state),t.drawElements(h,l,t.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),ns.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._f
Line truncated
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
|
||||
void main(void){
|
||||
gl_FragColor = texture2D(uSampler, vTextureCoord);
|
||||
}
|
||||
`,D_=`attribute vec2 aVertexPosition;
|
||||
`,$_=`attribute vec2 aVertexPosition;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
|
||||
@@ -396,7 +396,7 @@ void main(void)
|
||||
gl_Position = filterVertexPosition();
|
||||
vTextureCoord = filterTextureCoord();
|
||||
}
|
||||
`;const Zu=class $o extends fs{constructor(e,t,s){const n=Us.from(e||$o.defaultVertexSrc,t||$o.defaultFragmentSrc);super(n,s),this.padding=0,this.resolution=$o.defaultResolution,this.multisample=$o.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new zs}apply(e,t,s,n,r){e.applyFilter(this,t,s,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return D_}static get defaultFragmentSrc(){return L_}};Zu.defaultResolution=1,Zu.defaultMultisample=ei.NONE;let Mi=Zu;class kl{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new At(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:s,backgroundAlpha:n}=e,r=s??t;r!==void 0&&(this.color=r),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}kl.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},kl.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"background"};He.add(kl);class av{constructor(e){this.renderer=e,this.emptyRenderer=new Ih(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:s}=this.renderer.texture;for(let n=t-1;n>=0;--n)e[n]=s[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,s,n){const{elements:r,ids:o,count:a}=e;let h=0;for(let l=0;l<a;l++){const c=r[l],u=c._batchLocation;if(u>=0&&u<n&&t[u]===c){o[l]=u;continue}for(;h<n;){const f=t[h];if(f&&f._batchEnabled===s&&f._batchLocation===h){h++;continue}o[l]=h,c._batchLocation=h,t[h]=c;break}}}destroy(){this.renderer=null}}av.extension={type:Oe.RendererSystem,name:"batch"};He.add(av);let Sm=0;class Fl{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},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,this.renderer.CONTEXT_UID=Sm++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,s=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:s,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=Sm++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let s;if(Ve.PREFER_ENV>=Cr.WEBGL2&&(s=e.getContext("webgl2",t)),s)this.webGLVersion=2;else if(this.webGLVersion=1,s=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!s)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=s,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),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")};this.webGLVersion===1?Object.assign(this.extensions,t,{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_ha
Line truncated
|
||||
`;const ed=class Go extends ps{constructor(e,t,s){const n=Vs.from(e||Go.defaultVertexSrc,t||Go.defaultFragmentSrc);super(n,s),this.padding=0,this.resolution=Go.defaultResolution,this.multisample=Go.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new zs}apply(e,t,s,n,r){e.applyFilter(this,t,s,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return $_}static get defaultFragmentSrc(){return Y_}};ed.defaultResolution=1,ed.defaultMultisample=ei.NONE;let Mi=ed;class Bl{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new At(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;const{backgroundColor:t,background:s,backgroundAlpha:n}=e,r=s??t;r!==void 0&&(this.color=r),this.alpha=n}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}}Bl.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},Bl.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"background"};He.add(Bl);class cv{constructor(e){this.renderer=e,this.emptyRenderer=new kh(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){const{boundTextures:s}=this.renderer.texture;for(let n=t-1;n>=0;--n)e[n]=s[n]||null,e[n]&&(e[n]._batchLocation=n)}boundArray(e,t,s,n){const{elements:r,ids:o,count:a}=e;let h=0;for(let l=0;l<a;l++){const c=r[l],u=c._batchLocation;if(u>=0&&u<n&&t[u]===c){o[l]=u;continue}for(;h<n;){const f=t[h];if(f&&f._batchEnabled===s&&f._batchLocation===h){h++;continue}o[l]=h,c._batchLocation=h,t[h]=c;break}}}destroy(){this.renderer=null}}cv.extension={type:Oe.RendererSystem,name:"batch"};He.add(cv);let Em=0;class Ll{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},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,this.renderer.CONTEXT_UID=Em++}init(e){if(e.context)this.initFromContext(e.context);else{const t=this.renderer.background.alpha<1,s=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:s,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=Em++,this.renderer.runners.contextChange.emit(e);const t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){const t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let s;if(Ve.PREFER_ENV>=Cr.WEBGL2&&(s=e.getContext("webgl2",t)),s)this.webGLVersion=2;else if(this.webGLVersion=1,s=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!s)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=s,this.getExtensions(),this.gl}getExtensions(){const{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),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")};this.webGLVersion===1?Object.assign(this.extensions,t,{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_ha
Line truncated
|
||||
varying vec2 vTextureCoord;
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
@@ -421,7 +421,7 @@ void main(void)
|
||||
|
||||
gl_FragColor = original;
|
||||
}
|
||||
`,$_=`attribute vec2 aVertexPosition;
|
||||
`,q_=`attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -437,7 +437,7 @@ void main(void)
|
||||
vTextureCoord = aTextureCoord;
|
||||
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
||||
}
|
||||
`;class G_ extends Mi{constructor(e,t,s){let n=null;typeof e!="string"&&t===void 0&&s===void 0&&(n=e,e=void 0,t=void 0,s=void 0),super(e||$_,t||Y_,s),this.maskSprite=n,this.maskMatrix=new Ut}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,s,n){const r=this._maskSprite,o=r._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new Qd(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,t,s,n))}}class j_{constructor(e=null){this.type=si.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Mi.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=si.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class mv{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let s=t;if(!s.isMaskData){const r=this.maskDataPool.pop()||new j_;r.pooled=!0,r.maskObject=t,s=r}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(s.copyCountersOrReset(n),s._colorMask=n?n._colorMask:15,s.autoDetect&&this.detect(s),s._target=e,s.type!==si.SPRITE&&this.maskStack.push(s),s.enabled)switch(s.type){case si.SCISSOR:this.renderer.scissor.push(s);break;case si.STENCIL:this.renderer.stencil.push(s);break;case si.SPRITE:s.copyCountersOrReset(null),this.pushSpriteMask(s);break;case si.COLOR:this.pushColorMask(s);break}s.type===si.SPRITE&&this.maskStack.push(s)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case si.SCISSOR:this.renderer.scissor.pop(t);break;case si.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case si.SPRITE:this.popSpriteMask(t);break;case si.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const s=this.maskStack[this.maskStack.length-1];s.type===si.SPRITE&&s._filters&&(s._filters[0].maskSprite=s.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=si.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=si.SCISSOR:e.type=si.STENCIL:e.type=si.COLOR}pushSpriteMask(e){const{maskObject:t}=e,s=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new G_])),n[0].resolution=e.resolution,n[0].multisample=e.multisample,n[0].maskSprite=t;const r=s.filterArea;s.filterArea=t.getBounds(!0),this.renderer.filter.push(s,n),s.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,s=e._colorMask=t&e.colorMask;s!==t&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}popColorMask(e){const t=e._colorMask,s=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;s!==t&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}destroy(){this.renderer=null}}mv.extension={type:Oe.RendererSystem,name:"mask"};He.add(mv);class gv{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,s=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==s&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Em=new Ut,Am=[],vv=class ul extends gv{constructor(e){super(e),this.glConst=Ve.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:s}=e,{renderer:n}=this,r=n.renderTexture,o=s.getBounds(!0,Am.pop()??new lt);this.roundFrameToPixels(o,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static
Line truncated
|
||||
`;class K_ extends Mi{constructor(e,t,s){let n=null;typeof e!="string"&&t===void 0&&s===void 0&&(n=e,e=void 0,t=void 0,s=void 0),super(e||q_,t||z_,s),this.maskSprite=n,this.maskMatrix=new Vt}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,s,n){const r=this._maskSprite,o=r._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new sf(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,r).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=r.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,t,s,n))}}class Z_{constructor(e=null){this.type=si.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Mi.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=si.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class yv{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let s=t;if(!s.isMaskData){const r=this.maskDataPool.pop()||new Z_;r.pooled=!0,r.maskObject=t,s=r}const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(s.copyCountersOrReset(n),s._colorMask=n?n._colorMask:15,s.autoDetect&&this.detect(s),s._target=e,s.type!==si.SPRITE&&this.maskStack.push(s),s.enabled)switch(s.type){case si.SCISSOR:this.renderer.scissor.push(s);break;case si.STENCIL:this.renderer.stencil.push(s);break;case si.SPRITE:s.copyCountersOrReset(null),this.pushSpriteMask(s);break;case si.COLOR:this.pushColorMask(s);break}s.type===si.SPRITE&&this.maskStack.push(s)}pop(e){const t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case si.SCISSOR:this.renderer.scissor.pop(t);break;case si.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case si.SPRITE:this.popSpriteMask(t);break;case si.COLOR:this.popColorMask(t);break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){const s=this.maskStack[this.maskStack.length-1];s.type===si.SPRITE&&s._filters&&(s._filters[0].maskSprite=s.maskObject)}}}detect(e){const t=e.maskObject;t?t.isSprite?e.type=si.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=si.SCISSOR:e.type=si.STENCIL:e.type=si.COLOR}pushSpriteMask(e){const{maskObject:t}=e,s=e._target;let n=e._filters;n||(n=this.alphaMaskPool[this.alphaMaskIndex],n||(n=this.alphaMaskPool[this.alphaMaskIndex]=[new K_])),n[0].resolution=e.resolution,n[0].multisample=e.multisample,n[0].maskSprite=t;const r=s.filterArea;s.filterArea=t.getBounds(!0),this.renderer.filter.push(s,n),s.filterArea=r,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){const t=e._colorMask,s=e._colorMask=t&e.colorMask;s!==t&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}popColorMask(e){const t=e._colorMask,s=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;s!==t&&this.renderer.gl.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)}destroy(){this.renderer=null}}yv.extension={type:Oe.RendererSystem,name:"mask"};He.add(yv);class xv{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){const{gl:t}=this.renderer,s=this.getStackLength();this.maskStack=e;const n=this.getStackLength();n!==s&&(n===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Im=new Vt,Rm=[],bv=class pl extends xv{constructor(e){super(e),this.glConst=Ve.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:s}=e,{renderer:n}=this,r=n.renderTexture,o=s.getBounds(!0,Rm.pop()??new lt);this.roundFrameToPixels(o,r.current?r.current.resolution:n.resolution,r.sourceFrame,r.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static
Line truncated
|
||||
data[offset] = v;
|
||||
`,vec2:`
|
||||
data[offset] = v[0];
|
||||
@@ -475,7 +475,7 @@ void main(void)
|
||||
{
|
||||
data[offset + i] = v[i];
|
||||
}
|
||||
`},Sv={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function eS(i){const e=i.map(r=>({data:r,offset:0,dataLen:0,dirty:0}));let t=0,s=0,n=0;for(let r=0;r<e.length;r++){const o=e[r];if(t=Sv[o.data.type],o.data.size>1&&(t=Math.max(t,16)*o.data.size),o.dataLen=t,s%t!==0&&s<16){const a=s%t%16;s+=a,n+=a}s+t>16?(n=Math.ceil(n/16)*16,o.offset=n,n+=t,s=t):(o.offset=n,s+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function tS(i,e){const t=[];for(const s in i)e[s]&&t.push(e[s]);return t.sort((s,n)=>s.index-n.index),t}function iS(i,e){if(!i.autoManage)return{size:0,syncFunc:J_};const t=tS(i.uniforms,e),{uboElements:s,size:n}=eS(t),r=[`
|
||||
`},Ev={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function oS(i){const e=i.map(r=>({data:r,offset:0,dataLen:0,dirty:0}));let t=0,s=0,n=0;for(let r=0;r<e.length;r++){const o=e[r];if(t=Ev[o.data.type],o.data.size>1&&(t=Math.max(t,16)*o.data.size),o.dataLen=t,s%t!==0&&s<16){const a=s%t%16;s+=a,n+=a}s+t>16?(n=Math.ceil(n/16)*16,o.offset=n,n+=t,s=t):(o.offset=n,s+=t,n+=t)}return n=Math.ceil(n/16)*16,{uboElements:e,size:n}}function aS(i,e){const t=[];for(const s in i)e[s]&&t.push(e[s]);return t.sort((s,n)=>s.index-n.index),t}function lS(i,e){if(!i.autoManage)return{size:0,syncFunc:nS};const t=aS(i.uniforms,e),{uboElements:s,size:n}=oS(t),r=[`
|
||||
var v = null;
|
||||
var v2 = null;
|
||||
var cv = null;
|
||||
@@ -483,7 +483,7 @@ void main(void)
|
||||
var gl = renderer.gl
|
||||
var index = 0;
|
||||
var data = buffer.data;
|
||||
`];for(let o=0;o<s.length;o++){const a=s[o],h=i.uniforms[a.data.name],l=a.data.name;let c=!1;for(let u=0;u<lo.length;u++){const f=lo[u];if(f.codeUbo&&f.test(a.data,h)){r.push(`offset = ${a.offset/4};`,lo[u].codeUbo(a.data.name,h)),c=!0;break}}if(!c)if(a.data.size>1){const u=nv(a.data.type),f=Math.max(Sv[a.data.type]/16,1),d=u/f,m=(4-d%4)%4;r.push(`
|
||||
`];for(let o=0;o<s.length;o++){const a=s[o],h=i.uniforms[a.data.name],l=a.data.name;let c=!1;for(let u=0;u<lo.length;u++){const f=lo[u];if(f.codeUbo&&f.test(a.data,h)){r.push(`offset = ${a.offset/4};`,lo[u].codeUbo(a.data.name,h)),c=!0;break}}if(!c)if(a.data.size>1){const u=av(a.data.type),f=Math.max(Ev[a.data.type]/16,1),d=u/f,m=(4-d%4)%4;r.push(`
|
||||
cv = ud.${l}.value;
|
||||
v = uv.${l};
|
||||
offset = ${a.offset/4};
|
||||
@@ -499,7 +499,7 @@ void main(void)
|
||||
offset += ${m};
|
||||
}
|
||||
|
||||
`)}else{const u=Q_[a.data.type];r.push(`
|
||||
`)}else{const u=rS[a.data.type];r.push(`
|
||||
cv = ud.${l}.value;
|
||||
v = uv.${l};
|
||||
offset = ${a.offset/4};
|
||||
@@ -507,7 +507,7 @@ void main(void)
|
||||
`)}}return r.push(`
|
||||
renderer.buffer.update(buffer);
|
||||
`),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",r.join(`
|
||||
`))}}let sS=0;const Xa={textureCount:0,uboCount:0};class Tv{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=sS++}systemCheck(){if(!I_())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const s=e.program,n=s.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==s&&(this.program=s,this.gl.useProgram(n.program)),t||(Xa.textureCount=0,Xa.uboCount=0,this.syncUniformGroup(e.uniformGroup,Xa)),n}setUniforms(e){const t=this.shader.program,s=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(s.uniformData,e,this.renderer)}syncUniformGroup(e,t){const s=this.getGlProgram();(!e.static||e.dirtyId!==s.uniformDirtyGroups[e.id])&&(s.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,s,t))}syncUniforms(e,t,s){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,s)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=T_(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const s=this.getGlProgram();if(!e.static||e.dirtyId!==0||!s.uniformGroups[e.id]){e.dirtyId=0;const n=s.uniformGroups[e.id]||this.createSyncBufferGroup(e,s,t);e.buffer.update(),n(s.uniformData,e.uniforms,this.renderer,Xa,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,s.uniformBufferBindings[t])}createSyncBufferGroup(e,t,s){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,s);t.uniformBufferBindings[s]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(e,this.shader.program.uniformData,"ubo");let a=this._uboCache[o];if(a||(a=this._uboCache[o]=iS(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(a.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=a.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,s){const n=e.uniforms,r=[`${s}-`];for(const o in n)r.push(o),t[o]&&r.push(t[o].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,s=e.program,n=Z_(t,s);return s.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Tv.extension={type:Oe.RendererSystem,name:"shader"};He.add(Tv);class Ol{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}Ol.defaultOptions={hello:!1},Ol.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"startup"};He.add(Ol);function nS(i,e=[]){return e[Qe.NORMAL]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.ADD]=[i.ONE,i.ONE],e[Qe.MULTIPLY]=[i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SCREEN]=[i.ONE,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.OVERLAY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.DARKEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.LIGHTEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR_DODGE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR_BURN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.HARD_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SOFT_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.DIFFERENCE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.EXCLUSION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.HUE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SATURATION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.LUMINOSITY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.NONE]=[0,0],e[Qe.NORMAL_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.ADD_NPM]=[i.SRC_ALPHA,i.ONE,i.ONE,i.ONE],e[Qe.SCREEN_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SRC_IN]=[i.DST_ALPHA,i.ZERO],e[Qe.SRC_OUT]=[i.ONE_MINUS_DST_ALPHA,i.ZERO],e[Qe.SRC_ATOP]=[i.DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],e[Qe.DST_OVER]=[i.ONE_MINUS_DST_ALPHA,i.ONE],e[Qe.DST_IN]=[i.ZERO,i.SRC_ALPHA],e[Qe.DST_OUT]=[i.ZERO,i.ONE_MINUS_SRC_ALPHA],e[Qe.DST_ATOP]=[i.ONE_MINUS_DST_ALPHA,i.SRC_ALPHA],e[Qe.XOR]=[i.ONE_MINUS_DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],e[Qe.SUBTRACT]=[i.ONE,i.ONE,i.ONE,i.ONE,i.FUNC_REVERSE_SUBTRACT,i.FUNC_ADD],e}const rS=0,oS=1,aS=2,lS=3,hS=4,cS=5,Mv=class Qu{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Qe.NONE,this._blendEq=!1,this.map=[],this.map[rS]=this.setBlend,this.map[oS]=this.setOffset,this.map[aS]=this.setCullFace,this.map[lS]=this.setDepthTest,this.ma
Line truncated
|
||||
`))}}let hS=0;const $a={textureCount:0,uboCount:0};class Av{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=hS++}systemCheck(){if(!B_())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;const s=e.program,n=s.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==s&&(this.program=s,this.gl.useProgram(n.program)),t||($a.textureCount=0,$a.uboCount=0,this.syncUniformGroup(e.uniformGroup,$a)),n}setUniforms(e){const t=this.shader.program,s=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(s.uniformData,e,this.renderer)}syncUniformGroup(e,t){const s=this.getGlProgram();(!e.static||e.dirtyId!==s.uniformDirtyGroups[e.id])&&(s.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,s,t))}syncUniforms(e,t,s){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,s)}createSyncGroups(e){const t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=R_(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){const s=this.getGlProgram();if(!e.static||e.dirtyId!==0||!s.uniformGroups[e.id]){e.dirtyId=0;const n=s.uniformGroups[e.id]||this.createSyncBufferGroup(e,s,t);e.buffer.update(),n(s.uniformData,e.uniforms,this.renderer,$a,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,s.uniformBufferBindings[t])}createSyncBufferGroup(e,t,s){const{gl:n}=this.renderer;this.renderer.buffer.bind(e.buffer);const r=this.gl.getUniformBlockIndex(t.program,s);t.uniformBufferBindings[s]=this.shader.uniformBindCount,n.uniformBlockBinding(t.program,r,this.shader.uniformBindCount),this.shader.uniformBindCount++;const o=this.getSignature(e,this.shader.program.uniformData,"ubo");let a=this._uboCache[o];if(a||(a=this._uboCache[o]=lS(e,this.shader.program.uniformData)),e.autoManage){const h=new Float32Array(a.size/4);e.buffer.update(h)}return t.uniformGroups[e.id]=a.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,s){const n=e.uniforms,r=[`${s}-`];for(const o in n)r.push(o),t[o]&&r.push(t[o].type);return r.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){const t=this.gl,s=e.program,n=sS(t,s);return s.glPrograms[this.renderer.CONTEXT_UID]=n,n}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Av.extension={type:Oe.RendererSystem,name:"shader"};He.add(Av);class Dl{constructor(e){this.renderer=e}run(e){const{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.4.3 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}}Dl.defaultOptions={hello:!1},Dl.extension={type:[Oe.RendererSystem,Oe.CanvasRendererSystem],name:"startup"};He.add(Dl);function cS(i,e=[]){return e[Qe.NORMAL]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.ADD]=[i.ONE,i.ONE],e[Qe.MULTIPLY]=[i.DST_COLOR,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SCREEN]=[i.ONE,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.OVERLAY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.DARKEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.LIGHTEN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR_DODGE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR_BURN]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.HARD_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SOFT_LIGHT]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.DIFFERENCE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.EXCLUSION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.HUE]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SATURATION]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.COLOR]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.LUMINOSITY]=[i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.NONE]=[0,0],e[Qe.NORMAL_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.ADD_NPM]=[i.SRC_ALPHA,i.ONE,i.ONE,i.ONE],e[Qe.SCREEN_NPM]=[i.SRC_ALPHA,i.ONE_MINUS_SRC_COLOR,i.ONE,i.ONE_MINUS_SRC_ALPHA],e[Qe.SRC_IN]=[i.DST_ALPHA,i.ZERO],e[Qe.SRC_OUT]=[i.ONE_MINUS_DST_ALPHA,i.ZERO],e[Qe.SRC_ATOP]=[i.DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],e[Qe.DST_OVER]=[i.ONE_MINUS_DST_ALPHA,i.ONE],e[Qe.DST_IN]=[i.ZERO,i.SRC_ALPHA],e[Qe.DST_OUT]=[i.ZERO,i.ONE_MINUS_SRC_ALPHA],e[Qe.DST_ATOP]=[i.ONE_MINUS_DST_ALPHA,i.SRC_ALPHA],e[Qe.XOR]=[i.ONE_MINUS_DST_ALPHA,i.ONE_MINUS_SRC_ALPHA],e[Qe.SUBTRACT]=[i.ONE,i.ONE,i.ONE,i.ONE,i.FUNC_REVERSE_SUBTRACT,i.FUNC_ADD],e}const uS=0,dS=1,fS=2,pS=3,mS=4,gS=5,Cv=class id{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Qe.NONE,this._blendEq=!1,this.map=[],this.map[uS]=this.setBlend,this.map[dS]=this.setOffset,this.map[fS]=this.setCullFace,this.map[pS]=this.setDepthTest,this.ma
Line truncated
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -518,7 +518,7 @@ void main(void)
|
||||
{
|
||||
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
||||
vTextureCoord = aTextureCoord;
|
||||
}`,vS=`attribute vec2 aVertexPosition;
|
||||
}`,SS=`attribute vec2 aVertexPosition;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
|
||||
@@ -544,7 +544,7 @@ void main(void)
|
||||
gl_Position = filterVertexPosition();
|
||||
vTextureCoord = filterTextureCoord();
|
||||
}
|
||||
`;const yS=gS,Pv=vS;class kv{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const s=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,s)}else{const s=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,s)}t>=ei.HIGH?this.multisample=ei.HIGH:t>=ei.MEDIUM?this.multisample=ei.MEDIUM:t>=ei.LOW?this.multisample=ei.LOW:this.multisample=ei.NONE}destroy(){}}kv.extension={type:Oe.RendererSystem,name:"_multisample"};He.add(kv);class xS{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Fv{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:s}=this,n=e._glBuffers[s]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:s,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,s.bindBufferBase(s.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,s){const{gl:n,CONTEXT_UID:r}=this;s=s||0;const o=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,o.buffer,s*256,256)}update(e){const{gl:t,CONTEXT_UID:s}=this,n=e._glBuffers[s]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const s=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),s&&(t||n.deleteBuffer(s.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let s=0;s<t.length;s++)this.dispose(this.managedBuffers[t[s]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:s}=this;return e._glBuffers[t]=new xS(s.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Fv.extension={type:Oe.RendererSystem,name:"buffer"};He.add(Fv);class Ov{constructor(e){this.renderer=e}render(e,t){const s=this.renderer;let n,r,o,a;if(t&&(n=t.renderTexture,r=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!n,s.runners.prerender.emit(),s.emit("prerender"),s.projection.transform=o,!s.context.isLost){if(n||(this.lastObjectRendered=e),!a){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}s.renderTexture.bind(n),s.batch.currentRenderer.start(),(r??s.background.clearBeforeRender)&&s.renderTexture.clear(),e.render(s),s.batch.currentRenderer.flush(),n&&(t.blit&&s.framebuffer.blit(),n.baseTexture.update()),s.runners.postrender.emit(),s.projection.transform=null,s.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Ov.extension={type:Oe.RendererSystem,name:"objectRenderer"};He.add(Ov);const fl=class ed extends dS{constructor(e){super(),this.type=O0.WEBGL,e=Object.assign({},Ve.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new ds({projectionMatrix:new Ut},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:ed.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(pt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=ed.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:$w()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return
Line truncated
|
||||
`;const TS=_S,Ov=SS;class Bv{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){const s=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,s)}else{const s=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,s)}t>=ei.HIGH?this.multisample=ei.HIGH:t>=ei.MEDIUM?this.multisample=ei.MEDIUM:t>=ei.LOW?this.multisample=ei.LOW:this.multisample=ei.NONE}destroy(){}}Bv.extension={type:Oe.RendererSystem,name:"_multisample"};He.add(Bv);class MS{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Lv{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){const{gl:t,CONTEXT_UID:s}=this,n=e._glBuffers[s]||this.createGLBuffer(e);t.bindBuffer(e.type,n.buffer)}unbind(e){const{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){const{gl:s,CONTEXT_UID:n}=this;if(this.boundBufferBases[t]!==e){const r=e._glBuffers[n]||this.createGLBuffer(e);this.boundBufferBases[t]=e,s.bindBufferBase(s.UNIFORM_BUFFER,t,r.buffer)}}bindBufferRange(e,t,s){const{gl:n,CONTEXT_UID:r}=this;s=s||0;const o=e._glBuffers[r]||this.createGLBuffer(e);n.bindBufferRange(n.UNIFORM_BUFFER,t||0,o.buffer,s*256,256)}update(e){const{gl:t,CONTEXT_UID:s}=this,n=e._glBuffers[s]||this.createGLBuffer(e);if(e._updateID!==n.updateID)if(n.updateID=e._updateID,t.bindBuffer(e.type,n.buffer),n.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{const r=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;n.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,r)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];const s=e._glBuffers[this.CONTEXT_UID],n=this.gl;e.disposeRunner.remove(this),s&&(t||n.deleteBuffer(s.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){const t=Object.keys(this.managedBuffers);for(let s=0;s<t.length;s++)this.dispose(this.managedBuffers[t[s]],e)}createGLBuffer(e){const{CONTEXT_UID:t,gl:s}=this;return e._glBuffers[t]=new MS(s.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}}Lv.extension={type:Oe.RendererSystem,name:"buffer"};He.add(Lv);class Dv{constructor(e){this.renderer=e}render(e,t){const s=this.renderer;let n,r,o,a;if(t&&(n=t.renderTexture,r=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!n,s.runners.prerender.emit(),s.emit("prerender"),s.projection.transform=o,!s.context.isLost){if(n||(this.lastObjectRendered=e),!a){const h=e.enableTempParent();e.updateTransform(),e.disableTempParent(h)}s.renderTexture.bind(n),s.batch.currentRenderer.start(),(r??s.background.clearBeforeRender)&&s.renderTexture.clear(),e.render(s),s.batch.currentRenderer.flush(),n&&(t.blit&&s.framebuffer.blit(),n.baseTexture.update()),s.runners.postrender.emit(),s.projection.transform=null,s.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}Dv.extension={type:Oe.RendererSystem,name:"objectRenderer"};He.add(Dv);const gl=class sd extends yS{constructor(e){super(),this.type=D0.WEBGL,e=Object.assign({},Ve.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new fs({projectionMatrix:new Vt},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:sd.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(pt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=sd.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:qw()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return
Line truncated
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
uniform float uAlpha;
|
||||
@@ -553,9 +553,9 @@ void main(void)
|
||||
{
|
||||
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
|
||||
}
|
||||
`;class RS extends Mi{constructor(e=1){super(yS,IS,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const PS={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},kS=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
|
||||
`);function FS(i){const e=PS[i],t=e.length;let s=kS,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a<i;a++){let h=r.replace("%index%",a.toString());o=a,a>=t&&(o=i-a-1),h=h.replace("%value%",e[o].toString()),n+=h,n+=`
|
||||
`}return s=s.replace("%blur%",n),s=s.replace("%size%",i.toString()),s}const OS=`
|
||||
`;class LS extends Mi{constructor(e=1){super(TS,BS,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}const DS={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},NS=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
|
||||
`);function US(i){const e=DS[i],t=e.length;let s=NS,n="";const r="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;";let o;for(let a=0;a<i;a++){let h=r.replace("%index%",a.toString());o=a,a>=t&&(o=i-a-1),h=h.replace("%value%",e[o].toString()),n+=h,n+=`
|
||||
`}return s=s.replace("%blur%",n),s=s.replace("%size%",i.toString()),s}const VS=`
|
||||
attribute vec2 aVertexPosition;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -585,8 +585,8 @@ void main(void)
|
||||
|
||||
vec2 textureCoord = filterTextureCoord();
|
||||
%blur%
|
||||
}`;function BS(i,e){const t=Math.ceil(i/2);let s=OS,n="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let o=0;o<i;o++){let a=r.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(t-1)}.0`),n+=a,n+=`
|
||||
`}return s=s.replace("%blur%",n),s=s.replace("%size%",i.toString()),s}class od extends Mi{constructor(e,t=8,s=4,n=Mi.defaultResolution,r=5){const o=BS(r,e),a=FS(r);super(o,a),this.horizontal=e,this.resolution=n,this._quality=0,this.quality=s,this.blur=t}apply(e,t,s,n){if(s?this.horizontal?this.uniforms.strength=1/s.width*(s.width/t.width):this.uniforms.strength=1/s.height*(s.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,s,n);else{const r=e.getFilterTexture(),o=e.renderer;let a=t,h=r;this.state.blend=!1,e.applyFilter(this,a,h,Bs.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(a,Bs.BLIT),this.uniforms.uSampler=h;const c=h;h=a,a=c,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,h,s,n),e.returnFilterTexture(r)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}}class LS extends Mi{constructor(e=8,t=4,s=Mi.defaultResolution,n=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new od(!0,e,t,s,n),this.blurYFilter=new od(!1,e,t,s,n),this.resolution=s,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,s,n){const r=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(r&&o){const a=e.getFilterTexture();this.blurXFilter.apply(e,t,a,Bs.CLEAR),this.blurYFilter.apply(e,a,s,n),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,s,n):this.blurXFilter.apply(e,t,s,n)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var DS=`varying vec2 vTextureCoord;
|
||||
}`;function XS(i,e){const t=Math.ceil(i/2);let s=VS,n="",r;e?r="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":r="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let o=0;o<i;o++){let a=r.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(t-1)}.0`),n+=a,n+=`
|
||||
`}return s=s.replace("%blur%",n),s=s.replace("%size%",i.toString()),s}class hd extends Mi{constructor(e,t=8,s=4,n=Mi.defaultResolution,r=5){const o=XS(r,e),a=US(r);super(o,a),this.horizontal=e,this.resolution=n,this._quality=0,this.quality=s,this.blur=t}apply(e,t,s,n){if(s?this.horizontal?this.uniforms.strength=1/s.width*(s.width/t.width):this.uniforms.strength=1/s.height*(s.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,s,n);else{const r=e.getFilterTexture(),o=e.renderer;let a=t,h=r;this.state.blend=!1,e.applyFilter(this,a,h,Ls.CLEAR);for(let l=1;l<this.passes-1;l++){e.bindAndClear(a,Ls.BLIT),this.uniforms.uSampler=h;const c=h;h=a,a=c,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,h,s,n),e.returnFilterTexture(r)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}}class YS extends Mi{constructor(e=8,t=4,s=Mi.defaultResolution,n=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new hd(!0,e,t,s,n),this.blurYFilter=new hd(!1,e,t,s,n),this.resolution=s,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,s,n){const r=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(r&&o){const a=e.getFilterTexture();this.blurXFilter.apply(e,t,a,Ls.CLEAR),this.blurYFilter.apply(e,a,s,n),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,s,n):this.blurXFilter.apply(e,t,s,n)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}}var $S=`varying vec2 vTextureCoord;
|
||||
uniform sampler2D uSampler;
|
||||
uniform float m[20];
|
||||
uniform float uAlpha;
|
||||
@@ -638,7 +638,7 @@ void main(void)
|
||||
|
||||
gl_FragColor = vec4(rgb, result.a);
|
||||
}
|
||||
`;class ad extends Mi{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Pv,DS,e),this.alpha=1}_loadMatrix(e,t=!1){let s=e;t&&(this._multiply(s,this.uniforms.m,e),s=this._colorMatrix(s)),this.uniforms.m=s}_multiply(e,t,s){return e[0]=t[0]*s[0]+t[1]*s[5]+t[2]*s[10]+t[3]*s[15],e[1]=t[0]*s[1]+t[1]*s[6]+t[2]*s[11]+t[3]*s[16],e[2]=t[0]*s[2]+t[1]*s[7]+t[2]*s[12]+t[3]*s[17],e[3]=t[0]*s[3]+t[1]*s[8]+t[2]*s[13]+t[3]*s[18],e[4]=t[0]*s[4]+t[1]*s[9]+t[2]*s[14]+t[3]*s[19]+t[4],e[5]=t[5]*s[0]+t[6]*s[5]+t[7]*s[10]+t[8]*s[15],e[6]=t[5]*s[1]+t[6]*s[6]+t[7]*s[11]+t[8]*s[16],e[7]=t[5]*s[2]+t[6]*s[7]+t[7]*s[12]+t[8]*s[17],e[8]=t[5]*s[3]+t[6]*s[8]+t[7]*s[13]+t[8]*s[18],e[9]=t[5]*s[4]+t[6]*s[9]+t[7]*s[14]+t[8]*s[19]+t[9],e[10]=t[10]*s[0]+t[11]*s[5]+t[12]*s[10]+t[13]*s[15],e[11]=t[10]*s[1]+t[11]*s[6]+t[12]*s[11]+t[13]*s[16],e[12]=t[10]*s[2]+t[11]*s[7]+t[12]*s[12]+t[13]*s[17],e[13]=t[10]*s[3]+t[11]*s[8]+t[12]*s[13]+t[13]*s[18],e[14]=t[10]*s[4]+t[11]*s[9]+t[12]*s[14]+t[13]*s[19]+t[14],e[15]=t[15]*s[0]+t[16]*s[5]+t[17]*s[10]+t[18]*s[15],e[16]=t[15]*s[1]+t[16]*s[6]+t[17]*s[11]+t[18]*s[16],e[17]=t[15]*s[2]+t[16]*s[7]+t[17]*s[12]+t[18]*s[17],e[18]=t[15]*s[3]+t[16]*s[8]+t[17]*s[13]+t[18]*s[18],e[19]=t[15]*s[4]+t[16]*s[9]+t[17]*s[14]+t[18]*s[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const s=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(s,t)}tint(e,t){const[s,n,r]=At.shared.setValue(e).toArray(),o=[s,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){const s=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(s,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const s=Math.cos(e),n=Math.sin(e),r=Math.sqrt,o=1/3,a=r(o),h=s+(1-s)*o,l=o*(1-s)-a*n,c=o*(1-s)+a*n,u=o*(1-s)+a*n,f=s+o*(1-s),d=o*(1-s)-a*n,m=o*(1-s)-a*n,g=o*(1-s)+a*n,x=s+o*(1-s),_=[h,l,c,0,0,u,f,d,0,0,m,g,x,0,0,0,0,0,1,0];this._loadMatrix(_,t)}contrast(e,t){const s=(e||0)+1,n=-.5*(s-1),r=[s,0,0,0,n,0,s,0,0,n,0,0,s,0,n,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const s=e*2/3+1,n=(s-1)*-.5,r=[s,n,n,0,0,n,s,n,0,0,n,n,s,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,s,n,r){e=e||.2,t=t||.15,s=s||16770432,n=n||3375104;const o=At.shared,[a,h,l]=o.setValue(s).toArray(),[c,u,f]=o.setValue(n).toArray(),d=[.3,.59,.11,0,0,a,h,l,e,0,c,u,f,t,0,a-c,h-u,l-f,0,0];this._loadMatrix(d,r)}night(e,t){e=e||.1;const s=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(s,t)}predator(e,t){const s=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(s,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}ad.prototype.grayscale=ad.prototype.greyscale;var NS=`varying vec2 vFilterCoord;
|
||||
`;class cd extends Mi{constructor(){const e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(Ov,$S,e),this.alpha=1}_loadMatrix(e,t=!1){let s=e;t&&(this._multiply(s,this.uniforms.m,e),s=this._colorMatrix(s)),this.uniforms.m=s}_multiply(e,t,s){return e[0]=t[0]*s[0]+t[1]*s[5]+t[2]*s[10]+t[3]*s[15],e[1]=t[0]*s[1]+t[1]*s[6]+t[2]*s[11]+t[3]*s[16],e[2]=t[0]*s[2]+t[1]*s[7]+t[2]*s[12]+t[3]*s[17],e[3]=t[0]*s[3]+t[1]*s[8]+t[2]*s[13]+t[3]*s[18],e[4]=t[0]*s[4]+t[1]*s[9]+t[2]*s[14]+t[3]*s[19]+t[4],e[5]=t[5]*s[0]+t[6]*s[5]+t[7]*s[10]+t[8]*s[15],e[6]=t[5]*s[1]+t[6]*s[6]+t[7]*s[11]+t[8]*s[16],e[7]=t[5]*s[2]+t[6]*s[7]+t[7]*s[12]+t[8]*s[17],e[8]=t[5]*s[3]+t[6]*s[8]+t[7]*s[13]+t[8]*s[18],e[9]=t[5]*s[4]+t[6]*s[9]+t[7]*s[14]+t[8]*s[19]+t[9],e[10]=t[10]*s[0]+t[11]*s[5]+t[12]*s[10]+t[13]*s[15],e[11]=t[10]*s[1]+t[11]*s[6]+t[12]*s[11]+t[13]*s[16],e[12]=t[10]*s[2]+t[11]*s[7]+t[12]*s[12]+t[13]*s[17],e[13]=t[10]*s[3]+t[11]*s[8]+t[12]*s[13]+t[13]*s[18],e[14]=t[10]*s[4]+t[11]*s[9]+t[12]*s[14]+t[13]*s[19]+t[14],e[15]=t[15]*s[0]+t[16]*s[5]+t[17]*s[10]+t[18]*s[15],e[16]=t[15]*s[1]+t[16]*s[6]+t[17]*s[11]+t[18]*s[16],e[17]=t[15]*s[2]+t[16]*s[7]+t[17]*s[12]+t[18]*s[17],e[18]=t[15]*s[3]+t[16]*s[8]+t[17]*s[13]+t[18]*s[18],e[19]=t[15]*s[4]+t[16]*s[9]+t[17]*s[14]+t[18]*s[19]+t[19],e}_colorMatrix(e){const t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){const s=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(s,t)}tint(e,t){const[s,n,r]=At.shared.setValue(e).toArray(),o=[s,0,0,0,0,0,n,0,0,0,0,0,r,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){const s=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(s,t)}blackAndWhite(e){const t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;const s=Math.cos(e),n=Math.sin(e),r=Math.sqrt,o=1/3,a=r(o),h=s+(1-s)*o,l=o*(1-s)-a*n,c=o*(1-s)+a*n,u=o*(1-s)+a*n,f=s+o*(1-s),d=o*(1-s)-a*n,m=o*(1-s)-a*n,g=o*(1-s)+a*n,b=s+o*(1-s),_=[h,l,c,0,0,u,f,d,0,0,m,g,b,0,0,0,0,0,1,0];this._loadMatrix(_,t)}contrast(e,t){const s=(e||0)+1,n=-.5*(s-1),r=[s,0,0,0,n,0,s,0,0,n,0,0,s,0,n,0,0,0,1,0];this._loadMatrix(r,t)}saturate(e=0,t){const s=e*2/3+1,n=(s-1)*-.5,r=[s,n,n,0,0,n,s,n,0,0,n,n,s,0,0,0,0,0,1,0];this._loadMatrix(r,t)}desaturate(){this.saturate(-1)}negative(e){const t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){const t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){const t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){const t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){const t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){const t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){const t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){const t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,s,n,r){e=e||.2,t=t||.15,s=s||16770432,n=n||3375104;const o=At.shared,[a,h,l]=o.setValue(s).toArray(),[c,u,f]=o.setValue(n).toArray(),d=[.3,.59,.11,0,0,a,h,l,e,0,c,u,f,t,0,a-c,h-u,l-f,0,0];this._loadMatrix(d,r)}night(e,t){e=e||.1;const s=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(s,t)}predator(e,t){const s=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(s,t)}lsd(e){const t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){const e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}}cd.prototype.grayscale=cd.prototype.greyscale;var GS=`varying vec2 vFilterCoord;
|
||||
varying vec2 vTextureCoord;
|
||||
|
||||
uniform vec2 scale;
|
||||
@@ -658,7 +658,7 @@ void main(void)
|
||||
|
||||
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
|
||||
}
|
||||
`,US=`attribute vec2 aVertexPosition;
|
||||
`,jS=`attribute vec2 aVertexPosition;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
uniform mat3 filterMatrix;
|
||||
@@ -687,7 +687,7 @@ void main(void)
|
||||
vTextureCoord = filterTextureCoord();
|
||||
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
|
||||
}
|
||||
`;class VS extends Mi{constructor(e,t){const s=new Ut;e.renderable=!1,super(US,NS,{mapSampler:e._texture,filterMatrix:s,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=s,t==null&&(t=20),this.scale=new bt(t,t)}apply(e,t,s,n){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const r=this.maskSprite.worldTransform,o=Math.sqrt(r.a*r.a+r.b*r.b),a=Math.sqrt(r.c*r.c+r.d*r.d);o!==0&&a!==0&&(this.uniforms.rotation[0]=r.a/o,this.uniforms.rotation[1]=r.b/o,this.uniforms.rotation[2]=r.c/a,this.uniforms.rotation[3]=r.d/a),e.applyFilter(this,t,s,n)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var XS=`varying vec2 v_rgbNW;
|
||||
`;class HS extends Mi{constructor(e,t){const s=new Vt;e.renderable=!1,super(jS,GS,{mapSampler:e._texture,filterMatrix:s,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=s,t==null&&(t=20),this.scale=new bt(t,t)}apply(e,t,s,n){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;const r=this.maskSprite.worldTransform,o=Math.sqrt(r.a*r.a+r.b*r.b),a=Math.sqrt(r.c*r.c+r.d*r.d);o!==0&&a!==0&&(this.uniforms.rotation[0]=r.a/o,this.uniforms.rotation[1]=r.b/o,this.uniforms.rotation[2]=r.c/a,this.uniforms.rotation[3]=r.d/a),e.applyFilter(this,t,s,n)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}}var WS=`varying vec2 v_rgbNW;
|
||||
varying vec2 v_rgbNE;
|
||||
varying vec2 v_rgbSW;
|
||||
varying vec2 v_rgbSE;
|
||||
@@ -808,7 +808,7 @@ void main() {
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
`,YS=`
|
||||
`,zS=`
|
||||
attribute vec2 aVertexPosition;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -850,7 +850,7 @@ void main(void) {
|
||||
|
||||
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
|
||||
}
|
||||
`;class $S extends Mi{constructor(){super(YS,XS)}}var GS=`precision highp float;
|
||||
`;class qS extends Mi{constructor(){super(zS,WS)}}var KS=`precision highp float;
|
||||
|
||||
varying vec2 vTextureCoord;
|
||||
varying vec4 vColor;
|
||||
@@ -884,8 +884,8 @@ void main()
|
||||
|
||||
gl_FragColor = color;
|
||||
}
|
||||
`;class jS extends Mi{constructor(e=.5,t=Math.random()){super(Pv,GS,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const Im={AlphaFilter:RS,BlurFilter:LS,BlurFilterPass:od,ColorMatrixFilter:ad,DisplacementFilter:VS,FXAAFilter:$S,NoiseFilter:jS};Object.entries(Im).forEach(([i,e])=>{Object.defineProperty(Im,i,{get(){return pt("7.1.0",`filters.${i} has moved to ${i}`),e}})});class HS{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||(Ei.system.add(this.tickerUpdate,this,Sr.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Ei.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,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Vn=new HS;class Sa{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Sa.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new bt,this.page=new bt,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,s){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,s,n,r){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}}class Ll extends Sa{constructor(){super(...arguments),this.client=new bt,this.movement=new bt,this.offset=new bt,this.global=new bt,this.screen=new bt}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,s){return e.worldTransform.applyInverse(s||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,s,n,r,o,a,h,l,c,u,f,d,m,g){throw new Error("Method not implemented.")}}class rs extends Ll{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 ho extends Ll{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}ho.DOM_DELTA_PIXEL=0,ho.DOM_DELTA_LINE=1,ho.DOM_DELTA_PAGE=2;const WS=2048,zS=new bt,lu=new bt;class qS{constructor(e){this.dispatch=new _a,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("pointerle
Line truncated
|
||||
${u}`)}});return await Promise.all(h),r?n[o[0].src]:n}async unload(e){const t=os(e,s=>({alias:[s],src:s})).map(async s=>{var o,a;const n=zt.toAbsolute(s.src),r=this.promiseCache[n];if(r){const h=await r.promise;delete this.promiseCache[n],(a=(o=r.parser)==null?void 0:o.unload)==null||a.call(o,h,s,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Yi=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Yi||{});const cT=".json",uT="application/json",dT={extension:{type:Oe.LoadParser,priority:Yi.Low},name:"loadJson",test(i){return To(i,uT)||Fi(i,cT)},async load(i){return await(await Ve.ADAPTER.fetch(i)).json()}};He.add(dT);const fT=".txt",pT="text/plain",mT={name:"loadTxt",extension:{type:Oe.LoadParser,priority:Yi.Low},test(i){return To(i,pT)||Fi(i,fT)},async load(i){return await(await Ve.ADAPTER.fetch(i)).text()}};He.add(mT);const gT=["normal","bold","100","200","300","400","500","600","700","800","900"],vT=[".ttf",".otf",".woff",".woff2"],yT=["font/ttf","font/otf","font/woff","font/woff2"],xT=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function bT(i){const e=zt.extname(i),t=zt.basename(i,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let s=t.length>0;for(const r of t)if(!r.match(xT)){s=!1;break}let n=t.join(" ");return s||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const wT=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function _T(i){return wT.test(i)?i:encodeURI(i)}const ST={extension:{type:Oe.LoadParser,priority:Yi.Low},name:"loadWebFont",test(i){return To(i,yT)||Fi(i,vT)},async load(i,e){var s,n,r;const t=Ve.ADAPTER.getFontFaceSet();if(t){const o=[],a=((s=e.data)==null?void 0:s.family)??bT(i),h=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(c=>gT.includes(c)))??["normal"],l=e.data??{};for(let c=0;c<h.length;c++){const u=h[c],f=new FontFace(a,`url(${_T(i)})`,{...l,weight:u});await f.load(),t.add(f),o.push(f)}return o.length===1?o[0]:o}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(i){(Array.isArray(i)?i:[i]).forEach(e=>Ve.ADAPTER.getFontFaceSet().delete(e))}};He.add(ST);const TT=`(function() {
|
||||
`;class ZS extends Mi{constructor(e=.5,t=Math.random()){super(Ov,KS,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}}const km={AlphaFilter:LS,BlurFilter:YS,BlurFilterPass:hd,ColorMatrixFilter:cd,DisplacementFilter:HS,FXAAFilter:qS,NoiseFilter:ZS};Object.entries(km).forEach(([i,e])=>{Object.defineProperty(km,i,{get(){return pt("7.1.0",`filters.${i} has moved to ${i}`),e}})});class JS{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||(Ei.system.add(this.tickerUpdate,this,Sr.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(Ei.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,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}}const Vn=new JS;class Ta{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=Ta.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new bt,this.page=new bt,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,s){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,s,n,r){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}}class Ul extends Ta{constructor(){super(...arguments),this.client=new bt,this.movement=new bt,this.offset=new bt,this.global=new bt,this.screen=new bt}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,s){return e.worldTransform.applyInverse(s||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,s,n,r,o,a,h,l,c,u,f,d,m,g){throw new Error("Method not implemented.")}}class rs extends Ul{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 ho extends Ul{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}}ho.DOM_DELTA_PIXEL=0,ho.DOM_DELTA_LINE=1,ho.DOM_DELTA_PAGE=2;const QS=2048,eT=new bt,cu=new bt;class tT{constructor(e){this.dispatch=new Sa,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("pointerle
Line truncated
|
||||
${u}`)}});return await Promise.all(h),r?n[o[0].src]:n}async unload(e){const t=os(e,s=>({alias:[s],src:s})).map(async s=>{var o,a;const n=zt.toAbsolute(s.src),r=this.promiseCache[n];if(r){const h=await r.promise;delete this.promiseCache[n],(a=(o=r.parser)==null?void 0:o.unload)==null||a.call(o,h,s,this)}});await Promise.all(t)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}}var Yi=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Yi||{});const gT=".json",vT="application/json",yT={extension:{type:Oe.LoadParser,priority:Yi.Low},name:"loadJson",test(i){return To(i,vT)||Fi(i,gT)},async load(i){return await(await Ve.ADAPTER.fetch(i)).json()}};He.add(yT);const xT=".txt",bT="text/plain",wT={name:"loadTxt",extension:{type:Oe.LoadParser,priority:Yi.Low},test(i){return To(i,bT)||Fi(i,xT)},async load(i){return await(await Ve.ADAPTER.fetch(i)).text()}};He.add(wT);const _T=["normal","bold","100","200","300","400","500","600","700","800","900"],ST=[".ttf",".otf",".woff",".woff2"],TT=["font/ttf","font/otf","font/woff","font/woff2"],MT=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function ET(i){const e=zt.extname(i),t=zt.basename(i,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1));let s=t.length>0;for(const r of t)if(!r.match(MT)){s=!1;break}let n=t.join(" ");return s||(n=`"${n.replace(/[\\"]/g,"\\$&")}"`),n}const AT=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;function CT(i){return AT.test(i)?i:encodeURI(i)}const IT={extension:{type:Oe.LoadParser,priority:Yi.Low},name:"loadWebFont",test(i){return To(i,TT)||Fi(i,ST)},async load(i,e){var s,n,r;const t=Ve.ADAPTER.getFontFaceSet();if(t){const o=[],a=((s=e.data)==null?void 0:s.family)??ET(i),h=((r=(n=e.data)==null?void 0:n.weights)==null?void 0:r.filter(c=>_T.includes(c)))??["normal"],l=e.data??{};for(let c=0;c<h.length;c++){const u=h[c],f=new FontFace(a,`url(${CT(i)})`,{...l,weight:u});await f.load(),t.add(f),o.push(f)}return o.length===1?o[0]:o}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(i){(Array.isArray(i)?i:[i]).forEach(e=>Ve.ADAPTER.getFontFaceSet().delete(e))}};He.add(IT);const RT=`(function() {
|
||||
"use strict";
|
||||
const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";
|
||||
async function checkImageBitmap() {
|
||||
@@ -902,7 +902,7 @@ ${u}`)}});return await Promise.all(h),r?n[o[0].src]:n}async unload(e){const t=os
|
||||
self.postMessage(result);
|
||||
});
|
||||
})();
|
||||
`;let co=null,dd=class{constructor(){co||(co=URL.createObjectURL(new Blob([TT],{type:"application/javascript"}))),this.worker=new Worker(co)}};dd.revokeObjectURL=function(){co&&(URL.revokeObjectURL(co),co=null)};const MT=`(function() {
|
||||
`;let co=null,md=class{constructor(){co||(co=URL.createObjectURL(new Blob([RT],{type:"application/javascript"}))),this.worker=new Worker(co)}};md.revokeObjectURL=function(){co&&(URL.revokeObjectURL(co),co=null)};const PT=`(function() {
|
||||
"use strict";
|
||||
async function loadImageBitmap(url) {
|
||||
const response = await fetch(url);
|
||||
@@ -928,8 +928,8 @@ ${u}`)}});return await Promise.all(h),r?n[o[0].src]:n}async unload(e){const t=os
|
||||
}
|
||||
};
|
||||
})();
|
||||
`;let uo=null;class jv{constructor(){uo||(uo=URL.createObjectURL(new Blob([MT],{type:"application/javascript"}))),this.worker=new Worker(uo)}}jv.revokeObjectURL=function(){uo&&(URL.revokeObjectURL(uo),uo=null)};let Om=0,hu;class ET{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new dd;t.addEventListener("message",s=>{t.terminate(),dd.revokeObjectURL(),e(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){hu===void 0&&(hu=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<hu&&(this._createdWorkers++,e=new jv().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const s=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),s}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),s=t.id;this.resolveHash[Om]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:Om++,id:s})}}const Bm=new ET;function Ta(i,e,t){i.resource.internal=!0;const s=new et(i),n=()=>{delete e.promiseCache[t],pr.has(t)&&pr.remove(t)};return s.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),s.once("destroyed",()=>{i.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),s}const AT=[".jpeg",".jpg",".png",".webp",".avif"],CT=["image/jpeg","image/png","image/webp","image/avif"];async function IT(i){const e=await Ve.ADAPTER.fetch(i);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${i}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const Rh={name:"loadTextures",extension:{type:Oe.LoadParser,priority:Yi.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(i){return To(i,CT)||Fi(i,AT)},async load(i,e,t){var a;const s=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;s?this.config.preferWorkers&&await Bm.isImageBitmapSupported()?n=await Bm.loadImageBitmap(i):n=await IT(i):n=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=i,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=_n(i)),s&&((a=r.resourceOptions)==null?void 0:a.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const o=new st(n,r);return o.resource.src=i,Ta(o,t,i)},unload(i){i.destroy(!0)}};He.add(Rh);const RT=".svg",PT="image/svg+xml",kT={extension:{type:Oe.LoadParser,priority:Yi.High},name:"loadSVG",test(i){return To(i,PT)||Fi(i,RT)},async testParse(i){return id.test(i)},async parse(i,e,t){var r;const s=new id(i,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await s.load();const n=new st(s,{resolution:_n(i),...e==null?void 0:e.data});return n.resource.src=e.src,Ta(n,t,e.src)},async load(i,e){return(await Ve.ADAPTER.fetch(i)).text()},unload:Rh.unload};He.add(kT);const FT=[".mp4",".m4v",".webm",".ogv"],OT=["video/mp4","video/webm","video/ogg"],BT={name:"loadVideo",extension:{type:Oe.LoadParser,priority:Yi.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(i){return To(i,OT)||Fi(i,FT)},async load(i,e,t){var o;let s;const n=await(await Ve.ADAPTER.fetch(i)).blob(),r=URL.createObjectURL(n);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(o=e==null?void 0:e.data)==null?void 0:o.resourceOptions,autoLoad:!0},h=new Dv(r,a);await h.load();const l=new st(h,{alphaMode:await Yw(),resolution:_n(i),...e==null?void 0:e.data});l.resource.src=i,s=Ta(l,t,i),s.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(a){throw URL.revokeObjectURL(r),a}return s},unload(i){i.destroy(!0)}};He.add(BT);class LT{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=
Line truncated
|
||||
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:t,data:s,format:n,loadParser:r})):Array.isArray(e)?o.push(...e):o.push(e);let a;a=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},os(o).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:f,loadParser:d}=h;const m=os(l||c).map(_=>typeof _=="string"?aT(_):Array.isArray(_)?_:[_]),g=this.getAlias(h);Array.isArray(g)?g.forEach(a):a(g);const x=[];m.forEach(_=>{_.forEach(T=>{let v={};if(typeof T!="object"){v.src=T;for(let S=0;S<this._parsers.length;S++){const y=this._parsers[S];if(y.test(T)){v=y.parse(T);break}}}else u=T.data??u,f=T.format??f,d=T.loadParser??d,v={...v,...T};if(!g)throw new Error(`[Resolver] alias is undefined for this asset: ${v.src}`);v=this.buildResolvedAsset(v,{aliases:g,data:u,format:f,loadParser:d}),x.push(v)})}),g.forEach(_=>{this._assetMap[_]=x})})}resolveBundle(e){const t=Nl(e);e=os(e);const s={};return e.forEach(n=>{const r=this._bundles[n];if(r){const o=this.resolve(r),a={};for(const h in o){const l=o[h];a[this._extractAssetIdFromBundle(n,h)]=l}s[n]=a}}),t?s[e[0]]:s}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const s={};for(const n in t)s[n]=t[n].src;return s}return t.src}resolve(e){const t=Nl(e);e=os(e);const s={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const o=r[0],a=this._getPreferredOrder(r);a==null||a.priority.forEach(h=>{a.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[n]=r[0]??o}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});s[n]=this._resolverHash[n]}),t?s[e[0]]:s}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const s=e[0],n=this._preferredOrder.find(r=>r.params.format.includes(s.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:s,data:n,loadParser:r,format:o}=t;return(this._basePath||this._rootPath)&&(e.src=zt.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=s??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=o??e.format??zt.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class DT{constructor(){this._detections=[],this._initialized=!1,this.resolver=new LT,this.loader=new hT,this.cache=pr,this._backgroundLoader=new oT(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,o;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let a=e.manifest;typeof a=="string"&&(a=await this.load(a)),this.resolver.addManifest(a)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,s=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:s}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,s,n,r){this.resolver.add(e,t,s,n,r)}async load(e,t){this._initialized||await this.init();const s=Nl(e),n=os(e).map(a=>{if(typeof a!="string"){const h=this.resolver.getAlias(a);return h.some(l=>!this.resolver.hasKey(l))&&this.add(a),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(a)||this.add({alias:a,src:a}),a}),r=this.resolver.resolve(n),o=await this._mapLoadToResolve(r,t);return s?o[n[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let s=!1;typeof e=="string"&&(s=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},o=Object.keys(n);let a=0,h=0;const l=()=>{t==null||t(++a/h)},c=o.map(u=>{const f=n[u];return h+=Object.keys(f).length,this._mapLoadToResolve(f,l).then(d=>{r[u]=d})});return await Promise.all(c),s?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(s=>{this._backgroundLoader.add(Object.values(s))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return pr.get(e);const t={};for(let s=0;s<e.length;s++)t[s]=pr.get(e[s]);return t}async _mapLoadToResolve(e,t){const s=Object.values(e),n=Object.keys(e);this._backgroundLoader.active=!1;co
Line truncated
|
||||
`;let uo=null;class zv{constructor(){uo||(uo=URL.createObjectURL(new Blob([PT],{type:"application/javascript"}))),this.worker=new Worker(uo)}}zv.revokeObjectURL=function(){uo&&(URL.revokeObjectURL(uo),uo=null)};let Dm=0,uu;class kT{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{const{worker:t}=new md;t.addEventListener("message",s=>{t.terminate(),md.revokeObjectURL(),e(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){uu===void 0&&(uu=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<uu&&(this._createdWorkers++,e=new zv().worker,e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();const s=new Promise((n,r)=>{this.queue.push({id:e,arguments:t,resolve:n,reject:r})});return this.next(),s}next(){if(!this.queue.length)return;const e=this.getWorker();if(!e)return;const t=this.queue.pop(),s=t.id;this.resolveHash[Dm]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:Dm++,id:s})}}const Nm=new kT;function Ma(i,e,t){i.resource.internal=!0;const s=new et(i),n=()=>{delete e.promiseCache[t],pr.has(t)&&pr.remove(t)};return s.baseTexture.once("destroyed",()=>{t in e.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),n())}),s.once("destroyed",()=>{i.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),n())}),s}const FT=[".jpeg",".jpg",".png",".webp",".avif"],OT=["image/jpeg","image/png","image/webp","image/avif"];async function BT(i){const e=await Ve.ADAPTER.fetch(i);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${i}: ${e.status} ${e.statusText}`);const t=await e.blob();return await createImageBitmap(t)}const Fh={name:"loadTextures",extension:{type:Oe.LoadParser,priority:Yi.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(i){return To(i,OT)||Fi(i,FT)},async load(i,e,t){var a;const s=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let n;s?this.config.preferWorkers&&await Nm.isImageBitmapSupported()?n=await Nm.loadImageBitmap(i):n=await BT(i):n=await new Promise((h,l)=>{const c=new Image;c.crossOrigin=this.config.crossOrigin,c.src=i,c.complete?h(c):(c.onload=()=>h(c),c.onerror=u=>l(u))});const r={...e.data};r.resolution??(r.resolution=_n(i)),s&&((a=r.resourceOptions)==null?void 0:a.ownsImageBitmap)===void 0&&(r.resourceOptions={...r.resourceOptions},r.resourceOptions.ownsImageBitmap=!0);const o=new st(n,r);return o.resource.src=i,Ma(o,t,i)},unload(i){i.destroy(!0)}};He.add(Fh);const LT=".svg",DT="image/svg+xml",NT={extension:{type:Oe.LoadParser,priority:Yi.High},name:"loadSVG",test(i){return To(i,DT)||Fi(i,LT)},async testParse(i){return rd.test(i)},async parse(i,e,t){var r;const s=new rd(i,(r=e==null?void 0:e.data)==null?void 0:r.resourceOptions);await s.load();const n=new st(s,{resolution:_n(i),...e==null?void 0:e.data});return n.resource.src=e.src,Ma(n,t,e.src)},async load(i,e){return(await Ve.ADAPTER.fetch(i)).text()},unload:Fh.unload};He.add(NT);const UT=[".mp4",".m4v",".webm",".ogv"],VT=["video/mp4","video/webm","video/ogg"],XT={name:"loadVideo",extension:{type:Oe.LoadParser,priority:Yi.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test(i){return To(i,VT)||Fi(i,UT)},async load(i,e,t){var o;let s;const n=await(await Ve.ADAPTER.fetch(i)).blob(),r=URL.createObjectURL(n);try{const a={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...(o=e==null?void 0:e.data)==null?void 0:o.resourceOptions,autoLoad:!0},h=new Vv(r,a);await h.load();const l=new st(h,{alphaMode:await zw(),resolution:_n(i),...e==null?void 0:e.data});l.resource.src=i,s=Ma(l,t,i),s.baseTexture.once("destroyed",()=>{URL.revokeObjectURL(r)})}catch(a){throw URL.revokeObjectURL(r),a}return s},unload(i){i.destroy(!0)}};He.add(XT);class YT{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=
Line truncated
|
||||
Please use Assets.add({ alias, src, data, format, loadParser }) instead.`),o.push({alias:e,src:t,data:s,format:n,loadParser:r})):Array.isArray(e)?o.push(...e):o.push(e);let a;a=h=>{this.hasKey(h)&&console.warn(`[Resolver] already has key: ${h} overwriting`)},os(o).forEach(h=>{const{src:l,srcs:c}=h;let{data:u,format:f,loadParser:d}=h;const m=os(l||c).map(_=>typeof _=="string"?fT(_):Array.isArray(_)?_:[_]),g=this.getAlias(h);Array.isArray(g)?g.forEach(a):a(g);const b=[];m.forEach(_=>{_.forEach(M=>{let v={};if(typeof M!="object"){v.src=M;for(let S=0;S<this._parsers.length;S++){const y=this._parsers[S];if(y.test(M)){v=y.parse(M);break}}}else u=M.data??u,f=M.format??f,d=M.loadParser??d,v={...v,...M};if(!g)throw new Error(`[Resolver] alias is undefined for this asset: ${v.src}`);v=this.buildResolvedAsset(v,{aliases:g,data:u,format:f,loadParser:d}),b.push(v)})}),g.forEach(_=>{this._assetMap[_]=b})})}resolveBundle(e){const t=Xl(e);e=os(e);const s={};return e.forEach(n=>{const r=this._bundles[n];if(r){const o=this.resolve(r),a={};for(const h in o){const l=o[h];a[this._extractAssetIdFromBundle(n,h)]=l}s[n]=a}}),t?s[e[0]]:s}resolveUrl(e){const t=this.resolve(e);if(typeof e!="string"){const s={};for(const n in t)s[n]=t[n].src;return s}return t.src}resolve(e){const t=Xl(e);e=os(e);const s={};return e.forEach(n=>{if(!this._resolverHash[n])if(this._assetMap[n]){let r=this._assetMap[n];const o=r[0],a=this._getPreferredOrder(r);a==null||a.priority.forEach(h=>{a.params[h].forEach(l=>{const c=r.filter(u=>u[h]?u[h]===l:!1);c.length&&(r=c)})}),this._resolverHash[n]=r[0]??o}else this._resolverHash[n]=this.buildResolvedAsset({alias:[n],src:n},{});s[n]=this._resolverHash[n]}),t?s[e[0]]:s}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){const s=e[0],n=this._preferredOrder.find(r=>r.params.format.includes(s.format));if(n)return n}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}buildResolvedAsset(e,t){const{aliases:s,data:n,loadParser:r,format:o}=t;return(this._basePath||this._rootPath)&&(e.src=zt.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=s??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...n||{},...e.data},e.loadParser=r??e.loadParser,e.format=o??e.format??zt.extname(e.src).slice(1),e.srcs=e.src,e.name=e.alias,e}}class $T{constructor(){this._detections=[],this._initialized=!1,this.resolver=new YT,this.loader=new mT,this.cache=pr,this._backgroundLoader=new dT(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){var r,o;if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let a=e.manifest;typeof a=="string"&&(a=await this.load(a)),this.resolver.addManifest(a)}const t=((r=e.texturePreference)==null?void 0:r.resolution)??1,s=typeof t=="number"?[t]:t,n=await this._detectFormats({preferredFormats:(o=e.texturePreference)==null?void 0:o.format,skipDetections:e.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:n,resolution:s}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,s,n,r){this.resolver.add(e,t,s,n,r)}async load(e,t){this._initialized||await this.init();const s=Xl(e),n=os(e).map(a=>{if(typeof a!="string"){const h=this.resolver.getAlias(a);return h.some(l=>!this.resolver.hasKey(l))&&this.add(a),Array.isArray(h)?h[0]:h}return this.resolver.hasKey(a)||this.add({alias:a,src:a}),a}),r=this.resolver.resolve(n),o=await this._mapLoadToResolve(r,t);return s?o[n[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let s=!1;typeof e=="string"&&(s=!0,e=[e]);const n=this.resolver.resolveBundle(e),r={},o=Object.keys(n);let a=0,h=0;const l=()=>{t==null||t(++a/h)},c=o.map(u=>{const f=n[u];return h+=Object.keys(f).length,this._mapLoadToResolve(f,l).then(d=>{r[u]=d})});return await Promise.all(c),s?r[e[0]]:r}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);const t=this.resolver.resolveBundle(e);Object.values(t).forEach(s=>{this._backgroundLoader.add(Object.values(s))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return pr.get(e);const t={};for(let s=0;s<e.length;s++)t[s]=pr.get(e[s]);return t}async _mapLoadToResolve(e,t){const s=Object.values(e),n=Object.keys(e);this._backgroundLoader.active=!1;co
Line truncated
|
||||
uniform vec4 uColor;
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
@@ -938,7 +938,7 @@ void main(void)
|
||||
{
|
||||
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
|
||||
}
|
||||
`,FM=`attribute vec2 aVertexPosition;
|
||||
`,UM=`attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
uniform mat3 projectionMatrix;
|
||||
@@ -953,7 +953,7 @@ void main(void)
|
||||
|
||||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
||||
}
|
||||
`;class Yl extends fs{constructor(e,t){const s={uSampler:e,alpha:1,uTextureMatrix:Ut.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(s,t.uniforms),super(t.program||Us.from(FM,kM),s),this._colorDirty=!1,this.uvMatrix=new Qd(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new At(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;At.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class OM extends pa{constructor(e=et.EMPTY,t,s,n,r){const o=new of(t,s,n);o.getBuffer("aVertexPosition").static=!1;const a=new Yl(e);super(o,a,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class Wm{constructor(e,t,s){this.geometry=new Hs,this.indexBuffer=null,this.size=s,this.dynamicProperties=[],this.staticProperties=[];for(let n=0;n<e.length;++n){let r=e[n];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||je.FLOAT,offset:r.offset},t[n]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new Nt(i_(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];a.offset=t,t+=a.size,this.dynamicStride+=a.size}const s=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(s),this.dynamicDataUint32=new Uint32Array(s),this.dynamicBuffer=new Nt(this.dynamicData,!1,!1);let n=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];a.offset=n,n+=a.size,this.staticStride+=a.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new Nt(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===je.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===je.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,s){for(let n=0;n<this.dynamicProperties.length;n++){const r=this.dynamicProperties[n];r.uploadFunction(e,t,s,r.type===je.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,s){for(let n=0;n<this.staticProperties.length;n++){const r=this.staticProperties[n];r.uploadFunction(e,t,s,r.type===je.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var BM=`varying vec2 vTextureCoord;
|
||||
`;class jl extends ps{constructor(e,t){const s={uSampler:e,alpha:1,uTextureMatrix:Vt.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(s,t.uniforms),super(t.program||Vs.from(UM,NM),s),this._colorDirty=!1,this.uvMatrix=new sf(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new At(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;const e=this.texture.baseTexture.alphaMode;At.shared.setValue(this._tintColor).premultiply(this._alpha,e).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class VM extends ma{constructor(e=et.EMPTY,t,s,n,r){const o=new hf(t,s,n);o.getBuffer("aVertexPosition").static=!1;const a=new jl(e);super(o,a,null,r),this.autoUpdate=!0}get vertices(){return this.geometry.getBuffer("aVertexPosition").data}set vertices(e){this.geometry.getBuffer("aVertexPosition").data=e}_render(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),super._render(e)}}class Km{constructor(e,t,s){this.geometry=new Hs,this.indexBuffer=null,this.size=s,this.dynamicProperties=[],this.staticProperties=[];for(let n=0;n<e.length;++n){let r=e[n];r={attributeName:r.attributeName,size:r.size,uploadFunction:r.uploadFunction,type:r.type||je.FLOAT,offset:r.offset},t[n]?this.dynamicProperties.push(r):this.staticProperties.push(r)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){const e=this.geometry;let t=0;this.indexBuffer=new Nt(l_(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];a.offset=t,t+=a.size,this.dynamicStride+=a.size}const s=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(s),this.dynamicDataUint32=new Uint32Array(s),this.dynamicBuffer=new Nt(this.dynamicData,!1,!1);let n=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];a.offset=n,n+=a.size,this.staticStride+=a.size}const r=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(r),this.staticDataUint32=new Uint32Array(r),this.staticBuffer=new Nt(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){const a=this.dynamicProperties[o];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===je.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){const a=this.staticProperties[o];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===je.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,s){for(let n=0;n<this.dynamicProperties.length;n++){const r=this.dynamicProperties[n];r.uploadFunction(e,t,s,r.type===je.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,r.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,s){for(let n=0;n<this.staticProperties.length;n++){const r=this.staticProperties[n];r.uploadFunction(e,t,s,r.type===je.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,r.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}}var XM=`varying vec2 vTextureCoord;
|
||||
varying vec4 vColor;
|
||||
|
||||
uniform sampler2D uSampler;
|
||||
@@ -961,7 +961,7 @@ uniform sampler2D uSampler;
|
||||
void main(void){
|
||||
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
|
||||
gl_FragColor = color;
|
||||
}`,LM=`attribute vec2 aVertexPosition;
|
||||
}`,YM=`attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
attribute vec4 aColor;
|
||||
|
||||
@@ -986,8 +986,8 @@ void main(void){
|
||||
vTextureCoord = aTextureCoord;
|
||||
vColor = aColor * uColor;
|
||||
}
|
||||
`;class Qv extends Ih{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Ut,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:je.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=fs.from(LM,BM,{}),this.state=zs.for2d()}render(e){const t=e.children,s=e._maxSize,n=e._batchSize,r=this.renderer;let o=t.length;if(o===0)return;o>s&&!e.autoResize&&(o=s);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=Z0(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=At.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let f=!1;for(let d=0,m=0;d<o;d+=n,m+=1){let g=o-d;g>n&&(g=n),m>=a.length&&a.push(this._generateOneMoreBuffer(e));const x=a[m];x.uploadDynamic(t,d,g);const _=e._bufferUpdateIDs[m]||0;f=f||x._updateID<_,f&&(x._updateID=e._updateID,x.uploadStatic(t,d,g)),r.geometry.bind(x.geometry),c.drawElements(c.TRIANGLES,g*6,c.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],s=e._maxSize,n=e._batchSize,r=e._properties;for(let o=0;o<s;o+=n)t.push(new Wm(this.properties,r,n));return t}_generateOneMoreBuffer(e){const t=e._batchSize,s=e._properties;return new Wm(this.properties,s,t)}uploadVertices(e,t,s,n,r,o){let a=0,h=0,l=0,c=0;for(let u=0;u<s;++u){const f=e[t+u],d=f._texture,m=f.scale.x,g=f.scale.y,x=d.trim,_=d.orig;x?(h=x.x-f.anchor.x*_.width,a=h+x.width,c=x.y-f.anchor.y*_.height,l=c+x.height):(a=_.width*(1-f.anchor.x),h=_.width*-f.anchor.x,l=_.height*(1-f.anchor.y),c=_.height*-f.anchor.y),n[o]=h*m,n[o+1]=c*g,n[o+r]=a*m,n[o+r+1]=c*g,n[o+r*2]=a*m,n[o+r*2+1]=l*g,n[o+r*3]=h*m,n[o+r*3+1]=l*g,o+=r*4}}uploadPosition(e,t,s,n,r,o){for(let a=0;a<s;a++){const h=e[t+a].position;n[o]=h.x,n[o+1]=h.y,n[o+r]=h.x,n[o+r+1]=h.y,n[o+r*2]=h.x,n[o+r*2+1]=h.y,n[o+r*3]=h.x,n[o+r*3+1]=h.y,o+=r*4}}uploadRotation(e,t,s,n,r,o){for(let a=0;a<s;a++){const h=e[t+a].rotation;n[o]=h,n[o+r]=h,n[o+r*2]=h,n[o+r*3]=h,o+=r*4}}uploadUvs(e,t,s,n,r,o){for(let a=0;a<s;++a){const h=e[t+a]._texture._uvs;h?(n[o]=h.x0,n[o+1]=h.y0,n[o+r]=h.x1,n[o+r+1]=h.y1,n[o+r*2]=h.x2,n[o+r*2+1]=h.y2,n[o+r*3]=h.x3,n[o+r*3+1]=h.y3,o+=r*4):(n[o]=0,n[o+1]=0,n[o+r]=0,n[o+r+1]=0,n[o+r*2]=0,n[o+r*2+1]=0,n[o+r*3]=0,n[o+r*3+1]=0,o+=r*4)}}uploadTint(e,t,s,n,r,o){for(let a=0;a<s;++a){const h=e[t+a],l=At.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);n[o]=l,n[o+r]=l,n[o+r*2]=l,n[o+r*3]=l,o+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}Qv.extension={name:"particle",type:Oe.RendererPlugin};He.add(Qv);var kh=(i=>(i[i.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",i[i.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",i))(kh||{});const za={willReadFrequently:!0},Es=class ze{static get experimentalLetterSpacingSupported(){let e=ze._experimentalLetterSpacingSupported;if(e!==void 0){const t=Ve.ADAPTER.getCanvasRenderingContext2D().prototype;e=ze._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,s,n,r,o,a,h,l){this.text=e,this.style=t,this.width=s,this.height=n,this.lines=r,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,s,n=ze._canvas){s=s??t.wordWrap;const r=t.toFontString(),o=ze.measureFont(r);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const a=n.getContext("2d",za);a.font=r;const h=(s?ze.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let m=0;m<h.length;m++){const g=ze._measureText(h[m],t.letterSpacing,a);l[m]=g,c=Math.max(c,g)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const f=t.lineHeight||o.fontSize+t.strokeThickness;let d=Math.max(f,o.fontSize+t.strokeThickness*2)+t.leading+(h.length-1)*(f+t.leading);return t.dropShadow&&(d+=t.dropShadowDistance),new ze(e,t,u,d,h,l,f+t.leading,c,o)}static _measureText(e,t,s){let n=!1;ze.experimentalLetterSpacingSupported&&(ze.experimentalLetterSpacing?(s.letterSpacing=`${t}px`,s.textLetterSpacing=`${t}px`,n=!0):(s.letterSpacing="0px",s.textLetterSpacing="0px"));let r=s.measureText(e).width;return r>0&&(n?r-=t:r+=(ze.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,s=ze._canvas){const n=s.getContext("2d",za);let r=0,o="",a="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=ze.collapseSpaces(c),f=ze.collapseNewlines(c);let d=!u;const m=t.wordWrapWidth+l,
Line truncated
|
||||
`:e,e}static getFromCache(e,t,s,n){let r=s[e];return typeof r!="number"&&(r=ze._measureText(e,t,n)+t,s[e]=r),r}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 s=e[t];if(!ze.isBreakingSpace(s))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ze._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ze._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let s="";if(typeof e!="string")return t;for(let n=0;n<e.length;n++){const r=e[n],o=e[n+1];if(ze.isBreakingSpace(r,o)||ze.isNewline(r)){s!==""&&(t.push(s),s=""),t.push(r);continue}s+=r}return s!==""&&t.push(s),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,s,n,r){return!0}static wordWrapSplit(e){return ze.graphemeSegmenter(e)}static measureFont(e){if(ze._fonts[e])return ze._fonts[e];const t={ascent:0,descent:0,fontSize:0},s=ze._canvas,n=ze._context;n.font=e;const r=ze.METRICS_STRING+ze.BASELINE_SYMBOL,o=Math.ceil(n.measureText(r).width);let a=Math.ceil(n.measureText(ze.BASELINE_SYMBOL).width);const h=Math.ceil(ze.HEIGHT_MULTIPLIER*a);if(a=a*ze.BASELINE_MULTIPLIER|0,o===0||h===0)return ze._fonts[e]=t,t;s.width=o,s.height=h,n.fillStyle="#f00",n.fillRect(0,0,o,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(r,0,a);const l=n.getImageData(0,0,o,h).data,c=l.length,u=o*4;let f=0,d=0,m=!1;for(f=0;f<a;++f){for(let g=0;g<u;g+=4)if(l[d+g]!==255){m=!0;break}if(!m)d+=u;else break}for(t.ascent=a-f,d=c-u,m=!1,f=h;f>a;--f){for(let g=0;g<u;g+=4)if(l[d+g]!==255){m=!0;break}if(!m)d-=u;else break}return t.descent=f-a,t.fontSize=t.ascent+t.descent,ze._fonts[e]=t,t}static clearMetrics(e=""){e?delete ze._fonts[e]:ze._fonts={}}static get _canvas(){var e;if(!ze.__canvas){let t;try{const s=new OffscreenCanvas(0,0);if((e=s.getContext("2d",za))!=null&&e.measureText)return ze.__canvas=s,s;t=Ve.ADAPTER.createCanvas()}catch{t=Ve.ADAPTER.createCanvas()}t.width=t.height=10,ze.__canvas=t}return ze.__canvas}static get _context(){return ze.__context||(ze.__context=ze._canvas.getContext("2d",za)),ze.__context}};Es.METRICS_STRING="|ÉqÅ",Es.BASELINE_SYMBOL="M",Es.BASELINE_MULTIPLIER=1.4,Es.HEIGHT_MULTIPLIER=2,Es.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return e=>[...i.segment(e)].map(t=>t.segment)}return i=>[...i]})(),Es.experimentalLetterSpacing=!1,Es._fonts={},Es._newlines=[10,13],Es._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Ln=Es;const DM=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ey=class Wo{constructor(e){this.styleID=0,this.reset(),mu(this,e,e)}clone(){const e={};return mu(e,this,Wo.defaultStyle),new Wo(e)}reset(){mu(this,Wo.defaultStyle,Wo.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=pu(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=pu(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){NM(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett
Line truncated
|
||||
`;class iy extends kh{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new Vt,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:je.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=ps.from(YM,XM,{}),this.state=zs.for2d()}render(e){const t=e.children,s=e._maxSize,n=e._batchSize,r=this.renderer;let o=t.length;if(o===0)return;o>s&&!e.autoResize&&(o=s);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));const h=t[0]._texture.baseTexture,l=h.alphaMode>0;this.state.blendMode=ev(e.blendMode,l),r.state.set(this.state);const c=r.gl,u=e.worldTransform.copyTo(this.tempMatrix);u.prepend(r.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=u.toArray(!0),this.shader.uniforms.uColor=At.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,l).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);let f=!1;for(let d=0,m=0;d<o;d+=n,m+=1){let g=o-d;g>n&&(g=n),m>=a.length&&a.push(this._generateOneMoreBuffer(e));const b=a[m];b.uploadDynamic(t,d,g);const _=e._bufferUpdateIDs[m]||0;f=f||b._updateID<_,f&&(b._updateID=e._updateID,b.uploadStatic(t,d,g)),r.geometry.bind(b.geometry),c.drawElements(c.TRIANGLES,g*6,c.UNSIGNED_SHORT,0)}}generateBuffers(e){const t=[],s=e._maxSize,n=e._batchSize,r=e._properties;for(let o=0;o<s;o+=n)t.push(new Km(this.properties,r,n));return t}_generateOneMoreBuffer(e){const t=e._batchSize,s=e._properties;return new Km(this.properties,s,t)}uploadVertices(e,t,s,n,r,o){let a=0,h=0,l=0,c=0;for(let u=0;u<s;++u){const f=e[t+u],d=f._texture,m=f.scale.x,g=f.scale.y,b=d.trim,_=d.orig;b?(h=b.x-f.anchor.x*_.width,a=h+b.width,c=b.y-f.anchor.y*_.height,l=c+b.height):(a=_.width*(1-f.anchor.x),h=_.width*-f.anchor.x,l=_.height*(1-f.anchor.y),c=_.height*-f.anchor.y),n[o]=h*m,n[o+1]=c*g,n[o+r]=a*m,n[o+r+1]=c*g,n[o+r*2]=a*m,n[o+r*2+1]=l*g,n[o+r*3]=h*m,n[o+r*3+1]=l*g,o+=r*4}}uploadPosition(e,t,s,n,r,o){for(let a=0;a<s;a++){const h=e[t+a].position;n[o]=h.x,n[o+1]=h.y,n[o+r]=h.x,n[o+r+1]=h.y,n[o+r*2]=h.x,n[o+r*2+1]=h.y,n[o+r*3]=h.x,n[o+r*3+1]=h.y,o+=r*4}}uploadRotation(e,t,s,n,r,o){for(let a=0;a<s;a++){const h=e[t+a].rotation;n[o]=h,n[o+r]=h,n[o+r*2]=h,n[o+r*3]=h,o+=r*4}}uploadUvs(e,t,s,n,r,o){for(let a=0;a<s;++a){const h=e[t+a]._texture._uvs;h?(n[o]=h.x0,n[o+1]=h.y0,n[o+r]=h.x1,n[o+r+1]=h.y1,n[o+r*2]=h.x2,n[o+r*2+1]=h.y2,n[o+r*3]=h.x3,n[o+r*3+1]=h.y3,o+=r*4):(n[o]=0,n[o+1]=0,n[o+r]=0,n[o+r+1]=0,n[o+r*2]=0,n[o+r*2+1]=0,n[o+r*3]=0,n[o+r*3+1]=0,o+=r*4)}}uploadTint(e,t,s,n,r,o){for(let a=0;a<s;++a){const h=e[t+a],l=At.shared.setValue(h._tintRGB).toPremultiplied(h.alpha,h.texture.baseTexture.alphaMode>0);n[o]=l,n[o+r]=l,n[o+r*2]=l,n[o+r*3]=l,o+=r*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}}iy.extension={name:"particle",type:Oe.RendererPlugin};He.add(iy);var Bh=(i=>(i[i.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",i[i.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",i))(Bh||{});const Ka={willReadFrequently:!0},As=class ze{static get experimentalLetterSpacingSupported(){let e=ze._experimentalLetterSpacingSupported;if(e!==void 0){const t=Ve.ADAPTER.getCanvasRenderingContext2D().prototype;e=ze._experimentalLetterSpacingSupported="letterSpacing"in t||"textLetterSpacing"in t}return e}constructor(e,t,s,n,r,o,a,h,l){this.text=e,this.style=t,this.width=s,this.height=n,this.lines=r,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=h,this.fontProperties=l}static measureText(e,t,s,n=ze._canvas){s=s??t.wordWrap;const r=t.toFontString(),o=ze.measureFont(r);o.fontSize===0&&(o.fontSize=t.fontSize,o.ascent=t.fontSize);const a=n.getContext("2d",Ka);a.font=r;const h=(s?ze.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),l=new Array(h.length);let c=0;for(let m=0;m<h.length;m++){const g=ze._measureText(h[m],t.letterSpacing,a);l[m]=g,c=Math.max(c,g)}let u=c+t.strokeThickness;t.dropShadow&&(u+=t.dropShadowDistance);const f=t.lineHeight||o.fontSize+t.strokeThickness;let d=Math.max(f,o.fontSize+t.strokeThickness*2)+t.leading+(h.length-1)*(f+t.leading);return t.dropShadow&&(d+=t.dropShadowDistance),new ze(e,t,u,d,h,l,f+t.leading,c,o)}static _measureText(e,t,s){let n=!1;ze.experimentalLetterSpacingSupported&&(ze.experimentalLetterSpacing?(s.letterSpacing=`${t}px`,s.textLetterSpacing=`${t}px`,n=!0):(s.letterSpacing="0px",s.textLetterSpacing="0px"));let r=s.measureText(e).width;return r>0&&(n?r-=t:r+=(ze.graphemeSegmenter(e).length-1)*t),r}static wordWrap(e,t,s=ze._canvas){const n=s.getContext("2d",Ka);let r=0,o="",a="";const h=Object.create(null),{letterSpacing:l,whiteSpace:c}=t,u=ze.collapseSpaces(c),f=ze.collapseNewlines(c);let d=!u;const m=t.wordWrapWidth+l,
Line truncated
|
||||
`:e,e}static getFromCache(e,t,s,n){let r=s[e];return typeof r!="number"&&(r=ze._measureText(e,t,n)+t,s[e]=r),r}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 s=e[t];if(!ze.isBreakingSpace(s))break;e=e.slice(0,-1)}return e}static isNewline(e){return typeof e!="string"?!1:ze._newlines.includes(e.charCodeAt(0))}static isBreakingSpace(e,t){return typeof e!="string"?!1:ze._breakingSpaces.includes(e.charCodeAt(0))}static tokenize(e){const t=[];let s="";if(typeof e!="string")return t;for(let n=0;n<e.length;n++){const r=e[n],o=e[n+1];if(ze.isBreakingSpace(r,o)||ze.isNewline(r)){s!==""&&(t.push(s),s=""),t.push(r);continue}s+=r}return s!==""&&t.push(s),t}static canBreakWords(e,t){return t}static canBreakChars(e,t,s,n,r){return!0}static wordWrapSplit(e){return ze.graphemeSegmenter(e)}static measureFont(e){if(ze._fonts[e])return ze._fonts[e];const t={ascent:0,descent:0,fontSize:0},s=ze._canvas,n=ze._context;n.font=e;const r=ze.METRICS_STRING+ze.BASELINE_SYMBOL,o=Math.ceil(n.measureText(r).width);let a=Math.ceil(n.measureText(ze.BASELINE_SYMBOL).width);const h=Math.ceil(ze.HEIGHT_MULTIPLIER*a);if(a=a*ze.BASELINE_MULTIPLIER|0,o===0||h===0)return ze._fonts[e]=t,t;s.width=o,s.height=h,n.fillStyle="#f00",n.fillRect(0,0,o,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(r,0,a);const l=n.getImageData(0,0,o,h).data,c=l.length,u=o*4;let f=0,d=0,m=!1;for(f=0;f<a;++f){for(let g=0;g<u;g+=4)if(l[d+g]!==255){m=!0;break}if(!m)d+=u;else break}for(t.ascent=a-f,d=c-u,m=!1,f=h;f>a;--f){for(let g=0;g<u;g+=4)if(l[d+g]!==255){m=!0;break}if(!m)d-=u;else break}return t.descent=f-a,t.fontSize=t.ascent+t.descent,ze._fonts[e]=t,t}static clearMetrics(e=""){e?delete ze._fonts[e]:ze._fonts={}}static get _canvas(){var e;if(!ze.__canvas){let t;try{const s=new OffscreenCanvas(0,0);if((e=s.getContext("2d",Ka))!=null&&e.measureText)return ze.__canvas=s,s;t=Ve.ADAPTER.createCanvas()}catch{t=Ve.ADAPTER.createCanvas()}t.width=t.height=10,ze.__canvas=t}return ze.__canvas}static get _context(){return ze.__context||(ze.__context=ze._canvas.getContext("2d",Ka)),ze.__context}};As.METRICS_STRING="|ÉqÅ",As.BASELINE_SYMBOL="M",As.BASELINE_MULTIPLIER=1.4,As.HEIGHT_MULTIPLIER=2,As.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return e=>[...i.segment(e)].map(t=>t.segment)}return i=>[...i]})(),As.experimentalLetterSpacing=!1,As._fonts={},As._newlines=[10,13],As._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];let Ln=As;const $M=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],sy=class zo{constructor(e){this.styleID=0,this.reset(),vu(this,e,e)}clone(){const e={};return vu(e,this,zo.defaultStyle),new zo(e)}reset(){vu(this,zo.defaultStyle,zo.defaultStyle)}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(e){const t=gu(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)}get fill(){return this._fill}set fill(e){const t=gu(e);this._fill!==t&&(this._fill=t,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(e){GM(this._fillGradientStops,e)||(this._fillGradientStops=e,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(e){this.fontFamily!==e&&(this._fontFamily=e,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(e){this._fontVariant!==e&&(this._fontVariant=e,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.styleID++)}get letterSpacing(){return this._lett
Line truncated
|
||||
#define SHADER_NAME Tiling-Sprite-100
|
||||
|
||||
precision lowp float;
|
||||
@@ -1013,7 +1013,7 @@ void main(void)
|
||||
|
||||
fragmentColor = texSample * uColor;
|
||||
}
|
||||
`,ZM=`#version 300 es
|
||||
`,sE=`#version 300 es
|
||||
#define SHADER_NAME Tiling-Sprite-300
|
||||
|
||||
precision lowp float;
|
||||
@@ -1033,7 +1033,7 @@ void main(void)
|
||||
|
||||
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
|
||||
}
|
||||
`,JM=`#version 100
|
||||
`,nE=`#version 100
|
||||
#ifdef GL_EXT_shader_texture_lod
|
||||
#extension GL_EXT_shader_texture_lod : enable
|
||||
#endif
|
||||
@@ -1066,7 +1066,7 @@ void main(void)
|
||||
|
||||
gl_FragColor = texSample * uColor;
|
||||
}
|
||||
`,zm=`#version 100
|
||||
`,Zm=`#version 100
|
||||
#define SHADER_NAME Tiling-Sprite-100
|
||||
|
||||
precision lowp float;
|
||||
@@ -1086,7 +1086,7 @@ void main(void)
|
||||
|
||||
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
|
||||
}
|
||||
`,QM=`#version 100
|
||||
`,rE=`#version 100
|
||||
#define SHADER_NAME Tiling-Sprite-Simple-100
|
||||
|
||||
precision lowp float;
|
||||
@@ -1101,7 +1101,7 @@ void main(void)
|
||||
vec4 texSample = texture2D(uSampler, vTextureCoord);
|
||||
gl_FragColor = texSample * uColor;
|
||||
}
|
||||
`;const qa=new Ut;class oy extends Ih{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new uv,this.state=zs.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=fs.from(zm,QM,t),this.shader=e.context.webGLVersion>1?fs.from(ZM,KM,t):fs.from(zm,JM,t)}render(e){const t=this.renderer,s=this.quad;let n=s.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;n=s.uvs,n[0]=n[6]=-r,n[1]=n[3]=-o,n[2]=n[4]=1-r,n[5]=n[7]=1-o,s.invalidate();const a=e._texture,h=a.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let f=h.isPowerOfTwo&&a.frame.width===h.width&&a.frame.height===h.height;f&&(h._glTextures[t.CONTEXT_UID]?f=h.wrapMode!==cs.CLAMP:h.wrapMode===cs.CLAMP&&(h.wrapMode=cs.REPEAT));const d=f?this.simpleShader:this.shader,m=a.width,g=a.height,x=e._width,_=e._height;qa.set(c.a*m/x,c.b*m/_,c.c*g/x,c.d*g/_,c.tx/x,c.ty/_),qa.invert(),f?qa.prepend(u.mapCoord):(d.uniforms.uMapCoord=u.mapCoord.toArray(!0),d.uniforms.uClampFrame=u.uClampFrame,d.uniforms.uClampOffset=u.uClampOffset),d.uniforms.uTransform=qa.toArray(!0),d.uniforms.uColor=At.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(d.uniforms.uColor),d.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),d.uniforms.uSampler=a,t.shader.bind(d),t.geometry.bind(s),this.state.blendMode=Z0(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}oy.extension={name:"tilingSprite",type:Oe.RendererPlugin};He.add(oy);const ay=class zo{constructor(e,t,s){this.linkedSheets=[],(e instanceof st||e instanceof et)&&(e={texture:e,data:t,resolutionFilename:s});const{texture:n,data:r,resolutionFilename:o=null,cachePrefix:a=""}=e;this.cachePrefix=a,this._texture=n instanceof et?n:null,this.baseTexture=n instanceof st?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(o||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let s=_n(e,null);return s===null&&(s=typeof t=="number"?t:parseFloat(t??"1")),s!==1&&this.baseTexture.setResolution(s),s}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=zo.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const s=zo.BATCH_SIZE;for(;t-e<s&&t<this._frameKeys.length;){const n=this._frameKeys[t],r=this._frames[n],o=r.frame;if(o){let a=null,h=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,c=new lt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?a=new lt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):a=new lt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(h=new lt(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[n]=new et(this.baseTexture,a,c,h,r.rotated?2:0,r.anchor,r.borders),et.addToCache(this.textures[n],this.cachePrefix+n.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let s=0;s<e[t].length;s++){const n=e[t][s];this.animations[t].push(this.textures[n])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*zo.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*zo.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const s in this.textures)this.textures[s].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};ay.BATCH_SIZE=1e3;let qm=ay;const eE=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function ly(i,e,t){const s={};if(i.forEach(n=>{s[n]=e}),Object.keys(e.textures).forEach(n=>{s[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=zt.dirname(i[0]);e.linkedSheets.forEach((r,o)=>{Object.assign(s,ly([`${n}/${e.data.meta.related_multi_packs[o]}`],r,!0))})}return s}const tE={extension:Oe.Asset,cache:{test:i=>i instanceof qm,getCacheableAssets:(i,e)=>ly(i,e,!1)},resolver:{test:i=>{const e=i.split("?")[0].split("."),t=e.pop(),s=e.pop();return t==="json"&&eE.includes(s)},parse:i=>{var t;const
Line truncated
|
||||
`;const Za=new Vt;class hy extends kh{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new pv,this.state=zs.for2d()}contextChange(){const e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=ps.from(Zm,rE,t),this.shader=e.context.webGLVersion>1?ps.from(sE,iE,t):ps.from(Zm,nE,t)}render(e){const t=this.renderer,s=this.quad;let n=s.vertices;n[0]=n[6]=e._width*-e.anchor.x,n[1]=n[3]=e._height*-e.anchor.y,n[2]=n[4]=e._width*(1-e.anchor.x),n[5]=n[7]=e._height*(1-e.anchor.y);const r=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;n=s.uvs,n[0]=n[6]=-r,n[1]=n[3]=-o,n[2]=n[4]=1-r,n[5]=n[7]=1-o,s.invalidate();const a=e._texture,h=a.baseTexture,l=h.alphaMode>0,c=e.tileTransform.localTransform,u=e.uvMatrix;let f=h.isPowerOfTwo&&a.frame.width===h.width&&a.frame.height===h.height;f&&(h._glTextures[t.CONTEXT_UID]?f=h.wrapMode!==us.CLAMP:h.wrapMode===us.CLAMP&&(h.wrapMode=us.REPEAT));const d=f?this.simpleShader:this.shader,m=a.width,g=a.height,b=e._width,_=e._height;Za.set(c.a*m/b,c.b*m/_,c.c*g/b,c.d*g/_,c.tx/b,c.ty/_),Za.invert(),f?Za.prepend(u.mapCoord):(d.uniforms.uMapCoord=u.mapCoord.toArray(!0),d.uniforms.uClampFrame=u.uClampFrame,d.uniforms.uClampOffset=u.uClampOffset),d.uniforms.uTransform=Za.toArray(!0),d.uniforms.uColor=At.shared.setValue(e.tint).premultiply(e.worldAlpha,l).toArray(d.uniforms.uColor),d.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),d.uniforms.uSampler=a,t.shader.bind(d),t.geometry.bind(s),this.state.blendMode=ev(e.blendMode,l),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}hy.extension={name:"tilingSprite",type:Oe.RendererPlugin};He.add(hy);const cy=class qo{constructor(e,t,s){this.linkedSheets=[],(e instanceof st||e instanceof et)&&(e={texture:e,data:t,resolutionFilename:s});const{texture:n,data:r,resolutionFilename:o=null,cachePrefix:a=""}=e;this.cachePrefix=a,this._texture=n instanceof et?n:null,this.baseTexture=n instanceof st?n:this._texture.baseTexture,this.textures={},this.animations={},this.data=r;const h=this.baseTexture.resource;this.resolution=this._updateResolution(o||(h?h.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(e=null){const{scale:t}=this.data.meta;let s=_n(e,null);return s===null&&(s=typeof t=="number"?t:parseFloat(t??"1")),s!==1&&this.baseTexture.setResolution(s),s}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=qo.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(e){let t=e;const s=qo.BATCH_SIZE;for(;t-e<s&&t<this._frameKeys.length;){const n=this._frameKeys[t],r=this._frames[n],o=r.frame;if(o){let a=null,h=null;const l=r.trimmed!==!1&&r.sourceSize?r.sourceSize:r.frame,c=new lt(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);r.rotated?a=new lt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.h)/this.resolution,Math.floor(o.w)/this.resolution):a=new lt(Math.floor(o.x)/this.resolution,Math.floor(o.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution),r.trimmed!==!1&&r.spriteSourceSize&&(h=new lt(Math.floor(r.spriteSourceSize.x)/this.resolution,Math.floor(r.spriteSourceSize.y)/this.resolution,Math.floor(o.w)/this.resolution,Math.floor(o.h)/this.resolution)),this.textures[n]=new et(this.baseTexture,a,c,h,r.rotated?2:0,r.anchor,r.borders),et.addToCache(this.textures[n],this.cachePrefix+n.toString())}t++}}_processAnimations(){const e=this.data.animations||{};for(const t in e){this.animations[t]=[];for(let s=0;s<e[t].length;s++){const n=e[t][s];this.animations[t].push(this.textures[n])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*qo.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*qo.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var t;for(const s in this.textures)this.textures[s].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((t=this._texture)==null||t.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}};cy.BATCH_SIZE=1e3;let Jm=cy;const oE=["jpg","png","jpeg","avif","webp","s3tc","s3tc_sRGB","etc","etc1","pvrtc","atc","astc","bptc"];function uy(i,e,t){const s={};if(i.forEach(n=>{s[n]=e}),Object.keys(e.textures).forEach(n=>{s[`${e.cachePrefix}${n}`]=e.textures[n]}),!t){const n=zt.dirname(i[0]);e.linkedSheets.forEach((r,o)=>{Object.assign(s,uy([`${n}/${e.data.meta.related_multi_packs[o]}`],r,!0))})}return s}const aE={extension:Oe.Asset,cache:{test:i=>i instanceof Jm,getCacheableAssets:(i,e)=>uy(i,e,!1)},resolver:{test:i=>{const e=i.split("?")[0].split("."),t=e.pop(),s=e.pop();return t==="json"&&oE.includes(s)},parse:i=>{var t;const
Line truncated
|
||||
varying vec2 vTextureCoord;\r
|
||||
uniform sampler2D uSampler;\r
|
||||
\r
|
||||
@@ -1139,7 +1139,7 @@ void main(void) {\r
|
||||
// NPM Textures, NPM outputs\r
|
||||
gl_FragColor = vec4(uColor.rgb, coverage);\r
|
||||
}\r
|
||||
`,aE=`// Mesh material default fragment\r
|
||||
`,fE=`// Mesh material default fragment\r
|
||||
attribute vec2 aVertexPosition;\r
|
||||
attribute vec2 aTextureCoord;\r
|
||||
\r
|
||||
@@ -1155,17 +1155,17 @@ void main(void)\r
|
||||
\r
|
||||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
|
||||
}\r
|
||||
`;const Km=[],Zm=[],Jm=[],lE=class cy extends gi{constructor(e,t={}){super();const{align:s,tint:n,maxWidth:r,letterSpacing:o,fontName:a,fontSize:h}=Object.assign({},cy.styleDefaults,t);if(!Fn.available[a])throw new Error(`Missing BitmapFont "${a}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=s,this._tintColor=new At(n),this._font=void 0,this._fontName=a,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new fn(()=>{this.dirty=!0},this,0,0),this._roundPixels=Ve.ROUND_PIXELS,this.dirty=!0,this._resolution=Ve.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var k;const e=Fn.available[this._fontName],t=this.fontSize,s=t/e.size,n=new bt,r=[],o=[],a=[],h=this._text.replace(/(?:\r\n|\r)/g,`
|
||||
`)||" ",l=hy(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Km:Zm;let f=null,d=0,m=0,g=0,x=-1,_=0,T=0,v=0,S=0;for(let F=0;F<l.length;F++){const D=l[F],N=vl(D);if(/(?:\s)/.test(D)&&(x=F,_=d,S++),D==="\r"||D===`
|
||||
`){o.push(d),a.push(-1),m=Math.max(m,d),++g,++T,n.x=0,n.y+=e.lineHeight,f=null,S=0;continue}const j=e.chars[N];if(!j)continue;f&&j.kerning[f]&&(n.x+=j.kerning[f]);const O=Jm.pop()||{texture:et.EMPTY,line:0,charCode:0,prevSpaces:0,position:new bt};O.texture=j.texture,O.line=g,O.charCode=N,O.position.x=Math.round(n.x+j.xOffset+this._letterSpacing/2),O.position.y=Math.round(n.y+j.yOffset),O.prevSpaces=S,r.push(O),d=O.position.x+Math.max(j.xAdvance-j.xOffset,j.texture.orig.width),n.x+=j.xAdvance+this._letterSpacing,v=Math.max(v,j.yOffset+j.texture.height),f=N,x!==-1&&c>0&&n.x>c&&(++T,ao(r,1+x-T,1+F-x),F=x,x=-1,o.push(_),a.push(r.length>0?r[r.length-1].prevSpaces:0),m=Math.max(m,_),g++,n.x=0,n.y+=e.lineHeight,f=null,S=0)}const y=l[l.length-1];y!=="\r"&&y!==`
|
||||
`&&(/(?:\s)/.test(y)&&(d=_),o.push(d),m=Math.max(m,d),a.push(-1));const I=[];for(let F=0;F<=g;F++){let D=0;this._align==="right"?D=m-o[F]:this._align==="center"?D=(m-o[F])/2:this._align==="justify"&&(D=a[F]<0?0:(m-o[F])/a[F]),I.push(D)}const E=r.length,C={},R=[],B=this._activePagesMeshData;u.push(...B);for(let F=0;F<E;F++){const D=r[F].texture,N=D.baseTexture.uid;if(!C[N]){let j=u.pop();if(!j){const L=new of;let P,X;e.distanceFieldType==="none"?(P=new Yl(et.EMPTY),X=Qe.NORMAL):(P=new Yl(et.EMPTY,{program:Us.from(aE,oE),uniforms:{uFWidth:0}}),X=Qe.NORMAL_NPM);const U=new pa(L,P);U.blendMode=X,j={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:U,vertices:null,uvs:null,indices:null}}j.index=0,j.indexCount=0,j.vertexCount=0,j.uvsCount=0,j.total=0;const{_textureCache:O}=this;O[N]=O[N]||new et(D.baseTexture),j.mesh.texture=O[N],j.mesh.tint=this._tintColor.value,R.push(j),C[N]=j}C[N].total++}for(let F=0;F<B.length;F++)R.includes(B[F])||this.removeChild(B[F].mesh);for(let F=0;F<R.length;F++)R[F].mesh.parent!==this&&this.addChild(R[F].mesh);this._activePagesMeshData=R;for(const F in C){const D=C[F],N=D.total;if(!(((k=D.indices)==null?void 0:k.length)>6*N)||D.vertices.length<pa.BATCHABLE_SIZE*2)D.vertices=new Float32Array(8*N),D.uvs=new Float32Array(8*N),D.indices=new Uint16Array(6*N);else{const j=D.total,O=D.vertices;for(let L=j*4*2;L<O.length;L++)O[L]=0}D.mesh.size=6*N}for(let F=0;F<E;F++){const D=r[F];let N=D.position.x+I[D.line]*(this._align==="justify"?D.prevSpaces:1);this._roundPixels&&(N=Math.round(N));const j=N*s,O=D.position.y*s,L=D.texture,P=C[L.baseTexture.uid],X=L.frame,U=L._uvs,Y=P.index++;P.indices[Y*6+0]=0+Y*4,P.indices[Y*6+1]=1+Y*4,P.indices[Y*6+2]=2+Y*4,P.indices[Y*6+3]=0+Y*4,P.indices[Y*6+4]=2+Y*4,P.indices[Y*6+5]=3+Y*4,P.vertices[Y*8+0]=j,P.vertices[Y*8+1]=O,P.vertices[Y*8+2]=j+X.width*s,P.vertices[Y*8+3]=O,P.vertices[Y*8+4]=j+X.width*s,P.vertices[Y*8+5]=O+X.height*s,P.vertices[Y*8+6]=j,P.vertices[Y*8+7]=O+X.height*s,P.uvs[Y*8+0]=U.x0,P.uvs[Y*8+1]=U.y0,P.uvs[Y*8+2]=U.x1,P.uvs[Y*8+3]=U.y1,P.uvs[Y*8+4]=U.x2,P.uvs[Y*8+5]=U.y2,P.uvs[Y*8+6]=U.x3,P.uvs[Y*8+7]=U.y3}this._textWidth=m*s,this._textHeight=(n.y+e.lineHeight)*s;for(const F in C){const D=C[F];if(this.anchor.x!==0||this.anchor.y!==0){let L=0;const P=this._textWidth*this.anchor.x,X=this._textHeight*this.anchor.y;for(let U=0;U<D.total;U++)D.vertices[L++]-=P,D.vertices[L++]-=X,D.vertices[L++]-=P,D.vertices[L++]-=X,D.vertices[L++]-=P,D.vertices[L++]-=X,D.vertices[L++]-=P,D.vertices[L++]-=X}this._maxLineHeight=v*s;const N=D.mesh.geometry.getBuffer("aVertexPosition"),j=D.mesh.geometry.getBuffer("aTextureCoord"),O=D.mesh.geometry.getIndex();N.data=D.vertices,j.data=D.uvs,O.data=D.indices,N.update(),j.update(),O.update()}for(let F=0;F<r.length;F++)Jm.push(r[F]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:s,size:n}=Fn.available[this._fontName];if(s!=="none"){const{a:r,b:o,c:a,d:h}=this.worldTransform,l=Math.sqrt(r*r+o*o),c=Math.sqrt(a*a+h*h),u=(Math.abs(l)+Math.abs(c))/2,f=this.fontSize/n,d=e._view.resolution;for(const m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=u*t*f*d}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=Fn.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!Fn.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??Fn.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res
Line truncated
|
||||
`;const Qm=[],eg=[],tg=[],pE=class fy extends gi{constructor(e,t={}){super();const{align:s,tint:n,maxWidth:r,letterSpacing:o,fontName:a,fontSize:h}=Object.assign({},fy.styleDefaults,t);if(!Fn.available[a])throw new Error(`Missing BitmapFont "${a}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=s,this._tintColor=new At(n),this._font=void 0,this._fontName=a,this._fontSize=h,this.text=e,this._maxWidth=r,this._maxLineHeight=0,this._letterSpacing=o,this._anchor=new fn(()=>{this.dirty=!0},this,0,0),this._roundPixels=Ve.ROUND_PIXELS,this.dirty=!0,this._resolution=Ve.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){var k;const e=Fn.available[this._fontName],t=this.fontSize,s=t/e.size,n=new bt,r=[],o=[],a=[],h=this._text.replace(/(?:\r\n|\r)/g,`
|
||||
`)||" ",l=dy(h),c=this._maxWidth*e.size/t,u=e.distanceFieldType==="none"?Qm:eg;let f=null,d=0,m=0,g=0,b=-1,_=0,M=0,v=0,S=0;for(let F=0;F<l.length;F++){const D=l[F],N=bl(D);if(/(?:\s)/.test(D)&&(b=F,_=d,S++),D==="\r"||D===`
|
||||
`){o.push(d),a.push(-1),m=Math.max(m,d),++g,++M,n.x=0,n.y+=e.lineHeight,f=null,S=0;continue}const j=e.chars[N];if(!j)continue;f&&j.kerning[f]&&(n.x+=j.kerning[f]);const O=tg.pop()||{texture:et.EMPTY,line:0,charCode:0,prevSpaces:0,position:new bt};O.texture=j.texture,O.line=g,O.charCode=N,O.position.x=Math.round(n.x+j.xOffset+this._letterSpacing/2),O.position.y=Math.round(n.y+j.yOffset),O.prevSpaces=S,r.push(O),d=O.position.x+Math.max(j.xAdvance-j.xOffset,j.texture.orig.width),n.x+=j.xAdvance+this._letterSpacing,v=Math.max(v,j.yOffset+j.texture.height),f=N,b!==-1&&c>0&&n.x>c&&(++M,ao(r,1+b-M,1+F-b),F=b,b=-1,o.push(_),a.push(r.length>0?r[r.length-1].prevSpaces:0),m=Math.max(m,_),g++,n.x=0,n.y+=e.lineHeight,f=null,S=0)}const y=l[l.length-1];y!=="\r"&&y!==`
|
||||
`&&(/(?:\s)/.test(y)&&(d=_),o.push(d),m=Math.max(m,d),a.push(-1));const I=[];for(let F=0;F<=g;F++){let D=0;this._align==="right"?D=m-o[F]:this._align==="center"?D=(m-o[F])/2:this._align==="justify"&&(D=a[F]<0?0:(m-o[F])/a[F]),I.push(D)}const E=r.length,C={},R=[],B=this._activePagesMeshData;u.push(...B);for(let F=0;F<E;F++){const D=r[F].texture,N=D.baseTexture.uid;if(!C[N]){let j=u.pop();if(!j){const L=new hf;let P,X;e.distanceFieldType==="none"?(P=new jl(et.EMPTY),X=Qe.NORMAL):(P=new jl(et.EMPTY,{program:Vs.from(fE,dE),uniforms:{uFWidth:0}}),X=Qe.NORMAL_NPM);const U=new ma(L,P);U.blendMode=X,j={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:U,vertices:null,uvs:null,indices:null}}j.index=0,j.indexCount=0,j.vertexCount=0,j.uvsCount=0,j.total=0;const{_textureCache:O}=this;O[N]=O[N]||new et(D.baseTexture),j.mesh.texture=O[N],j.mesh.tint=this._tintColor.value,R.push(j),C[N]=j}C[N].total++}for(let F=0;F<B.length;F++)R.includes(B[F])||this.removeChild(B[F].mesh);for(let F=0;F<R.length;F++)R[F].mesh.parent!==this&&this.addChild(R[F].mesh);this._activePagesMeshData=R;for(const F in C){const D=C[F],N=D.total;if(!(((k=D.indices)==null?void 0:k.length)>6*N)||D.vertices.length<ma.BATCHABLE_SIZE*2)D.vertices=new Float32Array(8*N),D.uvs=new Float32Array(8*N),D.indices=new Uint16Array(6*N);else{const j=D.total,O=D.vertices;for(let L=j*4*2;L<O.length;L++)O[L]=0}D.mesh.size=6*N}for(let F=0;F<E;F++){const D=r[F];let N=D.position.x+I[D.line]*(this._align==="justify"?D.prevSpaces:1);this._roundPixels&&(N=Math.round(N));const j=N*s,O=D.position.y*s,L=D.texture,P=C[L.baseTexture.uid],X=L.frame,U=L._uvs,Y=P.index++;P.indices[Y*6+0]=0+Y*4,P.indices[Y*6+1]=1+Y*4,P.indices[Y*6+2]=2+Y*4,P.indices[Y*6+3]=0+Y*4,P.indices[Y*6+4]=2+Y*4,P.indices[Y*6+5]=3+Y*4,P.vertices[Y*8+0]=j,P.vertices[Y*8+1]=O,P.vertices[Y*8+2]=j+X.width*s,P.vertices[Y*8+3]=O,P.vertices[Y*8+4]=j+X.width*s,P.vertices[Y*8+5]=O+X.height*s,P.vertices[Y*8+6]=j,P.vertices[Y*8+7]=O+X.height*s,P.uvs[Y*8+0]=U.x0,P.uvs[Y*8+1]=U.y0,P.uvs[Y*8+2]=U.x1,P.uvs[Y*8+3]=U.y1,P.uvs[Y*8+4]=U.x2,P.uvs[Y*8+5]=U.y2,P.uvs[Y*8+6]=U.x3,P.uvs[Y*8+7]=U.y3}this._textWidth=m*s,this._textHeight=(n.y+e.lineHeight)*s;for(const F in C){const D=C[F];if(this.anchor.x!==0||this.anchor.y!==0){let L=0;const P=this._textWidth*this.anchor.x,X=this._textHeight*this.anchor.y;for(let U=0;U<D.total;U++)D.vertices[L++]-=P,D.vertices[L++]-=X,D.vertices[L++]-=P,D.vertices[L++]-=X,D.vertices[L++]-=P,D.vertices[L++]-=X,D.vertices[L++]-=P,D.vertices[L++]-=X}this._maxLineHeight=v*s;const N=D.mesh.geometry.getBuffer("aVertexPosition"),j=D.mesh.geometry.getBuffer("aTextureCoord"),O=D.mesh.geometry.getIndex();N.data=D.vertices,j.data=D.uvs,O.data=D.indices,N.update(),j.update(),O.update()}for(let F=0;F<r.length;F++)tg.push(r[F]);this._font=e,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0);const{distanceFieldRange:t,distanceFieldType:s,size:n}=Fn.available[this._fontName];if(s!=="none"){const{a:r,b:o,c:a,d:h}=this.worldTransform,l=Math.sqrt(r*r+o*o),c=Math.sqrt(a*a+h*h),u=(Math.abs(l)+Math.abs(c))/2,f=this.fontSize/n,d=e._view.resolution;for(const m of this._activePagesMeshData)m.mesh.shader.uniforms.uFWidth=u*t*f*d}super._render(e)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){const e=Fn.available[this._fontName];if(!e)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==e&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(e){if(this.tint!==e){this._tintColor.setValue(e);for(let t=0;t<this._activePagesMeshData.length;t++)this._activePagesMeshData[t].mesh.tint=e}}get align(){return this._align}set align(e){this._align!==e&&(this._align=e,this.dirty=!0)}get fontName(){return this._fontName}set fontName(e){if(!Fn.available[e])throw new Error(`Missing BitmapFont "${e}"`);this._fontName!==e&&(this._fontName=e,this.dirty=!0)}get fontSize(){return this._fontSize??Fn.available[this._fontName].size}set fontSize(e){this._fontSize!==e&&(this._fontSize=e,this.dirty=!0)}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get text(){return this._text}set text(e){e=String(e??""),this._text!==e&&(this._text=e,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(e){e!==this._roundPixels&&(this._roundPixels=e,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(e){this._autoResolution=!1,this._res
Line truncated
|
||||
@font-face {
|
||||
font-family: "${t.family}";
|
||||
src: url('${t.dataSrc}');
|
||||
font-weight: ${t.weight};
|
||||
font-style: ${t.style};
|
||||
font-display: ${t.display};
|
||||
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=e_(e)),typeof e=="number"?Qw(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,s=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${s}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,qr.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=Ve.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};xd.availableFonts={},xd.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let vu=xd;const Ka=class Kr extends Qn{constructor(e="",t={}){super(et.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const s=new Image,n=et.from(s,{scaleMode:Ve.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new lt,n.trim=new lt,this.texture=n;const r="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",a=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(o,"div"),c=document.createElementNS(o,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",a.appendChild(h),this.maxWidth=Kr.defaultMaxWidth,this.maxHeight=Kr.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=a,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=s,this._loadImage=new Image,this._autoResolution=Kr.defaultAutoResolution,this._resolution=Kr.defaultResolution??Ve.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:s,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:s.toCSS(n)}),this._styleElement.textContent=s.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:o,height:a}=r;(o>this.maxWidth||a>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(o)),l=Math.min(this.maxHeight,Math.ceil(a));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),s!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+s.padding*2,height:l+s.padding*2}}async updateText(e=!0){const{style:t,_image:s,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:o}=this.measureText();s.width=n.width=Math.ceil(Math.max(1,r)),s.height=n.height=Math.ceil(Math.max(1,o)),this._updateID++;const a=this._updateID;await new Promise(h=>{n.onload=async()=>{if(a<this._updateID){h();return}await t.onBeforeDraw(),s.src=n.src,n.onload=null,n.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);n.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret
Line truncated
|
||||
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(e){this._stylesheet!==e&&(this._stylesheet=e,this.styleID++)}normalizeColor(e){return Array.isArray(e)&&(e=o_(e)),typeof e=="number"?r_(e):e}dropShadowToCSS(){let e=this.normalizeColor(this.dropShadowColor);const t=this.dropShadowAlpha,s=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),n=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);e.startsWith("#")&&t<1&&(e+=(t*255|0).toString(16).padStart(2,"0"));const r=`${s}px ${n}px`;return this.dropShadowBlur>0?`text-shadow: ${r} ${this.dropShadowBlur}px ${e}`:`text-shadow: ${r} ${e}`}reset(){Object.assign(this,qr.defaultOptions)}onBeforeDraw(){const{fontsDirty:e}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&e?new Promise(t=>setTimeout(t,100)):Promise.resolve()}get isSafari(){const{userAgent:e}=Ve.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}set fillGradientStops(e){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(e){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(e){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(e){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(e){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(e){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(e){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}};_d.availableFonts={},_d.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};let xu=_d;const Ja=class Kr extends Qn{constructor(e="",t={}){super(et.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this.localStyleID=-1,this.dirty=!1,this._updateID=0,this.ownsStyle=!1;const s=new Image,n=et.from(s,{scaleMode:Ve.SCALE_MODE,resourceOptions:{autoLoad:!1}});n.orig=new lt,n.trim=new lt,this.texture=n;const r="http://www.w3.org/2000/svg",o="http://www.w3.org/1999/xhtml",a=document.createElementNS(r,"svg"),h=document.createElementNS(r,"foreignObject"),l=document.createElementNS(o,"div"),c=document.createElementNS(o,"style");h.setAttribute("width","10000"),h.setAttribute("height","10000"),h.style.overflow="hidden",a.appendChild(h),this.maxWidth=Kr.defaultMaxWidth,this.maxHeight=Kr.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=a,this._foreignObject=h,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=s,this._loadImage=new Image,this._autoResolution=Kr.defaultAutoResolution,this._resolution=Kr.defaultResolution??Ve.RESOLUTION,this.text=e,this.style=t}measureText(e){var c,u;const{text:t,style:s,resolution:n}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},e);Object.assign(this._domElement,{innerHTML:t,style:s.toCSS(n)}),this._styleElement.textContent=s.toGlobalCSS(),document.body.appendChild(this._svgRoot);const r=this._domElement.getBoundingClientRect();this._svgRoot.remove();const{width:o,height:a}=r;(o>this.maxWidth||a>this.maxHeight)&&console.warn("[HTMLText] Large expanse of text, increase HTMLText.maxWidth or HTMLText.maxHeight property.");const h=Math.min(this.maxWidth,Math.ceil(o)),l=Math.min(this.maxHeight,Math.ceil(a));return this._svgRoot.setAttribute("width",h.toString()),this._svgRoot.setAttribute("height",l.toString()),t!==this._text&&(this._domElement.innerHTML=this._text),s!==this._style&&(Object.assign(this._domElement,{style:(c=this._style)==null?void 0:c.toCSS(n)}),this._styleElement.textContent=(u=this._style)==null?void 0:u.toGlobalCSS()),{width:h+s.padding*2,height:l+s.padding*2}}async updateText(e=!0){const{style:t,_image:s,_loadImage:n}=this;if(this.localStyleID!==t.styleID&&(this.dirty=!0,this.localStyleID=t.styleID),!this.dirty&&e)return;const{width:r,height:o}=this.measureText();s.width=n.width=Math.ceil(Math.max(1,r)),s.height=n.height=Math.ceil(Math.max(1,o)),this._updateID++;const a=this._updateID;await new Promise(h=>{n.onload=async()=>{if(a<this._updateID){h();return}await t.onBeforeDraw(),s.src=n.src,n.onload=null,n.src="",this.updateTexture(),h()};const l=new XMLSerializer().serializeToString(this._svgRoot);n.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(l)}`})}get source(){ret
Line truncated
|
||||
attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
|
||||
@@ -1181,7 +1181,7 @@ void main(void)
|
||||
|
||||
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
||||
}
|
||||
`,yA=`
|
||||
`,IA=`
|
||||
varying vec2 vTextureCoord;
|
||||
uniform vec4 uColor;
|
||||
uniform vec4 uDarkColor;
|
||||
@@ -1194,7 +1194,7 @@ void main(void)
|
||||
gl_FragColor.a = texColor.a * uColor.a;
|
||||
gl_FragColor.rgb = ((texColor.a - 1.0) * uDarkColor.a + 1.0 - texColor.rgb) * uDarkColor.rgb + texColor.rgb * uColor.rgb;
|
||||
}
|
||||
`;class xA extends fs{constructor(t){const s={uSampler:t??et.EMPTY,alpha:1,uTextureMatrix:Ut.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},n={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(Us.from(vA,yA),s);A(this,"uvMatrix");A(this,"batchable");A(this,"pluginName");A(this,"_tintRGB");A(this,"_darkTintRGB");A(this,"_colorDirty");A(this,"_alpha");A(this,"_tintColor");A(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new Qd(s.uSampler),this.batchable=!0,this.pluginName=n.pluginName,this._tintColor=new At(n.tint),this._darkTintColor=new At(n.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=n.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,At.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),At.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class bA extends pa{constructor(t){super(new gA,new xA(t),void 0,void 0);A(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const s=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=s.indexBuffer.data,this._tintRGB=n._tintRGB,this._darkTintRGB=n._darkTintRGB,this._texture=n.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const ii=class ii extends bA{constructor(){super();A(this,"name","")}updateFromSpineData(t,s,n,r,o,a,h,l){var _,T;this.texture=t.texture;const c=o/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((_=u.data)==null?void 0:_.length)!==c&&(u.data=new Float32Array(c));const f=this.geometry.getBuffer("aVertexPosition");((T=f.data)==null?void 0:T.length)!==c&&(f.data=new Float32Array(c));let d=0,m=u.data,g=f.data;for(let v=0;v<o;v+=l?12:8){let S=v;g[d]=r[S++],g[d+1]=r[S++],S+=4,m[d]=r[S++],m[d+1]=r[S++],d+=2}l?(ii.auxColor[0]=r[8],ii.auxColor[1]=r[9],ii.auxColor[2]=r[10],ii.auxColor[3]=r[11],this.darkTint=ii.auxColor,ii.auxColor[0]=r[2],ii.auxColor[1]=r[3],ii.auxColor[2]=r[4],ii.auxColor[3]=r[5],this.tint=ii.auxColor):(ii.auxColor[0]=r[2],ii.auxColor[1]=r[3],ii.auxColor[2]=r[4],ii.auxColor[3]=r[5],this.tint=ii.auxColor),this.blendMode=Ar.toPixiBlending(s),this.alpha=ii.auxColor[3];const x=this.geometry.indexBuffer;if(x.data.length!==a.length)x.data=new Uint32Array(a);else{const v=x.data;for(let S=0;S<h;S++)v[S]=a[S]}this.name=n,u.update(),f.update(),x.update()}};A(ii,"auxColor",[0,0,0,0]);let ia=ii;const St=class St extends gi{constructor(t,s){if(t instanceof Zl)t={...s,skeletonData:t};else if(s)throw new Error("You cannot use options and oldOptions together.");super();A(this,"skeleton");A(this,"state");A(this,"darkTint",!1);A(this,"hasNeverUpdated",!0);A(this,"_debug");A(this,"slotMeshFactory",()=>new Ed);A(this,"beforeUpdateWorldTransforms",()=>{});A(this,"afterUpdateWorldTransforms",()=>{});A(this,"_autoUpdate",!1);A(this,"_ticker",Ei.shared);A(this,"meshesCache",new Map);A(this,"lightColor",new ot);A(this,"darkColor",new ot);A(this,"_boundsProvider");A(this,"_boundsPoint",new bt);A(this,"_boundsSpineID",-1);A(this,"_boundsSpineDirty",!0);A(this,"slotsObject",new Map);A(this,"verticesCache",Fe.newFloatArray(1024));A(this,"clippingSlotToPixiMasks",{});A(this,"currentClippingSlot");const n=t instanceof Zl?t:t.skeletonData;this.skeleton=new va(n);const r=new AE(n);this.state=new wd(r),(t==null?void 0:t.darkTint)!==void 0||(s==null?void 0:s.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(o=>!!o.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new ia)):this.initializeMeshFactory(s==null?void 0:s.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide
Line truncated
|
||||
`;class RA extends ps{constructor(t){const s={uSampler:t??et.EMPTY,alpha:1,uTextureMatrix:Vt.IDENTITY,uColor:new Float32Array([1,1,1,1]),uDarkColor:new Float32Array([0,0,0,0])},n={tint:16777215,darkTint:0,alpha:1,pluginName:"darkTintBatch"};super(Vs.from(CA,IA),s);A(this,"uvMatrix");A(this,"batchable");A(this,"pluginName");A(this,"_tintRGB");A(this,"_darkTintRGB");A(this,"_colorDirty");A(this,"_alpha");A(this,"_tintColor");A(this,"_darkTintColor");this._colorDirty=!1,this.uvMatrix=new sf(s.uSampler),this.batchable=!0,this.pluginName=n.pluginName,this._tintColor=new At(n.tint),this._darkTintColor=new At(n.darkTint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._alpha=n.alpha,this._colorDirty=!0}get texture(){return this.uniforms.uSampler}set texture(t){this.uniforms.uSampler!==t&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!t.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=t,this.uvMatrix.texture=t)}set alpha(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(t){t!==this.tint&&(this._tintColor.setValue(t),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}set darkTint(t){t!==this.darkTint&&(this._darkTintColor.setValue(t),this._darkTintRGB=this._darkTintColor.toLittleEndianNumber(),this._colorDirty=!0)}get darkTint(){return this._darkTintColor.value}get tintValue(){return this._tintColor.toNumber()}get darkTintValue(){return this._darkTintColor.toNumber()}update(){this._colorDirty&&(this._colorDirty=!1,At.shared.setValue(this._tintColor).premultiply(this._alpha,!0).toArray(this.uniforms.uColor),At.shared.setValue(this._darkTintColor).premultiply(this._alpha,!0).premultiply(1,!1).toArray(this.uniforms.uDarkColor)),this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}}class PA extends ma{constructor(t){super(new AA,new RA(t),void 0,void 0);A(this,"_darkTintRGB",0)}get darkTint(){return"darkTint"in this.shader?this.shader.darkTint:null}set darkTint(t){this.shader.darkTint=t}get darkTintValue(){return this.shader.darkTintValue}_renderToBatch(t){const s=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=s.indexBuffer.data,this._tintRGB=n._tintRGB,this._darkTintRGB=n._darkTintRGB,this._texture=n.texture;const r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)}}const ii=class ii extends PA{constructor(){super();A(this,"name","")}updateFromSpineData(t,s,n,r,o,a,h,l){var _,M;this.texture=t.texture;const c=o/(l?12:8)*2,u=this.geometry.getBuffer("aTextureCoord");((_=u.data)==null?void 0:_.length)!==c&&(u.data=new Float32Array(c));const f=this.geometry.getBuffer("aVertexPosition");((M=f.data)==null?void 0:M.length)!==c&&(f.data=new Float32Array(c));let d=0,m=u.data,g=f.data;for(let v=0;v<o;v+=l?12:8){let S=v;g[d]=r[S++],g[d+1]=r[S++],S+=4,m[d]=r[S++],m[d+1]=r[S++],d+=2}l?(ii.auxColor[0]=r[8],ii.auxColor[1]=r[9],ii.auxColor[2]=r[10],ii.auxColor[3]=r[11],this.darkTint=ii.auxColor,ii.auxColor[0]=r[2],ii.auxColor[1]=r[3],ii.auxColor[2]=r[4],ii.auxColor[3]=r[5],this.tint=ii.auxColor):(ii.auxColor[0]=r[2],ii.auxColor[1]=r[3],ii.auxColor[2]=r[4],ii.auxColor[3]=r[5],this.tint=ii.auxColor),this.blendMode=Ar.toPixiBlending(s),this.alpha=ii.auxColor[3];const b=this.geometry.indexBuffer;if(b.data.length!==a.length)b.data=new Uint32Array(a);else{const v=b.data;for(let S=0;S<h;S++)v[S]=a[S]}this.name=n,u.update(),f.update(),b.update()}};A(ii,"auxColor",[0,0,0,0]);let sa=ii;const St=class St extends gi{constructor(t,s){if(t instanceof eh)t={...s,skeletonData:t};else if(s)throw new Error("You cannot use options and oldOptions together.");super();A(this,"skeleton");A(this,"state");A(this,"darkTint",!1);A(this,"hasNeverUpdated",!0);A(this,"_debug");A(this,"slotMeshFactory",()=>new Id);A(this,"beforeUpdateWorldTransforms",()=>{});A(this,"afterUpdateWorldTransforms",()=>{});A(this,"_autoUpdate",!1);A(this,"_ticker",Ei.shared);A(this,"meshesCache",new Map);A(this,"lightColor",new ot);A(this,"darkColor",new ot);A(this,"_boundsProvider");A(this,"_boundsPoint",new bt);A(this,"_boundsSpineID",-1);A(this,"_boundsSpineDirty",!0);A(this,"slotsObject",new Map);A(this,"verticesCache",Fe.newFloatArray(1024));A(this,"clippingSlotToPixiMasks",{});A(this,"currentClippingSlot");const n=t instanceof eh?t:t.skeletonData;this.skeleton=new ya(n);const r=new NE(n);this.state=new Td(r),(t==null?void 0:t.darkTint)!==void 0||(s==null?void 0:s.slotMeshFactory)===void 0?(this.darkTint=(t==null?void 0:t.darkTint)===void 0?this.skeleton.slots.some(o=>!!o.data.darkColor):t==null?void 0:t.darkTint,this.darkTint&&(this.slotMeshFactory=()=>new sa)):this.initializeMeshFactory(s==null?void 0:s.slotMeshFactory),t!=null&&t.ticker&&(this._ticker=t.ticker),this.autoUpdate=(t==null?void 0:t.autoUpdate)??!0,this.boundsProvider=t.boundsProvide
Line truncated
|
||||
precision highp float;
|
||||
attribute vec2 aVertexPosition;
|
||||
attribute vec2 aTextureCoord;
|
||||
@@ -1220,7 +1220,7 @@ void main(void){
|
||||
vDarkColor = aDarkColor * tint;
|
||||
|
||||
}
|
||||
`,AA=`
|
||||
`,NA=`
|
||||
varying vec2 vTextureCoord;
|
||||
varying vec4 vColor;
|
||||
varying vec4 vDarkColor;
|
||||
@@ -1235,4 +1235,4 @@ void main(void){
|
||||
gl_FragColor.a = color.a * vColor.a;
|
||||
gl_FragColor.rgb = ((color.a - 1.0) * vDarkColor.a + 1.0 - color.rgb) * vDarkColor.rgb + color.rgb * vColor.rgb;
|
||||
}
|
||||
`;class tx extends Bn{constructor(e){super(e),this.shaderGenerator=new ov(EA,AA),this.geometryClass=MA,this.vertexSize=7}packInterleavedGeometry(e,t,s,n,r){const{uint32View:o,float32View:a}=t,h=n/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,f=e._texture.baseTexture._batchLocation,d=Math.min(e.worldAlpha,1),m=At.shared.setValue(e._tintRGB).toPremultiplied(d,!0),g=At.shared.setValue(e._darkTintRGB).premultiply(d,!0).toPremultiplied(1,!1);for(let x=0;x<u.length;x+=2)a[n++]=u[x],a[n++]=u[x+1],a[n++]=l[x],a[n++]=l[x+1],o[n++]=m,o[n++]=g,a[n++]=f;for(let x=0;x<c.length;x++)s[r++]=h+c[x]}}A(tx,"extension",{name:"darkTintBatch",type:Oe.RendererPlugin});He.add(tx);class CA{constructor(){A(this,"container",new gi);A(this,"entries",new Map)}sync(e,t,s){var n;for(const[r,o]of this.entries)e.some(a=>a.id===r)||(this.container.removeChild(o.root),o.root.destroy({children:!0}),this.entries.delete(r));for(const r of e){const o=bE(r.id);let a=this.entries.get(r.id);if(a&&a.assetVersion!==r.assetVersion&&!o&&(this.container.removeChild(a.root),a.root.destroy({children:!0}),this.entries.delete(r.id),a=void 0),(!a||a.assetVersion!==r.assetVersion)&&o){a&&(this.container.removeChild(a.root),a.root.destroy({children:!0}));const f=new gi,d=new Ad({skeletonData:o.skeletonData,autoUpdate:!1,darkTint:!1});o.skeletonData.defaultSkin&&d.skeleton.setSkin(o.skeletonData.defaultSkin),d.skeleton.setSlotsToSetupPose(),f.addChild(d),this.container.addChild(f),a={root:f,spine:d,assetVersion:r.assetVersion,animation:""},this.entries.set(r.id,a)}if(!a)continue;const h=a.root,l=a.spine,c=r.visible!==!1&&r.enabled;h.visible=c,h.renderable=c,h.position.set(r.x,-r.y),h.rotation=-r.rotation*Math.PI/180,h.scale.set(r.scaleX,r.scaleY),a.animation!==r.selectedAnimation&&(a.animation=r.selectedAnimation,l.skeleton.setToSetupPose(),l.state.clearTracks(),a.animation&&l.state.setAnimation(0,a.animation,!1));const u=l.state.getCurrent(0);if(u){const f=((n=r.animations.find(m=>m.name===r.selectedAnimation))==null?void 0:n.duration)||0,d=Math.max(0,t/Math.max(1,s)-r.timeOffset);u.trackTime=f>0?Math.min(d,f):d}l.update(0)}}getBoneWorldTransform(e,t){const s=this.entries.get(e),n=s==null?void 0:s.spine.skeleton.findBone(t);if(!s||!n||!n.active)return null;const r=s.root,o=Math.cos(r.rotation),a=Math.sin(r.rotation),h=o*r.scale.x,l=-a*r.scale.y,c=a*r.scale.x,u=o*r.scale.y,f=h*n.a+l*n.c,d=h*n.b+l*n.d,m=c*n.a+u*n.c,g=c*n.b+u*n.d,x=r.position.x+h*n.worldX+l*n.worldY,_=r.position.y+c*n.worldX+u*n.worldY;return{x,y:-_,rotation:-Math.atan2(m,f)*180/Math.PI,scaleX:Math.max(1e-4,Math.hypot(f,m)),scaleY:Math.max(1e-4,Math.hypot(d,g))}}destroy(){for(const e of this.entries.values())e.root.removeFromParent(),e.root.destroy({children:!0});this.entries.clear(),this.container.removeFromParent(),this.container.destroy({children:!0})}}const Nh=wo({undoCount:0});let eh=null,pn=null,qn=[],Lo=null,mn=null,th=!1;function uf(i){const e=i.systems.map(n=>{const r=Ft(n);return r.frames=void 0,r}),{undoLimit:t,...s}=Ft(i.settings);return{systems:e,colliders:Ft(i.colliders),paths:Ft(i.paths),spines:Ft(i.spines),animations:[...i.timeline.animations],settings:s}}function df(i){return JSON.stringify(i,(e,t)=>e==="texture"||e==="trailTexture"?null:typeof t=="string"&&t.startsWith("data:")&&t.length>256?`${t.length}:${t.slice(0,96)}:${t.slice(-48)}`:t)}function ix(i,e=uf(i),t=df(e)){const s=new Map;for(const n of e.spines){const r=wE(n.id);r&&s.set(n.id,r)}return{data:e,signature:t,spineAssets:s}}function ih(i){if(i){for(const e of i.spineAssets.values())xE(e);i.spineAssets.clear()}}function sx(i){for(;qn.length>i;)ih(qn.shift()||null);Nh.undoCount=qn.length}function nx(){const i=eh;if(!i||!pn||th)return;const e=uf(i),t=df(e);t!==pn.signature&&(qn.push(pn),pn=ix(i,e,t),sx(i.settings.undoLimit))}function IA(){th||(mn&&clearTimeout(mn),mn=setTimeout(()=>{mn=null,nx()},250))}function RA(i){const e=i.activeObjectId;return i.activeObjectType==="particle"?i.systems.some(t=>t.id===e):i.activeObjectType==="collision"?i.colliders.some(t=>t.id===e):i.activeObjectType==="path"?i.paths.some(t=>t.id===e):i.spines.some(t=>t.id===e)}function PA(i){var t,s;if(!RA(i)){const n=i.systems[0],r=i.colliders[0],o=i.paths[0],a=i.spines[0];n?(i.activeObjectType="particle",i.activeObjectId=n.id):r?(i.activeObjectType="collision",i.activeObjectId=r.id):o?(i.activeObjectType="path",i.activeObjectId=o.id):(i.activeObjectType="spine",i.activeObjectId=(a==null?void 0:a.id)||0)}const e=i.activeObjectType==="particle"?i.systems.find(n=>n.id===i.activeObjectId):i.systems.find(n=>n.id===i.activeId);i.activeId=(e==null?void 0:e.id)||((t=i.systems[0])==null?void 0:t.id)||0,i.timeline.animation=(e==null?void 0:e.animation)||((s=i.systems[0])==null?void 0:s.animation)||i.timeline.animations[0]||"animation"}function kA(i,e){const t=pn;th=!0;try{for(const s of i.spines)Ma(s.id);i.systems=Ft(e.data.systems),i.colliders=Ft(e.data.colliders),i.paths=Ft(e.data.paths),i.spines=Ft(e.data.spines),i.timeline.animations=[...e.data.an
Line truncated
|
||||
`;class ox extends Bn{constructor(e){super(e),this.shaderGenerator=new hv(DA,NA),this.geometryClass=LA,this.vertexSize=7}packInterleavedGeometry(e,t,s,n,r){const{uint32View:o,float32View:a}=t,h=n/this.vertexSize,l=e.uvs,c=e.indices,u=e.vertexData,f=e._texture.baseTexture._batchLocation,d=Math.min(e.worldAlpha,1),m=At.shared.setValue(e._tintRGB).toPremultiplied(d,!0),g=At.shared.setValue(e._darkTintRGB).premultiply(d,!0).toPremultiplied(1,!1);for(let b=0;b<u.length;b+=2)a[n++]=u[b],a[n++]=u[b+1],a[n++]=l[b],a[n++]=l[b+1],o[n++]=m,o[n++]=g,a[n++]=f;for(let b=0;b<c.length;b++)s[r++]=h+c[b]}}A(ox,"extension",{name:"darkTintBatch",type:Oe.RendererPlugin});He.add(ox);class UA{constructor(){A(this,"container",new gi);A(this,"entries",new Map)}sync(e,t,s){var n;for(const[r,o]of this.entries)e.some(a=>a.id===r)||(this.container.removeChild(o.root),o.root.destroy({children:!0}),this.entries.delete(r));for(const r of e){const o=EE(r.id);let a=this.entries.get(r.id);if(a&&a.assetVersion!==r.assetVersion&&!o&&(this.container.removeChild(a.root),a.root.destroy({children:!0}),this.entries.delete(r.id),a=void 0),(!a||a.assetVersion!==r.assetVersion)&&o){a&&(this.container.removeChild(a.root),a.root.destroy({children:!0}));const f=new gi,d=new Rd({skeletonData:o.skeletonData,autoUpdate:!1,darkTint:!1});o.skeletonData.defaultSkin&&d.skeleton.setSkin(o.skeletonData.defaultSkin),d.skeleton.setSlotsToSetupPose(),f.addChild(d),this.container.addChild(f),a={root:f,spine:d,assetVersion:r.assetVersion,animation:""},this.entries.set(r.id,a)}if(!a)continue;const h=a.root,l=a.spine,c=r.visible!==!1&&r.enabled;h.visible=c,h.renderable=c,h.position.set(r.x,-r.y),h.rotation=-r.rotation*Math.PI/180,h.scale.set(r.scaleX,r.scaleY),a.animation!==r.selectedAnimation&&(a.animation=r.selectedAnimation,l.skeleton.setToSetupPose(),l.state.clearTracks(),a.animation&&l.state.setAnimation(0,a.animation,!1));const u=l.state.getCurrent(0);if(u){const f=((n=r.animations.find(m=>m.name===r.selectedAnimation))==null?void 0:n.duration)||0,d=Math.max(0,t/Math.max(1,s)-r.timeOffset);u.trackTime=f>0?Math.min(d,f):d}l.update(0)}}getBoneWorldTransform(e,t){const s=this.entries.get(e),n=s==null?void 0:s.spine.skeleton.findBone(t);if(!s||!n||!n.active)return null;const r=s.root,o=Math.cos(r.rotation),a=Math.sin(r.rotation),h=o*r.scale.x,l=-a*r.scale.y,c=a*r.scale.x,u=o*r.scale.y,f=h*n.a+l*n.c,d=h*n.b+l*n.d,m=c*n.a+u*n.c,g=c*n.b+u*n.d,b=r.position.x+h*n.worldX+l*n.worldY,_=r.position.y+c*n.worldX+u*n.worldY;return{x:b,y:-_,rotation:-Math.atan2(m,f)*180/Math.PI,scaleX:Math.max(1e-4,Math.hypot(f,m)),scaleY:Math.max(1e-4,Math.hypot(d,g))}}destroy(){for(const e of this.entries.values())e.root.removeFromParent(),e.root.destroy({children:!0});this.entries.clear(),this.container.removeFromParent(),this.container.destroy({children:!0})}}function Yn(i,e,t){const s=Number(i[e]);return Number.isFinite(s)?s:t}function ki(i,e,t,s){i[e]==null&&(i[e]=Yn(i,t,s))}function pf(i,e,t){if(typeof i.curve!="number")return;const s=Yn(i,"time",0),r=Yn(e,"time",0)-s,o=i.curve,a=Yn(i,"c2",0),h=Yn(i,"c3",1),l=Yn(i,"c4",1);i.curve=t.flatMap(([c,u])=>[s+r*o,c+(u-c)*a,s+r*h,c+(u-c)*l]),delete i.c2,delete i.c3,delete i.c4}function Wn(i,e){if(Array.isArray(i))for(let t=0;t<i.length-1;t++){const s=i[t],n=i[t+1];pf(s,n,e.map(({key:r,fallback:o})=>[Yn(s,r,o),Yn(n,r,o)]))}}function VA(i){if(Array.isArray(i))for(let e=0;e<i.length-1;e++)pf(i[e],i[e+1],[[0,1]])}function Yr(i,e){const t=typeof i=="string"?i.replace(/^#/,""):"",s=t.length===6?`${t}ff`:t.padEnd(8,"f").slice(0,8),n=[0,2,4,6].map(r=>Number.parseInt(s.slice(r,r+2),16)/255);return e?n:n.slice(0,3)}function dg(i,e){if(Array.isArray(i))for(let t=0;t<i.length-1;t++){const s=i[t],n=i[t+1],r=e?[...Yr(s.light,!0),...Yr(s.dark,!1)]:Yr(s.color,!0),o=e?[...Yr(n.light,!0),...Yr(n.dark,!1)]:Yr(n.color,!0);pf(s,n,r.map((a,h)=>[a,o[h]]))}}function XA(i){for(const e of i.bones||[])e.inherit==null&&e.transform!=null&&(e.inherit=e.transform);for(const e of i.transform||[])ki(e,"mixRotate","rotateMix",1),ki(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX),ki(e,"mixScaleX","scaleMix",1),e.mixScaleY==null&&(e.mixScaleY=e.mixScaleX),ki(e,"mixShearY","shearMix",1);for(const e of i.path||[])ki(e,"mixRotate","rotateMix",1),ki(e,"mixX","translateMix",1),e.mixY==null&&(e.mixY=e.mixX)}function YA(i){for(const e of i.skins||[])for(const t of Object.values(e.attachments||{}))for(const s of Object.values(t||{}))s.parent!=null&&s.timelines==null&&s.deform!=null&&(s.timelines=s.deform)}function $A(i){for(const e of Object.values(i.slots||{}))e.color&&!e.rgba&&(e.rgba=e.color,delete e.color),e.twoColor&&!e.rgba2&&(e.rgba2=e.twoColor,delete e.twoColor),dg(e.rgba,!1),dg(e.rgba2,!0)}function GA(i){for(const e of Object.values(i.bones||{})){for(const t of e.rotate||[])ki(t,"value","angle",0);Wn(e.rotate,[{key:"value",fallback:0}]),Wn(e.translate,[{key:"x",fallback:0},{key:"y",fallback:0}]),Wn(e.scale,[{key:"x",fallback:1},{key:"y",fallback:1}]),Wn(e.shear,[{key:"x",fa
Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.stage-wrap[data-v-646aa9bd]{position:relative;width:100%;height:100%;overflow:hidden}.stage-holder[data-v-646aa9bd]{width:100%;height:100%;cursor:grab;touch-action:none;background-color:#0e1219;outline:none}.stage-holder.grid[data-v-646aa9bd]{background:conic-gradient(#141a26 90deg,transparent 90deg 180deg,#141a26 180deg 270deg,transparent 270deg);background-size:28px 28px}.stage-holder[data-v-646aa9bd]:active{cursor:grabbing}.topbar[data-v-646aa9bd]{position:absolute;top:10px;left:10px;right:10px;display:flex;align-items:center;gap:10px;padding:8px 12px;background:#141420d9;border-radius:10px;border:1px solid rgba(255,255,255,.08);font-size:12px;color:#aab;z-index:5;flex-wrap:wrap}.topbar input[type=range][data-v-646aa9bd]{background:#1a1a28;border:1px solid #2e2e44;color:#dde;border-radius:5px}.tool-group[data-v-646aa9bd]{display:flex;gap:6px;margin-left:6px;padding-left:12px;border-left:1px solid #2a2a3c}.tool-btn[data-v-646aa9bd]{width:30px;height:26px;background:#1e1e2e;border:1px solid #2e2e44;border-radius:6px;color:#aab;font-size:14px;cursor:pointer;display:flex;align-items:center;justify-content:center}.tool-btn[data-v-646aa9bd]:hover{background:#2b3a5c;color:#fff}.tool-btn.on[data-v-646aa9bd]{background:#3a5a8c;color:#fff;border-color:#5a7ab8}.background-menu[data-v-646aa9bd]{position:relative;flex:0 0 auto}.background-btn[data-v-646aa9bd]{height:28px;padding:0 11px;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;cursor:pointer}.background-btn[data-v-646aa9bd]:hover,.background-btn.on[data-v-646aa9bd]{border-color:#7774ff;background:#343b63;color:#fff}.background-panel[data-v-646aa9bd]{position:absolute;top:calc(100% + 9px);right:0;width:248px;box-sizing:border-box;padding:10px;border:1px solid #343b50;border-radius:9px;background:#141420fa;color:#aeb8cc;box-shadow:0 8px 24px #0000007a;z-index:12}.background-upload[data-v-646aa9bd]{width:100%;height:30px;border:1px solid #5652b5;border-radius:6px;background:#4540a0;color:#fff;cursor:pointer}.background-upload[data-v-646aa9bd]:hover{border-color:#8982ff;background:#554dc2}.background-clear[data-v-646aa9bd]{width:100%;height:28px;margin-top:6px;border:1px solid #70404a;border-radius:6px;background:#512a33;color:#efb5bd;cursor:pointer}.background-clear[data-v-646aa9bd]:hover:not(:disabled){border-color:#b65b6a;background:#6a303b;color:#fff}.background-clear[data-v-646aa9bd]:disabled{opacity:.42;cursor:not-allowed}.background-file-input[data-v-646aa9bd]{display:none}.background-file-name[data-v-646aa9bd]{margin:7px 2px 9px;overflow:hidden;color:#737f98;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.background-position-row[data-v-646aa9bd]{display:grid;grid-template-columns:1fr 1fr;gap:8px}.background-position-row label[data-v-646aa9bd]{display:flex;align-items:center;gap:5px;color:#8995ad;font-size:11px}.background-position-row input[data-v-646aa9bd]{width:0;min-width:0;flex:1;box-sizing:border-box;height:28px;padding:0 6px;border:1px solid #343e55;border-radius:5px;background:#101522;color:#e1e6f2}.background-opacity-row[data-v-646aa9bd]{display:grid;grid-template-columns:46px 1fr 34px;align-items:center;gap:7px;margin-top:10px;font-size:11px}.background-opacity-row input[data-v-646aa9bd]{min-width:0;accent-color:#675de0}.background-opacity-row b[data-v-646aa9bd]{color:#aeb8cc;font-size:10px;text-align:right;font-variant-numeric:tabular-nums}.help-btn[data-v-646aa9bd]{height:28px;margin-left:auto;padding:0 11px;flex:0 0 auto;border:1px solid #3a4963;border-radius:6px;background:#202a3b;color:#cbd7ed;font-size:12px;font-weight:700;cursor:pointer}.help-btn[data-v-646aa9bd]:hover,.help-btn.on[data-v-646aa9bd]{border-color:#7774ff;background:#343b63;color:#fff}.zoom-pct[data-v-646aa9bd]{margin-left:0;font-variant-numeric:tabular-nums;color:#9aa;min-width:44px;text-align:center}.help-overlay[data-v-646aa9bd]{position:absolute;top:0;right:0;bottom:0;left:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:72px 24px 28px;box-sizing:border-box;background:#05080fb8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.help-dialog[data-v-646aa9bd]{width:min(820px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden;border:1px solid #3a4864;border-radius:14px;background:#141a27;color:#b8c3d8;box-shadow:0 22px 70px #0000009e}.help-head[data-v-646aa9bd]{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 15px;border-bottom:1px solid #2b354a;background:linear-gradient(135deg,#202942,#181e2d)}.help-head h2[data-v-646aa9bd]{margin:0;color:#eef2ff;font-size:19px}.help-head p[data-v-646aa9bd]{margin:5px 0 0;color:#7786a3;font-size:11px}.help-close[data-v-646aa9bd]{width:28px;height:28px;flex:0 0 28px;border:1px solid #43516b;border-radius:6px;background:#273249;color:#ccd7ed;cursor:pointer}.help-close[data-v-646aa9bd]:hover{border-color:#7774ff;background:#3b4670;color:#fff}.help-body[data-v-646aa9bd]{min-height:0;overflowLine truncated
|
||||
Vendored
+3
-3
@@ -3,13 +3,13 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Spine Particle · 阶段1 Spike</title>
|
||||
<title>Spine粒子编辑器</title>
|
||||
<style>
|
||||
html, body { margin: 0; padding: 0; background: #111; color: #eee; font-family: system-ui, -apple-system, sans-serif; }
|
||||
#app { display: flex; flex-direction: column; height: 100vh; }
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-Dw7eU6re.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BPQ62DCC.css">
|
||||
<script type="module" crossorigin src="/assets/index-DujVfZi9.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-nUMfzhFe.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in new issue
Block a user