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cAAgBxE,EAC1BwE,EAAU,SAAWtE,EACrBsE,EAAU,MAAQ9E,EAGlB,SAASyF,IAAW,CAClB,IAAIC,EAAQ,OAEZ,GAAI,OAAO,IAAW,IACpBA,EAAQ,YACC,OAAO,KAAS,IACzBA,EAAQ,SAER,IAAI,CACFA,EAAQ,SAAS,aAAa,EAAE,CAClC,MAAY,CACV,MAAM,IAAI,MAAM,0EAA0E,CAC5F,CAGF,IAAIzU,EAAIyU,EAAM,QAEd,GAAIzU,EAAG,CACL,IAAI0U,EAAkB,KACtB,GAAI,CACFA,EAAkB,OAAO,UAAU,SAAS,KAAK1U,EAAE,QAAQ,CAAC,CAC9D,MAAY,CAEZ,CAEA,GAAI0U,IAAoB,oBAAsB,CAAC1U,EAAE,KAC/C,MAEJ,CAEAyU,EAAM,QAAUZ,CAClB,CAGA,OAAAA,EAAU,SAAWW,GACrBX,EAAU,QAAUA,EAEbA,CAEP,CAAE,C","sources":["webpack://nuxt-app/./node_modules/@looker/chatty/lib/client.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/client_builder.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/client_messages.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/host.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/host_builder.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/host_messages.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/index.js","webpack://nuxt-app/./node_modules/@looker/chatty/lib/types.js","webpack://nuxt-app/./node_modules/@looker/chatty/node_modules/debug/src/browser.js","webpack://nuxt-app/./node_modules/@looker/chatty/node_modules/debug/src/debug.js","webpack://nuxt-app/./node_modules/@looker/chatty/node_modules/ms/index.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/dashboard_client.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/embed.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/embed_base.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/embed_builder.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/explore_client.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/extension_client.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/index.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/look_client.js","webpack://nuxt-app/./node_modules/@looker/embed-sdk/lib/types.js","webpack://nuxt-app/./node_modules/es6-promise/auto.js","webpack://nuxt-app/./node_modules/es6-promise/dist/es6-promise.js"],"sourcesContent":["\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChattyClient = exports.ChattyClientStates = void 0;\nvar debugLib = require(\"debug\");\nvar client_messages_1 = require(\"./client_messages\");\nvar host_messages_1 = require(\"./host_messages\");\nrequire(\"es6-promise/auto\"); // Polyfill only browsers without Promises\n/**\n * @private\n * Client connection status\n */\nvar ChattyClientStates;\n(function (ChattyClientStates) {\n ChattyClientStates[ChattyClientStates[\"Connecting\"] = 0] = \"Connecting\";\n ChattyClientStates[ChattyClientStates[\"Syn\"] = 1] = \"Syn\";\n ChattyClientStates[ChattyClientStates[\"Connected\"] = 2] = \"Connected\";\n})(ChattyClientStates = exports.ChattyClientStates || (exports.ChattyClientStates = {}));\n/**\n * The client object for an iframe. The user should not create this object directly, it\n * is returned by the [[ChattyClientBuilder.build]] method.\n */\nvar ChattyClient = /** @class */ (function () {\n /**\n * @param builder The client builder that is responsible for constructing this object.\n * @hidden\n */\n function ChattyClient(builder) {\n this._clientWindow = window;\n this._connection = null;\n this._hostWindow = this._clientWindow.parent;\n this._state = ChattyClientStates.Connecting;\n this._sequence = 0;\n this._receivers = {};\n this._handlers = builder.handlers;\n this._abortControllers = {};\n this._targetOrigin = builder.targetOrigin;\n this._defaultTimeout = builder.defaultTimeout;\n this._channel = new MessageChannel();\n }\n Object.defineProperty(ChattyClient.prototype, \"connection\", {\n /**\n * @returns a Promise to an object that resolves when the host has acknowledged the connection.\n */\n get: function () {\n return this._connection;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyClient.prototype, \"isConnected\", {\n /**\n * @returns a flag indicating whether the client has successfully connected to the host.\n */\n get: function () {\n return this._state === ChattyClientStates.Connected;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Connects to the host window.\n * @returns a Promise to an object that resolves when the host has acknowledged the connection. The\n * object implements the [[ChattyClientConnection]] interface that can be used to talk to the host.\n */\n ChattyClient.prototype.connect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n if (this._connection)\n return [2 /*return*/, this._connection];\n this._connection = new Promise(function (resolve, reject) {\n _this._channel.port1.onmessage = function (evt) {\n ChattyClient._debug('received', evt.data.action, evt.data.data);\n switch (evt.data.action) {\n case host_messages_1.ChattyHostMessages.SynAck:\n _this._state = ChattyClientStates.Connected;\n _this.sendMsg(client_messages_1.ChattyClientMessages.Ack);\n resolve({\n send: function (eventName) {\n var payload = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n payload[_i - 1] = arguments[_i];\n }\n _this.sendMsg(client_messages_1.ChattyClientMessages.Message, {\n eventName: eventName,\n payload: payload,\n });\n },\n sendAndReceive: function (eventName) {\n var _payload = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n _payload[_i - 1] = arguments[_i];\n }\n return __awaiter(_this, void 0, void 0, function () {\n var signal, propagateSignal, payload, options, sequence;\n var _this = this;\n var _a, _b;\n return __generator(this, function (_c) {\n if (_payload.length > 0 &&\n ((_a = _payload[_payload.length - 1]) === null || _a === void 0 ? void 0 : _a.signal) &&\n ((_b = _payload[_payload.length - 1]) === null || _b === void 0 ? void 0 : _b.signal) instanceof AbortSignal) {\n options = _payload[_payload.length - 1];\n signal = options.signal;\n propagateSignal = options.propagateSignal;\n payload = _payload.slice(0, _payload.length - 1);\n }\n else {\n payload = _payload;\n }\n sequence = ++this._sequence;\n this.sendMsg(client_messages_1.ChattyClientMessages.MessageWithResponse, { eventName: eventName, payload: payload }, sequence, propagateSignal);\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var timeoutId;\n if (signal) {\n signal.addEventListener('abort', function (event) {\n var errorMessage = event.target.reason;\n if (typeof errorMessage !== 'string') {\n errorMessage = 'Abort';\n }\n if (propagateSignal) {\n _this.sendMsg(client_messages_1.ChattyClientMessages.AbortMessage, {\n eventName: eventName,\n payload: { reason: errorMessage },\n }, sequence);\n }\n delete _this._receivers[sequence];\n reject(new Error(errorMessage));\n });\n }\n else {\n if (_this._defaultTimeout > -1) {\n timeoutId = setTimeout(function () {\n delete _this._receivers[sequence];\n reject(new Error('Timeout'));\n }, _this._defaultTimeout);\n }\n }\n _this._receivers[sequence] = { reject: reject, resolve: resolve, timeoutId: timeoutId };\n })];\n });\n });\n },\n });\n break;\n case host_messages_1.ChattyHostMessages.Message:\n if (_this._handlers[evt.data.data.eventName]) {\n _this._handlers[evt.data.data.eventName].forEach(function (fn) {\n return fn.apply(_this, evt.data.data.payload);\n });\n }\n break;\n case host_messages_1.ChattyHostMessages.MessageWithResponse:\n {\n var _a = evt.data.data, eventName_1 = _a.eventName, payload = _a.payload, sequence_1 = _a.sequence, signal = _a.signal;\n var results = [];\n var abortStoreName_1 = \"\".concat(eventName_1).concat(sequence_1);\n if (_this._handlers[eventName_1]) {\n var _payload_1;\n if (signal) {\n _this._abortControllers[abortStoreName_1] = new AbortController();\n if (Array.isArray(payload)) {\n _payload_1 = __spreadArray(__spreadArray([], payload, true), [\n _this._abortControllers[abortStoreName_1].signal,\n ], false);\n }\n else {\n _payload_1 = [\n payload,\n _this._abortControllers[abortStoreName_1].signal,\n ];\n }\n }\n else {\n _payload_1 = payload;\n }\n results = _this._handlers[eventName_1].map(function (fn) {\n return fn.apply(_this, _payload_1);\n });\n }\n Promise.all(results)\n .then(function (resolvedResults) {\n delete _this._abortControllers[abortStoreName_1];\n _this.sendMsg(client_messages_1.ChattyClientMessages.Response, { eventName: eventName_1, payload: resolvedResults }, sequence_1);\n })\n .catch(function (error) {\n delete _this._abortControllers[abortStoreName_1];\n _this.sendMsg(client_messages_1.ChattyClientMessages.ResponseError, { eventName: eventName_1, payload: error.toString() }, sequence_1);\n });\n }\n break;\n case host_messages_1.ChattyHostMessages.AbortMessage:\n {\n var _b = evt.data.data, eventName = _b.eventName, payload = _b.payload, sequence = _b.sequence;\n var abortStoreName = \"\".concat(eventName).concat(sequence);\n if (_this._abortControllers[abortStoreName]) {\n _this._abortControllers[abortStoreName].abort(payload === null || payload === void 0 ? void 0 : payload.reason);\n delete _this._abortControllers[abortStoreName];\n }\n }\n break;\n case host_messages_1.ChattyHostMessages.Response:\n {\n var receiver = _this._receivers[evt.data.data.sequence];\n if (receiver) {\n delete _this._receivers[evt.data.data.sequence];\n if (receiver.timeoutId) {\n clearTimeout(receiver.timeoutId);\n }\n receiver.resolve(evt.data.data.payload);\n }\n }\n break;\n case host_messages_1.ChattyHostMessages.ResponseError:\n {\n var receiver = _this._receivers[evt.data.data.sequence];\n if (receiver) {\n delete _this._receivers[evt.data.data.sequence];\n if (receiver.timeoutId) {\n clearTimeout(receiver.timeoutId);\n }\n receiver.reject(typeof evt.data.data.payload === 'string'\n ? new Error(evt.data.data.payload)\n : evt.data.data.payload);\n }\n }\n break;\n }\n };\n _this.initiateHandshake();\n });\n return [2 /*return*/, this._connection];\n });\n });\n };\n ChattyClient.prototype.initiateHandshake = function () {\n ChattyClient._debug('connecting to', this._targetOrigin);\n this._hostWindow.postMessage({\n action: client_messages_1.ChattyClientMessages.Syn,\n }, this._targetOrigin, [this._channel.port2]);\n this._state = ChattyClientStates.Syn;\n };\n ChattyClient.prototype.sendMsg = function (action, data, sequence, propagateSignal) {\n if (data === void 0) { data = {}; }\n var sequenceData = sequence ? { sequence: sequence } : {};\n var signalData = propagateSignal === true ? { signal: propagateSignal } : {};\n var dataWithSequence = __assign(__assign(__assign({}, data), sequenceData), signalData);\n ChattyClient._debug('sending', action, dataWithSequence);\n this._channel.port1.postMessage({ action: action, data: dataWithSequence });\n };\n ChattyClient._debug = debugLib('looker:chatty:client');\n return ChattyClient;\n}());\nexports.ChattyClient = ChattyClient;\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChattyClientBuilder = void 0;\nvar client_1 = require(\"./client\");\n/**\n * Provides methods to define the properties of a [[ChattyClient]]\n */\nvar ChattyClientBuilder = /** @class */ (function () {\n function ChattyClientBuilder() {\n this._targetOrigin = '*';\n this._handlers = {};\n this._defaultTimeout = 30000;\n }\n Object.defineProperty(ChattyClientBuilder.prototype, \"targetOrigin\", {\n get: function () {\n return this._targetOrigin;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyClientBuilder.prototype, \"handlers\", {\n get: function () {\n return this._handlers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyClientBuilder.prototype, \"defaultTimeout\", {\n get: function () {\n return this._defaultTimeout;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Removes an event handler to the client.\n *\n * @param name Event name\n * @param fn Callback function to remove\n * @returns the client builder\n */\n ChattyClientBuilder.prototype.off = function (name, fn) {\n if (this._handlers[name]) {\n this._handlers[name] = this._handlers[name].filter(function (handler) { return handler !== fn; });\n }\n };\n /**\n * Adds an event handler to the client.\n *\n * @param name Event name to which to listen.\n * @param fn Callback function that is invoked when the event\n * is received, and accepts any parameters that were passed with the event.\n * If the event received is sent using [[ChattyHostConnection.sendAndReceive]], its return value is\n * included in the array that will be passed to the resolved promise.\n * @returns the client builder\n */\n ChattyClientBuilder.prototype.on = function (name, fn) {\n this._handlers[name] = this._handlers[name] || [];\n this._handlers[name].push(fn);\n return this;\n };\n /**\n * Sets the default period of time a [[ChattyClientConnection.sendAndReceive]] message will wait.\n * Use a negative number to wait indefinitely.\n * The default is 30000ms\n *\n * @param timeout in milliseconds\n * @returns the client builder\n */\n ChattyClientBuilder.prototype.withDefaultTimeout = function (timeout) {\n this._defaultTimeout = timeout;\n return this;\n };\n /**\n * Optional. Sets the target origin parameter used to communicate with the host. Default\n * is '*'. If possible it should be set the the host window's origin.\n *\n * @param targetOrigin targetOrigin to use with postMessage()\n * @returns the client builder\n */\n ChattyClientBuilder.prototype.withTargetOrigin = function (targetOrigin) {\n this._targetOrigin = targetOrigin;\n return this;\n };\n /**\n * Builds a [[ChattyClient]] with the provided properties.\n * @returns a new Chatty client.\n */\n ChattyClientBuilder.prototype.build = function () {\n return new client_1.ChattyClient(this);\n };\n return ChattyClientBuilder;\n}());\nexports.ChattyClientBuilder = ChattyClientBuilder;\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChattyClientMessages = void 0;\n/**\n * The recognized set of events that are sent from the client to the host.\n * @private\n */\n// IMPORTANT - ALWAYS add new members at the END of the enum. Failure to do\n// so will break interaction with a different version of chatty.\nvar ChattyClientMessages;\n(function (ChattyClientMessages) {\n /** First part of handshake message */\n ChattyClientMessages[ChattyClientMessages[\"Syn\"] = 0] = \"Syn\";\n /** Final part of handshake message */\n ChattyClientMessages[ChattyClientMessages[\"Ack\"] = 1] = \"Ack\";\n /** Normal message */\n ChattyClientMessages[ChattyClientMessages[\"Message\"] = 2] = \"Message\";\n /** Message that expects a response */\n ChattyClientMessages[ChattyClientMessages[\"MessageWithResponse\"] = 3] = \"MessageWithResponse\";\n /** Response */\n ChattyClientMessages[ChattyClientMessages[\"Response\"] = 4] = \"Response\";\n /** Asynchronous error response */\n ChattyClientMessages[ChattyClientMessages[\"ResponseError\"] = 5] = \"ResponseError\";\n /** Abort message */\n ChattyClientMessages[ChattyClientMessages[\"AbortMessage\"] = 6] = \"AbortMessage\";\n})(ChattyClientMessages = exports.ChattyClientMessages || (exports.ChattyClientMessages = {}));\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChattyHost = exports.ChattyHostStates = void 0;\nvar debugLib = require(\"debug\");\nvar client_messages_1 = require(\"./client_messages\");\nvar host_messages_1 = require(\"./host_messages\");\nrequire(\"es6-promise/auto\"); // Polyfill only browsers without Promises\n/**\n * @private\n * Host connection status\n */\nvar ChattyHostStates;\n(function (ChattyHostStates) {\n ChattyHostStates[ChattyHostStates[\"Connecting\"] = 0] = \"Connecting\";\n ChattyHostStates[ChattyHostStates[\"SynAck\"] = 1] = \"SynAck\";\n ChattyHostStates[ChattyHostStates[\"Connected\"] = 2] = \"Connected\";\n})(ChattyHostStates = exports.ChattyHostStates || (exports.ChattyHostStates = {}));\n/**\n * The host object for an iframe. The user should not create this object directly, it\n * is returned by the [[ChattyHostBuilder.build]] method.\n */\nvar ChattyHost = /** @class */ (function () {\n /**\n * @param builder The client builder that is responsible for constructing this object.\n * @hidden\n */\n function ChattyHost(builder) {\n var _this = this;\n this._hostWindow = window;\n this._connection = null;\n this._state = ChattyHostStates.Connecting;\n this._sequence = 0;\n this._receivers = {};\n this.iframe = document.createElement('iframe');\n builder.sandboxAttrs.forEach(function (attr) { return _this.iframe.sandbox.add(attr); });\n if ('allow' in this.iframe) {\n this.iframe.allow = builder.allowAttrs.join('; ');\n }\n // tslint:disable-next-line:deprecation\n this.iframe.frameBorder = builder.getFrameBorder();\n if (builder.url) {\n this.iframe.src = builder.url;\n }\n else if (builder.source) {\n this.iframe.srcdoc = builder.source;\n }\n else {\n console.warn('url or source required to initialize Chatty host correctly');\n }\n this._appendTo = builder.el;\n this._handlers = builder.handlers;\n this._abortControllers = {};\n this._port = null;\n this._targetOrigin = builder.targetOrigin;\n this._defaultTimeout = builder.defaultTimeout;\n }\n Object.defineProperty(ChattyHost.prototype, \"connection\", {\n /**\n * @returns a Promise to an object that resolves when the client initiates the connection.\n */\n get: function () {\n return this._connection;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHost.prototype, \"isConnected\", {\n /**\n * @returns a flag indicating whether the client successfully connected to the host.\n */\n get: function () {\n return this._state === ChattyHostStates.Connected;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Connects to the client iframe. Waits for the client iframe to load and initiate a\n * connection using the chatty client.\n *\n * @returns a Promise to an object that resolves when the client has initiated the connection. The\n * object implements the [[ChattyHostConnection]] that can be used to talk to the host.\n */\n ChattyHost.prototype.connect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var createConnection;\n var _this = this;\n return __generator(this, function (_a) {\n if (this._connection)\n return [2 /*return*/, this._connection];\n createConnection = function () { return __awaiter(_this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var eventListener = function (evt) {\n ChattyHost._debug('port received', evt.data.action, evt.data.data);\n switch (evt.data.action) {\n case client_messages_1.ChattyClientMessages.Ack:\n _this._state = ChattyHostStates.Connected;\n resolve({\n send: function (eventName) {\n var payload = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n payload[_i - 1] = arguments[_i];\n }\n _this.sendMsg(host_messages_1.ChattyHostMessages.Message, {\n eventName: eventName,\n payload: payload,\n });\n },\n sendAndReceive: function (eventName) {\n var _payload = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n _payload[_i - 1] = arguments[_i];\n }\n return __awaiter(_this, void 0, void 0, function () {\n var signal, propagateSignal, payload, options, sequence;\n var _this = this;\n var _a, _b;\n return __generator(this, function (_c) {\n if (_payload.length > 0 &&\n ((_a = _payload[_payload.length - 1]) === null || _a === void 0 ? void 0 : _a.signal) &&\n ((_b = _payload[_payload.length - 1]) === null || _b === void 0 ? void 0 : _b.signal) instanceof AbortSignal) {\n options = _payload[_payload.length - 1];\n signal = options.signal;\n propagateSignal = options.propagateSignal;\n payload = _payload.slice(0, _payload.length - 1);\n }\n else {\n payload = _payload;\n }\n sequence = ++this._sequence;\n this.sendMsg(host_messages_1.ChattyHostMessages.MessageWithResponse, { eventName: eventName, payload: payload }, sequence, propagateSignal);\n return [2 /*return*/, new Promise(function (resolve, reject) {\n var timeoutId;\n if (signal) {\n signal.addEventListener('abort', function (event) {\n if (propagateSignal) {\n var errorMessage_1 = event.target\n .reason;\n if (typeof errorMessage_1 !== 'string') {\n errorMessage_1 = 'Abort';\n }\n _this.sendMsg(host_messages_1.ChattyHostMessages.AbortMessage, {\n eventName: eventName,\n payload: { reason: errorMessage_1 },\n }, sequence);\n }\n delete _this._receivers[sequence];\n var errorMessage = event.target.reason;\n if (typeof errorMessage !== 'string') {\n errorMessage = 'Abort';\n }\n reject(new Error(errorMessage));\n });\n }\n else {\n if (_this._defaultTimeout > -1) {\n timeoutId = setTimeout(function () {\n delete _this._receivers[sequence];\n reject(new Error('Timeout'));\n }, _this._defaultTimeout);\n }\n }\n _this._receivers[sequence] = { reject: reject, resolve: resolve, timeoutId: timeoutId };\n })];\n });\n });\n },\n });\n break;\n case client_messages_1.ChattyClientMessages.Message:\n if (_this._handlers[evt.data.data.eventName]) {\n _this._handlers[evt.data.data.eventName].forEach(function (fn) {\n return fn.apply(_this, evt.data.data.payload);\n });\n }\n break;\n case client_messages_1.ChattyClientMessages.MessageWithResponse:\n {\n var _a = evt.data.data, eventName_1 = _a.eventName, payload = _a.payload, sequence_1 = _a.sequence, signal = _a.signal;\n var results = [];\n var abortStoreName_1 = \"\".concat(eventName_1).concat(sequence_1);\n if (_this._handlers[eventName_1]) {\n var _payload_1;\n if (signal) {\n _this._abortControllers[abortStoreName_1] =\n new AbortController();\n if (Array.isArray(payload)) {\n _payload_1 = __spreadArray(__spreadArray([], payload, true), [\n _this._abortControllers[abortStoreName_1].signal,\n ], false);\n }\n else {\n _payload_1 = [\n payload,\n _this._abortControllers[abortStoreName_1].signal,\n ];\n }\n }\n else {\n _payload_1 = payload;\n }\n results = _this._handlers[eventName_1].map(function (fn) {\n return fn.apply(_this, _payload_1);\n });\n }\n Promise.all(results)\n .then(function (resolvedResults) {\n delete _this._abortControllers[abortStoreName_1];\n _this.sendMsg(host_messages_1.ChattyHostMessages.Response, { eventName: eventName_1, payload: resolvedResults }, sequence_1);\n })\n .catch(function (error) {\n delete _this._abortControllers[abortStoreName_1];\n _this.sendMsg(host_messages_1.ChattyHostMessages.ResponseError, { eventName: eventName_1, payload: error.toString() }, sequence_1);\n });\n }\n break;\n case client_messages_1.ChattyClientMessages.AbortMessage:\n {\n var _b = evt.data.data, eventName = _b.eventName, payload = _b.payload, sequence = _b.sequence;\n var abortStoreName = \"\".concat(eventName).concat(sequence);\n if (_this._abortControllers[abortStoreName]) {\n _this._abortControllers[abortStoreName].abort(payload === null || payload === void 0 ? void 0 : payload.reason);\n delete _this._abortControllers[abortStoreName];\n }\n }\n break;\n case client_messages_1.ChattyClientMessages.Response:\n {\n var receiver = _this._receivers[evt.data.data.sequence];\n if (receiver) {\n delete _this._receivers[evt.data.data.sequence];\n if (receiver.timeoutId) {\n clearTimeout(receiver.timeoutId);\n }\n receiver.resolve(evt.data.data.payload);\n }\n }\n break;\n case client_messages_1.ChattyClientMessages.ResponseError:\n {\n var receiver = _this._receivers[evt.data.data.sequence];\n if (receiver) {\n delete _this._receivers[evt.data.data.sequence];\n if (receiver.timeoutId) {\n clearTimeout(receiver.timeoutId);\n }\n receiver.reject(typeof evt.data.data.payload === 'string'\n ? new Error(evt.data.data.payload)\n : evt.data.data.payload);\n }\n }\n break;\n }\n };\n var windowListener = function (evt) {\n if (!_this.isValidMsg(evt)) {\n // don't reject here, since that breaks the promise resolution chain\n ChattyHost._debug('window received invalid', evt);\n return;\n }\n ChattyHost._debug('window received', evt.data.action, evt.data.data);\n switch (evt.data.action) {\n case client_messages_1.ChattyClientMessages.Syn:\n if (_this._port) {\n // If targetOrigin is set and we receive another Syn, the frame has potentially\n // navigated to another valid webpage and we should re-connect\n if ((_this._targetOrigin && _this._targetOrigin === '*') ||\n _this._targetOrigin === evt.origin) {\n ChattyHost._debug('reconnecting to', evt.origin);\n _this._port.close();\n }\n else {\n ChattyHost._debug('rejected new connection from', evt.origin);\n return;\n }\n }\n _this._port = evt.ports[0];\n _this._port.onmessage = eventListener;\n _this.sendMsg(host_messages_1.ChattyHostMessages.SynAck);\n _this._state = ChattyHostStates.SynAck;\n break;\n }\n };\n _this._hostWindow.addEventListener('message', windowListener);\n })];\n });\n }); };\n this._appendTo.appendChild(this.iframe);\n return [2 /*return*/, (this._connection = createConnection())];\n });\n });\n };\n ChattyHost.prototype.sendMsg = function (action, data, sequence, propagateSignal) {\n if (data === void 0) { data = {}; }\n var sequenceData = sequence ? { sequence: sequence } : {};\n var signalData = propagateSignal === true ? { signal: propagateSignal } : {};\n var dataWithSequence = __assign(__assign(__assign({}, data), sequenceData), signalData);\n ChattyHost._debug('sending', action, dataWithSequence);\n this._port.postMessage({ action: action, data: dataWithSequence });\n };\n // TODO: natenate\n // Frustratingly, enabling `allow-scripts` on a sandboxed iframe sets its origin to `'null'`\n // (that is, a string literal with a value of null). This means that in order to `postMessage`\n // to the client we must use `'*'` as the origin parameter. To ensure messages received from\n // the client are who they claim to be, we check the origin is `'null'` and the contentWindow\n // is the one we have access to from the parent frame. This method is described here:\n // https://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/#safely-sandboxing-eval\n // If sandboxing is not enabled targetOrigin can be set and validated\n ChattyHost.prototype.isValidMsg = function (evt) {\n if (evt.source !== this.iframe.contentWindow)\n return false;\n if (this._targetOrigin &&\n !(this._targetOrigin === '*' || this._targetOrigin === evt.origin))\n return false;\n return true;\n };\n ChattyHost._debug = debugLib('looker:chatty:host');\n return ChattyHost;\n}());\nexports.ChattyHost = ChattyHost;\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChattyHostBuilder = void 0;\nvar host_1 = require(\"./host\");\n/**\n * Provides methods to define the properties of a [[ChattyHost]]\n */\nvar ChattyHostBuilder = /** @class */ (function () {\n /** @hidden */\n function ChattyHostBuilder(_url, _source) {\n this._url = _url;\n this._source = _source;\n this._appendTo = null;\n this._handlers = {};\n this._sandboxAttrs = [];\n this._allowAttrs = [];\n this._frameBorder = '0';\n this._targetOrigin = null;\n this._defaultTimeout = 30000;\n }\n Object.defineProperty(ChattyHostBuilder.prototype, \"el\", {\n get: function () {\n return this._appendTo || document.body;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"handlers\", {\n get: function () {\n return this._handlers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"sandboxAttrs\", {\n get: function () {\n return this._sandboxAttrs;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"allowAttrs\", {\n get: function () {\n return this._allowAttrs;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"targetOrigin\", {\n get: function () {\n return this._targetOrigin;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"url\", {\n get: function () {\n return this._url;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"source\", {\n get: function () {\n return this._source;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ChattyHostBuilder.prototype, \"defaultTimeout\", {\n get: function () {\n return this._defaultTimeout;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * @param el the HTML element that the iframe will live inside. The iframe will be created as\n * a direct child of the element.\n * @returns the host builder\n */\n ChattyHostBuilder.prototype.appendTo = function (el) {\n this._appendTo = el;\n return this;\n };\n /**\n * Removes an event handler to the host.\n *\n * @param name Event name\n * @param fn Callback function to remove.\n * @returns the host builder\n */\n ChattyHostBuilder.prototype.off = function (name, fn) {\n if (this._handlers[name]) {\n this._handlers[name] = this._handlers[name].filter(function (handler) { return handler !== fn; });\n }\n };\n /**\n * Adds an event handler to the host.\n *\n * @param name Event name to which to listen.\n * @param fn Callback function that is invoked when the event\n * is received, and accepts any parameters that were passed with the event. If the event\n * received is sent using [[ChattyClientConnection.sendAndReceive]], its return value is included\n * in the array that will be passed to the resolved promise.\n * @returns the host builder\n */\n ChattyHostBuilder.prototype.on = function (name, fn) {\n this._handlers[name] = this._handlers[name] || [];\n this._handlers[name].push(fn);\n return this;\n };\n /**\n * Sets the default period of time a [[ChattyHostConnection.sendAndReceive]] message will wait.\n * Use a negative number to wait indefinitely.\n *\n * @param timeout in milliseconds\n * @returns the host builder\n */\n ChattyHostBuilder.prototype.withDefaultTimeout = function (timeout) {\n this._defaultTimeout = timeout;\n return this;\n };\n /** @deprecated The frame-board attribute is deprecated, use CSS instead */\n ChattyHostBuilder.prototype.getFrameBorder = function () {\n return this._frameBorder;\n };\n /** @deprecated The frame-board attribute is deprecated, use CSS instead */\n ChattyHostBuilder.prototype.frameBorder = function (attr) {\n this._frameBorder = attr;\n return this;\n };\n /** @deprecated Replaced by [[withSandboxAttribute]] */\n ChattyHostBuilder.prototype.sandbox = function (attr) {\n this.withSandboxAttribute(attr);\n return this;\n };\n /**\n * Create the iframe with the given sandbox attribute\n *\n * @param attr The sandbox attribute\n */\n ChattyHostBuilder.prototype.withSandboxAttribute = function (attr) {\n this._sandboxAttrs.push(attr);\n return this;\n };\n /**\n * Create the iframe with the given allow attribute\n *\n * @param attr The sandbox attribute\n */\n ChattyHostBuilder.prototype.withAllowAttribute = function (attr) {\n this._allowAttrs.push(attr);\n return this;\n };\n /**\n * Use `targetOrigin` as the value for postMessage(). See\n * [Window.postMessage()](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)\n * for details.\n *\n * @param targetOrigin\n */\n ChattyHostBuilder.prototype.withTargetOrigin = function (targetOrigin) {\n this._targetOrigin = targetOrigin;\n return this;\n };\n /**\n * Builds a [[ChattyHost]] with the provided properties.\n */\n ChattyHostBuilder.prototype.build = function () {\n return new host_1.ChattyHost(this);\n };\n return ChattyHostBuilder;\n}());\nexports.ChattyHostBuilder = ChattyHostBuilder;\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChattyHostMessages = void 0;\n/**\n * The recognized set of messages that are sent from the host to the client.\n * @private\n */\n// IMPORTANT - ALWAYS add new members at the END of the enum. Failure to do\n// so will break interaction with a different version of chatty.\nvar ChattyHostMessages;\n(function (ChattyHostMessages) {\n /** Acknowledge client connection */\n ChattyHostMessages[ChattyHostMessages[\"SynAck\"] = 0] = \"SynAck\";\n /** Normal message */\n ChattyHostMessages[ChattyHostMessages[\"Message\"] = 1] = \"Message\";\n /** Message that expects a response */\n ChattyHostMessages[ChattyHostMessages[\"MessageWithResponse\"] = 2] = \"MessageWithResponse\";\n /** Response */\n ChattyHostMessages[ChattyHostMessages[\"Response\"] = 3] = \"Response\";\n /** Asynchronous error response */\n ChattyHostMessages[ChattyHostMessages[\"ResponseError\"] = 4] = \"ResponseError\";\n /** Abort message */\n ChattyHostMessages[ChattyHostMessages[\"AbortMessage\"] = 5] = \"AbortMessage\";\n})(ChattyHostMessages = exports.ChattyHostMessages || (exports.ChattyHostMessages = {}));\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Chatty = exports.ChattyHostMessages = exports.ChattyClientMessages = exports.ChattyHostStates = exports.ChattyHost = exports.ChattyClientStates = exports.ChattyClient = exports.ChattyHostBuilder = exports.ChattyClientBuilder = void 0;\nvar client_builder_1 = require(\"./client_builder\");\nvar host_builder_1 = require(\"./host_builder\");\nvar client_builder_2 = require(\"./client_builder\");\nObject.defineProperty(exports, \"ChattyClientBuilder\", { enumerable: true, get: function () { return client_builder_2.ChattyClientBuilder; } });\nvar host_builder_2 = require(\"./host_builder\");\nObject.defineProperty(exports, \"ChattyHostBuilder\", { enumerable: true, get: function () { return host_builder_2.ChattyHostBuilder; } });\nvar client_1 = require(\"./client\");\nObject.defineProperty(exports, \"ChattyClient\", { enumerable: true, get: function () { return client_1.ChattyClient; } });\nObject.defineProperty(exports, \"ChattyClientStates\", { enumerable: true, get: function () { return client_1.ChattyClientStates; } });\nvar host_1 = require(\"./host\");\nObject.defineProperty(exports, \"ChattyHost\", { enumerable: true, get: function () { return host_1.ChattyHost; } });\nObject.defineProperty(exports, \"ChattyHostStates\", { enumerable: true, get: function () { return host_1.ChattyHostStates; } });\nvar client_messages_1 = require(\"./client_messages\");\nObject.defineProperty(exports, \"ChattyClientMessages\", { enumerable: true, get: function () { return client_messages_1.ChattyClientMessages; } });\nvar host_messages_1 = require(\"./host_messages\");\nObject.defineProperty(exports, \"ChattyHostMessages\", { enumerable: true, get: function () { return host_messages_1.ChattyHostMessages; } });\n__exportStar(require(\"./types\"), exports);\n/**\n * @class Chatty\n *\n * Primary interface for chatty. Provides methods for creating the chatty hosts and clients.\n */\nvar Chatty = /** @class */ (function () {\n function Chatty() {\n }\n /**\n * Creates a [[ChattyHostBuilder]] object. The builder presents a set of methods to configure\n * and construct the host object.\n *\n * It is up to the client's webserver to return the correct headers to allow for parent/iframe\n * communication. See\n * [Window.postMessage()](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)\n * for details.\n *\n * @param url The URL of the client iframe to create. The hosted iframe should create a chatty\n * client to communicate with the host.\n */\n Chatty.createHost = function (url) {\n return new host_builder_1.ChattyHostBuilder(url);\n };\n /**\n * Creates a [[ChattyHostBuilder]] object. The builder presents a set of methods to configure\n * and construct the host object.\n *\n * @param source The source of the client iframe to create. The hosted iframe should create a chatty\n * client to communicate with the host.\n */\n Chatty.createHostFromSource = function (source) {\n return new host_builder_1.ChattyHostBuilder(undefined, source);\n };\n /**\n * Creates a [[ChattyClientBuilder]] object. The builder presents a set of methods to configure\n * and construct the client object.\n */\n Chatty.createClient = function () {\n return new client_builder_1.ChattyClientBuilder();\n };\n return Chatty;\n}());\nexports.Chatty = Chatty;\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2021 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","/**\n * This is the web browser implementation of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = require('./debug');\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = 'undefined' != typeof chrome\n && 'undefined' != typeof chrome.storage\n ? chrome.storage.local\n : localstorage();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n 'lightseagreen',\n 'forestgreen',\n 'goldenrod',\n 'dodgerblue',\n 'darkorchid',\n 'crimson'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\nfunction useColors() {\n // NB: In an Electron preload script, document will be defined but not fully\n // initialized. Since we know we're in Chrome, we'll just detect this case\n // explicitly\n if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {\n return true;\n }\n\n // is webkit? http://stackoverflow.com/a/16459606/376773\n // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n // is firebug? http://stackoverflow.com/a/398120/376773\n (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n // is firefox >= v31?\n // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||\n // double check webkit in userAgent just in case we are in a worker\n (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nexports.formatters.j = function(v) {\n try {\n return JSON.stringify(v);\n } catch (err) {\n return '[UnexpectedJSONParseError]: ' + err.message;\n }\n};\n\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n var useColors = this.useColors;\n\n args[0] = (useColors ? '%c' : '')\n + this.namespace\n + (useColors ? ' %c' : ' ')\n + args[0]\n + (useColors ? '%c ' : ' ')\n + '+' + exports.humanize(this.diff);\n\n if (!useColors) return;\n\n var c = 'color: ' + this.color;\n args.splice(1, 0, c, 'color: inherit')\n\n // the final \"%c\" is somewhat tricky, because there could be other\n // arguments passed either before or after the %c, so we need to\n // figure out the correct index to insert the CSS into\n var index = 0;\n var lastC = 0;\n args[0].replace(/%[a-zA-Z%]/g, function(match) {\n if ('%%' === match) return;\n index++;\n if ('%c' === match) {\n // we only are interested in the *last* %c\n // (the user may have provided their own)\n lastC = index;\n }\n });\n\n args.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.log()` when available.\n * No-op when `console.log` is not a \"function\".\n *\n * @api public\n */\n\nfunction log() {\n // this hackery is required for IE8/9, where\n // the `console.log` function doesn't have 'apply'\n return 'object' === typeof console\n && console.log\n && Function.prototype.apply.call(console.log, console, arguments);\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\n\nfunction save(namespaces) {\n try {\n if (null == namespaces) {\n exports.storage.removeItem('debug');\n } else {\n exports.storage.debug = namespaces;\n }\n } catch(e) {}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n var r;\n try {\n r = exports.storage.debug;\n } catch(e) {}\n\n // If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n if (!r && typeof process !== 'undefined' && 'env' in process) {\n r = process.env.DEBUG;\n }\n\n return r;\n}\n\n/**\n * Enable namespaces listed in `localStorage.debug` initially.\n */\n\nexports.enable(load());\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n try {\n return window.localStorage;\n } catch (e) {}\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n *\n * Expose `debug()` as the module.\n */\n\nexports = module.exports = createDebug.debug = createDebug['default'] = createDebug;\nexports.coerce = coerce;\nexports.disable = disable;\nexports.enable = enable;\nexports.enabled = enabled;\nexports.humanize = require('ms');\n\n/**\n * The currently active debug mode names, and names to skip.\n */\n\nexports.names = [];\nexports.skips = [];\n\n/**\n * Map of special \"%n\" handling functions, for the debug \"format\" argument.\n *\n * Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n */\n\nexports.formatters = {};\n\n/**\n * Previous log timestamp.\n */\n\nvar prevTime;\n\n/**\n * Select a color.\n * @param {String} namespace\n * @return {Number}\n * @api private\n */\n\nfunction selectColor(namespace) {\n var hash = 0, i;\n\n for (i in namespace) {\n hash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n hash |= 0; // Convert to 32bit integer\n }\n\n return exports.colors[Math.abs(hash) % exports.colors.length];\n}\n\n/**\n * Create a debugger with the given `namespace`.\n *\n * @param {String} namespace\n * @return {Function}\n * @api public\n */\n\nfunction createDebug(namespace) {\n\n function debug() {\n // disabled?\n if (!debug.enabled) return;\n\n var self = debug;\n\n // set `diff` timestamp\n var curr = +new Date();\n var ms = curr - (prevTime || curr);\n self.diff = ms;\n self.prev = prevTime;\n self.curr = curr;\n prevTime = curr;\n\n // turn the `arguments` into a proper Array\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n args[0] = exports.coerce(args[0]);\n\n if ('string' !== typeof args[0]) {\n // anything else let's inspect with %O\n args.unshift('%O');\n }\n\n // apply any `formatters` transformations\n var index = 0;\n args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {\n // if we encounter an escaped % then don't increase the array index\n if (match === '%%') return match;\n index++;\n var formatter = exports.formatters[format];\n if ('function' === typeof formatter) {\n var val = args[index];\n match = formatter.call(self, val);\n\n // now we need to remove `args[index]` since it's inlined in the `format`\n args.splice(index, 1);\n index--;\n }\n return match;\n });\n\n // apply env-specific formatting (colors, etc.)\n exports.formatArgs.call(self, args);\n\n var logFn = debug.log || exports.log || console.log.bind(console);\n logFn.apply(self, args);\n }\n\n debug.namespace = namespace;\n debug.enabled = exports.enabled(namespace);\n debug.useColors = exports.useColors();\n debug.color = selectColor(namespace);\n\n // env-specific initialization logic for debug instances\n if ('function' === typeof exports.init) {\n exports.init(debug);\n }\n\n return debug;\n}\n\n/**\n * Enables a debug mode by namespaces. This can include modes\n * separated by a colon and wildcards.\n *\n * @param {String} namespaces\n * @api public\n */\n\nfunction enable(namespaces) {\n exports.save(namespaces);\n\n exports.names = [];\n exports.skips = [];\n\n var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n var len = split.length;\n\n for (var i = 0; i < len; i++) {\n if (!split[i]) continue; // ignore empty strings\n namespaces = split[i].replace(/\\*/g, '.*?');\n if (namespaces[0] === '-') {\n exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n } else {\n exports.names.push(new RegExp('^' + namespaces + '$'));\n }\n }\n}\n\n/**\n * Disable debug output.\n *\n * @api public\n */\n\nfunction disable() {\n exports.enable('');\n}\n\n/**\n * Returns true if the given mode name is enabled, false otherwise.\n *\n * @param {String} name\n * @return {Boolean}\n * @api public\n */\n\nfunction enabled(name) {\n var i, len;\n for (i = 0, len = exports.skips.length; i < len; i++) {\n if (exports.skips[i].test(name)) {\n return false;\n }\n }\n for (i = 0, len = exports.names.length; i < len; i++) {\n if (exports.names[i].test(name)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Coerce `val`.\n *\n * @param {Mixed} val\n * @return {Mixed}\n * @api private\n */\n\nfunction coerce(val) {\n if (val instanceof Error) return val.stack || val.message;\n return val;\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isNaN(val) === false) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^((?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n if (ms >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (ms >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (ms >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (ms >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n return plural(ms, d, 'day') ||\n plural(ms, h, 'hour') ||\n plural(ms, m, 'minute') ||\n plural(ms, s, 'second') ||\n ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, n, name) {\n if (ms < n) {\n return;\n }\n if (ms < n * 1.5) {\n return Math.floor(ms / n) + ' ' + name;\n }\n return Math.ceil(ms / n) + ' ' + name + 's';\n}\n","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LookerEmbedDashboard = void 0;\nvar embed_base_1 = require(\"./embed_base\");\n/**\n * Client that communicates with an embedded Looker dashboard. Messages are documented\n * [here](https://docs.looker.com/r/sdk/events)\n */\nvar LookerEmbedDashboard = /** @class */ (function (_super) {\n __extends(LookerEmbedDashboard, _super);\n function LookerEmbedDashboard() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Convenience method for sending a run message to the embedded dashboard.\n */\n LookerEmbedDashboard.prototype.run = function () {\n this.send('dashboard:run');\n };\n /**\n * Convenience method for sending a stop message to the embedded dashboard.\n *\n * Requires Looker 7.14 and Dashboards Next (see [[EmbedBuilder.withNext]]).\n */\n LookerEmbedDashboard.prototype.stop = function () {\n this.send('dashboard:stop');\n };\n /**\n * Convenience method for sending an edit message to the embedded dashboard.\n *\n * Requires Looker 22.20 and Dashboards Next (see [[EmbedBuilder.withNext]]).\n */\n LookerEmbedDashboard.prototype.edit = function () {\n this.send('dashboard:edit');\n };\n /**\n * Convenience method for updating the filters of the embedded dashboard.\n *\n * @param filters A set of filter parameters to update\n */\n LookerEmbedDashboard.prototype.updateFilters = function (params) {\n this.send('dashboard:filters:update', { filters: params });\n };\n /**\n * Convenience method for setting options on the embedded dashboard.\n *\n * @param options An options object to be applied\n */\n LookerEmbedDashboard.prototype.setOptions = function (options) {\n this.send('dashboard:options:set', options);\n };\n /**\n * Convenience method for opening the dashboard schedule dialog.\n *\n * Requires Looker 7.18 and Dashboards Next (see [[EmbedBuilder.withNext]]).\n */\n LookerEmbedDashboard.prototype.openScheduleDialog = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.sendAndReceive('dashboard:schedule_modal:open')];\n });\n });\n };\n /**\n * Convenience method for loading a new dashboard.\n * Requires Looker 7.12 and Dashboards Next (see [[EmbedBuilder.withNext]]).\n * Throws an error if the dashboard load did not happen, which can happen if the\n * current dashboard is in edit mode.\n *\n * @param id The ID of the dashboard to load\n * @param pushHistory Whether to push the new page onto history. Default is false.\n */\n LookerEmbedDashboard.prototype.loadDashboard = function (id, pushHistory) {\n if (pushHistory === void 0) { pushHistory = false; }\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.sendAndReceive('dashboard:load', { id: id, pushHistory: pushHistory })];\n });\n });\n };\n return LookerEmbedDashboard;\n}(embed_base_1.LookerEmbedBase));\nexports.LookerEmbedDashboard = LookerEmbedDashboard;\n//# sourceMappingURL=dashboard_client.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EmbedClient = void 0;\nvar chatty_1 = require(\"@looker/chatty\");\nvar IS_URL = /^https?:\\/\\//;\n/**\n * Wrapper for Looker embedded content. Provides a mechanism for creating the embedded content element,\n * and for establishing two-way communication between the parent window and the embedded content.\n */\nvar EmbedClient = /** @class */ (function () {\n /**\n * @hidden\n */\n function EmbedClient(_builder) {\n this._builder = _builder;\n this._hostBuilder = null;\n this._host = null;\n this._connection = null;\n this._client = null;\n this._cookielessInitialized = false;\n }\n Object.defineProperty(EmbedClient.prototype, \"connection\", {\n /**\n * Returns a promise that resolves to a client that can be used to send messages to the\n * embedded content.\n */\n get: function () {\n return this._connection;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedClient.prototype, \"isConnected\", {\n /**\n * Indicates whether two way communication has successfully been established with the embedded content.\n */\n get: function () {\n return !!this._connection;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedClient.prototype, \"targetOrigin\", {\n get: function () {\n if (this._builder.sandboxedHost) {\n return '*';\n }\n var apiHost = this._builder.apiHost;\n return IS_URL.test(apiHost) ? apiHost : \"https://\".concat(apiHost);\n },\n enumerable: false,\n configurable: true\n });\n EmbedClient.prototype.createIframe = function (url) {\n return __awaiter(this, void 0, void 0, function () {\n var eventType, _loop_1, this_1, _i, _a, handler, _b, _c, attr, _d, _e, attr;\n var _f;\n var _this = this;\n return __generator(this, function (_g) {\n this._hostBuilder = chatty_1.Chatty.createHost(url);\n if (this._builder.dialogScroll) {\n this._builder.handlers['env:client:dialog'] = [\n function (_a) {\n var open = _a.open, placement = _a.placement;\n // Placement of 'cover' means that the dialog top is close\n // to the top of the IFRAME. The top MAY be scrolled out\n // of view. The following attempts to scroll the top of the\n // dialog into view.\n if (open && placement === 'cover') {\n // Timeout is a little ugly. Suspect there might be an issue\n // with a Looker component where the last row is scrolled\n // into view. Normally not an issue because outside of embed\n // as the dialog is limited to the viewport.\n // Make timeout configurable?\n window.setTimeout(function () {\n if (_this._host) {\n _this._host.iframe.scrollIntoView(true);\n }\n }, 200);\n }\n },\n ];\n }\n if (this._builder.dynamicIFrameHeight) {\n this._builder.handlers['page:properties:changed'] = [\n function (_a) {\n var height = _a.height;\n if (height && height > 100 && _this._host) {\n _this._host.iframe.style.height = \"\".concat(height, \"px\");\n }\n },\n ];\n }\n if (this._builder.isCookielessEmbed) {\n this._builder.handlers['session:tokens:request'] = [\n function () { return __awaiter(_this, void 0, void 0, function () {\n var _a, api_token, api_token_ttl, navigation_token, navigation_token_ttl, session_reference_token_ttl, client;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!(this._client &&\n this._cookielessApiToken &&\n this._builder.generateTokens)) return [3 /*break*/, 4];\n if (!this._cookielessInitialized) return [3 /*break*/, 2];\n return [4 /*yield*/, this.generateTokens()];\n case 1:\n _a = _b.sent(), api_token = _a.api_token, api_token_ttl = _a.api_token_ttl, navigation_token = _a.navigation_token, navigation_token_ttl = _a.navigation_token_ttl, session_reference_token_ttl = _a.session_reference_token_ttl;\n this._cookielessApiToken = api_token;\n this._cookielessApiTokenTtl = api_token_ttl;\n this._cookielessNavigationToken = navigation_token;\n this._cookielessNavigationTokenTtl = navigation_token_ttl;\n this._cookielessSessionReferenceTokenTtl =\n session_reference_token_ttl;\n return [3 /*break*/, 3];\n case 2:\n this._cookielessInitialized = true;\n _b.label = 3;\n case 3:\n client = this._client;\n client.send('session:tokens', {\n api_token: this._cookielessApiToken,\n api_token_ttl: this._cookielessApiTokenTtl,\n navigation_token: this._cookielessNavigationToken,\n navigation_token_ttl: this._cookielessNavigationTokenTtl,\n session_reference_token_ttl: this._cookielessSessionReferenceTokenTtl,\n });\n _b.label = 4;\n case 4: return [2 /*return*/];\n }\n });\n }); },\n ];\n }\n for (eventType in this._builder.handlers) {\n _loop_1 = function (handler) {\n this_1._hostBuilder.on(eventType, function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return handler.apply(_this._client, args);\n });\n };\n this_1 = this;\n for (_i = 0, _a = this._builder.handlers[eventType]; _i < _a.length; _i++) {\n handler = _a[_i];\n _loop_1(handler);\n }\n }\n for (_b = 0, _c = this._builder.sandboxAttrs; _b < _c.length; _b++) {\n attr = _c[_b];\n this._hostBuilder.withSandboxAttribute(attr);\n }\n for (_d = 0, _e = this._builder.allowAttrs; _d < _e.length; _d++) {\n attr = _e[_d];\n this._hostBuilder.withAllowAttribute(attr);\n }\n this._host = this._hostBuilder\n // tslint:disable-next-line:deprecation\n .frameBorder(this._builder.frameBorder)\n .withTargetOrigin(this.targetOrigin)\n .appendTo(this._builder.el)\n .build();\n // IE doesn't like calling classList.add() with no arguments, so check\n if (this._builder.classNames.length) {\n (_f = this._host.iframe.classList).add.apply(_f, this._builder.classNames);\n }\n if (this._builder.scrollMonitor) {\n this.addIframeMonitor(this._host.iframe);\n }\n return [2 /*return*/, this._host.connect().then(function (host) {\n // eslint-disable-next-line new-cap\n _this._client = new _this._builder.clientConstructor(host);\n return _this._client;\n })];\n });\n });\n };\n EmbedClient.prototype.sendScrollData = function (iframe) {\n var client = this._client;\n client.send('env:host:scroll', {\n offsetLeft: iframe.offsetLeft,\n offsetTop: iframe.offsetTop,\n scrollX: window.scrollX,\n scrollY: window.scrollY,\n });\n };\n EmbedClient.prototype.addIframeMonitor = function (iframe) {\n var _this = this;\n document.addEventListener('scroll', function (_event) {\n _this.sendScrollData(iframe);\n });\n window.addEventListener('resize', function (_event) {\n _this.sendScrollData(iframe);\n });\n };\n EmbedClient.prototype.createUrl = function () {\n return __awaiter(this, void 0, void 0, function () {\n var src, auth, url, _i, _a, param;\n var _this = this;\n return __generator(this, function (_b) {\n src = this._builder.embedUrl;\n auth = this._builder.auth;\n if (!(auth === null || auth === void 0 ? void 0 : auth.url))\n return [2 /*return*/, \"\".concat(this._builder.apiHost).concat(src)];\n url = \"\".concat(auth.url, \"?src=\").concat(encodeURIComponent(src));\n if (auth.params) {\n for (_i = 0, _a = auth.params; _i < _a.length; _i++) {\n param = _a[_i];\n url += \"&\".concat(encodeURIComponent(param.name), \"=\").concat(encodeURIComponent(param.value));\n }\n }\n // eslint-disable-next-line no-async-promise-executor\n return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {\n var xhr, _i, _a, header;\n return __generator(this, function (_b) {\n xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n if (auth.withCredentials) {\n xhr.withCredentials = auth.withCredentials;\n }\n xhr.setRequestHeader('Cache-Control', 'no-cache');\n if (auth.headers) {\n for (_i = 0, _a = auth.headers; _i < _a.length; _i++) {\n header = _a[_i];\n xhr.setRequestHeader(header.name, header.value);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n resolve(JSON.parse(xhr.responseText).url);\n }\n else {\n reject(xhr.statusText);\n }\n };\n xhr.onerror = function () { return reject(xhr.statusText); };\n xhr.send();\n return [2 /*return*/];\n });\n }); })];\n });\n });\n };\n EmbedClient.prototype.acquireCookielessEmbedSession = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (EmbedClient.sessionAcquired) {\n return [2 /*return*/, this.acquireCookielessEmbedSessionInternal()];\n }\n if (!EmbedClient.acquireSessionPromise) return [3 /*break*/, 2];\n return [4 /*yield*/, EmbedClient.acquireSessionPromise];\n case 1:\n _a.sent();\n return [2 /*return*/, this.acquireCookielessEmbedSessionInternal()];\n case 2:\n EmbedClient.acquireSessionPromise =\n this.acquireCookielessEmbedSessionInternal();\n return [2 /*return*/, EmbedClient.acquireSessionPromise\n .then(function (url) {\n EmbedClient.sessionAcquired = true;\n return url;\n })\n .catch(function (error) {\n EmbedClient.acquireSessionPromise = undefined;\n throw error;\n })];\n }\n });\n });\n };\n EmbedClient.prototype.acquireCookielessEmbedSessionInternal = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _a, acquireSession, generateTokens, _b, authentication_token, api_token, api_token_ttl, navigation_token, navigation_token_ttl, session_reference_token_ttl, apiHost, sep, src, embedPath;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n _a = this._builder, acquireSession = _a.acquireSession, generateTokens = _a.generateTokens;\n if (!acquireSession) {\n throw new Error('invalid state: acquireSession not defined');\n }\n if (!generateTokens) {\n throw new Error('invalid state: generateTokens not defined');\n }\n return [4 /*yield*/, this.acquireSession()];\n case 1:\n _b = _c.sent(), authentication_token = _b.authentication_token, api_token = _b.api_token, api_token_ttl = _b.api_token_ttl, navigation_token = _b.navigation_token, navigation_token_ttl = _b.navigation_token_ttl, session_reference_token_ttl = _b.session_reference_token_ttl;\n if (!authentication_token || !navigation_token || !api_token) {\n throw new Error('failed to prepare cookieless embed session');\n }\n this._cookielessApiToken = api_token;\n this._cookielessApiTokenTtl = api_token_ttl;\n this._cookielessNavigationToken = navigation_token;\n this._cookielessNavigationTokenTtl = navigation_token_ttl;\n this._cookielessSessionReferenceTokenTtl = session_reference_token_ttl;\n apiHost = \"https://\".concat(this._builder.apiHost);\n sep = new URL(this._builder.embedUrl, apiHost).search === '' ? '?' : '&';\n src = \"\".concat(this._builder.embedUrl).concat(sep, \"embed_navigation_token=\").concat(navigation_token);\n embedPath = '/login/embed/' +\n encodeURIComponent(src) +\n \"?embed_authentication_token=\".concat(authentication_token);\n return [2 /*return*/, \"\".concat(apiHost).concat(embedPath)];\n }\n });\n });\n };\n EmbedClient.prototype.acquireSession = function () {\n return __awaiter(this, void 0, void 0, function () {\n var acquireSession, _a, url, init, resp, error_1;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n acquireSession = this._builder.acquireSession;\n if (!(typeof acquireSession === 'function')) return [3 /*break*/, 2];\n return [4 /*yield*/, acquireSession()];\n case 1: return [2 /*return*/, _b.sent()];\n case 2:\n _b.trys.push([2, 5, , 6]);\n _a = this.getResource(acquireSession), url = _a.url, init = _a.init;\n return [4 /*yield*/, fetch(url, init)];\n case 3:\n resp = _b.sent();\n if (!resp.ok) {\n console.error('acquire embed session failed', { resp: resp });\n throw new Error(\"acquire embed session failed\");\n }\n return [4 /*yield*/, resp.json()];\n case 4: return [2 /*return*/, (_b.sent())];\n case 5:\n error_1 = _b.sent();\n console.error(error_1);\n throw new Error(\"acquire embed session failed\");\n case 6: return [2 /*return*/];\n }\n });\n });\n };\n EmbedClient.prototype.generateTokens = function () {\n return __awaiter(this, void 0, void 0, function () {\n var generateTokens, _a, url, defaultInit, init, resp, error_2;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n generateTokens = this._builder.generateTokens;\n if (!(typeof generateTokens === 'function')) return [3 /*break*/, 2];\n return [4 /*yield*/, generateTokens()];\n case 1: return [2 /*return*/, _b.sent()];\n case 2:\n _b.trys.push([2, 5, , 6]);\n _a = this.getResource(generateTokens), url = _a.url, defaultInit = _a.init;\n init = defaultInit || {\n body: JSON.stringify({\n api_token: this._cookielessApiToken,\n navigation_token: this._cookielessNavigationToken,\n }),\n headers: {\n 'content-type': 'application/json',\n },\n method: 'PUT',\n };\n return [4 /*yield*/, fetch(url, init)];\n case 3:\n resp = _b.sent();\n if (!resp.ok) {\n if (resp.status === 400) {\n return [2 /*return*/, { session_reference_token_ttl: 0 }];\n }\n console.error('generate tokens failed', { resp: resp });\n throw new Error(\"generate tokens failed\");\n }\n return [4 /*yield*/, resp.json()];\n case 4: return [2 /*return*/, (_b.sent())];\n case 5:\n error_2 = _b.sent();\n console.error(error_2);\n throw new Error(\"generate tokens failed\");\n case 6: return [2 /*return*/];\n }\n });\n });\n };\n EmbedClient.prototype.getResource = function (resource) {\n var url;\n var init;\n if (typeof resource === 'object') {\n var tempUrl = resource.url, rest = __rest(resource, [\"url\"]);\n init = rest;\n url = tempUrl;\n }\n else {\n url = resource;\n }\n return { init: init, url: url };\n };\n /**\n * Establish two way communication with embedded content. Returns a promise that resolves to a\n * client that can be used to send messages to the embedded content.\n */\n EmbedClient.prototype.connect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n if (this._connection)\n return [2 /*return*/, this._connection];\n if (this._builder.url) {\n if (this._builder.isCookielessEmbed) {\n throw new Error('withUrl not supported by cookieless embed');\n }\n this._connection = this.createIframe(this._builder.url);\n }\n else {\n if (this._builder.isCookielessEmbed) {\n this._connection = this.acquireCookielessEmbedSession()\n .then(function (url) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, this.createIframe(url)];\n }); }); })\n .catch(function (_error) {\n _this._connection = null;\n throw _error;\n });\n }\n else {\n this._connection = this.createUrl().then(function (url) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/, this.createIframe(url)];\n }); }); });\n }\n }\n return [2 /*return*/, this._connection];\n });\n });\n };\n EmbedClient.sessionAcquired = false;\n return EmbedClient;\n}());\nexports.EmbedClient = EmbedClient;\n//# sourceMappingURL=embed.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LookerEmbedBase = void 0;\nvar LookerEmbedBase = /** @class */ (function () {\n /**\n * @hidden\n *\n * @param _host\n */\n function LookerEmbedBase(_host) {\n this._host = _host;\n }\n /**\n * Send a message to the embedded content.\n *\n * @param message String message identifier.\n * @param params Additional parameters to be sent to the client. After transmission ownership\n * of the parameters is transferred to the embedded Explore.\n */\n LookerEmbedBase.prototype.send = function (message, params) {\n this._host.send(message, params);\n };\n /**\n * Send a message to the embedded content and resolve with a response\n *\n * @param message String message identifier.\n * @param params Additional parameters to be sent to the client. After transmission ownership\n * of the parameters is transferred to the embedded Explore.\n */\n LookerEmbedBase.prototype.sendAndReceive = function (message, params) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this._host.sendAndReceive(message, params)];\n });\n });\n };\n return LookerEmbedBase;\n}());\nexports.LookerEmbedBase = LookerEmbedBase;\n//# sourceMappingURL=embed_base.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EmbedBuilder = void 0;\nvar embed_1 = require(\"./embed\");\nfunction stringify(params) {\n var result = [];\n for (var key in params) {\n var value = params[key];\n var valueArray = Array.isArray(value) ? value : [value];\n for (var _i = 0, valueArray_1 = valueArray; _i < valueArray_1.length; _i++) {\n var singleValue = valueArray_1[_i];\n result.push(\"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(singleValue)));\n }\n }\n return result.join('&');\n}\nfunction escapeFilterParam(param) {\n return param.replace(/,/g, '^,');\n}\n/**\n * The builder class for [[EmbedClient]]. Contains methods for defining the properties of embedded\n * Looker content.\n */\nvar EmbedBuilder = /** @class */ (function () {\n /**\n * @hidden\n */\n function EmbedBuilder(_hostSettings, _type, _endpoint, _clientConstructor) {\n this._hostSettings = _hostSettings;\n this._type = _type;\n this._endpoint = _endpoint;\n this._clientConstructor = _clientConstructor;\n this._handlers = {};\n this._appendTo = null;\n this._sandboxAttrs = [];\n this._allowAttrs = [];\n this._classNames = [];\n this._frameBorder = '0';\n this._suffix = '';\n if (this.sandboxedHost) {\n this._params = {\n embed_domain: this._hostSettings.apiHost,\n sandboxed_host: 'true',\n sdk: '2',\n };\n }\n else {\n var embedDomain = window.location.origin;\n this._params = {\n embed_domain: embedDomain,\n sdk: '2',\n };\n }\n }\n /**\n * Value for the `frame-border` attribute of an embedded iframe\n */\n EmbedBuilder.prototype.withFrameBorder = function (attr) {\n this._frameBorder = attr;\n return this;\n };\n /**\n * @hidden\n *\n * @param id\n */\n EmbedBuilder.prototype.withId = function (id) {\n this._id = id;\n return this;\n };\n /**\n * Allows manual control of URL parameters for the embedded content\n *\n * @param params Additional URL parameters\n * created by ID.\n */\n EmbedBuilder.prototype.withParams = function (params) {\n for (var key in params) {\n this._params[key] = params[key];\n }\n return this;\n };\n /**\n * Allows specifying initial filters to apply to the embedded content.\n *\n * @filters Filters to apply\n */\n EmbedBuilder.prototype.withFilters = function (filters, escape) {\n if (escape === void 0) { escape = false; }\n if (this.type === 'dashboard') {\n for (var key in filters) {\n this._params[key] = escape\n ? escapeFilterParam(filters[key])\n : filters[key];\n }\n }\n else {\n for (var key in filters) {\n this._params[\"f[\".concat(key, \"]\")] = escape\n ? escapeFilterParam(filters[key])\n : filters[key];\n }\n }\n return this;\n };\n /**\n * Allows specifying sandbox attributes for an embedded content iframe. Sandbox attributes\n * should include `allow-scripts` or embedded content will not execute.\n * @param attr one or more sandbox attributes for an embedded content iframe.\n */\n EmbedBuilder.prototype.withSandboxAttr = function () {\n var attr = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n attr[_i] = arguments[_i];\n }\n this._sandboxAttrs = this._sandboxAttrs.concat(attr);\n return this;\n };\n /**\n * Allows specifying allow attributes (for example fullscreen) for an embedded content iframe.\n * @param attr one or more allow attributes for an embedded content iframe.\n */\n EmbedBuilder.prototype.withAllowAttr = function () {\n var attr = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n attr[_i] = arguments[_i];\n }\n this._allowAttrs = this._allowAttrs.concat(attr);\n return this;\n };\n /**\n * Allows specifying classes for an embedded content\n * @param className one or more sandbox attributes for an embedded content.\n */\n EmbedBuilder.prototype.withClassName = function () {\n var className = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n className[_i] = arguments[_i];\n }\n this._classNames = this._classNames.concat(className);\n return this;\n };\n /**\n * Allows specifying next generation content\n *\n * @param suffix Next generation suffix. Defaults to '-next'.\n */\n EmbedBuilder.prototype.withNext = function (suffix) {\n if (suffix === void 0) { suffix = '-next'; }\n this._suffix = suffix;\n this._endpoint += this._suffix;\n return this;\n };\n /**\n * Allows specifying a theme for the content.\n *\n * @param theme Theme name\n */\n EmbedBuilder.prototype.withTheme = function (theme) {\n this._params.theme = theme;\n return this;\n };\n /**\n * Monitors scroll position and informs the embedded Looker IFRAME\n * of the current scroll position and the offset of the containing\n * IFRAME within the window. Looker uses this information to position\n * dialogs within the users viewport.\n *\n * Requires Looker >=23.6.0\n *\n * @param monitor defaults to true\n *\n */\n EmbedBuilder.prototype.withScrollMonitor = function (monitor) {\n if (monitor === void 0) { monitor = true; }\n this._scrollMonitor = monitor;\n return this;\n };\n /**\n * Listens for page changed events from the embedded Looker IFRAME\n * and updates the height of the IFRAME.\n *\n * @param dynamicIFrameHeight defaults to true\n */\n EmbedBuilder.prototype.withDynamicIFrameHeight = function (dynamicIFrameHeight) {\n if (dynamicIFrameHeight === void 0) { dynamicIFrameHeight = true; }\n this._dynamicIFrameHeight = dynamicIFrameHeight;\n return this;\n };\n /**\n * Listens for covering dialogs being opened in the Looker IFRAME\n * and scrolls the top of dialog into view.\n *\n * @param dialogScroll defaults to true\n */\n EmbedBuilder.prototype.withDialogScroll = function (dialogScroll) {\n if (dialogScroll === void 0) { dialogScroll = true; }\n this._dialogScroll = dialogScroll;\n return this;\n };\n /**\n * Allows api host to be specified\n *\n * @param apiHost\n */\n EmbedBuilder.prototype.withApiHost = function (apiHost) {\n if (!this._hostSettings.apiHost) {\n this._hostSettings.apiHost = apiHost;\n if (this.sandboxedHost) {\n this._params.embed_domain = apiHost;\n this._params.sandboxed_host = 'true';\n }\n }\n else if (this._hostSettings.apiHost !== apiHost) {\n throw new Error('not allowed to change api host');\n }\n return this;\n };\n /**\n * Allows auth url to be specified\n *\n * @param authUrl URL to endpoint that can sign Looker SSO URLs\n */\n EmbedBuilder.prototype.withAuthUrl = function (authUrl) {\n var _a;\n if (!((_a = this._hostSettings.auth) === null || _a === void 0 ? void 0 : _a.url)) {\n this._hostSettings.auth = { url: authUrl };\n }\n else if (this._hostSettings.auth.url !== authUrl) {\n throw new Error('not allowed to change auth url');\n }\n return this;\n };\n /**\n * Allows auth url to be specified\n *\n * @param auth\n */\n EmbedBuilder.prototype.withAuth = function (auth) {\n if (!this._hostSettings.auth) {\n this._hostSettings.auth = auth;\n }\n else if (this._hostSettings.auth !== auth) {\n throw new Error('not allowed to change auth');\n }\n return this;\n };\n /**\n * @hidden\n *\n * @param url\n */\n EmbedBuilder.prototype.withUrl = function (url) {\n if (this.isCookielessEmbed) {\n throw new Error('withUrl not supported by cookieless embed');\n }\n this._url = url;\n return this;\n };\n Object.defineProperty(EmbedBuilder.prototype, \"sandboxedHost\", {\n /**\n * @hidden\n */\n get: function () {\n if (this._sandboxedHost === undefined) {\n var embedHostDomain = window.location.origin;\n this._sandboxedHost = embedHostDomain === 'null' || !embedHostDomain;\n }\n return this._sandboxedHost;\n },\n /**\n * @hidden\n */\n set: function (sandboxedHost) {\n this._sandboxedHost = sandboxedHost;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"el\", {\n /**\n * The element to append the embedded content to.\n */\n get: function () {\n return this._appendTo || document.body;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"frameBorder\", {\n /**\n * the frame-border attribute to apply to the iframe\n */\n get: function () {\n return this._frameBorder;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"endpoint\", {\n /**\n * The endpoint used to load content\n */\n get: function () {\n return this._endpoint;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"type\", {\n /**\n * The type of embedded content, dashboard, look, and explore\n */\n get: function () {\n return this._type;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"apiHost\", {\n /**\n * The address of the Looker instance being used\n */\n get: function () {\n return this._hostSettings.apiHost;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"isCookielessEmbed\", {\n /**\n * Is cookieless embedding being used\n */\n get: function () {\n return !!this._hostSettings.acquireSession;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"acquireSession\", {\n /**\n * Cookieless embed acquire session\n */\n get: function () {\n return this._hostSettings.acquireSession;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"generateTokens\", {\n /**\n * Cookieless embed generate tokens\n */\n get: function () {\n return this._hostSettings.generateTokens;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"url\", {\n /**\n * The content URL of this embedded content, if provided\n */\n get: function () {\n return this._url;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"authUrl\", {\n /**\n * The auth URL of this embedded content, if provided\n * @deprecated\n */\n get: function () {\n var _a;\n return (_a = this._hostSettings.auth) === null || _a === void 0 ? void 0 : _a.url;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"auth\", {\n /**\n * The auth config of this embedded content, if provided\n */\n get: function () {\n return this._hostSettings.auth;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"embedUrl\", {\n /**\n * @hidden\n */\n get: function () {\n var params = stringify(this._params);\n return \"\".concat(this.endpoint, \"/\").concat(this.id, \"?\").concat(params);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"handlers\", {\n /**\n * @hidden\n */\n get: function () {\n return this._handlers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"sandboxAttrs\", {\n /**\n * The sandbox attributes of an embedded content iframe, if provided\n */\n get: function () {\n return this._sandboxAttrs;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"allowAttrs\", {\n /**\n * The allowed attributes of an embedded content iframe, if provided\n */\n get: function () {\n return this._allowAttrs;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"classNames\", {\n /**\n * The classnames to apply to the embedded content\n */\n get: function () {\n return this._classNames;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"suffix\", {\n /**\n * The the suffix to append to the content type portion of the url\n */\n get: function () {\n return this._suffix;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"id\", {\n /**\n * The ID of this embedded content, if provided\n */\n get: function () {\n return this._id;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"scrollMonitor\", {\n /**\n * Whether scrolling is monitored\n */\n get: function () {\n return this._scrollMonitor;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"dynamicIFrameHeight\", {\n /**\n * Whether IFRAME height is to be dynamically updated\n */\n get: function () {\n return this._dynamicIFrameHeight;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"dialogScroll\", {\n /**\n * Whether cover dialogs tops are to be scrolled into view\n */\n get: function () {\n return this._dialogScroll;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(EmbedBuilder.prototype, \"clientConstructor\", {\n /**\n * @hidden\n */\n get: function () {\n return this._clientConstructor;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Select an element to append the embedded content to, either a content selector or\n * the DOM element.\n *\n * @param el\n */\n EmbedBuilder.prototype.appendTo = function (el) {\n if (typeof el === 'string') {\n this._appendTo = document.querySelector(el);\n }\n else {\n this._appendTo = el;\n }\n return this;\n };\n /**\n * Register an event handler.\n *\n * @typeparam K: A Looker embed event name\n * @param name: string Name of the event to respond to.\n * @param handler: Callback A callback method to be invoked when the message is received.\n */\n EmbedBuilder.prototype.on = function (name, handler) {\n this._handlers[name] = this._handlers[name] ? this._handlers[name] : [];\n this._handlers[name].push(handler);\n return this;\n };\n /**\n * Constructs the embedded content, including creating the DOM element that contains the content.\n */\n EmbedBuilder.prototype.build = function () {\n return new embed_1.EmbedClient(this);\n };\n return EmbedBuilder;\n}());\nexports.EmbedBuilder = EmbedBuilder;\n//# sourceMappingURL=embed_builder.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LookerEmbedExplore = void 0;\nvar embed_base_1 = require(\"./embed_base\");\n/**\n * Client that communicates with an embedded Looker Explore. Messages are documented\n * [here](https://docs.looker.com/r/sdk/events)\n */\nvar LookerEmbedExplore = /** @class */ (function (_super) {\n __extends(LookerEmbedExplore, _super);\n function LookerEmbedExplore() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Convenience method for sending a run message to the embedded Explore.\n */\n LookerEmbedExplore.prototype.run = function () {\n this.send('look:run');\n };\n /**\n * Convenience method for updating the filters of the embedded Explore.\n *\n * @param filters A set of filter parameters to update\n */\n LookerEmbedExplore.prototype.updateFilters = function (params) {\n this.send('look:filters:update', { filters: params });\n };\n return LookerEmbedExplore;\n}(embed_base_1.LookerEmbedBase));\nexports.LookerEmbedExplore = LookerEmbedExplore;\n//# sourceMappingURL=explore_client.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LookerEmbedExtension = void 0;\nvar embed_base_1 = require(\"./embed_base\");\n/**\n * Client that communicates with an embedded Looker dashboard. Messages are documented\n * [here](https://docs.looker.com/r/sdk/events)\n */\nvar LookerEmbedExtension = /** @class */ (function (_super) {\n __extends(LookerEmbedExtension, _super);\n function LookerEmbedExtension() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return LookerEmbedExtension;\n}(embed_base_1.LookerEmbedBase));\nexports.LookerEmbedExtension = LookerEmbedExtension;\n//# sourceMappingURL=extension_client.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LookerEmbedSDK = void 0;\nvar embed_builder_1 = require(\"./embed_builder\");\nvar dashboard_client_1 = require(\"./dashboard_client\");\nvar explore_client_1 = require(\"./explore_client\");\nvar extension_client_1 = require(\"./extension_client\");\nvar look_client_1 = require(\"./look_client\");\n__exportStar(require(\"./types\"), exports);\nvar LookerEmbedSDK = /** @class */ (function () {\n function LookerEmbedSDK() {\n }\n /**\n * Initialize the Embed SDK.\n *\n * @param apiHost The address or base URL of the Looker host (example.looker.com:9999, https://example.looker.com:9999)\n * This is required for verification of messages sent from the embedded content.\n * @param authUrl A server endpoint that will sign SSO embed URLs\n */\n LookerEmbedSDK.init = function (apiHost, auth) {\n this.apiHost = apiHost;\n this.auth = typeof auth === 'string' ? { url: auth } : auth;\n this.acquireSession = undefined;\n this.generateTokens = undefined;\n };\n /**\n * Initialize the Embed SDK to use a cookieless session.\n *\n * @param apiHost The address or base URL of the host (example.looker.com:9999, https://example.looker.com:9999)\n * @param acquireSession is either a string containing a server endpoint that will acquire the embed session OR\n * a RequestInfo object for a fetch call to the server endpoint that will acquire the embed session OR\n * a callback that will invoke the server endpoint that will acquire the embed session.\n * The server endpoint must ultimately call the Looker endpoint `acquire_embed_cookieless_session`.\n * @param generateTokens is either a string containing a server endpoint that will generate new tokens OR\n * a RequestInfo object for a fetch call to the server endpoint that will generate new tokens OR\n * a callback that will invoke the server endpoint that will generate new tokens.\n * The server endpoint should ultimately call the Looker endpoint `generate_tokens_for_cookieless_session`.\n *\n * Looker 22.20+\n */\n LookerEmbedSDK.initCookieless = function (apiHost, acquireSession, generateTokens) {\n this.apiHost = apiHost;\n this.acquireSession = acquireSession;\n this.generateTokens = generateTokens;\n this.auth = undefined;\n };\n /**\n * Create an EmbedBuilder for an embedded Looker dashboard.\n *\n * @param url A signed SSO embed URL or embed URL for an already authenticated Looker user\n */\n LookerEmbedSDK.createDashboardWithUrl = function (url) {\n return new embed_builder_1.EmbedBuilder(this, 'dashboard', '/embed/dashboards', dashboard_client_1.LookerEmbedDashboard).withUrl(url);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker dashboard.\n *\n * @param id The numeric ID of a Looker User Defined Dashboard, or LookML Dashboard ID\n */\n LookerEmbedSDK.createDashboardWithId = function (id) {\n return new embed_builder_1.EmbedBuilder(this, 'dashboard', '/embed/dashboards', dashboard_client_1.LookerEmbedDashboard).withId(id);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker Explore.\n *\n * @param url A signed SSO embed URL or embed URL for an already authenticated Looker user\n */\n LookerEmbedSDK.createExploreWithUrl = function (url) {\n return new embed_builder_1.EmbedBuilder(this, 'explore', '/embed/explore', explore_client_1.LookerEmbedExplore).withUrl(url);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker Explore.\n *\n * @param id The ID of a Looker explore\n */\n LookerEmbedSDK.createExploreWithId = function (id) {\n id = id.replace('::', '/'); // Handle old format explore ids.\n return new embed_builder_1.EmbedBuilder(this, 'explore', '/embed/explore', explore_client_1.LookerEmbedExplore).withId(id);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker Look.\n *\n * @param url A signed SSO embed URL or embed URL for an already authenticated Looker user\n */\n LookerEmbedSDK.createLookWithUrl = function (url) {\n return new embed_builder_1.EmbedBuilder(this, 'look', '/embed/looks', look_client_1.LookerEmbedLook).withUrl(url);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker dashboard.\n *\n * @param id The ID of a Looker Look\n */\n LookerEmbedSDK.createLookWithId = function (id) {\n return new embed_builder_1.EmbedBuilder(this, 'look', '/embed/looks', look_client_1.LookerEmbedLook).withId(id);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker extension.\n *\n * @param url A signed SSO embed URL or embed URL for an already authenticated Looker user\n */\n LookerEmbedSDK.createExtensionWithUrl = function (url) {\n return new embed_builder_1.EmbedBuilder(this, 'extension', '/embed/extensions', extension_client_1.LookerEmbedExtension).withUrl(url);\n };\n /**\n * Create an EmbedBuilder for an embedded Looker extension. Requires Looker 7.12\n *\n * @param id The ID of a Looker Look\n */\n LookerEmbedSDK.createExtensionWithId = function (id) {\n return new embed_builder_1.EmbedBuilder(this, 'extension', '/embed/extensions', extension_client_1.LookerEmbedExtension).withId(id);\n };\n return LookerEmbedSDK;\n}());\nexports.LookerEmbedSDK = LookerEmbedSDK;\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LookerEmbedLook = void 0;\nvar embed_base_1 = require(\"./embed_base\");\n/**\n * Client that communicates with an embedded Looker Look. Messages are documented\n * [here](https://docs.looker.com/r/sdk/events)\n */\nvar LookerEmbedLook = /** @class */ (function (_super) {\n __extends(LookerEmbedLook, _super);\n function LookerEmbedLook() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * Convenience method for sending a run message to the embedded Look.\n */\n LookerEmbedLook.prototype.run = function () {\n this.send('look:run');\n };\n /**\n * Convenience method for updating the filters of the embedded Look.\n *\n * @param filters A set of filter parameters to update\n */\n LookerEmbedLook.prototype.updateFilters = function (params) {\n this.send('look:filters:update', { filters: params });\n };\n return LookerEmbedLook;\n}(embed_base_1.LookerEmbedBase));\nexports.LookerEmbedLook = LookerEmbedLook;\n//# sourceMappingURL=look_client.js.map","\"use strict\";\n/*\n\n MIT License\n\n Copyright (c) 2019 Looker Data Sciences, Inc.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","// This file can be required in Browserify and Node.js for automatic polyfill\n// To use it: require('es6-promise/auto');\n'use strict';\nmodule.exports = require('./').polyfill();\n","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then$$1 = void 0;\n try {\n then$$1 = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then$$1);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n"],"names":["__assign","t","s","i","n","p","__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","__generator","body","_","f","y","g","verb","v","op","__spreadArray","to","from","pack","l","ar","exports","debugLib","client_messages_1","host_messages_1","ChattyClientStates","ChattyClient","builder","_this","_a","evt","eventName","payload","_i","_payload","signal","propagateSignal","options","sequence","_b","_c","timeoutId","event","errorMessage","fn","eventName_1","sequence_1","results","abortStoreName_1","_payload_1","resolvedResults","error","abortStoreName","receiver","action","data","sequenceData","signalData","dataWithSequence","client_1","ChattyClientBuilder","name","handler","timeout","targetOrigin","ChattyClientMessages","ChattyHostStates","ChattyHost","attr","createConnection","eventListener","errorMessage_1","windowListener","host_1","ChattyHostBuilder","_url","_source","el","ChattyHostMessages","__createBinding","o","m","k","k2","desc","__exportStar","client_builder_1","host_builder_1","client_builder_2","host_builder_2","Chatty","url","source","module","log","formatArgs","save","load","useColors","localstorage","err","args","c","index","lastC","match","namespaces","r","createDebug","coerce","disable","enable","enabled","prevTime","selectColor","namespace","hash","debug","self","curr","ms","format","formatter","val","logFn","split","len","h","d","type","parse","fmtLong","fmtShort","str","plural","__extends","extendStatics","b","__","embed_base_1","LookerEmbedDashboard","_super","params","id","pushHistory","__rest","chatty_1","IS_URL","EmbedClient","_builder","apiHost","eventType","_loop_1","this_1","_d","_e","_f","_g","open","placement","height","api_token","api_token_ttl","navigation_token","navigation_token_ttl","session_reference_token_ttl","client","host","iframe","_event","src","auth","param","xhr","header","acquireSession","generateTokens","authentication_token","sep","embedPath","init","resp","error_1","defaultInit","error_2","resource","tempUrl","rest","_error","LookerEmbedBase","_host","message","embed_1","stringify","key","valueArray","valueArray_1","singleValue","escapeFilterParam","EmbedBuilder","_hostSettings","_type","_endpoint","_clientConstructor","embedDomain","filters","escape","className","suffix","theme","monitor","dynamicIFrameHeight","dialogScroll","authUrl","embedHostDomain","sandboxedHost","LookerEmbedExplore","LookerEmbedExtension","embed_builder_1","dashboard_client_1","explore_client_1","extension_client_1","look_client_1","LookerEmbedSDK","LookerEmbedLook","global","factory","objectOrFunction","x","isFunction","_isArray","isArray","vertxNext","customSchedulerFn","asap","callback","arg","queue","flush","scheduleFlush","setScheduler","scheduleFn","setAsap","asapFn","browserWindow","browserGlobal","BrowserMutationObserver","isNode","isWorker","useNextTick","useVertxTimer","useSetTimeout","useMutationObserver","iterations","observer","node","useMessageChannel","channel","globalSetTimeout","attemptVertx","vertx","then","onFulfillment","onRejection","parent","child","noop","PROMISE_ID","makePromise","_state","invokeCallback","subscribe","resolve$1","object","Constructor","promise","PENDING","FULFILLED","REJECTED","selfFulfillment","cannotReturnOwn","tryThen","then$$1","fulfillmentHandler","rejectionHandler","handleForeignThenable","thenable","sealed","fulfill","reason","handleOwnThenable","handleMaybeThenable","maybeThenable","publishRejection","publish","_subscribers","length","subscribers","settled","detail","hasCallback","succeeded","initializePromise","resolver","nextId","validationError","Enumerator","input","entry","resolve$$1","_then","didError","Promise$1","state","enumerator","all","entries","race","reject$1","needsResolver","needsNew","Promise","constructor","polyfill","local","promiseToString"],"sourceRoot":""}