@pendo/agent 2.336.2 → 2.337.1

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.
@@ -4029,8 +4029,8 @@ let SERVER = '';
4029
4029
  let ASSET_HOST = '';
4030
4030
  let ASSET_PATH = '';
4031
4031
  let DESIGNER_SERVER = '';
4032
- let VERSION = '2.336.2_';
4033
- let PACKAGE_VERSION = '2.336.2';
4032
+ let VERSION = '2.337.1_';
4033
+ let PACKAGE_VERSION = '2.337.1';
4034
4034
  let LOADER = 'xhr';
4035
4035
  /* eslint-enable web-sdk-eslint-rules/no-gulp-env-references */
4036
4036
  /**
@@ -9766,6 +9766,7 @@ var pendoDotUrl = {
9766
9766
  electronResourcesPath
9767
9767
  };
9768
9768
 
9769
+ const FONT_HOST = 'https://cdn.pendo.io';
9769
9770
  function getDataHost() {
9770
9771
  var localDataHost = ConfigReader.getLocalConfig('dataHost');
9771
9772
  if (localDataHost) {
@@ -9807,6 +9808,12 @@ function getAssetUrl(filename) {
9807
9808
  const file = isLocalAgent(assetHost) ? filename.replace('.min.js', '.js') : filename;
9808
9809
  return `${assetHost}/${ASSET_PATH ? ASSET_PATH + '/' : ''}${file}`;
9809
9810
  }
9811
+ function getFontBaseUrl() {
9812
+ if (ConfigReader.get('assetHost')) {
9813
+ return getAssetUrl('fonts');
9814
+ }
9815
+ return `${FONT_HOST}/fonts`;
9816
+ }
9810
9817
 
9811
9818
  function treatAsAdoptPartner() {
9812
9819
  // allowPartnerAnalyticsForwarding is set on the snippet in Adopt UI to block based on the environment of the app.
@@ -28640,6 +28647,7 @@ const PluginAPI = {
28640
28647
  getAssetHost,
28641
28648
  getAssetUrl,
28642
28649
  getDataHost,
28650
+ getFontBaseUrl,
28643
28651
  SERVER,
28644
28652
  DESIGNER_SERVER
28645
28653
  },
@@ -28664,7 +28672,10 @@ const PluginAPI = {
28664
28672
  testPageRule,
28665
28673
  addInlineStyles: _.partial(addInlineStyles, ConfigReader),
28666
28674
  getNow,
28667
- escapeRegExp
28675
+ escapeRegExp,
28676
+ getZoneSafeMethod(method, target) {
28677
+ return getZoneSafeMethod$1(_, method, target);
28678
+ }
28668
28679
  },
28669
28680
  constants: {
28670
28681
  URL_MAX_LENGTH,
@@ -30965,6 +30976,54 @@ var validateEnvironment = function (skipLogging) {
30965
30976
  ConfigReader.validate(console);
30966
30977
  };
30967
30978
 
30979
+ const SUPPORTED_INTEGRATIONS = ['intercom'];
30980
+ // Comparison logic is a standalone bundle fetched on demand, not base-agent code.
30981
+ function runCheck(pendoVisitorId, isAnonymous) {
30982
+ return window.__pendoCheckIntercomIdMatch(pendoVisitorId, isAnonymous);
30983
+ }
30984
+ /**
30985
+ * Compares the current Pendo visitor ID against the current user ID for the given
30986
+ * integration and logs the result to the console.
30987
+ *
30988
+ * @access public
30989
+ * @category Validation
30990
+ * @param {string} integration name of the integration to check against (currently only
30991
+ * `'intercom'` is supported)
30992
+ * @returns {Promise<boolean|undefined>} `true` if the IDs match, `false` if they don't, or
30993
+ * `undefined` if the match couldn't be confirmed
30994
+ * @example
30995
+ * pendo.checkIntegrationIdMatch('intercom')
30996
+ */
30997
+ function checkIntegrationIdMatch(integration) {
30998
+ if (!_.contains(SUPPORTED_INTEGRATIONS, integration)) {
30999
+ /* eslint-disable no-console */
31000
+ if (typeof console !== 'undefined' && console.log) {
31001
+ console.log('Unsupported integration "' + integration + '". Supported integrations: ' + SUPPORTED_INTEGRATIONS.join(', ') + '.');
31002
+ }
31003
+ /* eslint-enable no-console */
31004
+ return q.resolve(undefined);
31005
+ }
31006
+ const pendoVisitorId = get_visitor_id();
31007
+ const isAnonymous = isAnonymousVisitor(pendoVisitorId);
31008
+ if (typeof window.__pendoCheckIntercomIdMatch === 'function') {
31009
+ return q.resolve(runCheck(pendoVisitorId, isAnonymous));
31010
+ }
31011
+ const deferred = q.defer();
31012
+ loadResource(getAssetUrl('check-intercom-id-match.min.js'), function (err) {
31013
+ /* eslint-disable no-console */
31014
+ if (err) {
31015
+ if (typeof console !== 'undefined' && console.error) {
31016
+ console.error('Failed to load the Intercom ID check. Please try again.');
31017
+ }
31018
+ deferred.resolve(undefined);
31019
+ return;
31020
+ }
31021
+ /* eslint-enable no-console */
31022
+ deferred.resolve(runCheck(pendoVisitorId, isAnonymous));
31023
+ }, true);
31024
+ return deferred.promise;
31025
+ }
31026
+
30968
31027
  var BuildingBlocks = {
30969
31028
  BuildingBlockGuides,
30970
31029
  BuildingBlockResourceCenter,
@@ -31636,6 +31695,7 @@ function exportPublicApi(pendo) {
31636
31695
  pendo.get_account_id = get_account_id;
31637
31696
  pendo.set_account_id = function (accountId) { identify(get_visitor_id(), accountId); };
31638
31697
  pendo.getSerializedMetadata = getSerializedMetadata;
31698
+ pendo.checkIntegrationIdMatch = checkIntegrationIdMatch;
31639
31699
  pendo.compress = compress;
31640
31700
  pendo.squeezeAndCompress = compress;
31641
31701
  pendo.randomElement = randomElement;
@@ -42831,6 +42891,48 @@ setTimeout = (function(global) {
42831
42891
 
42832
42892
  var setTimeout$1 = setTimeout;
42833
42893
 
42894
+ // NOT A TRUE POLYFILL
42895
+ // This really only replaces the location portion of the URL API.
42896
+ //
42897
+ // NOTE: This, for now, at least is identified as an instanceof HTMLAnchorElement
42898
+
42899
+ function URLPolyfillFactory(doc) {
42900
+ return function URL(str) {
42901
+ var a = doc.createElement('a');
42902
+ a.href = str;
42903
+
42904
+ if (a.protocol === ':') {
42905
+ throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
42906
+ }
42907
+
42908
+ if (a.href !== str && a.href !== encodeURI(str)) {
42909
+ throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
42910
+ }
42911
+
42912
+ if (!a.toString) {
42913
+ a.toString = function() { return a.href; };
42914
+ }
42915
+
42916
+ if (a.origin == null) {
42917
+ a.origin = a.protocol + '//' + a.hostname;
42918
+ if (a.port !== '80' && a.port !== '443') {
42919
+ a.origin += ':' + a.port;
42920
+ }
42921
+ }
42922
+
42923
+ return a;
42924
+ };
42925
+ }
42926
+
42927
+ var URL$1 = (function(global, factory) {
42928
+ var nativeURL = global.URL;
42929
+ if (typeof nativeURL !== 'function' || !/native/.test(nativeURL)) {
42930
+ return factory(document);
42931
+ }
42932
+
42933
+ return nativeURL;
42934
+ })(window, URLPolyfillFactory);
42935
+
42834
42936
  /*
42835
42937
  * @license MIT - https://github.com/taylorhakes/promise-polyfill
42836
42938
  */
@@ -43711,15 +43813,57 @@ const startListening = (
43711
43813
  _stopListening = () => window.removeEventListener('message', postMessageListener);
43712
43814
  };
43713
43815
 
43816
+ const SIZED_CLASS = 'pendo-voc-portal-sized';
43817
+ const STEP_CONTAINER_SELECTOR = '._pendo-step-container-size';
43818
+ const PORTAL_RC_SELECTOR = `#pendo-resource-center-container.${SIZED_CLASS}`;
43819
+ const PORTAL_STEP_SELECTOR = `#pendo-resource-center-container ${STEP_CONTAINER_SELECTOR}.${SIZED_CLASS}`;
43820
+ const PORTAL_IFRAME_SELECTOR = 'iframe[src*="portal"][src*="mode=rc"]';
43821
+ const HOME_LIST_SELECTOR = '._pendo-resource-center-home-list';
43822
+ const CONTAINER_ID = 'pendo-resource-center-container';
43823
+ const STYLE_ID$1 = 'pendo-voc-portal-styles';
43824
+ const LOADER_ID = 'pendo-voc-portal-loader';
43825
+ const LOADER_STYLE_ID = 'pendo-voc-portal-loader-styles';
43826
+ const LOADER_Z_INDEX = 2147483646;
43827
+ const LOADER_TIMEOUT_MS = 10000;
43828
+ const LOADER_CSS = `#${LOADER_ID} {
43829
+ position: absolute;
43830
+ inset: 0;
43831
+ display: flex;
43832
+ align-items: center;
43833
+ justify-content: center;
43834
+ background: #fff;
43835
+ z-index: ${LOADER_Z_INDEX};
43836
+ }
43837
+ #${LOADER_ID}::after {
43838
+ content: "";
43839
+ width: 60px;
43840
+ height: 60px;
43841
+ border: 5px solid rgba(0, 0, 0, 0.12);
43842
+ border-top-color: #000;
43843
+ border-radius: 50%;
43844
+ animation: pendo-voc-portal-spin 1s linear infinite;
43845
+ }
43846
+ @keyframes pendo-voc-portal-spin { to { transform: rotate(360deg); } }`;
43847
+ const VALID_UNITS = ['px', '%', 'vh', 'vw'];
43848
+ const DEFAULT_PORTAL_WIDTH = '90vw !important';
43849
+ const DEFAULT_PORTAL_HEIGHT = '85vh !important';
43714
43850
  function VocPortal() {
43715
43851
  let pendoGlobal;
43716
43852
  let pluginAPI;
43853
+ let portalObserver;
43854
+ let containerObserver;
43855
+ let observedContainer;
43856
+ let ObserverCtor;
43857
+ let lastPresetCss;
43858
+ let loaderTimeout;
43859
+ let sizedElements = [];
43717
43860
  return {
43718
43861
  name: 'VocPortal',
43719
43862
  initialize,
43720
43863
  routeHandlerLookup,
43721
43864
  queryMessageHandler,
43722
43865
  resizeMessageHandler,
43866
+ presizePortalContainer,
43723
43867
  teardown
43724
43868
  };
43725
43869
  function initialize(pendo, PluginAPI) {
@@ -43728,6 +43872,232 @@ function VocPortal() {
43728
43872
  const { frameId } = PluginAPI.EventTracer.addTracerIds({});
43729
43873
  this.removeResizeEvent = pendoGlobal.attachEvent(window, 'resize', resizePortalIframe);
43730
43874
  startListening('VocPortal', frameId, routeHandlerLookup, () => '*');
43875
+ try {
43876
+ observePortalContainer();
43877
+ }
43878
+ catch (err) {
43879
+ pluginAPI.log.error('VocPortal presizing setup failed', err);
43880
+ }
43881
+ }
43882
+ function buildContainerSizeCss(width, height) {
43883
+ return `${PORTAL_RC_SELECTOR} {
43884
+ width: ${width};
43885
+ height: ${height};
43886
+ }
43887
+ ${PORTAL_STEP_SELECTOR} {
43888
+ width: ${width};
43889
+ height: ${height};
43890
+ }`;
43891
+ }
43892
+ function presizePortalContainer(width = DEFAULT_PORTAL_WIDTH, height = DEFAULT_PORTAL_HEIGHT) {
43893
+ const css = buildContainerSizeCss(width, height);
43894
+ if (css === lastPresetCss)
43895
+ return;
43896
+ lastPresetCss = css;
43897
+ const existing = document.getElementById(STYLE_ID$1);
43898
+ if (existing) {
43899
+ existing.textContent = css;
43900
+ }
43901
+ else {
43902
+ pluginAPI.util.addInlineStyles(STYLE_ID$1, css);
43903
+ }
43904
+ }
43905
+ function observePortalContainer() {
43906
+ ObserverCtor = getPortalMutationObserver();
43907
+ if (!ObserverCtor)
43908
+ return;
43909
+ presizeFromExistingIframe();
43910
+ ensureContainerObserver();
43911
+ portalObserver = new ObserverCtor(handleBodyMutations);
43912
+ portalObserver.observe(pendoGlobal.dom.getBody(), {
43913
+ childList: true,
43914
+ subtree: true
43915
+ });
43916
+ }
43917
+ function handleBodyMutations(mutations) {
43918
+ ensureContainerObserver();
43919
+ handleRcMutations(mutations);
43920
+ }
43921
+ function ensureContainerObserver() {
43922
+ if (!ObserverCtor)
43923
+ return;
43924
+ const container = document.getElementById(CONTAINER_ID) || null;
43925
+ if (container === observedContainer)
43926
+ return;
43927
+ if (containerObserver) {
43928
+ containerObserver.disconnect();
43929
+ containerObserver = undefined;
43930
+ }
43931
+ observedContainer = container;
43932
+ if (!container) {
43933
+ clearPresetSizing();
43934
+ return;
43935
+ }
43936
+ containerObserver = new ObserverCtor(handleRcMutations);
43937
+ containerObserver.observe(container, {
43938
+ childList: true,
43939
+ subtree: true,
43940
+ attributes: true,
43941
+ attributeFilter: ['src']
43942
+ });
43943
+ }
43944
+ function presizeFromExistingIframe() {
43945
+ const iframe = document.querySelector(PORTAL_IFRAME_SELECTOR);
43946
+ if (iframe)
43947
+ presizeFromIframe(iframe);
43948
+ }
43949
+ function getPortalMutationObserver() {
43950
+ const zoneSafe = pluginAPI.util && pluginAPI.util.getZoneSafeMethod;
43951
+ let MutationObserver = zoneSafe && zoneSafe('MutationObserver');
43952
+ if (typeof MutationObserver !== 'function') {
43953
+ MutationObserver = window.MutationObserver;
43954
+ }
43955
+ return typeof MutationObserver === 'function' ? MutationObserver : undefined;
43956
+ }
43957
+ function handleRcMutations(mutations) {
43958
+ const iframe = findPortalIframe(mutations);
43959
+ if (iframe) {
43960
+ presizeFromIframe(iframe);
43961
+ return;
43962
+ }
43963
+ if (findAddedHomeList(mutations))
43964
+ clearPresetSizing();
43965
+ }
43966
+ function clearPresetSizing() {
43967
+ lastPresetCss = undefined;
43968
+ unmarkSizedElements();
43969
+ const existing = document.getElementById(STYLE_ID$1);
43970
+ if (existing)
43971
+ existing.textContent = '';
43972
+ const container = document.getElementById(CONTAINER_ID);
43973
+ if (container)
43974
+ container.style.transform = '';
43975
+ hideLoadingOverlay();
43976
+ }
43977
+ function markSizedElements(container, iframe) {
43978
+ addSizedClass(container);
43979
+ addSizedClass(closestStepContainer(iframe));
43980
+ }
43981
+ function addSizedClass(el) {
43982
+ if (el && el.classList) {
43983
+ el.classList.add(SIZED_CLASS);
43984
+ if (sizedElements.indexOf(el) === -1)
43985
+ sizedElements.push(el);
43986
+ }
43987
+ }
43988
+ function unmarkSizedElements() {
43989
+ for (let i = 0; i < sizedElements.length; i++) {
43990
+ const el = sizedElements[i];
43991
+ if (el && el.classList)
43992
+ el.classList.remove(SIZED_CLASS);
43993
+ }
43994
+ sizedElements = [];
43995
+ }
43996
+ function closestStepContainer(node) {
43997
+ let el = node;
43998
+ while (el && el.nodeType === 1) {
43999
+ if (el.matches && el.matches(STEP_CONTAINER_SELECTOR))
44000
+ return el;
44001
+ el = el.parentNode;
44002
+ }
44003
+ return null;
44004
+ }
44005
+ function findAddedHomeList(mutations) {
44006
+ if (!mutations)
44007
+ return false;
44008
+ for (const mutation of mutations) {
44009
+ const addedNodes = mutation.addedNodes || [];
44010
+ for (const node of addedNodes) {
44011
+ if (!node || node.nodeType !== 1)
44012
+ continue;
44013
+ if (node.matches && node.matches(HOME_LIST_SELECTOR))
44014
+ return true;
44015
+ if (node.querySelector && node.querySelector(HOME_LIST_SELECTOR))
44016
+ return true;
44017
+ }
44018
+ }
44019
+ return false;
44020
+ }
44021
+ function presizeFromIframe(iframe) {
44022
+ const { width, height } = readPortalDimsFromSrc(iframe.getAttribute('src'));
44023
+ const container = document.getElementById(CONTAINER_ID);
44024
+ presizePortalContainer(width, height);
44025
+ markSizedElements(container, iframe);
44026
+ showLoadingOverlay(container, iframe);
44027
+ try {
44028
+ resizePortalIframe();
44029
+ clampContainerToViewport(container);
44030
+ }
44031
+ catch (err) {
44032
+ pluginAPI.log.error('VocPortal presize sizing failed', err);
44033
+ }
44034
+ }
44035
+ function showLoadingOverlay(container, iframe) {
44036
+ if (!container || document.getElementById(LOADER_ID))
44037
+ return;
44038
+ pluginAPI.util.addInlineStyles(LOADER_STYLE_ID, LOADER_CSS);
44039
+ const loader = document.createElement('div');
44040
+ loader.id = LOADER_ID;
44041
+ loader.setAttribute('role', 'status');
44042
+ loader.setAttribute('aria-label', 'Loading');
44043
+ const title = document.getElementById('pendo-resource-center-module-title-container');
44044
+ if (title && title.offsetHeight)
44045
+ loader.style.top = `${title.offsetHeight}px`;
44046
+ container.appendChild(loader);
44047
+ if (iframe && iframe.addEventListener) {
44048
+ iframe.addEventListener('load', hideLoadingOverlay, { once: true });
44049
+ }
44050
+ loaderTimeout = setTimeout$1(hideLoadingOverlay, LOADER_TIMEOUT_MS);
44051
+ }
44052
+ function hideLoadingOverlay() {
44053
+ if (loaderTimeout) {
44054
+ clearTimeout(loaderTimeout);
44055
+ loaderTimeout = undefined;
44056
+ }
44057
+ const loader = document.getElementById(LOADER_ID);
44058
+ if (loader && loader.remove)
44059
+ loader.remove();
44060
+ }
44061
+ function findPortalIframe(mutations) {
44062
+ if (!mutations)
44063
+ return null;
44064
+ for (const mutation of mutations) {
44065
+ const target = mutation.target;
44066
+ if (mutation.type === 'attributes' && target && target.matches &&
44067
+ target.matches(PORTAL_IFRAME_SELECTOR)) {
44068
+ return target;
44069
+ }
44070
+ const addedNodes = mutation.addedNodes || [];
44071
+ for (const node of addedNodes) {
44072
+ if (!node || node.nodeType !== 1)
44073
+ continue;
44074
+ if (node.matches && node.matches(PORTAL_IFRAME_SELECTOR))
44075
+ return node;
44076
+ const found = node.querySelector && node.querySelector(PORTAL_IFRAME_SELECTOR);
44077
+ if (found)
44078
+ return found;
44079
+ }
44080
+ }
44081
+ return null;
44082
+ }
44083
+ function readPortalDimsFromSrc(src) {
44084
+ try {
44085
+ const params = new URL$1(src, window.location.href).searchParams;
44086
+ const widthValue = parseInt(params.get('width'), 10);
44087
+ const heightValue = parseInt(params.get('height'), 10);
44088
+ const widthUnit = params.get('widthUnit') || 'vw';
44089
+ const heightUnit = params.get('heightUnit') || 'vh';
44090
+ const width = (widthValue > 0 && pendoGlobal._.contains(VALID_UNITS, widthUnit))
44091
+ ? `${widthValue}${widthUnit} !important`
44092
+ : DEFAULT_PORTAL_WIDTH;
44093
+ const height = (heightValue > 0 && pendoGlobal._.contains(VALID_UNITS, heightUnit))
44094
+ ? `${heightValue}${heightUnit} !important`
44095
+ : DEFAULT_PORTAL_HEIGHT;
44096
+ return { width, height };
44097
+ }
44098
+ catch (err) {
44099
+ return { width: DEFAULT_PORTAL_WIDTH, height: DEFAULT_PORTAL_HEIGHT };
44100
+ }
43731
44101
  }
43732
44102
  function routeHandlerLookup(path) {
43733
44103
  switch (path) {
@@ -43740,7 +44110,7 @@ function VocPortal() {
43740
44110
  }
43741
44111
  }
43742
44112
  function resizePortalIframe() {
43743
- const vocPortalRcContainer = document.getElementById('pendo-resource-center-container');
44113
+ const vocPortalRcContainer = document.getElementById(CONTAINER_ID);
43744
44114
  const vocPortalRcDOM = pendoGlobal.dom(vocPortalRcContainer);
43745
44115
  pluginAPI.sizeElements(vocPortalRcDOM);
43746
44116
  }
@@ -43766,21 +44136,14 @@ function VocPortal() {
43766
44136
  if (typeof widthValue !== 'number' || typeof heightValue !== 'number') {
43767
44137
  return;
43768
44138
  }
43769
- const validUnits = ['px', '%', 'vh', 'vw'];
43770
- if (!pendoGlobal._.contains(validUnits, widthUnit) || !pendoGlobal._.contains(validUnits, heightUnit)) {
44139
+ if (!pendoGlobal._.contains(VALID_UNITS, widthUnit) || !pendoGlobal._.contains(VALID_UNITS, heightUnit)) {
43771
44140
  return;
43772
44141
  }
43773
44142
  const width = `${widthValue}${widthUnit}${widthIsImportant ? ' !important' : ''}`;
43774
44143
  const height = `${heightValue}${heightUnit}${heightIsImportant ? ' !important' : ''}`;
43775
- const container = document.getElementById('pendo-resource-center-container');
43776
- pluginAPI.util.addInlineStyles('pendo-voc-portal-styles', `#pendo-resource-center-container:has(iframe[src*="portal"][src*="mode=rc"]) {
43777
- width: ${width};
43778
- height: ${height};
43779
- ._pendo-step-container-size {
43780
- width: ${width};
43781
- height: ${height};
43782
- }
43783
- }`, container);
44144
+ const container = document.getElementById(CONTAINER_ID);
44145
+ presizePortalContainer(width, height);
44146
+ hideLoadingOverlay();
43784
44147
  resizePortalIframe();
43785
44148
  clampContainerToViewport(container);
43786
44149
  }
@@ -43803,6 +44166,18 @@ function VocPortal() {
43803
44166
  function teardown() {
43804
44167
  if (this.removeResizeEvent)
43805
44168
  this.removeResizeEvent();
44169
+ if (portalObserver) {
44170
+ portalObserver.disconnect();
44171
+ portalObserver = undefined;
44172
+ }
44173
+ if (containerObserver) {
44174
+ containerObserver.disconnect();
44175
+ containerObserver = undefined;
44176
+ }
44177
+ observedContainer = undefined;
44178
+ lastPresetCss = undefined;
44179
+ unmarkSizedElements();
44180
+ hideLoadingOverlay();
43806
44181
  stopListening();
43807
44182
  }
43808
44183
  }
@@ -44558,48 +44933,6 @@ function Feedback() {
44558
44933
  }
44559
44934
  }
44560
44935
 
44561
- // NOT A TRUE POLYFILL
44562
- // This really only replaces the location portion of the URL API.
44563
- //
44564
- // NOTE: This, for now, at least is identified as an instanceof HTMLAnchorElement
44565
-
44566
- function URLPolyfillFactory(doc) {
44567
- return function URL(str) {
44568
- var a = doc.createElement('a');
44569
- a.href = str;
44570
-
44571
- if (a.protocol === ':') {
44572
- throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
44573
- }
44574
-
44575
- if (a.href !== str && a.href !== encodeURI(str)) {
44576
- throw new Error('Uncaught TypeError: Failed to construct \'URL\': Invalid URL');
44577
- }
44578
-
44579
- if (!a.toString) {
44580
- a.toString = function() { return a.href; };
44581
- }
44582
-
44583
- if (a.origin == null) {
44584
- a.origin = a.protocol + '//' + a.hostname;
44585
- if (a.port !== '80' && a.port !== '443') {
44586
- a.origin += ':' + a.port;
44587
- }
44588
- }
44589
-
44590
- return a;
44591
- };
44592
- }
44593
-
44594
- var URL$1 = (function(global, factory) {
44595
- var nativeURL = global.URL;
44596
- if (typeof nativeURL !== 'function' || !/native/.test(nativeURL)) {
44597
- return factory(document);
44598
- }
44599
-
44600
- return nativeURL;
44601
- })(window, URLPolyfillFactory);
44602
-
44603
44936
  function record() { var __defProp = Object.defineProperty;
44604
44937
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
44605
44938
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);