@microsoft/applicationinsights-clickanalytics-js 2.8.0-beta.2203-04 → 2.8.0-beta.2203-05
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/browser/{ai.clck.2.8.0-beta.2203-04.cjs.js → ai.clck.2.8.0-beta.2203-05.cjs.js} +81 -12
- package/browser/ai.clck.2.8.0-beta.2203-05.cjs.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.cjs.min.js +6 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.cjs.min.js.map +1 -0
- package/browser/{ai.clck.2.8.0-beta.2203-04.gbl.js → ai.clck.2.8.0-beta.2203-05.gbl.js} +81 -12
- package/browser/ai.clck.2.8.0-beta.2203-05.gbl.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.gbl.min.js +6 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.gbl.min.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.integrity.json +66 -0
- package/browser/{ai.clck.2.8.0-beta.2203-04.js → ai.clck.2.8.0-beta.2203-05.js} +81 -12
- package/browser/ai.clck.2.8.0-beta.2203-05.js.map +1 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.min.js +6 -0
- package/browser/ai.clck.2.8.0-beta.2203-05.min.js.map +1 -0
- package/browser/ai.clck.2.cjs.js +80 -11
- package/browser/ai.clck.2.cjs.js.map +1 -1
- package/browser/ai.clck.2.cjs.min.js +2 -2
- package/browser/ai.clck.2.cjs.min.js.map +1 -1
- package/browser/ai.clck.2.gbl.js +80 -11
- package/browser/ai.clck.2.gbl.js.map +1 -1
- package/browser/ai.clck.2.gbl.min.js +2 -2
- package/browser/ai.clck.2.gbl.min.js.map +1 -1
- package/browser/ai.clck.2.js +80 -11
- package/browser/ai.clck.2.js.map +1 -1
- package/browser/ai.clck.2.min.js +2 -2
- package/browser/ai.clck.2.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.d.ts +1 -1
- package/dist/applicationinsights-clickanalytics-js.js +80 -11
- package/dist/applicationinsights-clickanalytics-js.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.min.js +2 -2
- package/dist/applicationinsights-clickanalytics-js.min.js.map +1 -1
- package/dist/applicationinsights-clickanalytics-js.rollup.d.ts +1 -1
- package/dist-esm/Behaviours.js +1 -1
- package/dist-esm/ClickAnalyticsPlugin.js +2 -2
- package/dist-esm/ClickAnalyticsPlugin.js.map +1 -1
- package/dist-esm/DataCollector.js +1 -1
- package/dist-esm/Enums.js +1 -1
- package/dist-esm/Interfaces/Datamodel.js +1 -1
- package/dist-esm/applicationinsights-clickanalytics-js.js +1 -1
- package/dist-esm/common/Utils.js +1 -1
- package/dist-esm/events/PageAction.js +1 -1
- package/dist-esm/events/WebEvent.js +1 -1
- package/dist-esm/handlers/AutoCaptureHandler.js +1 -1
- package/dist-esm/handlers/DomContentHandler.js +1 -1
- package/package.json +4 -4
- package/src/ClickAnalyticsPlugin.ts +1 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.cjs.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.cjs.min.js +0 -6
- package/browser/ai.clck.2.8.0-beta.2203-04.cjs.min.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.gbl.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.gbl.min.js +0 -6
- package/browser/ai.clck.2.8.0-beta.2203-04.gbl.min.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.integrity.json +0 -66
- package/browser/ai.clck.2.8.0-beta.2203-04.js.map +0 -1
- package/browser/ai.clck.2.8.0-beta.2203-04.min.js +0 -6
- package/browser/ai.clck.2.8.0-beta.2203-04.min.js.map +0 -1
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Application Insights JavaScript SDK - Click Analytics, 2.8.0-beta.2203-04
|
|
3
|
-
* Copyright (c) Microsoft and contributors. All rights reserved.
|
|
4
|
-
*/
|
|
5
|
-
"use strict";!function(t,e,n){var a=Object.defineProperty;if(a)try{return a(t,e,n)}catch(r){}typeof n.value!==undefined&&(t[e]=n.value)}(exports,"__esModule",{value:!0});var a="function",o="object",r="undefined",i="prototype",F="hasOwnProperty",n=Object,B=n[i],U=n.assign,R=n.create,j=n.defineProperty,p=B[F],e=null;function V(t){return void 0===t&&(t=!0),e&&t||(typeof globalThis!==r&&globalThis&&(e=globalThis),typeof self!==r&&self&&(e=self),typeof window!==r&&window&&(e=window),typeof global!==r&&global&&(e=global)),e}function H(t){throw new TypeError(t)}(V()||{}).Symbol,(V()||{}).Reflect;var U=U||function(t){for(var e,n=1,a=arguments.length;n<a;n++)for(var r in e=arguments[n])B[F].call(e,r)&&(t[r]=e[r]);return t},z=function(t,e){return(z=n.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e[F](n)&&(t[n]=e[n])})(t,e)};function K(t,e){function n(){this.constructor=t}typeof e!==a&&null!==e&&H("Class extends value "+e+" is not a constructor or null"),z(t,e),t[i]=null===e?function(t){if(R)return R(t);if(null==t)return{};var e=typeof t;function n(){}return e!==o&&e!==a&&H("Object prototype may only be an Object:"+t),n[i]=t,new n}(e):(n[i]=e[i],new n)}var c="constructor",d="prototype",h="function",v="_dynInstFuncs",q="_isDynProxy",m="_dynClass",W="_dynInstChk",y=W,J="_dfOpts",G="_unknown_",X="__proto__",Y="useBaseInst",$="setInstFuncs",Q=Object,T=Q.getPrototypeOf,Z=0;function C(t,e){return t&&Q[d].hasOwnProperty.call(t,e)}function tt(t){return t&&(t===Q[d]||t===Array[d])}function et(t){return tt(t)||t===Function[d]}function _(t){if(t){if(T)return T(t);t=t[X]||t[d]||(t[c]?t[c][d]:null);if(t)return t}return null}function nt(t,e){var n=[],a=Q.getOwnPropertyNames;if(a)n=a(t);else for(var r in t)"string"==typeof r&&C(t,r)&&n.push(r);if(n&&0<n.length)for(var i=0;i<n.length;i++)e(n[i])}function at(t,e,n){return e!==c&&typeof t[e]===h&&(n||C(t,e))}function rt(t){throw new TypeError("DynamicProto: "+t)}function it(t,e){for(var n=t.length-1;0<=n;n--)if(t[n]===e)return 1}function ot(t,e){return C(t,d)?t.name||e||G:((t||{})[c]||{}).name||e||G}function ct(t,a,e,n){C(t,d)||rt("theClass is an invalid class definition.");var r,i,o,c,u,s,l=t[d],f=(function(t){if(T)for(var e=[],n=_(a);n&&!et(n)&&!it(e,n);){if(n===t)return 1;e.push(n),n=_(n)}}(l)||rt("["+ot(t)+"] is not in class hierarchy of ["+ot(a)+"]"),null),t=(C(l,m)?f=l[m]:(f="_dynCls$"+ot(t,"_")+"$"+Z,Z++,l[m]=f),ct[J]),g=!!t[Y],p=(g&&n&&n[Y]!==undefined&&(g=!!n[Y]),i={},nt(r=a,function(t){!i[t]&&at(r,t,!1)&&(i[t]=r[t])}),i),g=(e(a,function(t,e,n,i){function a(t,e,n){var a,r=e[n];return r[q]&&i&&!1!==(a=t[v]||{})[y]&&(r=(a[e[m]]||{})[n]||r),function(){return r.apply(t,arguments)}}for(var r={},o=(nt(n,function(t){r[t]=a(e,n,t)}),_(t)),c=[];o&&!et(o)&&!it(c,o);)nt(o,function(t){!r[t]&&at(o,t,!T)&&(r[t]=a(e,o,t))}),c.push(o),o=_(o);return r}(l,a,p,g)),!!T&&!!t[$]);o=l,e=f,c=a,u=p,t=!1!==(g=g&&n?!!n[$]:g),tt(o)||(l=c[v]=c[v]||{},s=l[e]=l[e]||{},!1!==l[y]&&(l[y]=!!t),nt(c,function(t){var n,a,r;at(c,t,!1)&&c[t]!==u[t]&&(s[t]=c[t],delete c[t],C(o,t)&&(!o[t]||o[t][q])||(o[t]=(n=o,a=t,(r=function(){var t,e;return(function(t,e,n,a){var r=null;if(t&&C(n,m)){var i=t[v]||{};if((r=(i[n[m]]||{})[e])||rt("Missing ["+e+"] "+h),!r[W]&&!1!==i[y]){for(var o=!C(t,e),c=_(t),u=[];o&&c&&!et(c)&&!it(u,c);){var s=c[e];if(s){o=s===a;break}u.push(c),c=_(c)}try{o&&(t[e]=r),r[W]=1}catch(l){i[y]=!1}}}return r}(this,a,n,r)||(typeof(e=(e=n[t=a])===r?_(n)[t]:e)!==h&&rt("["+t+"] is not a "+h),e)).apply(this,arguments)})[q]=1,r)))}))}ct[J]={setInstFuncs:!0,useBaseInst:!0};var g="",ut="isInitialized",x="teardown",st="core",lt="disabled",ft="_doTeardown",gt="toString",pt="constructor",dt=j,ht=n.freeze,vt=Array.isArray,mt=B[gt],yt=p[gt],Tt=yt.call(n),Ct=/-([a-z])/g,_t=/([^\w\d_$])/g,xt=/^(\d+[\w\d_$])/,bt=Object.getPrototypeOf;function b(t){return t===undefined||typeof t===r}function I(t){return null===t||b(t)}function It(t){return!(!t||typeof t!==o)}function N(t){return!(!t||typeof t!==a)}function Nt(t){var e=t;return t&&"string"==typeof t?(e=(e=t.replace(Ct,function(t,e){return e.toUpperCase()})).replace(_t,"_")).replace(xt,function(t,e){return"_"+e}):e}function Pt(t,e){if(t)for(var n in t)p.call(t,n)&&e.call(t,n,t[n])}function At(t,e){return!(!t||!e||!~t.indexOf(e))}var P=vt||function(t){return!(!t||"[object Array]"!==mt.call(t))};function wt(t){return t&&"object"==typeof t&&(!(t=(bt||function(t){if(t){if(bt)return bt(t);t=t.__proto__||t[i]||t[pt];if(t)return t}return null})(t))||typeof(t=t[pt]&&p.call(t,pt)?t[pt]:t)===a&&yt.call(t)===Tt)}function A(t,e,n){var a=t.length;try{for(var r=0;r<a&&!(r in t&&-1===e.call(n||t,t[r],r,t));r++);}catch(i){}}var Dt=ht||function(t){return t};function kt(){var t=Date;return t.now?t.now():(new t).getTime()}function Et(t){var n={};return Pt(t,function(t,e){if(n[t]=e,!b(n[e]))throw Error("["+e+"] exists for "+t);n[e]=t}),Dt(n)}var St="window",Mt="JSON",Ot=null,Lt=null;function s(t){var e=V();return e&&e[t]?e[t]:t===St&&Ft()?window:null}function Ft(){return!(typeof window!==o||!window)}function Bt(){return Ft()?window:s(St)}function Ut(){return typeof document===o&&document?document:s("document")}function Rt(){return typeof location===o&&location?location:s("location")}function jt(){return typeof JSON===o&&JSON||null!==s(Mt)}function Vt(){return jt()?JSON||s(Mt):null}function w(t){var e=Object[i].toString.call(t),n=g;return"[object Error]"===e?n="{ stack: '"+t.stack+"', message: '"+t.message+"', name: '"+t.name+"'":jt()&&(n=Vt().stringify(t)),e+n}var Ht=null;function zt(t){return t?'"'+t.replace(/\"/g,g)+'"':g}function Kt(t,e){var n,a=typeof console!==r?console:s("console");a&&(n="log",N(a[n=a[t]?t:n])&&a[n](e))}Wt.dataType="MessageData";var qt=Wt;function Wt(t,e,n,a){void 0===n&&(n=!1),this.messageId=t,this.message=(n?"AI: ":"AI (Internal): ")+t;n=g,jt()&&(n=Vt().stringify(a)),t=(e?" message:"+zt(e):g)+(a?" props:"+zt(n):g);this.message+=t}var Jt=function je(r){this.identifier="DiagnosticLogger",this.queue=[];var c=0,u={};ct(je,this,function(i){function t(t,e){t=r[t];return I(t)?e:t}function o(t,e){var n,a=(n=(n=Ht)||!0===r.disableDbgExt?n:Ht||(a=s("Microsoft"),Ht=a?a.ApplicationInsights:Ht))?n.ChromeDbgExt:null;a&&a.diagLog&&a.diagLog(t,e)}I(r)&&(r={}),i.consoleLoggingLevel=function(){return t("loggingLevelConsole",0)},i.telemetryLoggingLevel=function(){return t("loggingLevelTelemetry",1)},i.maxInternalMessageLimit=function(){return t("maxMessageLimit",25)},i.enableDebugExceptions=function(){return t("enableDebugExceptions",!1)},i.throwInternal=function(t,e,n,a,r){e=new qt(e,n,r=void 0!==r&&r,a);if(i.enableDebugExceptions())throw e;n=1===t?"errorToConsole":"warnToConsole";b(e.message)?o("throw"+(1===t?"Critical":"Warning"),e):(a=i.consoleLoggingLevel(),r?(r=+e.messageId,!u[r]&&t<=a&&(i[n](e.message),u[r]=!0)):t<=a&&i[n](e.message),i.logInternalMessage(t,e))},i.warnToConsole=function(t){Kt("warn",t),o("warning",t)},i.errorToConsole=function(t){Kt("error",t),o("error",t)},i.resetInternalMessageCount=function(){c=0,u={}},i.logInternalMessage=function(t,e){var n,a;c>=i.maxInternalMessageLimit()||(a=!0,n="AITR_"+e.messageId,u[n]?a=!1:u[n]=!0,a&&(t<=i.telemetryLoggingLevel()&&(i.queue.push(e),c++,o(1===t?"error":"warn",e)),c===i.maxInternalMessageLimit()&&(a=new qt(23,n="Internal events throttle limit per PageView reached for this app.",!1),i.queue.push(a),1===t?i.errorToConsole(n):i.warnToConsole(n))))}})},Gt=(u.ParentContextKey="parent",u.ChildrenContextKey="childEvts",u);function u(t,r,e){var a,i=this,o=!1;i.start=kt(),i.name=t,i.isAsync=e,i.isChildEvt=function(){return!1},N(r)&&(o=function(t){if(dt)try{var e={enumerable:!0,configurable:!0,get:function(){return!a&&N(r)&&(a=r(),r=null),a}};return dt(t,"payload",e),!0}catch(n){}return!1}(i)),i.getCtx=function(t){return t?(t===u.ParentContextKey||t===u.ChildrenContextKey?i:i.ctx||{})[t]:null},i.setCtx=function(t,e){t&&(t===u.ParentContextKey?(i[t]||(i.isChildEvt=function(){return!0}),i[t]=e):t===u.ChildrenContextKey?i[t]=e:(i.ctx=i.ctx||{})[t]=e)},i.complete=function(){var t=0,e=i.getCtx(u.ChildrenContextKey);if(P(e))for(var n=0;n<e.length;n++){var a=e[n];a&&(t+=a.time)}i.time=kt()-i.start,i.exTime=i.time-t,i.complete=function(){},!o&&N(r)&&(i.payload=r())}}var Xt="CoreUtils.doPerf";function Yt(t,e,n,a,r){if(t)if(t=N(t.getPerfMgr)?t.getPerfMgr():t){var i,o=void 0,c=t.getCtx(Xt);try{if(o=t.create(e(),a,r))return c&&o.setCtx&&(o.setCtx(Gt.ParentContextKey,c),c.getCtx&&c.setCtx&&((i=c.getCtx(Gt.ChildrenContextKey))||(i=[],c.setCtx(Gt.ChildrenContextKey,i)),i.push(o))),t.setCtx(Xt,o),n(o)}catch(u){o&&o.setCtx&&o.setCtx("exception",u)}finally{o&&t.fire(o),t.setCtx(Xt,c)}}n()}var $t=4294967296,l=4294967295,Qt=!1,Zt=123456789,te=987654321;function ee(t){var e,n=0,a=s("crypto")||s("msCrypto");if(0===(n=a&&a.getRandomValues?a.getRandomValues(new Uint32Array(1))[0]&l:n)&&(!(a=typeof navigator===o&&navigator?navigator:s("navigator"))||a.userAgent===Lt&&null!==Ot||(a=((Lt=a.userAgent)||g).toLowerCase(),Ot=At(a,"msie")||At(a,"trident/")),Ot)){if(!Qt)try{var r=2147483647&kt();(e=(Math.random()*$t^r)+r)<0&&(e>>>=0),Zt=123456789+e&l,te=987654321-e&l,Qt=!0}catch(i){}a=((te=36969*(65535&te)+(te>>16)&l)<<16)+(65535&(Zt=18e3*(65535&Zt)+(Zt>>16)&l))>>>0&l|0,n=(a>>>=0)&l}return 0===n&&(n=Math.floor($t*Math.random()|0)),t||(n>>>=0),n}var ne=j,ae="2.7.3",re="."+function(t){void 0===t&&(t=22);for(var e=ee()>>>0,n=0,a=g;a.length<t;)a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[0|63&e]||"",e>>>=6,5==++n&&(e=(ee()<<2&4294967295|3&e)>>>0,n=0);return a}(6),ie=0;function oe(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType}function ce(t,e){return Nt(t+ie+++((e=void 0!==e&&e)?"."+ae:"")+re)}function ue(t){var i={id:ce("_aiData-"+(t||"")+"."+ae),accept:oe,get:function(t,e,n,a){var r=t[i.id];return r?r[Nt(e)]:(a&&((r=function(t,e){var n=e[t.id];if(!n){n={};try{oe(e)&&!function(t,e,n){if(ne)try{return ne(t,e,{value:n,enumerable:!1,configurable:!0}),1}catch(a){}}(e,t.id,n)&&(e[t.id]=n)}catch(a){}}return n}(i,t))[Nt(e)]=n),n)},kill:function(t,e){if(t&&t[e])try{delete t[e]}catch(n){}}};return i}var se=ue("plugin");function le(t){return se.get(t,"state",{},!0)}var fe="TelemetryPluginChain",ge="_hasRun",pe="_getTelCtx",de=0;function he(t,o,n,e){var a=null,r=[],i=(null!==e&&(a=e?function(t,e,n,a){for(;t;){if(t.getPlugin()===a)return t;t=t.getNext()}return me([a],e,n)}(t,o,n,e):t),{_next:function(){var t,e=a;return a=e?e.getNext():null,e||(t=r)&&0<t.length&&(A(t,function(t){try{t.func.call(t.self,t.args)}catch(e){n.logger.throwInternal(2,73,"Unexpected Exception during onComplete - "+w(e))}}),r=[]),e},ctx:{core:function(){return n},diagLog:function(){return(n||{}).logger||new Jt(o)},getCfg:function(){return o},getExtCfg:c,getConfig:function(t,e,n){void 0===n&&(n=!1);var a,t=c(t,null);return t&&!I(t[e])?a=t[e]:o&&!I(o[e])&&(a=o[e]),I(a)?n:a},hasNext:function(){return!!a},getNext:function(){return a},setNext:function(t){a=t},iterate:function(t){for(;e=i._next();){var e=e.getPlugin();e&&t(e)}},onComplete:function(t,e){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];t&&r.push({func:t,self:b(e)?i.ctx:e,args:n})}}});function c(t,e,n){var a,r,i;return void 0===e&&(e={}),void 0===n&&(n=0),(a=o&&(r=o.extensionConfig)&&t?r[t]:a)?It(e)&&0!==n&&(i=function g(){var t=arguments,e=t[0]||{},n=t.length,a=!1,r=1;for(0<n&&"boolean"==typeof e&&(a=e,e=t[r]||{},r++),It(e)||(e={});r<n;r++){var i,o,c,u,s=t[r],l=P(s),f=It(s);for(i in s)(l&&i in s||f&&p.call(s,i))&&(o=s[i],c=void 0,a&&o&&((c=P(o))||wt(o))&&(u=e[i],c?P(u)||(u=[]):wt(u)||(u={}),o=g(a,u,o)),o!==undefined&&(e[i]=o))}return e}(!0,e,a),o&&2===n&&Pt(e,function(t){var e;I(i[t])&&!I(e=o[t])&&(i[t]=e)})):a=e,a}return i}function ve(t,n,a,e){var r=he(t,n,a,e),i=r.ctx;return i.processNext=function(t){var e=r._next();return e&&e.processTelemetry(t,i),!e},i.createNew=function(t,e){return ve((t=P(t=void 0===t?null:t)?me(t,n,a,e):t)||i.getNext(),n,a,e)},i}function me(t,e,n,a){var r,i=null,o=!a;return P(t)&&0<t.length&&(r=null,A(t,function(t){(o=!o&&a===t||o)&&t&&N(t.processTelemetry)&&(t=ye(t,e,n),i=i||t,r&&r._setNext(t),r=t)})),a&&!i?me([a],e,n):i}function ye(u,a,r){var s=null,i=N(u.processTelemetry),o=N(u.setNextPlugin),l=u?u.identifier+"-"+u.priority+"-"+de++:"Unknown-0-"+de++,c={getPlugin:function(){return u},getNext:function(){return s},processTelemetry:function(n,t){var e;f(t=t||(e=(e=u&&N(u[pe])?u[pe]():e)||ve(c,a,r)),function(t){if(!u||!i)return!1;var e=le(u);return!e[x]&&!e[lt]&&(o&&u.setNextPlugin(s),u.processTelemetry(n,t),!0)},"processTelemetry",function(){return{item:n}},!n.sync)||t.processNext(n)},unload:function(a,r){f(a,function(){var t,e,n=!1;return u&&(t=le(u),e=u[st]||t.core,!u||e&&e!==a[st]()||t[x]||(t[st]=null,t[x]=!0,t[ut]=!1,u[x]&&!0===u[x](a,r)&&(n=!0))),n},"unload",function(){},r.isAsync)||a.processNext(r)},_id:l,_setNext:function(t){s=t}};function f(n,a,r,t,e){var i=!1,o=u?u.identifier:fe,c=(c=n[ge])||(n[ge]={});return n.setNext(s),u&&Yt(n[st](),function(){return o+":"+r},function(){c[l]=!0;try{var t=s?s._id:g;t&&(c[t]=!1),i=a(n)}catch(e){t=!s||c[s._id];t&&(i=!0),s&&t||n.diagLog().throwInternal(1,73,"Plugin ["+u.identifier+"] failed during "+r+" - "+w(e)+", run flags: "+w(c))}},t,e),i}return Dt(c)}function Te(){var e=[];return{add:function(t){t&&e.push(t)},run:function(n,a){A(e,function(t){try{t(n,a)}catch(e){n.diagLog().throwInternal(2,73,"Unexpected error calling unload handler - "+w(e))}}),e=[]}}}var D="getPlugin",gt=function Ve(){var c,s,l,f,g,p=this;function e(t){var e,t=t=void 0===t?null:t;return t||(e=s||ve(null,{},p.core),t=l&&l[D]?e.createNew(null,l[D]):e.createNew(null,l)),t}function d(){c=!1,p.core=null,l=s=null,g=[],f=Te()}d(),ct(Ve,p,function(u){var t,e,n,a,r;u.initialize=function(t,e,n,a){t&&(o="extensionConfig",i=r=[],t&&(i=t[o])!==r&&I(i)&&(t[o]=i=r)),!a&&e&&(a=e.getProcessTelContext().getNext());var r,i,o=l;l&&l[D]&&(o=l[D]()),p.core=e,s=ve(a,t,e,o),c=!0},u.teardown=function(t,e){var n,a,r,i;if(u.core&&(!t||u.core===t.core()))return a=!1,r=t||function c(t,n,a,e){var r=he(t,n,a,e),i=r.ctx;return i.processNext=function(t){var e=r._next();return e&&e.unload(i,t),!e},i.createNew=function(t,e){return c((t=P(t=void 0===t?null:t)?me(t,n,a,e):t)||i.getNext(),n,a,e)},i}(null,{},u.core,l&&l[D]?l[D]():l),i=e||{reason:0,isAsync:!1},u[ft]&&!0===u[ft](r,i,o)?n=!0:o(),n;function o(){a||(a=!0,f.run(r,e),A(g,function(t){t.rm()}),g=[],!0===n&&r.processNext(i),d())}},u._addHook=function(t){t&&(P(t)?g=g.concat(t):g.push(t))},t="_addUnloadCb",e=function(){return f},void 0===n&&(n=!0),u&&e&&(n||b(u[t]))&&(u[t]=(r=a=null,N(n=e)?a=n:r=n,function(){var t=arguments;if(r=a?a():r)return r.add.apply(r,t)}))}),p.diagLog=function(t){return e(t).diagLog()},p[ut]=function(){return c},p.setInitialized=function(t){c=t},p.setNextPlugin=function(t){l=t},p.processNext=function(t,e){e?e.processNext(t):l&&N(l.processTelemetry)&&l.processTelemetry(t,null)},p._getTelCtx=e},Ce="attachEvent",_e="addEventListener",xe=(ce("aiEvtPageHide"),ce("aiEvtPageShow"),1),be=ue("events"),Ie=/^([^.]*)(?:\.(.+)|)/;function Ne(t){return t&&t.replace?t.replace(/^\s*\.*|\.*\s*$/g,""):t}function Pe(t,e,n,a){var r,i,o,c,u,s,l,a=a=void 0!==a&&a;if(void 0===a&&(a=!1),t)try{u=e,null&&(s="",P(null)?(s="",A(null,function(t){(t=Ne(t))&&("."!==t[0]&&(t="."+t),s+=t)})):s=null,s&&(u=(u||"")+(s="."!==s[0]?"."+s:s)));var f,g={type:(l=Ie.exec(u)||[])[1],ns:(l[2]||"").split(".").sort().join(".")},p=g,d=n,h=a,v=!1;(c=t)&&p&&p.type&&d&&(c[_e]?(c[_e](p.type,d,h),v=!0):c[Ce]&&(c[Ce]("on"+p.type,d),v=!0)),v&&be.accept(t)&&(f={guid:xe++,evtName:g,handler:n,capture:a},r=g.type,((o=be.get(t,"events",{},i=void 0===i||i))[r]||(o[r]=[])).push(f))}catch(m){}}var f=Et({CRITICAL:1,WARNING:2}),vt=Et({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105}),Ae="not_specified",k=U(U({},vt),{CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103});function we(t){for(var e in t)E(t[e])&&("{}"!==JSON.stringify(t[e])||"callback"===e)||delete t[e]}function E(t){return!(I(t)||""===t)}function De(t,e){return E(t.getAttribute(e))}function ke(t,e,n){var a=t;if(a){for(;!e(a,n);)if(!(a=a.parentNode)||!a.getAttribute)return null;return a}}function Ee(t){return"A"===t.nodeName}function S(){var t={},e=!1,n=0,a=arguments.length,r=Object.prototype,i=arguments;for("[object Boolean]"===r.toString.call(i[0])&&(e=i[0],n++);n<a;n++){o=void 0;var o,c,u,s=i[n];for(o in s)u=o,(c=s)&&p.call(c,u)&&(e&&"[object Object]"===r.toString.call(s[o])?t[o]=S(!0,t[o],s[o]):t[o]=s[o])}return t}var Se={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0};function t(t,e,n,a,r,i){this._clickAnalyticsPlugin=t,this._config=e,this._contentHandler=n,this._pageTagsCallback=a,this._metaTags=r,this._traceLogger=i,this._pageTags={}}t.prototype.setBasicProperties=function(t,e){var n;E(t.name)||(t.pageName=(n=this._config,e&&e.pageName?e.pageName:n.callback&&N(n.callback.pageName)?n.callback.pageName():n.coreData&&n.coreData.pageName?n.coreData.pageName:(e=Ut())&&e.title||"")),!E(t.uri)&&Ft&&(t.uri=(n=this._config,e=Rt(),n.coreData&&n.coreData.requestUri&&""!==n.coreData.requestUri?n.coreData.requestUri:e?e.protocol+"//"+(e.hostname||e.host)+(E(e.port)?":"+e.port:"")+e.pathname:null))},t.prototype.setCommonProperties=function(t,e){this.setBasicProperties(t,e),this._setPageTags(t,e),this._pageTypeMetaTag=this._getMetaData(this._metaTags,this._config.coreData,"pageType"),this._behaviorMetaTag=this._getMetaData(this._metaTags,this._config.coreData,"behavior"),E(e.pageType)&&(t.pageType=e.pageType),E(this._pageTypeMetaTag)&&!E(t.pageType)&&(t.pageType=this._pageTypeMetaTag)},t.prototype._setPageTags=function(t,e){if(this._pageTagsCallback&&(this._pageTags=S(!0,this._pageTags,this._pageTagsCallback())),E(e.pageTags)&&(this._pageTags=S(!0,this._pageTags,e.pageTags)),this._metaTags)for(var n in this._pageTags.metaTags={},this._metaTags)"behavior"!=n&&"market"!=n&&"pageType"!=n&&(this._pageTags.metaTags[n]=this._metaTags[n]);t.properties=t.properties||{},t.properties.pageTags=this._pageTags},t.prototype._getBehavior=function(t){var e;return t&&E(t.behavior)?e=t.behavior:E(this._behaviorMetaTag)&&(e=this._behaviorMetaTag),this._getValidBehavior(e)},t.prototype._getValidBehavior=function(t){return this._config.behaviorValidator(t)},t.prototype._getMetaData=function(t,e,n){return e&&e[n]?e[n]:t?t[n]:""},K(M,Me=t),M.prototype.trackPageAction=function(t,e){var n=this,a={name:"Microsoft.ApplicationInsights.{0}.Event",baseType:"EventData",ext:{web:{}},data:{},baseData:{}};this._populateEventDataIfPresent(a.baseData,"name",t.name),this._populateEventDataIfPresent(a.data,"baseTypeSource","ClickEvent"),this._populateEventDataIfPresent(a.data,"uri",t.uri),this._populateEventDataIfPresent(a.data,"pageType",t.pageType),this._populateEventDataIfPresent(a.data,"properties",t.properties),this._populateEventDataIfPresent(a.data,"actionType",t.actionType),this._populateEventDataIfPresent(a.data,"behavior",t.behavior),this._populateEventDataIfPresent(a.data,"clickCoordinates",t.clickCoordinates),this._populateEventDataIfPresent(a.data,"content",t.content),this._populateEventDataIfPresent(a.data,"targetUri",t.targetUri),this._populateEventDataIfPresent(a.data,"timeToAction",t.timeToAction),this._populateEventDataIfPresent(a.data,"refUri",t.refUri),this._populateEventDataIfPresent(a.data,"pageName",t.pageName),this._populateEventDataIfPresent(a.data,"parentId",t.parentId),e&&Pt(e,function(t,e){a.data[t]||n._populateEventDataIfPresent(a.data,t,e)}),this._clickAnalyticsPlugin.core.track(a)},M.prototype.capturePageAction=function(t,e,n,a){e=E(e)?e:{};var r,i={name:""},n=E(n)?n:{},o=(this.setCommonProperties(i,e),i.behavior=this._getBehavior(e),{});a&&(i.behavior=this._config.defaultRightClickBhvr),t&&(i.targetUri=function(e){var t="";switch(e.tagName){case"A":case"AREA":t=e.href||"";break;case"IMG":t=function(){if(e){var t=ke(e,Ee);if(1===t.length){t=t[0];if(t.href)return t.href;if(t.src)return t.src}}return""}();break;case"INPUT":var n=e.type;n&&Se[n.toUpperCase()]&&(n=Rt()||{},t=e.form?e.form.action||n.pathname||"":n.pathname||"")}return t}(t),(o=this._contentHandler.getElementContent(t)).bhvr&&!E(e.behavior)&&(a="bhvr",(t=o)&&t[a]&&(r=t[a],delete t[a]),a=r,i.behavior=this._getValidBehavior(a)),E(o.id)||E(o.contentName)||this._traceLogger.throwInternal(f.WARNING,k.InvalidContentBlob,"Missing attributes id or contentName in click event. Click event information will still be collected!")),i.name=o.id||o.contentName||Ae,i.parentId=o.parentid||o.parentName||Ae,E(e.actionType)&&(i.actionType=e.actionType),E(e.clickCoordinateX)&&E(e.clickCoordinateY)&&(i.clickCoordinates=e.clickCoordinateX+"X"+e.clickCoordinateY),this._sanitizePageActionEventContent(o),i.content="["+JSON.stringify(S(o,e&&e.contentTags?e.contentTags:{}))+"]",i.timeToAction=this._getTimeToClick(),i.refUri=E(e.refUri)?e.refUri:this._config.coreData.referrerUri,this._isUndefinedEvent(i)||this.trackPageAction(i,n)},M.prototype._getTimeToClick=function(){var t=s("performance");if(t&&t.timing){t=t.timing.navigationStart;if(t&&0!==t)return(new Date).getTime()-t}return-1},M.prototype._populateEventDataIfPresent=function(t,e,n){E(n)&&(t[e]=n)},M.prototype._sanitizePageActionEventContent=function(t){t&&(delete t.id,delete t.parentid,delete t.parentname,this._config&&this._config.dataTags&&E(this._config.dataTags.parentDataTag)&&delete t[this._config.dataTags.parentDataTag])},M.prototype._isUndefinedEvent=function(t){return!(!this._config.dropInvalidEvents||t.name!==Ae||t.parentId!==Ae||"[{}]"!==t.content)};var Me,Oe=M;function M(){return null!==Me&&Me.apply(this,arguments)||this}var Le={BUTTON:!0,CHECKBOX:!0,RADIO:!0,RESET:!0,SUBMIT:!0},Fe=(Be.prototype.click=function(){var e=this,t=Bt(),n=Ut();t?(Pe(t,~navigator.appVersion.indexOf("MSIE")?"click":"mousedown",function(t){e._processClick(t)}),Pe(t,"keyup",function(t){e._processClick(t)})):n&&(Pe(n,"click",function(t){e._processClick(t)}),Pe(n,"keyup",function(t){e._processClick(t)}))},Be.prototype.capturePageAction=function(t,e,n,a){E(ke(t,De,this._config.dataTags.customDataPrefix+this._config.dataTags.dntDataTag))||this._pageAction.capturePageAction(t,e,n,a)},Be.prototype._processClick=function(t){var e={A:!0,BUTTON:!0,AREA:!0,INPUT:!0},n=Bt();if(t=I(t)&&n?n.event:t){var a=t.srcElement||t.target,r={clickCoordinateX:t.pageX,clickCoordinateY:t.pageY},i=function(t){try{if("which"in t)return 3===t.which;if("button"in t)return 2===t.button}catch(e){}}(t);if(i)r.actionType="CR";else if(function(t){try{if("which"in t)return 1===t.which;if("button"in t)return 1===t.button}catch(e){}}(t))r.actionType="CL";else if(function(t){try{if("keyCode"in t)return 13===t.keyCode}catch(e){}}(t))r.actionType="KE";else if(function(t){try{if("keyCode"in t)return 32===t.keyCode}catch(e){}}(t))r.actionType="KS";else{if(!function(t){try{if("which"in t)return 2===t.which;if("button"in t)return 4===t.button}catch(e){}}(t))return;r.actionType="CM"}for(;a&&a.tagName;){var o=(a=a.control&&e[a.control.tagName.toUpperCase()]?a.control:a).tagName.toUpperCase();if(e[o]){"INPUT"==o&&!Le[a.type.toUpperCase()]||this.capturePageAction(a,r,{},i);break}a=a.parentElement||a.parentNode}}},Be);function Be(t,e,n,a){this._analyticsPlugin=t,this._config=e,this._pageAction=n,this._traceLogger=a}O.prototype.getMetadata=function(){return E(this._config.dataTags.metaDataPrefix)?this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,this._config.dataTags.metaDataPrefix,!1):this._getMetaDataFromDOM(this._config.dataTags.captureAllMetaDataContent,"",!1)},O.prototype.getElementContent=function(t){if(!t)return{};var e,n,a={},r=this._config.dataTags.customDataPrefix,i=r+this._config.dataTags.aiBlobAttributeTag;if(E(this._config.dataTags.parentDataTag)&&(n=r+this._config.dataTags.parentDataTag),this._isTracked(t,r,i))a=S(a,this._populateElementContentwithDataTag(t,r,n,i));else if(e=t.getAttribute(i))try{a=JSON.parse(e)}catch(o){this._traceLogger.throwInternal(f.CRITICAL,k.CannotParseAiBlobValue,"Can not parse "+e)}else a=S(a,this._populateElementContent(t,r,n,i));return we(a),n?S(a,this._getParentDetails(t,a,r,i)):a},O.prototype._captureElementContentWithDataTag=function(t,e,n){for(var a,r=0;r<t.attributes.length;r++)(a=t.attributes[r]).name.indexOf(n)||(e[a.name.replace(n,"")]=a.value)},O.prototype._walkUpDomChainCaptureData=function(t,e,n,a,r){for(var i=t,o=!1,c=!1;!I(i)&&!I(i.attributes);){for(var u=i.attributes,s=0;s<u.length;s++){var l,f=u[s];f.name.indexOf(n)||(f.name.indexOf(a)||(o=!0),f.name.indexOf(r)&&(l=f.name.replace(n,""),c&&"id"===l||E(e[l])||(e[l]=f.value)))}if(o)break;c=!0,i=i.parentNode}},O.prototype._populateElementContent=function(t,e,n,a){var r={};if(!t)return r;var i=this._getHtmlIdAndContentName(t),r={id:i.id||"",contentName:i.contentName||""};return E(n)&&this._walkUpDomChainCaptureData(t,r,e,n,a),r.id||r.contentName||this._traceLogger.throwInternal(f.WARNING,k.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),r},O.prototype._populateElementContentwithDataTag=function(t,e,n,a){var r={};if(!t)return r;var i=this._getHtmlIdAndContentName(t);return E(n)?this._walkUpDomChainCaptureData(t,r,e,n,a):this._captureElementContentWithDataTag(t,r,e),this._config.dataTags.useDefaultContentNameOrId&&(E(r.id)||(r.id=i.id||""),r.contentName=i.contentName||""),r.id||r.contentName||this._traceLogger.throwInternal(f.WARNING,k.InvalidContentBlob,"Invalid content blob. Missing required attributes (id, contentName. Content information will still be collected!"),r},O.prototype._getMetaDataFromDOM=function(t,e,n){for(var a={},r=document.querySelectorAll("meta"),i=0;i<r.length;i++){var o=r[i];!o.name||!t&&o.name.indexOf(e)||(a[n?o.name.replace(e,""):o.name]=o.content)}return a},O.prototype._getDefaultContentName=function(t,e){if(!1===e||!t.tagName)return"";var n,a=Ut()||{};switch(t.tagName){case"A":n=a.all?t.innerText||t.innerHTML:t.text||t.innerHTML;break;case"IMG":case"AREA":n=t.alt;break;default:n=t.value||t.name||t.alt||t.innerText||t.id}return n.substring(0,200)},O.prototype._isTracked=function(t,e,n){for(var a=t.attributes,r=!1,i=0;i<a.length;i++){var o=a[i].name;if(o===n)return!1;o.indexOf(e)||(r=!0)}return r},O.prototype._getHtmlIdAndContentName=function(t){var e,n,a={};return t&&this._config.dataTags.useDefaultContentNameOrId&&(e=this._config.callback.contentName?this._config.callback.contentName(t,this._config.dataTags.useDefaultContentNameOrId):"",n=this._getDefaultContentName(t,this._config.dataTags.useDefaultContentNameOrId),a={id:t.id,contentName:e||n||t.getAttribute("alt")}),a},O.prototype._getParentDetails=function(t,e,n,a){var r=e.parentid,e=e.parentname;return r||e||!t?{}:this._populateParentInfo(t,n,a)},O.prototype._populateParentInfo=function(t,e,n){var a,r={},i=ke(t.parentElement,this._isTracked,e);if(i){var n=i.getAttribute(n)||t[n];if(n){try{var o=JSON.parse(n)}catch(c){this._traceLogger.throwInternal(f.CRITICAL,k.CannotParseAiBlobValue,"Can not parse "+n)}o&&(a=o.id)}else a=i.getAttribute(e+"id")}return a?r.parentid=a:(n=this._getHtmlIdAndContentName(t.parentElement),r.parentid=n.id,r.parentname=n.contentName),r};var Ue=O;function O(t,e){this._config=t,this._traceLogger=e}K(L,Re=gt),L.prototype.initialize=function(t,e,n,a){if(I(e))throw Error("Error initializing");t.extensionConfig=t.extensionConfig||[],t.extensionConfig[this.identifier]=t.extensionConfig[this.identifier]||{},this._config=function(t){var e,n,a={autoCapture:!0,callback:{pageActionPageTags:null},pageTags:{},coreData:{referrerUri:document.referrer,requestUri:"",pageName:"",pageType:""},dataTags:{useDefaultContentNameOrId:!1,aiBlobAttributeTag:"ai-blob",customDataPrefix:"data-",captureAllMetaDataContent:!1,dntDataTag:"ai-dnt"},behaviorValidator:function(t){return t||""},defaultRightClickBhvr:"",dropInvalidEvents:!1},r=[];for(e in a)"object"==typeof a[e]&&r.push(e);if(t){var i,o,c=t,u=r;for(i in we(c),u)u.hasOwnProperty(i)&&("object"==typeof c[o=u[i]]?we(c[o]):delete c[o]);return E(t.dataTags)&&(t.dataTags.customDataPrefix=E((n=t).dataTags.customDataPrefix)&&!n.dataTags.customDataPrefix.indexOf("data-")?t.dataTags.customDataPrefix:"data-"),S(!0,a,t)}}(t.extensionConfig[this.identifier]),Re.prototype.initialize.call(this,t,e,n,a),this._contentHandler=this._contentHandler||new Ue(this._config,this.diagLog());var r,t=this._contentHandler.getMetadata();this.pageAction=new Oe(this,this._config,this._contentHandler,this._config.callback.pageActionPageTags,t,this.diagLog()),this._autoCaptureHandler=this._autoCaptureHandler||new Fe(this,this._config,this.pageAction,this.diagLog()),this._config.autoCapture&&this._autoCaptureHandler.click(),A(n,function(t){"AppInsightsPropertiesPlugin"===t.identifier&&(r=t)}),r&&r.context&&r.context.internal&&r.context.internal.sdkVersion&&(r.context.internal.sdkVersion+="_ClickPlugin"+L.Version)},L.prototype.processTelemetry=function(t,e){this.processNext(t,e)},L.prototype.trackPageAction=function(t,e){try{this.pageAction.trackPageAction(t,e)}catch(n){this.diagLog().throwInternal(f.CRITICAL,k.TrackPageActionEventFailed,"trackPageAction failed, page action event will not be collected: "+((t=n)&&"[object Error]"===mt.call(t)?t.name:g),{exception:w(n)})}},L.Version="2.8.0-beta.2203-04";var Re,ht=L;function L(){var t=null!==Re&&Re.apply(this,arguments)||this;return t.identifier="ClickAnalyticsPlugin",t.priority=181,t}exports.BehaviorEnumValidator=function(e){return function(t){return e[t]||""}},exports.BehaviorMapValidator=function(e){return function(t){return e[t]||""}},exports.BehaviorValueValidator=function(t){return function(e){var n;return A(t,function(t){if(t===e)return n=t,-1}),n||""}},exports.ClickAnalyticsPlugin=ht;
|
|
6
|
-
//# sourceMappingURL=ai.clck.2.8.0-beta.2203-04.cjs.min.js.map
|