{"version":3,"sources":["node_modules/@arcgis/core/chunks/persistableUrlUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { id as e } from \"../kernel.js\";\nimport { makeAbsolute as t, makeRelative as r, isAbsolute as s, normalize as o, isDataProtocol as n, splitPathExtension as l, changeDomain as a, hasSameOrigin as c, getAppUrl as i } from \"../core/urlUtils.js\";\nimport { normalizeArcGISOnlineOrgDomain as u } from \"../portal/support/urlUtils.js\";\nfunction p(e, s) {\n const o = s?.url?.path;\n if (e && o && (e = t(e, o, {\n preserveProtocolRelative: !0\n }), s.portalItem && s.readResourcePaths)) {\n const t = r(e, s.portalItem.itemUrl);\n null != t && v.test(t) && s.readResourcePaths.push(s.portalItem.resourceFromPath(t).path);\n }\n return (e = I(e, s?.portal)) && d.test(e) ? R(e) : e;\n}\nfunction m(e, l, a = y.YES) {\n if (null == (e = e && d.test(e) ? w(e) : e)) return e;\n !s(e) && l?.blockedRelativeUrls && l.blockedRelativeUrls.push(e);\n let c = t(e);\n if (l) {\n const t = l.verifyItemRelativeUrls?.rootPath || l.url?.path;\n if (t) {\n const s = I(t, l.portal),\n o = I(c, l.portal);\n c = r(o, s, s);\n null != c && c !== o && c !== e && l.verifyItemRelativeUrls && l.verifyItemRelativeUrls.writtenUrls.push(c);\n }\n }\n return c = x(c, l?.portal), s(c) && (c = o(c)), l?.resources && l?.portalItem && !s(c) && !n(c) && a === y.YES && l.resources.toKeep.push({\n resource: l.portalItem.resourceFromPath(c),\n compress: !1\n }), c;\n}\nfunction f(e, t, r) {\n return p(e, r);\n}\nfunction h(e, t, r, s) {\n const o = m(e, s);\n void 0 !== o && (t[r] = o);\n}\nconst d = /\\/items\\/([^/]+)\\/resources\\/(.*)/,\n v = /^\\.\\/resources\\//;\nfunction U(e) {\n const t = e?.match(d) ?? null;\n return t?.[1] ?? null;\n}\nfunction g(e) {\n const t = e?.match(d) ?? null;\n if (null == t) return null;\n const r = t[2],\n s = r.lastIndexOf(\"/\");\n if (-1 === s) {\n const {\n path: e,\n extension: t\n } = l(r);\n return {\n prefix: null,\n filename: e,\n extension: t\n };\n }\n const {\n path: o,\n extension: n\n } = l(r.slice(s + 1));\n return {\n prefix: r.slice(0, s),\n filename: o,\n extension: n\n };\n}\nfunction x(e, t) {\n return t && !t.isPortal && t.urlKey && t.customBaseUrl ? a(e, `${t.urlKey}.${t.customBaseUrl}`, t.portalHostname) : e;\n}\nfunction I(e, t) {\n if (!t || t.isPortal || !t.urlKey || !t.customBaseUrl) return e;\n const r = `${t.urlKey}.${t.customBaseUrl}`,\n s = i();\n return c(s, `${s.scheme}://${r}`) ? a(e, t.portalHostname, r) : a(e, r, t.portalHostname);\n}\nfunction R(t) {\n if (!t) return t || null;\n let r = t;\n return r && e && !e.findCredential(r) && (r = u(r), r = r.replace(/^https?:\\/\\/www\\.arcgis\\.com/, \"https://cdn.arcgis.com\"), r = r.replace(/^https?:\\/\\/devext\\.arcgis\\.com/, \"https://cdndev.arcgis.com\"), r = r.replace(/^https?:\\/\\/qaext\\.arcgis\\.com/, \"https://cdnqa.arcgis.com\")), r;\n}\nfunction w(t) {\n if (!t) return t || null;\n let r = t;\n return r = r.replace(/^https?:\\/\\/cdn\\.arcgis\\.com/, \"https://www.arcgis.com\"), r = r.replace(/^https?:\\/\\/cdndev\\.arcgis\\.com/, \"https://devext.arcgis.com\"), r = r.replace(/^https?:\\/\\/cdnqa\\.arcgis\\.com/, \"https://qaext.arcgis.com\"), r && e && !e.findCredential(r) && (r = u(r)), r;\n}\nvar y;\n!function (e) {\n e[e.YES = 0] = \"YES\", e[e.NO = 1] = \"NO\";\n}(y || (y = {}));\nconst P = Object.freeze(Object.defineProperty({\n __proto__: null,\n get MarkKeep() {\n return y;\n },\n ensureMainOnlineDomain: x,\n fromCDNUrl: w,\n fromJSON: p,\n itemIdFromResourceUrl: U,\n prefixAndFilenameFromResourceUrl: g,\n read: f,\n toCDNUrl: R,\n toJSON: m,\n write: h\n}, Symbol.toStringTag, {\n value: \"Module\"\n}));\nexport { y as M, R as a, P as b, w as c, x as e, p as f, U as i, g as p, f as r, m as t, h as w };"],"mappings":"+IAOA,SAASA,EAAEC,EAAGC,EAAG,CACf,IAAMC,EAAID,GAAG,KAAK,KAClB,GAAID,GAAKE,IAAMF,EAAIG,EAAEH,EAAGE,EAAG,CACzB,yBAA0B,EAC5B,CAAC,EAAGD,EAAE,YAAcA,EAAE,mBAAoB,CACxC,IAAMG,EAAIC,EAAEL,EAAGC,EAAE,WAAW,OAAO,EAC3BG,GAAR,MAAaE,EAAE,KAAKF,CAAC,GAAKH,EAAE,kBAAkB,KAAKA,EAAE,WAAW,iBAAiBG,CAAC,EAAE,IAAI,CAC1F,CACA,OAAQJ,EAAIO,EAAEP,EAAGC,GAAG,MAAM,IAAMO,EAAE,KAAKR,CAAC,EAAIS,EAAET,CAAC,EAAIA,CACrD,CACA,SAASU,EAAEV,EAAGW,EAAGC,EAAIC,EAAE,IAAK,CAC1B,IAAab,EAAIA,GAAKQ,EAAE,KAAKR,CAAC,EAAIc,EAAEd,CAAC,EAAIA,IAArC,KAAyC,OAAOA,EACpD,CAACe,EAAEf,CAAC,GAAKW,GAAG,qBAAuBA,EAAE,oBAAoB,KAAKX,CAAC,EAC/D,IAAIgB,EAAIb,EAAEH,CAAC,EACX,GAAIW,EAAG,CACL,IAAMP,EAAIO,EAAE,wBAAwB,UAAYA,EAAE,KAAK,KACvD,GAAIP,EAAG,CACL,IAAMH,EAAIM,EAAEH,EAAGO,EAAE,MAAM,EACrBT,EAAIK,EAAES,EAAGL,EAAE,MAAM,EACnBK,EAAIX,EAAEH,EAAGD,EAAGA,CAAC,EACLe,GAAR,MAAaA,IAAMd,GAAKc,IAAMhB,GAAKW,EAAE,wBAA0BA,EAAE,uBAAuB,YAAY,KAAKK,CAAC,CAC5G,CACF,CACA,OAAOA,EAAIC,EAAED,EAAGL,GAAG,MAAM,EAAGI,EAAEC,C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EACZ,SAAUf,EACV,sBAAuBwB,EACvB,iCAAkCC,EAClC,KAAMJ,EACN,SAAUX,EACV,OAAQC,EACR,MAAOY,CACT,EAAG,OAAO,YAAa,CACrB,MAAO,QACT,CAAC,CAAC","names":["p","e","s","o","_","t","G","v","I","d","R","m","l","a","y","w","Y","c","x","K","tt","f","r","h","U","g","Tt","n","At","C","F","i","P"],"x_google_ignoreList":[0]}