Comparing version 1.1.0 to 1.1.1
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ifid=t():e.ifid=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){e.exports=function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var t=t,n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},f=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=4*o,u=i/a,c=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,f=e.min(4*c,i);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(r,d);var h=r.splice(0,c);n.sigBytes-=f}return new s.init(h,f)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(i.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math);return e}()},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){var r,i,o=n(1),s=n(2),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],d=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==h){var l=o();null==d&&(d=r=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==h&&(h=i=16383&(l[6]<<8|l[7]))}var _=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,p=_-a+(v-u)/1e4;if(p<0&&void 0===e.clockseq&&(h=h+1&16383),(p<0||_>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=_,u=v,i=h;var I=(1e4*(268435455&(_+=122192928e5))+v)%4294967296;f[c++]=I>>>24&255,f[c++]=I>>>16&255,f[c++]=I>>>8&255,f[c++]=255&I;var g=_/4294967296*1e4&268435455;f[c++]=g>>>8&255,f[c++]=255&g,f[c++]=g>>>24&15|16,f[c++]=g>>>16&255,f[c++]=h>>>8|128,f[c++]=255&h;for(var S=0;S<6;++S)f[c+S]=d[S];return t||s(f)}},function(e,t,n){var r=n(1),i=n(2);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){e.exports=function(e){return e.enc.Hex}(n(0))},function(e,t,n){e.exports=function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],l=e[t+2],_=e[t+3],v=e[t+4],p=e[t+5],I=e[t+6],g=e[t+7],S=e[t+8],y=e[t+9],w=e[t+10],E=e[t+11],A=e[t+12],m=e[t+13],M=e[t+14],D=e[t+15],N=o[0],C=o[1],T=o[2],O=o[3];C=h(C=h(C=h(C=h(C=d(C=d(C=d(C=d(C=f(C=f(C=f(C=f(C=c(C=c(C=c(C=c(C,T=c(T,O=c(O,N=c(N,C,T,O,s,7,a[0]),C,T,u,12,a[1]),N,C,l,17,a[2]),O,N,_,22,a[3]),T=c(T,O=c(O,N=c(N,C,T,O,v,7,a[4]),C,T,p,12,a[5]),N,C,I,17,a[6]),O,N,g,22,a[7]),T=c(T,O=c(O,N=c(N,C,T,O,S,7,a[8]),C,T,y,12,a[9]),N,C,w,17,a[10]),O,N,E,22,a[11]),T=c(T,O=c(O,N=c(N,C,T,O,A,7,a[12]),C,T,m,12,a[13]),N,C,M,17,a[14]),O,N,D,22,a[15]),T=f(T,O=f(O,N=f(N,C,T,O,u,5,a[16]),C,T,I,9,a[17]),N,C,E,14,a[18]),O,N,s,20,a[19]),T=f(T,O=f(O,N=f(N,C,T,O,p,5,a[20]),C,T,w,9,a[21]),N,C,D,14,a[22]),O,N,v,20,a[23]),T=f(T,O=f(O,N=f(N,C,T,O,y,5,a[24]),C,T,M,9,a[25]),N,C,_,14,a[26]),O,N,S,20,a[27]),T=f(T,O=f(O,N=f(N,C,T,O,m,5,a[28]),C,T,l,9,a[29]),N,C,g,14,a[30]),O,N,A,20,a[31]),T=d(T,O=d(O,N=d(N,C,T,O,p,4,a[32]),C,T,S,11,a[33]),N,C,E,16,a[34]),O,N,M,23,a[35]),T=d(T,O=d(O,N=d(N,C,T,O,u,4,a[36]),C,T,v,11,a[37]),N,C,g,16,a[38]),O,N,w,23,a[39]),T=d(T,O=d(O,N=d(N,C,T,O,m,4,a[40]),C,T,s,11,a[41]),N,C,_,16,a[42]),O,N,I,23,a[43]),T=d(T,O=d(O,N=d(N,C,T,O,y,4,a[44]),C,T,A,11,a[45]),N,C,D,16,a[46]),O,N,l,23,a[47]),T=h(T,O=h(O,N=h(N,C,T,O,s,6,a[48]),C,T,g,10,a[49]),N,C,M,15,a[50]),O,N,p,21,a[51]),T=h(T,O=h(O,N=h(N,C,T,O,A,6,a[52]),C,T,_,10,a[53]),N,C,w,15,a[54]),O,N,u,21,a[55]),T=h(T,O=h(O,N=h(N,C,T,O,S,6,a[56]),C,T,D,10,a[57]),N,C,I,15,a[58]),O,N,m,21,a[59]),T=h(T,O=h(O,N=h(N,C,T,O,v,6,a[60]),C,T,E,10,a[61]),N,C,l,15,a[62]),O,N,y,21,a[63]),o[0]=o[0]+N|0,o[1]=o[1]+C|0,o[2]=o[2]+T|0,o[3]=o[3]+O|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var f=u[c];u[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function d(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5}(n(0))},function(e,t,n){e.exports=function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(a[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],f=n[5],d=n[6],h=n[7],l=0;l<64;l++){if(l<16)c[l]=0|e[t+l];else{var _=c[l-15],v=(_<<25|_>>>7)^(_<<14|_>>>18)^_>>>3,p=c[l-2],I=(p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10;c[l]=v+c[l-7]+I+c[l-16]}var g=r&i^r&o^i&o,S=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),y=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&d)+u[l]+c[l];h=d,d=f,f=a,a=s+y|0,s=o,o=i,i=r,r=y+(S+g)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+f|0,n[6]=n[6]+d|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),e.SHA256}(n(0))},function(e,t,n){"use strict";var r;n.r(t),function(e){e.v1_0="00000",e.v1_18="01800",e.v1_19="01900",e.v1_20="02000",e.v1_32_COS="03200",e.v1_35="03500",e.v1_5H="05000",e.v1_5F="05050",e.v1_6="05070",e.v1_82="08200",e.v1_83="08300",e.ME_1_0="10000",e.ME_1_5="15000",e.ME_1_6="16000",e.Magx_0_0="20000"}(r||(r={}));var i;!function(e){e.UUID="UUIDv4",e.UUIDv1="UUIDv1",e.UUIDv4="UUIDv4",e.FileBased="FileBasedSHA",e.FileBasedSHA="FileBasedSHA",e.FileBasedMD5="FileBasedMD5",e.Pre1990ZCode="Pre1990ZCode",e.Post1990ZCode="Post1990ZCode",e.LegacyTADS2="TADS2",e.LegacyTADS3="TADS3",e.LegacyHugo="HUGO",e.DocumentedMagneticScrolls="DocumentedMagneticScrolls",e.UndocumentedMagneticScrolls="MAGNETIC",e.LegacyAGT="LegacyAGT",e.LegacyAdvSys="ADVSYS",e.MSDOS="MZ",e.Windows="MZ",e.OS2="MZ",e.ELF="ELF",e.Java="JAVA",e.AmigaOS="AMIGA",e.Script="SCRIPT",e.MacOSX="MACHO",e.MachO="MACHO",e.PreOSX="MAC",e.ALAN="ALAN"}(i||(i={}));var o;!function(e){e.ThePawn="The Pawn",e.GuildOfThieves="Guild of Thieves",e.Jinxter="Jinxter",e.Corruption="Corruption",e.Fish="Fish!",e.Myth="Myth",e.Wonderland="Wonderland"}(o||(o={}));var s=function(e){return-1!==Object.values(r).indexOf(e)},a=function(e){return e===i.LegacyTADS2||e===i.LegacyTADS3||e===i.LegacyHugo||e===i.LegacyAdvSys||"MZ"===e||e===i.ELF||e===i.Java||e===i.AmigaOS||e===i.Script||"MACHO"===e||e===i.PreOSX||e===i.ALAN},u=function(e){return-1!==Object.values(i).indexOf(e)},c=function(){return Boolean("undefined"!=typeof process&&process.versions&&process.versions.node)},f=function(e){return e===i.UUIDv1||e===i.UUIDv4},d=n(3),h=n.n(d),l=n(4),_=n.n(l);function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=n(5),I=n(6),g=n(7),S={AGT_SIGNATURE_INVALID:"The agtSignature option was missing from the options object. This property is needed for legacy AGT IFIDs.",AGT_VERSION_INVALID:"The agtVersion option was missing from the options object. This property is needed for legacy AGT IFIDs.",CHECKSUM_MISSING:"The checksum property was missing from the options object. This property is needed for post-1990 Z-Code IFIDs.",FILE_CONTENTS_MISSING:"An IFID version was selected requiring hashing the contents of a file, but no fileContents property was provided in the options object.",NAME_MISSING:"The name argument was not provided in the argument object.",NAMESPACE_ID_MISSING:"The namespace ID was not provided for the v3/5 UUID to be generated.",NO_HASHER_FOUND:"No suitable hashing function could be found.",RELEASE_NUMBER_MISSING:"The releaseNumber property was missing from the options object. This property is needed for Z-Code IFIDs.",SERIAL_CODE_MISSING:"The serialCode property was missing from the options object. This property is needed for Z-Code IFIDs.",UNRECOGNIZED_DOCUMENTED_MAGNETIC_SCROLLS_TITLE:"The title provided for a Magnetic Scrolls IFID was not recognized. An IFID should be constructed using the undocumented Magnetic Scrolls IFID pattern instead.",UUID_INVALID:"The UUID was not properly generated for the IFID before being requested.",VERSION_INVALID:"The version property of the provided argument object did not meet the isIFIDVersion type guard, or is not implemented.",VERSION_1_IN_BROWSER:"The version 1 UUID cannot be constructed in the browser."},y=function(){function e(e){if(this.__version=i.UUID,this.__id="",e&&"version"in e){if(!u(e.version))throw new Error(S.VERSION_INVALID);this.__version=e.version}var t=e&&"function"==typeof e.uuidGenerator?e.uuidGenerator:function(e){return e===i.UUIDv1?h()():_()()};if(this.version===i.UUIDv1){if(!c())throw new Error(S.VERSION_1_IN_BROWSER);this.__uuid=t(i.UUIDv1)}else if(this.version===i.UUIDv4)this.__uuid=t(i.UUIDv4);else if(this.version===i.FileBasedMD5){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var n=I(e.fileContents);this.__id=p.stringify(n)}else if(this.version===i.FileBasedSHA){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var r=g(e.fileContents),f=p.stringify(r);f.length>63?this.__id=f.slice(0,63):this.__id=f}else if(this.version===i.Pre1990ZCode){if(!e.releaseNumber)throw new Error(S.RELEASE_NUMBER_MISSING);if(!e.serialCode)throw new Error(S.SERIAL_CODE_MISSING);this.__id="ZCODE-"+e.releaseNumber+"-"+e.serialCode}else if(this.version===i.Post1990ZCode){if(!e.releaseNumber)throw new Error(S.RELEASE_NUMBER_MISSING);if(!e.serialCode)throw new Error(S.SERIAL_CODE_MISSING);if(!e.checksum)throw new Error(S.CHECKSUM_MISSING);this.__id="ZCODE-"+e.releaseNumber+"-"+e.serialCode+"-"+e.checksum}else if(a(this.version)){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var d=I(e.fileContents),l=p.stringify(d);this.__id=this.version+"-"+l}else if(this.version===i.DocumentedMagneticScrolls){if(!e.name)throw new Error(S.NAME_MISSING);var v=function(e){return e.replace(/[\s?!]/g,"").toLowerCase()},y=e.name;if(y===o.ThePawn||"thepawn"===v(y))this.__id="MAGNETIC-1";else if(y===o.GuildOfThieves||"guildofthieves"===v(y))this.__id="MAGNETIC-2";else if(y===o.Jinxter||"jinxter"===v(y))this.__id="MAGNETIC-3";else if(y===o.Corruption||"corruption"===v(y))this.__id="MAGNETIC-4";else if(y===o.Fish||"fish"===v(y))this.__id="MAGNETIC-5";else if(y===o.Myth||"myth"===v(y))this.__id="MAGNETIC-6";else{if(y!==o.Wonderland&&"wonderland"!==v(y))throw new Error(S.UNRECOGNIZED_DOCUMENTED_MAGNETIC_SCROLLS_TITLE);this.__id="MAGNETIC-7"}}else if(this.version===i.UndocumentedMagneticScrolls){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var w=I(e.fileContents),E=p.stringify(w);this.__id="MAGNETIC-"+E}else if(this.version===i.LegacyAGT){if(!s(e.agtVersion))throw new Error(S.AGT_VERSION_INVALID);if("string"!=typeof e.agtSignature||!e.agtSignature||8!==e.agtSignature.length)throw new Error(S.AGT_SIGNATURE_INVALID);var A=e.agtVersion,m="AGT-"+(e.agtLargeOrSoggy?A.slice(0,-1)+"1":A)+"-"+e.agtSignature;this.__id=m}}return e.prototype.toString=function(){return this.id},function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(e,[{key:"version",get:function(){return this.__version}},{key:"uuid",get:function(){return this.__uuid}},{key:"id",get:function(){if(f(this.version)){if(!this.uuid)throw new Error(S.UUID_INVALID);return this.uuid.toString()}return this.__id}}]),e}();n.d(t,"AGTVersions",function(){return r}),n.d(t,"IFIDVersions",function(){return i}),n.d(t,"MagneticScrollsDocumentedTitles",function(){return o}),n.d(t,"strings",function(){return S}),n.d(t,"IFID",function(){return y})}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ifid=t():e.ifid=t()}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=8)}([function(e,t,n){e.exports=function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=function(t){var t=t,n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}},o=0;o<t;o+=4){var a=i(4294967296*(n||e.random()));n=987654071*a(),r.push(4294967296*a()|0)}return new s.init(r,t)}}),a=r.enc={},u=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},f=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=4*o,u=i/a,c=(u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0))*o,f=e.min(4*c,i);if(c){for(var d=0;d<c;d+=o)this._doProcessBlock(r,d);var h=r.splice(0,c);n.sigBytes-=f}return new s.init(h,f)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(i.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math);return e}()},function(e,t){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);e.exports=function(){return n(r),r}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);e.exports=function(e,t){var r=t||0,i=n;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},function(e,t,n){var r,i,o=n(1),s=n(2),a=0,u=0;e.exports=function(e,t,n){var c=t&&n||0,f=t||[],d=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:i;if(null==d||null==h){var l=o();null==d&&(d=r=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==h&&(h=i=16383&(l[6]<<8|l[7]))}var _=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:u+1,p=_-a+(v-u)/1e4;if(p<0&&void 0===e.clockseq&&(h=h+1&16383),(p<0||_>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=_,u=v,i=h;var I=(1e4*(268435455&(_+=122192928e5))+v)%4294967296;f[c++]=I>>>24&255,f[c++]=I>>>16&255,f[c++]=I>>>8&255,f[c++]=255&I;var g=_/4294967296*1e4&268435455;f[c++]=g>>>8&255,f[c++]=255&g,f[c++]=g>>>24&15|16,f[c++]=g>>>16&255,f[c++]=h>>>8|128,f[c++]=255&h;for(var S=0;S<6;++S)f[c+S]=d[S];return t||s(f)}},function(e,t,n){var r=n(1),i=n(2);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||i(s)}},function(e,t,n){e.exports=function(e){return e.enc.Hex}(n(0))},function(e,t,n){e.exports=function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=e[t+0],u=e[t+1],l=e[t+2],_=e[t+3],v=e[t+4],p=e[t+5],I=e[t+6],g=e[t+7],S=e[t+8],y=e[t+9],w=e[t+10],E=e[t+11],A=e[t+12],m=e[t+13],M=e[t+14],D=e[t+15],N=o[0],C=o[1],T=o[2],O=o[3];C=h(C=h(C=h(C=h(C=d(C=d(C=d(C=d(C=f(C=f(C=f(C=f(C=c(C=c(C=c(C=c(C,T=c(T,O=c(O,N=c(N,C,T,O,s,7,a[0]),C,T,u,12,a[1]),N,C,l,17,a[2]),O,N,_,22,a[3]),T=c(T,O=c(O,N=c(N,C,T,O,v,7,a[4]),C,T,p,12,a[5]),N,C,I,17,a[6]),O,N,g,22,a[7]),T=c(T,O=c(O,N=c(N,C,T,O,S,7,a[8]),C,T,y,12,a[9]),N,C,w,17,a[10]),O,N,E,22,a[11]),T=c(T,O=c(O,N=c(N,C,T,O,A,7,a[12]),C,T,m,12,a[13]),N,C,M,17,a[14]),O,N,D,22,a[15]),T=f(T,O=f(O,N=f(N,C,T,O,u,5,a[16]),C,T,I,9,a[17]),N,C,E,14,a[18]),O,N,s,20,a[19]),T=f(T,O=f(O,N=f(N,C,T,O,p,5,a[20]),C,T,w,9,a[21]),N,C,D,14,a[22]),O,N,v,20,a[23]),T=f(T,O=f(O,N=f(N,C,T,O,y,5,a[24]),C,T,M,9,a[25]),N,C,_,14,a[26]),O,N,S,20,a[27]),T=f(T,O=f(O,N=f(N,C,T,O,m,5,a[28]),C,T,l,9,a[29]),N,C,g,14,a[30]),O,N,A,20,a[31]),T=d(T,O=d(O,N=d(N,C,T,O,p,4,a[32]),C,T,S,11,a[33]),N,C,E,16,a[34]),O,N,M,23,a[35]),T=d(T,O=d(O,N=d(N,C,T,O,u,4,a[36]),C,T,v,11,a[37]),N,C,g,16,a[38]),O,N,w,23,a[39]),T=d(T,O=d(O,N=d(N,C,T,O,m,4,a[40]),C,T,s,11,a[41]),N,C,_,16,a[42]),O,N,I,23,a[43]),T=d(T,O=d(O,N=d(N,C,T,O,y,4,a[44]),C,T,A,11,a[45]),N,C,D,16,a[46]),O,N,l,23,a[47]),T=h(T,O=h(O,N=h(N,C,T,O,s,6,a[48]),C,T,g,10,a[49]),N,C,M,15,a[50]),O,N,p,21,a[51]),T=h(T,O=h(O,N=h(N,C,T,O,A,6,a[52]),C,T,_,10,a[53]),N,C,w,15,a[54]),O,N,u,21,a[55]),T=h(T,O=h(O,N=h(N,C,T,O,S,6,a[56]),C,T,D,10,a[57]),N,C,I,15,a[58]),O,N,m,21,a[59]),T=h(T,O=h(O,N=h(N,C,T,O,v,6,a[60]),C,T,E,10,a[61]),N,C,l,15,a[62]),O,N,y,21,a[63]),o[0]=o[0]+N|0,o[1]=o[1]+C|0,o[2]=o[2]+T|0,o[3]=o[3]+O|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var f=u[c];u[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return a},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function f(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function d(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function h(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),e.MD5}(n(0))},function(e,t,n){e.exports=function(e){return function(t){var n=e,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(a[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var c=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],f=n[5],d=n[6],h=n[7],l=0;l<64;l++){if(l<16)c[l]=0|e[t+l];else{var _=c[l-15],v=(_<<25|_>>>7)^(_<<14|_>>>18)^_>>>3,p=c[l-2],I=(p<<15|p>>>17)^(p<<13|p>>>19)^p>>>10;c[l]=v+c[l-7]+I+c[l-16]}var g=r&i^r&o^i&o,S=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),y=h+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&d)+u[l]+c[l];h=d,d=f,f=a,a=s+y|0,s=o,o=i,i=r,r=y+(S+g)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+f|0,n[6]=n[6]+d|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),e.SHA256}(n(0))},function(e,t,n){"use strict";var r;n.r(t),function(e){e.v1_0="00000",e.v1_18="01800",e.v1_19="01900",e.v1_20="02000",e.v1_32_COS="03200",e.v1_35="03500",e.v1_5H="05000",e.v1_5F="05050",e.v1_6="05070",e.v1_82="08200",e.v1_83="08300",e.ME_1_0="10000",e.ME_1_5="15000",e.ME_1_6="16000",e.Magx_0_0="20000"}(r||(r={}));var i;!function(e){e.UUID="UUIDv4",e.UUIDv1="UUIDv1",e.UUIDv4="UUIDv4",e.FileBased="FileBasedSHA",e.FileBasedSHA="FileBasedSHA",e.FileBasedMD5="FileBasedMD5",e.Pre1990ZCode="Pre1990ZCode",e.Post1990ZCode="Post1990ZCode",e.LegacyTADS2="TADS2",e.LegacyTADS3="TADS3",e.LegacyHugo="HUGO",e.DocumentedMagneticScrolls="DocumentedMagneticScrolls",e.UndocumentedMagneticScrolls="MAGNETIC",e.LegacyAGT="LegacyAGT",e.LegacyAdvSys="ADVSYS",e.MSDOS="MZ",e.Windows="MZ",e.OS2="MZ",e.ELF="ELF",e.Java="JAVA",e.AmigaOS="AMIGA",e.Script="SCRIPT",e.MacOSX="MACHO",e.MachO="MACHO",e.PreOSX="MAC",e.ALAN="ALAN"}(i||(i={}));var o;!function(e){e.ThePawn="The Pawn",e.GuildOfThieves="Guild of Thieves",e.Jinxter="Jinxter",e.Corruption="Corruption",e.Fish="Fish!",e.Myth="Myth",e.Wonderland="Wonderland"}(o||(o={}));var s=function(e){return-1!==Object.values(r).indexOf(e)},a=function(e){return e===i.LegacyTADS2||e===i.LegacyTADS3||e===i.LegacyHugo||e===i.LegacyAdvSys||"MZ"===e||e===i.ELF||e===i.Java||e===i.AmigaOS||e===i.Script||"MACHO"===e||e===i.PreOSX||e===i.ALAN},u=function(e){return-1!==Object.values(i).indexOf(e)},c=function(){return Boolean("undefined"!=typeof process&&process.versions&&process.versions.node)},f=function(e){return e===i.UUIDv1||e===i.UUIDv4},d=n(3),h=n.n(d),l=n(4),_=n.n(l);function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=n(5),I=n(6),g=n(7),S={AGT_SIGNATURE_INVALID:"The agtSignature option was missing from the options object. This property is needed for legacy AGT IFIDs.",AGT_VERSION_INVALID:"The agtVersion option was missing from the options object. This property is needed for legacy AGT IFIDs.",CHECKSUM_MISSING:"The checksum property was missing from the options object. This property is needed for post-1990 Z-Code IFIDs.",FILE_CONTENTS_MISSING:"An IFID version was selected requiring hashing the contents of a file, but no fileContents property was provided in the options object.",NAME_MISSING:"The name argument was not provided in the argument object.",NAMESPACE_ID_MISSING:"The namespace ID was not provided for the v3/5 UUID to be generated.",NO_HASHER_FOUND:"No suitable hashing function could be found.",RELEASE_NUMBER_MISSING:"The releaseNumber property was missing from the options object. This property is needed for Z-Code IFIDs.",SERIAL_CODE_MISSING:"The serialCode property was missing from the options object. This property is needed for Z-Code IFIDs.",UNRECOGNIZED_DOCUMENTED_MAGNETIC_SCROLLS_TITLE:"The title provided for a Magnetic Scrolls IFID was not recognized. An IFID should be constructed using the undocumented Magnetic Scrolls IFID pattern instead.",UUID_INVALID:"The UUID was not properly generated for the IFID before being requested.",VERSION_INVALID:"The version property of the provided argument object did not meet the isIFIDVersion type guard, or is not implemented.",VERSION_1_IN_BROWSER:"The version 1 UUID cannot be constructed in the browser."},y=function(){function e(e){if(this.__version=i.UUID,this.__id="",e&&"version"in e){if(!u(e.version))throw new Error(S.VERSION_INVALID);this.__version=e.version}var t=e&&"function"==typeof e.uuidGenerator?e.uuidGenerator:function(e){return e===i.UUIDv1?h()():_()()};if(this.version===i.UUIDv1){if(!c())throw new Error(S.VERSION_1_IN_BROWSER);this.__uuid=t(i.UUIDv1)}else if(this.version===i.UUIDv4)this.__uuid=t(i.UUIDv4);else if(this.version===i.FileBasedMD5){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var n=I(e.fileContents);this.__id=p.stringify(n)}else if(this.version===i.FileBasedSHA){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var r=g(e.fileContents),f=p.stringify(r);f.length>63?this.__id=f.slice(0,63):this.__id=f}else if(this.version===i.Pre1990ZCode){if(!e.releaseNumber)throw new Error(S.RELEASE_NUMBER_MISSING);if(!e.serialCode)throw new Error(S.SERIAL_CODE_MISSING);this.__id="ZCODE-"+e.releaseNumber+"-"+e.serialCode}else if(this.version===i.Post1990ZCode){if(!e.releaseNumber)throw new Error(S.RELEASE_NUMBER_MISSING);if(!e.serialCode)throw new Error(S.SERIAL_CODE_MISSING);if(!e.checksum)throw new Error(S.CHECKSUM_MISSING);this.__id="ZCODE-"+e.releaseNumber+"-"+e.serialCode+"-"+e.checksum}else if(a(this.version)){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var d=I(e.fileContents),l=p.stringify(d);this.__id=this.version+"-"+l}else if(this.version===i.DocumentedMagneticScrolls){if(!e.name)throw new Error(S.NAME_MISSING);var v=function(e){return e.replace(/[\s?!]/g,"").toLowerCase()},y=e.name;if(y===o.ThePawn||"thepawn"===v(y))this.__id="MAGNETIC-1";else if(y===o.GuildOfThieves||"guildofthieves"===v(y))this.__id="MAGNETIC-2";else if(y===o.Jinxter||"jinxter"===v(y))this.__id="MAGNETIC-3";else if(y===o.Corruption||"corruption"===v(y))this.__id="MAGNETIC-4";else if(y===o.Fish||"fish"===v(y))this.__id="MAGNETIC-5";else if(y===o.Myth||"myth"===v(y))this.__id="MAGNETIC-6";else{if(y!==o.Wonderland&&"wonderland"!==v(y))throw new Error(S.UNRECOGNIZED_DOCUMENTED_MAGNETIC_SCROLLS_TITLE);this.__id="MAGNETIC-7"}}else if(this.version===i.UndocumentedMagneticScrolls){if(!e.fileContents)throw new Error(S.FILE_CONTENTS_MISSING);var w=I(e.fileContents),E=p.stringify(w);this.__id="MAGNETIC-"+E}else if(this.version===i.LegacyAGT){if(!s(e.agtVersion))throw new Error(S.AGT_VERSION_INVALID);if("string"!=typeof e.agtSignature||!e.agtSignature||8!==e.agtSignature.length)throw new Error(S.AGT_SIGNATURE_INVALID);var A=e.agtVersion,m="AGT-"+(e.agtLargeOrSoggy?A.slice(0,-1)+"1":A)+"-"+e.agtSignature;this.__id=m}}return e.prototype.toString=function(){return this.id},function(e,t,n){t&&v(e.prototype,t),n&&v(e,n)}(e,[{key:"version",get:function(){return this.__version}},{key:"uuid",get:function(){return this.__uuid}},{key:"id",get:function(){if(f(this.version)){if(!this.uuid)throw new Error(S.UUID_INVALID);return this.uuid}return this.__id}}]),e}();n.d(t,"AGTVersions",function(){return r}),n.d(t,"IFIDVersions",function(){return i}),n.d(t,"MagneticScrollsDocumentedTitles",function(){return o}),n.d(t,"strings",function(){return S}),n.d(t,"IFID",function(){return y})}])}); | ||
//# sourceMappingURL=index.js.map |
@@ -23,5 +23,3 @@ import { IFIDVersions } from '../Enums/IFIDVersions'; | ||
private __uuid?; | ||
readonly uuid: { | ||
toString(): string; | ||
} | undefined; | ||
readonly uuid: string | undefined; | ||
private __id; | ||
@@ -28,0 +26,0 @@ readonly id: string; |
@@ -211,3 +211,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
} | ||
return this.uuid.toString(); | ||
return this.uuid; | ||
} | ||
@@ -214,0 +214,0 @@ else { |
@@ -23,5 +23,3 @@ import { IFIDVersions } from '../Enums/IFIDVersions'; | ||
private __uuid?; | ||
readonly uuid: { | ||
toString(): string; | ||
} | undefined; | ||
readonly uuid: string | undefined; | ||
private __id; | ||
@@ -28,0 +26,0 @@ readonly id: string; |
@@ -197,3 +197,3 @@ import { IFIDVersions, } from '../Enums/IFIDVersions'; | ||
} | ||
return this.uuid.toString(); | ||
return this.uuid; | ||
} | ||
@@ -200,0 +200,0 @@ else { |
{ | ||
"name": "ifid", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A package to generate Interactive Fiction Identifiers.", | ||
@@ -5,0 +5,0 @@ "main": "dist/node.es6/index.js", |
@@ -10,3 +10,3 @@ [![Build Status](https://travis-ci.org/furkleindustries/ifid.svg?branch=master)](https://travis-ci.org/furkleindustries/ifid) | ||
An Interactive Fiction Identifier (IFID) generating class and helper functions. Implements both RFC 4122 UUIDs (versions 1 and 4), as well as essentially all of the Treaty of Babel, revision 9, as it applies to IFIDs. This package relies on the [big-uuid](https://github.com/furkleindustries/big-uuid) package for its generation of version 1 and version 4 UUIDs. | ||
An Interactive Fiction Identifier (IFID) generating class and helper functions. Implements both RFC 4122 UUIDs (versions 1 and 4), as well as essentially all of the Treaty of Babel, revision 9, as it applies to IFIDs. This package relies on the [uuid](https://npmjs.com/package/uuid) package for its generation of version 1 and version 4 UUIDs and [crypto-js](https://npmjs.com/package/crypto-js) for its usage of MD5 and SHA256 hashing. | ||
@@ -16,2 +16,2 @@ ## Usage notes | ||
* Many of the generation methods utilize MD5. This is for historical compatibility with many aspects of the Treaty of Babel. However, MD5 has since proven to be dangerously inadequate as a hashing algorithm, and extreme caution should be taken by anyone intending to use it to create a permanently unique identifier. | ||
* Generation of version 3 and version 5 UUIDs has been omitted from the IFID generator. If you want to generate these IDs, use [big-uuid](https://github.com/furkleindustries/big-uuid) directly. | ||
* Generation of version 3 and version 5 UUIDs has been omitted from the IFID generator. If you want to generate these IDs, use [uuid](https://npmjs.com/package/uuid) directly. |
@@ -95,4 +95,4 @@ import { | ||
private __uuid?: { toString(): string, }; | ||
get uuid(): { toString(): string, } | undefined { | ||
private __uuid?: string; | ||
get uuid(): string | undefined { | ||
return this.__uuid; | ||
@@ -108,3 +108,3 @@ } | ||
return this.uuid.toString(); | ||
return this.uuid; | ||
} else { | ||
@@ -111,0 +111,0 @@ return this.__id; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
196286
1682