<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">define(["require", "exports", "esri/intl"], function (require, exports, intl_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.autoUpdateString = exports.autoUpdatedStrings = exports.handleT9N = void 0;
    async function handleT9N(pattern, base, bundleLocation) {
        (0, intl_1.registerMessageBundleLoader)((0, intl_1.createJSONLoader)({
            pattern,
            base,
            location: new URL("./", window.location.href)
        }));
        return await (0, intl_1.fetchMessageBundle)(bundleLocation);
    }
    exports.handleT9N = handleT9N;
    exports.autoUpdatedStrings = new Set();
    (0, intl_1.onLocaleChange)(() =&gt; {
        const bundleNames = Array.from(exports.autoUpdatedStrings, (item) =&gt; item.bundleName);
        const bundleMap = {};
        Promise.all(bundleNames.map((bundleName) =&gt; (0, intl_1.fetchMessageBundle)(bundleName).then((messages) =&gt; {
            bundleMap[bundleName] = messages;
        }))).then(() =&gt; {
            exports.autoUpdatedStrings.forEach(val =&gt; {
                const { obj, property, bundleName, key } = val;
                obj[property] = getPathValue(`${bundleName}.${key}`, bundleMap);
            });
        });
    });
    function autoUpdateString(obj, property, bundleName, key) {
        const autoUpdatedString = { obj, property, bundleName, key };
        (0, intl_1.fetchMessageBundle)(bundleName).then((messages) =&gt; {
            if (exports.autoUpdatedStrings.has(autoUpdatedString)) {
                obj[property] = messages[key];
            }
        });
        return {
            remove() {
                exports.autoUpdatedStrings.delete(autoUpdatedString);
            }
        };
    }
    exports.autoUpdateString = autoUpdateString;
    function getPathValue(str, obj) {
        return str.split('.').reduce((o, i) =&gt; o[i], obj);
    }
});
</pre></body></html>