Custom Gis Application with Arcgis Javascript API with modern layouting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

7 lines
2.1 KiB

// All material copyright Esri, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.30/esri/copyright.txt for details.
//>>built
define(["exports","../core/Error","../core/handleUtils","../core/promiseUtils","./locale"],function(d,h,q,r,k){function l(a){for(const b of c.keys())m(a.pattern,b)&&c.delete(b)}async function t(a,b){const e=[];for(const n of f)if(m(n.pattern,a))try{return await n.fetchMessageBundle(a,b)}catch(u){e.push(u)}if(e.length)throw new h("intl:message-bundle-error",`Errors occurred while loading "${a}"`,{errors:e});throw new h("intl:no-message-bundle-loader",`No loader found for message bundle "${a}"`);}function m(a,
b){return"string"===typeof a?b.startsWith(a):a.test(b)}const p=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,g={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0},f=[],c=new Map;k.beforeLocaleChange(()=>{c.clear()});const v=new class{constructor(){this._numLoading=0;this._dfd=null}async waitForAll(){this._dfd&&
await this._dfd.promise}add(a){this._increase();a.then(()=>this._decrease(),()=>this._decrease());return this.waitForAll()}_increase(){this._numLoading++;this._dfd||(this._dfd=r.createResolver())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0);this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}},w={cache:c,loaders:f};d.fetchMessageBundle=async function(a){const b=k.getLocale();c.has(a)||c.set(a,t(a,b));(a=c.get(a))&&await v.add(a);return a};d.messageBundlesLocaleMap=
g;d.normalizeMessageBundleLocale=function(a){if(!p.test(a))return null;a=p.exec(a);if(null===a)return null;const [,b,e]=a;a=b+(e?"-"+e.toUpperCase():"");return a in g?a:b in g?b:null};d.registerMessageBundleLoader=function(a){f.includes(a)||(l(a),f.unshift(a));return q.makeHandle(()=>{const b=f.indexOf(a);-1<b&&(f.splice(b,1),l(a))})};d.test=w;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});