@drincs/pixi-vn-ink
Version:
Pixi'VN gives you the ability to write your own narrative using Ink
1 lines • 6.57 kB
JavaScript
;require('@drincs/pixi-vn');var _=(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var j=Object.create,V=Object.defineProperty,R=Object.getOwnPropertyDescriptor,B=Object.getOwnPropertyNames,P=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty,L=(n=>typeof _<"u"?_:typeof Proxy<"u"?new Proxy(n,{get:(t,r)=>(typeof _<"u"?_:t)[r]}):n)(function(n){if(typeof _<"u")return _.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')}),$=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),H=(n,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of B(t))!F.call(n,c)&&c!==r&&V(n,c,{get:()=>t[c],enumerable:!(o=R(t,c))||o.enumerable});return n},M=(n,t,r)=>(r=n!=null?j(P(n)):{},H(V(r,"default",{value:n,enumerable:true}),n)),z=$((n,t)=>{(function(r,o){typeof n=="object"?t.exports=n=o():typeof define=="function"&&define.amd?define([],o):r.CryptoJS=o();})(n,function(){var r=r||function(o,c){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof L=="function")try{i=L("crypto");}catch{}var T=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},w=Object.create||function(){function e(){}return function(a){var l;return e.prototype=a,l=new e,e.prototype=null,l}}(),d={},h=d.lib={},f=h.Base=function(){return {extend:function(e){var a=w(this);return e&&a.mixIn(e),(!a.hasOwnProperty("init")||this.init===a.init)&&(a.init=function(){a.$super.init.apply(this,arguments);}),a.init.prototype=a,a.$super=this,a},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var a in e)e.hasOwnProperty(a)&&(this[a]=e[a]);e.hasOwnProperty("toString")&&(this.toString=e.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),y=h.WordArray=f.extend({init:function(e,a){e=this.words=e||[],a!=c?this.sigBytes=a:this.sigBytes=e.length*4;},toString:function(e){return (e||m).stringify(this)},concat:function(e){var a=this.words,l=e.words,u=this.sigBytes,g=e.sigBytes;if(this.clamp(),u%4)for(var b=0;b<g;b++){var O=l[b>>>2]>>>24-b%4*8&255;a[u+b>>>2]|=O<<24-(u+b)%4*8;}else for(var A=0;A<g;A+=4)a[u+A>>>2]=l[A>>>2];return this.sigBytes+=g,this},clamp:function(){var e=this.words,a=this.sigBytes;e[a>>>2]&=4294967295<<32-a%4*8,e.length=o.ceil(a/4);},clone:function(){var e=f.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var a=[],l=0;l<e;l+=4)a.push(T());return new y.init(a,e)}}),p=d.enc={},m=p.Hex={stringify:function(e){for(var a=e.words,l=e.sigBytes,u=[],g=0;g<l;g++){var b=a[g>>>2]>>>24-g%4*8&255;u.push((b>>>4).toString(16)),u.push((b&15).toString(16));}return u.join("")},parse:function(e){for(var a=e.length,l=[],u=0;u<a;u+=2)l[u>>>3]|=parseInt(e.substr(u,2),16)<<24-u%8*4;return new y.init(l,a/2)}},v=p.Latin1={stringify:function(e){for(var a=e.words,l=e.sigBytes,u=[],g=0;g<l;g++){var b=a[g>>>2]>>>24-g%4*8&255;u.push(String.fromCharCode(b));}return u.join("")},parse:function(e){for(var a=e.length,l=[],u=0;u<a;u++)l[u>>>2]|=(e.charCodeAt(u)&255)<<24-u%4*8;return new y.init(l,a)}},k=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(v.stringify(e)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(e){return v.parse(unescape(encodeURIComponent(e)))}},E=h.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new y.init,this._nDataBytes=0;},_append:function(e){typeof e=="string"&&(e=k.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes;},_process:function(e){var a,l=this._data,u=l.words,g=l.sigBytes,b=this.blockSize,O=b*4,A=g/O;e?A=o.ceil(A):A=o.max((A|0)-this._minBufferSize,0);var S=A*b,D=o.min(S*4,g);if(S){for(var x=0;x<S;x+=b)this._doProcessBlock(u,x);a=u.splice(0,S),l.sigBytes-=D;}return new y.init(a,D)},clone:function(){var e=f.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});h.Hasher=E.extend({cfg:f.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset();},reset:function(){E.reset.call(this),this._doReset();},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var a=this._doFinalize();return a},blockSize:16,_createHelper:function(e){return function(a,l){return new e.init(l).finalize(a)}},_createHmacHelper:function(e){return function(a,l){return new C.HMAC.init(e,l).finalize(a)}}});var C=d.algo={};return d}(Math);return r});}),J=$((n,t)=>{(function(r,o){typeof n=="object"?t.exports=n=o(z()):typeof define=="function"&&define.amd?define(["./core"],o):o(r.CryptoJS);})(n,function(r){return function(){var o=r,c=o.lib,i=c.WordArray,T=c.Hasher,w=o.algo,d=[],h=w.SHA1=T.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(f,y){for(var p=this._hash.words,m=p[0],v=p[1],k=p[2],E=p[3],C=p[4],e=0;e<80;e++){if(e<16)d[e]=f[y+e]|0;else {var a=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=a<<1|a>>>31;}var l=(m<<5|m>>>27)+C+d[e];e<20?l+=(v&k|~v&E)+1518500249:e<40?l+=(v^k^E)+1859775393:e<60?l+=(v&k|v&E|k&E)-1894007588:l+=(v^k^E)-899497514,C=E,E=k,k=v<<30|v>>>2,v=m,m=l;}p[0]=p[0]+m|0,p[1]=p[1]+v|0,p[2]=p[2]+k|0,p[3]=p[3]+E|0,p[4]=p[4]+C|0;},_doFinalize:function(){var f=this._data,y=f.words,p=this._nDataBytes*8,m=f.sigBytes*8;return y[m>>>5]|=128<<24-m%32,y[(m+64>>>9<<4)+14]=Math.floor(p/4294967296),y[(m+64>>>9<<4)+15]=p,f.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var f=T.clone.call(this);return f._hash=this._hash.clone(),f}});o.SHA1=T._createHelper(h),o.HmacSHA1=T._createHmacHelper(h);}(),r.SHA1});});M(J());var K;(n=>(n.log=(t,...r)=>console.log(`[Pixi\u2019VN Json] ${t}`,...r),n.warn=(t,...r)=>console.warn(`[Pixi\u2019VN Json] ${t}`,...r),n.error=(t,...r)=>console.error(`[Pixi\u2019VN Json] ${t}`,...r),n.info=(t,...r)=>console.info(`[Pixi\u2019VN Json] ${t}`,...r)))(K||={});function Se(n){}function Oe(n){}exports.onReplaceTextAfterTranslation=Se;exports.onReplaceTextBeforeTranslation=Oe;