Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datadog/ui-apps-sdk

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/ui-apps-sdk - npm Package Compare versions

Comparing version 0.12.3 to 0.12.4

2

dist/ui-apps-sdk.min.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DD_SDK=t():e.DD_SDK=t()}(self,(function(){return e={145:function(e){self,e.exports=function(){"use strict";var e={573:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChildClient=void 0;var o=n(601),s=n(473),u=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.context=t.context||null,n.initListener=n.initListener.bind(n),window.addEventListener("message",n.initListener),n.profile&&n.onRequest(o.REQUEST_KEY_GET_PROFILE,(function(){return n.profiler.getEvents()})),n.setInitTimer(),n}return i(t,e),t.prototype.getLogger=function(){return s.getLogger("child-client",this.debug)},t.prototype.onChannelInit=function(e){window.removeEventListener("message",this.initListener),this.messagePort=e.ports[0];var t=this.getInitMessage(this.context);this.messagePort.postMessage(t),this.profiler.logEvent(o.ProfileEventType.POST_MESSAGE,t)},t.prototype.destroy=function(){this.messagePort&&this.messagePort.close(),this.initTimer&&clearTimeout(this.initTimer),window.removeEventListener("message",this.initListener)},t}(n(416).SharedClient);t.ChildClient=u},601:function(e,t){var n,r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_KEY_GET_PROFILE=t.REQUEST_TIMEOUT=t.SerializationType=t.TransactionDirection=t.ProfileEventType=t.MessageAPIVersion=t.MessageType=void 0,(o=t.MessageType||(t.MessageType={})).CHANNEL_INIT="channel_init",o.EVENT="event",o.REQUEST="request",o.RESPONSE="response",o.ERROR_RESPONSE="error_response",(t.MessageAPIVersion||(t.MessageAPIVersion={})).v1="framepost/v1",(i=t.ProfileEventType||(t.ProfileEventType={})).POST_MESSAGE="post_message",i.RECEIVE_MESSAGE="receive_message",(r=t.TransactionDirection||(t.TransactionDirection={})).UP="up",r.DOWN="down",(n=t.SerializationType||(t.SerializationType={})).NONE="none",n.ERROR="error",t.REQUEST_TIMEOUT=2e4,t.REQUEST_KEY_GET_PROFILE="framepost_get_profile"},758:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.RequestTimeoutError=t.HandshakeTimeoutError=void 0;var i=function(e){function t(){var t=e.call(this,"Handshake timed out")||this;return t.name="HandshakeTimeoutError",t}return r(t,e),t}(Error);t.HandshakeTimeoutError=i;var o=function(e){function t(){var t=e.call(this,"Request timed out")||this;return t.name="RequestTimeoutError",t}return r(t,e),t}(Error);t.RequestTimeoutError=o},607:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=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.ParentClient=t.ChildClient=void 0;var o=n(573);Object.defineProperty(t,"ChildClient",{enumerable:!0,get:function(){return o.ChildClient}});var s=n(166);Object.defineProperty(t,"ParentClient",{enumerable:!0,get:function(){return s.ParentClient}}),i(n(699),t),i(n(758),t)},473:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLogger=void 0,t.getLogger=function(e,t){return t?{log:function(t){return console.log(e+": "+t)},error:function(t){return console.error(e+": "+t)}}:{log:function(){},error:function(){}}}},166:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParentClient=void 0;var u=n(601),a=n(473),c=n(416),l=n(593),f=function(e){function t(t){return void 0===t&&(t={}),e.call(this,t)||this}return i(t,e),t.prototype.requestChannel=function(e,t){e.contentWindow&&this.handleRequstChannel(e.contentWindow,e.src,t)},t.prototype.requestChannelWithPopup=function(e,t,n){e.opener&&this.handleRequstChannel(e,t,n)},t.prototype.handleRequstChannel=function(e,t,n){this.url=new URL(t);var r=new MessageChannel;this.messagePort=r.port1;var i=this.getInitMessage(n);this.messagePort.onmessage=this.initListener.bind(this),this.setInitTimer(),e.postMessage(i,this.url.origin,[r.port2]),this.profiler.logEvent(u.ProfileEventType.POST_MESSAGE,i)},t.prototype.getMessageProfile=function(){return o(this,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return[4,this.request(u.REQUEST_KEY_GET_PROFILE)];case 1:return e=n.sent(),t=this.profiler.getEvents(),[2,l.profileMessages(t,e)]}}))}))},t.prototype.onChannelInit=function(){},t.prototype.getLogger=function(){return a.getLogger("parent-client",this.debug)},t.prototype.destroy=function(){this.messagePort&&this.messagePort.close(),this.initTimer&&clearTimeout(this.initTimer)},t}(c.SharedClient);t.ParentClient=f},819:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getProfiler=void 0,t.getProfiler=function(e){var t=[];return{logEvent:function(n,r){e&&t.push({type:n,message:r,date:new Date})},getEvents:function(){return t}}}},416:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SharedClient=void 0;var o=n(601),s=n(758),u=n(819),a=n(593),c=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.debug,i=void 0!==r&&r,s=n.profile,c=void 0!==s&&s,l=n.requestTimeout,f=void 0===l?o.REQUEST_TIMEOUT:l;this.debug=i,this.profile=c,this.requestTimeout=f,this.channel=a.defer(),this.eventSubscriptions={},this.responseSubscriptions={},this.requestSubscriptions={},this.logger=this.getLogger(),this.profiler=u.getProfiler(c),this.channel.promise.then((function(){t.logger.log("Secure parent <-> child channel established")})).catch((function(e){t.logger.log(e)}))}return e.prototype.send=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.handshake()];case 1:return n.sent(),[3,3];case 2:return n.sent(),[2,null];case 3:return[2,this.postMessage(o.MessageType.EVENT,e,t)]}}))}))},e.prototype.on=function(e,t){var n=this;this.eventSubscriptions[e]||(this.eventSubscriptions[e]={});var r=a.randomInsecureId(8);return this.eventSubscriptions[e][r]=t,this.logger.log('Registered handler for event "'+e+'"'),function(){n.eventSubscriptions[e]=a.omit(n.eventSubscriptions[e],r),n.logger.log("Unsubscribed handler for event "+e)}},e.prototype.request=function(e,t){return r(this,void 0,void 0,(function(){var n,r,u=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.postMessage(o.MessageType.REQUEST,e,t)];case 1:return n=i.sent(),r=function(){u.responseSubscriptions=a.omit(u.responseSubscriptions,n.id)},[2,new Promise((function(e,t){var i;u.responseSubscriptions[n.id]=function(n,s){clearTimeout(i),r(),s.type===o.MessageType.ERROR_RESPONSE?t(n):e(n)},i=setTimeout((function(){r(),t(new s.RequestTimeoutError)}),u.requestTimeout)}))]}}))}))},e.prototype.onRequest=function(e,t){var n=this;return this.requestSubscriptions[e]=function(s,u){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.handshake()];case 1:return i.sent(),[4,t(s,u)];case 2:return n=i.sent(),this.postMessage(o.MessageType.RESPONSE,e,n,u.id),[3,4];case 3:return r=i.sent(),this.postMessage(o.MessageType.ERROR_RESPONSE,e,r,u.id),[3,4];case 4:return[2]}}))}))},function(){n.requestSubscriptions=a.omit(n.requestSubscriptions,e)}},e.prototype.getContext=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.channel.promise];case 1:return[2,e.sent().context];case 2:return e.sent(),[2,null];case 3:return[2]}}))}))},e.prototype.handshake=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.channel.promise];case 1:return[2,e.sent().context]}}))}))},e.prototype.messageListener=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.channel.promise];case 1:case 2:return r.sent(),[3,3];case 3:if(t=this.isValidMessage(e),n=a.deserialize(e.data),t){switch(n.type){case o.MessageType.EVENT:this.handleEvent(n);break;case o.MessageType.REQUEST:this.handleRequest(n);break;case o.MessageType.ERROR_RESPONSE:case o.MessageType.RESPONSE:this.handleResponse(n)}this.profiler.logEvent(o.ProfileEventType.RECEIVE_MESSAGE,n)}else this.logger.error("Invalid message format. Skipping.");return[2]}}))}))},e.prototype.handleEvent=function(e){var t=this.eventSubscriptions[e.key];t&&Object.values(t).forEach((function(t){return t(e.data,e)}))},e.prototype.handleRequest=function(e){var t=this.requestSubscriptions[e.key];t&&(t(e.data,e),this.logger.log("Handled request type "+e.key))},e.prototype.handleResponse=function(e){var t=e.requestId,n=t&&this.responseSubscriptions[t];n&&n(e.data,e)},e.prototype.postMessage=function(e,t,n,s){return r(this,void 0,void 0,(function(){var r,u;return i(this,(function(i){switch(i.label){case 0:return[4,this.channel.promise];case 1:return r=i.sent().port,u=a.serialize({type:e,apiVersion:o.MessageAPIVersion.v1,key:t,data:n,id:a.randomInsecureId(),requestId:s}),r.postMessage(u),this.profiler.logEvent(o.ProfileEventType.POST_MESSAGE,u),[2,u]}}))}))},e.prototype.setInitTimer=function(){var e=this;this.initTimer=setTimeout((function(){e.channel.reject(new s.HandshakeTimeoutError),e.destroy()}),this.requestTimeout)},e.prototype.initListener=function(e){this.isInitMessage(e)?(this.profiler.logEvent(o.ProfileEventType.RECEIVE_MESSAGE,e.data),this.initTimer&&clearTimeout(this.initTimer),this.onChannelInit(e),this.messagePort&&(this.messagePort.onmessage=this.messageListener.bind(this)),this.resolveChannel(e)):this.logger.error("Invalid message format. Skipping.")},e.prototype.isValidMessage=function(e){var t=e.data;return t.type&&t.id&&t.apiVersion===o.MessageAPIVersion.v1},e.prototype.isInitMessage=function(e){return this.isValidMessage(e)&&e.data.type===o.MessageType.CHANNEL_INIT},e.prototype.resolveChannel=function(e){if(this.messagePort){var t={port:this.messagePort,origin:e.origin,context:e.data.data};this.channel.resolve(t)}},e.prototype.getInitMessage=function(e){return a.serialize({type:o.MessageType.CHANNEL_INIT,apiVersion:o.MessageAPIVersion.v1,key:"",data:e,id:a.randomInsecureId()})},e}();t.SharedClient=c},699:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},593:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.deserialize=t.serialize=t.profileMessages=t.omit=t.randomInsecureId=t.defer=void 0;var s=n(601),u=n(758);t.defer=function(){var e=function(){},t=function(){},n=new Promise((function(n,r){e=n,t=r}));return{resolve:e,reject:t,promise:n}},t.randomInsecureId=function(e){return void 0===e&&(e=16),o(Array(e)).map((function(){return(~~(36*Math.random())).toString(36)})).join("")},t.omit=function(e,t){var n=e,r=t;return n[r],i(n,["symbol"==typeof r?r:r+""])},t.profileMessages=function(e,t){var n,r,i=e.concat(t).filter((function(e){return e.type===s.ProfileEventType.RECEIVE_MESSAGE})),o=(n=function(e){return e.message.id},r={},i.forEach((function(e){r[n(e)]=e})),r),u=[],a=function(e){var t=e.date,n=e.message,r={id:n.id,direction:s.TransactionDirection.DOWN,postTime:t,message:n},i=o[n.id];return i&&(r.receiveTime=i.date,r.duration=(i.date.getTime()-t.getTime())/1e3),r};return e.filter((function(e){return e.type===s.ProfileEventType.POST_MESSAGE})).forEach((function(e){var t=a(e);u.push(t)})),t.filter((function(e){return e.type===s.ProfileEventType.POST_MESSAGE})).forEach((function(e){var t=a(e);t.direction=s.TransactionDirection.UP,u.push(t)})),u.filter((function(e){return e.message.key!==s.REQUEST_KEY_GET_PROFILE})).sort((function(e,t){return e.postTime.getTime()-t.postTime.getTime()}))};var a=function(e){var t=e.name,n=e.message,r=e.stack;switch(t){case u.HandshakeTimeoutError.name:return new u.HandshakeTimeoutError;case u.RequestTimeoutError.name:return new u.RequestTimeoutError;default:var i=new Error(n);return i.name=t,i.stack=r,i}};t.serialize=function(e){var t,n=e.data,i=s.SerializationType.NONE;return n instanceof Error&&(i=s.SerializationType.ERROR,n={message:(t=n).message,name:t.name,stack:t.stack}),r(r({},e),{serialization:i,data:n})},t.deserialize=function(e){return e.serialization===s.SerializationType.ERROR?r(r({},e),{data:a(e.data)}):e}}},t={};return function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(607)}()},724:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDAPIClient=void 0;var o=n(601),s=n(152),u=function(){function e(e){this.client=e,this.v1=new s.DDAPIV1Client(this)}return e.prototype.request=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(o.UiAppRequestType.API_REQUEST,e)]}))}))},e.prototype.get=function(e,t){return void 0===t&&(t={}),r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request({method:o.IFrameApiRequestMethod.GET,resource:e,options:t,body:null})]}))}))},e.prototype.post=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.request({method:o.IFrameApiRequestMethod.POST,resource:e,options:n,body:t})]}))}))},e.prototype.put=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.request({method:o.IFrameApiRequestMethod.PUT,resource:e,options:n,body:t})]}))}))},e.prototype.patch=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.request({method:o.IFrameApiRequestMethod.PATCH,resource:e,options:n,body:t})]}))}))},e.prototype.delete=function(e,t){return void 0===t&&(t={}),r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request({method:o.IFrameApiRequestMethod.DELETE,resource:e,options:t,body:null})]}))}))},e}();t.DDAPIClient=u},152:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DDAPIV1Client=void 0;var r=n(445);t.DDAPIV1Client=function(e){this.metrics=new r.DDMetricsAPIClient(e)}},445:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DDMetricsAPIClient=void 0;var n=function(){function e(e){this.apiClient=e}return e.prototype.getMetadata=function(e){return this.apiClient.get("/api/v1/metrics/"+e)},e.prototype.listActiveMetrics=function(e){return this.apiClient.get("/api/v1/metrics",{params:e})},e.prototype.search=function(e){return this.apiClient.get("/api/v1/search",{params:e})},e.prototype.query=function(e){return this.apiClient.get("/api/v1/query",{params:e})},e}();t.DDMetricsAPIClient=n},442:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDAuthClient=void 0;var o=n(601),s={isAuthenticated:!1,status:o.AuthStateStatus.NONE,args:{}},u=function(){function e(e,t){this.client=e,this.authState=s,t&&(this.options=t),this.client.framePostClient.onRequest(o.UiAppRequestType.CHECK_AUTH_STATE,this.checkAuthState.bind(this))}return e.prototype.checkAuthState=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.options?[4,this.options.authStateCallback()]:(this.client.logger.error("Auth Provider is not set"),[2,null]);case 1:return"boolean"==typeof(e=t.sent())?[2,{isAuthenticated:e}]:[2,e]}}))}))},e.prototype.getAuthState=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.client.getContext()];case 1:return e.sent(),[2,this.client.framePostClient.request(o.UiAppRequestType.GET_AUTH_STATE,{forceUpdate:!1})]}}))}))},e.prototype.updateAuthState=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.client.getContext()];case 1:return e.sent(),[2,this.client.framePostClient.request(o.UiAppRequestType.GET_AUTH_STATE,{forceUpdate:!0})]}}))}))},e}();t.DDAuthClient=u},883:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.DDClient=void 0;var s=n(145),u=n(724),a=n(442),c=n(601),l=n(123),f=n(730),p=n(114),h=n(391),d=n(955),y=n(979),v=n(964),_=n(645),E=n(177),b={host:c.Host.STAGE,debug:!1},g=function(){function e(e){var t,n=this;if(void 0===e&&(e={}),this.host=e.host||b.host,this.debug=e.debug||b.debug,e.authProvider){var r=e.authProvider;r.authStateCallback,t=o(r,["authStateCallback"])}this.framePostClient=new s.ChildClient({debug:c.FramePostClientSettings.DEBUG,requestTimeout:c.FramePostClientSettings.CLIENT_REQUEST_TIMEOUT,profile:this.debug,context:{sdkVersion:"0.12.3",authStateOptions:t}}),this.logger=new _.Logger(this),this.api=new u.DDAPIClient(this),this.auth=new a.DDAuthClient(this,e.authProvider),this.events=new p.DDEventsClient(this),this.dashboard=new f.DDDashboardClient(this),this.dashboardCogMenu=new l.DDDashboardCogMenuClient(this),this.location=new h.DDLocationClient(this),this.modal=new d.DDModalClient(this),this.sidePanel=new v.DDSidePanelClient(this),this.secrets=new y.DDSecretsClient(this),this.widgetContextMenu=new E.DDWidgetContextMenuClient(this),this.events.on(c.UiAppEventType.CONTEXT_CHANGE,(function(e){n.context=e,n.syncDebugMode(n.context)})),this.getContext().then((function(e){n.syncDebugMode(e)}))}return e.prototype.getContext=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.context?[3,2]:(e=this,[4,this.framePostClient.handshake()]);case 1:e.context=t.sent(),t.label=2;case 2:return[2,this.context]}}))}))},e.prototype.syncDebugMode=function(e){var t;this.debug=(null===(t=null==e?void 0:e.app)||void 0===t?void 0:t.debug)||this.debug},e}();t.DDClient=g},601:function(e,t){"use strict";var n,r,i,o,s,u,a,c,l,f;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorTheme=t.AuthStateStatus=t.MenuItemType=t.ModalActionLevel=t.ModalSize=t.enabledEvents=t.UiAppRequestType=t.FramePostClientSettings=t.IFrameApiRequestMethod=t.UiAppEventType=t.UiAppFeatureType=t.Host=void 0,(f=t.Host||(t.Host={})).PROD="https://app.datadoghq.com/",f.STAGE="https://dd.datad0g.com/",(l=t.UiAppFeatureType||(t.UiAppFeatureType={})).DASHBOARD_COG_MENU="dashboard_cog_menu",l.DASHBOARD_CUSTOM_WIDGET="dashboard_custom_widget",l.MODALS="modals",l.SIDE_PANELS="side_panels",l.WIDGET_CONTEXT_MENU="widget_context_menu",function(e){e.CUSTOM_EVENT="custom_event",e.CONTEXT_CHANGE="context_change",e.DASHBOARD_COG_MENU_CLICK="dashboard_cog_menu_click",e.DASHBOARD_TIMEFRAME_CHANGE="dashboard_timeframe_change",e.DASHBOARD_CURSOR_CHANGE="dashboard_cursor_change",e.DASHBOARD_TEMPLATE_VAR_CHANGE="dashboard_template_var_change",e.DASHBOARD_CUSTOM_WIDGET_OPTIONS_CHANGE="dashboard_custom_widget_options_change",e.MODAL_CLOSE="modal_close",e.MODAL_ACTION="modal_action",e.MODAL_CANCEL="modal_cancel",e.SIDE_PANEL_CLOSE="side_panel_close",e.WIDGET_CONTEXT_MENU_CLICK="widget_context_menu_click",e.AUTH_STATE_CHANGE="auth_state_change"}(n=t.UiAppEventType||(t.UiAppEventType={})),(c=t.IFrameApiRequestMethod||(t.IFrameApiRequestMethod={})).GET="GET",c.POST="POST",c.PUT="PUT",c.PATCH="PATCH",c.DELETE="DELETE",t.FramePostClientSettings=Object.freeze({DEBUG:!1,CLIENT_REQUEST_TIMEOUT:1e4}),(a=t.UiAppRequestType||(t.UiAppRequestType={})).API_REQUEST="api_request",a.EVENT_BROADCAST="event_broadcast",a.NAVIGATE_TOP="navigate_top",a.OPEN_MODAL="open_modal",a.CLOSE_MODAL="close_modal",a.OPEN_SIDE_PANEL="open_side_panel",a.CLOSE_SIDE_PANEL="close_side_panel",a.STORE_SECRET="store_secret",a.REMOVE_SECRET="remove_secret",a.LOAD_ALL_SECRETS="load_all_secrets",a.REMOVE_ALL_SECRETS="remove_all_secrets",a.LOAD_SECRET="load_secret",a.GET_SECRET="get_secret",a.SET_SECRET="set_secret",a.REMOVE_SECRET_PUBLIC="remove_secret_public",a.GET_WIDGET_CONTEXT_MENU_ITEMS="get_widget_context_menu_items",a.GET_DASHBOARD_COG_MENU_ITEMS="get_dashboard_cog_menu_items",a.CHECK_AUTH_STATE="check_auth_state",a.GET_AUTH_STATE="get_auth_state",a.SET_DASHBOARD_TIMEFRAME="set_dashboard_timeframe",a.SET_DASHBOARD_CURSOR="set_dashboard_cursor",t.enabledEvents=new Set([n.CUSTOM_EVENT,n.CONTEXT_CHANGE,n.AUTH_STATE_CHANGE]),(u=t.ModalSize||(t.ModalSize={})).SMALL="sm",u.MEDIUM="md",u.LARGE="lg",(s=t.ModalActionLevel||(t.ModalActionLevel={})).PRIMARY="primary",s.SUCCESS="success",s.WARNING="warning",s.DANGER="danger",(o=t.MenuItemType||(t.MenuItemType={})).LINK="link",o.EVENT="event",(i=t.AuthStateStatus||(t.AuthStateStatus={})).NONE="none",i.SET="set",i.INITIATED="initiated",i.SUCCESS="success",i.FAILED="failed",(r=t.ColorTheme||(t.ColorTheme={})).dark="dark",r.light="light"},123:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDDashboardCogMenuClient=void 0;var u=n(601),a=n(791),c=n(974),l={items:[]},f=function(e){function t(t){var n=e.call(this,t,u.UiAppFeatureType.DASHBOARD_COG_MENU)||this;return n.onRequest((function(){return l})),n}return i(t,e),t.prototype.onRequest=function(e){var t=this;return this.client.framePostClient.onRequest(u.UiAppRequestType.GET_DASHBOARD_COG_MENU_ITEMS,(function(n){return o(t,void 0,void 0,(function(){var t=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return r.sent(),[4,e(n)];case 2:return[2,{items:r.sent().items.filter((function(e){try{c.validateKey(e)}catch(e){return t.client.logger.error(e.message),!1}return!0}))}]}}))}))})),function(){t.onRequest((function(){return l}))}},t}(a.DDFeatureClient);t.DDDashboardCogMenuClient=f},730:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDDashboardClient=void 0;var o=n(601),s=function(){function e(e){this.client=e}return e.prototype.setCursor=function(e){var t=e.timestamp;return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.client.framePostClient.request(o.UiAppRequestType.SET_DASHBOARD_CURSOR,{timestamp:t})]}))}))},e.prototype.setTimeframe=function(e){var t=e.timeframe;return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.client.framePostClient.request(o.UiAppRequestType.SET_DASHBOARD_TIMEFRAME,{timeframe:t})]}))}))},e}();t.DDDashboardClient=s},114:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDEventsClient=void 0;var o=n(601),s=n(974),u=function(){function e(e){this.client=e}return e.prototype.on=function(e,t){var n=this,r=this.client.framePostClient.on(e,t);return this.client.getContext().then((function(t){t&&(s.isEventEnabled(e,t.app.features)||(r(),n.client.logger.error("Your app does not have the required features enabled to respond to events of type "+e+".")))})).catch((function(){})),r},e.prototype.onCustom=function(e,t){return this.on(o.UiAppEventType.CUSTOM_EVENT,(function(n){n.eventType===e&&t(n.data)}))},e.prototype.broadcast=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.client.framePostClient.request(o.UiAppRequestType.EVENT_BROADCAST,{eventType:e,data:t})]}))}))},e}();t.DDEventsClient=u},309:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dashboardCogMenu=void 0;var r=n(601);t.dashboardCogMenu={type:r.UiAppFeatureType.DASHBOARD_COG_MENU,events:[r.UiAppEventType.DASHBOARD_COG_MENU_CLICK]}},828:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dashboardCustomWidget=void 0;var r=n(601);t.dashboardCustomWidget={type:r.UiAppFeatureType.DASHBOARD_CUSTOM_WIDGET,events:[r.UiAppEventType.DASHBOARD_CUSTOM_WIDGET_OPTIONS_CHANGE,r.UiAppEventType.DASHBOARD_TEMPLATE_VAR_CHANGE,r.UiAppEventType.DASHBOARD_TIMEFRAME_CHANGE,r.UiAppEventType.DASHBOARD_CURSOR_CHANGE]}},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.features=void 0;var r=n(309),i=n(828),o=n(938),s=n(713),u=n(684);t.features=[r.dashboardCogMenu,i.dashboardCustomWidget,o.modals,s.sidePanels,u.widgetContextMenu]},938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modals=void 0;var r=n(601);t.modals={type:r.UiAppFeatureType.MODALS,events:[r.UiAppEventType.MODAL_CLOSE,r.UiAppEventType.MODAL_CANCEL,r.UiAppEventType.MODAL_ACTION]}},713:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sidePanels=void 0;var r=n(601);t.sidePanels={type:r.UiAppFeatureType.SIDE_PANELS,events:[r.UiAppEventType.SIDE_PANEL_CLOSE]}},684:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.widgetContextMenu=void 0;var r=n(601);t.widgetContextMenu={type:r.UiAppFeatureType.WIDGET_CONTEXT_MENU,events:[r.UiAppEventType.WIDGET_CONTEXT_MENU_CLICK]}},607:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=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.DDClient=t.init=void 0;var o,s=n(883);Object.defineProperty(t,"DDClient",{enumerable:!0,get:function(){return s.DDClient}}),t.init=function(e,t){return o||(o=new s.DDClient(e)),t&&o.getContext().then(t),o},i(n(699),t),i(n(601),t)},391:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDLocationClient=void 0;var o=n(601),s=function(){function e(e){this.client=e}return e.prototype.goTo=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(o.UiAppRequestType.NAVIGATE_TOP,{url:e})]}))}))},e}();t.DDLocationClient=s},955:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDModalClient=void 0;var u=n(601),a=n(791),c=n(974),l=function(e){function t(t){return e.call(this,t,u.UiAppFeatureType.MODALS)||this}return i(t,e),t.prototype.open=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return t.sent(),c.validateKey(e)?[2,this.client.framePostClient.request(u.UiAppRequestType.OPEN_MODAL,{definition:e})]:[2]}}))}))},t.prototype.close=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return t.sent(),[2,this.client.framePostClient.request(u.UiAppRequestType.CLOSE_MODAL,e)]}}))}))},t}(a.DDFeatureClient);t.DDModalClient=l},979:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.DDSecretsClient=void 0;var s=n(601),u=function(){return o(Array(window.localStorage.length)).map((function(e,t){return window.localStorage.key(t)}))},a=function(){function e(e){this.client=e,this.registerRequestHandlers()}return e.prototype.registerRequestHandlers=function(){this.client.framePostClient.onRequest(s.UiAppRequestType.STORE_SECRET,this.handleStoreSecretRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.LOAD_SECRET,this.handleLoadSecretRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.LOAD_ALL_SECRETS,this.handleLoadAllSecretsRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.REMOVE_ALL_SECRETS,this.handleRemoveAllSecretsRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.REMOVE_SECRET,this.handleRemoveSecretRequest.bind(this))},e.prototype.handleStoreSecretRequest=function(e){var t=e.key,n=e.secret;try{return window.localStorage.setItem(t,n),!0}catch(e){return!1}},e.prototype.handleLoadSecretRequest=function(e){var t=e.key;try{return window.localStorage.getItem(t)}catch(e){return!1}},e.prototype.handleLoadAllSecretsRequest=function(e){var t=e.prefix;try{return u().filter((function(e){return e&&e.startsWith(t)})).reduce((function(e,t){return e[t]=window.localStorage.getItem(t),e}),{})}catch(e){return!1}},e.prototype.handleRemoveSecretRequest=function(e){var t=e.key;try{return window.localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype.handleRemoveAllSecretsRequest=function(e){var t=e.prefix;try{return u().filter((function(e){return e&&e.startsWith(t)})).forEach((function(e){return e&&window.localStorage.removeItem(e)})),!0}catch(e){return!1}},e.prototype.get=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(s.UiAppRequestType.GET_SECRET,e)]}))}))},e.prototype.set=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.client.framePostClient.request(s.UiAppRequestType.SET_SECRET,{key:e,data:t})]}))}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(s.UiAppRequestType.REMOVE_SECRET_PUBLIC,e)]}))}))},e}();t.DDSecretsClient=a},791:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDFeatureClient=void 0;var o=n(974),s=function(){function e(e,t){this.client=e,this.featureType=t}return e.prototype.isEnabled=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.client.getContext()];case 1:return(e=n.sent())?(t=e.app.features,[2,o.isFeatureEnabled(this.featureType,t)]):[2,!1]}}))}))},e.prototype.validateFeatureIsEnabled=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.client.framePostClient.handshake()];case 1:return e.sent(),[4,this.isEnabled()];case 2:if(!e.sent())throw new Error('Please enable the "'+this.featureType+'" feature to access this functionality.');return[2]}}))}))},e}();t.DDFeatureClient=s},964:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDSidePanelClient=void 0;var u=n(601),a=n(791),c=n(974),l=function(e){function t(t){return e.call(this,t,u.UiAppFeatureType.SIDE_PANELS)||this}return i(t,e),t.prototype.open=function(e,t){return o(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return n.sent(),c.validateKey(e)?[2,this.client.framePostClient.request(u.UiAppRequestType.OPEN_SIDE_PANEL,{definition:e,args:t})]:[2]}}))}))},t.prototype.close=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return t.sent(),[2,this.client.framePostClient.request(u.UiAppRequestType.CLOSE_SIDE_PANEL,e)]}}))}))},t}(a.DDFeatureClient);t.DDSidePanelClient=l},699:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},645:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var n=function(){function e(e){this.client=e}return e.prototype.getPrefix=function(){return"dd-apps@"+window.location.href+": "},e.prototype.log=function(e){if(this.client.debug)return console.log(""+this.getPrefix()+e)},e.prototype.error=function(e){if(this.client.debug)return console.error(""+this.getPrefix()+e)},e}();t.Logger=n},974:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKey=t.isDefinitionWithKey=t.isEventEnabled=t.getFeatureTypesByEvent=t.isFeatureEnabled=void 0;var r,i,o,s=n(601),u=n(582);t.isFeatureEnabled=function(e,t){return t.includes(e)},t.getFeatureTypesByEvent=(r=function(){var e=new Map;return u.features.forEach((function(t){t.events.forEach((function(n){e.has(n)||e.set(n,new Set),e.get(n).add(t.type)}))})),e},o=!1,function(){return o||(i=r(),o=!0),i}),t.isEventEnabled=function(e,n){if(s.enabledEvents.has(e))return!0;var r=t.getFeatureTypesByEvent().get(e);return!!r&&n.some((function(e){return r.has(e)}))},t.isDefinitionWithKey=function(e){return!!e.key},t.validateKey=function(e){if(!t.isDefinitionWithKey(e))throw new Error('Definition missing required field ".key"');return!0}},177:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDWidgetContextMenuClient=void 0;var u=n(601),a=n(791),c=n(974),l={items:[]},f=function(e){function t(t){var n=e.call(this,t,u.UiAppFeatureType.WIDGET_CONTEXT_MENU)||this;return n.onRequest((function(){return l})),n}return i(t,e),t.prototype.onRequest=function(e){var t=this;return this.client.framePostClient.onRequest(u.UiAppRequestType.GET_WIDGET_CONTEXT_MENU_ITEMS,(function(n){return o(t,void 0,void 0,(function(){var t=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return r.sent(),[4,e(n)];case 2:return[2,{items:r.sent().items.filter((function(e){try{c.validateKey(e)}catch(e){return t.client.logger.error(e.message),!1}return!0}))}]}}))}))})),function(){t.onRequest((function(){return l}))}},t}(a.DDFeatureClient);t.DDWidgetContextMenuClient=f}},t={},function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(607);var e,t}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DD_SDK=t():e.DD_SDK=t()}(self,(function(){return e={145:function(e){self,e.exports=function(){"use strict";var e={573:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChildClient=void 0;var o=n(601),s=n(473),u=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.context=t.context||null,n.initListener=n.initListener.bind(n),window.addEventListener("message",n.initListener),n.profile&&n.onRequest(o.REQUEST_KEY_GET_PROFILE,(function(){return n.profiler.getEvents()})),n.setInitTimer(),n}return i(t,e),t.prototype.getLogger=function(){return s.getLogger("child-client",this.debug)},t.prototype.onChannelInit=function(e){window.removeEventListener("message",this.initListener),this.messagePort=e.ports[0];var t=this.getInitMessage(this.context);this.messagePort.postMessage(t),this.profiler.logEvent(o.ProfileEventType.POST_MESSAGE,t)},t.prototype.destroy=function(){this.messagePort&&this.messagePort.close(),this.initTimer&&clearTimeout(this.initTimer),window.removeEventListener("message",this.initListener)},t}(n(416).SharedClient);t.ChildClient=u},601:function(e,t){var n,r,i,o;Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_KEY_GET_PROFILE=t.DEFAULT_REQUEST_TIMEOUT=t.SerializationType=t.TransactionDirection=t.ProfileEventType=t.MessageAPIVersion=t.MessageType=void 0,(o=t.MessageType||(t.MessageType={})).CHANNEL_INIT="channel_init",o.EVENT="event",o.REQUEST="request",o.RESPONSE="response",o.ERROR_RESPONSE="error_response",(t.MessageAPIVersion||(t.MessageAPIVersion={})).v1="framepost/v1",(i=t.ProfileEventType||(t.ProfileEventType={})).POST_MESSAGE="post_message",i.RECEIVE_MESSAGE="receive_message",(r=t.TransactionDirection||(t.TransactionDirection={})).UP="up",r.DOWN="down",(n=t.SerializationType||(t.SerializationType={})).NONE="none",n.ERROR="error",t.DEFAULT_REQUEST_TIMEOUT=2e4,t.REQUEST_KEY_GET_PROFILE="framepost_get_profile"},758:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.RequestTimeoutError=t.HandshakeTimeoutError=void 0;var i=function(e){function t(){var t=e.call(this,"Handshake timed out")||this;return t.name="HandshakeTimeoutError",t}return r(t,e),t}(Error);t.HandshakeTimeoutError=i;var o=function(e){function t(){var t=e.call(this,"Request timed out")||this;return t.name="RequestTimeoutError",t}return r(t,e),t}(Error);t.RequestTimeoutError=o},607:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=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.ParentClient=t.ChildClient=void 0;var o=n(573);Object.defineProperty(t,"ChildClient",{enumerable:!0,get:function(){return o.ChildClient}});var s=n(166);Object.defineProperty(t,"ParentClient",{enumerable:!0,get:function(){return s.ParentClient}}),i(n(699),t),i(n(758),t)},473:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getLogger=void 0,t.getLogger=function(e,t){return t?{log:function(t){return console.log(e+": "+t)},error:function(t){return console.error(e+": "+t)}}:{log:function(){},error:function(){}}}},166:function(e,t,n){var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParentClient=void 0;var u=n(601),a=n(473),c=n(416),l=n(593),f=function(e){function t(t){return void 0===t&&(t={}),e.call(this,t)||this}return i(t,e),t.prototype.requestChannel=function(e,t){e.contentWindow&&this.handleRequstChannel(e.contentWindow,e.src,t)},t.prototype.requestChannelWithPopup=function(e,t,n){e.opener&&this.handleRequstChannel(e,t,n)},t.prototype.handleRequstChannel=function(e,t,n){this.url=new URL(t);var r=new MessageChannel;this.messagePort=r.port1;var i=this.getInitMessage(n);this.messagePort.onmessage=this.initListener.bind(this),this.setInitTimer(),e.postMessage(i,this.url.origin,[r.port2]),this.profiler.logEvent(u.ProfileEventType.POST_MESSAGE,i)},t.prototype.getMessageProfile=function(){return o(this,void 0,void 0,(function(){var e,t;return s(this,(function(n){switch(n.label){case 0:return[4,this.request(u.REQUEST_KEY_GET_PROFILE)];case 1:return e=n.sent(),t=this.profiler.getEvents(),[2,l.profileMessages(t,e)]}}))}))},t.prototype.onChannelInit=function(){},t.prototype.getLogger=function(){return a.getLogger("parent-client",this.debug)},t.prototype.destroy=function(){this.messagePort&&this.messagePort.close(),this.initTimer&&clearTimeout(this.initTimer)},t}(c.SharedClient);t.ParentClient=f},819:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getProfiler=void 0,t.getProfiler=function(e){var t=[];return{logEvent:function(n,r){e&&t.push({type:n,message:r,date:new Date})},getEvents:function(){return t}}}},416:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SharedClient=void 0;var o=n(601),s=n(758),u=n(819),a=n(593),c=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.debug,i=void 0!==r&&r,s=n.profile,c=void 0!==s&&s,l=n.handshakeTimeout,f=n.requestTimeout,p=void 0===f?o.DEFAULT_REQUEST_TIMEOUT:f;this.debug=i,this.profile=c,this.handshakeTimeout=void 0!==l?l:p,this.requestTimeout=p,this.channel=a.defer(),this.eventSubscriptions={},this.responseSubscriptions={},this.requestSubscriptions={},this.logger=this.getLogger(),this.profiler=u.getProfiler(c),this.channel.promise.then((function(){t.logger.log("Secure parent <-> child channel established")})).catch((function(e){t.logger.log(e)}))}return e.prototype.send=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.handshake()];case 1:return n.sent(),[3,3];case 2:return n.sent(),[2,null];case 3:return[2,this.postMessage(o.MessageType.EVENT,e,t)]}}))}))},e.prototype.on=function(e,t){var n=this;this.eventSubscriptions[e]||(this.eventSubscriptions[e]={});var r=a.randomInsecureId(8);return this.eventSubscriptions[e][r]=t,this.logger.log('Registered handler for event "'+e+'"'),function(){n.eventSubscriptions[e]=a.omit(n.eventSubscriptions[e],r),n.logger.log("Unsubscribed handler for event "+e)}},e.prototype.request=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){var r,u,c=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.postMessage(o.MessageType.REQUEST,e,t)];case 1:return r=i.sent(),u=function(){c.responseSubscriptions=a.omit(c.responseSubscriptions,r.id)},[2,new Promise((function(e,t){var i;c.responseSubscriptions[r.id]=function(n,r){clearTimeout(i),u(),r.type===o.MessageType.ERROR_RESPONSE?t(n):e(n)},i=setTimeout((function(){u(),t(new s.RequestTimeoutError)}),n.timeout||c.requestTimeout)}))]}}))}))},e.prototype.onRequest=function(e,t){var n=this;return this.requestSubscriptions[e]=function(s,u){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,,4]),[4,this.handshake()];case 1:return i.sent(),[4,t(s,u)];case 2:return n=i.sent(),this.postMessage(o.MessageType.RESPONSE,e,n,u.id),[3,4];case 3:return r=i.sent(),this.postMessage(o.MessageType.ERROR_RESPONSE,e,r,u.id),[3,4];case 4:return[2]}}))}))},function(){n.requestSubscriptions=a.omit(n.requestSubscriptions,e)}},e.prototype.getContext=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.channel.promise];case 1:return[2,e.sent().context];case 2:return e.sent(),[2,null];case 3:return[2]}}))}))},e.prototype.handshake=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.channel.promise];case 1:return[2,e.sent().context]}}))}))},e.prototype.messageListener=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.channel.promise];case 1:case 2:return r.sent(),[3,3];case 3:if(t=this.isValidMessage(e),n=a.deserialize(e.data),t){switch(n.type){case o.MessageType.EVENT:this.handleEvent(n);break;case o.MessageType.REQUEST:this.handleRequest(n);break;case o.MessageType.ERROR_RESPONSE:case o.MessageType.RESPONSE:this.handleResponse(n)}this.profiler.logEvent(o.ProfileEventType.RECEIVE_MESSAGE,n)}else this.logger.error("Invalid message format. Skipping.");return[2]}}))}))},e.prototype.handleEvent=function(e){var t=this.eventSubscriptions[e.key];t&&Object.values(t).forEach((function(t){return t(e.data,e)}))},e.prototype.handleRequest=function(e){var t=this.requestSubscriptions[e.key];t&&(t(e.data,e),this.logger.log("Handled request type "+e.key))},e.prototype.handleResponse=function(e){var t=e.requestId,n=t&&this.responseSubscriptions[t];n&&n(e.data,e)},e.prototype.postMessage=function(e,t,n,s){return r(this,void 0,void 0,(function(){var r,u;return i(this,(function(i){switch(i.label){case 0:return[4,this.channel.promise];case 1:return r=i.sent().port,u=a.serialize({type:e,apiVersion:o.MessageAPIVersion.v1,key:t,data:n,id:a.randomInsecureId(),requestId:s}),r.postMessage(u),this.profiler.logEvent(o.ProfileEventType.POST_MESSAGE,u),[2,u]}}))}))},e.prototype.setInitTimer=function(){var e=this;this.initTimer=setTimeout((function(){e.channel.reject(new s.HandshakeTimeoutError),e.destroy()}),this.handshakeTimeout)},e.prototype.initListener=function(e){this.isInitMessage(e)?(this.profiler.logEvent(o.ProfileEventType.RECEIVE_MESSAGE,e.data),this.initTimer&&clearTimeout(this.initTimer),this.onChannelInit(e),this.messagePort&&(this.messagePort.onmessage=this.messageListener.bind(this)),this.resolveChannel(e)):this.logger.error("Invalid message format. Skipping.")},e.prototype.isValidMessage=function(e){var t=e.data;return t.type&&t.id&&t.apiVersion===o.MessageAPIVersion.v1},e.prototype.isInitMessage=function(e){return this.isValidMessage(e)&&e.data.type===o.MessageType.CHANNEL_INIT},e.prototype.resolveChannel=function(e){if(this.messagePort){var t={port:this.messagePort,origin:e.origin,context:e.data.data};this.channel.resolve(t)}},e.prototype.getInitMessage=function(e){return a.serialize({type:o.MessageType.CHANNEL_INIT,apiVersion:o.MessageAPIVersion.v1,key:"",data:e,id:a.randomInsecureId()})},e}();t.SharedClient=c},699:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},593:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},o=this&&this.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.deserialize=t.serialize=t.profileMessages=t.omit=t.randomInsecureId=t.defer=void 0;var s=n(601),u=n(758);t.defer=function(){var e=function(){},t=function(){},n=new Promise((function(n,r){e=n,t=r}));return{resolve:e,reject:t,promise:n}},t.randomInsecureId=function(e){return void 0===e&&(e=16),o([],Array(e)).map((function(){return(~~(36*Math.random())).toString(36)})).join("")},t.omit=function(e,t){var n=e,r=t;return n[r],i(n,["symbol"==typeof r?r:r+""])},t.profileMessages=function(e,t){var n,r,i=e.concat(t).filter((function(e){return e.type===s.ProfileEventType.RECEIVE_MESSAGE})),o=(n=function(e){return e.message.id},r={},i.forEach((function(e){r[n(e)]=e})),r),u=[],a=function(e){var t=e.date,n=e.message,r={id:n.id,direction:s.TransactionDirection.DOWN,postTime:t,message:n},i=o[n.id];return i&&(r.receiveTime=i.date,r.duration=(i.date.getTime()-t.getTime())/1e3),r};return e.filter((function(e){return e.type===s.ProfileEventType.POST_MESSAGE})).forEach((function(e){var t=a(e);u.push(t)})),t.filter((function(e){return e.type===s.ProfileEventType.POST_MESSAGE})).forEach((function(e){var t=a(e);t.direction=s.TransactionDirection.UP,u.push(t)})),u.filter((function(e){return e.message.key!==s.REQUEST_KEY_GET_PROFILE})).sort((function(e,t){return e.postTime.getTime()-t.postTime.getTime()}))};var a=function(e){var t=e.name,n=e.message,r=e.stack;switch(t){case u.HandshakeTimeoutError.name:return new u.HandshakeTimeoutError;case u.RequestTimeoutError.name:return new u.RequestTimeoutError;default:var i=new Error(n);return i.name=t,i.stack=r,i}};t.serialize=function(e){var t,n=e.data,i=s.SerializationType.NONE;return n instanceof Error&&(i=s.SerializationType.ERROR,n={message:(t=n).message,name:t.name,stack:t.stack}),r(r({},e),{serialization:i,data:n})},t.deserialize=function(e){return e.serialization===s.SerializationType.ERROR?r(r({},e),{data:a(e.data)}):e}}},t={};return function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(607)}()},724:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDAPIClient=void 0;var o=n(601),s=n(152),u=function(){function e(e){this.client=e,this.v1=new s.DDAPIV1Client(this)}return e.prototype.request=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(o.UiAppRequestType.API_REQUEST,e)]}))}))},e.prototype.get=function(e,t){return void 0===t&&(t={}),r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request({method:o.IFrameApiRequestMethod.GET,resource:e,options:t,body:null})]}))}))},e.prototype.post=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.request({method:o.IFrameApiRequestMethod.POST,resource:e,options:n,body:t})]}))}))},e.prototype.put=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.request({method:o.IFrameApiRequestMethod.PUT,resource:e,options:n,body:t})]}))}))},e.prototype.patch=function(e,t,n){return void 0===n&&(n={}),r(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.request({method:o.IFrameApiRequestMethod.PATCH,resource:e,options:n,body:t})]}))}))},e.prototype.delete=function(e,t){return void 0===t&&(t={}),r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request({method:o.IFrameApiRequestMethod.DELETE,resource:e,options:t,body:null})]}))}))},e}();t.DDAPIClient=u},152:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DDAPIV1Client=void 0;var r=n(445);t.DDAPIV1Client=function(e){this.metrics=new r.DDMetricsAPIClient(e)}},445:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DDMetricsAPIClient=void 0;var n=function(){function e(e){this.apiClient=e}return e.prototype.getMetadata=function(e){return this.apiClient.get("/api/v1/metrics/"+e)},e.prototype.listActiveMetrics=function(e){return this.apiClient.get("/api/v1/metrics",{params:e})},e.prototype.search=function(e){return this.apiClient.get("/api/v1/search",{params:e})},e.prototype.query=function(e){return this.apiClient.get("/api/v1/query",{params:e})},e}();t.DDMetricsAPIClient=n},442:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDAuthClient=void 0;var o=n(601),s={isAuthenticated:!1,status:o.AuthStateStatus.NONE,args:{}},u=function(){function e(e,t){this.client=e,this.authState=s,t&&(this.options=t),this.client.framePostClient.onRequest(o.UiAppRequestType.CHECK_AUTH_STATE,this.checkAuthState.bind(this))}return e.prototype.checkAuthState=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.options?[4,this.options.authStateCallback()]:(this.client.logger.error("Auth Provider is not set"),[2,null]);case 1:return"boolean"==typeof(e=t.sent())?[2,{isAuthenticated:e}]:[2,e]}}))}))},e.prototype.getAuthState=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.client.getContext()];case 1:return e.sent(),[2,this.client.framePostClient.request(o.UiAppRequestType.GET_AUTH_STATE,{forceUpdate:!1})]}}))}))},e.prototype.updateAuthState=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.client.getContext()];case 1:return e.sent(),[2,this.client.framePostClient.request(o.UiAppRequestType.GET_AUTH_STATE,{forceUpdate:!0})]}}))}))},e}();t.DDAuthClient=u},883:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.DDClient=void 0;var s=n(145),u=n(724),a=n(442),c=n(601),l=n(123),f=n(730),p=n(114),h=n(391),d=n(955),y=n(979),v=n(964),_=n(645),E=n(177),b={host:c.Host.STAGE,debug:!1},T=function(){function e(e){var t,n=this;if(void 0===e&&(e={}),this.host=e.host||b.host,this.debug=e.debug||b.debug,e.authProvider){var r=e.authProvider;r.authStateCallback,t=o(r,["authStateCallback"])}this.framePostClient=new s.ChildClient({debug:c.FramePostClientSettings.DEBUG,requestTimeout:c.FramePostClientSettings.CLIENT_REQUEST_TIMEOUT,profile:this.debug,context:{sdkVersion:"0.12.4",authStateOptions:t}}),this.logger=new _.Logger(this),this.api=new u.DDAPIClient(this),this.auth=new a.DDAuthClient(this,e.authProvider),this.events=new p.DDEventsClient(this),this.dashboard=new f.DDDashboardClient(this),this.dashboardCogMenu=new l.DDDashboardCogMenuClient(this),this.location=new h.DDLocationClient(this),this.modal=new d.DDModalClient(this),this.sidePanel=new v.DDSidePanelClient(this),this.secrets=new y.DDSecretsClient(this),this.widgetContextMenu=new E.DDWidgetContextMenuClient(this),this.events.on(c.UiAppEventType.CONTEXT_CHANGE,(function(e){n.context=e,n.syncDebugMode(n.context)})),this.getContext().then((function(e){n.syncDebugMode(e)}))}return e.prototype.getContext=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.context?[3,2]:(e=this,[4,this.framePostClient.handshake()]);case 1:e.context=t.sent(),t.label=2;case 2:return[2,this.context]}}))}))},e.prototype.syncDebugMode=function(e){var t;this.debug=(null===(t=null==e?void 0:e.app)||void 0===t?void 0:t.debug)||this.debug},e}();t.DDClient=T},601:function(e,t){"use strict";var n,r,i,o,s,u,a,c,l,f;Object.defineProperty(t,"__esModule",{value:!0}),t.ColorTheme=t.AuthStateStatus=t.MenuItemType=t.ModalActionLevel=t.ModalSize=t.enabledEvents=t.UiAppRequestType=t.FramePostClientSettings=t.IFrameApiRequestMethod=t.UiAppEventType=t.UiAppFeatureType=t.Host=void 0,(f=t.Host||(t.Host={})).PROD="https://app.datadoghq.com/",f.STAGE="https://dd.datad0g.com/",(l=t.UiAppFeatureType||(t.UiAppFeatureType={})).DASHBOARD_COG_MENU="dashboard_cog_menu",l.DASHBOARD_CUSTOM_WIDGET="dashboard_custom_widget",l.MODALS="modals",l.SIDE_PANELS="side_panels",l.WIDGET_CONTEXT_MENU="widget_context_menu",function(e){e.CUSTOM_EVENT="custom_event",e.CONTEXT_CHANGE="context_change",e.DASHBOARD_COG_MENU_CLICK="dashboard_cog_menu_click",e.DASHBOARD_TIMEFRAME_CHANGE="dashboard_timeframe_change",e.DASHBOARD_CURSOR_CHANGE="dashboard_cursor_change",e.DASHBOARD_TEMPLATE_VAR_CHANGE="dashboard_template_var_change",e.DASHBOARD_CUSTOM_WIDGET_OPTIONS_CHANGE="dashboard_custom_widget_options_change",e.MODAL_CLOSE="modal_close",e.MODAL_ACTION="modal_action",e.MODAL_CANCEL="modal_cancel",e.SIDE_PANEL_CLOSE="side_panel_close",e.WIDGET_CONTEXT_MENU_CLICK="widget_context_menu_click",e.AUTH_STATE_CHANGE="auth_state_change"}(n=t.UiAppEventType||(t.UiAppEventType={})),(c=t.IFrameApiRequestMethod||(t.IFrameApiRequestMethod={})).GET="GET",c.POST="POST",c.PUT="PUT",c.PATCH="PATCH",c.DELETE="DELETE",t.FramePostClientSettings=Object.freeze({DEBUG:!1,CLIENT_REQUEST_TIMEOUT:1e4}),(a=t.UiAppRequestType||(t.UiAppRequestType={})).API_REQUEST="api_request",a.EVENT_BROADCAST="event_broadcast",a.NAVIGATE_TOP="navigate_top",a.OPEN_MODAL="open_modal",a.CLOSE_MODAL="close_modal",a.OPEN_SIDE_PANEL="open_side_panel",a.CLOSE_SIDE_PANEL="close_side_panel",a.STORE_SECRET="store_secret",a.REMOVE_SECRET="remove_secret",a.LOAD_ALL_SECRETS="load_all_secrets",a.REMOVE_ALL_SECRETS="remove_all_secrets",a.LOAD_SECRET="load_secret",a.GET_SECRET="get_secret",a.SET_SECRET="set_secret",a.REMOVE_SECRET_PUBLIC="remove_secret_public",a.GET_WIDGET_CONTEXT_MENU_ITEMS="get_widget_context_menu_items",a.GET_DASHBOARD_COG_MENU_ITEMS="get_dashboard_cog_menu_items",a.CHECK_AUTH_STATE="check_auth_state",a.GET_AUTH_STATE="get_auth_state",a.SET_DASHBOARD_TIMEFRAME="set_dashboard_timeframe",a.SET_DASHBOARD_CURSOR="set_dashboard_cursor",t.enabledEvents=new Set([n.CUSTOM_EVENT,n.CONTEXT_CHANGE,n.AUTH_STATE_CHANGE]),(u=t.ModalSize||(t.ModalSize={})).SMALL="sm",u.MEDIUM="md",u.LARGE="lg",(s=t.ModalActionLevel||(t.ModalActionLevel={})).PRIMARY="primary",s.SUCCESS="success",s.WARNING="warning",s.DANGER="danger",(o=t.MenuItemType||(t.MenuItemType={})).LINK="link",o.EVENT="event",(i=t.AuthStateStatus||(t.AuthStateStatus={})).NONE="none",i.SET="set",i.INITIATED="initiated",i.SUCCESS="success",i.FAILED="failed",(r=t.ColorTheme||(t.ColorTheme={})).dark="dark",r.light="light"},123:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDDashboardCogMenuClient=void 0;var u=n(601),a=n(791),c=n(974),l={items:[]},f=function(e){function t(t){var n=e.call(this,t,u.UiAppFeatureType.DASHBOARD_COG_MENU)||this;return n.onRequest((function(){return l})),n}return i(t,e),t.prototype.onRequest=function(e){var t=this;return this.client.framePostClient.onRequest(u.UiAppRequestType.GET_DASHBOARD_COG_MENU_ITEMS,(function(n){return o(t,void 0,void 0,(function(){var t=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return r.sent(),[4,e(n)];case 2:return[2,{items:r.sent().items.filter((function(e){try{c.validateKey(e)}catch(e){return t.client.logger.error(e.message),!1}return!0}))}]}}))}))})),function(){t.onRequest((function(){return l}))}},t}(a.DDFeatureClient);t.DDDashboardCogMenuClient=f},730:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDDashboardClient=void 0;var o=n(601),s=function(){function e(e){this.client=e}return e.prototype.setCursor=function(e){var t=e.timestamp;return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.client.framePostClient.request(o.UiAppRequestType.SET_DASHBOARD_CURSOR,{timestamp:t})]}))}))},e.prototype.setTimeframe=function(e){var t=e.timeframe;return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.client.framePostClient.request(o.UiAppRequestType.SET_DASHBOARD_TIMEFRAME,{timeframe:t})]}))}))},e}();t.DDDashboardClient=s},114:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDEventsClient=void 0;var o=n(601),s=n(974),u=function(){function e(e){this.client=e}return e.prototype.on=function(e,t){var n=this,r=this.client.framePostClient.on(e,t);return this.client.getContext().then((function(t){t&&(s.isEventEnabled(e,t.app.features)||(r(),n.client.logger.error("Your app does not have the required features enabled to respond to events of type "+e+".")))})).catch((function(){})),r},e.prototype.onCustom=function(e,t){return this.on(o.UiAppEventType.CUSTOM_EVENT,(function(n){n.eventType===e&&t(n.data)}))},e.prototype.broadcast=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.client.framePostClient.request(o.UiAppRequestType.EVENT_BROADCAST,{eventType:e,data:t})]}))}))},e}();t.DDEventsClient=u},309:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dashboardCogMenu=void 0;var r=n(601);t.dashboardCogMenu={type:r.UiAppFeatureType.DASHBOARD_COG_MENU,events:[r.UiAppEventType.DASHBOARD_COG_MENU_CLICK]}},828:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dashboardCustomWidget=void 0;var r=n(601);t.dashboardCustomWidget={type:r.UiAppFeatureType.DASHBOARD_CUSTOM_WIDGET,events:[r.UiAppEventType.DASHBOARD_CUSTOM_WIDGET_OPTIONS_CHANGE,r.UiAppEventType.DASHBOARD_TEMPLATE_VAR_CHANGE,r.UiAppEventType.DASHBOARD_TIMEFRAME_CHANGE,r.UiAppEventType.DASHBOARD_CURSOR_CHANGE]}},582:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.features=void 0;var r=n(309),i=n(828),o=n(938),s=n(713),u=n(684);t.features=[r.dashboardCogMenu,i.dashboardCustomWidget,o.modals,s.sidePanels,u.widgetContextMenu]},938:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.modals=void 0;var r=n(601);t.modals={type:r.UiAppFeatureType.MODALS,events:[r.UiAppEventType.MODAL_CLOSE,r.UiAppEventType.MODAL_CANCEL,r.UiAppEventType.MODAL_ACTION]}},713:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sidePanels=void 0;var r=n(601);t.sidePanels={type:r.UiAppFeatureType.SIDE_PANELS,events:[r.UiAppEventType.SIDE_PANEL_CLOSE]}},684:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.widgetContextMenu=void 0;var r=n(601);t.widgetContextMenu={type:r.UiAppFeatureType.WIDGET_CONTEXT_MENU,events:[r.UiAppEventType.WIDGET_CONTEXT_MENU_CLICK]}},607:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=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.DDClient=t.init=void 0;var o,s=n(883);Object.defineProperty(t,"DDClient",{enumerable:!0,get:function(){return s.DDClient}}),t.init=function(e,t){return o||(o=new s.DDClient(e)),t&&o.getContext().then(t),o},i(n(699),t),i(n(601),t)},391:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDLocationClient=void 0;var o=n(601),s=function(){function e(e){this.client=e}return e.prototype.goTo=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(o.UiAppRequestType.NAVIGATE_TOP,{url:e})]}))}))},e}();t.DDLocationClient=s},955:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDModalClient=void 0;var u=n(601),a=n(791),c=n(974),l=function(e){function t(t){return e.call(this,t,u.UiAppFeatureType.MODALS)||this}return i(t,e),t.prototype.open=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return t.sent(),c.validateKey(e)?[2,this.client.framePostClient.request(u.UiAppRequestType.OPEN_MODAL,{definition:e})]:[2]}}))}))},t.prototype.close=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return t.sent(),[2,this.client.framePostClient.request(u.UiAppRequestType.CLOSE_MODAL,e)]}}))}))},t}(a.DDFeatureClient);t.DDModalClient=l},979:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.DDSecretsClient=void 0;var s=n(601),u=function(){return o(Array(window.localStorage.length)).map((function(e,t){return window.localStorage.key(t)}))},a=function(){function e(e){this.client=e,this.registerRequestHandlers()}return e.prototype.registerRequestHandlers=function(){this.client.framePostClient.onRequest(s.UiAppRequestType.STORE_SECRET,this.handleStoreSecretRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.LOAD_SECRET,this.handleLoadSecretRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.LOAD_ALL_SECRETS,this.handleLoadAllSecretsRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.REMOVE_ALL_SECRETS,this.handleRemoveAllSecretsRequest.bind(this)),this.client.framePostClient.onRequest(s.UiAppRequestType.REMOVE_SECRET,this.handleRemoveSecretRequest.bind(this))},e.prototype.handleStoreSecretRequest=function(e){var t=e.key,n=e.secret;try{return window.localStorage.setItem(t,n),!0}catch(e){return!1}},e.prototype.handleLoadSecretRequest=function(e){var t=e.key;try{return window.localStorage.getItem(t)}catch(e){return!1}},e.prototype.handleLoadAllSecretsRequest=function(e){var t=e.prefix;try{return u().filter((function(e){return e&&e.startsWith(t)})).reduce((function(e,t){return e[t]=window.localStorage.getItem(t),e}),{})}catch(e){return!1}},e.prototype.handleRemoveSecretRequest=function(e){var t=e.key;try{return window.localStorage.removeItem(t),!0}catch(e){return!1}},e.prototype.handleRemoveAllSecretsRequest=function(e){var t=e.prefix;try{return u().filter((function(e){return e&&e.startsWith(t)})).forEach((function(e){return e&&window.localStorage.removeItem(e)})),!0}catch(e){return!1}},e.prototype.get=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(s.UiAppRequestType.GET_SECRET,e)]}))}))},e.prototype.set=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.client.framePostClient.request(s.UiAppRequestType.SET_SECRET,{key:e,data:t})]}))}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,this.client.framePostClient.request(s.UiAppRequestType.REMOVE_SECRET_PUBLIC,e)]}))}))},e}();t.DDSecretsClient=a},791:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDFeatureClient=void 0;var o=n(974),s=function(){function e(e,t){this.client=e,this.featureType=t}return e.prototype.isEnabled=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.client.getContext()];case 1:return(e=n.sent())?(t=e.app.features,[2,o.isFeatureEnabled(this.featureType,t)]):[2,!1]}}))}))},e.prototype.validateFeatureIsEnabled=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.client.framePostClient.handshake()];case 1:return e.sent(),[4,this.isEnabled()];case 2:if(!e.sent())throw new Error('Please enable the "'+this.featureType+'" feature to access this functionality.');return[2]}}))}))},e}();t.DDFeatureClient=s},964:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDSidePanelClient=void 0;var u=n(601),a=n(791),c=n(974),l=function(e){function t(t){return e.call(this,t,u.UiAppFeatureType.SIDE_PANELS)||this}return i(t,e),t.prototype.open=function(e,t){return o(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return n.sent(),c.validateKey(e)?[2,this.client.framePostClient.request(u.UiAppRequestType.OPEN_SIDE_PANEL,{definition:e,args:t})]:[2]}}))}))},t.prototype.close=function(e){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return t.sent(),[2,this.client.framePostClient.request(u.UiAppRequestType.CLOSE_SIDE_PANEL,e)]}}))}))},t}(a.DDFeatureClient);t.DDSidePanelClient=l},699:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},645:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;var n=function(){function e(e){this.client=e}return e.prototype.getPrefix=function(){return"dd-apps@"+window.location.href+": "},e.prototype.log=function(e){if(this.client.debug)return console.log(""+this.getPrefix()+e)},e.prototype.error=function(e){if(this.client.debug)return console.error(""+this.getPrefix()+e)},e}();t.Logger=n},974:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKey=t.isDefinitionWithKey=t.isEventEnabled=t.getFeatureTypesByEvent=t.isFeatureEnabled=void 0;var r,i,o,s=n(601),u=n(582);t.isFeatureEnabled=function(e,t){return t.includes(e)},t.getFeatureTypesByEvent=(r=function(){var e=new Map;return u.features.forEach((function(t){t.events.forEach((function(n){e.has(n)||e.set(n,new Set),e.get(n).add(t.type)}))})),e},o=!1,function(){return o||(i=r(),o=!0),i}),t.isEventEnabled=function(e,n){if(s.enabledEvents.has(e))return!0;var r=t.getFeatureTypesByEvent().get(e);return!!r&&n.some((function(e){return r.has(e)}))},t.isDefinitionWithKey=function(e){return!!e.key},t.validateKey=function(e){if(!t.isDefinitionWithKey(e))throw new Error('Definition missing required field ".key"');return!0}},177:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{a(r.next(e))}catch(e){o(e)}}function u(e){try{a(r.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,u)}a((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DDWidgetContextMenuClient=void 0;var u=n(601),a=n(791),c=n(974),l={items:[]},f=function(e){function t(t){var n=e.call(this,t,u.UiAppFeatureType.WIDGET_CONTEXT_MENU)||this;return n.onRequest((function(){return l})),n}return i(t,e),t.prototype.onRequest=function(e){var t=this;return this.client.framePostClient.onRequest(u.UiAppRequestType.GET_WIDGET_CONTEXT_MENU_ITEMS,(function(n){return o(t,void 0,void 0,(function(){var t=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.validateFeatureIsEnabled()];case 1:return r.sent(),[4,e(n)];case 2:return[2,{items:r.sent().items.filter((function(e){try{c.validateKey(e)}catch(e){return t.client.logger.error(e.message),!1}return!0}))}]}}))}))})),function(){t.onRequest((function(){return l}))}},t}(a.DDFeatureClient);t.DDWidgetContextMenuClient=f}},t={},function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(607);var e,t}));
//# sourceMappingURL=ui-apps-sdk.min.js.map
{
"name": "@datadog/ui-apps-sdk",
"version": "0.12.3",
"version": "0.12.4",
"description": "Datadog UI Apps - Official JavaScript SDK ",

@@ -33,3 +33,3 @@ "homepage": "https://github.com/DataDog/ui_apps_sdk",

"dependencies": {
"@datadog/framepost": "0.2.2"
"@datadog/framepost": "^0.2.3"
},

@@ -36,0 +36,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc