@opentabs-dev/opentabs-plugin-excel-online 0.0.74 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -272,19 +272,18 @@
272
272
  }
273
273
  return null;
274
274
  };
275
+ try {
276
+ return search(localStorage);
277
+ } catch {
278
+ }
275
279
  let storage;
276
280
  try {
277
- storage = window.localStorage;
281
+ storage = localStorage;
278
282
  } catch {
279
283
  return null;
280
284
  }
281
- if (storage) {
282
- try {
283
- return search(storage);
284
- } catch {
285
- return null;
286
- }
287
- }
285
+ if (storage !== void 0)
286
+ return null;
288
287
  try {
289
288
  const iframe = document.createElement("iframe");
290
289
  iframe.style.display = "none";
@@ -15053,21 +15052,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15053
15052
  };
15054
15053
  var src_default = new ExcelOnlinePlugin();
15055
15054
 
15056
- // dist/_adapter_entry_827722ac-4478-4587-998a-75ae2e46cdfd.ts
15055
+ // dist/_adapter_entry_291228db-e450-450f-ac86-458453a0101a.ts
15057
15056
  if (!globalThis.__openTabs) {
15058
15057
  globalThis.__openTabs = {};
15059
15058
  } else {
15060
15059
  const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
15061
15060
  if (desc && !desc.writable) {
15062
- const ot3 = globalThis.__openTabs;
15061
+ const ot2 = globalThis.__openTabs;
15063
15062
  const newAdaptersObj = {};
15064
- if (ot3.adapters) {
15065
- for (const key of Object.keys(ot3.adapters)) {
15066
- const d = Object.getOwnPropertyDescriptor(ot3.adapters, key);
15063
+ if (ot2.adapters) {
15064
+ for (const key of Object.keys(ot2.adapters)) {
15065
+ const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
15067
15066
  if (d) Object.defineProperty(newAdaptersObj, key, d);
15068
15067
  }
15069
15068
  }
15070
- globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdaptersObj });
15069
+ globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
15071
15070
  }
15072
15071
  }
15073
15072
  if (!globalThis.__openTabs.adapters) {
@@ -15105,16 +15104,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15105
15104
  }
15106
15105
  };
15107
15106
  var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
15108
- var ot2 = globalThis.__openTabs;
15109
- ot2._notifyReadinessChanged = () => {
15110
- try {
15111
- const nonce = globalThis.__openTabs?._readinessNonce;
15112
- if (nonce) {
15113
- window.postMessage({ type: "opentabs:readiness-changed", plugin: "excel-online", nonce }, "*");
15114
- }
15115
- } catch {
15116
- }
15117
- };
15118
15107
  var existing = adapters["excel-online"];
15119
15108
  if (existing) {
15120
15109
  if (typeof existing.teardown === "function") {
@@ -15126,7 +15115,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15126
15115
  }
15127
15116
  }
15128
15117
  if (!Reflect.deleteProperty(adapters, "excel-online")) {
15129
- const ot3 = globalThis.__openTabs;
15118
+ const ot2 = globalThis.__openTabs;
15130
15119
  const newAdapters = {};
15131
15120
  for (const key of Object.keys(adapters)) {
15132
15121
  if (key !== "excel-online") {
@@ -15134,7 +15123,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15134
15123
  if (desc) Object.defineProperty(newAdapters, key, desc);
15135
15124
  }
15136
15125
  }
15137
- globalThis.__openTabs = Object.assign({}, ot3, { adapters: newAdapters });
15126
+ globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
15138
15127
  }
15139
15128
  var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
15140
15129
  for (const tool of src_default.tools) {
@@ -15195,12 +15184,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15195
15184
  }
15196
15185
  }
15197
15186
  };
15198
- const ot3 = globalThis.__openTabs;
15199
- if (!ot3._navigationInterceptor) {
15187
+ const ot2 = globalThis.__openTabs;
15188
+ if (!ot2._navigationInterceptor) {
15200
15189
  const origPushState = history.pushState.bind(history);
15201
15190
  const origReplaceState = history.replaceState.bind(history);
15202
15191
  const callbacks = /* @__PURE__ */ new Map();
15203
- ot3._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15192
+ ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
15204
15193
  history.pushState = function(...args) {
15205
15194
  origPushState(...args);
15206
15195
  for (const cb of callbacks.values()) {
@@ -15214,7 +15203,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15214
15203
  }
15215
15204
  };
15216
15205
  }
15217
- const interceptor = ot3._navigationInterceptor;
15206
+ const interceptor = ot2._navigationInterceptor;
15218
15207
  interceptor.callbacks.set("excel-online", checkUrl);
15219
15208
  window.addEventListener("popstate", checkUrl);
15220
15209
  window.addEventListener("hashchange", checkUrl);
@@ -15269,5 +15258,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15269
15258
  };
15270
15259
  delete src_default.onDeactivate;
15271
15260
  }
15272
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["excel-online"]){var a=o.adapters["excel-online"];a.__adapterHash="f389dcfd1d1822375dd705da55a91bf3f026c3c3c3b5b745af8e6b0f5b3b243a";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"excel-online",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15261
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["excel-online"]){var a=o.adapters["excel-online"];a.__adapterHash="e283d7ed67e225e356cab2d17bb0acb1af97081e74d4c89307800a3637f63e3c";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"excel-online",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15273
15262
  //# sourceMappingURL=adapter.iife.js.map