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,KAAK,SAAW,GACvB,OAAO,SAAU,EAAM,GAsBtB,MApBuB,mBAAZ,IACV,EAAU,EAAQ,KAAK,IAED,iBAAZ,IAEV,EAAU,CACT,MAFO,IAKe,MAApB,EAAQ,WACX,EAAQ,SAAW,MAEG,MAAnB,EAAQ,UACX,EAAQ,SAAU,GAEG,MAAlB,EAAQ,SACX,EAAQ,OAAS,MAAM,OAAO,UAAU,KAEzC,EAAI,KAAK,eAAe,EAAO,GAAM,GACrC,EAAM,MAAM,GAAQ,EAAM,GACnB,EAAM,YAAY,GAAQ,EAAM,OAAO,EAAQ,OAAO,SAAU,EAAQ,GAC9E,OAAO,EAAM,OAAO,CACnB,OAAQ,EACR,MAAO,EACP,IAAK,EACL,SAAU,EAAQ,SAClB,OAAQ,EAAQ,OAChB,QAAS,EAAQ,SAEnB,GAAG,CACF,MAAM,EACN,WAAW,GAEb,CACA,CArCY,CAqCV,KArCU,CAqCJ,EAAM,IAEhB,OAAO,CACR,CACD,EACA,cAAe,WACd,IAAI,EAAM,EAEV,IAAK,KADL,EAAM,KAAK,aAEV,EAAY,EAAI,KAGlB,GAEF,EACmB,oBAAR,KAA+B,OAAR,KACjC,IAAI,IAAI,GAEc,iBAAZ,SAA0C,iBAAX,OAClC,OAAO,QAAU,EACI,mBAAX,QAAyB,OAAO,IAC1C,QAAO,WACb,OAAO,CACR,IAC4B,oBAAX,QAAqC,OAAX,SACpC,OAAO,WAAa,EAE5B,CAlID","file":"/npm/vue-tweener@0.1.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/vue-tweener@0.1.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import TWEEN from 'tween.js';\r\n\r\n(function () {\r\n\tvar plugin;\r\n\tplugin = function (Vue) {\r\n\t\tVue.prototype.$tween = function (arg) {\r\n\t\t\tvar animate, duration, easing, end, isCallback, isNumber, output, rounded, start, vm;\r\n\t\t\toutput = arg.output, start = arg.start, end = arg.end, duration = arg.duration, easing = arg.easing, rounded = arg.rounded;\r\n\t\t\tif (start == null) {\r\n\t\t\t\tstart = 0;\r\n\t\t\t}\r\n\t\t\tif (end == null) {\r\n\t\t\t\tend = 100;\r\n\t\t\t}\r\n\t\t\tif (duration == null) {\r\n\t\t\t\tduration = 2000;\r\n\t\t\t}\r\n\t\t\tif (easing == null) {\r\n\t\t\t\teasing = TWEEN.Easing.Quadratic.Out;\r\n\t\t\t}\r\n\t\t\tif (rounded == null) {\r\n\t\t\t\trounded = true;\r\n\t\t\t}\r\n\t\t\tisNumber = typeof start === 'number';\r\n\t\t\tif (isNumber) {\r\n\t\t\t\tstart = {\r\n\t\t\t\t\tkey: start\r\n\t\t\t\t};\r\n\t\t\t\tend = {\r\n\t\t\t\t\tkey: end\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tisCallback = typeof output === 'function';\r\n\t\t\tvm = this;\r\n\t\t\tanimate = function (time) {\r\n\t\t\t\trequestAnimationFrame(animate);\r\n\t\t\t\treturn TWEEN.update(time);\r\n\t\t\t};\r\n\t\t\tnew TWEEN.Tween(start).easing(easing).to(end, duration).onUpdate(function () {\r\n\t\t\t\tif (isCallback) {\r\n\t\t\t\t\tif (isNumber) {\r\n\t\t\t\t\t\treturn output(rounded ? Number(this.key.toFixed(0)) : this.key);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn output(this);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (isNumber) {\r\n\t\t\t\t\t\treturn vm[output] = rounded ? Number(this.key.toFixed(0)) : this.key;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn vm[output] = this;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}).start();\r\n\t\t\treturn animate();\r\n\t\t};\r\n\t\tVue.prototype.$tween.Easing = TWEEN.Easing;\r\n\t\tVue.prototype.$tween.toInteger = function (v) {\r\n\t\t\treturn (Number(v != null ? v.toFixed(0) : void 0)) || 0;\r\n\t\t};\r\n\t\treturn Vue.mixin({\r\n\t\t\tcreated: function () {\r\n\t\t\t\tvar name, options, results, tween;\r\n\t\t\t\ttween = this.$options.tween;\r\n\t\t\t\tif (tween != null) {\r\n\t\t\t\t\tthis._unwatchers = {};\r\n\t\t\t\t\tresults = [];\r\n\t\t\t\t\tfor (name in tween) {\r\n\t\t\t\t\t\toptions = tween[name];\r\n\t\t\t\t\t\tresults.push((function (_this) {\r\n\t\t\t\t\t\t\treturn function (name, options) {\r\n\t\t\t\t\t\t\t\tvar watch;\r\n\t\t\t\t\t\t\t\tif (typeof options === 'function') {\r\n\t\t\t\t\t\t\t\t\toptions = options.call(_this);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (typeof options === 'string') {\r\n\t\t\t\t\t\t\t\t\twatch = options;\r\n\t\t\t\t\t\t\t\t\toptions = {\r\n\t\t\t\t\t\t\t\t\t\twatch: watch\r\n\t\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (options.duration == null) {\r\n\t\t\t\t\t\t\t\t\toptions.duration = 1500;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (options.rounded == null) {\r\n\t\t\t\t\t\t\t\t\toptions.rounded = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (options.easing == null) {\r\n\t\t\t\t\t\t\t\t\toptions.easing = TWEEN.Easing.Quadratic.Out;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tVue.util.defineReactive(_this, name, true);\r\n\t\t\t\t\t\t\t\t_this.$data[name] = _this[name];\r\n\t\t\t\t\t\t\t\treturn _this._unwatchers[name] = _this.$watch(options.watch, function (newVal, oldVal) {\r\n\t\t\t\t\t\t\t\t\treturn _this.$tween({\r\n\t\t\t\t\t\t\t\t\t\toutput: name,\r\n\t\t\t\t\t\t\t\t\t\tstart: oldVal,\r\n\t\t\t\t\t\t\t\t\t\tend: newVal,\r\n\t\t\t\t\t\t\t\t\t\tduration: options.duration,\r\n\t\t\t\t\t\t\t\t\t\teasing: options.easing,\r\n\t\t\t\t\t\t\t\t\t\trounded: options.rounded\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}, {\r\n\t\t\t\t\t\t\t\t\tdeep: true,\r\n\t\t\t\t\t\t\t\t\timmediate: true\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t})(this)(name, options));\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tbeforeDestroy: function () {\r\n\t\t\t\tvar name, ref, unwatcher;\r\n\t\t\t\tref = this._unwatchers;\r\n\t\t\t\tfor (name in ref) {\r\n\t\t\t\t\tunwatcher = ref[name];\r\n\t\t\t\t\tunwatcher();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n\tif (typeof Vue !== \"undefined\" && Vue !== null) {\r\n\t\tVue.use(plugin);\r\n\t}\r\n\tif (typeof exports === 'object' && typeof module === 'object') {\r\n\t\treturn module.exports = plugin;\r\n\t} else if (typeof define === 'function' && define.amd) {\r\n\t\treturn define(function () {\r\n\t\t\treturn plugin;\r\n\t\t});\r\n\t} else if (typeof window !== \"undefined\" && window !== null) {\r\n\t\treturn window.VueTweener = plugin;\r\n\t}\r\n})();"]}