@arms/rum-uniapp 0.0.1-beta.1 → 0.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/uniapp-sdk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./dist/",n(n.s=15)}([function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function e(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Shell=t.Reporter=t.Context=t.Client=void 0;var i=n(6);t.Client=i.default;var u=n(8);t.Context=u.default;var a=n(19);t.Reporter=a.default;var c=n(21);t.Shell=c.default,o(n(7),t),o(n(23),t),o(n(24),t),o(n(25),t),o(n(4),t),o(n(26),t),o(n(10),t),o(n(11),t),o(n(1),t),o(n(27),t),o(n(12),t),o(n(28),t),o(n(9),t)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return r(e)===t}Object.defineProperty(t,"__esModule",{value:!0}),t.isZero=t.isObject=t.isNull=t.isNumber=t.isBoolean=t.isRegExp=t.isArray=t.isToString=t.isString=t.isFunction=t.isTypeof=void 0,t.isTypeof=o;var i=function e(t){return"function"==typeof t};function u(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function a(){for(var e=0;e<arguments.length;e++)if(0!==(e<0||arguments.length<=e?void 0:arguments[e]))return!1;return!0}t.isFunction=i,t.isString=function(e){return o(e,"string")},t.isToString=u,t.isArray=function(e){return u(e,"Array")},t.isRegExp=function(e){return u(e,"RegExp")},t.isBoolean=function(e){return o(e,"boolean")},t.isNumber=function(e){return o(e,"number")&&!isNaN(e)||o(e,"bigint")},t.isNull=function(e){return null===e},t.isObject=function(e){return!(0,t.isNull)(e)&&o(e,"object")},t.isZero=a},function(e,t,n){"use strict";function r(e,n){return e?e[t.PAGE_ID]?e[t.PAGE_ID]:n?e[t.PAGE_ID]=n.getViewId():void 0:void 0}function o(e,t){return e&&t?t.getViews().find((function(t){return t.id===e})):void 0}function i(e){if(e){var t=e.getViews();if(t&&t.length)return t[t.length-1]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getCurView=t.getViewById=t.getRumViewId=t.PAGE_ID=void 0,t.PAGE_ID="__rum_view_id",t.getRumViewId=r,t.getViewById=o,t.getCurView=i},function(e,t,n){"use strict";(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function e(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,u=Object.create(o.prototype),a=new y(r||[]);return w(u,"_invoke",{value:f(e,n,a)}),u}function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function u(){}function a(){}function c(t){["next","throw","return"].forEach((function(n){e(t,n,(function(e){return this._invoke(n,e)}))}))}function s(e,t){function o(i,u,a,c){var s=n(e[i],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==r(l)&&b.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;w(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function f(e,t,r){var o="suspendedStart";return function(i,u){if("executing"===o)throw Error("Generator is already running");if("completed"===o){if("throw"===i)throw u;return{value:d,done:!0}}for(r.method=i,r.arg=u;;){var a=r.delegate;if(a){var c=l(a,r);if(c){if(c===j)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=n(e,t,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===j)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}function l(e,t){var r=t.method,o=e.iterator[r];if(o===d)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=d,l(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),j;var i=n(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,j;var u=i.arg;return u?u.done?(t[e.resultName]=u.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d),t.delegate=null,j):u:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,j)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e||""===e){var t=e[O];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=d,t.done=!0,t};return o.next=o}}throw new TypeError(r(e)+" is not iterable")}o=function(){return m};var d,m={},g=Object.prototype,b=g.hasOwnProperty,w=Object.defineProperty||function(e,t,n){e[t]=n.value},E="function"==typeof Symbol?Symbol:{},O=E.iterator||"@@iterator",S=E.asyncIterator||"@@asyncIterator",_=E.toStringTag||"@@toStringTag";try{e({},"")}catch(S){e=function(e,t,n){return e[t]=n}}m.wrap=t;var j={},x={};e(x,O,(function(){return this}));var T=Object.getPrototypeOf,P=T&&T(T(h([])));P&&P!==g&&b.call(P,O)&&(x=P);var k=a.prototype=i.prototype=Object.create(x);return u.prototype=a,w(k,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:u,configurable:!0}),u.displayName=e(a,_,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,_,"GeneratorFunction")),t.prototype=Object.create(k),t},m.awrap=function(e){return{__await:e}},c(s.prototype),e(s.prototype,S,(function(){return this})),m.AsyncIterator=s,m.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var u=new s(t(e,n,r,o),i);return m.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},c(k),e(k,_,"Generator"),e(k,O,(function(){return this})),e(k,"toString",(function(){return"[object Generator]"})),m.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=h,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=d),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var u=b.call(o,"catchLoc"),a=b.call(o,"finallyLoc");if(u&&a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!a)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n,r=this.tryEntries.length-1;0<=r;--r)if((n=this.tryEntries[r]).tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),j},finish:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).finallyLoc===e)return this.complete(t.completion,t.afterLoc),v(t),j},catch:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;v(t)}return o}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=d),j}},m}var i=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function u(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(u,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fixAttrs=t.getNetType=t.getPerformance=t.setStorageSync=t.getStorageSync=t.appName=t.sdk=t.VERSION=t.global2=void 0;var u=n(0);function a(e){return"function"==typeof t.sdk.getStorageSync?t.sdk.getStorageSync(e):void 0}function c(e,n){return"function"==typeof t.sdk.setStorageSync?t.sdk.setStorageSync(e,n):void 0}function s(){return"performance"in t.global2?t.global2.performance:void 0}function f(){return new Promise((function(e){try{t.sdk.getNetworkType({success:function t(n){var r=n.networkType||n.subtype;e(r?r.toLowerCase():void 0)},fail:function t(n){e(void 0)}})}catch(t){e(void 0)}}))}t.global2=e||window,t.VERSION="0.0.1-beta.1",t.sdk=uni,t.appName="uniapp",t.getStorageSync=a,t.setStorageSync=c,t.getPerformance=s,t.getNetType=f;var l=function e(n){return i(this,void 0,void 0,o().mark((function e(){var r,i,a,c,s;return o().wrap((function e(o){for(;;)switch(o.prev=o.next){case 0:if(n){o.next=2;break}return o.abrupt("return");case 2:return o.next=4,f();case 4:return r=o.sent,n.app.type=u.AppType.uniapp,n._v=t.VERSION,n.net=Object.assign({model:r},n.net),i=t.sdk.getDeviceInfo()||{},a=t.sdk.getAppBaseInfo()||{},c={brand:i.brand,model:i.model},s={type:i.platform,version:i.system,container:t.appName,container_version:a.SDKVersion},n.device=Object.assign(Object.assign({},c),n.device),n.os=Object.assign(Object.assign({},s),n.os),o.abrupt("return",n);case 15:case"end":return o.stop()}}),e)})))};t.fixAttrs=l}).call(this,n(14))},function(e,t,n){"use strict";var r,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AppType=t.ResourceStatus=t.RumEventType=void 0,function(e){e.VIEW="view",e.RESOURCE="resource",e.EXCEPTION="exception",e.LONG_TASK="longTask",e.ACTION="action",e.CUSTOM="custom",e.APPLICATION="application"}(r=t.RumEventType||(t.RumEventType={})),function(e){e[e.Unknown=-1]="Unknown",e[e.Failed=0]="Failed",e[e.Success=1]="Success"}(o=t.ResourceStatus||(t.ResourceStatus={})),function(e){e.browser="browser",e.miniapp="miniapp",e.minigame="minigame",e.uniapp="uniapp"}(i=t.AppType||(t.AppType={}))},function(e,t,n){"use strict";function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:3;if(!e)return e;var n=e.toString(),r=n.indexOf(".");return n=-1===r?n.substring(0):n.substring(0,t+r+1),parseFloat(n)}function o(){return(new Date).getTime()}Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentTime=t.formatNumber=void 0,t.formatNumber=r,t.getCurrentTime=o},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function e(){};return{s:o,n:function t(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function t(){n=n.call(e)},n:function e(){var t=n.next();return a=t.done,t},e:function e(t){c=!0,u=t},f:function e(){try{a||null==n.return||n.return()}finally{if(c)throw u}}}}function i(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function s(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),v=n(18),y=n(8),h=n(1),d=function(){function e(){var t=this;a(this,e),this.emitter=new v.EventEmitter,this.sendEvent=function(e){t.emitter.emit(p.EventType.collect,e)}}return s(e,[{key:"init",value:function e(t,n){var r=this;this.ctx=new y.default(t,n);var i=this.ctx,u=this.collectors,a=this.processors,c=this.reporter;a.forEach((function(e){(0,h.isFunction)(e.setup)&&e.setup(i)})),this.emitter.on(p.EventType.collect,(function(e){i.setRumEvent(e);var t=o(a),n;try{for(t.s();!(n=t.n()).done;){var r=n.value;if(r.match||(r.match=function(){return!0}),r.match(i)){var u=r.process(i);u&&i.setRumEvent(u)}}}catch(e){t.e(e)}finally{t.f()}c.report(i)})),u.forEach((function(e){e.setup(i,r.sendEvent)}))}},{key:"setContext",value:function e(t){this.ctx=t}},{key:"getContext",value:function e(){return this.ctx}},{key:"useCollectors",value:function e(t){this.collectors=t}},{key:"getCollectors",value:function e(){return this.collectors}},{key:"useProcessors",value:function e(t){this.processors=t}},{key:"useReporter",value:function e(t){this.reporter=t}}])}();t.default=d},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0,function(e){e.collect="collect"}(r=t.EventType||(t.EventType={}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(t,n){o(this,e),this.config=t,this.views=[],n&&(this.session=n,this.session.init(this))}return u(e,[{key:"getConfig",value:function e(){return this.config}},{key:"setConfig",value:function e(t){this.config=t}},{key:"getViews",value:function e(){return this.views}},{key:"addView",value:function e(t){this.views.push(t)}},{key:"removeView",value:function e(t){this.views=this.views.filter((function(e){return e.id!==t}))}},{key:"getRumEvent",value:function e(){return this.rumEvent}},{key:"setRumEvent",value:function e(t){this.rumEvent=t}}])}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyProperties=void 0;var r=n(1);function o(e){if((0,r.isObject)(e)){var t=Object.assign({},e);Object.keys(t).forEach((function(e){var n=t[e];if(e.length>50){var o=e.substring(0,50);t[o]=n,delete t[e],e=o}(0,r.isString)(n)||(0,r.isNumber)(n)?(0,r.isString)(n)&&n.length>2e3&&(t[e]=n.substring(0,2e3)):delete t[e]}));var n=Object.keys(t);if(n.length)return n.length>20&&n.forEach((function(e,n){n>19&&delete t[e]})),t}}t.verifyProperties=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRegFormat=t.transStrToReg=t.getType=t.delay=t.debounce=t.generateEventId=t.generateSpanId=t.generateTraceId=t.generateGUID=t.restoreFunction=t.interceptFunction=void 0;var r=n(1),o="__",i=/^\[object ([a-z]*)\]$/;function u(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e[t];e["".concat("__").concat(t).concat("__")]=i,e[t]=function(){for(var t=o?this:e,u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];if(n.apply(t,a),(0,r.isFunction)(i))return i.apply(t,a)}}function a(e,t){var n="".concat("__").concat(t).concat("__");"function"==typeof e[n]&&(e[t]=e[n],delete e[n])}function c(){var e="";try{if(crypto&&crypto.randomUUID)e=crypto.randomUUID();else if(crypto&&crypto.getRandomValues){var t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128,e=t.reduce((function(e,t){return e+t.toString(16).padStart(2,"0")}),"").replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,"$1-$2-$3-$4-$5")}}catch(e){}return e||(e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,n;return("x"==e?t:3&t|8).toString(16)}))),e}function s(){var e=c().replace(/-/g,"");return"0"===e[0]&&(e="1"+e.substring(1)),"0"===e[16]&&(e=e.substring(0,16)+"1"+e.substring(17)),e}function f(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n="",r=0;r<e;r++)n+=Math.floor(Math.random()*t).toString(t);return n}function l(e){var t=f();return"00-".concat(e,"-").concat(t)}function p(e,t){var n;if((0,r.isFunction)(e))return function(){var r=this,o=arguments;n&&clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}function v(e,t){if((0,r.isFunction)(e)){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return setTimeout.apply(void 0,[e,+t||0].concat(o))}}function y(e){var t=Object.prototype.toString.call(e),n=(t=t.toLowerCase()||"").match(i);return null==n?void 0:n[1]}function h(e){return"string"!==y(e)?e:e.length>2&&"/"===e[0]&&"/"===e[e.length-1]?new RegExp(e.substr(1,e.length-2)):e}function d(e,t){"string"===y(t)&&(t=[t]);for(var n=0,r=t.length;n<r;n++){var o=t[n].split("."),i=o.length-1;if(!e)break;for(var u=e,a=0,c=o.length;a<c;a++){if("[]"===o[a]){if("array"===y(u)){var s=o.splice(a+1);s=s.join(".");for(var f=0,l=u.length;f<l;f++)d(u[f],s)}break}if(i===a&&"string"===y(u[o[a]])){u[o[a]]=h(u[o[a]]);break}if(!(u=u[o[a]]))break}if(u&&"array"===y(u))for(var p=0,v=u.length;p<v;p++)u[p]=h(u[p])}}t.interceptFunction=u,t.restoreFunction=a,t.generateGUID=c,t.generateTraceId=s,t.generateSpanId=f,t.generateEventId=l,t.debounce=p,t.delay=v,t.getType=y,t.transStrToReg=h,t.toRegFormat=d},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}function o(e,t){return e.slice(0,t.length)===t}function i(e,t){return e.slice(-t.length)===t}function u(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.assign=t.endsWith=t.startsWith=t.find=void 0,t.find=r,t.startsWith=o,t.endsWith=i,t.assign=u},function(e,t,n){"use strict";function r(e){return a(e)||u(e)||i(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e){if(Array.isArray(e))return c(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.urlMatch=t.matchList=t.isMatchOption=void 0;var s=n(1),f=n(11);function l(e){return(0,s.isString)(e)||(0,s.isFunction)(e)||(0,s.isRegExp)(e)}function p(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0;return e.some((function(e){try{if("function"==typeof e)return e(t,r);if(e instanceof RegExp)return e.test(t);if("string"==typeof e)return n?(0,f.startsWith)(t,e):e===t}catch(e){}return!1}))}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{(0,s.isArray)(t)||(t=[t]);var n=[/^(https?:)?\/\/.*rum|retcode|log-global|log\.aliyuncs\.com/,/^(https?:)?\/\/.*\.mmstat\.com/,/^(https?:)?\/\/.*hm\.baidu\.com/,/^(https?:)?\/\/.*google-analytics\.com/,/data:(.+?)(;base64)?,(.+)$/].concat(r(t));return p(n,e)}catch(e){return!1}}t.isMatchOption=l,t.matchList=p,t.urlMatch=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeEventListener=t.addEventListener=t.mixin=void 0;var r,o={onLaunch:[],onLoad:[],onShow:[],beforeCreate:[],mounted:[]};function i(e){if(!r){r=e;var t={};Object.keys(o).forEach((function(e){t[e]=function(t){var n=this,r;o[e].forEach((function(e){e(n,t)}))}})),e.mixin(t)}}function u(e,t){e in o||(o[e]=[]),o[e].push(t)}function a(e,t){if(e in o&&t){var n=o[e],r=n.indexOf(t);return n.splice(r,1),!0}return!1}t.mixin=i,t.addEventListener=u,t.removeEventListener=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArmsRum=void 0;var r=n(17);Object.defineProperty(t,"ArmsRum",{enumerable:!0,get:function(){return r.ArmsRum}}),t.default=r.default},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}function a(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t,n){return t=y(t),l(e,v()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function l(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ArmsRum=void 0;var m=n(0),g=n(29),b=n(30),w=n(31),E=n(34),O=n(35),S=n(36),_=n(3),j=n(37),x=n(13),T=function(e){function t(){var e;return i(this,t),(e=f(this,t,arguments)).version=_.VERSION,e}return h(t,e),a(t,[{key:"init",value:function(e){e.vue&&this.setVue(e.vue),this.client.useCollectors([new g.default,new b.default,new w.default]),this.client.useProcessors([new E.default,new O.default]),this.client.useReporter(new S.default),this.client.init(e,new j.RumSession)}},{key:"setConfig",value:function(){var e=this.client.getContext();if(2===arguments.length){var t=this.client.getContext(),n=t.getConfig();t.setConfig(Object.assign(Object.assign({},n),o({},0>=arguments.length?void 0:arguments[0],1>=arguments.length?void 0:arguments[1])))}else e.setConfig(0>=arguments.length?void 0:arguments[0])}},{key:"getLocalConfig",value:function(){}},{key:"getRemoteConfig",value:function(){}},{key:"storeRemoteConfig",value:function(){return!1}},{key:"setVue",value:function(e){this.setConfig("vue",e),(0,x.mixin)(e)}}])}(m.Shell);t.ArmsRum=T,t.default=new T},function(e,t,n){"use strict";var r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function e(t,n,r){return Function.prototype.apply.call(t,n,r)},i;function u(e){console&&console.warn&&console.warn(e)}i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function e(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function e(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function e(t){return t!=t};function c(){c.init.call(this)}e.exports=c,e.exports.once=w,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var s=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,a;if(f(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,u(c)}return e}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=v.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?b(o):m(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function b(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function w(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}O(e,t,i,{once:!0}),"error"!==t&&E(e,o,{once:!0})}))}function E(e,t,n){"function"==typeof e.on&&O(e,"error",t,n)}function O(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),c.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function e(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},c.prototype.getMaxListeners=function e(){return l(this)},c.prototype.emit=function e(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i="error"===t,u=this._events;if(void 0!==u)i=i&&void 0===u.error;else if(!i)return!1;if(i){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var c=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw c.context=a,c}var s=u[t];if(void 0===s)return!1;if("function"==typeof s)o(s,this,n);else for(var f=s.length,l=m(s,f),r=0;r<f;++r)o(l[r],this,n);return!0},c.prototype.addListener=function e(t,n){return p(this,t,n,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function e(t,n){return p(this,t,n,!0)},c.prototype.once=function e(t,n){return f(n),this.on(t,y(this,t,n)),this},c.prototype.prependOnceListener=function e(t,n){return f(n),this.prependListener(t,y(this,t,n)),this},c.prototype.removeListener=function e(t,n){var r,o,i,u,a;if(f(n),void 0===(o=this._events))return this;if(void 0===(r=o[t]))return this;if(r===n||r.listener===n)0==--this._eventsCount?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,r.listener||n));else if("function"!=typeof r){for(i=-1,u=r.length-1;u>=0;u--)if(r[u]===n||r[u].listener===n){a=r[u].listener,i=u;break}if(i<0)return this;0===i?r.shift():g(r,i),1===r.length&&(o[t]=r[0]),void 0!==o.removeListener&&this.emit("removeListener",t,a||n)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function e(t){var n,r,o;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i=Object.keys(r),u;for(o=0;o<i.length;++o)"removeListener"!==(u=i[o])&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(n=r[t]))this.removeListener(t,n);else if(void 0!==n)for(o=n.length-1;o>=0;o--)this.removeListener(t,n[o]);return this},c.prototype.listeners=function e(t){return h(this,t,!0)},c.prototype.rawListeners=function e(t){return h(this,t,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},c.prototype.listenerCount=d,c.prototype.eventNames=function e(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),f=n(20),l=n(1),p=n(9),v=3e3,y=20,h=["app","user","device","os","geo","isp","net","properties"],d=function(){function e(){o(this,e),this.name="reporter",this.eventQueue=[]}return u(e,[{key:"getReportCfg",value:function e(){var t=this.ctx.getConfig().reportConfig;return(0,l.isObject)(t)||(t={}),(!t.flushTime||t.flushTime<0||t.flushTime>1e4)&&(t.flushTime=3e3),(!t.maxEventCount||t.maxEventCount<1||t.maxEventCount>100)&&(t.maxEventCount=20),t}},{key:"report",value:function e(t){var n=this;this.ctx=t,this.init(t),clearTimeout(this.timer),this.pushToQueue();var r=this.getReportCfg();this.eventQueue.length>=r.maxEventCount?this.flushEventQueue():this.timer=setTimeout((function(){n.flushEventQueue()}),r.flushTime)}},{key:"pushToQueue",value:function e(){var t=this.ctx,n=this.eventQueue,r=t.getRumEvent();if(r.event_type===s.RumEventType.EXCEPTION){var o=r.message,i=r.stack,u=(0,f.getErrorID)({message:o,stack:i}),a=this.eventQueue.find((function(e){if(e.event_type===s.RumEventType.EXCEPTION){var t=e.message,n=e.stack;return(0,f.getErrorID)({message:t,stack:n})===u}}));if(a)return void a.times++}if(r.event_type===s.RumEventType.ACTION){var c=r.target_name,l=this.eventQueue.find((function(e){if(e.event_type===s.RumEventType.ACTION)return c===e.target_name}));if(l)return void l.times++}n.push(r)}},{key:"flushEventQueue",value:function e(){var t=this.ctx,n=this.eventQueue;if(n.length){var r=t.getViews(),o=r[r.length-1];r.forEach((function(e){var t;e.id===o.id&&n.filter((function(t){var n;return(null===(n=t.view)||void 0===n?void 0:n.id)===e.id})).forEach((function(e){delete e.view}))}));var i=t.session,u;(!i||i.getSampled())&&this.mergeEvent(t,n,o),this.eventQueue=[]}}},{key:"mergeEvent",value:function e(t,n,r){for(var o=t.getConfig(),i=t.session,u=i.getSessionId(),a=0;a<n.length;a++){var c=n[a];c.session_id===u?delete c.session_id:(n.splice(a,1),a--)}if(0!==n.length){var s={app:{id:o.pid,env:o.env||"prod",version:o.version,type:""},user:{id:i.getUserId()},session:{id:u},net:{},view:r,events:n};h.forEach((function(e){var t=o[e];(0,l.isObject)(t)&&Object.keys(t).forEach((function(n){var r=t[n];"user"===e&&"id"===n||("properties"===e?s[e]=(0,p.verifyProperties)(t):((0,l.isString)(r)||(0,l.isNumber)(r))&&(e in s||(s[e]={}),s[e][n]=r))}))})),("function"!=typeof o.beforeReport||(s=o.beforeReport(s)))&&this.request(t,s)}}},{key:"init",value:function e(t){}}])}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorID=void 0;var r=function e(t){var n=t.message,r=void 0===n?"":n,o=t.stack,i;return r+(void 0===o?"":o)};t.getErrorID=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),f=n(6),l=n(1),p=n(22),v=function(){function e(t){o(this,e),this.client=new f.default,t&&this.init&&this.init(t)}return u(e,[{key:"getCombinedConfig",value:function e(t){var n;if((0,p.isRemoteConfigEnable)(t)&&(0,l.isFunction)(this.getLocalConfig)){var r=this.getLocalConfig(0,t.pid);n=(0,p.default)(t,r)}return n||t}},{key:"updateFromRemoteConfig",value:function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.pid&&(0,p.isRemoteConfigEnable)(t)&&(0,l.isFunction)(this.getRemoteConfig)){var r=this,o=this.getRemoteConfig((0,p.getRemoteConfigUrl)(t),t);null==o||o.then((function(e){if(e&&void 0===e.errorStatus){var o=(0,p.default)(t,e);if(o&&((0,l.isFunction)(r.storeRemoteConfig)&&r.storeRemoteConfig(e,t.pid),!1!==n&&!1!==t.remoteConfig.reSetup)){var i=r.client.getContext(),u;i.setConfig(o),r.client.getCollectors().forEach((function(e){(0,l.isFunction)(e.destroy)&&(e.destroy(),e.setup(i,r.client.sendEvent))}))}}}))}}},{key:"sendEvent",value:function e(t){this.client&&this.client.sendEvent(t)}},{key:"getConfig",value:function e(){if(this.client)return this.client.getContext().getConfig()}},{key:"sendCustom",value:function e(t){if(t.name&&t.type){var n=Object.assign(Object.assign({},t),{event_type:s.RumEventType.CUSTOM});this.sendEvent(n)}}},{key:"sendView",value:function e(t){if((0,l.isObject)(t)){if(t.type||(t.type="custom"),"custom"===t.type){var n=0;if(["t1","t2","t3"].forEach((function(e){(0,l.isNumber)(t[e])||delete t[e],e in t&&n++})),0===n)return}var r=Object.assign(Object.assign({},t),{event_type:s.RumEventType.VIEW});this.sendEvent(r)}}},{key:"sendException",value:function e(t){if(t.name&&t.message){var n=t.name,r=t.message,o=t.stack,i=Object.assign(Object.assign({times:1,name:n,message:r,stack:o},t),{event_type:s.RumEventType.EXCEPTION,type:"custom",source:"custom"});this.sendEvent(i)}}},{key:"sendResource",value:function e(t){if(t.name&&t.type&&(0,l.isNumber)(t.duration)){var n=Object.assign(Object.assign({times:1},t),{event_type:s.RumEventType.RESOURCE});this.sendEvent(n)}}}])}();t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRemoteConfigUrl=t.isRemoteConfigEnable=void 0;var r=n(10),o=["filters.exception","filters.resource","tracing.allowedUrls.[].match"];function i(e){return!0===e.remoteConfig||e.remoteConfig&&!1!==e.remoteConfig.enable}function u(e){if(e.remoteConfig&&e.remoteConfig.url)return e.remoteConfig.url;var t=e.pid.split("@");if(t&&!(t.length<2)){var n=Date.now();return"//".concat(t[0],"-sdk.rum.aliyuncs.com/config/").concat(e.remoteConfig.region||"cn-hangzhou","/").concat(t[1],"?t=").concat(n)}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)if("pid"!==n&&"endpoint"!==n&&void 0!==(null==t?void 0:t[n])){var o=e[n],i=null==t?void 0:t[n];"object"===(0,r.getType)(o)&&"object"===(0,r.getType)(i)?a(o,i):e[n]=i}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)if(void 0===(null==e?void 0:e[n]))e[n]=t[n];else{var o=e[n],i=t[n];"object"===(0,r.getType)(o)&&"object"===(0,r.getType)(i)&&c(o,i)}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;if("object"!==(0,r.getType)(e)||"object"!==(0,r.getType)(t))return null;var n=Object.assign({},e);return(0,r.toRegFormat)(t,o),a(n,t),c(n,t),n}t.isRemoteConfigEnable=i,t.getRemoteConfigUrl=u,t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";function r(e){return 0!==e&&100*Math.random()<=e}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e)return e;var r=e.toString(),o=r.indexOf(".");r=-1!==o?r.substring(0,t+o+1):r.substring(0);var i=parseFloat(r);return i>=n?i:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNumber=t.performDraw=t.ONE_DAY=t.ONE_HOUR=t.ONE_MINUTE=t.ONE_SECOND=void 0,t.ONE_SECOND=1e3,t.ONE_MINUTE=60*t.ONE_SECOND,t.ONE_HOUR=60*t.ONE_MINUTE,t.ONE_DAY=24*t.ONE_HOUR,t.performDraw=r,t.formatNumber=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTracingOptions=t.makeTracingHeaders=t.isTraceOption=void 0;var r=n(12),o=n(1);function i(e){return e&&(0,r.isMatchOption)(e.match)&&(0,o.isArray)(e.propagatorTypes)}function u(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},u={},a=n?"1":"0";return r.includes("sw8")&&(r=["sw8"]),(0,o.isArray)(r)||(r=[r]),r.forEach((function(n){switch(n){case"jaeger":u["uber-trace-id"]="".concat(e,":").concat(t,":0:").concat(a);break;case"b3":u.b3="".concat(e,"-").concat(t,"-").concat(a);break;case"b3multi":u["X-B3-TraceId"]=e,u["X-B3-SpanId"]=t,u["X-B3-Sampled"]=a;break;case"sw8":if((0,o.isFunction)(btoa)){var r=btoa(e),c=btoa(t),s=btoa(i.appId),f=btoa(i.appVersion),l=btoa(i.viewName),p=btoa(i.host);u.sw8="".concat(a,"-").concat(r,"-").concat(c,"-",0,"-").concat(s,"-").concat(f,"-").concat(l,"-").concat(p)}break;case"tracecontext":default:u.traceparent="00-".concat(e,"-").concat(t,"-0").concat(a),i.tracestate&&(u.tracestate=i.tracestate)}})),i.baggage&&(u.baggage=i.baggage),u}function a(e){var t=["tracecontext"];if((0,o.isBoolean)(e)||!e)return{enable:!!e,sample:100,propagatorTypes:t,allowedUrls:[],tracestate:!0,baggage:!1};var n=e.enable,u=void 0===n||n,a=e.sample,c=void 0===a?100:a,s=e.propagatorTypes,f=void 0===s?t:s,l=e.allowedUrls,p=void 0===l?[]:l,v=e.tracestate,y=void 0===v||v,h=e.baggage,d=void 0!==h&&h,m=[];return(0,o.isArray)(p)&&p.length&&p.forEach((function(e){(0,r.isMatchOption)(e)?m.push({match:e,propagatorTypes:f}):i(e)&&m.push(e)})),{enable:!(0,o.isBoolean)(u)||u,sample:(0,o.isNumber)(c)?c:100,propagatorTypes:f,allowedUrls:m,tracestate:y,baggage:d}}t.isTraceOption=i,t.makeTracingHeaders=u,t.parseTracingOptions=a},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),f=n(2),l=n(13),p=function(){function e(){var t=this;o(this,e),this.name="pv-collector",this.onLaunch=function(e,n){if(e&&n&&"app"===e.$mpType){var r=(0,f.getRumViewId)(e,t.ctx.session);t.sendPv({id:r,route:n.path})}},this.onBeforeCreate=function(e){if("page"===e.$mpType&&e.route){var n=(0,f.getRumViewId)(e,t.ctx.session);t.sendPv({id:n,route:e.route})}},this.sendPv=function(e){t.prevPage&&e.id===t.prevPage.id||(e.name=t.getViewName(e.route),t.prevPage=e,t.ctx.addView(e),t.sendEvent(Object.assign({event_type:s.RumEventType.VIEW,type:"pv",loading_type:"initial_load"},e)))}}return u(e,[{key:"setup",value:function(e,t){this.ctx=e,this.sendEvent=t,(0,l.addEventListener)("onLaunch",this.onLaunch),(0,l.addEventListener)("beforeCreate",this.onBeforeCreate)}},{key:"getViewName",value:function(e){var t,n=this.ctx.getConfig().parseViewName,r=e;return(0,s.isFunction)(n)&&(r=n(e)),r}},{key:"destroy",value:function(){(0,l.removeEventListener)("onLaunch",this.onLaunch),(0,l.removeEventListener)("beforeCreate",this.onBeforeCreate)}}])}();t.default=p},function(e,t,n){"use strict";(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),f=n(2),l=function(){function t(){var e=this;o(this,t),this.name="exception-collector",this.uniError=function(t){e.errorHandle(t,"uni.onError")},this.onError=function(t){e.errorHandle(t,"onError")},this.onUnhandledRejection=function(t){if(t){var n=t.reason;if(n){var r=n.errMsg;if(r&&(0,s.isString)(r)){(n=new Error(r)).name="",n.stack="";for(var o,i,u=0,a=["navigateTo","redirectTo","appLaunch","switchTab","getLocation","onLocationChange"];u<a.length;u++)if(o=a[u],r.startsWith(o)){n.name=o;break}n.name||(n.name=r.split(":")[0])}e.errorHandle(n,"onUnhandledRejection")}}},this.errorHandle=function(t){var n,r,o,i,u,a,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",l=(0,f.getCurView)(e.ctx);if(t instanceof Object){if(n=t.name,r=t.message,o=t.filename||t.fileName,i=t.stack,u=t.lineno||t.lineNumber,a=t.colno||t.columnNumber,t.error instanceof Error){var p=t.error;n=p.name,r=p.message,i=p.stack}}else if("string"==typeof t){i=t;var v=e.getErrorByStack(t);v&&(n=v.name,r=v.message)}n&&r&&e.sendEvent({event_type:s.RumEventType.EXCEPTION,source:c,type:"error",name:n,message:r,file:o,stack:i,line:u,column:a,times:1,view:l})}}return u(t,[{key:"setup",value:function(e,t){this.ctx=e,this.sendEvent=t,this.hackOrigin()}},{key:"hackOrigin",value:function(){var t=this,n,r=this.ctx.getConfig().collectors,o=void 0===r?{}:r;if(!1!==o.jsError)try{uni.onError(this.uniError),e.addEventListener("error",this.onError),e.addEventListener("unhandledrejection",this.onUnhandledRejection)}catch(t){console.error(t)}!1!==o.consoleError&&(0,s.interceptFunction)(console,"error",(function(e){t.errorHandle(e,"console.error")}))}},{key:"getErrorByStack",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=e.split("\n");if(!(2>t.length))for(var n=1;n<t.length;n++)if(t[n].trim().startsWith("at ")){var r=t[n-1],o=r.indexOf(": ");return{name:r.substring(0,o),message:r.substring(o+2)}}}},{key:"destroy",value:function(){(0,s.restoreFunction)(e.console,"error")}}])}();t.default=l}).call(this,n(14))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function e(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,u=Object.create(o.prototype),a=new y(r||[]);return w(u,"_invoke",{value:f(e,n,a)}),u}function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function u(){}function a(){}function c(t){["next","throw","return"].forEach((function(n){e(t,n,(function(e){return this._invoke(n,e)}))}))}function s(e,t){function o(i,u,a,c){var s=n(e[i],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==r(l)&&b.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;w(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function f(e,t,r){var o="suspendedStart";return function(i,u){if("executing"===o)throw Error("Generator is already running");if("completed"===o){if("throw"===i)throw u;return{value:d,done:!0}}for(r.method=i,r.arg=u;;){var a=r.delegate;if(a){var c=l(a,r);if(c){if(c===j)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=n(e,t,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===j)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}function l(e,t){var r=t.method,o=e.iterator[r];if(o===d)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=d,l(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),j;var i=n(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,j;var u=i.arg;return u?u.done?(t[e.resultName]=u.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d),t.delegate=null,j):u:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,j)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e||""===e){var t=e[O];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=d,t.done=!0,t};return o.next=o}}throw new TypeError(r(e)+" is not iterable")}o=function(){return m};var d,m={},g=Object.prototype,b=g.hasOwnProperty,w=Object.defineProperty||function(e,t,n){e[t]=n.value},E="function"==typeof Symbol?Symbol:{},O=E.iterator||"@@iterator",S=E.asyncIterator||"@@asyncIterator",_=E.toStringTag||"@@toStringTag";try{e({},"")}catch(S){e=function(e,t,n){return e[t]=n}}m.wrap=t;var j={},x={};e(x,O,(function(){return this}));var T=Object.getPrototypeOf,P=T&&T(T(h([])));P&&P!==g&&b.call(P,O)&&(x=P);var k=a.prototype=i.prototype=Object.create(x);return u.prototype=a,w(k,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:u,configurable:!0}),u.displayName=e(a,_,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,_,"GeneratorFunction")),t.prototype=Object.create(k),t},m.awrap=function(e){return{__await:e}},c(s.prototype),e(s.prototype,S,(function(){return this})),m.AsyncIterator=s,m.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var u=new s(t(e,n,r,o),i);return m.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},c(k),e(k,_,"Generator"),e(k,O,(function(){return this})),e(k,"toString",(function(){return"[object Generator]"})),m.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=h,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=d),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var u=b.call(o,"catchLoc"),a=b.call(o,"finallyLoc");if(u&&a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!a)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n,r=this.tryEntries.length-1;0<=r;--r)if((n=this.tryEntries[r]).tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),j},finish:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).finallyLoc===e)return this.complete(t.completion,t.afterLoc),v(t),j},catch:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;v(t)}return o}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=d),j}},m}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}function a(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function u(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(u,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});var l=n(0),p=n(3),v=n(32),y=n(5),h=n(2),d=n(33),m=function(){function e(){var t=this;i(this,e),this.name="api-collector",this.sendApi=function(e,n,r){return f(t,void 0,void 0,o().mark((function t(){var i,u,a,c,s,f,p,v,h,m,g;return o().wrap((function t(o){for(;;)switch(o.prev=o.next){case 0:if(i=this.ctx.getConfig(),u=i.evaluateApi,a=n.statusCode,c=n.status,s=n.errMsg,f=n.errorMessage,p=n.message,v=n.profile,!(0,l.isFunction)(u)){o.next=13;break}return o.prev=3,0===e.success&&(h=new Error("request error")),o.next=7,u(r,n,h);case 7:m=o.sent,e=Object.assign(Object.assign({},e),(0,d.reviseApiAttr)(m)),o.next=13;break;case 11:o.prev=11,o.t0=o.catch(3);case 13:if(!((g=Object.assign({event_type:l.RumEventType.RESOURCE,type:"api",status_code:c||a,message:f||s||p,duration:(0,y.getCurrentTime)()-e.timestamp,times:1},e)).duration>l.ONE_DAY)){o.next=16;break}return o.abrupt("return");case 16:this.sendEvent(g);case 17:case"end":return o.stop()}}),t,this,[[3,11]])})))}}return a(e,[{key:"setup",value:function e(t,n){var r,o=t.getConfig().collectors,i;!1===(void 0===o?{}:o).api||(this.ctx=t,this.sendEvent=n,this.interceptorRequest())}},{key:"interceptorRequest",value:function e(){if((0,l.isFunction)(p.sdk.addInterceptor)){var t=this;p.sdk.addInterceptor("request",{invoke:function e(n){t.rebuildRequestOptions(n)}})}}},{key:"injectTracing",value:function e(t,n){var r,o=this.ctx.getConfig(),i=o.tracing,u=o.pid,a=o.version,c=void 0===a?"1.0.0":a,s=(0,l.parseTracingOptions)(i),f=s.enable,v=s.sample,y=s.propagatorTypes,h=s.allowedUrls,d=s.tracestate,m=!(void 0!==d)||d,g=s.baggage,b=void 0!==g&&g;if(f){var w=(0,l.find)(h,(function(e){return(0,l.matchList)([e.match],t.url)}));if(w){var E=w.propagatorTypes;0===E.length&&(E=y);var O=!1;E.includes("sw8")&&(E=["sw8"],O=!0);var S=O?(0,l.generateGUID)():(0,l.generateTraceId)(),_=O?(0,l.generateGUID)():(0,l.generateSpanId)(),j=(0,l.performDraw)(v),x=this.ctx.session.getUserId(),T=this.ctx.session.getSessionId(),P=m?"rum=v2&uniapp&".concat(u,"&").concat(T,"&").concat(x):void 0,k=b?"rum=v2,appType=uniapp,pid=".concat(u,",sid=").concat(T,",uid=").concat(x):void 0,C=(0,l.makeTracingHeaders)(S,_,j,E,{tracestate:P,baggage:k,appId:u,appVersion:c,viewName:null===(r=t.view)||void 0===r?void 0:r.name,host:p.appName});j&&(t.trace_id=S,t.trace_data=JSON.stringify({spanId:_,sample:v,sampled:j,header:C})),n(C)}}}},{key:"rebuildRequestOptions",value:function e(t){var n=this,r=t.url,o=t.success,i=t.fail,u=t.header,a=(0,y.getCurrentTime)();if((0,v.isEndpoint)(this.ctx,r)||(0,l.urlMatch)(r))return t;var c={view:(0,h.getCurView)(this.ctx),timestamp:a,url:r,name:this.getResourceName(r),method:t.method||"GET"};return this.injectTracing(c,(function(e){t.header=Object.assign(Object.assign({},u),e)})),t.success=function(){c.success=1;for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];n.sendApi(c,r[0],t),o&&o.apply(this,r)},t.fail=function(){c.success=0;for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];n.sendApi(c,r[0],t),i&&i.apply(this,r)},t}},{key:"getResourceName",value:function e(t){var n,r,o=this.ctx.getConfig().parseResourceName;return n=(0,l.isFunction)(o)?o(t):(0,v.getPathByURL)(t)}}])}();t.default=m},function(e,t,n){"use strict";function r(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];try{var n=u(e);return t?n.hash:n.pathname}catch(e){return""}}function o(e,t){var n,r=e.getConfig().endpoint;try{return u(t).hostname===u(r).hostname}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.getURL=t.isEndpoint=t.getPathByURL=void 0,t.getPathByURL=r,t.isEndpoint=o;var i=/^(?:([^:\/?#]+):\/\/)?((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;function u(e){var t=decodeURIComponent(e).match(i),n,r=(t[3]||"").split(":").length?(t[2]||"").replace(/(.*\@)/,""):t[2];return{uri:t[0],protocol:t[1],host:r,hostname:t[4],port:t[5],pathname:t[6],search:t[7],hash:t[8]}}t.getURL=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reviseApiAttr=void 0;var r=n(0);function o(e){if(e&&(0,r.isObject)(e)){var t={};return(0,r.isString)(e.name)&&(t.name=e.name.substring(0,1e3)),(0,r.isString)(e.message)&&(t.message=e.message.substring(0,1e3)),"success"in e&&(t.success=e.success?1:0),(0,r.isNumber)(e.duration)&&0<=e.duration&&(t.duration=e.duration),(0,r.isString)(e.status_code)&&(t.status_code=e.status_code.substring(0,100)),(0,r.isNumber)(e.status_code)&&(t.status_code=e.status_code),(0,r.isString)(e.snapshots)&&(t.snapshots=e.snapshots.substring(0,5e3)),t}}t.reviseApiAttr=o},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),f=n(2),l=function(){function e(){o(this,e),this.name="default-processor"}return u(e,[{key:"process",value:function(e){var t=e.getRumEvent(),n=(0,f.getCurView)(e),r;return Object.assign({timestamp:(0,s.getCurrentTime)(),session_id:e.session.getSessionId(),event_id:e.session.getEventId(),view:n},t)}}])}();t.default=l},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),f=function(){function e(){var t=this;o(this,e),this.name="session-processor",this.update=function(e){e&&!e.isTrusted||t.ctx.session.updateSession()}}return u(e,[{key:"setup",value:function(e){this.ctx=e,this.update=(0,s.debounce)(this.update,s.ONE_SECOND)}},{key:"process",value:function(e){return this.update(),e.getRumEvent()}}])}();t.default=f},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e,t,n){return t=v(t),f(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function f(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var d=n(0),m=n(3),g=function(e){function t(){var e;return o(this,t),(e=s(this,t,arguments)).name="uni-reporter",e}return y(t,e),u(t,[{key:"init",value:function(){var e=this;m.sdk.onAppHide((function(){e.flushEventQueue()}))}},{key:"request",value:function(e,t){var n=e.getConfig();(0,m.fixAttrs)(t).then((function(e){m.sdk.request({url:n.endpoint,method:"POST",dataType:"text",data:JSON.stringify(e)})})).catch((function(e){console.warn("[arms] sendRequest fail",e)}))}}])}(d.Reporter);t.default=g},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return s(e)||c(e,t)||u(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(c){s=!0,o=c}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(s)throw o}}return a}}function s(e){if(Array.isArray(e))return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}function p(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=y(e,"string");return"symbol"==r(t)?t:t+""}function y(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RumSession=void 0;var h=n(0),d=n(5),m=n(2),g=n(3),b="_arms_uid",w="_arms_session",E=function(){function e(){f(this,e)}return p(e,[{key:"init",value:function(e){var t;this.ctx=e,this.sessionConfig=this.fixSessionConfig(null===(t=e.config)||void 0===t?void 0:t.sessionConfig)}},{key:"getSessionId",value:function(){return this.getSessionInfo().sessionId}},{key:"getSampled",value:function(){return this.getSessionInfo().sampled}},{key:"checkSession",value:function(e){var t=this.sessionConfig,n=t.overtime,r=t.maxDuration,o=(0,d.getCurrentTime)();return!(e.startTime+r<o||e.lastTime+n<o)}},{key:"updateSession",value:function(){var e=this.getSessionInfo();if(!e.isNew){var t=e.startTime,n=(0,d.getCurrentTime)(),r=e.sampled?1:0;(0,g.setStorageSync)(w,"".concat(e.sessionId,"-").concat(r,"-").concat(t,"-").concat(n))}}},{key:"getSessionInfo",value:function(){var e,t=o(((0,g.getStorageSync)(w)||"").split("-"),4),n=t[0],r=t[1],i=t[2],u=t[3],a={sessionId:n,sampled:"0"!==r,startTime:parseInt(i||"")||0,lastTime:parseInt(u||"")||0};return this.checkSession(a)||(a=this.resetSession()),a}},{key:"getEventId",value:function(){return(0,h.generateEventId)(this.getSessionId())}},{key:"getViewId",value:function(){return this.getUUID()}},{key:"getUserId",value:function(){var e=(0,g.getStorageSync)(b);return e&&0===e.indexOf("user_")&&(e=""),e||(e="uid_".concat((0,h.generateSpanId)(16,36)),(0,g.setStorageSync)(b,e)),e}},{key:"resetSession",value:function(){var e=this.sessionConfig.sampleRate,t=this.getUUID(),n=(0,d.getCurrentTime)(),r=(0,h.performDraw)(100*e),o="".concat(t,"-").concat(r?1:0,"-").concat(n,"-").concat(n);return(0,g.setStorageSync)(w,o),{sessionId:t,sampled:r,startTime:n,lastTime:n,isNew:!0}}},{key:"getUUID",value:function(){return(0,h.generateGUID)().replace(/-/g,"")}},{key:"fixSessionConfig",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.sampleRate,n=e.maxDuration,r=e.overtime;return(!(0,h.isNumber)(t)||0>t||1<t)&&(t=1),(!(0,h.isNumber)(n)||n<4*h.ONE_HOUR||n>h.ONE_DAY)&&(n=h.ONE_DAY),(!(0,h.isNumber)(r)||r>h.ONE_HOUR||r<10*h.ONE_MINUTE)&&(r=30*h.ONE_MINUTE),{sampleRate:t,maxDuration:n,overtime:r}}},{key:"getBaseEvent",value:function(){return{timestamp:(0,d.getCurrentTime)(),session_id:this.getSessionId(),event_id:this.getEventId(),view:this.ctx?(0,m.getCurView)(this.ctx):void 0,times:1}}}])}();t.RumSession=E}]);
|
|
1
|
+
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function t(){return e.default}:function t(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="./dist/",n(n.s=15)}([function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function e(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Shell=t.Reporter=t.Context=t.Client=void 0;var i=n(6);t.Client=i.default;var u=n(8);t.Context=u.default;var a=n(19);t.Reporter=a.default;var c=n(21);t.Shell=c.default,o(n(7),t),o(n(23),t),o(n(24),t),o(n(25),t),o(n(4),t),o(n(26),t),o(n(10),t),o(n(11),t),o(n(1),t),o(n(27),t),o(n(12),t),o(n(28),t),o(n(9),t)},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return r(e)===t}Object.defineProperty(t,"__esModule",{value:!0}),t.isZero=t.isObject=t.isNull=t.isNumber=t.isBoolean=t.isRegExp=t.isArray=t.isToString=t.isString=t.isFunction=t.isTypeof=void 0,t.isTypeof=o;var i=function e(t){return"function"==typeof t};function u(e,t){return Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function a(){for(var e=0;e<arguments.length;e++)if(0!==(e<0||arguments.length<=e?void 0:arguments[e]))return!1;return!0}t.isFunction=i,t.isString=function(e){return o(e,"string")},t.isToString=u,t.isArray=function(e){return u(e,"Array")},t.isRegExp=function(e){return u(e,"RegExp")},t.isBoolean=function(e){return o(e,"boolean")},t.isNumber=function(e){return o(e,"number")&&!isNaN(e)||o(e,"bigint")},t.isNull=function(e){return null===e},t.isObject=function(e){return!(0,t.isNull)(e)&&o(e,"object")},t.isZero=a},function(e,t,n){"use strict";function r(e,n){return e?e[t.PAGE_ID]?e[t.PAGE_ID]:n?e[t.PAGE_ID]=n.getViewId():void 0:void 0}function o(e,t){return e&&t?t.getViews().find((function(t){return t.id===e})):void 0}function i(e){if(e){var t=e.getViews();if(t&&t.length)return t[t.length-1]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getCurView=t.getViewById=t.getRumViewId=t.PAGE_ID=void 0,t.PAGE_ID="__rum_view_id",t.getRumViewId=r,t.getViewById=o,t.getCurView=i},function(e,t,n){"use strict";(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function e(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,u=Object.create(o.prototype),a=new y(r||[]);return w(u,"_invoke",{value:f(e,n,a)}),u}function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function u(){}function a(){}function c(t){["next","throw","return"].forEach((function(n){e(t,n,(function(e){return this._invoke(n,e)}))}))}function s(e,t){function o(i,u,a,c){var s=n(e[i],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==r(l)&&b.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;w(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function f(e,t,r){var o="suspendedStart";return function(i,u){if("executing"===o)throw Error("Generator is already running");if("completed"===o){if("throw"===i)throw u;return{value:d,done:!0}}for(r.method=i,r.arg=u;;){var a=r.delegate;if(a){var c=l(a,r);if(c){if(c===j)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=n(e,t,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===j)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}function l(e,t){var r=t.method,o=e.iterator[r];if(o===d)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=d,l(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),j;var i=n(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,j;var u=i.arg;return u?u.done?(t[e.resultName]=u.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d),t.delegate=null,j):u:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,j)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e||""===e){var t=e[O];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=d,t.done=!0,t};return o.next=o}}throw new TypeError(r(e)+" is not iterable")}o=function(){return m};var d,m={},g=Object.prototype,b=g.hasOwnProperty,w=Object.defineProperty||function(e,t,n){e[t]=n.value},E="function"==typeof Symbol?Symbol:{},O=E.iterator||"@@iterator",S=E.asyncIterator||"@@asyncIterator",_=E.toStringTag||"@@toStringTag";try{e({},"")}catch(S){e=function(e,t,n){return e[t]=n}}m.wrap=t;var j={},x={};e(x,O,(function(){return this}));var T=Object.getPrototypeOf,P=T&&T(T(h([])));P&&P!==g&&b.call(P,O)&&(x=P);var k=a.prototype=i.prototype=Object.create(x);return u.prototype=a,w(k,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:u,configurable:!0}),u.displayName=e(a,_,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,_,"GeneratorFunction")),t.prototype=Object.create(k),t},m.awrap=function(e){return{__await:e}},c(s.prototype),e(s.prototype,S,(function(){return this})),m.AsyncIterator=s,m.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var u=new s(t(e,n,r,o),i);return m.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},c(k),e(k,_,"Generator"),e(k,O,(function(){return this})),e(k,"toString",(function(){return"[object Generator]"})),m.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=h,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=d),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var u=b.call(o,"catchLoc"),a=b.call(o,"finallyLoc");if(u&&a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!a)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n,r=this.tryEntries.length-1;0<=r;--r)if((n=this.tryEntries[r]).tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),j},finish:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).finallyLoc===e)return this.complete(t.completion,t.afterLoc),v(t),j},catch:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;v(t)}return o}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=d),j}},m}var i=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function u(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(u,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fixAttrs=t.getNetType=t.getPerformance=t.setStorageSync=t.getStorageSync=t.appName=t.sdk=t.VERSION=t.global2=void 0;var u=n(0);function a(e){return"function"==typeof t.sdk.getStorageSync?t.sdk.getStorageSync(e):void 0}function c(e,n){return"function"==typeof t.sdk.setStorageSync?t.sdk.setStorageSync(e,n):void 0}function s(){return"performance"in t.global2?t.global2.performance:void 0}function f(){return new Promise((function(e){try{t.sdk.getNetworkType({success:function t(n){var r=n.networkType||n.subtype;e(r?r.toLowerCase():void 0)},fail:function t(n){e(void 0)}})}catch(t){e(void 0)}}))}t.global2=e||window,t.VERSION="0.0.1-beta.2",t.sdk=uni,t.appName="uniapp",t.getStorageSync=a,t.setStorageSync=c,t.getPerformance=s,t.getNetType=f;var l=function e(n){return i(this,void 0,void 0,o().mark((function e(){var r,i,a,c,s;return o().wrap((function e(o){for(;;)switch(o.prev=o.next){case 0:if(n){o.next=2;break}return o.abrupt("return");case 2:return o.next=4,f();case 4:return r=o.sent,n.app.type=u.AppType.uniapp,n._v=t.VERSION,n.net=Object.assign({model:r},n.net),i=t.sdk.getDeviceInfo()||{},a=t.sdk.getAppBaseInfo()||{},c={brand:i.brand,model:i.model},s={type:i.platform,version:i.system,container:t.appName,container_version:a.SDKVersion},n.device=Object.assign(Object.assign({},c),n.device),n.os=Object.assign(Object.assign({},s),n.os),o.abrupt("return",n);case 15:case"end":return o.stop()}}),e)})))};t.fixAttrs=l}).call(this,n(14))},function(e,t,n){"use strict";var r,o,i;Object.defineProperty(t,"__esModule",{value:!0}),t.AppType=t.ResourceStatus=t.RumEventType=void 0,function(e){e.VIEW="view",e.RESOURCE="resource",e.EXCEPTION="exception",e.LONG_TASK="longTask",e.ACTION="action",e.CUSTOM="custom",e.APPLICATION="application"}(r=t.RumEventType||(t.RumEventType={})),function(e){e[e.Unknown=-1]="Unknown",e[e.Failed=0]="Failed",e[e.Success=1]="Success"}(o=t.ResourceStatus||(t.ResourceStatus={})),function(e){e.browser="browser",e.miniapp="miniapp",e.minigame="minigame",e.uniapp="uniapp"}(i=t.AppType||(t.AppType={}))},function(e,t,n){"use strict";function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:3;if(!e)return e;var n=e.toString(),r=n.indexOf(".");return n=-1===r?n.substring(0):n.substring(0,t+r+1),parseFloat(n)}function o(){return(new Date).getTime()}Object.defineProperty(t,"__esModule",{value:!0}),t.getCurrentTime=t.formatNumber=void 0,t.formatNumber=r,t.getCurrentTime=o},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function e(){};return{s:o,n:function t(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function e(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function t(){n=n.call(e)},n:function e(){var t=n.next();return a=t.done,t},e:function e(t){c=!0,u=t},f:function e(){try{a||null==n.return||n.return()}finally{if(c)throw u}}}}function i(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function s(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=l(e,"string");return"symbol"==r(t)?t:t+""}function l(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var p=n(7),v=n(18),y=n(8),h=n(1),d=function(){function e(){var t=this;a(this,e),this.emitter=new v.EventEmitter,this.sendEvent=function(e){t.emitter.emit(p.EventType.collect,e)}}return s(e,[{key:"init",value:function e(t,n){var r=this;this.ctx=new y.default(t,n);var i=this.ctx,u=this.collectors,a=this.processors,c=this.reporter;a.forEach((function(e){(0,h.isFunction)(e.setup)&&e.setup(i)})),this.emitter.on(p.EventType.collect,(function(e){i.setRumEvent(e);var t=o(a),n;try{for(t.s();!(n=t.n()).done;){var r=n.value;if(r.match||(r.match=function(){return!0}),r.match(i)){var u=r.process(i);u&&i.setRumEvent(u)}}}catch(e){t.e(e)}finally{t.f()}c.report(i)})),u.forEach((function(e){e.setup(i,r.sendEvent)}))}},{key:"setContext",value:function e(t){this.ctx=t}},{key:"getContext",value:function e(){return this.ctx}},{key:"useCollectors",value:function e(t){this.collectors=t}},{key:"getCollectors",value:function e(){return this.collectors}},{key:"useProcessors",value:function e(t){this.processors=t}},{key:"useReporter",value:function e(t){this.reporter=t}}])}();t.default=d},function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0,function(e){e.collect="collect"}(r=t.EventType||(t.EventType={}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(t,n){o(this,e),this.config=t,this.views=[],n&&(this.session=n,this.session.init(this))}return u(e,[{key:"getConfig",value:function e(){return this.config}},{key:"setConfig",value:function e(t){this.config=t}},{key:"getViews",value:function e(){return this.views}},{key:"addView",value:function e(t){this.views.push(t)}},{key:"removeView",value:function e(t){this.views=this.views.filter((function(e){return e.id!==t}))}},{key:"getRumEvent",value:function e(){return this.rumEvent}},{key:"setRumEvent",value:function e(t){this.rumEvent=t}}])}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyProperties=void 0;var r=n(1);function o(e){if((0,r.isObject)(e)){var t=Object.assign({},e);Object.keys(t).forEach((function(e){var n=t[e];if(e.length>50){var o=e.substring(0,50);t[o]=n,delete t[e],e=o}(0,r.isString)(n)||(0,r.isNumber)(n)?(0,r.isString)(n)&&n.length>2e3&&(t[e]=n.substring(0,2e3)):delete t[e]}));var n=Object.keys(t);if(n.length)return n.length>20&&n.forEach((function(e,n){n>19&&delete t[e]})),t}}t.verifyProperties=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toRegFormat=t.transStrToReg=t.getType=t.delay=t.debounce=t.generateEventId=t.generateSpanId=t.generateTraceId=t.generateGUID=t.restoreFunction=t.interceptFunction=void 0;var r=n(1),o="__",i=/^\[object ([a-z]*)\]$/;function u(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e[t];e["".concat("__").concat(t).concat("__")]=i,e[t]=function(){for(var t=o?this:e,u=arguments.length,a=new Array(u),c=0;c<u;c++)a[c]=arguments[c];if(n.apply(t,a),(0,r.isFunction)(i))return i.apply(t,a)}}function a(e,t){var n="".concat("__").concat(t).concat("__");"function"==typeof e[n]&&(e[t]=e[n],delete e[n])}function c(){var e="";try{if(crypto&&crypto.randomUUID)e=crypto.randomUUID();else if(crypto&&crypto.getRandomValues){var t=new Uint8Array(16);crypto.getRandomValues(t),t[6]=15&t[6]|64,t[8]=63&t[8]|128,e=t.reduce((function(e,t){return e+t.toString(16).padStart(2,"0")}),"").replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/,"$1-$2-$3-$4-$5")}}catch(e){}return e||(e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,n;return("x"==e?t:3&t|8).toString(16)}))),e}function s(){var e=c().replace(/-/g,"");return"0"===e[0]&&(e="1"+e.substring(1)),"0"===e[16]&&(e=e.substring(0,16)+"1"+e.substring(17)),e}function f(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,n="",r=0;r<e;r++)n+=Math.floor(Math.random()*t).toString(t);return n}function l(e){var t=f();return"00-".concat(e,"-").concat(t)}function p(e,t){var n;if((0,r.isFunction)(e))return function(){var r=this,o=arguments;n&&clearTimeout(n),n=setTimeout((function(){e.apply(r,o)}),t)}}function v(e,t){if((0,r.isFunction)(e)){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return setTimeout.apply(void 0,[e,+t||0].concat(o))}}function y(e){var t=Object.prototype.toString.call(e),n=(t=t.toLowerCase()||"").match(i);return null==n?void 0:n[1]}function h(e){return"string"!==y(e)?e:e.length>2&&"/"===e[0]&&"/"===e[e.length-1]?new RegExp(e.substr(1,e.length-2)):e}function d(e,t){"string"===y(t)&&(t=[t]);for(var n=0,r=t.length;n<r;n++){var o=t[n].split("."),i=o.length-1;if(!e)break;for(var u=e,a=0,c=o.length;a<c;a++){if("[]"===o[a]){if("array"===y(u)){var s=o.splice(a+1);s=s.join(".");for(var f=0,l=u.length;f<l;f++)d(u[f],s)}break}if(i===a&&"string"===y(u[o[a]])){u[o[a]]=h(u[o[a]]);break}if(!(u=u[o[a]]))break}if(u&&"array"===y(u))for(var p=0,v=u.length;p<v;p++)u[p]=h(u[p])}}t.interceptFunction=u,t.restoreFunction=a,t.generateGUID=c,t.generateTraceId=s,t.generateSpanId=f,t.generateEventId=l,t.debounce=p,t.delay=v,t.getType=y,t.transStrToReg=h,t.toRegFormat=d},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<e.length;n+=1){var r=e[n];if(t(r,n))return r}}function o(e,t){return e.slice(0,t.length)===t}function i(e,t){return e.slice(-t.length)===t}function u(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.assign=t.endsWith=t.startsWith=t.find=void 0,t.find=r,t.startsWith=o,t.endsWith=i,t.assign=u},function(e,t,n){"use strict";function r(e){return a(e)||u(e)||i(e)||o()}function o(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}function u(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e){if(Array.isArray(e))return c(e)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.urlMatch=t.matchList=t.isMatchOption=void 0;var s=n(1),f=n(11);function l(e){return(0,s.isString)(e)||(0,s.isFunction)(e)||(0,s.isRegExp)(e)}function p(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3?arguments[3]:void 0;return e.some((function(e){try{if("function"==typeof e)return e(t,r);if(e instanceof RegExp)return e.test(t);if("string"==typeof e)return n?(0,f.startsWith)(t,e):e===t}catch(e){}return!1}))}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];try{(0,s.isArray)(t)||(t=[t]);var n=[/^(https?:)?\/\/.*rum|retcode|log-global|log\.aliyuncs\.com/,/^(https?:)?\/\/.*\.mmstat\.com/,/^(https?:)?\/\/.*hm\.baidu\.com/,/^(https?:)?\/\/.*google-analytics\.com/,/data:(.+?)(;base64)?,(.+)$/].concat(r(t));return p(n,e)}catch(e){return!1}}t.isMatchOption=l,t.matchList=p,t.urlMatch=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeEventListener=t.addEventListener=t.mixin=void 0;var r,o={onLaunch:[],onLoad:[],onShow:[],beforeCreate:[],mounted:[]};function i(e){if(!r){r=e;var t={};Object.keys(o).forEach((function(e){t[e]=function(t){var n=this,r;o[e].forEach((function(e){e(n,t)}))}})),e.mixin(t)}}function u(e,t){e in o||(o[e]=[]),o[e].push(t)}function a(e,t){if(e in o&&t){var n=o[e],r=n.indexOf(t);return n.splice(r,1),!0}return!1}t.mixin=i,t.addEventListener=u,t.removeEventListener=a},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=n(16)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArmsRum=void 0;var r=n(17);Object.defineProperty(t,"ArmsRum",{enumerable:!0,get:function(){return r.ArmsRum}}),t.default=r.default},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}function a(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function f(e,t,n){return t=y(t),l(e,v()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function l(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ArmsRum=void 0;var m=n(0),g=n(29),b=n(30),w=n(31),E=n(34),O=n(35),S=n(36),_=n(3),j=n(37),x=n(13),T=function(e){function t(){var e;return i(this,t),(e=f(this,t,arguments)).version=_.VERSION,e}return h(t,e),a(t,[{key:"init",value:function(e){e.vue&&this.setVue(e.vue),this.client.useCollectors([new g.default,new b.default,new w.default]),this.client.useProcessors([new E.default,new O.default]),this.client.useReporter(new S.default),this.client.init(e,new j.RumSession)}},{key:"setConfig",value:function(){var e=this.client.getContext();if(2===arguments.length){var t=this.client.getContext(),n=t.getConfig();t.setConfig(Object.assign(Object.assign({},n),o({},0>=arguments.length?void 0:arguments[0],1>=arguments.length?void 0:arguments[1])))}else e.setConfig(0>=arguments.length?void 0:arguments[0])}},{key:"getLocalConfig",value:function(){}},{key:"getRemoteConfig",value:function(){}},{key:"storeRemoteConfig",value:function(){return!1}},{key:"setVue",value:function(e){this.setConfig("vue",e),(0,x.mixin)(e)}}])}(m.Shell);t.ArmsRum=T,t.default=new T},function(e,t,n){"use strict";var r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function e(t,n,r){return Function.prototype.apply.call(t,n,r)},i;function u(e){console&&console.warn&&console.warn(e)}i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function e(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function e(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function e(t){return t!=t};function c(){c.init.call(this)}e.exports=c,e.exports.once=w,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._eventsCount=0,c.prototype._maxListeners=void 0;var s=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?c.defaultMaxListeners:e._maxListeners}function p(e,t,n,r){var o,i,a;if(f(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=l(e))>0&&a.length>o&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,u(c)}return e}function v(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=v.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?b(o):m(o,o.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function b(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function w(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}O(e,t,i,{once:!0}),"error"!==t&&E(e,o,{once:!0})}))}function E(e,t,n){"function"==typeof e.on&&O(e,"error",t,n)}function O(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(c,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),c.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},c.prototype.setMaxListeners=function e(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},c.prototype.getMaxListeners=function e(){return l(this)},c.prototype.emit=function e(t){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i="error"===t,u=this._events;if(void 0!==u)i=i&&void 0===u.error;else if(!i)return!1;if(i){var a;if(n.length>0&&(a=n[0]),a instanceof Error)throw a;var c=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw c.context=a,c}var s=u[t];if(void 0===s)return!1;if("function"==typeof s)o(s,this,n);else for(var f=s.length,l=m(s,f),r=0;r<f;++r)o(l[r],this,n);return!0},c.prototype.addListener=function e(t,n){return p(this,t,n,!1)},c.prototype.on=c.prototype.addListener,c.prototype.prependListener=function e(t,n){return p(this,t,n,!0)},c.prototype.once=function e(t,n){return f(n),this.on(t,y(this,t,n)),this},c.prototype.prependOnceListener=function e(t,n){return f(n),this.prependListener(t,y(this,t,n)),this},c.prototype.removeListener=function e(t,n){var r,o,i,u,a;if(f(n),void 0===(o=this._events))return this;if(void 0===(r=o[t]))return this;if(r===n||r.listener===n)0==--this._eventsCount?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,r.listener||n));else if("function"!=typeof r){for(i=-1,u=r.length-1;u>=0;u--)if(r[u]===n||r[u].listener===n){a=r[u].listener,i=u;break}if(i<0)return this;0===i?r.shift():g(r,i),1===r.length&&(o[t]=r[0]),void 0!==o.removeListener&&this.emit("removeListener",t,a||n)}return this},c.prototype.off=c.prototype.removeListener,c.prototype.removeAllListeners=function e(t){var n,r,o;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i=Object.keys(r),u;for(o=0;o<i.length;++o)"removeListener"!==(u=i[o])&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(n=r[t]))this.removeListener(t,n);else if(void 0!==n)for(o=n.length-1;o>=0;o--)this.removeListener(t,n[o]);return this},c.prototype.listeners=function e(t){return h(this,t,!0)},c.prototype.rawListeners=function e(t){return h(this,t,!1)},c.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},c.prototype.listenerCount=d,c.prototype.eventNames=function e(){return this._eventsCount>0?i(this._events):[]}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),f=n(20),l=n(1),p=n(9),v=3e3,y=20,h=["app","user","device","os","geo","isp","net","properties"],d=function(){function e(){o(this,e),this.name="reporter",this.eventQueue=[]}return u(e,[{key:"getReportCfg",value:function e(){var t=this.ctx.getConfig().reportConfig;return(0,l.isObject)(t)||(t={}),(!t.flushTime||t.flushTime<0||t.flushTime>1e4)&&(t.flushTime=3e3),(!t.maxEventCount||t.maxEventCount<1||t.maxEventCount>100)&&(t.maxEventCount=20),t}},{key:"report",value:function e(t){var n=this;this.ctx=t,this.init(t),clearTimeout(this.timer),this.pushToQueue();var r=this.getReportCfg();this.eventQueue.length>=r.maxEventCount?this.flushEventQueue():this.timer=setTimeout((function(){n.flushEventQueue()}),r.flushTime)}},{key:"pushToQueue",value:function e(){var t=this.ctx,n=this.eventQueue,r=t.getRumEvent();if(r.event_type===s.RumEventType.EXCEPTION){var o=r.message,i=r.stack,u=(0,f.getErrorID)({message:o,stack:i}),a=this.eventQueue.find((function(e){if(e.event_type===s.RumEventType.EXCEPTION){var t=e.message,n=e.stack;return(0,f.getErrorID)({message:t,stack:n})===u}}));if(a)return void a.times++}if(r.event_type===s.RumEventType.ACTION){var c=r.target_name,l=this.eventQueue.find((function(e){if(e.event_type===s.RumEventType.ACTION)return c===e.target_name}));if(l)return void l.times++}n.push(r)}},{key:"flushEventQueue",value:function e(){var t=this.ctx,n=this.eventQueue;if(n.length){var r=t.getViews(),o=r[r.length-1];r.forEach((function(e){var t;e.id===o.id&&n.filter((function(t){var n;return(null===(n=t.view)||void 0===n?void 0:n.id)===e.id})).forEach((function(e){delete e.view}))}));var i=t.session,u;(!i||i.getSampled())&&this.mergeEvent(t,n,o),this.eventQueue=[]}}},{key:"mergeEvent",value:function e(t,n,r){for(var o=t.getConfig(),i=t.session,u=i.getSessionId(),a=0;a<n.length;a++){var c=n[a];c.session_id===u?delete c.session_id:(n.splice(a,1),a--)}if(0!==n.length){var s={app:{id:o.pid,env:o.env||"prod",version:o.version,type:""},user:{id:i.getUserId()},session:{id:u},net:{},view:r,events:n};h.forEach((function(e){var t=o[e];(0,l.isObject)(t)&&Object.keys(t).forEach((function(n){var r=t[n];"user"===e&&"id"===n||("properties"===e?s[e]=(0,p.verifyProperties)(t):((0,l.isString)(r)||(0,l.isNumber)(r))&&(e in s||(s[e]={}),s[e][n]=r))}))})),("function"!=typeof o.beforeReport||(s=o.beforeReport(s)))&&this.request(t,s)}}},{key:"init",value:function e(t){}}])}();t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorID=void 0;var r=function e(t){var n=t.message,r=void 0===n?"":n,o=t.stack,i;return r+(void 0===o?"":o)};t.getErrorID=r},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,a(r.key),r)}}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(4),f=n(6),l=n(1),p=n(22),v=function(){function e(t){o(this,e),this.client=new f.default,t&&this.init&&this.init(t)}return u(e,[{key:"getCombinedConfig",value:function e(t){var n;if((0,p.isRemoteConfigEnable)(t)&&(0,l.isFunction)(this.getLocalConfig)){var r=this.getLocalConfig(0,t.pid);n=(0,p.default)(t,r)}return n||t}},{key:"updateFromRemoteConfig",value:function e(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.pid&&(0,p.isRemoteConfigEnable)(t)&&(0,l.isFunction)(this.getRemoteConfig)){var r=this,o=this.getRemoteConfig((0,p.getRemoteConfigUrl)(t),t);null==o||o.then((function(e){if(e&&void 0===e.errorStatus){var o=(0,p.default)(t,e);if(o&&((0,l.isFunction)(r.storeRemoteConfig)&&r.storeRemoteConfig(e,t.pid),!1!==n&&!1!==t.remoteConfig.reSetup)){var i=r.client.getContext(),u;i.setConfig(o),r.client.getCollectors().forEach((function(e){(0,l.isFunction)(e.destroy)&&(e.destroy(),e.setup(i,r.client.sendEvent))}))}}}))}}},{key:"sendEvent",value:function e(t){this.client&&this.client.sendEvent(t)}},{key:"getConfig",value:function e(){if(this.client)return this.client.getContext().getConfig()}},{key:"sendCustom",value:function e(t){if(t.name&&t.type){var n=Object.assign(Object.assign({},t),{event_type:s.RumEventType.CUSTOM});this.sendEvent(n)}}},{key:"sendView",value:function e(t){if((0,l.isObject)(t)){if(t.type||(t.type="custom"),"custom"===t.type){var n=0;if(["t1","t2","t3"].forEach((function(e){(0,l.isNumber)(t[e])||delete t[e],e in t&&n++})),0===n)return}var r=Object.assign(Object.assign({},t),{event_type:s.RumEventType.VIEW});this.sendEvent(r)}}},{key:"sendException",value:function e(t){if(t.name&&t.message){var n=t.name,r=t.message,o=t.stack,i=Object.assign(Object.assign({times:1,name:n,message:r,stack:o},t),{event_type:s.RumEventType.EXCEPTION,type:"custom",source:"custom"});this.sendEvent(i)}}},{key:"sendResource",value:function e(t){if(t.name&&t.type&&(0,l.isNumber)(t.duration)){var n=Object.assign(Object.assign({times:1},t),{event_type:s.RumEventType.RESOURCE});this.sendEvent(n)}}}])}();t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRemoteConfigUrl=t.isRemoteConfigEnable=void 0;var r=n(10),o=["filters.exception","filters.resource","tracing.allowedUrls.[].match"];function i(e){return!0===e.remoteConfig||e.remoteConfig&&!1!==e.remoteConfig.enable}function u(e){if(e.remoteConfig&&e.remoteConfig.url)return e.remoteConfig.url;var t=e.pid.split("@");if(t&&!(t.length<2)){var n=Date.now();return"//".concat(t[0],"-sdk.rum.aliyuncs.com/config/").concat(e.remoteConfig.region||"cn-hangzhou","/").concat(t[1],"?t=").concat(n)}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)if("pid"!==n&&"endpoint"!==n&&void 0!==(null==t?void 0:t[n])){var o=e[n],i=null==t?void 0:t[n];"object"===(0,r.getType)(o)&&"object"===(0,r.getType)(i)?a(o,i):e[n]=i}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)if(void 0===(null==e?void 0:e[n]))e[n]=t[n];else{var o=e[n],i=t[n];"object"===(0,r.getType)(o)&&"object"===(0,r.getType)(i)&&c(o,i)}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;if("object"!==(0,r.getType)(e)||"object"!==(0,r.getType)(t))return null;var n=Object.assign({},e);return(0,r.toRegFormat)(t,o),a(n,t),c(n,t),n}t.isRemoteConfigEnable=i,t.getRemoteConfigUrl=u,t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){"use strict";function r(e){return 0!==e&&100*Math.random()<=e}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e)return e;var r=e.toString(),o=r.indexOf(".");r=-1!==o?r.substring(0,t+o+1):r.substring(0);var i=parseFloat(r);return i>=n?i:void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNumber=t.performDraw=t.ONE_DAY=t.ONE_HOUR=t.ONE_MINUTE=t.ONE_SECOND=void 0,t.ONE_SECOND=1e3,t.ONE_MINUTE=60*t.ONE_SECOND,t.ONE_HOUR=60*t.ONE_MINUTE,t.ONE_DAY=24*t.ONE_HOUR,t.performDraw=r,t.formatNumber=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseTracingOptions=t.makeTracingHeaders=t.isTraceOption=void 0;var r=n(12),o=n(1);function i(e){return e&&(0,r.isMatchOption)(e.match)&&(0,o.isArray)(e.propagatorTypes)}function u(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},u={},a=n?"1":"0";return r.includes("sw8")&&(r=["sw8"]),(0,o.isArray)(r)||(r=[r]),r.forEach((function(n){switch(n){case"jaeger":u["uber-trace-id"]="".concat(e,":").concat(t,":0:").concat(a);break;case"b3":u.b3="".concat(e,"-").concat(t,"-").concat(a);break;case"b3multi":u["X-B3-TraceId"]=e,u["X-B3-SpanId"]=t,u["X-B3-Sampled"]=a;break;case"sw8":if((0,o.isFunction)(btoa)){var r=btoa(e),c=btoa(t),s=btoa(i.appId),f=btoa(i.appVersion),l=btoa(i.viewName),p=btoa(i.host);u.sw8="".concat(a,"-").concat(r,"-").concat(c,"-",0,"-").concat(s,"-").concat(f,"-").concat(l,"-").concat(p)}break;case"tracecontext":default:u.traceparent="00-".concat(e,"-").concat(t,"-0").concat(a),i.tracestate&&(u.tracestate=i.tracestate)}})),i.baggage&&(u.baggage=i.baggage),u}function a(e){var t=["tracecontext"];if((0,o.isBoolean)(e)||!e)return{enable:!!e,sample:100,propagatorTypes:t,allowedUrls:[],tracestate:!0,baggage:!1};var n=e.enable,u=void 0===n||n,a=e.sample,c=void 0===a?100:a,s=e.propagatorTypes,f=void 0===s?t:s,l=e.allowedUrls,p=void 0===l?[]:l,v=e.tracestate,y=void 0===v||v,h=e.baggage,d=void 0!==h&&h,m=[];return(0,o.isArray)(p)&&p.length&&p.forEach((function(e){(0,r.isMatchOption)(e)?m.push({match:e,propagatorTypes:f}):i(e)&&m.push(e)})),{enable:!(0,o.isBoolean)(u)||u,sample:(0,o.isNumber)(c)?c:100,propagatorTypes:f,allowedUrls:m,tracestate:y,baggage:d}}t.isTraceOption=i,t.makeTracingHeaders=u,t.parseTracingOptions=a},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),f=n(2),l=n(13),p=function(){function e(){var t=this;o(this,e),this.name="pv-collector",this.onLaunch=function(e,n){if(e&&n&&"app"===e.$mpType){var r=(0,f.getRumViewId)(e,t.ctx.session);t.sendPv({id:r,route:n.path})}},this.onBeforeCreate=function(e){if("page"===e.$mpType&&e.route){var n=(0,f.getRumViewId)(e,t.ctx.session);t.sendPv({id:n,route:e.route})}},this.onUnload=function(){var e=(0,f.getCurView)(t.ctx);t.ctx.removeView(e.id)},this.sendPv=function(e){t.prevPage&&e.id===t.prevPage.id||(e.name=t.getViewName(e.route),t.prevPage=e,t.ctx.addView(e),t.sendEvent(Object.assign({event_type:s.RumEventType.VIEW,type:"pv",loading_type:"initial_load"},e)))}}return u(e,[{key:"setup",value:function(e,t){this.ctx=e,this.sendEvent=t,(0,l.addEventListener)("onLaunch",this.onLaunch),(0,l.addEventListener)("beforeCreate",this.onBeforeCreate),(0,l.addEventListener)("onUnload",this.onUnload)}},{key:"getViewName",value:function(e){var t,n=this.ctx.getConfig().parseViewName,r=e;return(0,s.isFunction)(n)&&(r=n(e)),r}},{key:"destroy",value:function(){(0,l.removeEventListener)("onLaunch",this.onLaunch),(0,l.removeEventListener)("beforeCreate",this.onBeforeCreate)}}])}();t.default=p},function(e,t,n){"use strict";(function(e){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),f=n(2),l=function(){function t(){var e=this;o(this,t),this.name="exception-collector",this.uniError=function(t){e.errorHandle(t,"uni.onError")},this.onError=function(t){e.errorHandle(t,"onError")},this.onUnhandledRejection=function(t){if(t){var n=t.reason;if(n){var r=n.errMsg;if(r&&(0,s.isString)(r)){(n=new Error(r)).name="",n.stack="";for(var o,i,u=0,a=["navigateTo","redirectTo","appLaunch","switchTab","getLocation","onLocationChange"];u<a.length;u++)if(o=a[u],r.startsWith(o)){n.name=o;break}n.name||(n.name=r.split(":")[0])}e.errorHandle(n,"onUnhandledRejection")}}},this.errorHandle=function(t){var n,r,o,i,u,a,c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",l=(0,f.getCurView)(e.ctx);if(t instanceof Object){if(n=t.name,r=t.message,o=t.filename||t.fileName,i=t.stack,u=t.lineno||t.lineNumber,a=t.colno||t.columnNumber,t.error instanceof Error){var p=t.error;n=p.name,r=p.message,i=p.stack}}else if("string"==typeof t){i=t;var v=e.getErrorByStack(t);v&&(n=v.name,r=v.message)}n&&r&&e.sendEvent({event_type:s.RumEventType.EXCEPTION,source:c,type:"error",name:n,message:r,file:o,stack:i,line:u,column:a,times:1,view:l})}}return u(t,[{key:"setup",value:function(e,t){this.ctx=e,this.sendEvent=t,this.hackOrigin()}},{key:"hackOrigin",value:function(){var t=this,n,r=this.ctx.getConfig().collectors,o=void 0===r?{}:r;if(!1!==o.jsError)try{uni.onError(this.uniError),e.addEventListener("error",this.onError),e.addEventListener("unhandledrejection",this.onUnhandledRejection)}catch(t){console.error(t)}!1!==o.consoleError&&(0,s.interceptFunction)(console,"error",(function(e){t.errorHandle(e,"console.error")}))}},{key:"getErrorByStack",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t=e.split("\n");if(!(2>t.length))for(var n=1;n<t.length;n++)if(t[n].trim().startsWith("at ")){var r=t[n-1],o=r.indexOf(": ");return{name:r.substring(0,o),message:r.substring(o+2)}}}},{key:"destroy",value:function(){(0,s.restoreFunction)(e.console,"error")}}])}();t.default=l}).call(this,n(14))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */function e(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}function t(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,u=Object.create(o.prototype),a=new y(r||[]);return w(u,"_invoke",{value:f(e,n,a)}),u}function n(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function u(){}function a(){}function c(t){["next","throw","return"].forEach((function(n){e(t,n,(function(e){return this._invoke(n,e)}))}))}function s(e,t){function o(i,u,a,c){var s=n(e[i],e,u);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==r(l)&&b.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){f.value=e,a(f)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;w(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function f(e,t,r){var o="suspendedStart";return function(i,u){if("executing"===o)throw Error("Generator is already running");if("completed"===o){if("throw"===i)throw u;return{value:d,done:!0}}for(r.method=i,r.arg=u;;){var a=r.delegate;if(a){var c=l(a,r);if(c){if(c===j)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=n(e,t,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===j)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}function l(e,t){var r=t.method,o=e.iterator[r];if(o===d)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=d,l(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),j;var i=n(o,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,j;var u=i.arg;return u?u.done?(t[e.resultName]=u.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d),t.delegate=null,j):u:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,j)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function h(e){if(e||""===e){var t=e[O];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(b.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=d,t.done=!0,t};return o.next=o}}throw new TypeError(r(e)+" is not iterable")}o=function(){return m};var d,m={},g=Object.prototype,b=g.hasOwnProperty,w=Object.defineProperty||function(e,t,n){e[t]=n.value},E="function"==typeof Symbol?Symbol:{},O=E.iterator||"@@iterator",S=E.asyncIterator||"@@asyncIterator",_=E.toStringTag||"@@toStringTag";try{e({},"")}catch(S){e=function(e,t,n){return e[t]=n}}m.wrap=t;var j={},x={};e(x,O,(function(){return this}));var T=Object.getPrototypeOf,P=T&&T(T(h([])));P&&P!==g&&b.call(P,O)&&(x=P);var k=a.prototype=i.prototype=Object.create(x);return u.prototype=a,w(k,"constructor",{value:a,configurable:!0}),w(a,"constructor",{value:u,configurable:!0}),u.displayName=e(a,_,"GeneratorFunction"),m.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},m.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,e(t,_,"GeneratorFunction")),t.prototype=Object.create(k),t},m.awrap=function(e){return{__await:e}},c(s.prototype),e(s.prototype,S,(function(){return this})),m.AsyncIterator=s,m.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var u=new s(t(e,n,r,o),i);return m.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},c(k),e(k,_,"Generator"),e(k,O,(function(){return this})),e(k,"toString",(function(){return"[object Generator]"})),m.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},m.values=h,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=d,this.done=!1,this.delegate=null,this.method="next",this.arg=d,this.tryEntries.forEach(v),!e)for(var t in this)"t"===t.charAt(0)&&b.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=d)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,r&&(n.method="next",n.arg=d),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;0<=r;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var u=b.call(o,"catchLoc"),a=b.call(o,"finallyLoc");if(u&&a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!a)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n,r=this.tryEntries.length-1;0<=r;--r)if((n=this.tryEntries[r]).tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),j},finish:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).finallyLoc===e)return this.complete(t.completion,t.afterLoc),v(t),j},catch:function(e){for(var t,n=this.tryEntries.length-1;0<=n;--n)if((t=this.tryEntries[n]).tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;v(t)}return o}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:h(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=d),j}},m}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}function a(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=s(e,"string");return"symbol"==r(t)?t:t+""}function s(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var f=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function u(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?n(e.value):o(e.value).then(u,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});var l=n(0),p=n(3),v=n(32),y=n(5),h=n(2),d=n(33),m=function(){function e(){var t=this;i(this,e),this.name="api-collector",this.sendApi=function(e,n,r){return f(t,void 0,void 0,o().mark((function t(){var i,u,a,c,s,f,p,v,h,m,g;return o().wrap((function t(o){for(;;)switch(o.prev=o.next){case 0:if(i=this.ctx.getConfig(),u=i.evaluateApi,a=n.statusCode,c=n.status,s=n.errMsg,f=n.errorMessage,p=n.message,v=n.profile,!(0,l.isFunction)(u)){o.next=13;break}return o.prev=3,0===e.success&&(h=new Error("request error")),o.next=7,u(r,n,h);case 7:m=o.sent,e=Object.assign(Object.assign({},e),(0,d.reviseApiAttr)(m)),o.next=13;break;case 11:o.prev=11,o.t0=o.catch(3);case 13:if(!((g=Object.assign({event_type:l.RumEventType.RESOURCE,type:"api",status_code:c||a,message:f||s||p,duration:(0,y.getCurrentTime)()-e.timestamp,times:1},e)).duration>l.ONE_DAY)){o.next=16;break}return o.abrupt("return");case 16:this.sendEvent(g);case 17:case"end":return o.stop()}}),t,this,[[3,11]])})))}}return a(e,[{key:"setup",value:function e(t,n){var r,o=t.getConfig().collectors,i;!1===(void 0===o?{}:o).api||(this.ctx=t,this.sendEvent=n,this.interceptorRequest())}},{key:"interceptorRequest",value:function e(){if((0,l.isFunction)(p.sdk.addInterceptor)){var t=this;p.sdk.addInterceptor("request",{invoke:function e(n){t.rebuildRequestOptions(n)}})}}},{key:"injectTracing",value:function e(t,n){var r,o=this.ctx.getConfig(),i=o.tracing,u=o.pid,a=o.version,c=void 0===a?"1.0.0":a,s=(0,l.parseTracingOptions)(i),f=s.enable,v=s.sample,y=s.propagatorTypes,h=s.allowedUrls,d=s.tracestate,m=!(void 0!==d)||d,g=s.baggage,b=void 0!==g&&g;if(f){var w=(0,l.find)(h,(function(e){return(0,l.matchList)([e.match],t.url)}));if(w){var E=w.propagatorTypes;0===E.length&&(E=y);var O=!1;E.includes("sw8")&&(E=["sw8"],O=!0);var S=O?(0,l.generateGUID)():(0,l.generateTraceId)(),_=O?(0,l.generateGUID)():(0,l.generateSpanId)(),j=(0,l.performDraw)(v),x=this.ctx.session.getUserId(),T=this.ctx.session.getSessionId(),P=m?"rum=v2&uniapp&".concat(u,"&").concat(T,"&").concat(x):void 0,k=b?"rum=v2,appType=uniapp,pid=".concat(u,",sid=").concat(T,",uid=").concat(x):void 0,C=(0,l.makeTracingHeaders)(S,_,j,E,{tracestate:P,baggage:k,appId:u,appVersion:c,viewName:null===(r=t.view)||void 0===r?void 0:r.name,host:p.appName});j&&(t.trace_id=S,t.trace_data=JSON.stringify({spanId:_,sample:v,sampled:j,header:C})),n(C)}}}},{key:"rebuildRequestOptions",value:function e(t){var n=this,r=t.url,o=t.success,i=t.fail,u=t.header,a=(0,y.getCurrentTime)();if((0,v.isEndpoint)(this.ctx,r)||(0,l.urlMatch)(r))return t;var c={view:(0,h.getCurView)(this.ctx),timestamp:a,url:r,name:this.getResourceName(r),method:t.method||"GET"};return this.injectTracing(c,(function(e){t.header=Object.assign(Object.assign({},u),e)})),t.success=function(){c.success=1;for(var e=arguments.length,r=Array(e),i=0;i<e;i++)r[i]=arguments[i];n.sendApi(c,r[0],t),o&&o.apply(this,r)},t.fail=function(){c.success=0;for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];n.sendApi(c,r[0],t),i&&i.apply(this,r)},t}},{key:"getResourceName",value:function e(t){var n,r,o=this.ctx.getConfig().parseResourceName;return n=(0,l.isFunction)(o)?o(t):(0,v.getPathByURL)(t)}}])}();t.default=m},function(e,t,n){"use strict";function r(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];try{var n=u(e);return t?n.hash:n.pathname}catch(e){return""}}function o(e,t){var n,r=e.getConfig().endpoint;try{return u(t).hostname===u(r).hostname}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.getURL=t.isEndpoint=t.getPathByURL=void 0,t.getPathByURL=r,t.isEndpoint=o;var i=/^(?:([^:\/?#]+):\/\/)?((?:([^\/?#@]*)@)?([^\/?#:]*)(?:\:(\d*))?)?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n)*))?/i;function u(e){var t=decodeURIComponent(e).match(i),n,r=(t[3]||"").split(":").length?(t[2]||"").replace(/(.*\@)/,""):t[2];return{uri:t[0],protocol:t[1],host:r,hostname:t[4],port:t[5],pathname:t[6],search:t[7],hash:t[8]}}t.getURL=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reviseApiAttr=void 0;var r=n(0);function o(e){if(e&&(0,r.isObject)(e)){var t={};return(0,r.isString)(e.name)&&(t.name=e.name.substring(0,1e3)),(0,r.isString)(e.message)&&(t.message=e.message.substring(0,1e3)),"success"in e&&(t.success=e.success?1:0),(0,r.isNumber)(e.duration)&&0<=e.duration&&(t.duration=e.duration),(0,r.isString)(e.status_code)&&(t.status_code=e.status_code.substring(0,100)),(0,r.isNumber)(e.status_code)&&(t.status_code=e.status_code),(0,r.isString)(e.snapshots)&&(t.snapshots=e.snapshots.substring(0,5e3)),t}}t.reviseApiAttr=o},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(5),f=n(2),l=function(){function e(){o(this,e),this.name="default-processor"}return u(e,[{key:"process",value:function(e){var t=e.getRumEvent(),n=(0,f.getCurView)(e),r;return Object.assign({timestamp:(0,s.getCurrentTime)(),session_id:e.session.getSessionId(),event_id:e.session.getEventId(),view:n},t)}}])}();t.default=l},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(0),f=function(){function e(){var t=this;o(this,e),this.name="session-processor",this.update=function(e){e&&!e.isTrusted||t.ctx.session.updateSession()}}return u(e,[{key:"setup",value:function(e){this.ctx=e,this.update=(0,s.debounce)(this.update,s.ONE_SECOND)}},{key:"process",value:function(e){return this.update(),e.getRumEvent()}}])}();t.default=f},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}function u(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=c(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function s(e,t,n){return t=v(t),f(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function f(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0});var d=n(0),m=n(3),g=function(e){function t(){var e;return o(this,t),(e=s(this,t,arguments)).name="uni-reporter",e}return y(t,e),u(t,[{key:"init",value:function(){var e=this;m.sdk.onAppHide((function(){e.flushEventQueue()}))}},{key:"request",value:function(e,t){var n=e.getConfig();(0,m.fixAttrs)(t).then((function(e){m.sdk.request({url:n.endpoint,method:"POST",dataType:"text",data:JSON.stringify(e)})})).catch((function(e){console.warn("[arms] sendRequest fail",e)}))}}])}(d.Reporter);t.default=g},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return s(e)||c(e,t)||u(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,u,a=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(c){s=!0,o=c}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(s)throw o}}return a}}function s(e){if(Array.isArray(e))return e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}function p(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e){var t=y(e,"string");return"symbol"==r(t)?t:t+""}function y(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RumSession=void 0;var h=n(0),d=n(5),m=n(2),g=n(3),b="_arms_uid",w="_arms_session",E=function(){function e(){f(this,e)}return p(e,[{key:"init",value:function(e){var t;this.ctx=e,this.sessionConfig=this.fixSessionConfig(null===(t=e.config)||void 0===t?void 0:t.sessionConfig)}},{key:"getSessionId",value:function(){return this.getSessionInfo().sessionId}},{key:"getSampled",value:function(){return this.getSessionInfo().sampled}},{key:"checkSession",value:function(e){var t=this.sessionConfig,n=t.overtime,r=t.maxDuration,o=(0,d.getCurrentTime)();return!(e.startTime+r<o||e.lastTime+n<o)}},{key:"updateSession",value:function(){var e=this.getSessionInfo();if(!e.isNew){var t=e.startTime,n=(0,d.getCurrentTime)(),r=e.sampled?1:0;(0,g.setStorageSync)(w,"".concat(e.sessionId,"-").concat(r,"-").concat(t,"-").concat(n))}}},{key:"getSessionInfo",value:function(){var e,t=o(((0,g.getStorageSync)(w)||"").split("-"),4),n=t[0],r=t[1],i=t[2],u=t[3],a={sessionId:n,sampled:"0"!==r,startTime:parseInt(i||"")||0,lastTime:parseInt(u||"")||0};return this.checkSession(a)||(a=this.resetSession()),a}},{key:"getEventId",value:function(){return(0,h.generateEventId)(this.getSessionId())}},{key:"getViewId",value:function(){return this.getUUID()}},{key:"getUserId",value:function(){var e=(0,g.getStorageSync)(b);return e&&0===e.indexOf("user_")&&(e=""),e||(e="uid_".concat((0,h.generateSpanId)(16,36)),(0,g.setStorageSync)(b,e)),e}},{key:"resetSession",value:function(){var e=this.sessionConfig.sampleRate,t=this.getUUID(),n=(0,d.getCurrentTime)(),r=(0,h.performDraw)(100*e),o="".concat(t,"-").concat(r?1:0,"-").concat(n,"-").concat(n);return(0,g.setStorageSync)(w,o),{sessionId:t,sampled:r,startTime:n,lastTime:n,isNew:!0}}},{key:"getUUID",value:function(){return(0,h.generateGUID)().replace(/-/g,"")}},{key:"fixSessionConfig",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.sampleRate,n=e.maxDuration,r=e.overtime;return(!(0,h.isNumber)(t)||0>t||1<t)&&(t=1),(!(0,h.isNumber)(n)||n<4*h.ONE_HOUR||n>h.ONE_DAY)&&(n=h.ONE_DAY),(!(0,h.isNumber)(r)||r>h.ONE_HOUR||r<10*h.ONE_MINUTE)&&(r=30*h.ONE_MINUTE),{sampleRate:t,maxDuration:n,overtime:r}}},{key:"getBaseEvent",value:function(){return{timestamp:(0,d.getCurrentTime)(),session_id:this.getSessionId(),event_id:this.getEventId(),view:this.ctx?(0,m.getCurView)(this.ctx):void 0,times:1}}}])}();t.RumSession=E}]);
|
|
@@ -12,6 +12,7 @@ export default class PvCollector implements ICollector {
|
|
|
12
12
|
setup(ctx: IContext, sendEvent: (payload: RumEvent) => void): void;
|
|
13
13
|
onLaunch: (that: any, e: any) => void;
|
|
14
14
|
onBeforeCreate: (that: any, e: any) => void;
|
|
15
|
+
onUnload: () => void;
|
|
15
16
|
sendPv: (page: IUniPage) => void;
|
|
16
17
|
private getViewName;
|
|
17
18
|
destroy(): void;
|
package/es/collector/view/pv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import _extends from"@babel/runtime/helpers/extends";import{isFunction,RumEventType}from"@arms/rum-core";import{getRumViewId}from"../../utils/view";import{addEventListener,removeEventListener}from"../../utils/mixin";var PvCollector=/*#__PURE__*/function(){function a(){var a=this;this.name="pv-collector",this.ctx=void 0,this.sendEvent=void 0,this.prevPage=void 0,this.onLaunch=function(b,c){if(b&&c&&"app"===b.$mpType){var d=getRumViewId(b,a.ctx.session);a.sendPv({id:d,route:c.path})}},this.onBeforeCreate=function(b){if("page"===b.$mpType&&b.route){var c=getRumViewId(b,a.ctx.session);a.sendPv({id:c,route:b.route})}},this.sendPv=function(b){a.prevPage&&b.id===a.prevPage.id||(b.name=a.getViewName(b.route),a.prevPage=b,a.ctx.addView(b),a.sendEvent(_extends({event_type:RumEventType.VIEW,type:"pv",loading_type:"initial_load"},b)))}}var b=a.prototype;return b.setup=function(a,b){this.ctx=a,this.sendEvent=b,addEventListener("onLaunch",this.onLaunch),addEventListener("beforeCreate",this.onBeforeCreate)},b.getViewName=function(a){var b=this.ctx.getConfig(),c=b.parseViewName,d=a;return isFunction(c)&&(d=c(a)),d},b.destroy=function(){removeEventListener("onLaunch",this.onLaunch),removeEventListener("beforeCreate",this.onBeforeCreate)},a}();export{PvCollector as default};
|
|
1
|
+
import _extends from"@babel/runtime/helpers/extends";import{isFunction,RumEventType}from"@arms/rum-core";import{getRumViewId,getCurView}from"../../utils/view";import{addEventListener,removeEventListener}from"../../utils/mixin";var PvCollector=/*#__PURE__*/function(){function a(){var a=this;this.name="pv-collector",this.ctx=void 0,this.sendEvent=void 0,this.prevPage=void 0,this.onLaunch=function(b,c){if(b&&c&&"app"===b.$mpType){var d=getRumViewId(b,a.ctx.session);a.sendPv({id:d,route:c.path})}},this.onBeforeCreate=function(b){if("page"===b.$mpType&&b.route){var c=getRumViewId(b,a.ctx.session);a.sendPv({id:c,route:b.route})}},this.onUnload=function(){var b=getCurView(a.ctx);a.ctx.removeView(b.id)},this.sendPv=function(b){a.prevPage&&b.id===a.prevPage.id||(b.name=a.getViewName(b.route),a.prevPage=b,a.ctx.addView(b),a.sendEvent(_extends({event_type:RumEventType.VIEW,type:"pv",loading_type:"initial_load"},b)))}}var b=a.prototype;return b.setup=function(a,b){this.ctx=a,this.sendEvent=b,addEventListener("onLaunch",this.onLaunch),addEventListener("beforeCreate",this.onBeforeCreate),addEventListener("onUnload",this.onUnload)},b.getViewName=function(a){var b=this.ctx.getConfig(),c=b.parseViewName,d=a;return isFunction(c)&&(d=c(a)),d},b.destroy=function(){removeEventListener("onLaunch",this.onLaunch),removeEventListener("beforeCreate",this.onBeforeCreate)},a}();export{PvCollector as default};
|
package/es/utils/platform.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _extends from"@babel/runtime/helpers/extends";import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _regeneratorRuntime from"@babel/runtime/regenerator";import{AppType}from"@arms/rum-core";export var global2=global||window;export var VERSION='npm-0.0.1-beta.
|
|
1
|
+
import _extends from"@babel/runtime/helpers/extends";import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _regeneratorRuntime from"@babel/runtime/regenerator";import{AppType}from"@arms/rum-core";export var global2=global||window;export var VERSION='npm-0.0.1-beta.2';export var sdk=uni;export var appName="uniapp";// export {
|
|
2
2
|
// // sdk: global.uni,
|
|
3
3
|
// appName: 'uniapp',
|
|
4
4
|
// }
|
|
@@ -12,6 +12,7 @@ export default class PvCollector implements ICollector {
|
|
|
12
12
|
setup(ctx: IContext, sendEvent: (payload: RumEvent) => void): void;
|
|
13
13
|
onLaunch: (that: any, e: any) => void;
|
|
14
14
|
onBeforeCreate: (that: any, e: any) => void;
|
|
15
|
+
onUnload: () => void;
|
|
15
16
|
sendPv: (page: IUniPage) => void;
|
|
16
17
|
private getViewName;
|
|
17
18
|
destroy(): void;
|
package/lib/collector/view/pv.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_rumCore=require("@arms/rum-core"),_view=require("../../utils/view"),_mixin=require("../../utils/mixin"),PvCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="pv-collector",this.ctx=void 0,this.sendEvent=void 0,this.prevPage=void 0,this.onLaunch=function(b,c){if(b&&c&&"app"===b.$mpType){var d=(0,_view.getRumViewId)(b,a.ctx.session);a.sendPv({id:d,route:c.path})}},this.onBeforeCreate=function(b){if("page"===b.$mpType&&b.route){var c=(0,_view.getRumViewId)(b,a.ctx.session);a.sendPv({id:c,route:b.route})}},this.sendPv=function(b){a.prevPage&&b.id===a.prevPage.id||(b.name=a.getViewName(b.route),a.prevPage=b,a.ctx.addView(b),a.sendEvent((0,_extends2["default"])({event_type:_rumCore.RumEventType.VIEW,type:"pv",loading_type:"initial_load"},b)))}}var b=a.prototype;return b.setup=function(a,b){this.ctx=a,this.sendEvent=b,(0,_mixin.addEventListener)("onLaunch",this.onLaunch),(0,_mixin.addEventListener)("beforeCreate",this.onBeforeCreate)},b.getViewName=function(a){var b=this.ctx.getConfig(),c=b.parseViewName,d=a;return(0,_rumCore.isFunction)(c)&&(d=c(a)),d},b.destroy=function(){(0,_mixin.removeEventListener)("onLaunch",this.onLaunch),(0,_mixin.removeEventListener)("beforeCreate",this.onBeforeCreate)},a}();
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_rumCore=require("@arms/rum-core"),_view=require("../../utils/view"),_mixin=require("../../utils/mixin"),PvCollector=exports["default"]=/*#__PURE__*/function(){function a(){var a=this;this.name="pv-collector",this.ctx=void 0,this.sendEvent=void 0,this.prevPage=void 0,this.onLaunch=function(b,c){if(b&&c&&"app"===b.$mpType){var d=(0,_view.getRumViewId)(b,a.ctx.session);a.sendPv({id:d,route:c.path})}},this.onBeforeCreate=function(b){if("page"===b.$mpType&&b.route){var c=(0,_view.getRumViewId)(b,a.ctx.session);a.sendPv({id:c,route:b.route})}},this.onUnload=function(){var b=(0,_view.getCurView)(a.ctx);a.ctx.removeView(b.id)},this.sendPv=function(b){a.prevPage&&b.id===a.prevPage.id||(b.name=a.getViewName(b.route),a.prevPage=b,a.ctx.addView(b),a.sendEvent((0,_extends2["default"])({event_type:_rumCore.RumEventType.VIEW,type:"pv",loading_type:"initial_load"},b)))}}var b=a.prototype;return b.setup=function(a,b){this.ctx=a,this.sendEvent=b,(0,_mixin.addEventListener)("onLaunch",this.onLaunch),(0,_mixin.addEventListener)("beforeCreate",this.onBeforeCreate),(0,_mixin.addEventListener)("onUnload",this.onUnload)},b.getViewName=function(a){var b=this.ctx.getConfig(),c=b.parseViewName,d=a;return(0,_rumCore.isFunction)(c)&&(d=c(a)),d},b.destroy=function(){(0,_mixin.removeEventListener)("onLaunch",this.onLaunch),(0,_mixin.removeEventListener)("beforeCreate",this.onBeforeCreate)},a}();
|
package/lib/utils/platform.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.fixAttrs=exports.appName=exports.VERSION=void 0,exports.getNetType=getNetType,exports.getPerformance=getPerformance,exports.getStorageSync=getStorageSync,exports.sdk=exports.global2=void 0,exports.setStorageSync=setStorageSync;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_rumCore=require("@arms/rum-core"),global2=exports.global2=global||window,VERSION=exports.VERSION='npm-0.0.1-beta.
|
|
1
|
+
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.fixAttrs=exports.appName=exports.VERSION=void 0,exports.getNetType=getNetType,exports.getPerformance=getPerformance,exports.getStorageSync=getStorageSync,exports.sdk=exports.global2=void 0,exports.setStorageSync=setStorageSync;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator")),_extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")),_rumCore=require("@arms/rum-core"),global2=exports.global2=global||window,VERSION=exports.VERSION='npm-0.0.1-beta.2',sdk=exports.sdk=uni,appName=exports.appName="uniapp";// export {
|
|
2
2
|
// // sdk: global.uni,
|
|
3
3
|
// appName: 'uniapp',
|
|
4
4
|
// }
|