UNPKG

ant-kline

Version:
16 lines (14 loc) 768 kB
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],e);else{var n="object"==typeof exports?e(require("jquery")):e(t.$);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}("undefined"!=typeof self?self:this,function(__WEBPACK_EXTERNAL_MODULE_62__){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=104)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(64);e.assert=r.assert,e.assertionError=r.assertionError;var i=n(65);e.base64=i.base64,e.base64Decode=i.base64Decode,e.base64Encode=i.base64Encode;var o=n(45);e.CONSTANTS=o.CONSTANTS;var a=n(138);e.deepCopy=a.deepCopy,e.deepExtend=a.deepExtend,e.patchProperty=a.patchProperty;var s=n(139);e.Deferred=s.Deferred;var u=n(140);e.getUA=u.getUA,e.isMobileCordova=u.isMobileCordova,e.isNodeSdk=u.isNodeSdk,e.isReactNative=u.isReactNative;var c=n(141);e.ErrorFactory=c.ErrorFactory,e.FirebaseError=c.FirebaseError,e.patchCapture=c.patchCapture;var l=n(66);e.jsonEval=l.jsonEval,e.stringify=l.stringify;var h=n(142);e.decode=h.decode,e.isAdmin=h.isAdmin,e.issuedAtTime=h.issuedAtTime,e.isValidFormat=h.isValidFormat,e.isValidTimestamp=h.isValidTimestamp;var d=n(67);e.clone=d.clone,e.contains=d.contains,e.every=d.every,e.extend=d.extend,e.findKey=d.findKey,e.findValue=d.findValue,e.forEach=d.forEach,e.getAnyKey=d.getAnyKey,e.getCount=d.getCount,e.getValues=d.getValues,e.isEmpty=d.isEmpty,e.isNonNullObject=d.isNonNullObject,e.map=d.map,e.safeGet=d.safeGet;var f=n(143);e.querystring=f.querystring,e.querystringDecode=f.querystringDecode;var p=n(144);e.Sha1=p.Sha1;var _=n(146);e.async=_.async,e.createSubscribe=_.createSubscribe;var g=n(147);e.errorPrefix=g.errorPrefix,e.validateArgCount=g.validateArgCount,e.validateCallback=g.validateCallback,e.validateContextObject=g.validateContextObject,e.validateNamespace=g.validateNamespace;var v=n(148);e.stringLength=v.stringLength,e.stringToByteArray=v.stringToByteArray},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(0),i=n(0),o=n(0),a=n(0),s=n(0),u=n(0),c=n(29),l=n(0),h=n(155),d=new h.Logger("@firebase/database");e.LUIDGenerator=function(){var t=1;return function(){return t++}}(),e.sha1=function(t){var e=s.stringToByteArray(t),n=new a.Sha1;n.update(e);var r=n.digest();return o.base64.encodeByteArray(r)};var f=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n="",r=0;r<t.length;r++)Array.isArray(t[r])||t[r]&&"object"==typeof t[r]&&"number"==typeof t[r].length?n+=f.apply(null,t[r]):"object"==typeof t[r]?n+=u.stringify(t[r]):n+=t[r],n+=" ";return n};e.logger=null;var p=!0;e.enableLogging=function(t,n){r.assert(!n||!0===t||!1===t,"Can't turn on custom loggers persistently."),!0===t?(d.logLevel=h.LogLevel.VERBOSE,e.logger=d.log.bind(d),n&&c.SessionStorage.set("logging_enabled",!0)):"function"==typeof t?e.logger=t:(e.logger=null,c.SessionStorage.remove("logging_enabled"))},e.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!0===p&&(p=!1,null===e.logger&&!0===c.SessionStorage.get("logging_enabled")&&e.enableLogging(!0)),e.logger){var r=f.apply(null,t);e.logger(r)}},e.logWrapper=function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];e.log.apply(void 0,[t].concat(n))}},e.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE INTERNAL ERROR: "+f.apply(void 0,t);d.error(n)},e.fatal=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE FATAL ERROR: "+f.apply(void 0,t);throw d.error(n),new Error(n)},e.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n="FIREBASE WARNING: "+f.apply(void 0,t);d.warn(n)},e.warnIfPageIsSecure=function(){"undefined"!=typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&e.warn("Insecure Firebase access from a secure page. Please use https in calls to new Firebase().")},e.warnAboutUnsupportedMethod=function(t){e.warn(t+" is unsupported and will likely change soon. Please do not use.")},e.isInvalidJSONNumber=function(t){return"number"==typeof t&&(t!=t||t==Number.POSITIVE_INFINITY||t==Number.NEGATIVE_INFINITY)},e.executeWhenDOMReady=function(t){if(l.isNodeSdk()||"complete"===document.readyState)t();else{var e=!1,n=function(){document.body?e||(e=!0,t()):setTimeout(n,Math.floor(10))};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("onload",n))}},e.MIN_NAME="[MIN_NAME]",e.MAX_NAME="[MAX_NAME]",e.nameCompare=function(t,n){if(t===n)return 0;if(t===e.MIN_NAME||n===e.MAX_NAME)return-1;if(n===e.MIN_NAME||t===e.MAX_NAME)return 1;var r=e.tryParseInt(t),i=e.tryParseInt(n);return null!==r?null!==i?r-i==0?t.length-n.length:r-i:-1:null!==i?1:t<n?-1:1},e.stringCompare=function(t,e){return t===e?0:t<e?-1:1},e.requireKey=function(t,e){if(e&&t in e)return e[t];throw new Error("Missing required key ("+t+") in object: "+u.stringify(e))},e.ObjectToUniqueKey=function(t){if("object"!=typeof t||null===t)return u.stringify(t);var n=[];for(var r in t)n.push(r);n.sort();for(var i="{",o=0;o<n.length;o++)0!==o&&(i+=","),i+=u.stringify(n[o]),i+=":",i+=e.ObjectToUniqueKey(t[n[o]]);return i+="}"},e.splitStringBySize=function(t,e){var n=t.length;if(n<=e)return[t];for(var r=[],i=0;i<n;i+=e)i+e>n?r.push(t.substring(i,n)):r.push(t.substring(i,i+e));return r},e.each=function(t,e){if(Array.isArray(t))for(var n=0;n<t.length;++n)e(n,t[n]);else i.forEach(t,function(t,n){return e(n,t)})},e.bindCallback=function(t,e){return e?t.bind(e):t},e.doubleToIEEE754String=function(t){r.assert(!e.isInvalidJSONNumber(t),"Invalid JSON number");var n,i,o,a,s,u,c;for(0===t?(i=0,o=0,n=1/t==-1/0?1:0):(n=t<0,(t=Math.abs(t))>=Math.pow(2,-1022)?(i=(a=Math.min(Math.floor(Math.log(t)/Math.LN2),1023))+1023,o=Math.round(t*Math.pow(2,52-a)-Math.pow(2,52))):(i=0,o=Math.round(t/Math.pow(2,-1074)))),u=[],s=52;s;s-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(s=11;s;s-=1)u.push(i%2?1:0),i=Math.floor(i/2);u.push(n?1:0),u.reverse(),c=u.join("");var l="";for(s=0;s<64;s+=8){var h=parseInt(c.substr(s,8),2).toString(16);1===h.length&&(h="0"+h),l+=h}return l.toLowerCase()},e.isChromeExtensionContentScript=function(){return!("object"!=typeof window||!window.chrome||!window.chrome.extension||/^chrome/.test(window.location.href))},e.isWindowsStoreApp=function(){return"object"==typeof Windows&&"object"==typeof Windows.UI},e.errorForServerCode=function(t,e){var n="Unknown Error";"too_big"===t?n="The data requested exceeds the maximum size that can be accessed with a single request.":"permission_denied"==t?n="Client doesn't have permission to access the desired data.":"unavailable"==t&&(n="The service is unavailable");var r=new Error(t+" at "+e.path.toString()+": "+n);return r.code=t.toUpperCase(),r},e.INTEGER_REGEXP_=new RegExp("^-?\\d{1,10}$"),e.tryParseInt=function(t){if(e.INTEGER_REGEXP_.test(t)){var n=Number(t);if(n>=-2147483648&&n<=2147483647)return n}return null},e.exceptionGuard=function(t){try{t()}catch(t){setTimeout(function(){var n=t.stack||"";throw e.warn("Exception was thrown by user callback.",n),t},Math.floor(0))}},e.callUserCallback=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"function"==typeof t&&e.exceptionGuard(function(){t.apply(void 0,n)})},e.beingCrawled=function(){return("object"==typeof window&&window.navigator&&window.navigator.userAgent||"").search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},e.exportPropGetter=function(t,e,n){Object.defineProperty(t,e,{get:n})},e.setTimeoutNonBlocking=function(t,e){var n=setTimeout(t,e);return"object"==typeof n&&n.unref&&n.unref(),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),i=n(0),o=function(){function t(t,e){if(void 0===e){this.pieces_=t.split("/");for(var n=0,r=0;r<this.pieces_.length;r++)this.pieces_[r].length>0&&(this.pieces_[n]=this.pieces_[r],n++);this.pieces_.length=n,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=e}return Object.defineProperty(t,"Empty",{get:function(){return new t("")},enumerable:!0,configurable:!0}),t.prototype.getFront=function(){return this.pieceNum_>=this.pieces_.length?null:this.pieces_[this.pieceNum_]},t.prototype.getLength=function(){return this.pieces_.length-this.pieceNum_},t.prototype.popFront=function(){var e=this.pieceNum_;return e<this.pieces_.length&&e++,new t(this.pieces_,e)},t.prototype.getBack=function(){return this.pieceNum_<this.pieces_.length?this.pieces_[this.pieces_.length-1]:null},t.prototype.toString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+this.pieces_[e]);return t||"/"},t.prototype.toUrlEncodedString=function(){for(var t="",e=this.pieceNum_;e<this.pieces_.length;e++)""!==this.pieces_[e]&&(t+="/"+encodeURIComponent(String(this.pieces_[e])));return t||"/"},t.prototype.slice=function(t){return void 0===t&&(t=0),this.pieces_.slice(this.pieceNum_+t)},t.prototype.parent=function(){if(this.pieceNum_>=this.pieces_.length)return null;for(var e=[],n=this.pieceNum_;n<this.pieces_.length-1;n++)e.push(this.pieces_[n]);return new t(e,0)},t.prototype.child=function(e){for(var n=[],r=this.pieceNum_;r<this.pieces_.length;r++)n.push(this.pieces_[r]);if(e instanceof t)for(r=e.pieceNum_;r<e.pieces_.length;r++)n.push(e.pieces_[r]);else{var i=e.split("/");for(r=0;r<i.length;r++)i[r].length>0&&n.push(i[r])}return new t(n,0)},t.prototype.isEmpty=function(){return this.pieceNum_>=this.pieces_.length},t.relativePath=function(e,n){var r=e.getFront(),i=n.getFront();if(null===r)return n;if(r===i)return t.relativePath(e.popFront(),n.popFront());throw new Error("INTERNAL ERROR: innerPath ("+n+") is not within outerPath ("+e+")")},t.comparePaths=function(t,e){for(var n=t.slice(),i=e.slice(),o=0;o<n.length&&o<i.length;o++){var a=r.nameCompare(n[o],i[o]);if(0!==a)return a}return n.length===i.length?0:n.length<i.length?-1:1},t.prototype.equals=function(t){if(this.getLength()!==t.getLength())return!1;for(var e=this.pieceNum_,n=t.pieceNum_;e<=this.pieces_.length;e++,n++)if(this.pieces_[e]!==t.pieces_[n])return!1;return!0},t.prototype.contains=function(t){var e=this.pieceNum_,n=t.pieceNum_;if(this.getLength()>t.getLength())return!1;for(;e<this.pieces_.length;){if(this.pieces_[e]!==t.pieces_[n])return!1;++e,++n}return!0},t}();e.Path=o;var a=function(){function t(t,e){this.errorPrefix_=e,this.parts_=t.slice(),this.byteLength_=Math.max(1,this.parts_.length);for(var n=0;n<this.parts_.length;n++)this.byteLength_+=i.stringLength(this.parts_[n]);this.checkValid_()}return Object.defineProperty(t,"MAX_PATH_DEPTH",{get:function(){return 32},enumerable:!0,configurable:!0}),Object.defineProperty(t,"MAX_PATH_LENGTH_BYTES",{get:function(){return 768},enumerable:!0,configurable:!0}),t.prototype.push=function(t){this.parts_.length>0&&(this.byteLength_+=1),this.parts_.push(t),this.byteLength_+=i.stringLength(t),this.checkValid_()},t.prototype.pop=function(){var t=this.parts_.pop();this.byteLength_-=i.stringLength(t),this.parts_.length>0&&(this.byteLength_-=1)},t.prototype.checkValid_=function(){if(this.byteLength_>t.MAX_PATH_LENGTH_BYTES)throw new Error(this.errorPrefix_+"has a key path longer than "+t.MAX_PATH_LENGTH_BYTES+" bytes ("+this.byteLength_+").");if(this.parts_.length>t.MAX_PATH_DEPTH)throw new Error(this.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+t.MAX_PATH_DEPTH+") or object contains a cycle "+this.toErrorString())},t.prototype.toErrorString=function(){return 0==this.parts_.length?"":"in property '"+this.parts_.join(".")+"'"},t}();e.ValidationPath=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.__extends=function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},n.d(e,"__assign",function(){return i}),e.__rest=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]]);return n},e.__decorate=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},e.__param=function(t,e){return function(n,r){e(n,r,t)}},e.__metadata=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},e.__awaiter=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},e.__generator=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},e.__exportStar=function(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])},e.__values=o,e.__read=a,e.__spread=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t},e.__await=s,e.__asyncGenerator=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(t,e||[]),o=[];return r={},a("next"),a("throw"),a("return"),r[Symbol.asyncIterator]=function(){return this},r;function a(t){i[t]&&(r[t]=function(e){return new Promise(function(n,r){o.push([t,e,n,r])>1||u(t,e)})})}function u(t,e){try{!function(t){t.value instanceof s?Promise.resolve(t.value.v).then(c,l):h(o[0][2],t)}(i[t](e))}catch(t){h(o[0][3],t)}}function c(t){u("next",t)}function l(t){u("throw",t)}function h(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}},e.__asyncDelegator=function(t){var e,n;return e={},r("next"),r("throw",function(t){throw t}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:s(t[r](e)),done:"return"===r}:i?i(e):e}:i}},e.__asyncValues=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=o(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise(function(r,i){e=t[n](e),function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)}(r,i,e.done,e.value)})}}},e.__makeTemplateObject=function(t,e){Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e;return t},e.__importStar=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},e.__importDefault=function(t){return t&&t.__esModule?t:{default:t}}; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(t){return this instanceof s?(this.v=t,this):new s(t)}},function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n(38),i=n(105),o=n(109),a=n(61),s=n(27),u=n(12),c=n(20),l=n(43),h=n(22),d=n(41),f=n(40),p=n(44),_=n(21);function g(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var v=function(){function t(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._dataSources={},this._dataSourceCache={},this._dataProviders={},this._frames={},this._areas={},this._timelines={},this._ranges={},this._plotters={},this._themes={},this._titles={},this._frameMousePos={},this._dsChartStyle={},this._dragStarted=!1,this._oldX=0,this._fakeIndicators={},this._captureMouseWheelDirectly=!0,this._chart={},this._chart.defaultFrame=new i.a,this._drawingTool=t.DrawingTool.CrossCursor,this._beforeDrawingTool=this._drawingTool,this._language="zh-cn",this._mainCanvas=null,this._overlayCanvas=null,this._mainContext=null,this._overlayContext=null,t.created||(t.instance=this,t.created=!0),t.instance}return function(t,e,n){e&&g(t.prototype,e),n&&g(t,n)}(t,[{key:"redraw",value:function(t,e){(void 0===t||e)&&(t="All"),"All"!==t&&"MainCanvas"!==t||(e&&this.getFrame("frame0").setChanged(!0),this.layout(this._mainContext,"frame0",0,0,this._mainCanvas.width,this._mainCanvas.height),this.drawMain("frame0",this._mainContext)),"All"!==t&&"OverlayCanvas"!==t||(this._overlayContext.clearRect(0,0,this._overlayCanvas.width,this._overlayCanvas.height),this.drawOverlay("frame0",this._overlayContext))}},{key:"bindCanvas",value:function(t,e){"main"===t?(this._mainCanvas=e,this._mainContext=e.getContext("2d")):"overlay"===t&&(this._overlayCanvas=e,this._overlayContext=e.getContext("2d"),this._captureMouseWheelDirectly&&$(this._overlayCanvas).bind("mousewheel",r.a.mouseWheel))}},{key:"getCaptureMouseWheelDirectly",value:function(){return this._captureMouseWheelDirectly}},{key:"setCaptureMouseWheelDirectly",value:function(t){this._captureMouseWheelDirectly=t,t?$(this._overlayCanvas).bind("mousewheel",r.a.mouseWheel):$(this._overlayCanvas).unbind("mousewheel")}},{key:"getChart",value:function(t){return this._chart.defaultFrame}},{key:"init",value:function(){delete this._ranges["frame0.k0.indic1"],delete this._ranges["frame0.k0.indic1Range"],delete this._areas["frame0.k0.indic1"],delete this._areas["frame0.k0.indic1Range"],s.a.loadTemplate("frame0.k0",""),this.redraw("All",!0)}},{key:"setCurrentDrawingTool",value:function(e){this._drawingTool=t.DrawingTool[e],this.setRunningMode(this._drawingTool)}},{key:"getLanguage",value:function(){return this._language}},{key:"setLanguage",value:function(t){this._language=t}},{key:"setThemeName",value:function(t,e){var n;switch(void 0===e&&(e="Dark"),e){case"Light":n=new h.b;break;default:e="Dark",n=new h.a}this._themeName=e,this.setTheme(t,n),this.getFrame(t).setChanged(!0)}},{key:"getChartStyle",value:function(t){var e=this._dsChartStyle[t];return void 0===e?"CandleStick":e}},{key:"setChartStyle",value:function(t,e){if(this._dsChartStyle[t]!==e){var n,r,i=t+".main",a=i+".main",s=i+".main";switch(e){case"CandleStick":case"CandleStickHLC":case"OHLC":switch(void 0!==(n=this.getDataProvider(a))&&_.a.isInstance(n,l.b)||(n=new l.b(a),this.setDataProvider(a,n),n.updateData()),this.setMainIndicator(t,c.a.get().charts.mIndic),e){case"CandleStick":r=new d.h(s);break;case"CandleStickHLC":r=new d.g(s);break;case"OHLC":r=new d.E(s)}this.setPlotter(s,r),r=new d.D(i+".decoration"),this.setPlotter(r.getName(),r);break;case"Line":n=new l.a(a),this.setDataProvider(n.getName(),n),n.setIndicator(new o.h),this.removeMainIndicator(t),r=new d.y(s),this.setPlotter(s,r),this.removePlotter(i+".decoration")}this.getArea(r.getAreaName()).setChanged(!0),this._dsChartStyle[t]=e}}},{key:"setNormalMode",value:function(){this._drawingTool=this._beforeDrawingTool,$(".chart_dropdown_data").removeClass("chart_dropdown-hover"),$("#chart_toolpanel .chart_toolpanel_button").removeClass("selected"),$("#chart_CrossCursor").parent().addClass("selected"),this._drawingTool===t.DrawingTool.Cursor?(this.showCursor(),$("#mode a").removeClass("selected"),$("#chart_toolpanel .chart_toolpanel_button").removeClass("selected"),$("#chart_Cursor").parent().addClass("selected")):this.hideCursor()}},{key:"setRunningMode",value:function(e){var n=this.getDataSource("frame0.k0"),r=n.getCurrentToolObject();if(null!==r&&r.state!==f.n.state.AfterDraw&&n.delToolObject(),n.getToolObjectCount()>10)this.setNormalMode();else switch(this._drawingTool=e,e===t.DrawingTool.Cursor&&this.showCursor(),e){case t.DrawingTool.Cursor:this._beforeDrawingTool=e;break;case t.DrawingTool.ArrowLine:n.addToolObject(new f.a("frame0.k0"));break;case t.DrawingTool.BandLine:n.addToolObject(new f.b("frame0.k0"));break;case t.DrawingTool.BiParallelLine:n.addToolObject(new f.c("frame0.k0"));break;case t.DrawingTool.BiParallelRayLine:n.addToolObject(new f.d("frame0.k0"));break;case t.DrawingTool.CrossCursor:this._beforeDrawingTool=e;break;case t.DrawingTool.DrawFibFans:n.addToolObject(new f.e("frame0.k0"));break;case t.DrawingTool.DrawFibRetrace:n.addToolObject(new f.f("frame0.k0"));break;case t.DrawingTool.DrawLines:n.addToolObject(new f.m("frame0.k0"));break;case t.DrawingTool.HoriRayLine:n.addToolObject(new f.g("frame0.k0"));break;case t.DrawingTool.HoriSegLine:n.addToolObject(new f.h("frame0.k0"));break;case t.DrawingTool.HoriStraightLine:n.addToolObject(new f.i("frame0.k0"));break;case t.DrawingTool.PriceLine:n.addToolObject(new f.j("frame0.k0"));break;case t.DrawingTool.RayLine:n.addToolObject(new f.k("frame0.k0"));break;case t.DrawingTool.SegLine:n.addToolObject(new f.l("frame0.k0"));break;case t.DrawingTool.StraightLine:n.addToolObject(new f.m("frame0.k0"));break;case t.DrawingTool.TriParallelLine:n.addToolObject(new f.o("frame0.k0"));break;case t.DrawingTool.VertiStraightLine:n.addToolObject(new f.p("frame0.k0"))}}},{key:"getTitle",value:function(t){return this._titles[t]}},{key:"setTitle",value:function(t,e){this._titles[t]=e}},{key:"setCurrentDataSource",value:function(t,e){var n=this.getCachedDataSource(e);void 0!==n&&null!==n?this.setDataSource(t,n,!0):(n=new u.b(e),this.setDataSource(t,n,!0),this.setCachedDataSource(e,n))}},{key:"getDataSource",value:function(t){return this._dataSources[t]}},{key:"setDataSource",value:function(t,e,n){this._dataSources[t]=e,n&&this.updateData(t,null)}},{key:"getCachedDataSource",value:function(t){return this._dataSourceCache[t]}},{key:"setCachedDataSource",value:function(t,e){this._dataSourceCache[t]=e}},{key:"getDataProvider",value:function(t){return this._dataProviders[t]}},{key:"setDataProvider",value:function(t,e){this._dataProviders[t]=e}},{key:"removeDataProvider",value:function(t){delete this._dataProviders[t]}},{key:"getFrame",value:function(t){return this._frames[t]}},{key:"setFrame",value:function(t,e){this._frames[t]=e}},{key:"removeFrame",value:function(t){delete this._frames[t]}},{key:"getArea",value:function(t){return this._areas[t]}},{key:"setArea",value:function(t,e){this._areas[t]=e}},{key:"removeArea",value:function(t){delete this._areas[t]}},{key:"getTimeline",value:function(t){return this._timelines[t]}},{key:"setTimeline",value:function(t,e){this._timelines[t]=e}},{key:"removeTimeline",value:function(t){delete this._timelines[t]}},{key:"getRange",value:function(t){return this._ranges[t]}},{key:"setRange",value:function(t,e){this._ranges[t]=e}},{key:"removeRange",value:function(t){delete this._ranges[t]}},{key:"getPlotter",value:function(t){return this._plotters[t]}},{key:"setPlotter",value:function(t,e){this._plotters[t]=e}},{key:"removePlotter",value:function(t){delete this._plotters[t]}},{key:"getTheme",value:function(t){return this._themes[t]}},{key:"setTheme",value:function(t,e){this._themes[t]=e}},{key:"getFrameMousePos",value:function(t,e){void 0!==this._frameMousePos[t]?(e.x=this._frameMousePos[t].x,e.y=this._frameMousePos[t].y):(e.x=-1,e.y=-1)}},{key:"setFrameMousePos",value:function(t,e,n){this._frameMousePos[t]={x:e,y:n}}},{key:"drawArea",value:function(t,e,n){var r=e.getNameObject().getCompAt(2);if("timeline"===r){if(e.getHeight()<20)return}else if(e.getHeight()<30)return;if(!(e.getWidth()<30)){var i;r=e.getName();var o,a=n.length;for(o=0;o<a;o++)void 0!==(i=this._plotters[r+n[o]])&&i.Draw(t)}}},{key:"drawAreaMain",value:function(t,e){var n;n=this._dataSources[e.getDataSourceName()].getDataCount()<1?[".background"]:[".background",".grid",".main",".secondary"],this.drawArea(t,e,n),e.setChanged(!1)}},{key:"drawAreaOverlay",value:function(t,e){var n;n=this._dataSources[e.getDataSourceName()].getDataCount()<1?[".selection"]:[".decoration",".selection",".info",".tool"],this.drawArea(t,e,n)}},{key:"drawMain",value:function(t,e){var n;for(var r in this._areas)this._areas[r].getFrameName()!==t||_.a.isInstance(this._areas[r],p.b)||this.drawAreaMain(e,this._areas[r]);for(var i in this._timelines)(n=this._timelines[i]).getFrameName()===t&&n.setUpdated(!1);for(var o in this._ranges)(n=this._ranges[o]).getFrameName()===t&&n.setUpdated(!1);for(var a in this._areas)(n=this._areas[a]).getFrameName()===t&&n.setChanged(!1)}},{key:"drawOverlay",value:function(t,e){for(var n in this._areas){var r=this._areas[n];_.a.isInstance(r,p.b)&&r.getFrameName()===t&&r.drawGrid(e)}for(var i in this._areas){var o=this._areas[i];!1===_.a.isInstance(o,p.b)&&o.getFrameName()===t&&this.drawAreaOverlay(e,o)}}},{key:"updateData",value:function(t,e){var n=this.getDataSource(t);if(void 0!==n&&null!==n){if(void 0!==e&&null!==e){if(!n.update(e))return!1;if(n.getUpdateMode()===u.a.UpdateMode.DoNothing)return!0}else n.setUpdateMode(u.a.UpdateMode.Refresh);var r=this.getTimeline(t);if(void 0!==r&&null!==r&&r.update(),n.getDataCount()<1)return!0;var i,o,a=[".main",".secondary"];for(var s in this._areas)if(i=this._areas[s],!_.a.isInstance(i,p.b)&&i.getDataSourceName()===t){o=i.getName();for(var c=0;c<a.length;c++){var l=this.getDataProvider(o+a[c]);void 0!==l&&null!==l&&l.updateData()}}return!0}}},{key:"updateRange",value:function(t){if(!(this.getDataSource(t).getDataCount()<1)){var e,n,r=[".main",".secondary"];for(var i in this._areas)if(e=this._areas[i],!_.a.isInstance(e,p.b)&&e.getDataSourceName()===t){n=e.getName();for(var o=0;o<r.length;o++){var a=this.getDataProvider(n+r[o]);void 0!==a&&null!==a&&a.updateRange()}var s=this.getTimeline(t);if(void 0!==s&&s.getMaxItemCount()>0){var u=this.getRange(n);void 0!==u&&null!==u&&u.update()}}}}},{key:"layout",value:function(t,e,n,r,i,o){var a=this.getFrame(e);for(var s in a.measure(t,i-n,o-r),a.layout(n,r,i,o),this._timelines){var u=this._timelines[s];u.getFrameName()===e&&u.onLayout()}for(var c in this._dataSources)c.substring(0,e.length)===e&&this.updateRange(c)}},{key:"SelectRange",value:function(t,e){for(var n in this._ranges){this._ranges[n].getAreaName()===t.getName()?this._ranges[n].selectAt(e):this._ranges[n].unselect()}}},{key:"scale",value:function(t){if(null!==this._highlightedFrame){var e=this._highlightedFrame.getHighlightedArea();if(void 0!==this.getRange(e.getName())){var n=e.getDataSourceName(),r=this.getTimeline(n);null!==r&&(r.scale(t),this.updateRange(n))}}}},{key:"showCursor",value:function(t){void 0===t&&(t="default"),this._mainCanvas.style.cursor=t,this._overlayCanvas.style.cursor=t}},{key:"hideCursor",value:function(){this._mainCanvas.style.cursor="none",this._overlayCanvas.style.cursor="none"}},{key:"showCrossCursor",value:function(t,e,n){var r=this.getRange(t.getName());return!(void 0===r||(r.selectAt(n),void 0===(r=this.getTimeline(t.getDataSourceName()))||!r.selectAt(e)))}},{key:"hideCrossCursor",value:function(t){if(null!==t&&void 0!==t)for(var e in this._timelines){var n=this._timelines[e];n!==t&&n.unselect()}else for(var r in this._timelines)this._timelines[r].unselect();for(var i in this._ranges)this._ranges[i].unselect()}},{key:"clearHighlight",value:function(){null!==this._highlightedFrame&&void 0!==this._highlightedFrame&&(this._highlightedFrame.highlight(null),this._highlightedFrame=null)}},{key:"onToolMouseMove",value:function(t,e,n){var r=!1;for(var i in t+=".",this._dataSources)if(0===i.indexOf(t)){var o=this._dataSources[i];_.a.isInstance(o,u.b)&&o.toolManager.acceptMouseMoveEvent(e,n)&&(r=!0)}return r}},{key:"onToolMouseDown",value:function(t,e,n){var r=!1;for(var i in t+=".",this._dataSources)if(0===i.indexOf(t)){var o=this._dataSources[i];_.a.isInstance(o,u.b)&&o.toolManager.acceptMouseDownEvent(e,n)&&(r=!0)}return r}},{key:"onToolMouseUp",value:function(t,e,n){var r=!1;for(var i in t+=".",this._dataSources)if(0===i.indexOf(t)){var o=this._dataSources[i];_.a.isInstance(o,u.b)&&o.toolManager.acceptMouseUpEvent(e,n)&&(r=!0)}return r}},{key:"onToolMouseDrag",value:function(t,e,n){var r=!1;for(var i in t+=".",this._dataSources)if(0===i.indexOf(t)){var o=this._dataSources[i];_.a.isInstance(o,u.b)&&o.toolManager.acceptMouseDownMoveEvent(e,n)&&(r=!0)}return r}},{key:"onMouseMove",value:function(t,e,n,r){var i=this.getFrame(t);if(void 0!==i)if(this.setFrameMousePos(t,e,n),this.hideCrossCursor(),this._highlightedFrame!==i&&this.clearHighlight(),null===this._capturingMouseArea||void 0===this._capturingMouseArea){var o,a,s=i.contains(e,n);if(null!==s)for(a=s.length-1;a>=0;a--)if(null!==(o=(o=s[a]).onMouseMove(e,n)))return void(_.a.isInstance(o,p.b)||(i.highlight(o),this._highlightedFrame=i))}else this._capturingMouseArea.onMouseMove(e,n)}},{key:"onMouseLeave",value:function(t,e,n,r){void 0!==this.getFrame(t)&&(this.setFrameMousePos(t,e,n),this.hideCrossCursor(),this.clearHighlight(),null!==this._capturingMouseArea&&void 0!==this._capturingMouseArea&&(this._capturingMouseArea.onMouseLeave(e,n),this._capturingMouseArea=null),this._dragStarted=!1)}},{key:"onMouseDown",value:function(t,e,n){var r=this.getFrame(t);if(void 0!==r){var i,o,a=r.contains(e,n);if(null!==a)for(o=a.length-1;o>=0;o--)if(null!==(i=(i=a[o]).onMouseDown(e,n)))return void(this._capturingMouseArea=i)}}},{key:"onMouseUp",value:function(t,e,n){var i=this.getFrame(t);void 0!==i&&this._capturingMouseArea&&(null===this._capturingMouseArea.onMouseUp(e,n)&&!1===this._dragStarted&&(null!==this._selectedFrame&&void 0!==this._selectedFrame&&this._selectedFrame!==i&&this._selectedFrame.select(null),this._capturingMouseArea.isSelected()?(this._captureMouseWheelDirectly||$(this._overlayCanvas).unbind("mousewheel"),i.select(null),this._selectedFrame=null):(this._selectedFrame!==i&&(this._captureMouseWheelDirectly||$(this._overlayCanvas).bind("mousewheel",r.a.mouseWheel)),i.select(this._capturingMouseArea),this._selectedFrame=i)),this._capturingMouseArea=null,this._dragStarted=!1)}},{key:"deleteToolObject",value:function(){var t=this.getDataSource("frame0.k0");null!==t.getSelectToolObjcet()&&t.delSelectToolObject();var e=t.getCurrentToolObject();null!==e&&e.getState()!==f.n.state.AfterDraw&&t.delToolObject(),this.setNormalMode()}},{key:"unloadTemplate",value:function(t){if(void 0!==this.getFrame(t)){for(var e in this._dataSources)e.match(t+".")&&delete this._dataSources[e];for(var n in this._dataProviders)this._dataProviders[n].getFrameName()===t&&delete this._dataProviders[n];for(var r in delete this._frames[t],this._areas)this._areas[r].getFrameName()===t&&delete this._areas[r];for(var i in this._timelines)this._timelines[i].getFrameName()===t&&delete this._timelines[i];for(var o in this._ranges)this._ranges[o].getFrameName()===t&&delete this._ranges[o];for(var a in this._plotters)this._plotters[a].getFrameName()===t&&delete this._plotters[a];delete this._themes[t],delete this._frameMousePos[t]}}},{key:"createIndicatorAndRange",value:function(t,e,n){var r,i;switch(e){case"MA":r=new o.k,i=new a.c(t);break;case"EMA":r=new o.f,i=new a.c(t);break;case"VOLUME":r=new o.u,i=new a.e(t);break;case"ATR":r=new o.a,i=new a.f(t);break;case"MACD":r=new o.j,i=new a.f(t);break;case"TRADE":r=new o.s,i=new a.f(t);break;case"DMI":r=new o.e,i=new a.b(t);break;case"DMA":r=new o.d,i=new a.d(t);break;case"TRIX":r=new o.t,i=new a.d(t);break;case"BRAR":r=new o.c,i=new a.d(t);break;case"VR":r=new o.v,i=new a.d(t);break;case"OBV":r=new o.m,i=new a.d(t);break;case"EMV":r=new o.g,i=new a.d(t);break;case"RSI":r=new o.p,i=new a.b(t);break;case"WR":r=new o.w,i=new a.b(t);break;case"SAR":r=new o.q,i=new a.c(t);break;case"KDJ":r=new o.i,i=new a.b(t);break;case"ROC":r=new o.o,i=new a.d(t);break;case"MTM":r=new o.l,i=new a.d(t);break;case"BOLL":r=new o.b,i=new a.d(t);break;case"PSY":r=new o.n,i=new a.d(t);break;case"StochRSI":r=new o.r,i=new a.b(t);break;default:return null}return n||r.setParameters(c.a.get().indics[e]),{indic:r,range:i}}},{key:"setMainIndicator",value:function(t,e){var n,r=t+".main",i=this.getDataProvider(r+".main");if(void 0===i||!_.a.isInstance(i,l.b))return!1;switch(e){case"MA":n=new o.k;break;case"EMA":n=new o.f;break;case"BOLL":n=new o.b;break;case"SAR":n=new o.q;break;default:return!1}n.setParameters(c.a.get().indics[e]);var a=r+".secondary",s=this.getDataProvider(a);void 0===s&&(s=new l.a(a),this.setDataProvider(s.getName(),s)),s.setIndicator(n);var u=this.getPlotter(a);return void 0===u&&(u=new d.y(a),this.setPlotter(u.getName(),u)),this.getArea(r).setChanged(!0),!0}},{key:"setIndicator",value:function(t,e){var n=this.getArea(t);if(null===n||void 0===n||"main"===n.getNameObject().getCompAt(2))return!1;var r=this.getDataProvider(t+".secondary");if(null===r||void 0===r||!_.a.isInstance(r,l.a))return!1;var i=this.createIndicatorAndRange(t,e);if(null===i||void 0===i)return!1;var a=i.indic,s=i.range;if(this.removeDataProvider(t+".main"),this.removePlotter(t+".main"),this.removeRange(t),this.removePlotter(t+"Range.decoration"),r.setIndicator(a),this.setRange(t,s),s.setPaddingTop(20),s.setPaddingBottom(4),s.setMinInterval(20),_.a.isInstance(a,o.u)){var u=new d.A(t+"Range.decoration");this.setPlotter(u.getName(),u)}else if(_.a.isInstance(a,o.b)||_.a.isInstance(a,o.q)){var c=new l.b(t+".main");this.setDataProvider(c.getName(),c),c.updateData();var h=new d.E(t+".main");this.setPlotter(h.getName(),h)}return!0}},{key:"removeMainIndicator",value:function(t){var e=t+".main",n=e+".secondary",r=this.getDataProvider(n);void 0!==r&&_.a.isInstance(r,l.a)&&(this.removeDataProvider(n),this.removePlotter(n),this.getArea(e).setChanged(!0))}},{key:"removeIndicator",value:function(t){var e=this.getArea(t);if(void 0!==e&&"main"!==e.getNameObject().getCompAt(2)){var n=this.getDataProvider(t+".secondary");if(void 0!==n&&_.a.isInstance(n,l.a)){var r=t+"Range",i=this.getArea(r);if(void 0!==i){var o=this.getArea(e.getDataSourceName()+".charts");if(void 0!==o){for(var a in o.removeArea(e),this.removeArea(t),o.removeArea(i),this.removeArea(r),this._dataProviders)this._dataProviders[a].getAreaName()===t&&this.removeDataProvider(a);for(var s in this._ranges)this._ranges[s].getAreaName()===t&&this.removeRange(s);for(var u in this._plotters)this._plotters[u].getAreaName()===t&&this.removePlotter(u);for(var c in this._plotters)this._plotters[c].getAreaName()===r&&this.removePlotter(c)}}}}}},{key:"getIndicatorParameters",value:function(t){var e=this._fakeIndicators[t];if(void 0===e){var n=this.createIndicatorAndRange("",t);if(null===n)return null;this._fakeIndicators[t]=e=n.indic}var r,i=[],o=e.getParameterCount();for(r=0;r<o;r++)i.push(e.getParameterAt(r));return i}},{key:"setIndicatorParameters",value:function(t,e){var n,r;for(n in this._dataProviders){var i=this._dataProviders[n];!1!==_.a.isInstance(i,l.a)&&((r=i.getIndicator()).getName()===t&&(r.setParameters(e),i.refresh(),this.getArea(i.getAreaName()).setChanged(!0)))}if(void 0===(r=this._fakeIndicators[t])){var o=this.createIndicatorAndRange("",t,!0);if(null===o)return;this._fakeIndicators[t]=r=o.indic}r.setParameters(e)}},{key:"getIndicatorAreaName",value:function(t,e){var n=this.getArea(t+".charts"),r=n.getAreaCount()>>1;return e<0||e>=r?"":n.getAreaAt(e<<1).getName()}}]),t}();v.DrawingTool={Cursor:0,CrossCursor:1,DrawLines:2,DrawFibRetrace:3,DrawFibFans:4,SegLine:5,StraightLine:6,ArrowLine:7,RayLine:8,HoriStraightLine:9,HoriRayLine:10,HoriSegLine:11,VertiStraightLine:12,PriceLine:13,BiParallelLine:14,BiParallelRayLine:15,TriParallelLine:16,BandLine:17},v.created=!1,v.instance=null},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i,o=n(3),a=n(31),s=n(1),u=n(7),c=n(32);e.setNodeFromJSON=function(t){r=t},e.setMaxNode=function(t){i=t};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e.prototype.compare=function(t,e){var n=t.node.getPriority(),r=e.node.getPriority(),i=n.compareTo(r);return 0===i?s.nameCompare(t.name,e.name):i},e.prototype.isDefinedOn=function(t){return!t.getPriority().isEmpty()},e.prototype.indexedValueChanged=function(t,e){return!t.getPriority().equals(e.getPriority())},e.prototype.minPost=function(){return u.NamedNode.MIN},e.prototype.maxPost=function(){return new u.NamedNode(s.MAX_NAME,new c.LeafNode("[PRIORITY-POST]",i))},e.prototype.makePost=function(t,e){var n=r(t);return new u.NamedNode(e,new c.LeafNode("[PRIORITY-POST]",n))},e.prototype.toString=function(){return".priority"},e}(a.Index);e.PriorityIndex=l,e.PRIORITY_INDEX=new l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(3),o=n(0),a=n(1),s=n(33),u=n(7),c=n(74),l=n(5),h=n(23),d=n(76),f=n(32),p=n(78),_=function(){function t(t,e,n){this.children_=t,this.priorityNode_=e,this.indexMap_=n,this.lazyHash_=null,this.priorityNode_&&c.validatePriorityNode(this.priorityNode_),this.children_.isEmpty()&&o.assert(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(t,"EMPTY_NODE",{get:function(){return r||(r=new t(new s.SortedMap(p.NAME_COMPARATOR),null,d.IndexMap.Default))},enumerable:!0,configurable:!0}),t.prototype.isLeafNode=function(){return!1},t.prototype.getPriority=function(){return this.priorityNode_||r},t.prototype.updatePriority=function(e){return this.children_.isEmpty()?this:new t(this.children_,e,this.indexMap_)},t.prototype.getImmediateChild=function(t){if(".priority"===t)return this.getPriority();var e=this.children_.get(t);return null===e?r:e},t.prototype.getChild=function(t){var e=t.getFront();return null===e?this:this.getImmediateChild(e).getChild(t.popFront())},t.prototype.hasChild=function(t){return null!==this.children_.get(t)},t.prototype.updateImmediateChild=function(e,n){if(o.assert(n,"We should always be passing snapshot nodes"),".priority"===e)return this.updatePriority(n);var i=new u.NamedNode(e,n),a=void 0,s=void 0;return n.isEmpty()?(a=this.children_.remove(e),s=this.indexMap_.removeFromIndexes(i,this.children_)):(a=this.children_.insert(e,n),s=this.indexMap_.addToIndexes(i,this.children_)),new t(a,a.isEmpty()?r:this.priorityNode_,s)},t.prototype.updateChild=function(t,e){var n=t.getFront();if(null===n)return e;o.assert(".priority"!==t.getFront()||1===t.getLength(),".priority must be the last token in a path");var r=this.getImmediateChild(n).updateChild(t.popFront(),e);return this.updateImmediateChild(n,r)},t.prototype.isEmpty=function(){return this.children_.isEmpty()},t.prototype.numChildren=function(){return this.children_.count()},t.prototype.val=function(e){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(l.PRIORITY_INDEX,function(a,s){n[a]=s.val(e),r++,o&&t.INTEGER_REGEXP_.test(a)?i=Math.max(i,Number(a)):o=!1}),!e&&o&&i<2*r){var a=[];for(var s in n)a[s]=n[s];return a}return e&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},t.prototype.hash=function(){if(null===this.lazyHash_){var t="";this.getPriority().isEmpty()||(t+="priority:"+c.priorityHashText(this.getPriority().val())+":"),this.forEachChild(l.PRIORITY_INDEX,function(e,n){var r=n.hash();""!==r&&(t+=":"+e+":"+r)}),this.lazyHash_=""===t?"":a.sha1(t)}return this.lazyHash_},t.prototype.getPredecessorChildName=function(t,e,n){var r=this.resolveIndex_(n);if(r){var i=r.getPredecessorKey(new u.NamedNode(t,e));return i?i.name:null}return this.children_.getPredecessorKey(t)},t.prototype.getFirstChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.minKey();return n&&n.name}return this.children_.minKey()},t.prototype.getFirstChild=function(t){var e=this.getFirstChildName(t);return e?new u.NamedNode(e,this.children_.get(e)):null},t.prototype.getLastChildName=function(t){var e=this.resolveIndex_(t);if(e){var n=e.maxKey();return n&&n.name}return this.children_.maxKey()},t.prototype.getLastChild=function(t){var e=this.getLastChildName(t);return e?new u.NamedNode(e,this.children_.get(e)):null},t.prototype.forEachChild=function(t,e){var n=this.resolveIndex_(t);return n?n.inorderTraversal(function(t){return e(t.name,t.node)}):this.children_.inorderTraversal(e)},t.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},t.prototype.getIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getIteratorFrom(t,function(t){return t});for(var r=this.children_.getIteratorFrom(t.name,u.NamedNode.Wrap),i=r.peek();null!=i&&e.compare(i,t)<0;)r.getNext(),i=r.peek();return r},t.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},t.prototype.getReverseIteratorFrom=function(t,e){var n=this.resolveIndex_(e);if(n)return n.getReverseIteratorFrom(t,function(t){return t});for(var r=this.children_.getReverseIteratorFrom(t.name,u.NamedNode.Wrap),i=r.peek();null!=i&&e.compare(i,t)>0;)r.getNext(),i=r.peek();return r},t.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===e.MAX_NODE?-1:0},t.prototype.withIndex=function(e){if(e===h.KEY_INDEX||this.indexMap_.hasIndex(e))return this;var n=this.indexMap_.addIndex(e,this.children_);return new t(this.children_,this.priorityNode_,n)},t.prototype.isIndexed=function(t){return t===h.KEY_INDEX||this.indexMap_.hasIndex(t)},t.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var e=t;if(this.getPriority().equals(e.getPriority())){if(this.children_.count()===e.children_.count()){for(var n=this.getIterator(l.PRIORITY_INDEX),r=e.getIterator(l.PRIORITY_INDEX),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},t.prototype.resolveIndex_=function(t){return t===h.KEY_INDEX?null:this.indexMap_.get(t.toString())},t.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,t}();e.ChildrenNode=_;var g=function(t){function e(){return t.call(this,new s.SortedMap(p.NAME_COMPARATOR),_.EMPTY_NODE,d.IndexMap.Default)||this}return i.__extends(e,t),e.prototype.compareTo=function(t){return t===this?0:1},e.prototype.equals=function(t){return t===this},e.prototype.getPriority=function(){return this},e.prototype.getImmediateChild=function(t){return _.EMPTY_NODE},e.prototype.isEmpty=function(){return!1},e}(_);e.MaxNode=g,e.MAX_NODE=new g,Object.defineProperties(u.NamedNode,{MIN:{value:new u.NamedNode(a.MIN_NAME,_.EMPTY_NODE)},MAX:{value:new u.NamedNode(a.MAX_NAME,e.MAX_NODE)}}),h.KeyIndex.__EMPTY_NODE=_.EMPTY_NODE,f.LeafNode.__childrenNodeConstructor=_,c.setMaxNode(e.MAX_NODE),l.setMaxNode(e.MAX_NODE)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){this.name=t,this.node=e}return t.Wrap=function(e,n){return new t(e,n)},t}();e.NamedNode=r},function(t,e,n){"use strict";function r(t){return"object"==typeof t}function i(){return"undefined"!=typeof Blob}e.a=function(t){return null!=t},e.c=function(t){return void 0!==t},e.b=function(t){return"function"==typeof t},e.i=r,e.g=function(t){return r(t)&&null!==t},e.f=function(t){return r(t)&&!Array.isArray(t)},e.j=function(t){return"string"==typeof t||t instanceof String},e.h=function(t){return"number"==typeof t||t instanceof Number},e.d=function(t){return i()&&t instanceof Blob},e.e=i},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(59);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._name=e,this._nameObj=new r.a(e)}return function(t,e,n){e&&i(t.prototype,e),n&&i(t,n)}(t,[{key:"getFrameName",value:function(){return this._nameObj.getName(0)}},{key:"getDataSourceName",value:function(){return this._nameObj.getName(1)}},{key:"getAreaName",value:function(){return this._nameObj.getName(2)}},{key:"getName",value:function(){return this._nameObj.getName(-1)}},{key:"getNameObject",value:function(){return this._nameObj}},{key:"getRectCrossPt",value:function(t,e,n){var r={x:-1,y:-1},i={x:-1,y:-1},o=n.x-e.x,a=n.y-e.y;if(Math.abs(o)<2)return[r={x:e.x,y:t.top},i={x:n.x,y:t.bottom}];var s=a/o;return i.x=t.right,i.y=e.y+(t.right-e.x)*s,r.x=t.left,r.y=e.y+(t.left-e.x)*s,[r,i]}}]),t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),e.s=function(){return new r(i.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")},e.m=function(t){return new r(i.OBJECT_NOT_FOUND,"Object '"+t+"' does not exist.")},e.n=function(t){return new r(i.QUOTA_EXCEEDED,"Quota for bucket '"+t+"' exceeded, please view quota on https://firebase.google.com/pricing/.")},e.q=function(){return new r(i.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again.")},e.r=function(t){return new r(i.UNAUTHORIZED,"User does not have permission to access '"+t+"'.")},e.o=function(){return new r(i.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")},e.c=function(){return new r(i.CANCELED,"User canceled the upload/download.")},e.k=function(t){return new r(i.INVALID_URL,"Invalid URL '"+t+"'.")},e.h=function(t){return new r(i.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+t+"'.")},e.d=function(){return new r(i.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")},e.p=function(){return new r(i.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.")},e.l=function(){return new r(i.NO_DOWNLOAD_URL,"The given file does not have any download URLs.")},e.f=function(t,e,n){return new r(i.INVALID_ARGUMENT,"Invalid argument in `"+e+"` at index "+t+": "+n)},e.g=function(t,e,n,o){var a,s;t===e?(a=t,s=1===t?"argument":"arguments"):(a="between "+t+" and "+e,s="arguments");return new r(i.INVALID_ARGUMENT_COUNT,"Invalid argument count in `"+n+"`: Expected "+a+" "+s+", received "+o+".")},e.b=function(){return new r(i.APP_DELETED,"The Firebase app was deleted.")},e.j=function(t){return new r(i.INVALID_ROOT_OPERATION,"The operation '"+t+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")},e.i=function(t,e){return new r(i.INVALID_FORMAT,"String does not match format '"+t+"': "+e)},e.e=function(t){throw new r(i.INTERNAL_ERROR,"Internal error: "+t)};n(36);var r=function(){function t(t,e){this.code_=o(t),this.message_="Firebase Storage: "+e,this.serverResponse_=null,this.name_="FirebaseError"}return t.prototype.codeProp=function(){return this.code},t.prototype.codeEquals=function(t){return o(t)===this.codeProp()},t.prototype.serverResponseProp=function(){return this.serverResponse_},t.prototype.setServerResponseProp=function(t){this.serverResponse_=t},Object.defineProperty(t.prototype,"name",{get:function(){return this.name_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"code",{get:function(){return this.code_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this.message_},enumerable:!0,configurable:!0}),Obje