@looker/embed-sdk
Advanced tools
Comparing version 1.8.6 to 1.8.7
/*! For license information please see main.js.LICENSE.txt */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LookerEmbedSDK=t():e.LookerEmbedSDK=t()}(self,(()=>(()=>{var e={105:function(e,t,n){"use strict";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 o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClient=t.ChattyClientStates=void 0;var s,a=n(686),u=n(346),c=n(529);n(310),function(e){e[e.Connecting=0]="Connecting",e[e.Syn=1]="Syn",e[e.Connected=2]="Connected"}(s=t.ChattyClientStates||(t.ChattyClientStates={}));var l=function(){function e(e){this._clientWindow=window,this._connection=null,this._hostWindow=this._clientWindow.parent,this._state=s.Connecting,this._sequence=0,this._receivers={},this._handlers=e.handlers,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout,this._channel=new MessageChannel}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===s.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return this._connection||(this._connection=new Promise((function(n,r){t._channel.port1.onmessage=function(r){switch(e._debug("received",r.data.action,r.data.data),r.data.action){case c.ChattyHostMessages.SynAck:t._state=s.Connected,t.sendMsg(u.ChattyClientMessages.Ack),n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(u.ChattyClientMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r=this;return i(this,(function(o){return t=++this._sequence,this.sendMsg(u.ChattyClientMessages.MessageWithResponse,{eventName:e,payload:n},t),[2,new Promise((function(e,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[t],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[t]={reject:n,resolve:e,timeoutId:o}}))]}))}))}});break;case c.ChattyHostMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case c.ChattyHostMessages.MessageWithResponse:var a=r.data.data,l=a.eventName,h=a.payload,d=a.sequence,f=[];t._handlers[l]&&(f=t._handlers[l].map((function(e){return e.apply(t,h)}))),Promise.all(f).then((function(e){t.sendMsg(u.ChattyClientMessages.Response,{eventName:l,payload:e},d)})).catch((function(e){t.sendMsg(u.ChattyClientMessages.ResponseError,{eventName:l,payload:e.toString()},d)}));break;case c.ChattyHostMessages.Response:(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case c.ChattyHostMessages.ResponseError:var p;(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}},t.initiateHandshake()}))),[2,this._connection]}))}))},e.prototype.initiateHandshake=function(){e._debug("connecting to",this._targetOrigin),this._hostWindow.postMessage({action:u.ChattyClientMessages.Syn},this._targetOrigin,[this._channel.port2]),this._state=s.Syn},e.prototype.sendMsg=function(t,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);e._debug("sending",t,s),this._channel.port1.postMessage({action:t,data:s})},e._debug=a("looker:chatty:client"),e}();t.ChattyClient=l},955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientBuilder=void 0;var r=n(105),o=function(){function e(){this._targetOrigin="*",this._handlers={},this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyClient(this)},e}();t.ChattyClientBuilder=o},346:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientMessages=void 0,(n=t.ChattyClientMessages||(t.ChattyClientMessages={}))[n.Syn=0]="Syn",n[n.Ack=1]="Ack",n[n.Message=2]="Message",n[n.MessageWithResponse=3]="MessageWithResponse",n[n.Response=4]="Response",n[n.ResponseError=5]="ResponseError"},474:function(e,t,n){"use strict";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 o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHost=t.ChattyHostStates=void 0;var s,a=n(686),u=n(346),c=n(529);n(310),function(e){e[e.Connecting=0]="Connecting",e[e.SynAck=1]="SynAck",e[e.Connected=2]="Connected"}(s=t.ChattyHostStates||(t.ChattyHostStates={}));var l=function(){function e(e){var t=this;this._hostWindow=window,this._connection=null,this._state=s.Connecting,this._sequence=0,this._receivers={},this.iframe=document.createElement("iframe"),e.sandboxAttrs.forEach((function(e){return t.iframe.sandbox.add(e)})),"allow"in this.iframe&&(this.iframe.allow=e.allowAttrs.join("; ")),this.iframe.frameBorder=e.getFrameBorder(),e.url?this.iframe.src=e.url:e.source?this.iframe.srcdoc=e.source:console.warn("url or source required to initialize Chatty host correctly"),this._appendTo=e.el,this._handlers=e.handlers,this._port=null,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===s.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){return this._connection?[2,this._connection]:(t=function(){return o(n,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,new Promise((function(n,r){var a=function(r){switch(e._debug("port received",r.data.action,r.data.data),r.data.action){case u.ChattyClientMessages.Ack:t._state=s.Connected,n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(c.ChattyHostMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r=this;return i(this,(function(o){return t=++this._sequence,this.sendMsg(c.ChattyHostMessages.MessageWithResponse,{eventName:e,payload:n},t),[2,new Promise((function(e,n){var o;r._defaultTimeout>-1&&(o=setTimeout((function(){delete r._receivers[t],n(new Error("Timeout"))}),r._defaultTimeout)),r._receivers[t]={reject:n,resolve:e,timeoutId:o}}))]}))}))}});break;case u.ChattyClientMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case u.ChattyClientMessages.MessageWithResponse:var a=r.data.data,l=a.eventName,h=a.payload,d=a.sequence,f=[];t._handlers[l]&&(f=t._handlers[l].map((function(e){return e.apply(t,h)}))),Promise.all(f).then((function(e){t.sendMsg(c.ChattyHostMessages.Response,{eventName:l,payload:e},d)})).catch((function(e){t.sendMsg(c.ChattyHostMessages.ResponseError,{eventName:l,payload:e.toString()},d)}));break;case u.ChattyClientMessages.Response:(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.resolve(r.data.data.payload));break;case u.ChattyClientMessages.ResponseError:var p;(p=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],p.timeoutId&&clearTimeout(p.timeoutId),p.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}};t._hostWindow.addEventListener("message",(function(n){if(t.isValidMsg(n)){if(e._debug("window received",n.data.action,n.data.data),n.data.action===u.ChattyClientMessages.Syn){if(t._port){if(!(t._targetOrigin&&"*"===t._targetOrigin||t._targetOrigin===n.origin))return void e._debug("rejected new connection from",n.origin);e._debug("reconnecting to",n.origin),t._port.close()}t._port=n.ports[0],t._port.onmessage=a,t.sendMsg(c.ChattyHostMessages.SynAck),t._state=s.SynAck}}else e._debug("window received invalid",n)}))}))]}))}))},this._appendTo.appendChild(this.iframe),[2,this._connection=t()])}))}))},e.prototype.sendMsg=function(t,n,o){void 0===n&&(n={});var i=o?{sequence:o}:{},s=r(r({},n),i);e._debug("sending",t,s),this._port.postMessage({action:t,data:s})},e.prototype.isValidMsg=function(e){return e.source===this.iframe.contentWindow&&(!this._targetOrigin||"*"===this._targetOrigin||this._targetOrigin===e.origin)},e._debug=a("looker:chatty:host"),e}();t.ChattyHost=l},777:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostBuilder=void 0;var r=n(474),o=function(){function e(e,t){this._url=e,this._source=t,this._appendTo=null,this._handlers={},this._sandboxAttrs=[],this._allowAttrs=[],this._frameBorder="0",this._targetOrigin=null,this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo=e,this},e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.getFrameBorder=function(){return this._frameBorder},e.prototype.frameBorder=function(e){return this._frameBorder=e,this},e.prototype.sandbox=function(e){return this.withSandboxAttribute(e),this},e.prototype.withSandboxAttribute=function(e){return this._sandboxAttrs.push(e),this},e.prototype.withAllowAttribute=function(e){return this._allowAttrs.push(e),this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyHost(this)},e}();t.ChattyHostBuilder=o},529:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostMessages=void 0,(n=t.ChattyHostMessages||(t.ChattyHostMessages={}))[n.SynAck=0]="SynAck",n[n.Message=1]="Message",n[n.MessageWithResponse=2]="MessageWithResponse",n[n.Response=3]="Response",n[n.ResponseError=4]="ResponseError"},541:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Chatty=t.ChattyHost=t.ChattyClient=t.ChattyHostBuilder=t.ChattyClientBuilder=void 0;var i=n(955),s=n(777),a=n(955);Object.defineProperty(t,"ChattyClientBuilder",{enumerable:!0,get:function(){return a.ChattyClientBuilder}});var u=n(777);Object.defineProperty(t,"ChattyHostBuilder",{enumerable:!0,get:function(){return u.ChattyHostBuilder}});var c=n(105);Object.defineProperty(t,"ChattyClient",{enumerable:!0,get:function(){return c.ChattyClient}});var l=n(474);Object.defineProperty(t,"ChattyHost",{enumerable:!0,get:function(){return l.ChattyHost}}),o(n(248),t);var h=function(){function e(){}return e.createHost=function(e){return new s.ChattyHostBuilder(e)},e.createHostFromSource=function(e){return new s.ChattyHostBuilder(void 0,e)},e.createClient=function(){return new i.ChattyClientBuilder},e}();t.Chatty=h},248:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},686:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(514)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},514:(e,t,n)=>{var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var i=s[u];n=o.call(e,i),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=n.log||t.log||console.log.bind(console);c.apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(553),t.names=[],t.skips=[],t.formatters={}},553:e=>{var t=1e3,n=60*t,r=60*n,o=24*r;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return s.long?i(a=e,o,"day")||i(a,r,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=o?Math.round(e/o)+"d":e>=r?Math.round(e/r)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},711:function(e,t,n){"use strict";var r,o=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])},r(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)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedDashboard=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("dashboard:run")},t.prototype.stop=function(){this.send("dashboard:stop")},t.prototype.edit=function(){this.send("dashboard:edit")},t.prototype.updateFilters=function(e){this.send("dashboard:filters:update",{filters:e})},t.prototype.setOptions=function(e){this.send("dashboard:options:set",e)},t.prototype.openScheduleDialog=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.sendAndReceive("dashboard:schedule_modal:open")]}))}))},t.prototype.loadDashboard=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.sendAndReceive("dashboard:load",{id:e,pushHistory:t})]}))}))},t}(n(211).LookerEmbedBase);t.LookerEmbedDashboard=a},354:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedClient=void 0;var s=n(541),a=/^https?:\/\//,u=function(){function e(e){this._builder=e,this._hostBuilder=null,this._host=null,this._connection=null,this._client=null,this._cookielessInitialized=!1}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return!!this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){if(this._builder.sandboxedHost)return"*";var e=this._builder.apiHost;return a.test(e)?e:"https://".concat(e)},enumerable:!1,configurable:!0}),e.prototype.createIframe=function(e){return r(this,void 0,void 0,(function(){var t,n,i,a,u,c,l,h,d,f,p,y,_=this;return o(this,(function(b){for(t in this._hostBuilder=s.Chatty.createHost(e),this._builder.dialogScroll&&(this._builder.handlers["env:client:dialog"]=[function(e){var t=e.open,n=e.placement;t&&"cover"===n&&window.setTimeout((function(){_._host&&_._host.iframe.scrollIntoView(!0)}),200)}]),this._builder.dynamicIFrameHeight&&(this._builder.handlers["page:properties:changed"]=[function(e){var t=e.height;t&&t>100&&_._host&&(_._host.iframe.style.height="".concat(t,"px"))}]),this._builder.isCookielessEmbed&&(this._builder.handlers["session:tokens:request"]=[function(){return r(_,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return this._client&&this._cookielessApiToken&&this._builder.generateTokens?this._cookielessInitialized?[4,this.generateTokens()]:[3,2]:[3,4];case 1:return e=o.sent(),t=e.api_token,n=e.api_token_ttl,r=e.navigation_token,i=e.navigation_token_ttl,s=e.session_reference_token_ttl,this._cookielessApiToken=t,this._cookielessApiTokenTtl=n,this._cookielessNavigationToken=r,this._cookielessNavigationTokenTtl=i,this._cookielessSessionReferenceTokenTtl=s,[3,3];case 2:this._cookielessInitialized=!0,o.label=3;case 3:this._client.send("session:tokens",{api_token:this._cookielessApiToken,api_token_ttl:this._cookielessApiTokenTtl,navigation_token:this._cookielessNavigationToken,navigation_token_ttl:this._cookielessNavigationTokenTtl,session_reference_token_ttl:this._cookielessSessionReferenceTokenTtl}),o.label=4;case 4:return[2]}}))}))}]),this._builder.handlers)for(n=function(e){i._hostBuilder.on(t,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(_._client,t)}))},i=this,a=0,u=this._builder.handlers[t];a<u.length;a++)c=u[a],n(c);for(l=0,h=this._builder.sandboxAttrs;l<h.length;l++)p=h[l],this._hostBuilder.withSandboxAttribute(p);for(d=0,f=this._builder.allowAttrs;d<f.length;d++)p=f[d],this._hostBuilder.withAllowAttribute(p);return this._host=this._hostBuilder.frameBorder(this._builder.frameBorder).withTargetOrigin(this.targetOrigin).appendTo(this._builder.el).build(),this._builder.classNames.length&&(y=this._host.iframe.classList).add.apply(y,this._builder.classNames),this._builder.scrollMonitor&&this.addIframeMonitor(this._host.iframe),[2,this._host.connect().then((function(e){return _._client=new _._builder.clientConstructor(e),_._client}))]}))}))},e.prototype.sendScrollData=function(e){this._client.send("env:host:scroll",{offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,scrollX:window.scrollX,scrollY:window.scrollY})},e.prototype.addIframeMonitor=function(e){var t=this;document.addEventListener("scroll",(function(n){t.sendScrollData(e)})),window.addEventListener("resize",(function(n){t.sendScrollData(e)}))},e.prototype.createUrl=function(){return r(this,void 0,void 0,(function(){var e,t,n,i,s,a,u=this;return o(this,(function(c){if(e=this._builder.embedUrl,!(null==(t=this._builder.auth)?void 0:t.url))return[2,"".concat(this._builder.apiHost).concat(e)];if(n="".concat(t.url,"?src=").concat(encodeURIComponent(e)),t.params)for(i=0,s=t.params;i<s.length;i++)a=s[i],n+="&".concat(encodeURIComponent(a.name),"=").concat(encodeURIComponent(a.value));return[2,new Promise((function(e,i){return r(u,void 0,void 0,(function(){var r,s,a,u;return o(this,(function(o){if((r=new XMLHttpRequest).open("GET",n),t.withCredentials&&(r.withCredentials=t.withCredentials),r.setRequestHeader("Cache-Control","no-cache"),t.headers)for(s=0,a=t.headers;s<a.length;s++)u=a[s],r.setRequestHeader(u.name,u.value);return r.onload=function(){200===r.status?e(JSON.parse(r.responseText).url):i(r.statusText)},r.onerror=function(){return i(r.statusText)},r.send(),[2]}))}))}))]}))}))},e.prototype.acquireCookielessEmbedSession=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.sessionAcquired?[2,this.acquireCookielessEmbedSessionInternal()]:e.acquireSessionPromise?[4,e.acquireSessionPromise]:[3,2];case 1:return t.sent(),[2,this.acquireCookielessEmbedSessionInternal()];case 2:return e.acquireSessionPromise=this.acquireCookielessEmbedSessionInternal(),[2,e.acquireSessionPromise.then((function(t){return e.sessionAcquired=!0,t})).catch((function(t){throw e.acquireSessionPromise=void 0,t}))]}}))}))},e.prototype.acquireCookielessEmbedSessionInternal=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a,u,c,l,h,d,f,p;return o(this,(function(o){switch(o.label){case 0:if(e=this._builder,t=e.acquireSession,n=e.generateTokens,!t)throw new Error("invalid state: acquireSession not defined");if(!n)throw new Error("invalid state: generateTokens not defined");return[4,this.acquireSession()];case 1:if(r=o.sent(),i=r.authentication_token,s=r.api_token,a=r.api_token_ttl,u=r.navigation_token,c=r.navigation_token_ttl,l=r.session_reference_token_ttl,!i||!u||!s)throw new Error("failed to prepare cookieless embed session");return this._cookielessApiToken=s,this._cookielessApiTokenTtl=a,this._cookielessNavigationToken=u,this._cookielessNavigationTokenTtl=c,this._cookielessSessionReferenceTokenTtl=l,h="https://".concat(this._builder.apiHost),d=""===new URL(this._builder.embedUrl,h).search?"?":"&",f="".concat(this._builder.embedUrl).concat(d,"embed_navigation_token=").concat(u),p="/login/embed/"+encodeURIComponent(f)+"?embed_authentication_token=".concat(i),[2,"".concat(h).concat(p)]}}))}))},e.prototype.acquireSession=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.acquireSession)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,[4,fetch(n,r)];case 3:if(!(i=o.sent()).ok)throw console.error("acquire embed session failed",{resp:i}),new Error("acquire embed session failed");return[4,i.json()];case 5:throw s=o.sent(),console.error(s),new Error("acquire embed session failed");case 6:return[2]}}))}))},e.prototype.generateTokens=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.generateTokens)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,i=r||{body:JSON.stringify({api_token:this._cookielessApiToken,navigation_token:this._cookielessNavigationToken}),headers:{"content-type":"application/json"},method:"PUT"},[4,fetch(n,i)];case 3:if(!(s=o.sent()).ok){if(400===s.status)return[2,{session_reference_token_ttl:0}];throw console.error("generate tokens failed",{resp:s}),new Error("generate tokens failed")}return[4,s.json()];case 5:throw a=o.sent(),console.error(a),new Error("generate tokens failed");case 6:return[2]}}))}))},e.prototype.getResource=function(e){var t,n;if("object"==typeof e){var r=e.url;n=i(e,["url"]),t=r}else t=e;return{init:n,url:t}},e.prototype.connect=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){if(this._connection)return[2,this._connection];if(this._builder.url){if(this._builder.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");this._connection=this.createIframe(this._builder.url)}else this._builder.isCookielessEmbed?this._connection=this.acquireCookielessEmbedSession().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))})).catch((function(t){throw e._connection=null,t})):this._connection=this.createUrl().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))}));return[2,this._connection]}))}))},e.sessionAcquired=!1,e}();t.EmbedClient=u},211:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedBase=void 0;var o=function(){function e(e){this._host=e}return e.prototype.send=function(e,t){this._host.send(e,t)},e.prototype.sendAndReceive=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this._host.sendAndReceive(e,t)]}))}))},e}();t.LookerEmbedBase=o},886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedBuilder=void 0;var r=n(354);function o(e){return e.replace(/,/g,"^,")}var i=function(){function e(e,t,n,r){if(this._hostSettings=e,this._type=t,this._endpoint=n,this._clientConstructor=r,this._handlers={},this._appendTo=null,this._sandboxAttrs=[],this._allowAttrs=[],this._classNames=[],this._frameBorder="0",this._suffix="",this.sandboxedHost)this._params={embed_domain:this._hostSettings.apiHost,sandboxed_host:"true",sdk:"2"};else{var o=window.location.origin;this._params={embed_domain:o,sdk:"2"}}}return e.prototype.withFrameBorder=function(e){return this._frameBorder=e,this},e.prototype.withId=function(e){return this._id=e,this},e.prototype.withParams=function(e){for(var t in e)this._params[t]=e[t];return this},e.prototype.withFilters=function(e,t){if(void 0===t&&(t=!1),"dashboard"===this.type)for(var n in e)this._params[n]=t?o(e[n]):e[n];else for(var n in e)this._params["f[".concat(n,"]")]=t?o(e[n]):e[n];return this},e.prototype.withSandboxAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._sandboxAttrs=this._sandboxAttrs.concat(e),this},e.prototype.withAllowAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._allowAttrs=this._allowAttrs.concat(e),this},e.prototype.withClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._classNames=this._classNames.concat(e),this},e.prototype.withNext=function(e){return void 0===e&&(e="-next"),this._suffix=e,this._endpoint+=this._suffix,this},e.prototype.withTheme=function(e){return this._params.theme=e,this},e.prototype.withScrollMonitor=function(e){return void 0===e&&(e=!0),this._scrollMonitor=e,this},e.prototype.withDynamicIFrameHeight=function(e){return void 0===e&&(e=!0),this._dynamicIFrameHeight=e,this},e.prototype.withDialogScroll=function(e){return void 0===e&&(e=!0),this._dialogScroll=e,this},e.prototype.withApiHost=function(e){if(this._hostSettings.apiHost){if(this._hostSettings.apiHost!==e)throw new Error("not allowed to change api host")}else this._hostSettings.apiHost=e,this.sandboxedHost&&(this._params.embed_domain=e,this._params.sandboxed_host="true");return this},e.prototype.withAuthUrl=function(e){var t;if(null===(t=this._hostSettings.auth)||void 0===t?void 0:t.url){if(this._hostSettings.auth.url!==e)throw new Error("not allowed to change auth url")}else this._hostSettings.auth={url:e};return this},e.prototype.withAuth=function(e){if(this._hostSettings.auth){if(this._hostSettings.auth!==e)throw new Error("not allowed to change auth")}else this._hostSettings.auth=e;return this},e.prototype.withUrl=function(e){if(this.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");return this._url=e,this},Object.defineProperty(e.prototype,"sandboxedHost",{get:function(){if(void 0===this._sandboxedHost){var e=window.location.origin;this._sandboxedHost="null"===e||!e}return this._sandboxedHost},set:function(e){this._sandboxedHost=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameBorder",{get:function(){return this._frameBorder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiHost",{get:function(){return this._hostSettings.apiHost},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCookielessEmbed",{get:function(){return!!this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"acquireSession",{get:function(){return this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generateTokens",{get:function(){return this._hostSettings.generateTokens},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authUrl",{get:function(){var e;return null===(e=this._hostSettings.auth)||void 0===e?void 0:e.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"auth",{get:function(){return this._hostSettings.auth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"embedUrl",{get:function(){var e=function(e){var t=[];for(var n in e)for(var r=e[n],o=0,i=Array.isArray(r)?r:[r];o<i.length;o++){var s=i[o];t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(s)))}return t.join("&")}(this._params);return"".concat(this.endpoint,"/").concat(this.id,"?").concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffix",{get:function(){return this._suffix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollMonitor",{get:function(){return this._scrollMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicIFrameHeight",{get:function(){return this._dynamicIFrameHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dialogScroll",{get:function(){return this._dialogScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientConstructor",{get:function(){return this._clientConstructor},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo="string"==typeof e?document.querySelector(e):e,this},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]?this._handlers[e]:[],this._handlers[e].push(t),this},e.prototype.build=function(){return new r.EmbedClient(this)},e}();t.EmbedBuilder=i},662:function(e,t,n){"use strict";var r,o=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])},r(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.LookerEmbedExplore=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(211).LookerEmbedBase);t.LookerEmbedExplore=i},438:function(e,t,n){"use strict";var r,o=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])},r(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.LookerEmbedExtension=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(211).LookerEmbedBase);t.LookerEmbedExtension=i},433:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedSDK=void 0;var i=n(886),s=n(711),a=n(662),u=n(438),c=n(684);o(n(924),t);var l=function(){function e(){}return e.init=function(e,t){this.apiHost=e,this.auth="string"==typeof t?{url:t}:t,this.acquireSession=void 0,this.generateTokens=void 0},e.initCookieless=function(e,t,n){this.apiHost=e,this.acquireSession=t,this.generateTokens=n,this.auth=void 0},e.createDashboardWithUrl=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withUrl(e)},e.createDashboardWithId=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withId(e)},e.createExploreWithUrl=function(e){return new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withUrl(e)},e.createExploreWithId=function(e){return e=e.replace("::","/"),new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withId(e)},e.createLookWithUrl=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withUrl(e)},e.createLookWithId=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withId(e)},e.createExtensionWithUrl=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withUrl(e)},e.createExtensionWithId=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withId(e)},e}();t.LookerEmbedSDK=l},684:function(e,t,n){"use strict";var r,o=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])},r(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.LookerEmbedLook=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(211).LookerEmbedBase);t.LookerEmbedLook=i},924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},310:(e,t,n)=>{"use strict";e.exports=n(702).polyfill()},702:function(e,t,n){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,i=void 0,s=function(e,t){f[r]=e,f[r+1]=t,2===(r+=2)&&(i?i(p):v())};var a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var f=new Array(1e3);function p(){for(var e=0;e<r;e+=2)(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0;r=0}var y,_,b,g,v=void 0;function m(e,t){var n=this,r=new this.constructor(C);void 0===r[k]&&B(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return A(o,r,i,n._result)}))}else T(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(C);return x(t,e),t}v=l?function(){return process.nextTick(p)}:c?(_=0,b=new c(p),g=document.createTextNode(""),b.observe(g,{characterData:!0}),function(){g.data=_=++_%2}):h?((y=new MessageChannel).port1.onmessage=p,function(){return y.port2.postMessage(0)}):void 0===a?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(p)}:d()}catch(e){return d()}}():d();var k=Math.random().toString(36).substring(2);function C(){}var O=void 0;function E(t,n,r){n.constructor===t.constructor&&r===m&&n.constructor.resolve===w?function(e,t){1===t._state?S(e,t._result):2===t._state?P(e,t._result):T(t,void 0,(function(t){return x(e,t)}),(function(t){return P(e,t)}))}(t,n):void 0===r?S(t,n):e(r)?function(e,t,n){s((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?x(e,n):S(e,n))}),(function(t){r||(r=!0,P(e,t))}),e._label);!r&&o&&(r=!0,P(e,o))}),e)}(t,n,r):S(t,n)}function x(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=t),null===r||"object"!==o&&"function"!==o)S(e,t);else{var n=void 0;try{n=t.then}catch(t){return void P(e,t)}E(e,t,n)}var r,o}function j(e){e._onerror&&e._onerror(e._result),M(e)}function S(e,t){e._state===O&&(e._result=t,e._state=1,0!==e._subscribers.length&&s(M,e))}function P(e,t){e._state===O&&(e._state=2,e._result=t,s(j,e))}function T(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+1]=n,o[i+2]=r,0===i&&e._state&&s(M,e)}function M(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?A(n,r,o,i):o(i);e._subscribers.length=0}}function A(t,n,r,o){var i=e(r),s=void 0,a=void 0,u=!0;if(i){try{s=r(o)}catch(e){u=!1,a=e}if(n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=o;n._state!==O||(i&&u?x(n,s):!1===u?P(n,a):1===t?S(n,s):2===t&&P(n,s))}var H=0;function B(e){e[k]=H++,e._state=void 0,e._result=void 0,e._subscribers=[]}var q=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(C),this.promise[k]||B(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&S(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,s=!1;try{o=e.then}catch(e){s=!0,i=e}if(o===m&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===R){var a=new n(C);s?P(a,i):E(a,e,o),this._willSettleAt(a,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,2===e?P(r,n):this._result[t]=n),0===this._remaining&&S(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;T(e,void 0,(function(e){return n._settledAt(1,t,e)}),(function(e){return n._settledAt(2,t,e)}))},e}();var R=function(){function t(e){this[k]=H++,this._result=this._state=void 0,this._subscribers=[],C!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){x(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return R.prototype.then=m,R.all=function(e){return new q(this,e).promise},R.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var o=e.length,i=0;i<o;i++)n.resolve(e[i]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},R.resolve=w,R.reject=function(e){var t=new this(C);return P(t,e),t},R._setScheduler=function(e){i=e},R._setAsap=function(e){s=e},R._asap=s,R.polyfill=function(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=R},R.Promise=R,R}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(433)})())); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LookerEmbedSDK=t():e.LookerEmbedSDK=t()}(self,(()=>(()=>{var e={578:function(e,t,n){"use strict";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 o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClient=t.ChattyClientStates=void 0;var a,u=n(133),c=n(913),l=n(914);n(542),function(e){e[e.Connecting=0]="Connecting",e[e.Syn=1]="Syn",e[e.Connected=2]="Connected"}(a=t.ChattyClientStates||(t.ChattyClientStates={}));var h=function(){function e(e){this._clientWindow=window,this._connection=null,this._hostWindow=this._clientWindow.parent,this._state=a.Connecting,this._sequence=0,this._receivers={},this._handlers=e.handlers,this._abortControllers={},this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout,this._channel=new MessageChannel}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===a.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t=this;return i(this,(function(n){return this._connection||(this._connection=new Promise((function(n,r){t._channel.port1.onmessage=function(r){switch(e._debug("received",r.data.action,r.data.data),r.data.action){case l.ChattyHostMessages.SynAck:t._state=a.Connected,t.sendMsg(c.ChattyClientMessages.Ack),n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(c.ChattyClientMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r,o,s,a,u,l,h=this;return i(this,(function(i){return n.length>0&&(null===(u=n[n.length-1])||void 0===u?void 0:u.signal)&&(null===(l=n[n.length-1])||void 0===l?void 0:l.signal)instanceof AbortSignal?(s=n[n.length-1],t=s.signal,r=s.propagateSignal,o=n.slice(0,n.length-1)):o=n,a=++this._sequence,this.sendMsg(c.ChattyClientMessages.MessageWithResponse,{eventName:e,payload:o},a,r),[2,new Promise((function(n,o){var i;t?t.addEventListener("abort",(function(t){var n=t.target.reason;"string"!=typeof n&&(n="Abort"),r&&h.sendMsg(c.ChattyClientMessages.AbortMessage,{eventName:e,payload:{reason:n}},a),delete h._receivers[a],o(new Error(n))})):h._defaultTimeout>-1&&(i=setTimeout((function(){delete h._receivers[a],o(new Error("Timeout"))}),h._defaultTimeout)),h._receivers[a]={reject:o,resolve:n,timeoutId:i}}))]}))}))}});break;case l.ChattyHostMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case l.ChattyHostMessages.MessageWithResponse:var u,h=r.data.data,d=h.eventName,f=h.payload,p=h.sequence,y=h.signal,b=[],_="".concat(d).concat(p);t._handlers[d]&&(y?(t._abortControllers[_]=new AbortController,u=Array.isArray(f)?s(s([],f,!0),[t._abortControllers[_].signal],!1):[f,t._abortControllers[_].signal]):u=f,b=t._handlers[d].map((function(e){return e.apply(t,u)}))),Promise.all(b).then((function(e){delete t._abortControllers[_],t.sendMsg(c.ChattyClientMessages.Response,{eventName:d,payload:e},p)})).catch((function(e){delete t._abortControllers[_],t.sendMsg(c.ChattyClientMessages.ResponseError,{eventName:d,payload:e.toString()},p)}));break;case l.ChattyHostMessages.AbortMessage:var g=r.data.data,v=g.eventName,m=(f=g.payload,g.sequence),w="".concat(v).concat(m);t._abortControllers[w]&&(t._abortControllers[w].abort(null==f?void 0:f.reason),delete t._abortControllers[w]);break;case l.ChattyHostMessages.Response:(C=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],C.timeoutId&&clearTimeout(C.timeoutId),C.resolve(r.data.data.payload));break;case l.ChattyHostMessages.ResponseError:var C;(C=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],C.timeoutId&&clearTimeout(C.timeoutId),C.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}},t.initiateHandshake()}))),[2,this._connection]}))}))},e.prototype.initiateHandshake=function(){e._debug("connecting to",this._targetOrigin),this._hostWindow.postMessage({action:c.ChattyClientMessages.Syn},this._targetOrigin,[this._channel.port2]),this._state=a.Syn},e.prototype.sendMsg=function(t,n,o,i){void 0===n&&(n={});var s=o?{sequence:o}:{},a=!0===i?{signal:i}:{},u=r(r(r({},n),s),a);e._debug("sending",t,u),this._channel.port1.postMessage({action:t,data:u})},e._debug=u("looker:chatty:client"),e}();t.ChattyClient=h},174:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientBuilder=void 0;var r=n(578),o=function(){function e(){this._targetOrigin="*",this._handlers={},this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyClient(this)},e}();t.ChattyClientBuilder=o},913:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyClientMessages=void 0,(n=t.ChattyClientMessages||(t.ChattyClientMessages={}))[n.Syn=0]="Syn",n[n.Ack=1]="Ack",n[n.Message=2]="Message",n[n.MessageWithResponse=3]="MessageWithResponse",n[n.Response=4]="Response",n[n.ResponseError=5]="ResponseError",n[n.AbortMessage=6]="AbortMessage"},547:function(e,t,n){"use strict";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 o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHost=t.ChattyHostStates=void 0;var a,u=n(133),c=n(913),l=n(914);n(542),function(e){e[e.Connecting=0]="Connecting",e[e.SynAck=1]="SynAck",e[e.Connected=2]="Connected"}(a=t.ChattyHostStates||(t.ChattyHostStates={}));var h=function(){function e(e){var t=this;this._hostWindow=window,this._connection=null,this._state=a.Connecting,this._sequence=0,this._receivers={},this.iframe=document.createElement("iframe"),e.sandboxAttrs.forEach((function(e){return t.iframe.sandbox.add(e)})),"allow"in this.iframe&&(this.iframe.allow=e.allowAttrs.join("; ")),this.iframe.frameBorder=e.getFrameBorder(),e.url?this.iframe.src=e.url:e.source?this.iframe.srcdoc=e.source:console.warn("url or source required to initialize Chatty host correctly"),this._appendTo=e.el,this._handlers=e.handlers,this._abortControllers={},this._port=null,this._targetOrigin=e.targetOrigin,this._defaultTimeout=e.defaultTimeout}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return this._state===a.Connected},enumerable:!1,configurable:!0}),e.prototype.connect=function(){return o(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(r){return this._connection?[2,this._connection]:(t=function(){return o(n,void 0,void 0,(function(){var t=this;return i(this,(function(n){return[2,new Promise((function(n,r){var u=function(r){switch(e._debug("port received",r.data.action,r.data.data),r.data.action){case c.ChattyClientMessages.Ack:t._state=a.Connected,n({send:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.sendMsg(l.ChattyHostMessages.Message,{eventName:e,payload:n})},sendAndReceive:function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return o(t,void 0,void 0,(function(){var t,r,o,s,a,u,c,h=this;return i(this,(function(i){return n.length>0&&(null===(u=n[n.length-1])||void 0===u?void 0:u.signal)&&(null===(c=n[n.length-1])||void 0===c?void 0:c.signal)instanceof AbortSignal?(s=n[n.length-1],t=s.signal,r=s.propagateSignal,o=n.slice(0,n.length-1)):o=n,a=++this._sequence,this.sendMsg(l.ChattyHostMessages.MessageWithResponse,{eventName:e,payload:o},a,r),[2,new Promise((function(n,o){var i;t?t.addEventListener("abort",(function(t){if(r){var n=t.target.reason;"string"!=typeof n&&(n="Abort"),h.sendMsg(l.ChattyHostMessages.AbortMessage,{eventName:e,payload:{reason:n}},a)}delete h._receivers[a];var i=t.target.reason;"string"!=typeof i&&(i="Abort"),o(new Error(i))})):h._defaultTimeout>-1&&(i=setTimeout((function(){delete h._receivers[a],o(new Error("Timeout"))}),h._defaultTimeout)),h._receivers[a]={reject:o,resolve:n,timeoutId:i}}))]}))}))}});break;case c.ChattyClientMessages.Message:t._handlers[r.data.data.eventName]&&t._handlers[r.data.data.eventName].forEach((function(e){return e.apply(t,r.data.data.payload)}));break;case c.ChattyClientMessages.MessageWithResponse:var u,h=r.data.data,d=h.eventName,f=h.payload,p=h.sequence,y=h.signal,b=[],_="".concat(d).concat(p);t._handlers[d]&&(y?(t._abortControllers[_]=new AbortController,u=Array.isArray(f)?s(s([],f,!0),[t._abortControllers[_].signal],!1):[f,t._abortControllers[_].signal]):u=f,b=t._handlers[d].map((function(e){return e.apply(t,u)}))),Promise.all(b).then((function(e){delete t._abortControllers[_],t.sendMsg(l.ChattyHostMessages.Response,{eventName:d,payload:e},p)})).catch((function(e){delete t._abortControllers[_],t.sendMsg(l.ChattyHostMessages.ResponseError,{eventName:d,payload:e.toString()},p)}));break;case c.ChattyClientMessages.AbortMessage:var g=r.data.data,v=g.eventName,m=(f=g.payload,g.sequence),w="".concat(v).concat(m);t._abortControllers[w]&&(t._abortControllers[w].abort(null==f?void 0:f.reason),delete t._abortControllers[w]);break;case c.ChattyClientMessages.Response:(C=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],C.timeoutId&&clearTimeout(C.timeoutId),C.resolve(r.data.data.payload));break;case c.ChattyClientMessages.ResponseError:var C;(C=t._receivers[r.data.data.sequence])&&(delete t._receivers[r.data.data.sequence],C.timeoutId&&clearTimeout(C.timeoutId),C.reject("string"==typeof r.data.data.payload?new Error(r.data.data.payload):r.data.data.payload))}};t._hostWindow.addEventListener("message",(function(n){if(t.isValidMsg(n)){if(e._debug("window received",n.data.action,n.data.data),n.data.action===c.ChattyClientMessages.Syn){if(t._port){if(!(t._targetOrigin&&"*"===t._targetOrigin||t._targetOrigin===n.origin))return void e._debug("rejected new connection from",n.origin);e._debug("reconnecting to",n.origin),t._port.close()}t._port=n.ports[0],t._port.onmessage=u,t.sendMsg(l.ChattyHostMessages.SynAck),t._state=a.SynAck}}else e._debug("window received invalid",n)}))}))]}))}))},this._appendTo.appendChild(this.iframe),[2,this._connection=t()])}))}))},e.prototype.sendMsg=function(t,n,o,i){void 0===n&&(n={});var s=o?{sequence:o}:{},a=!0===i?{signal:i}:{},u=r(r(r({},n),s),a);e._debug("sending",t,u),this._port.postMessage({action:t,data:u})},e.prototype.isValidMsg=function(e){return e.source===this.iframe.contentWindow&&(!this._targetOrigin||"*"===this._targetOrigin||this._targetOrigin===e.origin)},e._debug=u("looker:chatty:host"),e}();t.ChattyHost=h},787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostBuilder=void 0;var r=n(547),o=function(){function e(e,t){this._url=e,this._source=t,this._appendTo=null,this._handlers={},this._sandboxAttrs=[],this._allowAttrs=[],this._frameBorder="0",this._targetOrigin=null,this._defaultTimeout=3e4}return Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){return this._targetOrigin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTimeout",{get:function(){return this._defaultTimeout},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo=e,this},e.prototype.off=function(e,t){this._handlers[e]&&(this._handlers[e]=this._handlers[e].filter((function(e){return e!==t})))},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]||[],this._handlers[e].push(t),this},e.prototype.withDefaultTimeout=function(e){return this._defaultTimeout=e,this},e.prototype.getFrameBorder=function(){return this._frameBorder},e.prototype.frameBorder=function(e){return this._frameBorder=e,this},e.prototype.sandbox=function(e){return this.withSandboxAttribute(e),this},e.prototype.withSandboxAttribute=function(e){return this._sandboxAttrs.push(e),this},e.prototype.withAllowAttribute=function(e){return this._allowAttrs.push(e),this},e.prototype.withTargetOrigin=function(e){return this._targetOrigin=e,this},e.prototype.build=function(){return new r.ChattyHost(this)},e}();t.ChattyHostBuilder=o},914:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ChattyHostMessages=void 0,(n=t.ChattyHostMessages||(t.ChattyHostMessages={}))[n.SynAck=0]="SynAck",n[n.Message=1]="Message",n[n.MessageWithResponse=2]="MessageWithResponse",n[n.Response=3]="Response",n[n.ResponseError=4]="ResponseError",n[n.AbortMessage=5]="AbortMessage"},313:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.Chatty=t.ChattyHostMessages=t.ChattyClientMessages=t.ChattyHostStates=t.ChattyHost=t.ChattyClientStates=t.ChattyClient=t.ChattyHostBuilder=t.ChattyClientBuilder=void 0;var i=n(174),s=n(787),a=n(174);Object.defineProperty(t,"ChattyClientBuilder",{enumerable:!0,get:function(){return a.ChattyClientBuilder}});var u=n(787);Object.defineProperty(t,"ChattyHostBuilder",{enumerable:!0,get:function(){return u.ChattyHostBuilder}});var c=n(578);Object.defineProperty(t,"ChattyClient",{enumerable:!0,get:function(){return c.ChattyClient}}),Object.defineProperty(t,"ChattyClientStates",{enumerable:!0,get:function(){return c.ChattyClientStates}});var l=n(547);Object.defineProperty(t,"ChattyHost",{enumerable:!0,get:function(){return l.ChattyHost}}),Object.defineProperty(t,"ChattyHostStates",{enumerable:!0,get:function(){return l.ChattyHostStates}});var h=n(913);Object.defineProperty(t,"ChattyClientMessages",{enumerable:!0,get:function(){return h.ChattyClientMessages}});var d=n(914);Object.defineProperty(t,"ChattyHostMessages",{enumerable:!0,get:function(){return d.ChattyHostMessages}}),o(n(800),t);var f=function(){function e(){}return e.createHost=function(e){return new s.ChattyHostBuilder(e)},e.createHostFromSource=function(e){return new s.ChattyHostBuilder(void 0,e)},e.createClient=function(){return new i.ChattyClientBuilder},e}();t.Chatty=f},800:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},133:(e,t,n)=>{function r(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e}(t=e.exports=n(642)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var o=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))})),e.splice(i,0,r)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=r,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(r())},642:(e,t,n)=>{var r;function o(e){function n(){if(n.enabled){var e=n,o=+new Date,i=o-(r||o);e.diff=i,e.prev=r,e.curr=o,r=o;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var o=t.formatters[r];if("function"==typeof o){var i=s[u];n=o.call(e,i),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s),(n.log||t.log||console.log.bind(console)).apply(e,s)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),"function"==typeof t.init&&t.init(n),n}(t=e.exports=o.debug=o.default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length,o=0;o<r;o++)n[o]&&("-"===(e=n[o].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(677),t.names=[],t.skips=[],t.formatters={}},677:e=>{var t=1e3,n=60*t,r=60*n,o=24*r;function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,s){s=s||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(i){var s=parseFloat(i[1]);switch((i[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===u&&!1===isNaN(e))return s.long?i(a=e,o,"day")||i(a,r,"hour")||i(a,n,"minute")||i(a,t,"second")||a+" ms":function(e){return e>=o?Math.round(e/o)+"d":e>=r?Math.round(e/r)+"h":e>=n?Math.round(e/n)+"m":e>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},262:function(e,t,n){"use strict";var r,o=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])},r(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)}),i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedDashboard=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("dashboard:run")},t.prototype.stop=function(){this.send("dashboard:stop")},t.prototype.edit=function(){this.send("dashboard:edit")},t.prototype.updateFilters=function(e){this.send("dashboard:filters:update",{filters:e})},t.prototype.setOptions=function(e){this.send("dashboard:options:set",e)},t.prototype.openScheduleDialog=function(){return i(this,void 0,void 0,(function(){return s(this,(function(e){return[2,this.sendAndReceive("dashboard:schedule_modal:open")]}))}))},t.prototype.loadDashboard=function(e,t){return void 0===t&&(t=!1),i(this,void 0,void 0,(function(){return s(this,(function(n){return[2,this.sendAndReceive("dashboard:load",{id:e,pushHistory:t})]}))}))},t}(n(779).LookerEmbedBase);t.LookerEmbedDashboard=a},819:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedClient=void 0;var s=n(313),a=/^https?:\/\//,u=function(){function e(e){this._builder=e,this._hostBuilder=null,this._host=null,this._connection=null,this._client=null,this._cookielessInitialized=!1}return Object.defineProperty(e.prototype,"connection",{get:function(){return this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isConnected",{get:function(){return!!this._connection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"targetOrigin",{get:function(){if(this._builder.sandboxedHost)return"*";var e=this._builder.apiHost;return a.test(e)?e:"https://".concat(e)},enumerable:!1,configurable:!0}),e.prototype.createIframe=function(e){return r(this,void 0,void 0,(function(){var t,n,i,a,u,c,l,h,d,f,p,y,b=this;return o(this,(function(_){for(t in this._hostBuilder=s.Chatty.createHost(e),this._builder.dialogScroll&&(this._builder.handlers["env:client:dialog"]=[function(e){var t=e.open,n=e.placement;t&&"cover"===n&&window.setTimeout((function(){b._host&&b._host.iframe.scrollIntoView(!0)}),200)}]),this._builder.dynamicIFrameHeight&&(this._builder.handlers["page:properties:changed"]=[function(e){var t=e.height;t&&t>100&&b._host&&(b._host.iframe.style.height="".concat(t,"px"))}]),this._builder.isCookielessEmbed&&(this._builder.handlers["session:tokens:request"]=[function(){return r(b,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return this._client&&this._cookielessApiToken&&this._builder.generateTokens?this._cookielessInitialized?[4,this.generateTokens()]:[3,2]:[3,4];case 1:return e=o.sent(),t=e.api_token,n=e.api_token_ttl,r=e.navigation_token,i=e.navigation_token_ttl,s=e.session_reference_token_ttl,this._cookielessApiToken=t,this._cookielessApiTokenTtl=n,this._cookielessNavigationToken=r,this._cookielessNavigationTokenTtl=i,this._cookielessSessionReferenceTokenTtl=s,[3,3];case 2:this._cookielessInitialized=!0,o.label=3;case 3:this._client.send("session:tokens",{api_token:this._cookielessApiToken,api_token_ttl:this._cookielessApiTokenTtl,navigation_token:this._cookielessNavigationToken,navigation_token_ttl:this._cookielessNavigationTokenTtl,session_reference_token_ttl:this._cookielessSessionReferenceTokenTtl}),o.label=4;case 4:return[2]}}))}))}]),this._builder.handlers)for(n=function(e){i._hostBuilder.on(t,(function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.apply(b._client,t)}))},i=this,a=0,u=this._builder.handlers[t];a<u.length;a++)c=u[a],n(c);for(l=0,h=this._builder.sandboxAttrs;l<h.length;l++)p=h[l],this._hostBuilder.withSandboxAttribute(p);for(d=0,f=this._builder.allowAttrs;d<f.length;d++)p=f[d],this._hostBuilder.withAllowAttribute(p);return this._host=this._hostBuilder.frameBorder(this._builder.frameBorder).withTargetOrigin(this.targetOrigin).appendTo(this._builder.el).build(),this._builder.classNames.length&&(y=this._host.iframe.classList).add.apply(y,this._builder.classNames),this._builder.scrollMonitor&&this.addIframeMonitor(this._host.iframe),[2,this._host.connect().then((function(e){return b._client=new b._builder.clientConstructor(e),b._client}))]}))}))},e.prototype.sendScrollData=function(e){this._client.send("env:host:scroll",{offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,scrollX:window.scrollX,scrollY:window.scrollY})},e.prototype.addIframeMonitor=function(e){var t=this;document.addEventListener("scroll",(function(n){t.sendScrollData(e)})),window.addEventListener("resize",(function(n){t.sendScrollData(e)}))},e.prototype.createUrl=function(){return r(this,void 0,void 0,(function(){var e,t,n,i,s,a,u=this;return o(this,(function(c){if(e=this._builder.embedUrl,!(null==(t=this._builder.auth)?void 0:t.url))return[2,"".concat(this._builder.apiHost).concat(e)];if(n="".concat(t.url,"?src=").concat(encodeURIComponent(e)),t.params)for(i=0,s=t.params;i<s.length;i++)a=s[i],n+="&".concat(encodeURIComponent(a.name),"=").concat(encodeURIComponent(a.value));return[2,new Promise((function(e,i){return r(u,void 0,void 0,(function(){var r,s,a,u;return o(this,(function(o){if((r=new XMLHttpRequest).open("GET",n),t.withCredentials&&(r.withCredentials=t.withCredentials),r.setRequestHeader("Cache-Control","no-cache"),t.headers)for(s=0,a=t.headers;s<a.length;s++)u=a[s],r.setRequestHeader(u.name,u.value);return r.onload=function(){200===r.status?e(JSON.parse(r.responseText).url):i(r.statusText)},r.onerror=function(){return i(r.statusText)},r.send(),[2]}))}))}))]}))}))},e.prototype.acquireCookielessEmbedSession=function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return e.sessionAcquired?[2,this.acquireCookielessEmbedSessionInternal()]:e.acquireSessionPromise?[4,e.acquireSessionPromise]:[3,2];case 1:return t.sent(),[2,this.acquireCookielessEmbedSessionInternal()];case 2:return e.acquireSessionPromise=this.acquireCookielessEmbedSessionInternal(),[2,e.acquireSessionPromise.then((function(t){return e.sessionAcquired=!0,t})).catch((function(t){throw e.acquireSessionPromise=void 0,t}))]}}))}))},e.prototype.acquireCookielessEmbedSessionInternal=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a,u,c,l,h,d,f,p;return o(this,(function(o){switch(o.label){case 0:if(e=this._builder,t=e.acquireSession,n=e.generateTokens,!t)throw new Error("invalid state: acquireSession not defined");if(!n)throw new Error("invalid state: generateTokens not defined");return[4,this.acquireSession()];case 1:if(r=o.sent(),i=r.authentication_token,s=r.api_token,a=r.api_token_ttl,u=r.navigation_token,c=r.navigation_token_ttl,l=r.session_reference_token_ttl,!i||!u||!s)throw new Error("failed to prepare cookieless embed session");return this._cookielessApiToken=s,this._cookielessApiTokenTtl=a,this._cookielessNavigationToken=u,this._cookielessNavigationTokenTtl=c,this._cookielessSessionReferenceTokenTtl=l,h="https://".concat(this._builder.apiHost),d=""===new URL(this._builder.embedUrl,h).search?"?":"&",f="".concat(this._builder.embedUrl).concat(d,"embed_navigation_token=").concat(u),p="/login/embed/"+encodeURIComponent(f)+"?embed_authentication_token=".concat(i),[2,"".concat(h).concat(p)]}}))}))},e.prototype.acquireSession=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.acquireSession)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,[4,fetch(n,r)];case 3:if(!(i=o.sent()).ok)throw console.error("acquire embed session failed",{resp:i}),new Error("acquire embed session failed");return[4,i.json()];case 5:throw s=o.sent(),console.error(s),new Error("acquire embed session failed");case 6:return[2]}}))}))},e.prototype.generateTokens=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,i,s,a;return o(this,(function(o){switch(o.label){case 0:return"function"!=typeof(e=this._builder.generateTokens)?[3,2]:[4,e()];case 1:case 4:return[2,o.sent()];case 2:return o.trys.push([2,5,,6]),t=this.getResource(e),n=t.url,r=t.init,i=r||{body:JSON.stringify({api_token:this._cookielessApiToken,navigation_token:this._cookielessNavigationToken}),headers:{"content-type":"application/json"},method:"PUT"},[4,fetch(n,i)];case 3:if(!(s=o.sent()).ok){if(400===s.status)return[2,{session_reference_token_ttl:0}];throw console.error("generate tokens failed",{resp:s}),new Error("generate tokens failed")}return[4,s.json()];case 5:throw a=o.sent(),console.error(a),new Error("generate tokens failed");case 6:return[2]}}))}))},e.prototype.getResource=function(e){var t,n;if("object"==typeof e){var r=e.url;n=i(e,["url"]),t=r}else t=e;return{init:n,url:t}},e.prototype.connect=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){if(this._connection)return[2,this._connection];if(this._builder.url){if(this._builder.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");this._connection=this.createIframe(this._builder.url)}else this._builder.isCookielessEmbed?this._connection=this.acquireCookielessEmbedSession().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))})).catch((function(t){throw e._connection=null,t})):this._connection=this.createUrl().then((function(t){return r(e,void 0,void 0,(function(){return o(this,(function(e){return[2,this.createIframe(t)]}))}))}));return[2,this._connection]}))}))},e.sessionAcquired=!1,e}();t.EmbedClient=u},779:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedBase=void 0;var o=function(){function e(e){this._host=e}return e.prototype.send=function(e,t){this._host.send(e,t)},e.prototype.sendAndReceive=function(e,t){return n(this,void 0,void 0,(function(){return r(this,(function(n){return[2,this._host.sendAndReceive(e,t)]}))}))},e}();t.LookerEmbedBase=o},7:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmbedBuilder=void 0;var r=n(819);function o(e){return e.replace(/,/g,"^,")}var i=function(){function e(e,t,n,r){if(this._hostSettings=e,this._type=t,this._endpoint=n,this._clientConstructor=r,this._handlers={},this._appendTo=null,this._sandboxAttrs=[],this._allowAttrs=[],this._classNames=[],this._frameBorder="0",this.sandboxedHost)this._params={embed_domain:this._hostSettings.apiHost,sandboxed_host:"true",sdk:"2"};else{var o=window.location.origin;this._params={embed_domain:o,sdk:"2"}}}return e.prototype.withFrameBorder=function(e){return this._frameBorder=e,this},e.prototype.withId=function(e){return this._id=e,this},e.prototype.withParams=function(e){for(var t in e)this._params[t]=e[t];return this},e.prototype.withFilters=function(e,t){if(void 0===t&&(t=!1),"dashboard"===this.type)for(var n in e)this._params[n]=t?o(e[n]):e[n];else for(var n in e)this._params["f[".concat(n,"]")]=t?o(e[n]):e[n];return this},e.prototype.withSandboxAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._sandboxAttrs=this._sandboxAttrs.concat(e),this},e.prototype.withAllowAttr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._allowAttrs=this._allowAttrs.concat(e),this},e.prototype.withClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._classNames=this._classNames.concat(e),this},e.prototype.withNext=function(e){return void 0===e&&(e=""),this},e.prototype.withTheme=function(e){return this._params.theme=e,this},e.prototype.withScrollMonitor=function(e){return void 0===e&&(e=!0),this._scrollMonitor=e,this},e.prototype.withDynamicIFrameHeight=function(e){return void 0===e&&(e=!0),this._dynamicIFrameHeight=e,this},e.prototype.withDialogScroll=function(e){return void 0===e&&(e=!0),this._dialogScroll=e,this},e.prototype.withApiHost=function(e){if(this._hostSettings.apiHost){if(this._hostSettings.apiHost!==e)throw new Error("not allowed to change api host")}else this._hostSettings.apiHost=e,this.sandboxedHost&&(this._params.embed_domain=e,this._params.sandboxed_host="true");return this},e.prototype.withAuthUrl=function(e){var t;if(null===(t=this._hostSettings.auth)||void 0===t?void 0:t.url){if(this._hostSettings.auth.url!==e)throw new Error("not allowed to change auth url")}else this._hostSettings.auth={url:e};return this},e.prototype.withAuth=function(e){if(this._hostSettings.auth){if(this._hostSettings.auth!==e)throw new Error("not allowed to change auth")}else this._hostSettings.auth=e;return this},e.prototype.withUrl=function(e){if(this.isCookielessEmbed)throw new Error("withUrl not supported by cookieless embed");return this._url=e,this},Object.defineProperty(e.prototype,"sandboxedHost",{get:function(){if(void 0===this._sandboxedHost){var e=window.location.origin;this._sandboxedHost="null"===e||!e}return this._sandboxedHost},set:function(e){this._sandboxedHost=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"el",{get:function(){return this._appendTo||document.body},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameBorder",{get:function(){return this._frameBorder},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endpoint",{get:function(){return this._endpoint},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiHost",{get:function(){return this._hostSettings.apiHost},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCookielessEmbed",{get:function(){return!!this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"acquireSession",{get:function(){return this._hostSettings.acquireSession},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generateTokens",{get:function(){return this._hostSettings.generateTokens},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"authUrl",{get:function(){var e;return null===(e=this._hostSettings.auth)||void 0===e?void 0:e.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"auth",{get:function(){return this._hostSettings.auth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"embedUrl",{get:function(){var e=function(e){var t=[];for(var n in e)for(var r=e[n],o=0,i=Array.isArray(r)?r:[r];o<i.length;o++){var s=i[o];t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(s)))}return t.join("&")}(this._params);return"".concat(this.endpoint,"/").concat(this.id,"?").concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handlers",{get:function(){return this._handlers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sandboxAttrs",{get:function(){return this._sandboxAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowAttrs",{get:function(){return this._allowAttrs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"suffix",{get:function(){return""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrollMonitor",{get:function(){return this._scrollMonitor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dynamicIFrameHeight",{get:function(){return this._dynamicIFrameHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dialogScroll",{get:function(){return this._dialogScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientConstructor",{get:function(){return this._clientConstructor},enumerable:!1,configurable:!0}),e.prototype.appendTo=function(e){return this._appendTo="string"==typeof e?document.querySelector(e):e,this},e.prototype.on=function(e,t){return this._handlers[e]=this._handlers[e]?this._handlers[e]:[],this._handlers[e].push(t),this},e.prototype.build=function(){return new r.EmbedClient(this)},e}();t.EmbedBuilder=i},631:function(e,t,n){"use strict";var r,o=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])},r(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.LookerEmbedExplore=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(779).LookerEmbedBase);t.LookerEmbedExplore=i},965:function(e,t,n){"use strict";var r,o=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])},r(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.LookerEmbedExtension=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(n(779).LookerEmbedBase);t.LookerEmbedExtension=i},406:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LookerEmbedSDK=void 0;var i=n(7),s=n(262),a=n(631),u=n(965),c=n(961);o(n(567),t);var l=function(){function e(){}return e.init=function(e,t){this.apiHost=e,this.auth="string"==typeof t?{url:t}:t,this.acquireSession=void 0,this.generateTokens=void 0},e.initCookieless=function(e,t,n){this.apiHost=e,this.acquireSession=t,this.generateTokens=n,this.auth=void 0},e.createDashboardWithUrl=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withUrl(e)},e.createDashboardWithId=function(e){return new i.EmbedBuilder(this,"dashboard","/embed/dashboards",s.LookerEmbedDashboard).withId(e)},e.createExploreWithUrl=function(e){return new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withUrl(e)},e.createExploreWithId=function(e){return e=e.replace("::","/"),new i.EmbedBuilder(this,"explore","/embed/explore",a.LookerEmbedExplore).withId(e)},e.createLookWithUrl=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withUrl(e)},e.createLookWithId=function(e){return new i.EmbedBuilder(this,"look","/embed/looks",c.LookerEmbedLook).withId(e)},e.createExtensionWithUrl=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withUrl(e)},e.createExtensionWithId=function(e){return new i.EmbedBuilder(this,"extension","/embed/extensions",u.LookerEmbedExtension).withId(e)},e}();t.LookerEmbedSDK=l},961:function(e,t,n){"use strict";var r,o=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])},r(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.LookerEmbedLook=void 0;var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.run=function(){this.send("look:run")},t.prototype.updateFilters=function(e){this.send("look:filters:update",{filters:e})},t}(n(779).LookerEmbedBase);t.LookerEmbedLook=i},567:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},542:(e,t,n)=>{"use strict";e.exports=n(964).polyfill()},964:function(e,t,n){e.exports=function(){"use strict";function e(e){return"function"==typeof e}var t=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,i=void 0,s=function(e,t){f[r]=e,f[r+1]=t,2===(r+=2)&&(i?i(p):v())};var a="undefined"!=typeof window?window:void 0,u=a||{},c=u.MutationObserver||u.WebKitMutationObserver,l="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var e=setTimeout;return function(){return e(p,1)}}var f=new Array(1e3);function p(){for(var e=0;e<r;e+=2)(0,f[e])(f[e+1]),f[e]=void 0,f[e+1]=void 0;r=0}var y,b,_,g,v=void 0;function m(e,t){var n=this,r=new this.constructor(k);void 0===r[C]&&R(r);var o=n._state;if(o){var i=arguments[o-1];s((function(){return q(o,r,i,n._result)}))}else T(n,r,e,t);return r}function w(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(k);return M(t,e),t}v=l?function(){return process.nextTick(p)}:c?(b=0,_=new c(p),g=document.createTextNode(""),_.observe(g,{characterData:!0}),function(){g.data=b=++b%2}):h?((y=new MessageChannel).port1.onmessage=p,function(){return y.port2.postMessage(0)}):void 0===a?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(p)}:d()}catch(e){return d()}}():d();var C=Math.random().toString(36).substring(2);function k(){}var O=void 0,S=1,E=2;function A(t,n,r){n.constructor===t.constructor&&r===m&&n.constructor.resolve===w?function(e,t){t._state===S?x(e,t._result):t._state===E?P(e,t._result):T(t,void 0,(function(t){return M(e,t)}),(function(t){return P(e,t)}))}(t,n):void 0===r?x(t,n):e(r)?function(e,t,n){s((function(e){var r=!1,o=function(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}(n,t,(function(n){r||(r=!0,t!==n?M(e,n):x(e,n))}),(function(t){r||(r=!0,P(e,t))}),e._label);!r&&o&&(r=!0,P(e,o))}),e)}(t,n,r):x(t,n)}function M(e,t){if(e===t)P(e,new TypeError("You cannot resolve a promise with itself"));else if(o=typeof(r=t),null===r||"object"!==o&&"function"!==o)x(e,t);else{var n=void 0;try{n=t.then}catch(t){return void P(e,t)}A(e,t,n)}var r,o}function j(e){e._onerror&&e._onerror(e._result),H(e)}function x(e,t){e._state===O&&(e._result=t,e._state=S,0!==e._subscribers.length&&s(H,e))}function P(e,t){e._state===O&&(e._state=E,e._result=t,s(j,e))}function T(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+S]=n,o[i+E]=r,0===i&&e._state&&s(H,e)}function H(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,i=e._result,s=0;s<t.length;s+=3)r=t[s],o=t[s+n],r?q(n,r,o,i):o(i);e._subscribers.length=0}}function q(t,n,r,o){var i=e(r),s=void 0,a=void 0,u=!0;if(i){try{s=r(o)}catch(e){u=!1,a=e}if(n===s)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else s=o;n._state!==O||(i&&u?M(n,s):!1===u?P(n,a):t===S?x(n,s):t===E&&P(n,s))}var B=0;function R(e){e[C]=B++,e._state=void 0,e._result=void 0,e._subscribers=[]}var I=function(){function e(e,n){this._instanceConstructor=e,this.promise=new e(k),this.promise[C]||R(this.promise),t(n)?(this.length=n.length,this._remaining=n.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(n),0===this._remaining&&x(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===w){var o=void 0,i=void 0,s=!1;try{o=e.then}catch(e){s=!0,i=e}if(o===m&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===L){var a=new n(k);s?P(a,i):A(a,e,o),this._willSettleAt(a,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===O&&(this._remaining--,e===E?P(r,n):this._result[t]=n),0===this._remaining&&x(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;T(e,void 0,(function(e){return n._settledAt(S,t,e)}),(function(e){return n._settledAt(E,t,e)}))},e}();var L=function(){function t(e){this[C]=B++,this._result=this._state=void 0,this._subscribers=[],k!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){M(e,t)}),(function(t){P(e,t)}))}catch(t){P(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();return L.prototype.then=m,L.all=function(e){return new I(this,e).promise},L.race=function(e){var n=this;return t(e)?new n((function(t,r){for(var o=e.length,i=0;i<o;i++)n.resolve(e[i]).then(t,r)})):new n((function(e,t){return t(new TypeError("You must pass an array to race."))}))},L.resolve=w,L.reject=function(e){var t=new this(k);return P(t,e),t},L._setScheduler=function(e){i=e},L._setAsap=function(e){s=e},L._asap=s,L.polyfill=function(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=L},L.Promise=L,L}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(406)})())); |
@@ -33,3 +33,2 @@ import type { ChattyHostConnection, CallbackStore } from '@looker/chatty'; | ||
private _params; | ||
private _suffix; | ||
private _url?; | ||
@@ -87,4 +86,6 @@ private _sandboxedHost?; | ||
* @param suffix Next generation suffix. Defaults to '-next'. | ||
* @deprecated this is now a noop as dashboards next is the default dashboards | ||
* experience and the legacy dashboards have been removed. | ||
*/ | ||
withNext(suffix?: string): this; | ||
withNext(_?: string): this; | ||
/** | ||
@@ -221,2 +222,3 @@ * Allows specifying a theme for the content. | ||
* The the suffix to append to the content type portion of the url | ||
* @deprecated will always return an empty string | ||
*/ | ||
@@ -223,0 +225,0 @@ get suffix(): string; |
@@ -64,3 +64,2 @@ "use strict"; | ||
this._frameBorder = '0'; | ||
this._suffix = ''; | ||
if (this.sandboxedHost) { | ||
@@ -173,7 +172,7 @@ this._params = { | ||
* @param suffix Next generation suffix. Defaults to '-next'. | ||
* @deprecated this is now a noop as dashboards next is the default dashboards | ||
* experience and the legacy dashboards have been removed. | ||
*/ | ||
EmbedBuilder.prototype.withNext = function (suffix) { | ||
if (suffix === void 0) { suffix = '-next'; } | ||
this._suffix = suffix; | ||
this._endpoint += this._suffix; | ||
EmbedBuilder.prototype.withNext = function (_) { | ||
if (_ === void 0) { _ = ''; } | ||
return this; | ||
@@ -473,5 +472,6 @@ }; | ||
* The the suffix to append to the content type portion of the url | ||
* @deprecated will always return an empty string | ||
*/ | ||
get: function () { | ||
return this._suffix; | ||
return ''; | ||
}, | ||
@@ -478,0 +478,0 @@ enumerable: false, |
@@ -284,2 +284,16 @@ import type { LookerEmbedBase } from './embed_base'; | ||
/** | ||
* Drill modal download event | ||
*/ | ||
export interface DrillModalDownloadEvent extends LookerEmbedEvent { | ||
dashboard: { | ||
id: string | number; | ||
title: string; | ||
url: string; | ||
absoluteUrl: string; | ||
dashboard_filters: LookerEmbedFilterParams; | ||
}; | ||
drillExploreUrl: string; | ||
fileFormat: string; | ||
} | ||
/** | ||
* Drill Modal Explore from Here event | ||
@@ -427,2 +441,3 @@ * | ||
'drillmenu:click': (this: LookerEmbedBase, event: DrillMenuEvent) => CancellableEventResponse | undefined; | ||
'drillmodal:download': (this: LookerEmbedBase, event: DrillModalDownloadEvent) => void; | ||
'drillmodal:explore': (this: LookerEmbedBase, event: DrillModalExploreEvent) => CancellableEventResponse | undefined; | ||
@@ -429,0 +444,0 @@ 'explore:run:start': (this: LookerEmbedLook, event: ExploreEvent) => void; |
{ | ||
"name": "@looker/embed-sdk", | ||
"version": "1.8.6", | ||
"version": "1.8.7", | ||
"description": "A toolkit for embedding Looker", | ||
@@ -26,4 +26,4 @@ "main": "lib/index.js", | ||
"lint-fix": "eslint --format stylish --fix '**/*.ts'", | ||
"start": "npm run build_utils && webpack serve --config webpack-devserver.config.js --hot --inline --color --progress", | ||
"prepare": "npm run build", | ||
"start": "npm run build_utils && webpack serve --config webpack-devserver.config.js --hot --color --progress", | ||
"prepare": "husky", | ||
"prepublishOnly": "npm run test-once", | ||
@@ -35,3 +35,3 @@ "python": "webpack --config webpack-devserver.config.js && pip install -r demo/requirements.txt && python demo/demo.py", | ||
"test": "npm run lint && karma start karma.conf.js", | ||
"test-once": "npm run lint && karma start karma.conf.js --single-run " | ||
"test-once": "npm run lint && karma start karma.conf.js --single-run" | ||
}, | ||
@@ -52,5 +52,5 @@ "repository": { | ||
"@looker/eslint-plugin": "^1.0.0", | ||
"@looker/sdk": "^22.16.0", | ||
"@looker/sdk-node": "^22.16.0", | ||
"@looker/sdk-rtl": "^21.4.0", | ||
"@looker/sdk": "^24.20.0", | ||
"@looker/sdk-node": "^24.20.0", | ||
"@looker/sdk-rtl": "^21.6.3", | ||
"@types/cookie-session": "^2.0.44", | ||
@@ -60,6 +60,3 @@ "@types/create-hmac": "^1.1.0", | ||
"@types/jasmine": "^2.8.2", | ||
"@types/node": "^11.12.1", | ||
"@types/readable-stream": "^2.3.14", | ||
"@types/request": "^2.48.8", | ||
"@types/request-promise-native": "^1.0.18", | ||
"@types/node": "^18.16.20", | ||
"@typescript-eslint/eslint-plugin": "^5.9.1", | ||
@@ -76,2 +73,3 @@ "@typescript-eslint/typescript-estree": "^5.9.1", | ||
"express": "^4.18.2", | ||
"husky": "^9.1.7", | ||
"jasmine-core": "^4.0.0", | ||
@@ -83,3 +81,2 @@ "karma": "^6.3.11", | ||
"karma-typescript-es6-transform": "^5.5.3", | ||
"pre-commit": "^1.2.2", | ||
"prettier": "^2.4.1", | ||
@@ -92,13 +89,11 @@ "ts-loader": "^9.2.6", | ||
"typescript-tslint-plugin": "^1.0.1", | ||
"webpack": "^5.66.0", | ||
"webpack-cli": "^4.9.1", | ||
"webpack-dev-server": "^3.11.2", | ||
"webpack": "^5.97.0", | ||
"webpack-cli": "^5.1.4", | ||
"webpack-dev-server": "^5.2.0", | ||
"xhr-mock": "^2.5.1" | ||
}, | ||
"dependencies": { | ||
"@looker/chatty": "^2.3.2" | ||
"@looker/chatty": "^2.3.9", | ||
"@typescript/lib-dom": "npm:@types/web" | ||
}, | ||
"pre-commit": [ | ||
"test-once" | ||
], | ||
"eslintConfig": { | ||
@@ -105,0 +100,0 @@ "extends": [ |
@@ -82,3 +82,2 @@ /* | ||
private _params: UrlParams | ||
private _suffix: string = '' | ||
private _url?: string | null | ||
@@ -207,7 +206,7 @@ private _sandboxedHost?: boolean | ||
* @param suffix Next generation suffix. Defaults to '-next'. | ||
* @deprecated this is now a noop as dashboards next is the default dashboards | ||
* experience and the legacy dashboards have been removed. | ||
*/ | ||
withNext(suffix = '-next') { | ||
this._suffix = suffix | ||
this._endpoint += this._suffix | ||
withNext(_ = '') { | ||
return this | ||
@@ -478,6 +477,7 @@ } | ||
* The the suffix to append to the content type portion of the url | ||
* @deprecated will always return an empty string | ||
*/ | ||
get suffix() { | ||
return this._suffix | ||
return '' | ||
} | ||
@@ -484,0 +484,0 @@ |
@@ -361,2 +361,17 @@ /* | ||
/** | ||
* Drill modal download event | ||
*/ | ||
export interface DrillModalDownloadEvent extends LookerEmbedEvent { | ||
dashboard: { | ||
id: string | number | ||
title: string | ||
url: string | ||
absoluteUrl: string | ||
dashboard_filters: LookerEmbedFilterParams | ||
} | ||
drillExploreUrl: string | ||
fileFormat: string | ||
} | ||
/** | ||
* Drill Modal Explore from Here event | ||
@@ -567,2 +582,6 @@ * | ||
) => CancellableEventResponse | undefined | ||
'drillmodal:download': ( | ||
this: LookerEmbedBase, | ||
event: DrillModalDownloadEvent | ||
) => void | ||
'drillmodal:explore': ( | ||
@@ -569,0 +588,0 @@ this: LookerEmbedBase, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
281859
40
4495
2
+ Added@types/web@0.0.189(transitive)
+ Addedcore-js@3.40.0(transitive)
- Removedcore-js@3.39.0(transitive)
Updated@looker/chatty@^2.3.9