gas-client
Version:
A client-side utility class that can call server-side Google Apps Script functions
1 lines • 19.5 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.GASClient=t():e.GASClient=t()}(self,(()=>(()=>{"use strict";var e={208:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FunctionProvider=void 0;var n=function(){function e(){this._serverFunctions={}}return Object.defineProperty(e.prototype,"serverFunctions",{get:function(){return this._serverFunctions},enumerable:!1,configurable:!0}),e}();t.FunctionProvider=n},925:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.GASPromises=void 0;var u=n(809),s=n(670),c=function(e){function t(){var t=e.call(this)||this;return t.promisifyGASFunctions(),t}return o(t,e),t.prototype.promisifyGASFunctions=function(){this._serverFunctions=Object.keys(google.script.run).reduce((function(e,t){var n;return u.ignoredFunctionNames.includes(t)?e:i(i({},e),((n={})[t]=(0,s.promisify)(t),n))}),{})},t}(n(208).FunctionProvider);t.GASPromises=c},363:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptHostFunctions=void 0;var i=function(e){function t(){var t=e.call(this)||this;return t.initializeScriptHostFunctions(),t}return o(t,e),t.prototype.initializeScriptHostFunctions=function(){var e;this._hostFunctions={close:google.script.host.close,setHeight:google.script.host.setHeight,setWidth:google.script.host.setWidth,focusEditor:null===(e=google.script.host.editor)||void 0===e?void 0:e.focus}},t}(n(36).ScriptHostProvider);t.ScriptHostFunctions=i},36:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptHostProvider=void 0;var n=function(){function e(){this._hostFunctions={}}return Object.defineProperty(e.prototype,"hostFunctions",{get:function(){return this._hostFunctions},enumerable:!1,configurable:!0}),e}();t.ScriptHostProvider=n},352:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptHostProxy=void 0;var i=n(184),u=function(e){function t(){var t=e.call(this)||this;return t._hostFunctions=new Proxy({},{get:i.proxyHandlerScriptHostFunction}),t}return o(t,e),t}(n(36).ScriptHostProvider);t.ScriptHostProxy=u},520:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ServerProxy=void 0;var i=n(550),u=n(184),s=n(208),c=n(942),a=function(e){function t(t){var n=e.call(this)||this;return n._config=t,window.gasStore={},window.addEventListener("message",n.buildMessageListener(),!1),n._serverFunctions=new Proxy({},{get:u.proxyHandlerServerFunction}),n}return o(t,e),t.prototype.buildMessageListener=function(){var e=this;return function(t){var n;if((0,i.checkAllowList)(t.origin,null===(n=e._config)||void 0===n?void 0:n.allowedDevelopmentDomains)&&t.data.type===c.MessageType.RESPONSE){var r=t.data,o=r.response,u=r.status,s=r.id,a=window.gasStore[s],l=a.resolve,f=a.reject;u===c.ResponseStatus.ERROR&&f(o),l(o)}}},t}(s.FunctionProvider);t.ServerProxy=a},942:(e,t)=>{var n,r,o;Object.defineProperty(t,"__esModule",{value:!0}),t.OriginType=t.ResponseStatus=t.MessageType=void 0,(o=t.MessageType||(t.MessageType={})).REQUEST="REQUEST",o.RESPONSE="RESPONSE",o.SCRIPT_HOST_FUNCTION_REQUEST="SCRIPT_HOST_FUNCTION_REQUEST",(r=t.ResponseStatus||(t.ResponseStatus={})).ERROR="ERROR",r.SUCCESS="SUCCESS",(n=t.OriginType||(t.OriginType={})).GAS="GAS",n.APP="App"},550:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.checkAllowList=void 0,t.checkAllowList=function(e,t){return"string"==typeof t?t.split(" ").some((function(t){return t===e})):"function"==typeof t&&!0===t(e)}},809:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ignoredFunctionNames=void 0,t.ignoredFunctionNames=["withFailureHandler","withLogger","withSuccessHandler","withUserObject"]},662:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isGASEnvironment=void 0,t.isGASEnvironment=function(){var e;return"undefined"!=typeof google&&Boolean(null===(e=null===google||void 0===google?void 0:google.script)||void 0===e?void 0:e.run)}},670:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.promisify=void 0,t.promisify=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new Promise((function(n,r){var o;(o=google.script.run.withSuccessHandler(n).withFailureHandler(r))[e].apply(o,t)}))}}},184:function(e,t,n){var r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.proxyHandlerScriptHostFunction=t.proxyHandlerServerFunction=void 0;var o=n(429),i=n(942);t.proxyHandlerServerFunction=function(e,t){var n=(0,o.v4)(),u=new Promise((function(e,t){window.gasStore[n]={resolve:e,reject:t}}));return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return window.parent.postMessage({type:i.MessageType.REQUEST,id:n,functionName:t,args:r([],e,!0)},"*"),u}},t.proxyHandlerScriptHostFunction=function(e,t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];window.parent.postMessage({type:i.MessageType.SCRIPT_HOST_FUNCTION_REQUEST,functionName:t,args:r([],e,!0)},"*")}}},429:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var r=d(n(990)),o=d(n(237)),i=d(n(355)),u=d(n(764)),s=d(n(314)),c=d(n(464)),a=d(n(435)),l=d(n(8)),f=d(n(222));function d(e){return e&&e.__esModule?e:{default:e}}},163:(e,t)=>{function n(e){return 14+(e+64>>>9<<4)+1}function r(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,o,i,u){return r((s=r(r(t,e),r(o,u)))<<(c=i)|s>>>32-c,n);var s,c}function i(e,t,n,r,i,u,s){return o(t&n|~t&r,e,t,i,u,s)}function u(e,t,n,r,i,u,s){return o(t&r|n&~r,e,t,i,u,s)}function s(e,t,n,r,i,u,s){return o(t^n^r,e,t,i,u,s)}function c(e,t,n,r,i,u,s){return o(n^(t|~r),e,t,i,u,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){const t=[],n=32*e.length,r="0123456789abcdef";for(let o=0;o<n;o+=8){const n=e[o>>5]>>>o%32&255,i=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);t.push(i)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[n(t)-1]=t;let o=1732584193,a=-271733879,l=-1732584194,f=271733878;for(let t=0;t<e.length;t+=16){const n=o,d=a,p=l,v=f;o=i(o,a,l,f,e[t],7,-680876936),f=i(f,o,a,l,e[t+1],12,-389564586),l=i(l,f,o,a,e[t+2],17,606105819),a=i(a,l,f,o,e[t+3],22,-1044525330),o=i(o,a,l,f,e[t+4],7,-176418897),f=i(f,o,a,l,e[t+5],12,1200080426),l=i(l,f,o,a,e[t+6],17,-1473231341),a=i(a,l,f,o,e[t+7],22,-45705983),o=i(o,a,l,f,e[t+8],7,1770035416),f=i(f,o,a,l,e[t+9],12,-1958414417),l=i(l,f,o,a,e[t+10],17,-42063),a=i(a,l,f,o,e[t+11],22,-1990404162),o=i(o,a,l,f,e[t+12],7,1804603682),f=i(f,o,a,l,e[t+13],12,-40341101),l=i(l,f,o,a,e[t+14],17,-1502002290),a=i(a,l,f,o,e[t+15],22,1236535329),o=u(o,a,l,f,e[t+1],5,-165796510),f=u(f,o,a,l,e[t+6],9,-1069501632),l=u(l,f,o,a,e[t+11],14,643717713),a=u(a,l,f,o,e[t],20,-373897302),o=u(o,a,l,f,e[t+5],5,-701558691),f=u(f,o,a,l,e[t+10],9,38016083),l=u(l,f,o,a,e[t+15],14,-660478335),a=u(a,l,f,o,e[t+4],20,-405537848),o=u(o,a,l,f,e[t+9],5,568446438),f=u(f,o,a,l,e[t+14],9,-1019803690),l=u(l,f,o,a,e[t+3],14,-187363961),a=u(a,l,f,o,e[t+8],20,1163531501),o=u(o,a,l,f,e[t+13],5,-1444681467),f=u(f,o,a,l,e[t+2],9,-51403784),l=u(l,f,o,a,e[t+7],14,1735328473),a=u(a,l,f,o,e[t+12],20,-1926607734),o=s(o,a,l,f,e[t+5],4,-378558),f=s(f,o,a,l,e[t+8],11,-2022574463),l=s(l,f,o,a,e[t+11],16,1839030562),a=s(a,l,f,o,e[t+14],23,-35309556),o=s(o,a,l,f,e[t+1],4,-1530992060),f=s(f,o,a,l,e[t+4],11,1272893353),l=s(l,f,o,a,e[t+7],16,-155497632),a=s(a,l,f,o,e[t+10],23,-1094730640),o=s(o,a,l,f,e[t+13],4,681279174),f=s(f,o,a,l,e[t],11,-358537222),l=s(l,f,o,a,e[t+3],16,-722521979),a=s(a,l,f,o,e[t+6],23,76029189),o=s(o,a,l,f,e[t+9],4,-640364487),f=s(f,o,a,l,e[t+12],11,-421815835),l=s(l,f,o,a,e[t+15],16,530742520),a=s(a,l,f,o,e[t+2],23,-995338651),o=c(o,a,l,f,e[t],6,-198630844),f=c(f,o,a,l,e[t+7],10,1126891415),l=c(l,f,o,a,e[t+14],15,-1416354905),a=c(a,l,f,o,e[t+5],21,-57434055),o=c(o,a,l,f,e[t+12],6,1700485571),f=c(f,o,a,l,e[t+3],10,-1894986606),l=c(l,f,o,a,e[t+10],15,-1051523),a=c(a,l,f,o,e[t+1],21,-2054922799),o=c(o,a,l,f,e[t+8],6,1873313359),f=c(f,o,a,l,e[t+15],10,-30611744),l=c(l,f,o,a,e[t+6],15,-1560198380),a=c(a,l,f,o,e[t+13],21,1309151649),o=c(o,a,l,f,e[t+4],6,-145523070),f=c(f,o,a,l,e[t+11],10,-1120210379),l=c(l,f,o,a,e[t+2],15,718787259),a=c(a,l,f,o,e[t+9],21,-343485551),o=r(o,n),a=r(a,d),l=r(l,p),f=r(f,v)}return[o,a,l,f]}(function(e){if(0===e.length)return[];const t=8*e.length,r=new Uint32Array(n(t));for(let n=0;n<t;n+=8)r[n>>5]|=(255&e[n/8])<<n%32;return r}(e),8*e.length))}},790:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=n},314:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},222:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(435))&&r.__esModule?r:{default:r};t.default=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}},58:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},319:(e,t)=>{let n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},757:(e,t)=>{function n(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function r(e,t){return e<<t|e>>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let n=0;n<t.length;++n)e.push(t.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);const i=e.length/4+2,u=Math.ceil(i/16),s=new Array(u);for(let t=0;t<u;++t){const n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];s[t]=n}s[u-1][14]=8*(e.length-1)/Math.pow(2,32),s[u-1][14]=Math.floor(s[u-1][14]),s[u-1][15]=8*(e.length-1)&4294967295;for(let e=0;e<u;++e){const i=new Uint32Array(80);for(let t=0;t<16;++t)i[t]=s[e][t];for(let e=16;e<80;++e)i[e]=r(i[e-3]^i[e-8]^i[e-14]^i[e-16],1);let u=o[0],c=o[1],a=o[2],l=o[3],f=o[4];for(let e=0;e<80;++e){const o=Math.floor(e/20),s=r(u,5)+n(o,c,a,l)+f+t[o]+i[e]>>>0;f=l,l=a,a=r(c,30)>>>0,c=u,u=s}o[0]=o[0]+u>>>0,o[1]=o[1]+c>>>0,o[2]=o[2]+a>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+f>>>0}return[o[0]>>24&255,o[0]>>16&255,o[0]>>8&255,255&o[0],o[1]>>24&255,o[1]>>16&255,o[1]>>8&255,255&o[1],o[2]>>24&255,o[2]>>16&255,o[2]>>8&255,255&o[2],o[3]>>24&255,o[3]>>16&255,o[3]>>8&255,255&o[3],o[4]>>24&255,o[4]>>16&255,o[4]>>8&255,255&o[4]]}},8:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=u;var r,o=(r=n(435))&&r.__esModule?r:{default:r};const i=[];for(let e=0;e<256;++e)i.push((e+256).toString(16).slice(1));function u(e,t=0){return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}t.default=function(e,t=0){const n=u(e,t);if(!(0,o.default)(n))throw TypeError("Stringified UUID is invalid");return n}},990:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(319))&&r.__esModule?r:{default:r},i=n(8);let u,s,c=0,a=0;t.default=function(e,t,n){let r=t&&n||0;const l=t||new Array(16);let f=(e=e||{}).node||u,d=void 0!==e.clockseq?e.clockseq:s;if(null==f||null==d){const t=e.random||(e.rng||o.default)();null==f&&(f=u=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==d&&(d=s=16383&(t[6]<<8|t[7]))}let p=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:a+1;const y=p-c+(v-a)/1e4;if(y<0&&void 0===e.clockseq&&(d=d+1&16383),(y<0||p>c)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,a=v,s=d,p+=122192928e5;const _=(1e4*(268435455&p)+v)%4294967296;l[r++]=_>>>24&255,l[r++]=_>>>16&255,l[r++]=_>>>8&255,l[r++]=255&_;const g=p/4294967296*1e4&268435455;l[r++]=g>>>8&255,l[r++]=255&g,l[r++]=g>>>24&15|16,l[r++]=g>>>16&255,l[r++]=d>>>8|128,l[r++]=255&d;for(let e=0;e<6;++e)l[r+e]=f[e];return t||(0,i.unsafeStringify)(l)}},237:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(296)),o=i(n(163));function i(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("v3",48,o.default);t.default=u},296:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,n){function r(e,r,u,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=(0,i.default)(r)),16!==(null===(c=r)||void 0===c?void 0:c.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),a=n(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,u){s=s||0;for(let e=0;e<16;++e)u[s+e]=a[e];return u}return(0,o.unsafeStringify)(a)}try{r.name=e}catch(e){}return r.DNS=u,r.URL=s,r};var r,o=n(8),i=(r=n(222))&&r.__esModule?r:{default:r};const u="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.DNS=u;const s="6ba7b811-9dad-11d1-80b4-00c04fd430c8";t.URL=s},355:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n(790)),o=u(n(319)),i=n(8);function u(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,n){if(r.default.randomUUID&&!t&&!e)return r.default.randomUUID();const u=(e=e||{}).random||(e.rng||o.default)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=u[e];return t}return(0,i.unsafeStringify)(u)}},764:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(296)),o=i(n(757));function i(e){return e&&e.__esModule?e:{default:e}}var u=(0,r.default)("v5",80,o.default);t.default=u},435:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(58))&&r.__esModule?r:{default:r};t.default=function(e){return"string"==typeof e&&o.default.test(e)}},464:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=(r=n(435))&&r.__esModule?r:{default:r};t.default=function(e){if(!(0,o.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.ResponseStatus=e.MessageType=e.GASClient=void 0;var t=n(662),o=n(925),i=n(520),u=n(363),s=n(352),c=function(){function e(e){this._config=e,(0,t.isGASEnvironment)()?(this._functionProvider=new o.GASPromises,this._scriptHostProvider=new u.ScriptHostFunctions):(this._functionProvider=new i.ServerProxy(this._config),this._scriptHostProvider=new s.ScriptHostProxy)}return Object.defineProperty(e.prototype,"serverFunctions",{get:function(){return this._functionProvider.serverFunctions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scriptHostFunctions",{get:function(){return this._scriptHostProvider.hostFunctions},enumerable:!1,configurable:!0}),e}();e.GASClient=c;var a=n(942);Object.defineProperty(e,"MessageType",{enumerable:!0,get:function(){return a.MessageType}}),Object.defineProperty(e,"ResponseStatus",{enumerable:!0,get:function(){return a.ResponseStatus}})})(),r})()));