awv3
Version:
⚡ AWV3 embedded CAD
1 lines • 315 kB
JavaScript
!function(U,s){"use strict";function f(r){return function(){var e=this,n=arguments;return new Promise(function(i,o){var a=r.apply(e,n);function t(e,t){try{var n=a[e](t),r=n.value}catch(e){return void o(e)}n.done?i(r):Promise.resolve(r).then(s,u)}function s(e){t("next",e)}function u(e){t("throw",e)}s()})}}function r(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)}}function a(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}function H(){return(H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function l(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function h(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e(e,t){return e.raw=t,e}s=s&&s.hasOwnProperty("default")?s.default:s;var u=function(){function n(){this._callbacks=void 0,this._inspectors=void 0}var e=n.prototype;return e.subscribe=function(e,t,n){return this.on(e,t,n).removeListener.bind(this,e,t)},e.once=function(e,t){this.on(e,t,{remove:!0})},e.onFirst=function(e,t){this.on(e,t,{priority:1})},e.onLast=function(e,t){this.on(e,t,{priority:-1})},e.on=function(e,t,n){if(void 0===e&&(e={}),void 0===t&&(t=void 0),void 0===n&&(n={}),Array.isArray(e)){var r=e,i=Array.isArray(r),o=0;for(r=i?r:r[Symbol.iterator]();;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var s=a;this.on(s,t,n)}}else if("object"==typeof e){"object"==typeof t&&(n=t);for(var u=Object.entries(e),c=0;c<u.length;c++){var l=u[c],f=l[0],h=l[1];"function"==typeof h&&this.on(f,h,n)}}else if("string"==typeof e&&"function"==typeof t){var d=e,p=t,v=n,m=v.remove,y=void 0!==m&&m,g=v.priority,b=void 0===g?0:g,_=v.sync,w=void 0!==_&&_;this._callbacks||(this._callbacks={});var k=this._callbacks[d];if(k||(k=this._callbacks[d]=[]),k.indexOf(p)<0&&(p.remove=y,p.sync=w,p.priority=b,k.push(p),k.sort(function(e,t){return t.priority-e.priority}),this._inspectors)){var x=this._inspectors,S=Array.isArray(x),E=0;for(x=S?x:x[Symbol.iterator]();;){var A;if(S){if(E>=x.length)break;A=x[E++]}else{if((E=x.next()).done)break;A=E.value}A({action:"Add",type:d,callback:p})}}}return this},e.inspect=function(e){this._inspectors||(this._inspectors=[]),this._inspectors.push(e)},e.removeListener=function(e,t){if(!Array.isArray(e)&&"object"==typeof e&&void 0===t){for(var n=Object.entries(e),r=0;r<n.length;r++){var i=n[r],o=i[0],a=i[1];this.removeListener(o,a)}return this}this._callbacks||(this._callbacks={});var s=e=Array.isArray(e)?e:[e],u=Array.isArray(s),c=0;for(s=u?s:s[Symbol.iterator]();;){var l;if(u){if(c>=s.length)break;l=s[c++]}else{if((c=s.next()).done)break;l=c.value}var f=l,h=this._callbacks[f];if(h)if(t){var d=h.indexOf(t);if(-1<d&&h.splice(d,1),this._inspectors){var p=this._inspectors,v=Array.isArray(p),m=0;for(p=v?p:p[Symbol.iterator]();;){var y;if(v){if(m>=p.length)break;y=p[m++]}else{if((m=p.next()).done)break;y=m.value}y({action:"Remove",type:f,callback:t})}}}else if(delete this._callbacks[f],this._inspectors){var g=this._inspectors,b=Array.isArray(g),_=0;for(g=b?g:g[Symbol.iterator]();;){var w;if(b){if(_>=g.length)break;w=g[_++]}else{if((_=g.next()).done)break;w=_.value}w({action:"Remove",type:f,callback:void 0})}}}return this},e.removeListeners=function(){this._callbacks=void 0},e.removeInspectors=function(){this._inspectors=void 0},e.emit=function(t){for(var n=this,e=arguments.length,r=new Array(1<e?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];this._callbacks||(this._callbacks={});var o=this._callbacks[t],a=o=o?o.concat():[],s=Array.isArray(a),u=0;for(a=s?a:a[Symbol.iterator]();;){var c;if(s){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var l=c;l.sync&&(l.remove&&this.removeListener(t,l),l.call.apply(l,[this].concat(r)))}var f=Promise.resolve(),h=function(e){e.sync||(f=f.then(function(){return e.remove&&n.removeListener(t,e),e.call.apply(e,[n].concat(r))}))},d=o,p=Array.isArray(d),v=0;for(d=p?d:d[Symbol.iterator]();;){var m;if(p){if(v>=d.length)break;m=d[v++]}else{if((v=d.next()).done)break;m=v.value}h(m)}return f},e.bubble=function(e){this._callbacks||(this._callbacks={});for(var t,n=this._callbacks[e],r=arguments.length,i=new Array(1<r?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n?this.emit.apply(this,[e].concat(i)):this.parent?(t=this.parent).bubble.apply(t,[e].concat(i)):Promise.resolve()},e.findListener=function(e){return this._callbacks||(this._callbacks={}),this._callbacks[e]?this:this.parent?this.parent.find(e):void 0},e.hasListener=function(e,t){void 0===t&&(t=void 0),this._callbacks||(this._callbacks={});var n=this._callbacks[e];return!(!n||t&&t!==n)},n.mixin=function(e,t){void 0===t&&(t=null),e.hasListener=n.prototype.hasListener,e.subscribe=n.prototype.subscribe,e.on=n.prototype.on,e.once=n.prototype.once,e.onFirst=n.prototype.onFirst,e.onLast=n.prototype.onLast,e.inspect=n.prototype.inspect,e.removeListener=n.prototype.removeListener,e.removeListeners=n.prototype.removeListeners,e.removeInspectors=n.prototype.removeInspectors,e.emit=n.prototype.emit,e.bubble=n.prototype.bubble,e.findListener=n.prototype.findListener,t&&e.on.bind(e)(t)},n}(),t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var d=n(function(e,r){r=e.exports=function(){for(var e,t="",n=0;n<32;n++)e=16*r.random()|0,4<n&&n<21&&!(n%4)&&(t+="-"),t+=(12===n?4:16===n?3&e|8:e).toString(16);return t};var t=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;r.isUUID=function(e){return t.test(e)},r.random=function(){return Math.random()}}),i=(d.isUUID,d.random,function(){function e(){var n=this;this.id=d(),this.worker=new Worker(window.URL.createObjectURL(new Blob(['"use strict";function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}function adler32(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{r=r+(a=a+t[n++]|0)|0}while(--o);a%=65521,r%=65521}return a|r<<16|0}function makeTable(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}function crc32(e,t,i,n){var a=crcTable,r=n+i;e^=-1;for(var o=n;o<r;o++)e=e>>>8^a[255&(e^t[o])];return-1^e}function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new common.Buf16(320),this.work=new common.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new common.Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new common.Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)):Z_STREAM_ERROR}function inflateReset2(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,inflateReset(e))):Z_STREAM_ERROR}function inflateInit2(e,t){var i,n;return e?(n=new InflateState,e.state=n,n.window=null,(i=inflateReset2(e,t))!==Z_OK&&(e.state=null),i):Z_STREAM_ERROR}function inflateInit(e){return inflateInit2(e,DEF_WBITS)}function fixedtables(e){if(virgin){var t;for(lenfix=new common.Buf32(512),distfix=new common.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inftrees(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inftrees(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new common.Buf8(r.wsize)),n>=r.wsize?(common.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>n&&(a=n),common.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(common.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=a))),0}function inflate$1(e,t){var i,n,a,r,o,s,l,f,c,d,h,u,m,_,p,b,g,v,E,w,y,S,k,A,R=0,T=new common.Buf8(4),x=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Z_STREAM_ERROR;(i=e.state).mode===TYPE&&(i.mode=TYPEDO),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,f=i.hold,c=i.bits,d=s,h=l,S=Z_OK;e:for(;;)switch(i.mode){case HEAD:if(0===i.wrap){i.mode=TYPEDO;break}for(;c<16;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(2&i.wrap&&35615===f){i.check=0,T[0]=255&f,T[1]=f>>>8&255,i.check=crc32_1(i.check,T,2,0),f=0,c=0,i.mode=FLAGS;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",i.mode=BAD;break}if((15&f)!==Z_DEFLATED){e.msg="unknown compression method",i.mode=BAD;break}if(f>>>=4,c-=4,y=8+(15&f),0===i.wbits)i.wbits=y;else if(y>i.wbits){e.msg="invalid window size",i.mode=BAD;break}i.dmax=1<<y,e.adler=i.check=1,i.mode=512&f?DICTID:TYPE,f=0,c=0;break;case FLAGS:for(;c<16;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(i.flags=f,(255&i.flags)!==Z_DEFLATED){e.msg="unknown compression method",i.mode=BAD;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=BAD;break}i.head&&(i.head.text=f>>8&1),512&i.flags&&(T[0]=255&f,T[1]=f>>>8&255,i.check=crc32_1(i.check,T,2,0)),f=0,c=0,i.mode=TIME;case TIME:for(;c<32;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}i.head&&(i.head.time=f),512&i.flags&&(T[0]=255&f,T[1]=f>>>8&255,T[2]=f>>>16&255,T[3]=f>>>24&255,i.check=crc32_1(i.check,T,4,0)),f=0,c=0,i.mode=OS;case OS:for(;c<16;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}i.head&&(i.head.xflags=255&f,i.head.os=f>>8),512&i.flags&&(T[0]=255&f,T[1]=f>>>8&255,i.check=crc32_1(i.check,T,2,0)),f=0,c=0,i.mode=EXLEN;case EXLEN:if(1024&i.flags){for(;c<16;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}i.length=f,i.head&&(i.head.extra_len=f),512&i.flags&&(T[0]=255&f,T[1]=f>>>8&255,i.check=crc32_1(i.check,T,2,0)),f=0,c=0}else i.head&&(i.head.extra=null);i.mode=EXTRA;case EXTRA:if(1024&i.flags&&((u=i.length)>s&&(u=s),u&&(i.head&&(y=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),common.arraySet(i.head.extra,n,r,u,y)),512&i.flags&&(i.check=crc32_1(i.check,n,u,r)),s-=u,r+=u,i.length-=u),i.length))break e;i.length=0,i.mode=NAME;case NAME:if(2048&i.flags){if(0===s)break e;u=0;do{y=n[r+u++],i.head&&y&&i.length<65536&&(i.head.name+=String.fromCharCode(y))}while(y&&u<s);if(512&i.flags&&(i.check=crc32_1(i.check,n,u,r)),s-=u,r+=u,y)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=COMMENT;case COMMENT:if(4096&i.flags){if(0===s)break e;u=0;do{y=n[r+u++],i.head&&y&&i.length<65536&&(i.head.comment+=String.fromCharCode(y))}while(y&&u<s);if(512&i.flags&&(i.check=crc32_1(i.check,n,u,r)),s-=u,r+=u,y)break e}else i.head&&(i.head.comment=null);i.mode=HCRC;case HCRC:if(512&i.flags){for(;c<16;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(f!==(65535&i.check)){e.msg="header crc mismatch",i.mode=BAD;break}f=0,c=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=TYPE;break;case DICTID:for(;c<32;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}e.adler=i.check=zswap32(f),f=0,c=0,i.mode=DICT;case DICT:if(0===i.havedict)return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,i.hold=f,i.bits=c,Z_NEED_DICT;e.adler=i.check=1,i.mode=TYPE;case TYPE:if(t===Z_BLOCK||t===Z_TREES)break e;case TYPEDO:if(i.last){f>>>=7&c,c-=7&c,i.mode=CHECK;break}for(;c<3;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}switch(i.last=1&f,f>>>=1,c-=1,3&f){case 0:i.mode=STORED;break;case 1:if(fixedtables(i),i.mode=LEN_,t===Z_TREES){f>>>=2,c-=2;break e}break;case 2:i.mode=TABLE;break;case 3:e.msg="invalid block type",i.mode=BAD}f>>>=2,c-=2;break;case STORED:for(f>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if((65535&f)!=(f>>>16^65535)){e.msg="invalid stored block lengths",i.mode=BAD;break}if(i.length=65535&f,f=0,c=0,i.mode=COPY_,t===Z_TREES)break e;case COPY_:i.mode=COPY;case COPY:if(u=i.length){if(u>s&&(u=s),u>l&&(u=l),0===u)break e;common.arraySet(a,n,r,u,o),s-=u,r+=u,l-=u,o+=u,i.length-=u;break}i.mode=TYPE;break;case TABLE:for(;c<14;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(i.nlen=257+(31&f),f>>>=5,c-=5,i.ndist=1+(31&f),f>>>=5,c-=5,i.ncode=4+(15&f),f>>>=4,c-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=BAD;break}i.have=0,i.mode=LENLENS;case LENLENS:for(;i.have<i.ncode;){for(;c<3;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}i.lens[x[i.have++]]=7&f,f>>>=3,c-=3}for(;i.have<19;)i.lens[x[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,k={bits:i.lenbits},S=inftrees(CODES,i.lens,0,19,i.lencode,0,i.work,k),i.lenbits=k.bits,S){e.msg="invalid code lengths set",i.mode=BAD;break}i.have=0,i.mode=CODELENS;case CODELENS:for(;i.have<i.nlen+i.ndist;){for(;R=i.lencode[f&(1<<i.lenbits)-1],p=R>>>24,b=R>>>16&255,g=65535&R,!(p<=c);){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(g<16)f>>>=p,c-=p,i.lens[i.have++]=g;else{if(16===g){for(A=p+2;c<A;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(f>>>=p,c-=p,0===i.have){e.msg="invalid bit length repeat",i.mode=BAD;break}y=i.lens[i.have-1],u=3+(3&f),f>>>=2,c-=2}else if(17===g){for(A=p+3;c<A;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}c-=p,y=0,u=3+(7&(f>>>=p)),f>>>=3,c-=3}else{for(A=p+7;c<A;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}c-=p,y=0,u=11+(127&(f>>>=p)),f>>>=7,c-=7}if(i.have+u>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=BAD;break}for(;u--;)i.lens[i.have++]=y}}if(i.mode===BAD)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=BAD;break}if(i.lenbits=9,k={bits:i.lenbits},S=inftrees(LENS,i.lens,0,i.nlen,i.lencode,0,i.work,k),i.lenbits=k.bits,S){e.msg="invalid literal/lengths set",i.mode=BAD;break}if(i.distbits=6,i.distcode=i.distdyn,k={bits:i.distbits},S=inftrees(DISTS,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,k),i.distbits=k.bits,S){e.msg="invalid distances set",i.mode=BAD;break}if(i.mode=LEN_,t===Z_TREES)break e;case LEN_:i.mode=LEN;case LEN:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,i.hold=f,i.bits=c,inffast(e,h),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,f=i.hold,c=i.bits,i.mode===TYPE&&(i.back=-1);break}for(i.back=0;R=i.lencode[f&(1<<i.lenbits)-1],p=R>>>24,b=R>>>16&255,g=65535&R,!(p<=c);){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(b&&0==(240&b)){for(v=p,E=b,w=g;R=i.lencode[w+((f&(1<<v+E)-1)>>v)],p=R>>>24,b=R>>>16&255,g=65535&R,!(v+p<=c);){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}f>>>=v,c-=v,i.back+=v}if(f>>>=p,c-=p,i.back+=p,i.length=g,0===b){i.mode=LIT;break}if(32&b){i.back=-1,i.mode=TYPE;break}if(64&b){e.msg="invalid literal/length code",i.mode=BAD;break}i.extra=15&b,i.mode=LENEXT;case LENEXT:if(i.extra){for(A=i.extra;c<A;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}i.length+=f&(1<<i.extra)-1,f>>>=i.extra,c-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=DIST;case DIST:for(;R=i.distcode[f&(1<<i.distbits)-1],p=R>>>24,b=R>>>16&255,g=65535&R,!(p<=c);){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(0==(240&b)){for(v=p,E=b,w=g;R=i.distcode[w+((f&(1<<v+E)-1)>>v)],p=R>>>24,b=R>>>16&255,g=65535&R,!(v+p<=c);){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}f>>>=v,c-=v,i.back+=v}if(f>>>=p,c-=p,i.back+=p,64&b){e.msg="invalid distance code",i.mode=BAD;break}i.offset=g,i.extra=15&b,i.mode=DISTEXT;case DISTEXT:if(i.extra){for(A=i.extra;c<A;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}i.offset+=f&(1<<i.extra)-1,f>>>=i.extra,c-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=BAD;break}i.mode=MATCH;case MATCH:if(0===l)break e;if(u=h-l,i.offset>u){if((u=i.offset-u)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=BAD;break}u>i.wnext?(u-=i.wnext,m=i.wsize-u):m=i.wnext-u,u>i.length&&(u=i.length),_=i.window}else _=a,m=o-i.offset,u=i.length;u>l&&(u=l),l-=u,i.length-=u;do{a[o++]=_[m++]}while(--u);0===i.length&&(i.mode=LEN);break;case LIT:if(0===l)break e;a[o++]=i.length,l--,i.mode=LEN;break;case CHECK:if(i.wrap){for(;c<32;){if(0===s)break e;s--,f|=n[r++]<<c,c+=8}if(h-=l,e.total_out+=h,i.total+=h,h&&(e.adler=i.check=i.flags?crc32_1(i.check,a,h,o-h):adler32_1(i.check,a,h,o-h)),h=l,(i.flags?f:zswap32(f))!==i.check){e.msg="incorrect data check",i.mode=BAD;break}f=0,c=0}i.mode=LENGTH;case LENGTH:if(i.wrap&&i.flags){for(;c<32;){if(0===s)break e;s--,f+=n[r++]<<c,c+=8}if(f!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=BAD;break}f=0,c=0}i.mode=DONE;case DONE:S=Z_STREAM_END;break e;case BAD:S=Z_DATA_ERROR;break e;case MEM:return Z_MEM_ERROR;case SYNC:default:return Z_STREAM_ERROR}return e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,i.hold=f,i.bits=c,(i.wsize||h!==e.avail_out&&i.mode<BAD&&(i.mode<CHECK||t!==Z_FINISH))&&updatewindow(e,e.output,e.next_out,h-e.avail_out)?(i.mode=MEM,Z_MEM_ERROR):(d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,i.total+=h,i.wrap&&h&&(e.adler=i.check=i.flags?crc32_1(i.check,a,h,e.next_out-h):adler32_1(i.check,a,h,e.next_out-h)),e.data_type=i.bits+(i.last?64:0)+(i.mode===TYPE?128:0)+(i.mode===LEN_||i.mode===COPY_?256:0),(0===d&&0===h||t===Z_FINISH)&&S===Z_OK&&(S=Z_BUF_ERROR),S)}function inflateEnd(e){if(!e||!e.state)return Z_STREAM_ERROR;var t=e.state;return t.window&&(t.window=null),e.state=null,Z_OK}function inflateGetHeader(e,t){var i;return e&&e.state?0==(2&(i=e.state).wrap)?Z_STREAM_ERROR:(i.head=t,t.done=!1,Z_OK):Z_STREAM_ERROR}function inflateSetDictionary(e,t){var i,n,a=t.length;return e&&e.state?0!==(i=e.state).wrap&&i.mode!==DICT?Z_STREAM_ERROR:i.mode===DICT&&(n=1,(n=adler32_1(n,t,a,0))!==i.check)?Z_DATA_ERROR:updatewindow(e,t,a,a)?(i.mode=MEM,Z_MEM_ERROR):(i.havedict=1,Z_OK):Z_STREAM_ERROR}function buf2binstring(e,t){if(t<65537&&(e.subarray&&STR_APPLY_UIA_OK||!e.subarray&&STR_APPLY_OK))return String.fromCharCode.apply(null,common.shrinkBuf(e,t));for(var i="",n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i}function ZStream(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}function GZheader(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);this.options=common.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zstream,this.strm.avail_out=0;var i=inflate_1$2.inflateInit2(this.strm,t.windowBits);if(i!==constants.Z_OK)throw new Error(messages[i]);this.header=new gzheader,inflate_1$2.inflateGetHeader(this.strm,this.header)}function inflate(e,t){var i=new Inflate(t);if(i.push(e,!0),i.err)throw i.msg||messages[i.err];return i.result}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function min(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2])}function max(e,t){e[0]=Math.max(e[0],t[0]),e[1]=Math.max(e[1],t[1]),e[2]=Math.max(e[2],t[2])}function expand(e,t,i){min(e,i),max(t,i)}function applyMatrix(e,t){var i=e[0],n=e[1],a=e[2];e[0]=t[0]*i+t[4]*n+t[8]*a+t[12],e[1]=t[1]*i+t[5]*n+t[9]*a+t[13],e[2]=t[2]*i+t[6]*n+t[10]*a+t[14]}function distance(e,t){var i=e[0],n=e[1],a=e[2],r=i-t[0],o=n-t[1],s=a-t[2];return Math.sqrt(r*r+o*o+s*s)}function unpack(e){var t=e.data;t instanceof Uint8Array||(t=base64Arraybuffer_2(e.data)),e.data=JSON.parse(inflate_2(t,{raw:!0,to:"string"})),e.size=t.length}function createRegionPoint(e,t,i){return{meta:_extends({},e,{id:i,parentId:e.id,position:e[t],type:"point"})}}var common=createCommonjsModule(function(e,t){function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var a in n)i(n,a)&&(e[a]=n[a])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),a);else for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){var t,i,n,a,r,o;for(n=0,t=0,i=e.length;t<i;t++)n+=e[t].length;for(o=new Uint8Array(n),a=0,t=0,i=e.length;t<i;t++)r=e[t],o.set(r,a),a+=r.length;return o}},r={arraySet:function(e,t,i,n,a){for(var r=0;r<n;r++)e[a+r]=t[i+r]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,a)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,r))},t.setTyped(n)}),common_1=common.assign,common_2=common.shrinkBuf,common_3=common.setTyped,common_4=common.Buf8,common_5=common.Buf16,common_6=common.Buf32,adler32_1=adler32,crcTable=makeTable(),crc32_1=crc32,BAD$1=30,TYPE$1=12,inffast=function(e,t){var i,n,a,r,o,s,l,f,c,d,h,u,m,_,p,b,g,v,E,w,y,S,k,A,R;i=e.state,n=e.next_in,A=e.input,a=n+(e.avail_in-5),r=e.next_out,R=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),l=i.dmax,f=i.wsize,c=i.whave,d=i.wnext,h=i.window,u=i.hold,m=i.bits,_=i.lencode,p=i.distcode,b=(1<<i.lenbits)-1,g=(1<<i.distbits)-1;e:do{m<15&&(u+=A[n++]<<m,m+=8,u+=A[n++]<<m,m+=8),v=_[u&b];t:for(;;){if(E=v>>>24,u>>>=E,m-=E,0===(E=v>>>16&255))R[r++]=65535&v;else{if(!(16&E)){if(0==(64&E)){v=_[(65535&v)+(u&(1<<E)-1)];continue t}if(32&E){i.mode=TYPE$1;break e}e.msg="invalid literal/length code",i.mode=BAD$1;break e}w=65535&v,(E&=15)&&(m<E&&(u+=A[n++]<<m,m+=8),w+=u&(1<<E)-1,u>>>=E,m-=E),m<15&&(u+=A[n++]<<m,m+=8,u+=A[n++]<<m,m+=8),v=p[u&g];i:for(;;){if(E=v>>>24,u>>>=E,m-=E,!(16&(E=v>>>16&255))){if(0==(64&E)){v=p[(65535&v)+(u&(1<<E)-1)];continue i}e.msg="invalid distance code",i.mode=BAD$1;break e}if(y=65535&v,E&=15,m<E&&(u+=A[n++]<<m,(m+=8)<E&&(u+=A[n++]<<m,m+=8)),(y+=u&(1<<E)-1)>l){e.msg="invalid distance too far back",i.mode=BAD$1;break e}if(u>>>=E,m-=E,E=r-o,y>E){if((E=y-E)>c&&i.sane){e.msg="invalid distance too far back",i.mode=BAD$1;break e}if(S=0,k=h,0===d){if(S+=f-E,E<w){w-=E;do{R[r++]=h[S++]}while(--E);S=r-y,k=R}}else if(d<E){if(S+=f+d-E,(E-=d)<w){w-=E;do{R[r++]=h[S++]}while(--E);if(S=0,d<w){w-=E=d;do{R[r++]=h[S++]}while(--E);S=r-y,k=R}}}else if(S+=d-E,E<w){w-=E;do{R[r++]=h[S++]}while(--E);S=r-y,k=R}for(;w>2;)R[r++]=k[S++],R[r++]=k[S++],R[r++]=k[S++],w-=3;w&&(R[r++]=k[S++],w>1&&(R[r++]=k[S++]))}else{S=r-y;do{R[r++]=R[S++],R[r++]=R[S++],R[r++]=R[S++],w-=3}while(w>2);w&&(R[r++]=R[S++],w>1&&(R[r++]=R[S++]))}break}}break}}while(n<a&&r<s);n-=w=m>>3,u&=(1<<(m-=w<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n<a?a-n+5:5-(n-a),e.avail_out=r<s?s-r+257:257-(r-s),i.hold=u,i.bits=m},MAXBITS=15,ENOUGH_LENS$1=852,ENOUGH_DISTS$1=592,CODES$1=0,LENS$1=1,DISTS$1=2,lbase=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lext=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],dbase=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],dext=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],inftrees=function(e,t,i,n,a,r,o,s){var l,f,c,d,h,u,m,_,p,b=s.bits,g=0,v=0,E=0,w=0,y=0,S=0,k=0,A=0,R=0,T=0,x=null,D=0,I=new common.Buf16(MAXBITS+1),O=new common.Buf16(MAXBITS+1),B=null,N=0;for(g=0;g<=MAXBITS;g++)I[g]=0;for(v=0;v<n;v++)I[t[i+v]]++;for(y=b,w=MAXBITS;w>=1&&0===I[w];w--);if(y>w&&(y=w),0===w)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(E=1;E<w&&0===I[E];E++);for(y<E&&(y=E),A=1,g=1;g<=MAXBITS;g++)if(A<<=1,(A-=I[g])<0)return-1;if(A>0&&(e===CODES$1||1!==w))return-1;for(O[1]=0,g=1;g<MAXBITS;g++)O[g+1]=O[g]+I[g];for(v=0;v<n;v++)0!==t[i+v]&&(o[O[t[i+v]]++]=v);if(e===CODES$1?(x=B=o,u=19):e===LENS$1?(x=lbase,D-=257,B=lext,N-=257,u=256):(x=dbase,B=dext,u=-1),T=0,v=0,g=E,h=r,S=y,k=0,c=-1,R=1<<y,d=R-1,e===LENS$1&&R>ENOUGH_LENS$1||e===DISTS$1&&R>ENOUGH_DISTS$1)return 1;for(;;){m=g-k,o[v]<u?(_=0,p=o[v]):o[v]>u?(_=B[N+o[v]],p=x[D+o[v]]):(_=96,p=0),l=1<<g-k,E=f=1<<S;do{a[h+(T>>k)+(f-=l)]=m<<24|_<<16|p|0}while(0!==f);for(l=1<<g-1;T&l;)l>>=1;if(0!==l?(T&=l-1,T+=l):T=0,v++,0==--I[g]){if(g===w)break;g=t[i+o[v]]}if(g>y&&(T&d)!==c){for(0===k&&(k=y),h+=E,A=1<<(S=g-k);S+k<w&&!((A-=I[S+k])<=0);)S++,A<<=1;if(R+=1<<S,e===LENS$1&&R>ENOUGH_LENS$1||e===DISTS$1&&R>ENOUGH_DISTS$1)return 1;a[c=T&d]=y<<24|S<<16|h-r|0}}return 0!==T&&(a[h+T]=g-k<<24|64<<16|0),s.bits=y,0},CODES=0,LENS=1,DISTS=2,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,Z_DEFLATED=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS,virgin=!0,lenfix,distfix,inflateReset_1=inflateReset,inflateReset2_1=inflateReset2,inflateResetKeep_1=inflateResetKeep,inflateInit_1=inflateInit,inflateInit2_1=inflateInit2,inflate_2$1=inflate$1,inflateEnd_1=inflateEnd,inflateGetHeader_1=inflateGetHeader,inflateSetDictionary_1=inflateSetDictionary,inflateInfo="pako inflate (from Nodeca project)",inflate_1$2={inflateReset:inflateReset_1,inflateReset2:inflateReset2_1,inflateResetKeep:inflateResetKeep_1,inflateInit:inflateInit_1,inflateInit2:inflateInit2_1,inflate:inflate_2$1,inflateEnd:inflateEnd_1,inflateGetHeader:inflateGetHeader_1,inflateSetDictionary:inflateSetDictionary_1,inflateInfo:inflateInfo},STR_APPLY_OK=!0,STR_APPLY_UIA_OK=!0;try{String.fromCharCode.apply(null,[0])}catch(e){STR_APPLY_OK=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){STR_APPLY_UIA_OK=!1}for(var _utf8len=new common.Buf8(256),q=0;q<256;q++)_utf8len[q]=q>=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;_utf8len[254]=_utf8len[254]=1;var string2buf=function(e){var t,i,n,a,r,o=e.length,s=0;for(a=0;a<o;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),s+=i<128?1:i<2048?2:i<65536?3:4;for(t=new common.Buf8(s),r=0,a=0;r<s;a++)55296==(64512&(i=e.charCodeAt(a)))&&a+1<o&&56320==(64512&(n=e.charCodeAt(a+1)))&&(i=65536+(i-55296<<10)+(n-56320),a++),i<128?t[r++]=i:i<2048?(t[r++]=192|i>>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},buf2binstring_1=function(e){return buf2binstring(e,e.length)},binstring2buf=function(e){for(var t=new common.Buf8(e.length),i=0,n=t.length;i<n;i++)t[i]=e.charCodeAt(i);return t},buf2string=function(e,t){var i,n,a,r,o=t||e.length,s=new Array(2*o);for(n=0,i=0;i<o;)if((a=e[i++])<128)s[n++]=a;else if((r=_utf8len[a])>4)s[n++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;r>1&&i<o;)a=a<<6|63&e[i++],r--;r>1?s[n++]=65533:a<65536?s[n++]=a:(a-=65536,s[n++]=55296|a>>10&1023,s[n++]=56320|1023&a)}return buf2binstring(s,n)},utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+_utf8len[e[i]]>t?i:t},strings={string2buf:string2buf,buf2binstring:buf2binstring_1,binstring2buf:binstring2buf,buf2string:buf2string,utf8border:utf8border},constants={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},zstream=ZStream,gzheader=GZheader,toString=Object.prototype.toString;Inflate.prototype.push=function(e,t){var i,n,a,r,o,s,l=this.strm,f=this.options.chunkSize,c=this.options.dictionary,d=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?constants.Z_FINISH:constants.Z_NO_FLUSH,"string"==typeof e?l.input=strings.binstring2buf(e):"[object ArrayBuffer]"===toString.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new common.Buf8(f),l.next_out=0,l.avail_out=f),(i=inflate_1$2.inflate(l,constants.Z_NO_FLUSH))===constants.Z_NEED_DICT&&c&&(s="string"==typeof c?strings.string2buf(c):"[object ArrayBuffer]"===toString.call(c)?new Uint8Array(c):c,i=inflate_1$2.inflateSetDictionary(this.strm,s)),i===constants.Z_BUF_ERROR&&!0===d&&(i=constants.Z_OK,d=!1),i!==constants.Z_STREAM_END&&i!==constants.Z_OK)return this.onEnd(i),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&i!==constants.Z_STREAM_END&&(0!==l.avail_in||n!==constants.Z_FINISH&&n!==constants.Z_SYNC_FLUSH)||("string"===this.options.to?(a=strings.utf8border(l.output,l.next_out),r=l.next_out-a,o=strings.buf2string(l.output,a),l.next_out=r,l.avail_out=f-r,r&&common.arraySet(l.output,l.output,a,r,0),this.onData(o)):this.onData(common.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(d=!0)}while((l.avail_in>0||0===l.avail_out)&&i!==constants.Z_STREAM_END);return i===constants.Z_STREAM_END&&(n=constants.Z_FINISH),n===constants.Z_FINISH?(i=inflate_1$2.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===constants.Z_OK):n!==constants.Z_SYNC_FLUSH||(this.onEnd(constants.Z_OK),l.avail_out=0,!0)},Inflate.prototype.onData=function(e){this.chunks.push(e)},Inflate.prototype.onEnd=function(e){e===constants.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=common.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var inflate_2=inflate,base64Arraybuffer=createCommonjsModule(function(e,t){!function(){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),n=0;n<e.length;n++)i[e.charCodeAt(n)]=n;t.encode=function(t){var i,n=new Uint8Array(t),a=n.length,r="";for(i=0;i<a;i+=3)r+=e[n[i]>>2],r+=e[(3&n[i])<<4|n[i+1]>>4],r+=e[(15&n[i+1])<<2|n[i+2]>>6],r+=e[63&n[i+2]];return a%3==2?r=r.substring(0,r.length-1)+"=":a%3==1&&(r=r.substring(0,r.length-2)+"=="),r},t.decode=function(e){var t,n,a,r,o,s=.75*e.length,l=e.length,f=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),d=new Uint8Array(c);for(t=0;t<l;t+=4)n=i[e.charCodeAt(t)],a=i[e.charCodeAt(t+1)],r=i[e.charCodeAt(t+2)],o=i[e.charCodeAt(t+3)],d[f++]=n<<2|a>>4,d[f++]=(15&a)<<4|r>>2,d[f++]=(3&r)<<6|63&o;return c}}()}),base64Arraybuffer_1=base64Arraybuffer.encode,base64Arraybuffer_2=base64Arraybuffer.decode;self.addEventListener("message",function(e){if(e=e.data,"object"!==_typeof(e)&&(e=JSON.parse(e)),"Materials"!==e.command){"Blob"!==e.command||"Binary"!==e.type&&"Base64"!==e.type||(delete e.type,unpack(e),Array.isArray(e.data)&&(e.data=e.data[0]));for(var t=e,i=t.data,n=t.task,a=t.options,r=i.containers,o=Array.isArray(r),s=0,r=o?r:r[Symbol.iterator]();;){var l;if(o){if(s>=r.length)break;l=r[s++]}else{if((s=r.next()).done)break;l=s.value}var f=l,c=f.id,d=f.owner,h=f.properties,u=f.meshes,m=void 0===u?[]:u,_=f.lines,p=void 0===_?[]:_,b=f.arcs,g=void 0===b?[]:b,v=f.edges,E=void 0===v?[]:v,w=h.material,y=[],S=void 0,k=void 0,A=void 0,R=void 0,T=void 0,x=void 0,D=void 0;if(p.length>0||g.length>0||E.length>0){var I,O;!function(){var e=void 0,t=0,i=f.line={groups:[],points:[]},n=p.reduce(function(e,t){return e+t.points.length},0),r=E.reduce(function(e,t){return e+6*(t.points.length/3-1)},0),o=g.reduce(function(e,t){return e+384},0);i.vertices=new Float32Array(n+r+o),y.push(i.vertices.buffer),i.distances=new Float32Array((n+r+o)/3),y.push(i.distances.buffer);var s=void 0,l=void 0;n=0;for(var u=0,m=p.length;u<m;u++){e=p[u],k=e.points,a.materials.multi&&(e.properties=_extends({material:{}},e.properties),x=e.properties.material.color||w.color||[0,0,0],x=[x[0]/255,x[1]/255,x[2]/255],D=e.properties.material.opacity?e.properties.material.opacity:w.opacity,D=void 0!==D?D:0,S={start:n,count:k.length,index:i.groups.length,meta:_extends({id:e.id,container:c,owner:d,layer:e.properties.layer||h.layer},e.meta,{type:"line",start:[k[0],k[1],k[2]],end:[k[k.length-3],k[k.length-2],k[k.length-1]],min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0],material:{color:x,opacity:D}})},void 0!==w.type&&(S.meta.material.type=w.type),void 0!==w.linetype&&(S.meta.material.linetype=w.linetype),i.groups.push(S),a.interpolatePoints&&(i.points.push(createRegionPoint(S.meta,"start",e.pointIds[0])),i.points.push(createRegionPoint(S.meta,"end",e.pointIds[1]))));for(var _=0,b=k.length/6;_<b;_++)n+=6,s=[k[6*_+0],k[6*_+1],k[6*_+2]],i.vertices[t++]=s[0],i.vertices[t++]=s[1],i.vertices[t++]=s[2],a.materials.multi&&expand(S.meta.min,S.meta.max,s),l=[k[6*_+3],k[6*_+4],k[6*_+5]],i.vertices[t++]=l[0],i.vertices[t++]=l[1],i.vertices[t++]=l[2],a.materials.multi&&expand(S.meta.min,S.meta.max,l)}for(var v=0,B=E.length;v<B;v++){e=E[v],k=e.points,a.materials.multi&&(e.properties=_extends({material:{}},e.properties),x=e.properties.material.color||w.color||[0,0,0],x=[x[0]/255,x[1]/255,x[2]/255],D=e.properties.material.opacity?e.properties.material.opacity:w.opacity,D=void 0!==D?D:0,S={start:n,count:6*(k.length/3-1),index:i.groups.length,meta:_extends({id:e.id,container:c,owner:d,layer:e.properties.layer||h.layer},e.meta,{type:"line",start:[k[0],k[1],k[2]],end:[k[k.length-3],k[k.length-2],k[k.length-1]],min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0],material:{color:x,opacity:D}})},void 0!==w.type&&(S.meta.material.type=w.type),void 0!==w.linetype&&(S.meta.material.linetype=w.linetype),i.groups.push(S),a.interpolatePoints&&(i.points.push(createRegionPoint(S.meta,"start",e.pointIds[0])),i.points.push(createRegionPoint(S.meta,"end",e.pointIds[1]))));for(var N=1,Z=k.length/3;N<Z;N++)n+=6,s=[k[3*N-3],k[3*N-2],k[3*N-1]],i.vertices[t++]=s[0],i.vertices[t++]=s[1],i.vertices[t++]=s[2],a.materials.multi&&expand(S.meta.min,S.meta.max,s),l=[k[3*N+0],k[3*N+1],k[3*N+2]],i.vertices[t++]=l[0],i.vertices[t++]=l[1],i.vertices[t++]=l[2],a.materials.multi&&expand(S.meta.min,S.meta.max,l)}for(var M=void 0,C=void 0,L=void 0,P=void 0,H=void 0,U=void 0,F=void 0,Y=void 0,K=void 0,$=void 0,z=0,G=g.length;z<G;z++){M=(e=g[z]).radius,C=0,L=Math.abs(Math.abs(e.angle)-Math.PI)<1e-6?2*Math.PI:e.angle,P=e.center,H=e.zAxis,U=e.xAxis;var X=F=e.zAxis;A=X[0],R=X[1],T=X[2],F[0]=R*U[2]-T*U[1],F[1]=T*U[0]-A*U[2],F[2]=A*U[1]-R*U[0],0!==(Y=Math.sqrt(F[0]*F[0]+F[1]*F[1]+F[2]*F[2]))?(K=1/Y,F[0]*=K,F[1]*=K,F[2]*=K):F[0]=F[1]=F[2]=0;var j=[U[0],U[1],U[2],0,F[0],F[1],F[2],0,H[0],H[1],H[2],0,P[0],P[1],P[2],1];$=C/64*L,applyMatrix(l=[M*Math.cos($),M*Math.sin($),0],j),a.materials.multi&&(e.properties=_extends({material:{}},e.properties),x=e.properties.material.color||w.color||[0,0,0],x=[x[0]/255,x[1]/255,x[2]/255],D=e.properties.material.opacity?e.properties.material.opacity:w.opacity,D=void 0!==D?D:0,S={start:n,count:384,index:i.groups.length,meta:_extends({},e.meta,{id:e.id,container:c,owner:d,layer:e.properties.layer||h.layer,type:"arc",circle:e.isCircle,angle:e.angle,start:l,radius:M,thetaStart:C,thetaLength:L,center:P,zAxis:H,xAxis:U,yAxis:F,min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0],material:{color:x,opacity:D}})},void 0!==w.type&&(S.meta.material.type=w.type),void 0!==w.linetype&&(S.meta.material.linetype=w.linetype),i.groups.push(S),a.interpolatePoints&&(i.points.push(createRegionPoint(S.meta,"start",e.pointIds[0])),i.points.push(createRegionPoint(S.meta,"center",S.meta.id+"_c"))),expand(S.meta.min,S.meta.max,l));for(var q=1;q<=64;q++)n+=6,s=[l[0],l[1],l[2]],i.vertices[t++]=s[0],i.vertices[t++]=s[1],i.vertices[t++]=s[2],a.materials.multi&&expand(S.meta.min,S.meta.max,s),$=C+q/64*L,applyMatrix(l=[M*Math.cos($),M*Math.sin($),0],j),i.vertices[t++]=l[0],i.vertices[t++]=l[1],i.vertices[t++]=l[2],a.materials.multi&&expand(S.meta.min,S.meta.max,l);a.materials.multi&&(S.meta.end=l,a.interpolatePoints&&i.points.push(createRegionPoint(S.meta,"end",e.pointIds[1])))}var W=0,J=0,Q=i.vertices;for(I=0,O=Q.length/3;I<O;I++)I>0&&(W+=distance([i.vertices[3*I+0],i.vertices[3*I+1],i.vertices[3*I+2]],[i.vertices[3*(I-1)+0],i.vertices[3*(I-1)+1],i.vertices[3*(I-1)+2]])),i.distances[J++]=W;delete f.lines}()}if(m.length>0){for(var B=void 0,N=0,Z=0,M=0,C=0,L=f.mesh={groups:[]},P=0,H=m.length;P<H;P++)N+=(B=m[P]).vertices.length,Z+=B.indices.length,B.uvs&&(M+=B.uvs.length),B.normals&&(C+=B.normals.length);if(N>0){L.vertices=new Float32Array(N),y.push(L.vertices.buffer),L.indices=new Uint32Array(Z),y.push(L.indices.buffer),M>0&&(L.uvs=new Float32Array(M),y.push(L.uvs.buffer)),C>0&&(L.normals=new Float32Array(C),y.push(L.normals.buffer)),N=0,Z=0,M=0,C=0;for(var U=0,F=0,Y=0;Y<m.length;Y++){B=m[Y],a.materials.multi&&(B.properties=_extends({material:{},surface:{}},B.properties),x=B.properties.material.color||w.color||[0,0,0],x=[x[0]/255,x[1]/255,x[2]/255],D=B.properties.material.opacity?B.properties.material.opacity:w.opacity,D=void 0!==D?D:0,S={start:F,count:B.indices.length,index:L.groups.length,meta:_extends({},B.meta,{id:B.id,container:c,owner:d,operationId:B.properties.operationId,layer:B.properties.layer||h.layer,type:B.properties.surface.type},B.properties.surface,{min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0],material:{color:x,opacity:D},loops:B.loops})},L.groups.push(S),F+=B.indices.length);for(var K=0,$=B.vertices.length/3;K<$;K++)A=B.vertices[3*K+0],R=B.vertices[3*K+1],T=B.vertices[3*K+2],a.materials.multi&&expand(S.meta.min,S.meta.max,[A,R,T]),L.vertices[N++]=A,L.vertices[N++]=R,L.vertices[N++]=T;for(var z=0,G=B.indices.length;z<G;z++)L.indices[Z++]=B.indices[z]+U;if(B.uvs)for(var X=0,j=B.uvs.length;X<j;X++)L.uvs[M++]=B.uvs[X];if(B.normals)for(var q=0,W=B.normals.length;q<W;q++)L.normals[C++]=B.normals[q];U+=B.vertices.length/3}}delete f.meshes}self.postMessage({action:"Result",result:f,task:n},y)}self.postMessage({action:"Finished",task:n})}else console.log("received materials")},!1);']))),this.promises={},this.requests=0,this.worker.addEventListener("message",function(e){switch(e.data.action){case"Finished":var t=n.promises[e.data.task].resolve;delete n.promises[e.data.task],t(e.data),--n.requests<0&&(n.requests=0);break;case"Result":n.promises[e.data.task].callback&&n.promises[e.data.task].callback(e.data.result)}},!1)}return e.prototype.post=function(t,e){var n=this;t.parent=this.id,t.task=d();var r={callback:e};return(this.promises[t.task]=r).promise=new Promise(function(e){r.resolve=e,"Binary"===t.type?n.worker.postMessage(t,[t.data.buffer]):n.worker.postMessage(JSON.stringify(t))}),r.promise},e.getFreeCore=function(){var e=void 0,t=c,n=Array.isArray(t),r=0;for(t=n?t:t[Symbol.iterator]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var o=i;if(0==o.requests&&0==Object.keys(o.promises).length){e=o;break}}if(void 0===e){var a=c.sort(function(e,t){return e.requests>t.requests}),s=a.filter(function(e){return e.requests===a[0].requests});e=s[Math.round(Math.random()*(s.length-1))]}return e.requests++,e},e.callWorkers=function(e){var t=c,n=Array.isArray(t),r=0;for(t=n?t:t[Symbol.iterator]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}i.worker.postMessage(e)}},e}()),c=Array.from(new Array(navigator.hardwareConcurrency||4),function(){return new i});var o={unpack:function(e,t){return i.getFreeCore().post(e,t)},resolution:1,gpu:!1,up:[0,1,0],stats:!1,debug:!1,fadeDuration:600,interpolatePoints:!1,clone:!0,ambientIntensity:1,renderOrder:{Mesh:0,LineSegments:100,Point:1e3},updateView:{focus:!1,zoom:!1,rotate:!1,layers:!1},materials:{lazy:!1,multi:!0,lineDistances:!0,shadows:!0,lights:!0},lineShader:U.LineBasicMaterial,lineShaderOptions:{transparent:!0,fog:!1},meshShader:U.MeshPhysicalMaterial,meshShaderOptions:{transparent:!0,fog:!1,polygonOffset:!0,polygonOffsetFactor:1,polygonOffsetUnits:1,emissive:new U.Color(0),reflectivity:1,metalness:.5,roughness:.65,clearCoat:1,clearCoatRoughness:.7,envMapIntensity:1}},v=function(r){function i(){var n;n=r.call(this)||this;var e=function(t){Object.defineProperty(p(n),t,{configurable:!0,get:function(){return o[t]},set:function(e){return n.emit(i.Events.Changed,t,o[t]=e)}})};for(var t in o)e(t);return n}return l(i,r),a(i,[{key:"all",get:function(){return o}}]),i}(u);v.Events={Changed:"Changed"};var m=new v;function y(e){throw new Error(e)}function g(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var r=t[n].split("=");if(r[0]==e)return r[1]}}function b(e){return("string"==typeof e||e instanceof String)&&(e=document.querySelector(e)),e}function _(e,t,n,r){var i,o,a,s=["-moz-","-webkit-","-o-","-ms-","-khtml-"];e.style[t]="",a=e.style[t];try{if(e.style[t]=n,e.style[t]!==a)return}catch(e){}for(i=0;i<s.length;++i){o=s[i]+n;try{if(e.style[t]=o,e.style[t]!==a)return}catch(e){}}e.style[t]=r}function V(e){var r=[];return e.forEach(function(t){var n=!1;r.forEach(function(e){t.meta.id===e.meta.id&&t.meta.position.x===e.meta.position.x&&t.meta.position.y===e.meta.position.y&&t.meta.position.z==e.meta.position.z&&(n=!0)}),n||r.push(t)}),r}var w=Object.freeze({errUndefined:y,url:g,queryDom:b,setPrefixedValue:_,mergePoints:V});var k=function(){this.__data__=[],this.size=0};var x=function(e,t){return e===t||e!=e&&t!=t};var S=function(e,t){for(var n=e.length;n--;)if(x(e[n][0],t))return n;return-1},E=Array.prototype.splice;var A=function(e){var t=this.__data__,n=S(t,e);return!(n<0||(n==t.length-1?t.pop():E.call(t,n,1),--this.size,0))};var C=function(e){var t=this.__data__,n=S(t,e);return n<0?void 0:t[n][1]};var P=function(e){return-1<S(this.__data__,e)};var T=function(e,t){var n=this.__data__,r=S(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function O(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}O.prototype.clear=k,O.prototype.delete=A,O.prototype.get=C,O.prototype.has=P,O.prototype.set=T;var j=O;var R=function(){this.__data__=new j,this.size=0};var D=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var M=function(e){return this.__data__.get(e)};var I=function(e){return this.__data__.has(e)},F="object"==typeof t&&t&&t.Object===Object&&t,z="object"==typeof self&&self&&self.Object===Object&&self,B=F||z||Function("return this")(),N=B.Symbol,L=Object.prototype,Z=L.hasOwnProperty,q=L.toString,W=N?N.toStringTag:void 0;var Y=function(e){var t=Z.call(e,W),n=e[W];try{e[W]=void 0}catch(e){}var r=q.call(e);return t?e[W]=n:delete e[W],r},$=Object.prototype.toString;var G=function(e){return $.call(e)},X=N?N.toStringTag:void 0;var K=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?Y(e):G(e)};var Q=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var J,ee=function(e){if(!Q(e))return!1;var t=K(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},te=B["__core-js_shared__"],ne=(J=/[^.]+$/.exec(te&&te.keys&&te.keys.IE_PROTO||""))?"Symbol(src)_1."+J:"";var re=function(e){return!!ne&&ne in e},ie=Function.prototype.toString;var oe=function(e){if(null!=e){try{return ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""},ae=/^\[object .+?Constructor\]$/,se=Function.prototype,ue=Object.prototype,ce=se.toString,le=ue.hasOwnProperty,fe=RegExp("^"+ce.call(le).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var he=function(e){return!(!Q(e)||re(e))&&(ee(e)?fe:ae).test(oe(e))};var de=function(e,t){return null==e?void 0:e[t]};var pe=function(e,t){var n=de(e,t);return he(n)?n:void 0},ve=pe(B,"Map"),me=pe(Object,"create");var ye=function(){this.__data__=me?me(null):{},this.size=0};var ge=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},be=Object.prototype.hasOwnProperty;var _e=function(e){var t=this.__data__;if(me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return be.call(t,e)?t[e]:void 0},we=Object.prototype.hasOwnProperty;var ke=function(e){var t=this.__data__;return me?void 0!==t[e]:we.call(t,e)};var xe=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?"__lodash_hash_undefined__":t,this};function Se(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Se.prototype.clear=ye,Se.prototype.delete=ge,Se.prototype.get=_e,Se.prototype.has=ke,Se.prototype.set=xe;var Ee=Se;var Ae=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Ce=function(e,t){var n=e.__data__;return Ae(t)?n["string"==typeof t?"string":"hash"]:n.map};var Pe=function(e){var t=Ce(this,e).delete(e);return this.size-=t?1:0,t};var Te=function(e){return Ce(this,e).get(e)};var Oe=function(e){return Ce(this,e).has(e)};var je=function(e,t){var n=Ce(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Re.prototype.clear=function(){this.size=0,this.__data__={hash:new Ee,map:new(ve||j),string:new Ee}},Re.prototype.delete=Pe,Re.prototype.get=Te,Re.prototype.has=Oe,Re.prototype.set=je;var De=Re;var Me=function(e,t){var n=this.__data__;if(n instanceof j){var r=n.__data__;if(!ve||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new De(r)}return n.set(e,t),this.size=n.size,this};function Ie(e){var t=this.__data__=new j(e);this.size=t.size}Ie.prototype.clear=R,Ie.prototype.delete=D,Ie.prototype.get=M,Ie.prototype.has=I,Ie.prototype.set=Me;var Fe=Ie,ze=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Be=function(e,t,n){"__proto__"==t&&ze?ze(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Ne=function(e,t,n){(void 0===n||x(e[t],n))&&(void 0!==n||t in e)||Be(e,t,n)};var Le=function(u){return function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[u?a:++r];if(!1===t(i[s],s,i))break}return e}}(),Ue=n(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?B.Buffer:void 0,o=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}}),He=B.Uint8Array;var Ve=function(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t};var Ze=function(e,t){var n=t?Ve(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var qe=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},We=Object.create,Ye=function(){function n(){}return function(e){if(!Q(e))return{};if(We)return We(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();var $e=function(t,n){return function(e){return t(n(e))}},Ge=$e(Object.getPrototypeOf,Object),Xe=Object.prototype;var Ke=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Xe)};var Qe=function(e){return"function"!=typeof e.constructor||Ke(e)?{}:Ye(Ge(e))};var Je=function(e){return null!=e&&"object"==typeof e};var et=function(e){return Je(e)&&"[object Arguments]"==K(e)},tt=Object.prototype,nt=tt.hasOwnProperty,rt=tt.propertyIsEnumerable,it=et(function(){return arguments}())?et:function(e){return Je(e)&&nt.call(e,"callee")&&!rt.call(e,"callee")},ot=Array.isArray;var at=function(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991};var st=function(e){return null!=e&&at(e.length)&&!ee(e)};var ut=function(e){return Je(e)&&st(e)};var ct=function(){return!1},lt=n(function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?B.Buffer:void 0,o=(i?i.isBuffer:void 0)||ct;e.exports=o}),ft=Function.prototype,ht=Object.prototype,dt=ft.toString,pt=ht.hasOwnProperty,vt=dt.call(Object);var mt=function(e){if(!Je(e)||"[object Object]"!=K(e))return!1;var t=Ge(e);if(null===t)return!0;var n=pt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&dt.call(n)==vt},yt={};yt["[object Float32Array]"]=yt["[object Float64Array]"]=yt["[object Int8Array]"]=yt["[object Int16Array]"]=yt["[object Int32Array]"]=yt["[object Uint8