You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
117 KiB
1 lines
117 KiB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SVGA=t():e.SVGA=t()}(window,(function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)t.d(i,n,function(t){return e[t]}.bind(null,n));return i},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=67)}([function(e,t,r){"use strict";var i,n,o=e.exports=r(1),s=r(20);o.codegen=r(47),o.fetch=r(48),o.path=r(49),o.fs=o.inquire("fs"),o.toArray=function(e){if(e){for(var t=Object.keys(e),r=new Array(t.length),i=0;i<t.length;)r[i]=e[t[i++]];return r}return[]},o.toObject=function(e){for(var t={},r=0;r<e.length;){var i=e[r++],n=e[r++];void 0!==n&&(t[i]=n)}return t};var a=/\\/g,u=/"/g;o.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},o.safeProp=function(e){return!/^[$\w_]+$/.test(e)||o.isReserved(e)?'["'+e.replace(a,"\\\\").replace(u,'\\"')+'"]':"."+e},o.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var f=/_([a-z])/g;o.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(f,(function(e,t){return t.toUpperCase()}))},o.compareFieldsById=function(e,t){return e.id-t.id},o.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(o.decorateRoot.remove(e.$type),e.$type.name=t,o.decorateRoot.add(e.$type)),e.$type;i||(i=r(22));var n=new i(t||e.name);return o.decorateRoot.add(n),n.ctor=e,Object.defineProperty(e,"$type",{value:n,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:n,enumerable:!1}),n};var l=0;o.decorateEnum=function(e){if(e.$type)return e.$type;n||(n=r(2));var t=new n("Enum"+l++,e);return o.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},o.setProperty=function(e,t,r){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,r,i){var n=r.shift();if(r.length>0)t[n]=e(t[n]||{},r,i);else{var o=t[n];o&&(i=[].concat(o).concat(i)),t[n]=i}return t}(e,t=t.split("."),r)},Object.defineProperty(o,"decorateRoot",{get:function(){return s.decorated||(s.decorated=new(r(30)))}})},function(e,t,r){"use strict";(function(e){function i(e,t,r){for(var i=Object.keys(t),n=0;n<i.length;++n)void 0!==e[i[n]]&&r||(e[i[n]]=t[i[n]]);return e}function n(e){function t(e,r){if(!(this instanceof t))return new t(e,r);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),r&&i(this,r)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}var o=t;o.asPromise=r(17),o.base64=r(38),o.EventEmitter=r(39),o.float=r(40),o.inquire=r(18),o.utf8=r(41),o.pool=r(42),o.LongBits=r(43),o.isNode=Boolean(void 0!==e&&e&&e.process&&e.process.versions&&e.process.versions.node),o.global=o.isNode&&e||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,o.emptyArray=Object.freeze?Object.freeze([]):[],o.emptyObject=Object.freeze?Object.freeze({}):{},o.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},o.isString=function(e){return"string"==typeof e||e instanceof String},o.isObject=function(e){return e&&"object"==typeof e},o.isset=o.isSet=function(e,t){var r=e[t];return!(null==r||!e.hasOwnProperty(t))&&("object"!=typeof r||(Array.isArray(r)?r.length:Object.keys(r).length)>0)},o.Buffer=function(){try{var e=o.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),o._Buffer_from=null,o._Buffer_allocUnsafe=null,o.newBuffer=function(e){return"number"==typeof e?o.Buffer?o._Buffer_allocUnsafe(e):new o.Array(e):o.Buffer?o._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},o.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,o.Long=o.global.dcodeIO&&o.global.dcodeIO.Long||o.global.Long||o.inquire("long"),o.key2Re=/^true|false|0|1$/,o.key32Re=/^-?(?:0|[1-9][0-9]*)$/,o.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,o.longToHash=function(e){return e?o.LongBits.from(e).toHash():o.LongBits.zeroHash},o.longFromHash=function(e,t){var r=o.LongBits.fromHash(e);return o.Long?o.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},o.merge=i,o.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},o.newError=n,o.ProtocolError=n("ProtocolError"),o.oneOfGetter=function(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=1;return function(){for(var e=Object.keys(this),r=e.length-1;r>-1;--r)if(1===t[e[r]]&&void 0!==this[e[r]]&&null!==this[e[r]])return e[r]}},o.oneOfSetter=function(e){return function(t){for(var r=0;r<e.length;++r)e[r]!==t&&delete this[e[r]]}},o.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},o._configure=function(){var e=o.Buffer;e?(o._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,r){return new e(t,r)},o._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):o._Buffer_from=o._Buffer_allocUnsafe=null}}).call(this,r(37))},function(e,t,r){"use strict";function i(e,t,r,i,o){if(n.call(this,e,r),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=o||{},this.reserved=void 0,t)for(var s=Object.keys(t),a=0;a<s.length;++a)"number"==typeof t[s[a]]&&(this.valuesById[this.values[s[a]]=t[s[a]]]=s[a])}e.exports=i;var n=r(3);((i.prototype=Object.create(n.prototype)).constructor=i).className="Enum";var o=r(6),s=r(0);i.fromJSON=function(e,t){var r=new i(e,t.values,t.options,t.comment,t.comments);return r.reserved=t.reserved,r},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},i.prototype.add=function(e,t,r){if(!s.isString(e))throw TypeError("name must be a string");if(!s.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return this.comments[e]=r||null,this},i.prototype.remove=function(e){if(!s.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this},i.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},i.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)}},function(e,t,r){"use strict";function i(e,t){if(!o.isString(e))throw TypeError("name must be a string");if(t&&!o.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}e.exports=i,i.className="ReflectionObject";var n,o=r(0);Object.defineProperties(i.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),i.prototype.toJSON=function(){throw Error()},i.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof n&&t._handleAdd(this)},i.prototype.onRemove=function(e){var t=e.root;t instanceof n&&t._handleRemove(this),this.parent=null,this.resolved=!1},i.prototype.resolve=function(){return this.resolved?this:(this.root instanceof n&&(this.resolved=!0),this)},i.prototype.getOption=function(e){if(this.options)return this.options[e]},i.prototype.setOption=function(e,t,r){return r&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},i.prototype.setParsedOption=function(e,t,r){this.parsedOptions||(this.parsedOptions=[]);var i=this.parsedOptions;if(r){var n=i.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(n){var s=n[e];o.setProperty(s,r,t)}else(n={})[e]=o.setProperty({},r,t),i.push(n)}else{var a={};a[e]=t,i.push(a)}return this},i.prototype.setOptions=function(e,t){if(e)for(var r=Object.keys(e),i=0;i<r.length;++i)this.setOption(r[i],e[r[i]],t);return this},i.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},i._configure=function(e){n=e}},function(e,t,r){"use strict";function i(e,t,r,i,o,s,l){if(u.isObject(i)?(l=o,s=i,i=o=void 0):u.isObject(o)&&(l=s,s=o,o=void 0),n.call(this,e,s),!u.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!u.isString(r))throw TypeError("type must be a string");if(void 0!==i&&!f.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==o&&!u.isString(o))throw TypeError("extend must be a string");this.rule=i&&"optional"!==i?i:void 0,this.type=r,this.id=t,this.extend=o||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!u.Long&&void 0!==a.long[r],this.bytes="bytes"===r,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=l}e.exports=i;var n=r(3);((i.prototype=Object.create(n.prototype)).constructor=i).className="Field";var o,s=r(2),a=r(7),u=r(0),f=/^required|optional|repeated$/;i.fromJSON=function(e,t){return new i(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(i.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),i.prototype.setOption=function(e,t,r){return"packed"===e&&(this._packed=null),n.prototype.setOption.call(this,e,t,r)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return u.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},i.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=a.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof o?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof s&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof s)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=u.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;u.base64.test(this.typeDefault)?u.base64.decode(this.typeDefault,e=u.newBuffer(u.base64.length(this.typeDefault)),0):u.utf8.write(this.typeDefault,e=u.newBuffer(u.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=u.emptyObject:this.repeated?this.defaultValue=u.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof o&&(this.parent.ctor.prototype[this.name]=this.defaultValue),n.prototype.resolve.call(this)},i.d=function(e,t,r,n){return"function"==typeof t?t=u.decorateType(t).name:t&&"object"==typeof t&&(t=u.decorateEnum(t).name),function(o,s){u.decorateType(o.constructor).add(new i(s,e,t,r,{default:n}))}},i._configure=function(e){o=e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BezierPath=function e(t,r,i){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this._d=t,this._transform=r,this._styles=i}},function(e,t,r){"use strict";function i(e,t){if(e&&e.length){for(var r={},i=0;i<e.length;++i)r[e[i].name]=e[i].toJSON(t);return r}}function n(e,t){s.call(this,e,t),this.nested=void 0,this._nestedArray=null}function o(e){return e._nestedArray=null,e}e.exports=n;var s=r(3);((n.prototype=Object.create(s.prototype)).constructor=n).className="Namespace";var a,u,f,l=r(4),h=r(0);n.fromJSON=function(e,t){return new n(e,t.options).addJSON(t.nested)},n.arrayToJSON=i,n.isReservedId=function(e,t){if(e)for(var r=0;r<e.length;++r)if("string"!=typeof e[r]&&e[r][0]<=t&&e[r][1]>t)return!0;return!1},n.isReservedName=function(e,t){if(e)for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1},Object.defineProperty(n.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=h.toArray(this.nested))}}),n.prototype.toJSON=function(e){return h.toObject(["options",this.options,"nested",i(this.nestedArray,e)])},n.prototype.addJSON=function(e){if(e)for(var t,r=Object.keys(e),i=0;i<r.length;++i)t=e[r[i]],this.add((void 0!==t.fields?a.fromJSON:void 0!==t.values?f.fromJSON:void 0!==t.methods?u.fromJSON:void 0!==t.id?l.fromJSON:n.fromJSON)(r[i],t));return this},n.prototype.get=function(e){return this.nested&&this.nested[e]||null},n.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof f)return this.nested[e].values;throw Error("no such enum: "+e)},n.prototype.add=function(e){if(!(e instanceof l&&void 0!==e.extend||e instanceof a||e instanceof f||e instanceof u||e instanceof n))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof n&&e instanceof n)||t instanceof a||t instanceof u)throw Error("duplicate name '"+e.name+"' in "+this);for(var r=t.nestedArray,i=0;i<r.length;++i)e.add(r[i]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),o(this)},n.prototype.remove=function(e){if(!(e instanceof s))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),o(this)},n.prototype.define=function(e,t){if(h.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var r=this;e.length>0;){var i=e.shift();if(r.nested&&r.nested[i]){if(!((r=r.nested[i])instanceof n))throw Error("path conflicts with non-namespace objects")}else r.add(r=new n(i))}return t&&r.addJSON(t),r},n.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof n?e[t++].resolveAll():e[t++].resolve();return this.resolve()},n.prototype.lookup=function(e,t,r){if("boolean"==typeof t?(r=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),h.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var i=this.get(e[0]);if(i){if(1===e.length){if(!t||t.indexOf(i.constructor)>-1)return i}else if(i instanceof n&&(i=i.lookup(e.slice(1),t,!0)))return i}else for(var o=0;o<this.nestedArray.length;++o)if(this._nestedArray[o]instanceof n&&(i=this._nestedArray[o].lookup(e,t,!0)))return i;return null===this.parent||r?null:this.parent.lookup(e,t)},n.prototype.lookupType=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such type: "+e);return t},n.prototype.lookupEnum=function(e){var t=this.lookup(e,[f]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},n.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[a,f]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},n.prototype.lookupService=function(e){var t=this.lookup(e,[u]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},n._configure=function(e,t,r){a=e,u=t,f=r}},function(e,t,r){"use strict";function i(e,t){var r=0,i={};for(t|=0;r<e.length;)i[s[r+t]]=e[r++];return i}var n=t,o=r(0),s=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];n.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),n.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",o.emptyArray,null]),n.long=i([0,0,0,1,1],7),n.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),n.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])},function(e,t,r){"use strict";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 r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+i),n);else for(var o=0;o<i;o++)e[n+o]=t[r+o]},flattenChunks:function(e){var t,r,i,n,o,s;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(s=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)o=e[t],s.set(o,n),n+=o.length;return s}},s={arraySet:function(e,t,r,i,n){for(var o=0;o<i;o++)e[n+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(n)},function(e,t,r){"use strict";function i(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function n(){}function o(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function s(){this.len=0,this.head=new i(n,0,0),this.tail=this.head,this.states=null}function a(e,t,r){t[r]=255&e}function u(e,t){this.len=e,this.next=void 0,this.val=t}function f(e,t,r){for(;e.hi;)t[r++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=127&e.lo|128,e.lo=e.lo>>>7;t[r++]=e.lo}function l(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}e.exports=s;var h,c=r(1),p=c.LongBits,d=c.base64,y=c.utf8,m=function(){return c.Buffer?function(){return(s.create=function(){return new h})()}:function(){return new s}};s.create=m(),s.alloc=function(e){return new c.Array(e)},c.Array!==Array&&(s.alloc=c.pool(s.alloc,c.Array.prototype.subarray)),s.prototype._push=function(e,t,r){return this.tail=this.tail.next=new i(e,t,r),this.len+=t,this},u.prototype=Object.create(i.prototype),u.prototype.fn=function(e,t,r){for(;e>127;)t[r++]=127&e|128,e>>>=7;t[r]=e},s.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new u((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},s.prototype.int32=function(e){return e<0?this._push(f,10,p.fromNumber(e)):this.uint32(e)},s.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},s.prototype.uint64=function(e){var t=p.from(e);return this._push(f,t.length(),t)},s.prototype.int64=s.prototype.uint64,s.prototype.sint64=function(e){var t=p.from(e).zzEncode();return this._push(f,t.length(),t)},s.prototype.bool=function(e){return this._push(a,1,e?1:0)},s.prototype.fixed32=function(e){return this._push(l,4,e>>>0)},s.prototype.sfixed32=s.prototype.fixed32,s.prototype.fixed64=function(e){var t=p.from(e);return this._push(l,4,t.lo)._push(l,4,t.hi)},s.prototype.sfixed64=s.prototype.fixed64,s.prototype.float=function(e){return this._push(c.float.writeFloatLE,4,e)},s.prototype.double=function(e){return this._push(c.float.writeDoubleLE,8,e)};var v=c.Array.prototype.set?function(e,t,r){t.set(e,r)}:function(e,t,r){for(var i=0;i<e.length;++i)t[r+i]=e[i]};s.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(a,1,0);if(c.isString(e)){var r=s.alloc(t=d.length(e));d.decode(e,r,0),e=r}return this.uint32(t)._push(v,t,e)},s.prototype.string=function(e){var t=y.length(e);return t?this.uint32(t)._push(y.write,t,e):this._push(a,1,0)},s.prototype.fork=function(){return this.states=new o(this),this.head=this.tail=new i(n,0,0),this.len=0,this},s.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new i(n,0,0),this.len=0),this},s.prototype.ldelim=function(){var e=this.head,t=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=e.next,this.tail=t,this.len+=r),this},s.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),r=0;e;)e.fn(e.val,t,r),r+=e.len,e=e.next;return t},s._configure=function(e){h=e,s.create=m(),h._configure()}},function(e,t,r){"use strict";function i(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function n(e){this.buf=e,this.pos=0,this.len=e.length}function o(){var e=new l(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw i(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw i(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function s(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function a(){if(this.pos+8>this.len)throw i(this,8);return new l(s(this.buf,this.pos+=4),s(this.buf,this.pos+=4))}e.exports=n;var u,f=r(1),l=f.LongBits,h=f.utf8,c="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new n(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new n(e);throw Error("illegal buffer")},p=function(){return f.Buffer?function(e){return(n.create=function(e){return f.Buffer.isBuffer(e)?new u(e):c(e)})(e)}:c};n.create=p(),n.prototype._slice=f.Array.prototype.subarray||f.Array.prototype.slice,n.prototype.uint32=function(){var e=4294967295;return function(){if(e=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return e;if(e=(e|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return e;if((this.pos+=5)>this.len)throw this.pos=this.len,i(this,10);return e}}(),n.prototype.int32=function(){return 0|this.uint32()},n.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},n.prototype.bool=function(){return 0!==this.uint32()},n.prototype.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return s(this.buf,this.pos+=4)},n.prototype.sfixed32=function(){if(this.pos+4>this.len)throw i(this,4);return 0|s(this.buf,this.pos+=4)},n.prototype.float=function(){if(this.pos+4>this.len)throw i(this,4);var e=f.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},n.prototype.double=function(){if(this.pos+8>this.len)throw i(this,4);var e=f.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},n.prototype.bytes=function(){var e=this.uint32(),t=this.pos,r=this.pos+e;if(r>this.len)throw i(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,r):t===r?new this.buf.constructor(0):this._slice.call(this.buf,t,r)},n.prototype.string=function(){var e=this.bytes();return h.read(e,0,e.length)},n.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw i(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw i(this)}while(128&this.buf[this.pos++]);return this},n.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},n._configure=function(e){u=e,n.create=p(),u._configure();var t=f.Long?"toLong":"toNumber";f.merge(n.prototype,{int64:function(){return o.call(this)[t](!1)},uint64:function(){return o.call(this)[t](!0)},sint64:function(){return o.call(this).zzDecode()[t](!1)},fixed64:function(){return a.call(this)[t](!0)},sfixed64:function(){return a.call(this)[t](!1)}})}},function(e,t,r){"use strict";function i(e,t,r,i){if(Array.isArray(t)||(r=t,t=void 0),o.call(this,e,r),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function n(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}e.exports=i;var o=r(3);((i.prototype=Object.create(o.prototype)).constructor=i).className="OneOf";var s=r(4),a=r(0);i.fromJSON=function(e,t){return new i(e,t.oneof,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},i.prototype.add=function(e){if(!(e instanceof s))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,n(this),this},i.prototype.remove=function(e){if(!(e instanceof s))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},i.prototype.onAdd=function(e){o.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var r=e.get(this.oneof[t]);r&&!r.partOf&&(r.partOf=this,this.fieldsArray.push(r))}n(this)},i.prototype.onRemove=function(e){for(var t,r=0;r<this.fieldsArray.length;++r)(t=this.fieldsArray[r]).parent&&t.parent.remove(t);o.prototype.onRemove.call(this,e)},i.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,r){a.decorateType(t.constructor).add(new i(r,e)),Object.defineProperty(t,r,{get:a.oneOfGetter(e),set:a.oneOfSetter(e)})}}},function(e,t,r){"use strict";function i(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)this[t[r]]=e[t[r]]}e.exports=i;var n=r(1);i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,n.toJSONOptions)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),n=r(31),o=function(e){return e&&e.__esModule?e:{default:e}}(r(50));t.Parser=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,[{key:"load",value:function(e,t,r){this.loadViaWorker(e,t,r)}},{key:"loadViaWorker",value:function(e,t,r){(0,o.default)(e,(function(e){var r=e.movie;r.version=e.ver;var i=e.images,o=new n.VideoEntity(r,i);t(o)}),r)}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RectPath=void 0;var i=r(5);t.RectPath=function(e){function t(e,r,i,n,o,s,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var u=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return u._x=e,u._y=r,u._width=i,u._height=n,u._cornerRadius=o,u._transform=s,u._styles=a,u}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.BezierPath)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EllipsePath=void 0;var i=r(5);t.EllipsePath=function(e){function t(e,r,i,n,o,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a._x=e,a._y=r,a._radiusX=i,a._radiusY=n,a._transform=o,a._styles=s,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.BezierPath)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(34),n=JSON.parse('{"nested":{"com":{"nested":{"opensource":{"nested":{"svga":{"options":{"objc_class_prefix":"SVGAProto","java_package":"com.opensource.svgaplayer.proto"},"nested":{"MovieParams":{"fields":{"viewBoxWidth":{"type":"float","id":1},"viewBoxHeight":{"type":"float","id":2},"fps":{"type":"int32","id":3},"frames":{"type":"int32","id":4}}},"SpriteEntity":{"fields":{"imageKey":{"type":"string","id":1},"frames":{"rule":"repeated","type":"FrameEntity","id":2},"matteKey":{"type":"string","id":3}}},"AudioEntity":{"fields":{"audioKey":{"type":"string","id":1},"startFrame":{"type":"int32","id":2},"endFrame":{"type":"int32","id":3},"startTime":{"type":"int32","id":4},"totalTime":{"type":"int32","id":5}}},"Layout":{"fields":{"x":{"type":"float","id":1},"y":{"type":"float","id":2},"width":{"type":"float","id":3},"height":{"type":"float","id":4}}},"Transform":{"fields":{"a":{"type":"float","id":1},"b":{"type":"float","id":2},"c":{"type":"float","id":3},"d":{"type":"float","id":4},"tx":{"type":"float","id":5},"ty":{"type":"float","id":6}}},"ShapeEntity":{"oneofs":{"args":{"oneof":["shape","rect","ellipse"]}},"fields":{"type":{"type":"ShapeType","id":1},"shape":{"type":"ShapeArgs","id":2},"rect":{"type":"RectArgs","id":3},"ellipse":{"type":"EllipseArgs","id":4},"styles":{"type":"ShapeStyle","id":10},"transform":{"type":"Transform","id":11}},"nested":{"ShapeType":{"values":{"SHAPE":0,"RECT":1,"ELLIPSE":2,"KEEP":3}},"ShapeArgs":{"fields":{"d":{"type":"string","id":1}}},"RectArgs":{"fields":{"x":{"type":"float","id":1},"y":{"type":"float","id":2},"width":{"type":"float","id":3},"height":{"type":"float","id":4},"cornerRadius":{"type":"float","id":5}}},"EllipseArgs":{"fields":{"x":{"type":"float","id":1},"y":{"type":"float","id":2},"radiusX":{"type":"float","id":3},"radiusY":{"type":"float","id":4}}},"ShapeStyle":{"fields":{"fill":{"type":"RGBAColor","id":1},"stroke":{"type":"RGBAColor","id":2},"strokeWidth":{"type":"float","id":3},"lineCap":{"type":"LineCap","id":4},"lineJoin":{"type":"LineJoin","id":5},"miterLimit":{"type":"float","id":6},"lineDashI":{"type":"float","id":7},"lineDashII":{"type":"float","id":8},"lineDashIII":{"type":"float","id":9}},"nested":{"RGBAColor":{"fields":{"r":{"type":"float","id":1},"g":{"type":"float","id":2},"b":{"type":"float","id":3},"a":{"type":"float","id":4}}},"LineCap":{"values":{"LineCap_BUTT":0,"LineCap_ROUND":1,"LineCap_SQUARE":2}},"LineJoin":{"values":{"LineJoin_MITER":0,"LineJoin_ROUND":1,"LineJoin_BEVEL":2}}}}}},"FrameEntity":{"fields":{"alpha":{"type":"float","id":1},"layout":{"type":"Layout","id":2},"transform":{"type":"Transform","id":3},"clipPath":{"type":"string","id":4},"shapes":{"rule":"repeated","type":"ShapeEntity","id":5}}},"MovieEntity":{"fields":{"version":{"type":"string","id":1},"params":{"type":"MovieParams","id":2},"images":{"keyType":"string","type":"bytes","id":3},"sprites":{"rule":"repeated","type":"SpriteEntity","id":4},"audios":{"rule":"repeated","type":"AudioEntity","id":5}}}}}}}}}}}'),o=t.proto=i.Root.fromJSON(n);t.ProtoMovieEntity=o.lookupType("com.opensource.svga.MovieEntity")},function(e,t,r){"use strict";e.exports=function(e,t){for(var r=new Array(arguments.length-1),i=0,n=2,o=!0;n<arguments.length;)r[i++]=arguments[n++];return new Promise((function(n,s){r[i]=function(e){if(o)if(o=!1,e)s(e);else{for(var t=new Array(arguments.length-1),r=0;r<t.length;)t[r++]=arguments[r];n.apply(null,t)}};try{e.apply(t||null,r)}catch(e){o&&(o=!1,s(e))}}))}},function(module,exports,__webpack_require__){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},function(e,t,r){"use strict";t.Service=r(46)},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";function i(e,t,r,i){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",r,i,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",r,i,(t.id<<3|2)>>>0)}e.exports=function(e){for(var t,r=s.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),a=e.fieldsArray.slice().sort(s.compareFieldsById),u=0;u<a.length;++u){var f=a[u].resolve(),l=e._fieldsArray.indexOf(f),h=f.resolvedType instanceof n?"int32":f.type,c=o.basic[h];t="m"+s.safeProp(f.name),f.map?(r("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,f.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(f.id<<3|2)>>>0,8|o.mapKey[f.keyType],f.keyType),void 0===c?r("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,t):r(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|c,h,t),r("}")("}")):f.repeated?(r("if(%s!=null&&%s.length){",t,t),f.packed&&void 0!==o.packed[h]?r("w.uint32(%i).fork()",(f.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",h,t)("w.ldelim()"):(r("for(var i=0;i<%s.length;++i)",t),void 0===c?i(r,f,l,t+"[i]"):r("w.uint32(%i).%s(%s[i])",(f.id<<3|c)>>>0,h,t)),r("}")):(f.optional&&r("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,f.name),void 0===c?i(r,f,l,t):r("w.uint32(%i).%s(%s)",(f.id<<3|c)>>>0,h,t))}return r("return w")};var n=r(2),o=r(7),s=r(0)},function(e,t,r){"use strict";function i(e,t){o.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function n(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}e.exports=i;var o=r(6);((i.prototype=Object.create(o.prototype)).constructor=i).className="Type";var s=r(2),a=r(11),u=r(4),f=r(23),l=r(24),h=r(12),c=r(10),p=r(9),d=r(0),y=r(21),m=r(26),v=r(27),b=r(28),g=r(29);Object.defineProperties(i.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var r=this.fields[e[t]],i=r.id;if(this._fieldsById[i])throw Error("duplicate id "+i+" in "+this);this._fieldsById[i]=r}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=d.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=d.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=i.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof h||((e.prototype=new h).constructor=e,d.merge(e.prototype,t)),e.$type=e.prototype.$type=this,d.merge(e,h,!0),this._ctor=e;for(var r=0;r<this.fieldsArray.length;++r)this._fieldsArray[r].resolve();var i={};for(r=0;r<this.oneofsArray.length;++r)i[this._oneofsArray[r].resolve().name]={get:d.oneOfGetter(this._oneofsArray[r].oneof),set:d.oneOfSetter(this._oneofsArray[r].oneof)};r&&Object.defineProperties(e.prototype,i)}}}),i.generateConstructor=function(e){for(var t,r=d.codegen(["p"],e.name),i=0;i<e.fieldsArray.length;++i)(t=e._fieldsArray[i]).map?r("this%s={}",d.safeProp(t.name)):t.repeated&&r("this%s=[]",d.safeProp(t.name));return r("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},i.fromJSON=function(e,t){var r=new i(e,t.options);r.extensions=t.extensions,r.reserved=t.reserved;for(var n=Object.keys(t.fields),h=0;h<n.length;++h)r.add((void 0!==t.fields[n[h]].keyType?f.fromJSON:u.fromJSON)(n[h],t.fields[n[h]]));if(t.oneofs)for(n=Object.keys(t.oneofs),h=0;h<n.length;++h)r.add(a.fromJSON(n[h],t.oneofs[n[h]]));if(t.nested)for(n=Object.keys(t.nested),h=0;h<n.length;++h){var c=t.nested[n[h]];r.add((void 0!==c.id?u.fromJSON:void 0!==c.fields?i.fromJSON:void 0!==c.values?s.fromJSON:void 0!==c.methods?l.fromJSON:o.fromJSON)(n[h],c))}return t.extensions&&t.extensions.length&&(r.extensions=t.extensions),t.reserved&&t.reserved.length&&(r.reserved=t.reserved),t.group&&(r.group=!0),t.comment&&(r.comment=t.comment),r},i.prototype.toJSON=function(e){var t=o.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return d.toObject(["options",t&&t.options||void 0,"oneofs",o.arrayToJSON(this.oneofsArray,e),"fields",o.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},i.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var r=this.oneofsArray;for(t=0;t<r.length;)r[t++].resolve();return o.prototype.resolveAll.call(this)},i.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},i.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof u&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),n(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),n(this)):o.prototype.add.call(this,e)},i.prototype.remove=function(e){if(e instanceof u&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),n(this)}if(e instanceof a){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),n(this)}return o.prototype.remove.call(this,e)},i.prototype.isReservedId=function(e){return o.isReservedId(this.reserved,e)},i.prototype.isReservedName=function(e){return o.isReservedName(this.reserved,e)},i.prototype.create=function(e){return new this.ctor(e)},i.prototype.setup=function(){for(var e=this.fullName,t=[],r=0;r<this.fieldsArray.length;++r)t.push(this._fieldsArray[r].resolve().resolvedType);this.encode=y(this)({Writer:p,types:t,util:d}),this.decode=m(this)({Reader:c,types:t,util:d}),this.verify=v(this)({types:t,util:d}),this.fromObject=b.fromObject(this)({types:t,util:d}),this.toObject=b.toObject(this)({types:t,util:d});var i=g[e];if(i){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(n),n.toObject=this.toObject,this.toObject=i.toObject.bind(n)}return this},i.prototype.encode=function(e,t){return this.setup().encode(e,t)},i.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},i.prototype.decode=function(e,t){return this.setup().decode(e,t)},i.prototype.decodeDelimited=function(e){return e instanceof c||(e=c.create(e)),this.decode(e,e.uint32())},i.prototype.verify=function(e){return this.setup().verify(e)},i.prototype.fromObject=function(e){return this.setup().fromObject(e)},i.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},i.d=function(e){return function(t){d.decorateType(t,e)}}},function(e,t,r){"use strict";function i(e,t,r,i,o,a){if(n.call(this,e,t,i,void 0,void 0,o,a),!s.isString(r))throw TypeError("keyType must be a string");this.keyType=r,this.resolvedKeyType=null,this.map=!0}e.exports=i;var n=r(4);((i.prototype=Object.create(n.prototype)).constructor=i).className="MapField";var o=r(7),s=r(0);i.fromJSON=function(e,t){return new i(e,t.id,t.keyType,t.type,t.options,t.comment)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},i.prototype.resolve=function(){if(this.resolved)return this;if(void 0===o.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return n.prototype.resolve.call(this)},i.d=function(e,t,r){return"function"==typeof r?r=s.decorateType(r).name:r&&"object"==typeof r&&(r=s.decorateEnum(r).name),function(n,o){s.decorateType(n.constructor).add(new i(o,e,t,r))}}},function(e,t,r){"use strict";function i(e,t){o.call(this,e,t),this.methods={},this._methodsArray=null}function n(e){return e._methodsArray=null,e}e.exports=i;var o=r(6);((i.prototype=Object.create(o.prototype)).constructor=i).className="Service";var s=r(25),a=r(0),u=r(19);i.fromJSON=function(e,t){var r=new i(e,t.options);if(t.methods)for(var n=Object.keys(t.methods),o=0;o<n.length;++o)r.add(s.fromJSON(n[o],t.methods[n[o]]));return t.nested&&r.addJSON(t.nested),r.comment=t.comment,r},i.prototype.toJSON=function(e){var t=o.prototype.toJSON.call(this,e),r=!!e&&Boolean(e.keepComments);return a.toObject(["options",t&&t.options||void 0,"methods",o.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",r?this.comment:void 0])},Object.defineProperty(i.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=a.toArray(this.methods))}}),i.prototype.get=function(e){return this.methods[e]||o.prototype.get.call(this,e)},i.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return o.prototype.resolve.call(this)},i.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof s?(this.methods[e.name]=e,e.parent=this,n(this)):o.prototype.add.call(this,e)},i.prototype.remove=function(e){if(e instanceof s){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,n(this)}return o.prototype.remove.call(this,e)},i.prototype.create=function(e,t,r){for(var i,n=new u.Service(e,t,r),o=0;o<this.methodsArray.length;++o){var s=a.lcFirst((i=this._methodsArray[o]).resolve().name).replace(/[^$\w_]/g,"");n[s]=a.codegen(["r","c"],a.isReserved(s)?s+"_":s)("return this.rpcCall(m,q,s,r,c)")({m:i,q:i.resolvedRequestType.ctor,s:i.resolvedResponseType.ctor})}return n}},function(e,t,r){"use strict";function i(e,t,r,i,s,a,u,f,l){if(o.isObject(s)?(u=s,s=a=void 0):o.isObject(a)&&(u=a,a=void 0),void 0!==t&&!o.isString(t))throw TypeError("type must be a string");if(!o.isString(r))throw TypeError("requestType must be a string");if(!o.isString(i))throw TypeError("responseType must be a string");n.call(this,e,u),this.type=t||"rpc",this.requestType=r,this.requestStream=!!s||void 0,this.responseType=i,this.responseStream=!!a||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=f,this.parsedOptions=l}e.exports=i;var n=r(3);((i.prototype=Object.create(n.prototype)).constructor=i).className="Method";var o=r(0);i.fromJSON=function(e,t){return new i(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},i.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return o.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},i.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),n.prototype.resolve.call(this))}},function(e,t,r){"use strict";function i(e){return"missing required '"+e.name+"'"}e.exports=function(e){var t=s.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var r=0;r<e.fieldsArray.length;++r){var a=e._fieldsArray[r].resolve(),u=a.resolvedType instanceof n?"int32":a.type,f="m"+s.safeProp(a.name);t("case %i:",a.id),a.map?(t("if(%s===util.emptyObject)",f)("%s={}",f)("var c2 = r.uint32()+r.pos"),void 0!==o.defaults[a.keyType]?t("k=%j",o.defaults[a.keyType]):t("k=null"),void 0!==o.defaults[u]?t("value=%j",o.defaults[u]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",a.keyType)("case 2:"),void 0===o.basic[u]?t("value=types[%i].decode(r,r.uint32())",r):t("value=r.%s()",u),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==o.long[a.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',f):t("%s[k]=value",f)):a.repeated?(t("if(!(%s&&%s.length))",f,f)("%s=[]",f),void 0!==o.packed[u]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",f,u)("}else"),void 0===o.basic[u]?t(a.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",f,r):t("%s.push(r.%s())",f,u)):void 0===o.basic[u]?t(a.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",f,r):t("%s=r.%s()",f,u),t("break")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),r=0;r<e._fieldsArray.length;++r){var l=e._fieldsArray[r];l.required&&t("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",i(l))}return t("return m")};var n=r(2),o=r(7),s=r(0)},function(e,t,r){"use strict";function i(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function n(e,t,r,n){if(t.resolvedType)if(t.resolvedType instanceof s){e("switch(%s){",n)("default:")("return%j",i(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),a=0;a<o.length;++a)e("case %i:",t.resolvedType.values[o[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",r,n)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",n)("return%j",i(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",i(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',n)("return%j",i(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',n)("return%j",i(t,"boolean"));break;case"string":e("if(!util.isString(%s))",n)("return%j",i(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",i(t,"buffer"))}return e}function o(e,t,r){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",r)("return%j",i(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",r)("return%j",i(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",r)("return%j",i(t,"boolean key"))}return e}e.exports=function(e){var t=a.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),r={};e.oneofsArray.length&&t("var p={}");for(var s=0;s<e.fieldsArray.length;++s){var u=e._fieldsArray[s].resolve(),f="m"+a.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",f,u.name),u.map)t("if(!util.isObject(%s))",f)("return%j",i(u,"object"))("var k=Object.keys(%s)",f)("for(var i=0;i<k.length;++i){"),o(t,u,"k[i]"),n(t,u,s,f+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",f)("return%j",i(u,"array"))("for(var i=0;i<%s.length;++i){",f),n(t,u,s,f+"[i]")("}");else{if(u.partOf){var l=a.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",l)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",l)}n(t,u,s,f)}u.optional&&t("}")}return t("return null")};var s=r(2),a=r(0)},function(e,t,r){"use strict";function i(e,t,r,i){if(t.resolvedType)if(t.resolvedType instanceof s){e("switch(d%s){",i);for(var n=t.resolvedType.values,o=Object.keys(n),a=0;a<o.length;++a)t.repeated&&n[o[a]]===t.typeDefault&&e("default:"),e("case%j:",o[a])("case %i:",n[o[a]])("m%s=%j",i,n[o[a]])("break");e("}")}else e('if(typeof d%s!=="object")',i)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",i,r,i);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",i,i);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",i,i);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",i,i);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",i,i,u)('else if(typeof d%s==="string")',i)("m%s=parseInt(d%s,10)",i,i)('else if(typeof d%s==="number")',i)("m%s=d%s",i,i)('else if(typeof d%s==="object")',i)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",i,i,i,u?"true":"");break;case"bytes":e('if(typeof d%s==="string")',i)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",i,i,i)("else if(d%s.length)",i)("m%s=d%s",i,i);break;case"string":e("m%s=String(d%s)",i,i);break;case"bool":e("m%s=Boolean(d%s)",i,i)}}return e}function n(e,t,r,i){if(t.resolvedType)t.resolvedType instanceof s?e("d%s=o.enums===String?types[%i].values[m%s]:m%s",i,r,i,i):e("d%s=types[%i].toObject(m%s,o)",i,r,i);else{var n=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",i,i,i,i);break;case"uint64":n=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',i)("d%s=o.longs===String?String(m%s):m%s",i,i,i)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",i,i,i,i,n?"true":"",i);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",i,i,i,i,i);break;default:e("d%s=m%s",i,i)}}return e}var o=t,s=r(2),a=r(0);o.fromObject=function(e){var t=e.fieldsArray,r=a.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return r("return new this.ctor");r("var m=new this.ctor");for(var n=0;n<t.length;++n){var o=t[n].resolve(),u=a.safeProp(o.name);o.map?(r("if(d%s){",u)('if(typeof d%s!=="object")',u)("throw TypeError(%j)",o.fullName+": object expected")("m%s={}",u)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",u),i(r,o,n,u+"[ks[i]]")("}")("}")):o.repeated?(r("if(d%s){",u)("if(!Array.isArray(d%s))",u)("throw TypeError(%j)",o.fullName+": array expected")("m%s=[]",u)("for(var i=0;i<d%s.length;++i){",u),i(r,o,n,u+"[i]")("}")("}")):(o.resolvedType instanceof s||r("if(d%s!=null){",u),i(r,o,n,u),o.resolvedType instanceof s||r("}"))}return r("return m")},o.toObject=function(e){var t=e.fieldsArray.slice().sort(a.compareFieldsById);if(!t.length)return a.codegen()("return {}");for(var r=a.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),i=[],o=[],u=[],f=0;f<t.length;++f)t[f].partOf||(t[f].resolve().repeated?i:t[f].map?o:u).push(t[f]);if(i.length){for(r("if(o.arrays||o.defaults){"),f=0;f<i.length;++f)r("d%s=[]",a.safeProp(i[f].name));r("}")}if(o.length){for(r("if(o.objects||o.defaults){"),f=0;f<o.length;++f)r("d%s={}",a.safeProp(o[f].name));r("}")}if(u.length){for(r("if(o.defaults){"),f=0;f<u.length;++f){var l=u[f],h=a.safeProp(l.name);if(l.resolvedType instanceof s)r("d%s=o.enums===String?%j:%j",h,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",h)("}else")("d%s=o.longs===String?%j:%i",h,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var c="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",h,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",h,c)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",h,h)("}")}else r("d%s=%j",h,l.typeDefault)}r("}")}var p=!1;for(f=0;f<t.length;++f){l=t[f];var d=e._fieldsArray.indexOf(l);h=a.safeProp(l.name);l.map?(p||(p=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",h,h)("d%s={}",h)("for(var j=0;j<ks2.length;++j){"),n(r,l,d,h+"[ks2[j]]")("}")):l.repeated?(r("if(m%s&&m%s.length){",h,h)("d%s=[]",h)("for(var j=0;j<m%s.length;++j){",h),n(r,l,d,h+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",h,l.name),n(r,l,d,h),l.partOf&&r("if(o.oneofs)")("d%s=%j",a.safeProp(l.partOf.name),l.name)),r("}")}return r("return d")}},function(e,t,r){"use strict";var i=t,n=r(12);i[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),r=this.lookup(t);if(r){var i="."===e["@type"].charAt(0)?e["@type"].substr(1):e["@type"];return-1===i.indexOf("/")&&(i="/"+i),this.create({type_url:i,value:r.encode(r.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var r="",i="";if(t&&t.json&&e.type_url&&e.value){i=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var o=this.lookup(i);o&&(e=o.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof n){var s=e.$type.toObject(e,t);return""===r&&(r="type.googleapis.com/"),i=r+("."===e.$type.fullName[0]?e.$type.fullName.substr(1):e.$type.fullName),s["@type"]=i,s}return this.toObject(e,t)}}},function(e,t,r){"use strict";function i(e){s.call(this,"",e),this.deferred=[],this.files=[]}function n(){}function o(e,t){var r=t.parent.lookup(t.extend);if(r){var i=new l(t.fullName,t.id,t.type,t.rule,void 0,t.options);return i.declaringField=t,t.extensionField=i,r.add(i),!0}return!1}e.exports=i;var s=r(6);((i.prototype=Object.create(s.prototype)).constructor=i).className="Root";var a,u,f,l=r(4),h=r(2),c=r(11),p=r(0);i.fromJSON=function(e,t){return t||(t=new i),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},i.prototype.resolvePath=p.path.resolve,i.prototype.fetch=p.fetch,i.prototype.load=function e(t,r,i){function o(e,t){if(i){var r=i;if(i=null,c)throw e;r(e,t)}}function s(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var r=e.substring(t);if(r in f)return r}return null}function a(e,t){try{if(p.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),p.isString(t)){u.filename=e;var i,n=u(t,h,r),a=0;if(n.imports)for(;a<n.imports.length;++a)(i=s(n.imports[a])||h.resolvePath(e,n.imports[a]))&&l(i);if(n.weakImports)for(a=0;a<n.weakImports.length;++a)(i=s(n.weakImports[a])||h.resolvePath(e,n.weakImports[a]))&&l(i,!0)}else h.setOptions(t.options).addJSON(t.nested)}catch(e){o(e)}c||d||o(null,h)}function l(e,t){if(!(h.files.indexOf(e)>-1)){if(h.files.push(e),e in f)return void(c?a(e,f[e]):(++d,setTimeout((function(){--d,a(e,f[e])}))));if(c){var r;try{r=p.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||o(e))}a(e,r)}else++d,h.fetch(e,(function(r,n){if(--d,i)return r?void(t?d||o(null,h):o(r)):void a(e,n)}))}}"function"==typeof r&&(i=r,r=void 0);var h=this;if(!i)return p.asPromise(e,h,t,r);var c=i===n,d=0;p.isString(t)&&(t=[t]);for(var y,m=0;m<t.length;++m)(y=h.resolvePath("",t[m]))&&l(y);if(c)return h;d||o(null,h)},i.prototype.loadSync=function(e,t){if(!p.isNode)throw Error("not supported");return this.load(e,t,n)},i.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return s.prototype.resolveAll.call(this)};var d=/^[A-Z]/;i.prototype._handleAdd=function(e){if(e instanceof l)void 0===e.extend||e.extensionField||o(0,e)||this.deferred.push(e);else if(e instanceof h)d.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof c)){if(e instanceof a)for(var t=0;t<this.deferred.length;)o(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var r=0;r<e.nestedArray.length;++r)this._handleAdd(e._nestedArray[r]);d.test(e.name)&&(e.parent[e.name]=e)}},i.prototype._handleRemove=function(e){if(e instanceof l){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof h)d.test(e.name)&&delete e.parent[e.name];else if(e instanceof s){for(var r=0;r<e.nestedArray.length;++r)this._handleRemove(e._nestedArray[r]);d.test(e.name)&&delete e.parent[e.name]}},i._configure=function(e,t,r){a=e,u=t,f=r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoEntity=void 0;var i="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},n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(32),s=r(16).ProtoMovieEntity;t.VideoEntity=function(){function e(t,r){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.version="",this.videoSize={width:0,height:0},this.FPS=20,this.frames=0,this.images={},this.sprites=[],this.audios=[],"object"===(void 0===t?"undefined":i(t))&&t.$type==s?("object"===i(t.params)&&(this.version=t.ver,this.videoSize.width=t.params.viewBoxWidth||0,this.videoSize.height=t.params.viewBoxHeight||0,this.FPS=t.params.fps||20,this.frames=t.params.frames||0),this.resetSprites(t),this.audios=t.audios):t&&(t.movie&&(t.movie.viewBox&&(this.videoSize.width=parseFloat(t.movie.viewBox.width)||0,this.videoSize.height=parseFloat(t.movie.viewBox.height)||0),this.version=t.ver,this.FPS=parseInt(t.movie.fps)||20,this.frames=parseInt(t.movie.frames)||0),this.resetSprites(t)),r&&(this.images=r)}return n(e,[{key:"resetSprites",value:function(e){e.sprites instanceof Array&&(this.sprites=e.sprites.map((function(e){return new o.SpriteEntity(e)})))}}]),e}()},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpriteEntity=void 0;var i=r(33);r(5),r(14),r(15),t.SpriteEntity=function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.matteKey=null,this.imageKey=null,this.frames=[],this.matteKey=t.matteKey,this.imageKey=t.imageKey,t.frames&&(this.frames=t.frames.map((function(e){return new i.FrameEntity(e)})))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FrameEntity=void 0;var i=r(5);t.FrameEntity=function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.alpha=0,this.transform={a:1,b:0,c:0,d:1,tx:0,ty:0},this.layout={x:0,y:0,width:0,height:0},this.nx=0,this.ny=0,this.maskPath=null,this.shapes=[],this.alpha=parseFloat(t.alpha)||0,t.layout&&(this.layout.x=parseFloat(t.layout.x)||0,this.layout.y=parseFloat(t.layout.y)||0,this.layout.width=parseFloat(t.layout.width)||0,this.layout.height=parseFloat(t.layout.height)||0),t.transform&&(this.transform.a=parseFloat(t.transform.a)||1,this.transform.b=parseFloat(t.transform.b)||0,this.transform.c=parseFloat(t.transform.c)||0,this.transform.d=parseFloat(t.transform.d)||1,this.transform.tx=parseFloat(t.transform.tx)||0,this.transform.ty=parseFloat(t.transform.ty)||0),t.clipPath&&t.clipPath.length>0&&(this.maskPath=new i.BezierPath(t.clipPath,void 0,{fill:"#000000"})),t.shapes&&(t.shapes instanceof Array&&t.shapes.forEach((function(e){switch(e.pathArgs=e.args,e.type){case 0:e.type="shape",e.pathArgs=e.shape;break;case 1:e.type="rect",e.pathArgs=e.rect;break;case 2:e.type="ellipse",e.pathArgs=e.ellipse;break;case 3:e.type="keep"}if(e.styles){e.styles.fill&&("number"==typeof e.styles.fill.r&&(e.styles.fill[0]=e.styles.fill.r),"number"==typeof e.styles.fill.g&&(e.styles.fill[1]=e.styles.fill.g),"number"==typeof e.styles.fill.b&&(e.styles.fill[2]=e.styles.fill.b),"number"==typeof e.styles.fill.a&&(e.styles.fill[3]=e.styles.fill.a)),e.styles.stroke&&("number"==typeof e.styles.stroke.r&&(e.styles.stroke[0]=e.styles.stroke.r),"number"==typeof e.styles.stroke.g&&(e.styles.stroke[1]=e.styles.stroke.g),"number"==typeof e.styles.stroke.b&&(e.styles.stroke[2]=e.styles.stroke.b),"number"==typeof e.styles.stroke.a&&(e.styles.stroke[3]=e.styles.stroke.a));var t=e.styles.lineDash||[];switch(e.styles.lineDashI>0&&t.push(e.styles.lineDashI),e.styles.lineDashII>0&&(t.length<1&&t.push(0),t.push(e.styles.lineDashII),t.push(0)),e.styles.lineDashIII>0&&(t.length<2&&(t.push(0),t.push(0)),t[2]=e.styles.lineDashIII),e.styles.lineDash=t,e.styles.lineJoin){case 0:e.styles.lineJoin="miter";break;case 1:e.styles.lineJoin="round";break;case 2:e.styles.lineJoin="bevel"}switch(e.styles.lineCap){case 0:e.styles.lineCap="butt";break;case 1:e.styles.lineCap="round";break;case 2:e.styles.lineCap="square"}}})),t.shapes[0]&&"keep"===t.shapes[0].type?this.shapes=e.lastShapes:(this.shapes=t.shapes,e.lastShapes=t.shapes));var r=this.transform.a*this.layout.x+this.transform.c*this.layout.y+this.transform.tx,n=this.transform.a*(this.layout.x+this.layout.width)+this.transform.c*this.layout.y+this.transform.tx,o=this.transform.a*this.layout.x+this.transform.c*(this.layout.y+this.layout.height)+this.transform.tx,s=this.transform.a*(this.layout.x+this.layout.width)+this.transform.c*(this.layout.y+this.layout.height)+this.transform.tx,a=this.transform.b*this.layout.x+this.transform.d*this.layout.y+this.transform.ty,u=this.transform.b*(this.layout.x+this.layout.width)+this.transform.d*this.layout.y+this.transform.ty,f=this.transform.b*this.layout.x+this.transform.d*(this.layout.y+this.layout.height)+this.transform.ty,l=this.transform.b*(this.layout.x+this.layout.width)+this.transform.d*(this.layout.y+this.layout.height)+this.transform.ty;this.nx=Math.min(Math.min(o,s),Math.min(r,n)),this.ny=Math.min(Math.min(f,l),Math.min(a,u))}},function(e,t,r){"use strict";e.exports=r(35)},function(e,t,r){"use strict";var i=e.exports=r(36);i.build="light",i.load=function(e,t,r){return"function"==typeof t?(r=t,t=new i.Root):t||(t=new i.Root),t.load(e,r)},i.loadSync=function(e,t){return t||(t=new i.Root),t.loadSync(e)},i.encoder=r(21),i.decoder=r(26),i.verifier=r(27),i.converter=r(28),i.ReflectionObject=r(3),i.Namespace=r(6),i.Root=r(30),i.Enum=r(2),i.Type=r(22),i.Field=r(4),i.OneOf=r(11),i.MapField=r(23),i.Service=r(24),i.Method=r(25),i.Message=r(12),i.wrappers=r(29),i.types=r(7),i.util=r(0),i.ReflectionObject._configure(i.Root),i.Namespace._configure(i.Type,i.Service,i.Enum),i.Root._configure(i.Type),i.Field._configure(i.Type)},function(e,t,r){"use strict";function i(){n.util._configure(),n.Writer._configure(n.BufferWriter),n.Reader._configure(n.BufferReader)}var n=t;n.build="minimal",n.Writer=r(9),n.BufferWriter=r(44),n.Reader=r(10),n.BufferReader=r(45),n.util=r(1),n.rpc=r(19),n.roots=r(20),n.configure=i,i()},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var i=t;i.length=function(e){var t=e.length;if(!t)return 0;for(var r=0;--t%4>1&&"="===e.charAt(t);)++r;return Math.ceil(3*e.length)/4-r};for(var n=new Array(64),o=new Array(123),s=0;s<64;)o[n[s]=s<26?s+65:s<52?s+71:s<62?s-4:s-59|43]=s++;i.encode=function(e,t,r){for(var i,o=null,s=[],a=0,u=0;t<r;){var f=e[t++];switch(u){case 0:s[a++]=n[f>>2],i=(3&f)<<4,u=1;break;case 1:s[a++]=n[i|f>>4],i=(15&f)<<2,u=2;break;case 2:s[a++]=n[i|f>>6],s[a++]=n[63&f],u=0}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,s)),a=0)}return u&&(s[a++]=n[i],s[a++]=61,1===u&&(s[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,s.slice(0,a))),o.join("")):String.fromCharCode.apply(String,s.slice(0,a))},i.decode=function(e,t,r){for(var i,n=r,s=0,a=0;a<e.length;){var u=e.charCodeAt(a++);if(61===u&&s>1)break;if(void 0===(u=o[u]))throw Error("invalid encoding");switch(s){case 0:i=u,s=1;break;case 1:t[r++]=i<<2|(48&u)>>4,i=u,s=2;break;case 2:t[r++]=(15&i)<<4|(60&u)>>2,i=u,s=3;break;case 3:t[r++]=(3&i)<<6|u,s=0}}if(1===s)throw Error("invalid encoding");return r-n},i.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},function(e,t,r){"use strict";function i(){this._listeners={}}e.exports=i,i.prototype.on=function(e,t,r){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:r||this}),this},i.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var r=this._listeners[e],i=0;i<r.length;)r[i].fn===t?r.splice(i,1):++i;return this},i.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<t.length;)t[i].fn.apply(t[i++].ctx,r)}return this}},function(e,t,r){"use strict";function i(e){return"undefined"!=typeof Float32Array?function(){function t(e,t,r){o[0]=e,t[r]=s[0],t[r+1]=s[1],t[r+2]=s[2],t[r+3]=s[3]}function r(e,t,r){o[0]=e,t[r]=s[3],t[r+1]=s[2],t[r+2]=s[1],t[r+3]=s[0]}function i(e,t){return s[0]=e[t],s[1]=e[t+1],s[2]=e[t+2],s[3]=e[t+3],o[0]}function n(e,t){return s[3]=e[t],s[2]=e[t+1],s[1]=e[t+2],s[0]=e[t+3],o[0]}var o=new Float32Array([-0]),s=new Uint8Array(o.buffer),a=128===s[3];e.writeFloatLE=a?t:r,e.writeFloatBE=a?r:t,e.readFloatLE=a?i:n,e.readFloatBE=a?n:i}():function(){function t(e,t,r,i){var n=t<0?1:0;if(n&&(t=-t),0===t)e(1/t>0?0:2147483648,r,i);else if(isNaN(t))e(2143289344,r,i);else if(t>34028234663852886e22)e((n<<31|2139095040)>>>0,r,i);else if(t<11754943508222875e-54)e((n<<31|Math.round(t/1401298464324817e-60))>>>0,r,i);else{var o=Math.floor(Math.log(t)/Math.LN2);e((n<<31|o+127<<23|8388607&Math.round(t*Math.pow(2,-o)*8388608))>>>0,r,i)}}function r(e,t,r){var i=e(t,r),n=2*(i>>31)+1,o=i>>>23&255,s=8388607&i;return 255===o?s?NaN:n*(1/0):0===o?1401298464324817e-60*n*s:n*Math.pow(2,o-150)*(s+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,o),e.readFloatLE=r.bind(null,s),e.readFloatBE=r.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){function t(e,t,r){o[0]=e,t[r]=s[0],t[r+1]=s[1],t[r+2]=s[2],t[r+3]=s[3],t[r+4]=s[4],t[r+5]=s[5],t[r+6]=s[6],t[r+7]=s[7]}function r(e,t,r){o[0]=e,t[r]=s[7],t[r+1]=s[6],t[r+2]=s[5],t[r+3]=s[4],t[r+4]=s[3],t[r+5]=s[2],t[r+6]=s[1],t[r+7]=s[0]}function i(e,t){return s[0]=e[t],s[1]=e[t+1],s[2]=e[t+2],s[3]=e[t+3],s[4]=e[t+4],s[5]=e[t+5],s[6]=e[t+6],s[7]=e[t+7],o[0]}function n(e,t){return s[7]=e[t],s[6]=e[t+1],s[5]=e[t+2],s[4]=e[t+3],s[3]=e[t+4],s[2]=e[t+5],s[1]=e[t+6],s[0]=e[t+7],o[0]}var o=new Float64Array([-0]),s=new Uint8Array(o.buffer),a=128===s[7];e.writeDoubleLE=a?t:r,e.writeDoubleBE=a?r:t,e.readDoubleLE=a?i:n,e.readDoubleBE=a?n:i}():function(){function t(e,t,r,i,n,o){var s=i<0?1:0;if(s&&(i=-i),0===i)e(0,n,o+t),e(1/i>0?0:2147483648,n,o+r);else if(isNaN(i))e(0,n,o+t),e(2146959360,n,o+r);else if(i>17976931348623157e292)e(0,n,o+t),e((s<<31|2146435072)>>>0,n,o+r);else{var a;if(i<22250738585072014e-324)e((a=i/5e-324)>>>0,n,o+t),e((s<<31|a/4294967296)>>>0,n,o+r);else{var u=Math.floor(Math.log(i)/Math.LN2);1024===u&&(u=1023),e(4503599627370496*(a=i*Math.pow(2,-u))>>>0,n,o+t),e((s<<31|u+1023<<20|1048576*a&1048575)>>>0,n,o+r)}}}function r(e,t,r,i,n){var o=e(i,n+t),s=e(i,n+r),a=2*(s>>31)+1,u=s>>>20&2047,f=4294967296*(1048575&s)+o;return 2047===u?f?NaN:a*(1/0):0===u?5e-324*a*f:a*Math.pow(2,u-1075)*(f+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,o,4,0),e.readDoubleLE=r.bind(null,s,0,4),e.readDoubleBE=r.bind(null,a,4,0)}(),e}function n(e,t,r){t[r]=255&e,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function o(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=255&e}function s(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=i(i)},function(e,t,r){"use strict";var i=t;i.length=function(e){for(var t=0,r=0,i=0;i<e.length;++i)(r=e.charCodeAt(i))<128?t+=1:r<2048?t+=2:55296==(64512&r)&&56320==(64512&e.charCodeAt(i+1))?(++i,t+=4):t+=3;return t},i.read=function(e,t,r){if(r-t<1)return"";for(var i,n=null,o=[],s=0;t<r;)(i=e[t++])<128?o[s++]=i:i>191&&i<224?o[s++]=(31&i)<<6|63&e[t++]:i>239&&i<365?(i=((7&i)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,o[s++]=55296+(i>>10),o[s++]=56320+(1023&i)):o[s++]=(15&i)<<12|(63&e[t++])<<6|63&e[t++],s>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,o)),s=0);return n?(s&&n.push(String.fromCharCode.apply(String,o.slice(0,s))),n.join("")):String.fromCharCode.apply(String,o.slice(0,s))},i.write=function(e,t,r){for(var i,n,o=r,s=0;s<e.length;++s)(i=e.charCodeAt(s))<128?t[r++]=i:i<2048?(t[r++]=i>>6|192,t[r++]=63&i|128):55296==(64512&i)&&56320==(64512&(n=e.charCodeAt(s+1)))?(i=65536+((1023&i)<<10)+(1023&n),++s,t[r++]=i>>18|240,t[r++]=i>>12&63|128,t[r++]=i>>6&63|128,t[r++]=63&i|128):(t[r++]=i>>12|224,t[r++]=i>>6&63|128,t[r++]=63&i|128);return r-o}},function(e,t,r){"use strict";e.exports=function(e,t,r){var i=r||8192,n=i>>>1,o=null,s=i;return function(r){if(r<1||r>n)return e(r);s+r>i&&(o=e(i),s=0);var a=t.call(o,s,s+=r);return 7&s&&(s=1+(7|s)),a}}},function(e,t,r){"use strict";function i(e,t){this.lo=e>>>0,this.hi=t>>>0}e.exports=i;var n=r(1),o=i.zero=new i(0,0);o.toNumber=function(){return 0},o.zzEncode=o.zzDecode=function(){return this},o.length=function(){return 1};var s=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return o;var t=e<0;t&&(e=-e);var r=e>>>0,n=(e-r)/4294967296>>>0;return t&&(n=~n>>>0,r=~r>>>0,++r>4294967295&&(r=0,++n>4294967295&&(n=0))),new i(r,n)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(n.isString(e)){if(!n.Long)return i.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):o},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,r=~this.hi>>>0;return t||(r=r+1>>>0),-(t+4294967296*r)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var a=String.prototype.charCodeAt;i.fromHash=function(e){return e===s?o:new i((a.call(e,0)|a.call(e,1)<<8|a.call(e,2)<<16|a.call(e,3)<<24)>>>0,(a.call(e,4)|a.call(e,5)<<8|a.call(e,6)<<16|a.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return 0===r?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:r<128?9:10}},function(e,t,r){"use strict";function i(){o.call(this)}function n(e,t,r){e.length<40?s.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}e.exports=i;var o=r(9);(i.prototype=Object.create(o.prototype)).constructor=i;var s=r(1);i._configure=function(){i.alloc=s._Buffer_allocUnsafe,i.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(e,t,r){t.set(e,r)}:function(e,t,r){if(e.copy)e.copy(t,r,0,e.length);else for(var i=0;i<e.length;)t[r++]=e[i++]}},i.prototype.bytes=function(e){s.isString(e)&&(e=s._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(i.writeBytesBuffer,t,e),this},i.prototype.string=function(e){var t=s.Buffer.byteLength(e);return this.uint32(t),t&&this._push(n,t,e),this},i._configure()},function(e,t,r){"use strict";function i(e){n.call(this,e)}e.exports=i;var n=r(10);(i.prototype=Object.create(n.prototype)).constructor=i;var o=r(1);i._configure=function(){o.Buffer&&(i.prototype._slice=o.Buffer.prototype.slice)},i.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},i._configure()},function(e,t,r){"use strict";function i(e,t,r){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(r)}e.exports=i;var n=r(1);(i.prototype=Object.create(n.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,r,i,o,s){if(!o)throw TypeError("request must be specified");var a=this;if(!s)return n.asPromise(e,a,t,r,i,o);if(a.rpcImpl)try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),(function(e,r){if(e)return a.emit("error",e,t),s(e);if(null!==r){if(!(r instanceof i))try{r=i[a.responseDelimited?"decodeDelimited":"decode"](r)}catch(e){return a.emit("error",e,t),s(e)}return a.emit("data",r,t),s(null,r)}a.end(!0)}))}catch(e){return a.emit("error",e,t),void setTimeout((function(){s(e)}),0)}else setTimeout((function(){s(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},function(e,t,r){"use strict";function i(e,t){function r(e){if("string"!=typeof e){var t=n();if(i.verbose&&console.log("codegen: "+t),t="return "+t,e){for(var s=Object.keys(e),a=new Array(s.length+1),u=new Array(s.length),f=0;f<s.length;)a[f]=s[f],u[f]=e[s[f++]];return a[f]=t,Function.apply(null,a).apply(null,u)}return Function(t)()}for(var l=new Array(arguments.length-1),h=0;h<l.length;)l[h]=arguments[++h];if(h=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var r=l[h++];switch(t){case"d":case"f":return String(Number(r));case"i":return String(Math.floor(r));case"j":return JSON.stringify(r);case"s":return String(r)}return"%"})),h!==l.length)throw Error("parameter count mismatch");return o.push(e),r}function n(r){return"function "+(r||t||"")+"("+(e&&e.join(",")||"")+"){\n "+o.join("\n ")+"\n}"}"string"==typeof e&&(t=e,e=void 0);var o=[];return r.toString=n,r}e.exports=i,i.verbose=!1},function(e,t,r){"use strict";function i(e,t,r){return"function"==typeof t?(r=t,t={}):t||(t={}),r?!t.xhr&&o&&o.readFile?o.readFile(e,(function(n,o){return n&&"undefined"!=typeof XMLHttpRequest?i.xhr(e,t,r):n?r(n):r(null,t.binary?o:o.toString("utf8"))})):i.xhr(e,t,r):n(i,this,e,t)}e.exports=i;var n=r(17),o=r(18)("fs");i.xhr=function(e,t,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(4===i.readyState){if(0!==i.status&&200!==i.status)return r(Error("status "+i.status));if(t.binary){var e=i.response;if(!e){e=[];for(var n=0;n<i.responseText.length;++n)e.push(255&i.responseText.charCodeAt(n))}return r(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return r(null,i.responseText)}},t.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",e),i.send()}},function(e,t,r){"use strict";var i=t,n=i.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},o=i.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),r=n(e),i="";r&&(i=t.shift()+"/");for(var o=0;o<t.length;)".."===t[o]?o>0&&".."!==t[o-1]?t.splice(--o,2):r?t.splice(o,1):++o:"."===t[o]?t.splice(o,1):++o;return i+t.join("/")};i.resolve=function(e,t,r){return r||(t=o(t)),n(t)?t:(r||(e=o(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?o(e+"/"+t):t)}},function(e,t,r){"use strict";var i="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},n=r(16).ProtoMovieEntity,o=r(8).assign,s=r(51),a={};o(a,s);var u=function(e){for(var t=[],r=0;r<e.length;r+=32768)t.push(String.fromCharCode.apply(null,e.subarray(r,r+32768)));return t.join("")},f={loadAssets:function(e,t,r){if("object"===("undefined"==typeof JSZipUtils?"undefined":i(JSZipUtils))&&"function"==typeof JSZip)if("[object File]"==e.toString())f._readBlobAsArrayBuffer(e,(function(e){var i=new Uint8Array(e,0,4);80==i[0]&&75==i[1]&&3==i[2]&&4==i[3]?JSZip.loadAsync(e).then((function(e){f._decodeAssets(e,t)})):f.load_viaProto(e,t,r)}));else if(e.indexOf("data:svga/1.0;base64,")>=0){var n=f._base64ToArrayBuffer(e.substring(21));JSZip.loadAsync(n).then((function(e){f._decodeAssets(e,t)}))}else if(e.indexOf("data:svga/2.0;base64,")>=0){n=f._base64ToArrayBuffer(e.substring(21));f.load_viaProto(n,t,r)}else JSZipUtils.getBinaryContent(e,(function(e,i){if(e)throw r&&r(e),console.error(e),e;var n=new Uint8Array(i,0,4);80==n[0]&&75==n[1]&&3==n[2]&&4==n[3]?JSZip.loadAsync(i).then((function(e){f._decodeAssets(e,t)})):f.load_viaProto(i,t,r)}));else{var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){f.load_viaProto(o.response,t,r)},o.onerror=function(e){if(!r)throw console.error(e),e;r(e)},o.send()}},load_viaProto:function(e,t,r){try{var i=a.inflate(e),o=n.decode(i),s={};f._loadImages(s,void 0,o,(function(){o.ver="2.0",t({movie:o,images:s})}))}catch(e){if(r)return void r(e);throw console.error(e),e}},_decodeAssets:function(e,t){var r="1.0";e.file("movie.binary")&&(r="1.5"),e.file("movie.spec").async("string").then((function(i){var n=JSON.parse(i),o={};n.ver=r,f._loadImages(o,e,n,(function(){t({movie:n,images:o})}))}))},_loadImages:function(e,t,r,o){var s=this;if("object"===(void 0===r?"undefined":i(r))&&r.$type==n){var a=!0;if(t)e:for(var l in r.images){switch(function(i){if(r.images.hasOwnProperty(i)){var n=r.images[i],l=u(n);return e.hasOwnProperty(i)?"continue":(a=!1,t.file(l+".png").async("base64").then(function(n){e[i]=n,f._loadImages(e,t,r,o)}.bind(s)),"break")}}(l)){case"continue":continue;case"break":break e}}else for(var h in r.images)if(r.images.hasOwnProperty(h)){var c=r.images[h],p=void 0;try{p=u(c)}catch(e){p=u(c)}e[h]=btoa(p)}a&&o.call(this)}else{a=!0;for(var d in r.images)if(r.images.hasOwnProperty(d)){var y=r.images[d];if(e.hasOwnProperty(d))continue;a=!1,t.file(y+".png").async("base64").then(function(i){e[d]=i,f._loadImages(e,t,r,o)}.bind(this));break}a&&o.call(this)}},_base64ToArrayBuffer:function(e){for(var t=window.atob(e),r=t.length,i=new Uint8Array(r),n=0;n<r;n++)i[n]=t.charCodeAt(n);return i.buffer},_readBlobAsArrayBuffer:function(e,t){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.readAsArrayBuffer(e)}};e.exports=function(e,t,r){f.loadAssets(e,t,r)}},function(e,t,r){"use strict";function i(e){if(!(this instanceof i))return new i(e);this.options=s.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 l,this.strm.avail_out=0;var r=o.inflateInit2(this.strm,t.windowBits);if(r!==u.Z_OK)throw new Error(f[r]);if(this.header=new h,o.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=o.inflateSetDictionary(this.strm,t.dictionary))!==u.Z_OK))throw new Error(f[r])}function n(e,t){var r=new i(t);if(r.push(e,!0),r.err)throw r.msg||f[r.err];return r.result}var o=r(52),s=r(8),a=r(57),u=r(58),f=r(59),l=r(60),h=r(61),c=Object.prototype.toString;i.prototype.push=function(e,t){var r,i,n,f,l,h=this.strm,p=this.options.chunkSize,d=this.options.dictionary,y=!1;if(this.ended)return!1;i=t===~~t?t:!0===t?u.Z_FINISH:u.Z_NO_FLUSH,"string"==typeof e?h.input=a.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new s.Buf8(p),h.next_out=0,h.avail_out=p),(r=o.inflate(h,u.Z_NO_FLUSH))===u.Z_NEED_DICT&&d&&(r=o.inflateSetDictionary(this.strm,d)),r===u.Z_BUF_ERROR&&!0===y&&(r=u.Z_OK,y=!1),r!==u.Z_STREAM_END&&r!==u.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==u.Z_STREAM_END&&(0!==h.avail_in||i!==u.Z_FINISH&&i!==u.Z_SYNC_FLUSH)||("string"===this.options.to?(n=a.utf8border(h.output,h.next_out),f=h.next_out-n,l=a.buf2string(h.output,n),h.next_out=f,h.avail_out=p-f,f&&s.arraySet(h.output,h.output,n,f,0),this.onData(l)):this.onData(s.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(y=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==u.Z_STREAM_END);return r===u.Z_STREAM_END&&(i=u.Z_FINISH),i===u.Z_FINISH?(r=o.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===u.Z_OK):i!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),h.avail_out=0,!0)},i.prototype.onData=function(e){this.chunks.push(e)},i.prototype.onEnd=function(e){e===u.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=i,t.inflate=n,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,n(e,t)},t.ungzip=n},function(e,t,r){"use strict";function i(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function n(){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 p.Buf16(320),this.work=new p.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(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=B,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new p.Buf32(le),t.distcode=t.distdyn=new p.Buf32(he),t.sane=1,t.back=-1,O):j}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):j}function a(e,t){var r,i;return e&&e.state?(i=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?j:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,s(e))):j}function u(e,t){var r,i;return e?(i=new n,e.state=i,i.window=null,(r=a(e,t))!==O&&(e.state=null),r):j}function f(e){if(pe){var t;for(h=new p.Buf32(512),c=new p.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(v(g,e.lens,0,288,h,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;v(_,e.lens,0,32,c,0,e.work,{bits:5}),pe=!1}e.lencode=h,e.lenbits=9,e.distcode=c,e.distbits=5}function l(e,t,r,i){var n,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new p.Buf8(o.wsize)),i>=o.wsize?(p.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((n=o.wsize-o.wnext)>i&&(n=i),p.arraySet(o.window,t,r-i,n,o.wnext),(i-=n)?(p.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=n,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=n))),0}var h,c,p=r(8),d=r(53),y=r(54),m=r(55),v=r(56),b=0,g=1,_=2,w=4,k=5,x=6,O=0,S=1,A=2,j=-2,E=-3,T=-4,N=-5,F=8,B=1,P=2,I=3,R=4,C=5,L=6,D=7,M=8,z=9,J=10,Z=11,q=12,U=13,$=14,V=15,K=16,H=17,W=18,G=19,Y=20,X=21,Q=22,ee=23,te=24,re=25,ie=26,ne=27,oe=28,se=29,ae=30,ue=31,fe=32,le=852,he=592,ce=15,pe=!0;t.inflateReset=s,t.inflateReset2=a,t.inflateResetKeep=o,t.inflateInit=function(e){return u(e,ce)},t.inflateInit2=u,t.inflate=function(e,t){var r,n,o,s,a,u,h,c,le,he,ce,pe,de,ye,me,ve,be,ge,_e,we,ke,xe,Oe,Se,Ae=0,je=new p.Buf8(4),Ee=[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 j;(r=e.state).mode===q&&(r.mode=U),a=e.next_out,o=e.output,h=e.avail_out,s=e.next_in,n=e.input,u=e.avail_in,c=r.hold,le=r.bits,he=u,ce=h,xe=O;e:for(;;)switch(r.mode){case B:if(0===r.wrap){r.mode=U;break}for(;le<16;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(2&r.wrap&&35615===c){r.check=0,je[0]=255&c,je[1]=c>>>8&255,r.check=y(r.check,je,2,0),c=0,le=0,r.mode=P;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",r.mode=ae;break}if((15&c)!==F){e.msg="unknown compression method",r.mode=ae;break}if(le-=4,ke=8+(15&(c>>>=4)),0===r.wbits)r.wbits=ke;else if(ke>r.wbits){e.msg="invalid window size",r.mode=ae;break}r.dmax=1<<ke,e.adler=r.check=1,r.mode=512&c?J:q,c=0,le=0;break;case P:for(;le<16;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(r.flags=c,(255&r.flags)!==F){e.msg="unknown compression method",r.mode=ae;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=ae;break}r.head&&(r.head.text=c>>8&1),512&r.flags&&(je[0]=255&c,je[1]=c>>>8&255,r.check=y(r.check,je,2,0)),c=0,le=0,r.mode=I;case I:for(;le<32;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}r.head&&(r.head.time=c),512&r.flags&&(je[0]=255&c,je[1]=c>>>8&255,je[2]=c>>>16&255,je[3]=c>>>24&255,r.check=y(r.check,je,4,0)),c=0,le=0,r.mode=R;case R:for(;le<16;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}r.head&&(r.head.xflags=255&c,r.head.os=c>>8),512&r.flags&&(je[0]=255&c,je[1]=c>>>8&255,r.check=y(r.check,je,2,0)),c=0,le=0,r.mode=C;case C:if(1024&r.flags){for(;le<16;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}r.length=c,r.head&&(r.head.extra_len=c),512&r.flags&&(je[0]=255&c,je[1]=c>>>8&255,r.check=y(r.check,je,2,0)),c=0,le=0}else r.head&&(r.head.extra=null);r.mode=L;case L:if(1024&r.flags&&((pe=r.length)>u&&(pe=u),pe&&(r.head&&(ke=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),p.arraySet(r.head.extra,n,s,pe,ke)),512&r.flags&&(r.check=y(r.check,n,pe,s)),u-=pe,s+=pe,r.length-=pe),r.length))break e;r.length=0,r.mode=D;case D:if(2048&r.flags){if(0===u)break e;pe=0;do{ke=n[s+pe++],r.head&&ke&&r.length<65536&&(r.head.name+=String.fromCharCode(ke))}while(ke&&pe<u);if(512&r.flags&&(r.check=y(r.check,n,pe,s)),u-=pe,s+=pe,ke)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=M;case M:if(4096&r.flags){if(0===u)break e;pe=0;do{ke=n[s+pe++],r.head&&ke&&r.length<65536&&(r.head.comment+=String.fromCharCode(ke))}while(ke&&pe<u);if(512&r.flags&&(r.check=y(r.check,n,pe,s)),u-=pe,s+=pe,ke)break e}else r.head&&(r.head.comment=null);r.mode=z;case z:if(512&r.flags){for(;le<16;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(c!==(65535&r.check)){e.msg="header crc mismatch",r.mode=ae;break}c=0,le=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=q;break;case J:for(;le<32;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}e.adler=r.check=i(c),c=0,le=0,r.mode=Z;case Z:if(0===r.havedict)return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=u,r.hold=c,r.bits=le,A;e.adler=r.check=1,r.mode=q;case q:if(t===k||t===x)break e;case U:if(r.last){c>>>=7&le,le-=7&le,r.mode=ne;break}for(;le<3;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}switch(r.last=1&c,le-=1,3&(c>>>=1)){case 0:r.mode=$;break;case 1:if(f(r),r.mode=Y,t===x){c>>>=2,le-=2;break e}break;case 2:r.mode=H;break;case 3:e.msg="invalid block type",r.mode=ae}c>>>=2,le-=2;break;case $:for(c>>>=7&le,le-=7≤le<32;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if((65535&c)!=(c>>>16^65535)){e.msg="invalid stored block lengths",r.mode=ae;break}if(r.length=65535&c,c=0,le=0,r.mode=V,t===x)break e;case V:r.mode=K;case K:if(pe=r.length){if(pe>u&&(pe=u),pe>h&&(pe=h),0===pe)break e;p.arraySet(o,n,s,pe,a),u-=pe,s+=pe,h-=pe,a+=pe,r.length-=pe;break}r.mode=q;break;case H:for(;le<14;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(r.nlen=257+(31&c),c>>>=5,le-=5,r.ndist=1+(31&c),c>>>=5,le-=5,r.ncode=4+(15&c),c>>>=4,le-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=ae;break}r.have=0,r.mode=W;case W:for(;r.have<r.ncode;){for(;le<3;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}r.lens[Ee[r.have++]]=7&c,c>>>=3,le-=3}for(;r.have<19;)r.lens[Ee[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,Oe={bits:r.lenbits},xe=v(b,r.lens,0,19,r.lencode,0,r.work,Oe),r.lenbits=Oe.bits,xe){e.msg="invalid code lengths set",r.mode=ae;break}r.have=0,r.mode=G;case G:for(;r.have<r.nlen+r.ndist;){for(;ve=(Ae=r.lencode[c&(1<<r.lenbits)-1])>>>16&255,be=65535&Ae,!((me=Ae>>>24)<=le);){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(be<16)c>>>=me,le-=me,r.lens[r.have++]=be;else{if(16===be){for(Se=me+2;le<Se;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(c>>>=me,le-=me,0===r.have){e.msg="invalid bit length repeat",r.mode=ae;break}ke=r.lens[r.have-1],pe=3+(3&c),c>>>=2,le-=2}else if(17===be){for(Se=me+3;le<Se;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}le-=me,ke=0,pe=3+(7&(c>>>=me)),c>>>=3,le-=3}else{for(Se=me+7;le<Se;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}le-=me,ke=0,pe=11+(127&(c>>>=me)),c>>>=7,le-=7}if(r.have+pe>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=ae;break}for(;pe--;)r.lens[r.have++]=ke}}if(r.mode===ae)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=ae;break}if(r.lenbits=9,Oe={bits:r.lenbits},xe=v(g,r.lens,0,r.nlen,r.lencode,0,r.work,Oe),r.lenbits=Oe.bits,xe){e.msg="invalid literal/lengths set",r.mode=ae;break}if(r.distbits=6,r.distcode=r.distdyn,Oe={bits:r.distbits},xe=v(_,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Oe),r.distbits=Oe.bits,xe){e.msg="invalid distances set",r.mode=ae;break}if(r.mode=Y,t===x)break e;case Y:r.mode=X;case X:if(u>=6&&h>=258){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=u,r.hold=c,r.bits=le,m(e,ce),a=e.next_out,o=e.output,h=e.avail_out,s=e.next_in,n=e.input,u=e.avail_in,c=r.hold,le=r.bits,r.mode===q&&(r.back=-1);break}for(r.back=0;ve=(Ae=r.lencode[c&(1<<r.lenbits)-1])>>>16&255,be=65535&Ae,!((me=Ae>>>24)<=le);){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(ve&&0==(240&ve)){for(ge=me,_e=ve,we=be;ve=(Ae=r.lencode[we+((c&(1<<ge+_e)-1)>>ge)])>>>16&255,be=65535&Ae,!(ge+(me=Ae>>>24)<=le);){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}c>>>=ge,le-=ge,r.back+=ge}if(c>>>=me,le-=me,r.back+=me,r.length=be,0===ve){r.mode=ie;break}if(32&ve){r.back=-1,r.mode=q;break}if(64&ve){e.msg="invalid literal/length code",r.mode=ae;break}r.extra=15&ve,r.mode=Q;case Q:if(r.extra){for(Se=r.extra;le<Se;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}r.length+=c&(1<<r.extra)-1,c>>>=r.extra,le-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ee;case ee:for(;ve=(Ae=r.distcode[c&(1<<r.distbits)-1])>>>16&255,be=65535&Ae,!((me=Ae>>>24)<=le);){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(0==(240&ve)){for(ge=me,_e=ve,we=be;ve=(Ae=r.distcode[we+((c&(1<<ge+_e)-1)>>ge)])>>>16&255,be=65535&Ae,!(ge+(me=Ae>>>24)<=le);){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}c>>>=ge,le-=ge,r.back+=ge}if(c>>>=me,le-=me,r.back+=me,64&ve){e.msg="invalid distance code",r.mode=ae;break}r.offset=be,r.extra=15&ve,r.mode=te;case te:if(r.extra){for(Se=r.extra;le<Se;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}r.offset+=c&(1<<r.extra)-1,c>>>=r.extra,le-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=ae;break}r.mode=re;case re:if(0===h)break e;if(pe=ce-h,r.offset>pe){if((pe=r.offset-pe)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=ae;break}pe>r.wnext?(pe-=r.wnext,de=r.wsize-pe):de=r.wnext-pe,pe>r.length&&(pe=r.length),ye=r.window}else ye=o,de=a-r.offset,pe=r.length;pe>h&&(pe=h),h-=pe,r.length-=pe;do{o[a++]=ye[de++]}while(--pe);0===r.length&&(r.mode=X);break;case ie:if(0===h)break e;o[a++]=r.length,h--,r.mode=X;break;case ne:if(r.wrap){for(;le<32;){if(0===u)break e;u--,c|=n[s++]<<le,le+=8}if(ce-=h,e.total_out+=ce,r.total+=ce,ce&&(e.adler=r.check=r.flags?y(r.check,o,ce,a-ce):d(r.check,o,ce,a-ce)),ce=h,(r.flags?c:i(c))!==r.check){e.msg="incorrect data check",r.mode=ae;break}c=0,le=0}r.mode=oe;case oe:if(r.wrap&&r.flags){for(;le<32;){if(0===u)break e;u--,c+=n[s++]<<le,le+=8}if(c!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=ae;break}c=0,le=0}r.mode=se;case se:xe=S;break e;case ae:xe=E;break e;case ue:return T;case fe:default:return j}return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=u,r.hold=c,r.bits=le,(r.wsize||ce!==e.avail_out&&r.mode<ae&&(r.mode<ne||t!==w))&&l(e,e.output,e.next_out,ce-e.avail_out)?(r.mode=ue,T):(he-=e.avail_in,ce-=e.avail_out,e.total_in+=he,e.total_out+=ce,r.total+=ce,r.wrap&&ce&&(e.adler=r.check=r.flags?y(r.check,o,ce,e.next_out-ce):d(r.check,o,ce,e.next_out-ce)),e.data_type=r.bits+(r.last?64:0)+(r.mode===q?128:0)+(r.mode===Y||r.mode===V?256:0),(0===he&&0===ce||t===w)&&xe===O&&(xe=N),xe)},t.inflateEnd=function(e){if(!e||!e.state)return j;var t=e.state;return t.window&&(t.window=null),e.state=null,O},t.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?j:(r.head=t,t.done=!1,O):j},t.inflateSetDictionary=function(e,t){var r,i=t.length;return e&&e.state?0!==(r=e.state).wrap&&r.mode!==Z?j:r.mode===Z&&d(1,t,i,0)!==r.check?E:l(e,t,i,i)?(r.mode=ue,T):(r.havedict=1,O):j},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,r){"use strict";e.exports=function(e,t,r,i){for(var n=65535&e|0,o=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(n=n+t[i++]|0)|0}while(--s);n%=65521,o%=65521}return n|o<<16|0}},function(e,t,r){"use strict";var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,n){var o=i,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^o[255&(e^t[a])];return-1^e}},function(e,t,r){"use strict";e.exports=function(e,t){var r,i,n,o,s,a,u,f,l,h,c,p,d,y,m,v,b,g,_,w,k,x,O,S,A;r=e.state,i=e.next_in,S=e.input,n=i+(e.avail_in-5),o=e.next_out,A=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),u=r.dmax,f=r.wsize,l=r.whave,h=r.wnext,c=r.window,p=r.hold,d=r.bits,y=r.lencode,m=r.distcode,v=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{d<15&&(p+=S[i++]<<d,d+=8,p+=S[i++]<<d,d+=8),g=y[p&v];t:for(;;){if(p>>>=_=g>>>24,d-=_,0==(_=g>>>16&255))A[o++]=65535&g;else{if(!(16&_)){if(0==(64&_)){g=y[(65535&g)+(p&(1<<_)-1)];continue t}if(32&_){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&g,(_&=15)&&(d<_&&(p+=S[i++]<<d,d+=8),w+=p&(1<<_)-1,p>>>=_,d-=_),d<15&&(p+=S[i++]<<d,d+=8,p+=S[i++]<<d,d+=8),g=m[p&b];r:for(;;){if(p>>>=_=g>>>24,d-=_,!(16&(_=g>>>16&255))){if(0==(64&_)){g=m[(65535&g)+(p&(1<<_)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&g,d<(_&=15)&&(p+=S[i++]<<d,(d+=8)<_&&(p+=S[i++]<<d,d+=8)),(k+=p&(1<<_)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=_,d-=_,k>(_=o-s)){if((_=k-_)>l&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,O=c,0===h){if(x+=f-_,_<w){w-=_;do{A[o++]=c[x++]}while(--_);x=o-k,O=A}}else if(h<_){if(x+=f+h-_,(_-=h)<w){w-=_;do{A[o++]=c[x++]}while(--_);if(x=0,h<w){w-=_=h;do{A[o++]=c[x++]}while(--_);x=o-k,O=A}}}else if(x+=h-_,_<w){w-=_;do{A[o++]=c[x++]}while(--_);x=o-k,O=A}for(;w>2;)A[o++]=O[x++],A[o++]=O[x++],A[o++]=O[x++],w-=3;w&&(A[o++]=O[x++],w>1&&(A[o++]=O[x++]))}else{x=o-k;do{A[o++]=A[x++],A[o++]=A[x++],A[o++]=A[x++],w-=3}while(w>2);w&&(A[o++]=A[x++],w>1&&(A[o++]=A[x++]))}break}}break}}while(i<n&&o<a);i-=w=d>>3,p&=(1<<(d-=w<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=o<a?a-o+257:257-(o-a),r.hold=p,r.bits=d}},function(e,t,r){"use strict";var i=r(8),n=[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],o=[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],s=[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],a=[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];e.exports=function(e,t,r,u,f,l,h,c){var p,d,y,m,v,b,g,_,w,k=c.bits,x=0,O=0,S=0,A=0,j=0,E=0,T=0,N=0,F=0,B=0,P=null,I=0,R=new i.Buf16(16),C=new i.Buf16(16),L=null,D=0;for(x=0;x<=15;x++)R[x]=0;for(O=0;O<u;O++)R[t[r+O]]++;for(j=k,A=15;A>=1&&0===R[A];A--);if(j>A&&(j=A),0===A)return f[l++]=20971520,f[l++]=20971520,c.bits=1,0;for(S=1;S<A&&0===R[S];S++);for(j<S&&(j=S),N=1,x=1;x<=15;x++)if(N<<=1,(N-=R[x])<0)return-1;if(N>0&&(0===e||1!==A))return-1;for(C[1]=0,x=1;x<15;x++)C[x+1]=C[x]+R[x];for(O=0;O<u;O++)0!==t[r+O]&&(h[C[t[r+O]]++]=O);if(0===e?(P=L=h,b=19):1===e?(P=n,I-=257,L=o,D-=257,b=256):(P=s,L=a,b=-1),B=0,O=0,x=S,v=l,E=j,T=0,y=-1,m=(F=1<<j)-1,1===e&&F>852||2===e&&F>592)return 1;for(;;){g=x-T,h[O]<b?(_=0,w=h[O]):h[O]>b?(_=L[D+h[O]],w=P[I+h[O]]):(_=96,w=0),p=1<<x-T,S=d=1<<E;do{f[v+(B>>T)+(d-=p)]=g<<24|_<<16|w|0}while(0!==d);for(p=1<<x-1;B&p;)p>>=1;if(0!==p?(B&=p-1,B+=p):B=0,O++,0==--R[x]){if(x===A)break;x=t[r+h[O]]}if(x>j&&(B&m)!==y){for(0===T&&(T=j),v+=S,N=1<<(E=x-T);E+T<A&&!((N-=R[E+T])<=0);)E++,N<<=1;if(F+=1<<E,1===e&&F>852||2===e&&F>592)return 1;f[y=B&m]=j<<24|E<<16|v-l|0}}return 0!==B&&(f[v+B]=x-T<<24|64<<16|0),c.bits=j,0}},function(e,t,r){"use strict";function i(e,t){if(t<65534&&(e.subarray&&s||!e.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}var n=r(8),o=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var a=new n.Buf8(256),u=0;u<256;u++)a[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;a[254]=a[254]=1,t.string2buf=function(e){var t,r,i,o,s,a=e.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(t=new n.Buf8(u),s=0,o=0;s<u;o++)55296==(64512&(r=e.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=e.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?t[s++]=r:r<2048?(t[s++]=192|r>>>6,t[s++]=128|63&r):r<65536?(t[s++]=224|r>>>12,t[s++]=128|r>>>6&63,t[s++]=128|63&r):(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63,t[s++]=128|r>>>6&63,t[s++]=128|63&r);return t},t.buf2binstring=function(e){return i(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t},t.buf2string=function(e,t){var r,n,o,s,u=t||e.length,f=new Array(2*u);for(n=0,r=0;r<u;)if((o=e[r++])<128)f[n++]=o;else if((s=a[o])>4)f[n++]=65533,r+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&r<u;)o=o<<6|63&e[r++],s--;s>1?f[n++]=65533:o<65536?f[n++]=o:(o-=65536,f[n++]=55296|o>>10&1023,f[n++]=56320|1023&o)}return i(f,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+a[e[r]]>t?r:t}},function(e,t,r){"use strict";e.exports={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}},function(e,t,r){"use strict";e.exports={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"}},function(e,t,r){"use strict";e.exports=function(){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(e,t,r){"use strict";e.exports=function(){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(e,t,r){"undefined"!=typeof self&&self,e.exports=function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1);e.exports=i.ValueAnimator},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){this.startValue=0,this.endValue=0,this.duration=0,this.loops=1,this.fillRule=0,this.onStart=function(){},this.onUpdate=function(){},this.onEnd=function(){},this.mRunning=!1,this.mStartTime=0,this.mCurrentFrication=0,this.mReverse=!1}return e.prototype.start=function(e){void 0===e&&(e=void 0),this.doStart(!1,e)},e.prototype.reverse=function(e){void 0===e&&(e=void 0),this.doStart(!0,e)},e.prototype.stop=function(){this.doStop()},Object.defineProperty(e.prototype,"animatedValue",{get:function(){return(this.endValue-this.startValue)*this.mCurrentFrication+this.startValue},enumerable:!0,configurable:!0}),e.prototype.doStart=function(t,r){void 0===t&&(t=!1),void 0===r&&(r=void 0),this.mReverse=t,this.mRunning=!0,this.mStartTime=e.currentTimeMillsecond(),r&&(this.mStartTime-=t?(1-r/(this.endValue-this.startValue))*this.duration:r/(this.endValue-this.startValue)*this.duration),this.mCurrentFrication=0,this.onStart(),this.doFrame()},e.prototype.doStop=function(){this.mRunning=!1},e.prototype.doFrame=function(){this.mRunning&&(this.doDeltaTime(e.currentTimeMillsecond()-this.mStartTime),this.mRunning&&e.requestAnimationFrame(this.doFrame.bind(this)))},e.prototype.doDeltaTime=function(e){e>=this.duration*this.loops?(this.mCurrentFrication=1===this.fillRule?0:1,this.mRunning=!1):(this.mCurrentFrication=e%this.duration/this.duration,this.mReverse&&(this.mCurrentFrication=1-this.mCurrentFrication)),this.onUpdate(this.animatedValue),!1===this.mRunning&&this.onEnd()},e.currentTimeMillsecond=function(){return"undefined"==typeof performance?(new Date).getTime():performance.now()},e.requestAnimationFrame=function(e){return"undefined"==typeof requestAnimationFrame?setTimeout(e,16):window.requestAnimationFrame(e)},e}();t.ValueAnimator=i}])},,,,,function(e,t,r){"use strict";var i=r(13),n=r(68);e.exports={Parser:i.Parser,Player:n.Player,CreatejsPlayer:n.Player}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Player=void 0;var i="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},n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(69),s=r(13),a=r(62);t.Player=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.loops=0,i.clearsAfterStop=!0,i.fillMode="Forward",i._renderer=void 0,i._animator=void 0,i._contentMode="AspectFit",i._videoItem=void 0,i._currentFrame=0,i._dynamicImage={},i._dynamicImageTransform={},i._dynamicText={},i._onFinished=void 0,i._onFrame=void 0,i._onPercentage=void 0,i._clipsToBounds=!1,i._frame={x:0,y:0,width:0,height:0},(new s.Parser).load(e,(function(e){i.setVideoItem(e),!1!==r&&i.startAnimation()}),(function(e){i._onError&&i._onError(e)})),i._renderer=new o.Renderer(i),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,createjs.Container),n(t,[{key:"setVideoItem",value:function(e){this._currentFrame=0,this._videoItem=e,this.removeAllChildren(),this._addLayers()}},{key:"setContentMode",value:function(e){this._contentMode=e,this._update()}},{key:"setClipsToBounds",value:function(e){this._clipsToBounds=e,this._update()}},{key:"setFrame",value:function(e,t,r,i){this._frame={x:e,y:t,width:r,height:i},this._update()}},{key:"startAnimation",value:function(e){this.visible=!0,this.stopAnimation(!1),this._doStart(void 0,e,void 0)}},{key:"startAnimationWithRange",value:function(e,t){this.visible=!0,this.stopAnimation(!1),this._doStart(e,t,void 0)}},{key:"pauseAnimation",value:function(){this.stopAnimation(!1)}},{key:"stopAnimation",value:function(e){void 0!==this._animator&&this._animator.stop(),void 0===e&&(e=this.clearsAfterStop),e&&this.clear()}},{key:"clear",value:function(){this.visible=!1,null!=this.stage&&this.stage.update()}},{key:"stepToFrame",value:function(e,t){e>=this._videoItem.frames||e<0||(this.visible=!0,this.pauseAnimation(),this._currentFrame=e,this._update(),t&&this._doStart(void 0,!1,this._currentFrame))}},{key:"stepToPercentage",value:function(e,t){var r=parseInt(e*this._videoItem.frames);r>=this._videoItem.frames&&r>0&&(r=this._videoItem.frames-1),this.stepToFrame(r,t)}},{key:"setImage",value:function(e,t,r){if(this._dynamicImage[t]=e,void 0!==r&&r instanceof Array&&6==r.length&&(this._dynamicImageTransform[t]=r),void 0!==this._videoItem){var i=this._currentFrame;this.removeAllChildren(),this._addLayers(),this._currentFrame=i,this._update()}}},{key:"setText",value:function(e,t){var r="string"==typeof e?e:e.text,n=("object"===(void 0===e?"undefined":i(e))?e.size:"14px")||"14px",o=("object"===(void 0===e?"undefined":i(e))&&e.family,("object"===(void 0===e?"undefined":i(e))?e.color:"#000000")||"#000000"),s=("object"===(void 0===e?"undefined":i(e))?e.offset:{x:0,y:0})||{x:0,y:0},a=new createjs.Text(r,n+" family",o);if(a.offset=s,this._dynamicText[t]=a,void 0!==this._videoItem){var u=this._currentFrame;this.removeAllChildren(),this._addLayers(),this._currentFrame=u,this._update()}}},{key:"clearDynamicObjects",value:function(){this._dynamicImage={},this._dynamicImageTransform={},this._dynamicText={}}},{key:"onError",value:function(e){this._onError=e}},{key:"onFinished",value:function(e){this._onFinished=e}},{key:"onFrame",value:function(e){this._onFrame=e}},{key:"onPercentage",value:function(e){this._onPercentage=e}},{key:"_doStart",value:function(e,t,r){var i=this;this._animator=new a,void 0!==e?(this._animator.startValue=Math.max(0,e.location),this._animator.endValue=Math.min(this._videoItem.frames-1,e.location+e.length),this._animator.duration=(this._animator.endValue-this._animator.startValue+1)*(1/this._videoItem.FPS)*1e3):(this._animator.startValue=0,this._animator.endValue=this._videoItem.frames-1,this._animator.duration=this._videoItem.frames*(1/this._videoItem.FPS)*1e3),this._animator.loops=this.loops<=0?1/0:this.loops,this._animator.fillRule="Backward"===this.fillMode?1:0,this._animator.onUpdate=function(e){i._currentFrame!==Math.floor(e)&&(i._currentFrame=Math.floor(e),i._update(),"function"==typeof i._onFrame&&i._onFrame(i._currentFrame),"function"==typeof i._onPercentage&&i._onPercentage(parseFloat(i._currentFrame+1)/parseFloat(i._videoItem.frames)))},this._animator.onEnd=function(){!0===i.clearsAfterStop&&i.clear(),"function"==typeof i._onFinished&&i._onFinished()},!0===t?this._animator.reverse(r):this._animator.start(r)}},{key:"_addLayers",value:function(){var e=this;this._videoItem.sprites.forEach((function(t){e.addChild(e._renderer.requestContentLayer(t))})),this._currentFrame=0,this._update()}},{key:"_resize",value:function(){var e=1,t=1,r=0,i=0,n=this._frame.width,o=this._frame.height,s=this._videoItem.videoSize;if("Fill"===this._contentMode)e=n/s.width,t=o/s.height;else if("AspectFit"===this._contentMode||"AspectFill"===this._contentMode){var a=s.width/s.height,u=n/o;a>=u&&"AspectFit"===this._contentMode||a<=u&&"AspectFill"===this._contentMode?(e=t=n/s.width,i=(o-s.height*t)/2):(a<u&&"AspectFit"===this._contentMode||a>u&&"AspectFill"===this._contentMode)&&(e=t=o/s.height,r=(n-s.width*e)/2)}this.transformMatrix={a:e,b:0,c:0,d:t,tx:this._frame.x+r,ty:this._frame.y+i}}},{key:"_updateMask",value:function(){this._clipsToBounds?(this.mask=new createjs.Shape,this.mask.__width===this._frame.__width&&this.mask.height===this._frame.height||(this.mask.graphics.clear(),this.mask.graphics.drawRect(0,0,this._frame.width,this._frame.height),this.mask.__width=this._frame.width,this.mask.__height=this._frame.height)):this.mask=void 0}},{key:"_update",value:function(){void 0!==this._videoItem&&(this._resize(),this._updateMask(),this._renderer.drawFrame(this._currentFrame),null!=this.stage&&this.stage.update())}}]),t}()},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,r,i){return r&&e(t.prototype,r),i&&e(t,i),t}}(),o=r(5),s=r(15),a=r(14),u=function(e){function t(e){i(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r._drawedFrame=0,r._keepFrameCache={},r._sprite=e,r._resetKeepFrameCache(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,createjs.Container),n(t,[{key:"stepToFrame",value:function(e){e<this._sprite.frames.length&&this._drawFrame(e)}},{key:"_resetKeepFrameCache",value:function(){var e=this;this._keepFrameCache={};var t=0;this._sprite.frames.forEach((function(r,i){e._isKeepFrame(r)?e._keepFrameCache[i]=t:t=i}))}},{key:"_requestKeepFrame",value:function(e){return this._keepFrameCache[e]}},{key:"_isKeepFrame",value:function(e){return e.shapes&&e.shapes.length>0&&"keep"===e.shapes[0].type}},{key:"_drawFrame",value:function(e){var t=this;if(e<this._sprite.frames.length){var r=this._sprite.frames[e];if(this._isKeepFrame(r)&&this._drawedFrame===this._requestKeepFrame(e))return;this.removeAllChildren(),r.shapes.forEach((function(e){"shape"===e.type&&e.pathArgs&&e.pathArgs.d?t.addChild(f.requestBezierShape(new o.BezierPath(e.pathArgs.d,e.transform,e.styles))):"ellipse"===e.type&&e.pathArgs?t.addChild(f.requestEllipseShape(new s.EllipsePath(parseFloat(e.pathArgs.x)||0,parseFloat(e.pathArgs.y)||0,parseFloat(e.pathArgs.radiusX)||0,parseFloat(e.pathArgs.radiusY)||0,e.transform,e.styles))):"rect"===e.type&&e.pathArgs&&t.addChild(f.requestRectShape(new a.RectPath(parseFloat(e.pathArgs.x)||0,parseFloat(e.pathArgs.y)||0,parseFloat(e.pathArgs.width)||0,parseFloat(e.pathArgs.height)||0,parseFloat(e.pathArgs.cornerRadius)||0,e.transform,e.styles)))})),this._drawedFrame=e}}}]),t}(),f=t.Renderer=function(){function e(t){i(this,e),this._owner=t}return n(e,[{key:"requestContentLayer",value:function(t){var r=void 0,i=new createjs.Container;return t.imageKey&&((r=this._owner._dynamicImage[t.imageKey]||this._owner._videoItem.images[t.imageKey])&&i.addChild(this.requestBitmapLayer(r,this._owner._dynamicImageTransform[t.imageKey],t.frames)),this._owner._dynamicText[t.imageKey]&&(i.textLayer=this._owner._dynamicText[t.imageKey],i.addChild(this._owner._dynamicText[t.imageKey]))),i.addChild(this.requestVectorLayer(t)),i.stepToFrame=function(r){if(r<t.frames.length){var n=t.frames[r];if(n.alpha>0){if(i.alpha=n.alpha,i.visible=!0,i.transformMatrix=new window.createjs.Matrix2D(n.transform.a,n.transform.b,n.transform.c,n.transform.d,n.transform.tx,n.transform.ty),i.setBounds({x:n.layout.x,y:n.layout.y,width:n.layout.width,height:n.layout.height}),n.maskPath?(i.mask=e.requestBezierShape(n.maskPath),i.mask.transformMatrix=i.transformMatrix):i.mask=void 0,i.textLayer){var o=void 0!==i.textLayer.offset&&void 0!==i.textLayer.offset.x?i.textLayer.offset.x:0,s=void 0!==i.textLayer.offset&&void 0!==i.textLayer.offset.y?i.textLayer.offset.y:0;i.textLayer.textBaseline="middle",i.textLayer.x=(n.layout.width-i.textLayer.getBounds().width)/2+o,i.textLayer.y=n.layout.height/2+s}}else i.visible=!1}i.children.forEach((function(e){e.stepToFrame&&e.stepToFrame(r)}))},i}},{key:"requestBitmapLayer",value:function(e,t,r){var i=document.createElement("img"),n=void 0;0===e.indexOf("iVBO")||0===e.indexOf("/9j/2w")?i.src="data:image/png;base64,"+e:(i.src=e,r[0]&&r[0].layout&&((n=document.createElement("canvas")).width=r[0].layout.width,n.height=r[0].layout.height,i.onload=function(){n.getContext("2d").drawImage(i,0,0,r[0].layout.width,r[0].layout.height)}));var o=new createjs.Bitmap(n||i);return void 0!==t&&(o.transformMatrix=new createjs.Matrix2D(t[0],t[1],t[2],t[3],t[4],t[5])),o.frames=r,o.stepToFrame=function(e){},o}},{key:"requestVectorLayer",value:function(e){return new u(e)}},{key:"drawFrame",value:function(e){this._owner.children.forEach((function(t){t.stepToFrame(e)}))}}],[{key:"resetStyle",value:function(e,t){var r=e._styles;if(r){if(r&&r.stroke&&t.graphics.beginStroke("rgba("+parseInt(255*r.stroke[0])+", "+parseInt(255*r.stroke[1])+", "+parseInt(255*r.stroke[2])+", "+r.stroke[3]+")"),r){var i=r.strokeWidth||0,n=r.lineCap||"",o=r.lineJoin||"",s=r.miterLimit||"";t.graphics.setStrokeStyle(i,n,o,s,!0)}r&&r.fill&&t.graphics.beginFill("rgba("+parseInt(255*r.fill[0])+", "+parseInt(255*r.fill[1])+", "+parseInt(255*r.fill[2])+", "+r.fill[3]+")"),r&&r.lineDash&&t.graphics.setStrokeDash([r.lineDash[0],r.lineDash[1]],r.lineDash[2])}}},{key:"requestBezierShape",value:function(e){var t=this,r=new createjs.Shape,i=r.graphics;this.resetStyle(e,r);var n={x:0,y:0,x1:0,y1:0,x2:0,y2:0};return e._d.replace(/([a-zA-Z])/g,"|||$1 ").replace(/,/g," ").split("|||").forEach((function(e){if(0!=e.length){var r=e.substr(0,1);if("MLHVCSQRZmlhvcsqrz".indexOf(r)>=0){var o=e.substr(1).trim().split(" ");t.drawBezierElement(i,n,r,o)}}})),void 0!==e._transform&&null!==e._transform&&(r.transformMatrix=new createjs.Matrix2D(e._transform.a,e._transform.b,e._transform.c,e._transform.d,e._transform.tx,e._transform.ty)),r}},{key:"drawBezierElement",value:function(e,t,r,i){switch(r){case"M":t.x=Number(i[0]),t.y=Number(i[1]),e.moveTo(t.x,t.y);break;case"m":t.x+=Number(i[0]),t.y+=Number(i[1]),e.moveTo(t.x,t.y);break;case"L":t.x=Number(i[0]),t.y=Number(i[1]),e.lineTo(t.x,t.y);break;case"l":t.x+=Number(i[0]),t.y+=Number(i[1]),e.lineTo(t.x,t.y);break;case"H":t.x=Number(i[0]),e.lineTo(t.x,t.y);break;case"h":t.x+=Number(i[0]),e.lineTo(t.x,t.y);break;case"V":t.y=Number(i[0]),e.lineTo(t.x,t.y);break;case"v":t.y+=Number(i[0]),e.lineTo(t.x,t.y);break;case"C":t.x1=Number(i[0]),t.y1=Number(i[1]),t.x2=Number(i[2]),t.y2=Number(i[3]),t.x=Number(i[4]),t.y=Number(i[5]),e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y);break;case"c":t.x1=t.x+Number(i[0]),t.y1=t.y+Number(i[1]),t.x2=t.x+Number(i[2]),t.y2=t.y+Number(i[3]),t.x+=Number(i[4]),t.y+=Number(i[5]),e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y);break;case"S":t.x1&&t.y1&&t.x2&&t.y2?(t.x1=t.x-t.x2+t.x,t.y1=t.y-t.y2+t.y,t.x2=Number(i[0]),t.y2=Number(i[1]),t.x=Number(i[2]),t.y=Number(i[3]),e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)):(t.x1=Number(i[0]),t.y1=Number(i[1]),t.x=Number(i[2]),t.y=Number(i[3]),e.quadraticCurveTo(t.x1,t.y1,t.x,t.y));break;case"s":t.x1&&t.y1&&t.x2&&t.y2?(t.x1=t.x-t.x2+t.x,t.y1=t.y-t.y2+t.y,t.x2=t.x+Number(i[0]),t.y2=t.y+Number(i[1]),t.x+=Number(i[2]),t.y+=Number(i[3]),e.bezierCurveTo(t.x1,t.y1,t.x2,t.y2,t.x,t.y)):(t.x1=t.x+Number(i[0]),t.y1=t.y+Number(i[1]),t.x+=Number(i[2]),t.y+=Number(i[3]),e.quadraticCurveTo(t.x1,t.y1,t.x,t.y));break;case"Q":t.x1=Number(i[0]),t.y1=Number(i[1]),t.x=Number(i[2]),t.y=Number(i[3]),e.quadraticCurveTo(t.x1,t.y1,t.x,t.y);break;case"q":t.x1=t.x+Number(i[0]),t.y1=t.y+Number(i[1]),t.x+=Number(i[2]),t.y+=Number(i[3]),e.quadraticCurveTo(t.x1,t.y1,t.x,t.y);break;case"A":case"a":break;case"Z":case"z":e.closePath()}}},{key:"requestEllipseShape",value:function(e){var t=new createjs.Shape,r=t.graphics;return this.resetStyle(e,t),r.drawEllipse(e._x-e._radiusX,e._y-e._radiusY,2*e._radiusX,2*e._radiusY),void 0!==e._transform&&null!==e._transform&&(t.transformMatrix=new createjs.Matrix2D(e._transform.a,e._transform.b,e._transform.c,e._transform.d,e._transform.tx,e._transform.ty)),t}},{key:"requestRectShape",value:function(e){var t=new createjs.Shape,r=t.graphics;return this.resetStyle(e,t),r.drawRoundRect(e._x,e._y,e._width,e._height,e._cornerRadius),void 0!==e._transform&&null!==e._transform&&(t.transformMatrix=new createjs.Matrix2D(e._transform.a,e._transform.b,e._transform.c,e._transform.d,e._transform.tx,e._transform.ty)),t}}]),e}()}])})); |