@esri/hub-common 9.25.2 → 9.25.3
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.
- package/dist/es2017/content/compose.js +6 -7
- package/dist/es2017/content/compose.js.map +1 -1
- package/dist/es2017/search/utils.js +3 -0
- package/dist/es2017/search/utils.js.map +1 -1
- package/dist/esm/content/compose.js +6 -7
- package/dist/esm/content/compose.js.map +1 -1
- package/dist/esm/search/utils.js +3 -0
- package/dist/esm/search/utils.js.map +1 -1
- package/dist/node/content/compose.js +6 -7
- package/dist/node/content/compose.js.map +1 -1
- package/dist/node/search/utils.js +3 -0
- package/dist/node/search/utils.js.map +1 -1
- package/dist/umd/common.umd.js +10 -8
- package/dist/umd/common.umd.js.map +1 -1
- package/dist/umd/common.umd.min.js +1 -1
- package/dist/umd/common.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisHub=e.arcgisHub||{})}(this,function(n){"use strict";function F(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}function L(e,r,n){return n=n||"",Array.isArray(e)?e.map(t):!e||!M(e)||j(e)||G(e)||B(e)?r(e,n):Object.assign({},e,F(e,t));function t(e,t){return L(e,r,""+(n?n+"."+t:t))}}function _(e){return"string"==typeof e||e instanceof String}function j(e){return e instanceof Date}function B(e){return"function"==typeof e}function M(e){return"object"==typeof e}function G(e){return e instanceof RegExp}function q(e,t){return t.split(".").reduce(function(e,t){return e?e[t]:void 0},e)}function c(e){var t,r={};if(Array.isArray(e))r=e.map(c);else if("object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(null!=(t=e[n])&&"object"==typeof t?t instanceof Date?r[n]=new Date(t.getTime()):r[n]=c(t):r[n]=t);else r=e;return r}function H(e,r,n){return e?e.reduce(function(e,t){return e=q(t,r)===n?t:e},null):null}function V(e){return""+(e=void 0===e?"i":e)+Math.random().toString(36).substr(2,8)}function K(e,t){return null!=e&&(t=c(t)).push(e),t}function z(e){return(e=(e=e.toLowerCase()).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi," ")).replace(/(\-|\_|\.|\s)+(.)?/g,function(e,t,r){return r?r.toUpperCase():""}).replace(/(^|\/)([A-Z])/g,function(e,t,r){return e.toLowerCase()})}function Y(e,t,r){return r.indexOf(e)===t}function W(e,n,o){void 0===o&&(o=!0);e=c(e);return Object.keys(n).reduce(function(e,t){var r;return null!==n[t]&&void 0!==n[t]&&(r=c(n[t]),Array.isArray(r)?e[t]=r:e[t]=o&&"object"==typeof r?W(e[t]||{},r,o):r),e},e)}function J(e){return(e=Array.from(e))[0]=e[0].toUpperCase(),e.join("")}var Z=function(e){return null==e};function Q(e){return e.reduce(function(e,t){return e.concat(t)},[])}function $(e,t,r){void 0===r&&(r={});var t=t.split("."),n=e,o=t.length-1;t.forEach(function(e,t){n.hasOwnProperty(e)&&null!=n[e]?t===o&&("object"!=typeof n[e]||Array.isArray(n[e])?n[e]=r:n[e]=Object.assign(n[e],c(r))):n[e]=t===o?r:{},n=n[e]})}function a(e,t,r){e=q(e,t);return void 0!==e?e:r}function X(t){return Object.keys(t).forEach(function(e){t[e]&&"object"==typeof t[e]?X(t[e]):null==t[e]&&delete t[e]}),t}function ee(e,r,n){return L(e,function(e){if(!_(e))return e;var t=G(r)?r:new RegExp(r,"g");return e.replace(t,n)})}function te(t,r,e){return Array.isArray(e)&&e.length?(e.forEach(function(e){void 0!==q(t,e)&&$(r,e,q(t,e))}),r):t}function l(e,t,r){$(r,e=Array.isArray(e)?e.join("."):e,t)}function re(r,n){return Array.isArray(r)?r.reduce(function(e,t){return n(t)?e=t:ne(t)&&(t=re(t,n))&&(e=t),e},void 0):ne(r)?n(r)?r:Object.keys(r).reduce(function(e,t){return e=ne(r[t])&&(t=re(r[t],n))?t:e},void 0):void 0}function ne(e){var t=!1;return t=!e||!M(e)||j(e)||G(e)||B(e)?t:!0}function oe(e,n,o){void 0===o&&(o=5);return e.reduce(function(e,t){var r=e[e.length-1];return r&&r.length!==o||e.push(r=[]),r.push(t),e},[]).reduce(function(e,r){return e.then(function(t){var e=r.map(function(e){return n(e)});return Promise.all(e).then(function(e){return t.concat(e)})})},Promise.resolve([]))}function d(e,t){return-1!==e.indexOf(t)}var ie=function(e,t){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function ae(e,t){function r(){this.constructor=e}ie(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var se,I=function(){return(I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ue(e,t){var r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function f(e,a,s,u){return new(s=s||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,o)}i((u=u.apply(e,a||[])).next())})}function h(n,o){var i,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){u.label=t[1];break}if(6===t[0]&&u.label<s[1]){u.label=s[1],s=t;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(t);break}s[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],a=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function ce(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=a(r,"rootCause",r),(n=se.call(this,t)||this).operation=e,n.name="OperationError",n.rootCause=r,Object.setPrototypeOf(n,ce.prototype),n.stack=a(r,"stack",(new Error).stack),n}ae(ce,se=Error);function le(e){return function(r){return e.reduce(function(e,t){return e.then(t).catch(function(e){return"OperationError"===e.name?Promise.reject(e):(e="IPipeableFn did not reject with an OperationError \n Operation Stack: \n "+r.stack.toString(),(e=new pe("pipeline execution error",e)).operationStack=r.stack.serialize(),Promise.reject(e))})},Promise.resolve(r))}}var pe=ce;function o(r,n){return void 0===n&&(n={}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,e).catch(function(e){return n})}}function de(e){var r=(new Date).getTime();return Array(e).fill(0).reduce(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),e=""+e+t.toString(16)},"")}function fe(e){"{"===e[0]&&(e=e.substring(1,e.length-1));return/^(\{){0,1}[0-9a-fA-F]{8}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{12}(\}){0,1}$/gi.test(e)}function he(e){return"string"==typeof e?e.trim().toLowerCase().replace(/ +/g,"-").replace(/[^\w-]/g,"").replace(/-+/g,"-"):e}n.Level=void 0,(S=n.Level||(n.Level={}))[S.all=0]="all",S[S.debug=1]="debug",S[S.info=2]="info",S[S.warn=3]="warn",S[S.error=4]="error",S[S.off=5]="off";e.setLogLevel=function(e){this.logLevel=e},e.log=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.log.apply(console,m([e],t))},e.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.debug.apply(console,m([e],t))},e.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.info)&&console.info.apply(console,m([e],t))},e.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.warn)&&console.warn.apply(console,m([e],t))},e.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.error)&&console.error.apply(console,m([e],t))},e.isLevelPermitted=function(e){return this.logLevel<=e},e.logLevel=n.Level.off;var i=e;function e(){}function me(e){return e.capabilities.includes("updateitemcontrol")}function ge(t){return Object.keys(t).some(function(e){e=t[e];if(!e)return!1;switch((e=e&&e.toParam?e.toParam():e).constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}})}function be(o){var i={};return Object.keys(o).forEach(function(e){var t=o[e];if((t=t&&t.toParam?t.toParam():t)||0===t||"boolean"==typeof t||"string"==typeof t){switch(t.constructor.name){case"Array":var r=null==(r=null==(r=t[0])?void 0:r.constructor)?void 0:r.name,n="Array"===r?t:"Object"===r?JSON.stringify(t):t.join(",");break;case"Object":n=JSON.stringify(t);break;case"Date":n=t.valueOf();break;case"Function":n=null;break;case"Boolean":n=t+"";break;default:n=t}(n||0===n||"string"==typeof n||Array.isArray(n))&&(i[e]=n)}}),i}function ye(e){var t=be(e);return Object.keys(t).map(function(e){return function t(r,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(function(e){return t(r,e)}).join("&"):encodeURIComponent(r)+"="+encodeURIComponent(e)}(e,t[e])}).join("&")}var p=function(e,t,r,n,o){e=e||"UNKNOWN_ERROR",t=t||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message="UNKNOWN_ERROR_CODE"===t?e:t+": "+e,this.originalMessage=e,this.code=t,this.response=r,this.url=n,this.options=o};function t(e){console&&console.warn&&console.warn.apply(console,[e])}p.prototype=Object.create(Error.prototype),p.prototype.constructor=p;var ve,we="@esri/arcgis-rest-js",Ae={httpMethod:"POST",params:{f:"json"}},g=(ae(De,ve=p),De.prototype.retry=function(e,n){function o(t,r){e(i.url,i.options).then(function(e){e=I(I({},i.options),{authentication:e});return a+=1,u(i.url,e)}).then(function(e){t(e)}).catch(function(e){"ArcGISAuthError"===e.name&&a<n?o(t,r):"ArcGISAuthError"===e.name&&n<=a?r(i):r(e)})}var i=this,a=(void 0===n&&(n=3),0);return new Promise(function(e,t){o(e,t)})},De);function De(e,t,r,n,o){r=ve.call(this,e=void 0===e?"AUTHENTICATION_ERROR":e,t=void 0===t?"AUTHENTICATION_ERROR_CODE":t,r,n,o)||this;return r.name="ArcGISAuthError",r.message="AUTHENTICATION_ERROR_CODE"===t?e:t+": "+e,r}function u(a,e){void 0===e&&(e={params:{f:"json"}});var s=I(I(I({httpMethod:"POST"},Ae),e),{params:I(I({},Ae.params),e.params),headers:I(I({},Ae.headers),e.headers)}),e=[],t=[];if(s.fetch||"undefined"==typeof fetch?(e.push("`fetch`"),t.push("`node-fetch`")):s.fetch=fetch.bind(Function("return this")()),"undefined"==typeof Promise&&(e.push("`Promise`"),t.push("`es6-promise`")),"undefined"==typeof FormData&&(e.push("`FormData`"),t.push("`isomorphic-form-data`")),!s.fetch||"undefined"==typeof Promise||"undefined"==typeof FormData)throw new Error("`arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing "+e.join(", ")+". We recommend installing the "+t.join(", ")+" modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");var e=s.httpMethod,u=s.authentication,n=s.rawResponse,c=I({f:"json"},s.params),r=null,l={method:e,credentials:s.credentials||"same-origin"};return s.headers&&s.headers["X-Esri-Auth-Client-Id"]&&-1<a.indexOf("/oauth2/platformSelf")&&(l.credentials="include"),(u?u.getToken(a,{fetch:s.fetch}).catch(function(e){return e.url=a,e.options=s,r=e,Promise.resolve("")}):Promise.resolve("")).then(function(e){e.length&&(c.token=e),u&&u.getDomainCredentials&&(l.credentials=u.getDomainCredentials(a));var t,r,n,o,i={},e=("GET"===l.method&&(c.token&&s.hideToken&&"undefined"==typeof window&&(i["X-Esri-Authorization"]="Bearer "+c.token,delete c.token),r=""===ye(c)?a:a+"?"+ye(c),s.maxUrlLength&&r.length>s.maxUrlLength||c.token&&s.hideToken?(l.method="POST",e.length&&s.hideToken&&(c.token=e,delete i["X-Esri-Authorization"])):a=r),new RegExp("/items/.+/updateResources").test(a));return"POST"===l.method&&(l.body=(r=e,r=ge(t=c)||r,o=be(t),r?(n=new FormData,Object.keys(o).forEach(function(e){var t;"undefined"!=typeof Blob&&o[e]instanceof Blob?(t=o.fileName||o[e].name||e,n.append(e,o[e],t)):n.append(e,o[e])}),n):ye(t))),l.headers=I(I({},i),s.headers),"undefined"!=typeof window||l.headers.referer||(l.headers.referer=we),ge(c)||e||(l.headers["Content-Type"]="application/x-www-form-urlencoded"),s.fetch(a,l)}).then(function(e){var t,r;if(!e.ok)throw t=e.status,r=e.statusText,new p(r,"HTTP "+t,e,a,s);if(n)return e;switch(c.f){case"json":case"geojson":return e.json();case"html":case"text":return e.text();default:return e.blob()}}).then(function(e){var t;return"json"!==c.f&&"geojson"!==c.f||n?e:(e=function(t,e,r,n){if(400<=t.code)throw i=t.message,a=t.code,new p(i,a,t,e,r);if(t.error){var o=t.error,i=o.message,a=o.code,o=o.messageCode,s=o||a||"UNKNOWN_ERROR_CODE";if(498===a||499===a||"GWM_0003"===o||400===a&&"Unable to generate token."===i)throw n||new g(i,s,t,e,r);throw new p(i,s,t,e,r)}if("failed"!==t.status&&"failure"!==t.status)return t;i=void 0,a="UNKNOWN_ERROR_CODE";try{i=JSON.parse(t.statusMessage).message,a=JSON.parse(t.statusMessage).code}catch(e){i=t.statusMessage||t.message}throw new p(i,a,t,e,r)}(e,a,s,r),r&&(t=a.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0],s.authentication.federatedServers[t]={token:[],expires:new Date(Date.now()+864e5)},r=null),e)})}function Se(r,e,t){var n=I(I({params:{}},t),r);return n.params=e.reduce(function(e,t){return!r[t]&&"boolean"!=typeof r[t]||(e[t]=r[t]),e},n.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce(function(e,t){return n[t]&&(e[t]=n[t]),e},{})}function s(e){return"string"==typeof e&&"/"===(e=e.trim())[e.length-1]?e.slice(0,-1):e}function xe(e){return e.replace(/^#/,"").split("&").reduce(function(e,t){r=(t=(t=t).split("="))[0],t=t[1];var r={key:decodeURIComponent(r),value:decodeURIComponent(t)};return e[r.key]=r.value,e},{})}function Ee(e,t){return t.rawResponse=!1,u(e,t).then(function(e){var t={token:e.access_token,username:e.username,expires:new Date(Date.now()+(1e3*e.expires_in-1e3)),ssl:!0===e.ssl};return e.refresh_token&&(t.refreshToken=e.refresh_token),t})}function ke(e,t){return"undefined"!=typeof window&&window.location&&window.location.host?t.params.referer=window.location.host:t.params.referer=we,u(e,t)}var Ce=/^https?:\/\/(\S+)\.arcgis\.com.+/;function Te(e){return Ce.test(e)}function qe(e){if(!Ce.test(e))return null;e=e.match(Ce)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}function Ie(e,t){t=s(function(e){if(!Ce.test(e))return e;switch(qe(e)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(t)).replace(/https?:\/\//,""),e=s(e).replace(/https?:\/\//,"");return new RegExp(e,"i").test(t)}Object.defineProperty(b.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),b.beginOAuth2=function(e,t){void 0===t&&(t=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r,n,o=I({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),i=o.portal,a=o.provider,s=o.clientId,u=o.expiration,c=o.redirectUri,l=o.popup,p=o.popupWindowFeatures,d=o.state,f=o.locale,o=o.params,a="arcgis"===a?i+"/oauth2/authorize?client_id="+s+"&response_type=token&expiration="+(e.duration||u)+"&redirect_uri="+encodeURIComponent(c)+"&state="+d+"&locale="+f:i+"/oauth2/social/authorize?client_id="+s+"&socialLoginProviderName="+a+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||u)+"&redirect_uri="+encodeURIComponent(c)+"&state="+d+"&locale="+f;{if(o&&(a=a+"&"+ye(o)),l)return(n={promise:null,resolve:null,reject:null}).promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),r=n,t["__ESRI_REST_AUTH_HANDLER_"+s]=function(e,t){if(e)return e=JSON.parse(e),void r.reject(new g(e.errorMessage,e.error));t&&(e=JSON.parse(t),r.resolve(new b({clientId:s,portal:i,ssl:e.ssl,token:e.token,tokenExpires:new Date(e.expires),username:e.username})))},t.open(a,"oauth-window",p),r.promise;t.location.href=a}},b.completeOAuth2=function(e,o){void 0===o&&(o=window);var e=I({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),i=e.portal,a=e.clientId,s=e.popup;function t(e,t){try{var r=void 0,n="__ESRI_REST_AUTH_HANDLER_"+a;if(s&&(o.opener?o.opener.parent&&o.opener.parent[n]?r=o.opener.parent[n]:o.opener&&o.opener[n]&&(r=o.opener[n]):o!==o.parent&&o.parent&&o.parent[n]&&(r=o.parent[n]),r))return r(e?JSON.stringify(e):void 0,JSON.stringify(t)),void o.close()}catch(e){throw new g('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new g(e.errorMessage,e.error);return new b({clientId:a,portal:i,ssl:t.ssl,token:t.token,tokenExpires:t.expires,username:t.username})}e=xe(o.location.hash);if(!e.access_token)return r=void 0,n="Unknown error",e.error&&(r=e.error,n=e.error_description),t({error:r,errorMessage:n});var r=e.access_token,n=new Date(Date.now()+1e3*parseInt(e.expires_in,10)-6e4),u=e.username;return t(void 0,{token:r,expires:n,ssl:"true"===e.ssl,username:u})},b.fromParent=function(e,n){var o;return!n&&window&&(n=window),new Promise(function(t,r){o=function(e){if(e.source===n.parent&&e.data)try{return t(b.parentMessageHandler(e))}catch(e){return r(e)}},n.addEventListener("message",o,!1),n.parent.postMessage({type:"arcgis:auth:requestCredential"},e)}).then(function(e){return n.removeEventListener("message",o,!1),e})},b.authorize=function(e,t){e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r=I({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),n=r.portal,o=r.clientId,i=r.expiration,r=r.redirectUri;t.writeHead(301,{Location:n+"/oauth2/authorize?client_id="+o+"&expiration="+(e.duration||i)+"&response_type=code&redirect_uri="+encodeURIComponent(r)}),t.end()},b.exchangeAuthorizationCode=function(e,t){var e=I({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),r=e.portal,n=e.clientId,o=e.redirectUri,i=e.refreshTokenTTL;return Ee(r+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:n,redirect_uri:o,code:t}}).then(function(e){return new b({clientId:n,portal:r,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:i,refreshTokenExpires:new Date(Date.now()+60*(i-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})})},b.deserialize=function(e){e=JSON.parse(e);return new b({clientId:e.clientId,refreshToken:e.refreshToken,refreshTokenExpires:new Date(e.refreshTokenExpires),username:e.username,password:e.password,token:e.token,tokenExpires:new Date(e.tokenExpires),portal:e.portal,ssl:e.ssl,tokenDuration:e.tokenDuration,redirectUri:e.redirectUri,refreshTokenTTL:e.refreshTokenTTL})},b.fromCredential=function(e){var t=void 0===e.ssl||e.ssl,r=e.expires||Date.now()+72e5;return new b({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:t,token:e.token,username:e.userId,tokenExpires:new Date(r)})},b.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return b.fromCredential(e.data.credential);var t;throw"arcgis:auth:error"===e.data.type?((t=new Error(e.data.error.message)).name=e.data.error.name,t):new Error("Unknown message type.")},b.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},b.prototype.getUser=function(e){var t,r=this;return this._pendingUserRequest||(this._user?Promise.resolve(this._user):(t=this.portal+"/community/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1}),this._pendingUserRequest=u(t,e).then(function(e){return r._user=e,r._pendingUserRequest=null,e}),this._pendingUserRequest))},b.prototype.getPortal=function(e){var t,r=this;return this._pendingPortalRequest||(this._portalInfo?Promise.resolve(this._portalInfo):(t=this.portal+"/portals/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1}),this._pendingPortalRequest=u(t,e).then(function(e){return r._portalInfo=e,r._pendingPortalRequest=null,e}),this._pendingPortalRequest))},b.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then(function(e){return e.username})},b.prototype.getToken=function(e,t){return r=this.portal,n=e,o=Te(r),i=Te(n),r=qe(r),n=qe(n),o&&i&&r===n||new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t);var r,n,o,i},b.prototype.validateAppAccess=function(r){return this.getToken(this.portal).then(function(e){return u((t=void 0===t?"https://www.arcgis.com/sharing/rest":t)+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:r,token:e}});var t})},b.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},b.prototype.serialize=function(){return JSON.stringify(this)},b.prototype.enablePostMessageAuth=function(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)},b.prototype.disablePostMessageAuth=function(e){(e=!e&&window?window:e).removeEventListener("message",this._hostHandler,!1)},b.prototype.refreshSession=function(e){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new g("Unable to refresh token."))},b.prototype.getServerRootUrl=function(e){var e=s(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/),t=(e[0],e[1]),e=e[2].split("/"),r=e[0],e=e.slice(1);return""+t+r.toLowerCase()+"/"+e.join("/")},b.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some(function(e){return t.startsWith(e)})?"include":"same-origin"},b.prototype.createPostMessageHandler=function(o){var i=this;return function(e){var t=-1<o.indexOf(e.origin),r="arcgis:auth:requestCredential"===e.data.type,n=i.tokenExpires.getTime()>Date.now();t&&r&&(t={},t=n?((r=i.toCredential()).server=r.server.replace("/sharing/rest",""),{type:"arcgis:auth:credential",credential:r}):{type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}},e.source.postMessage(t,e.origin))}},b.prototype.getTokenForServer=function(t,r){var n=this,o=this.getServerRootUrl(t),e=this.federatedServers[o];return e&&e.expires&&e.expires.getTime()>Date.now()?Promise.resolve(e.token):this._pendingTokenRequests[o]||(this._pendingTokenRequests[o]=this.fetchAuthorizedDomains().then(function(){return u(o+"/rest/info",{credentials:n.getDomainCredentials(t)}).then(function(e){if(e.owningSystemUrl){if(Ie(e.owningSystemUrl,n.portal))return u(e.owningSystemUrl+"/sharing/rest/info",r);throw new g(t+" is not federated with "+n.portal+".","NOT_FEDERATED")}if(e.authInfo&&void 0!==n.federatedServers[o])return Promise.resolve({authInfo:e.authInfo});throw new g(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")}).then(function(e){return e.authInfo.tokenServicesUrl}).then(function(e){return n.token&&n.tokenExpires.getTime()>Date.now()?ke(e,{params:{token:n.token,serverUrl:t,expiration:n.tokenDuration,client:"referer"}}):ke(e,{params:{username:n.username,password:n.password,expiration:n.tokenDuration,client:"referer"}}).then(function(e){return n._token=e.token,n._tokenExpires=new Date(e.expires),e})}).then(function(e){return n.federatedServers[o]={expires:new Date(e.expires),token:e.token},delete n._pendingTokenRequests[o],e.token})}),this._pendingTokenRequests[o])},b.prototype.getFreshToken=function(e){var t=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(e).then(function(e){return t._pendingTokenRequests[t.portal]=null,e.token})),this._pendingTokenRequests[this.portal])},b.prototype.refreshWithUsernameAndPassword=function(e){var t=this,e=I({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},e);return ke(this.portal+"/generateToken",e).then(function(e){return t._token=e.token,t._tokenExpires=new Date(e.expires),t})},b.prototype.refreshWithRefreshToken=function(e){var t=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(e);e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return Ee(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t})},b.prototype.refreshRefreshToken=function(e){var t=this,e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return Ee(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t._refreshToken=e.refreshToken,t._refreshTokenExpires=new Date(Date.now()+60*(t.refreshTokenTTL-1)*1e3),t})},b.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then(function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter(function(e){return!e.startsWith("http://")}).map(function(e){return e.startsWith("https://")?e:"https://"+e})),t})};var Oe=b;function b(e){var t;this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.username=e.username,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?s(e.portal):"https://www.arcgis.com/sharing/rest",this.ssl=e.ssl,this.provider=e.provider||"arcgis",this.tokenDuration=e.tokenDuration||20160,this.redirectUri=e.redirectUri,this.refreshTokenTTL=e.refreshTokenTTL||20160,this.server=e.server,this.federatedServers={},this.trustedDomains=[],e.server&&(t=this.getServerRootUrl(e.server),this.federatedServers[t]={token:e.token,expires:e.tokenExpires}),this._pendingTokenRequests={}}function Pe(e){e=e.privileges;return d(void 0===e?[]:e,"portal:user:createItem")}function Ue(e,t){var r,n=!1,o=e.itemControl,i=e.owner,a=e.orgId,s=t.roleId,u=t.role,c=t.username,l=t.groups,p=t.orgId,o=d(["admin","update"],o)||!!i&&i===c||!!(!!a&&a===p)&&!s&&"org_admin"===u,i=Pe(t);return i&&o?n=!0:i&&(r=m(q(e,"groupIds")||[],[q(e,"properties.collaborationGroupId")]),n=l.some(function(e){return me(e)&&d(r,e.id)})),n}var Ne=["portal:user:createGroup","portal:user:createItem","portal:user:shareToGroup","portal:user:viewOrgGroups","portal:user:viewOrgItems"];function Re(e){var r,t=e.host,n=e.path,e=e.query,t=t.endsWith("/")?t:t+"/",n=new URL(n,t);return n.search=(void 0===(r=e)&&(r={}),t=Object.keys(r).filter(function(e){return void 0!==r[e]}).reduce(function(e,t){return e[t]=r[t],e},{}),new URLSearchParams(t).toString()),n.toString()}function y(e){return(e=void 0===e?{}:e).portal?s(e.portal):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function Fe(e){var t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}function Le(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function _e(t){return Le(t).then(function(e){e=t.folderId?y(t)+"/content/users/"+e+"/"+t.folderId+"/items/"+t.item.id+"/update":y(t)+"/content/users/"+e+"/items/"+t.item.id+"/update";return t.params=I(I({},t.params),Fe(t.item)),u(e,t)})}function je(e){var r,e=I({folderId:null},e);return(r=e).multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):Le(r).then(function(e){var e=y(r)+"/content/users/"+e,t=e+"/addItem",e=(r.folderId&&(t=e+"/"+r.folderId+"/addItem"),r.params=I(I({},r.params),Fe(r.item)),Se(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:I({},r.params)}));return u(t,e)})}var Be=/[\x00-\x1F\x7F-\x9F\xA0]/g;function Me(e,t){return u(Ge(e,t),I({httpMethod:"GET"},t))}var Ge=function(e,t){return("string"==typeof t?t:y(t))+"/content/items/"+e};function He(e,t){e=Ge(e,t)+"/data",t=I({httpMethod:"GET",params:{}},t);return t.file&&(t.params.f=null),u(e,t).catch(function(e){var t=RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i);if(!t.test(e.message))throw e})}function Ve(e){var t=Ge(e.id,e)+"/relatedItems",r=I({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?r.params.relationshipType=e.relationshipType:r.params.relationshipTypes=e.relationshipType,delete r.direction,delete r.relationshipType,u(t,r)}function Ke(e,t){var r,n,o=t||{},i=o.fileName,i=void 0===i?"iteminfo.xml":i,o=o.readAs,o=void 0===o?"text":o,t=I({httpMethod:"GET"},t);return i="/info/"+i,r=o,o=""+Ge(o=e,e=t)+i,i=I({params:{}},e),n=i.rawResponse,i.rawResponse=!0,i.params.f=null,u(o,i).then(function(e){return n?e:"json"!==r?e[r]():e.text().then(function(e){return JSON.parse(e.replace(Be,""))})})}function ze(t){return Le(t).then(function(e){return u(y(t)+"/content/users/"+e+"/items/"+t.id+"/unprotect",t)})}function Ye(e){return t=e.groupId,u(y(e=e)+"/community/groups/"+t,I({httpMethod:"GET"},e)).then(function(e){return e.userMembership.memberType}).catch(function(){return"none"});var t}function We(t){return Le(t).then(function(e){return u(y(t)+"/content/users/"+e+"/items/"+t.id+"/delete",t)})}r.prototype.match=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.termStack=this.termStack.concat(e),this},r.prototype.in=function(e){return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=e+":"),this.commit()):(t("`in("+(e?'"'+e+'"':"")+")`"+" was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified."),this)},r.prototype.startGroup=function(){return this.commit(),0<this.openGroups&&(this.q+=" "),this.openGroups++,this.q+="(",this},r.prototype.endGroup=function(){return this.openGroups<=0?t("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."):(this.commit(),this.openGroups--,this.q+=")"),this},r.prototype.and=function(){return this.addModifier("and")},r.prototype.or=function(){return this.addModifier("or")},r.prototype.not=function(){return this.addModifier("not")},r.prototype.from=function(e){return this.hasTerms?t('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[0]=e,this},r.prototype.to=function(e){return this.hasTerms?t('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[1]=e,this},r.prototype.boost=function(e){return this.commit(),this.q+="^"+e,this},r.prototype.toParam=function(){return this.commit(),this.cleanup(),this.q},r.prototype.clone=function(){return this.commit(),this.cleanup(),new r(this.q+"")},r.prototype.addModifier=function(e){return this.currentModifer?(t("You have called `"+this.currentModifer+"()` after `"+e+"()`. Your current query was not modified."),this):(this.commit(),""===this.q&&"not"!==e?t("You have called `"+e+"()` without calling another method to modify your query first. Try calling `match()` first."):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=e.toUpperCase()+" "),this)},r.prototype.needsQuotes=function(e){return/\s|:/g.test(e)},r.prototype.formatTerm=function(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.needsQuotes(e)?'"'+e+'"':e},r.prototype.commit=function(){var t=this;return this.currentModifer=void 0,this.hasRange&&(this.q+="["+this.formatTerm(this.rangeStack[0])+" TO "+this.formatTerm(this.rangeStack[1])+"]",this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(function(e){return t.formatTerm(e)}).join(" "),this.termStack=[]),this},Object.defineProperty(r.prototype,"hasTerms",{get:function(){return 0<this.termStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasRange",{get:function(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]},enumerable:!1,configurable:!0}),r.prototype.cleanup=function(){if(0<this.openGroups)for(t("Automatically closing "+this.openGroups+" group(s). You can use `endGroup(...)` to remove this warning.");0<this.openGroups;)this.q+=")",this.openGroups--;var e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&t("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")};var Je=r;function r(e){void 0===e&&(e=""),this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}function Ze(r,n){var e,t="string"==typeof r||r instanceof Je?{httpMethod:"GET",params:{q:r}}:Se(r,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});switch(n){case"item":e="/search";break;case"group":e="/community/groups";break;case"groupContent":if("string"==typeof r||r instanceof Je||!r.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));e="/content/groups/"+r.groupId+"/search";break;default:e="/portals/self/users/search"}return u(y(t)+e,t).then(function(t){return t.nextStart&&-1!==t.nextStart&&(t.nextPage=function(){var e;return"string"==typeof r||r instanceof Je?e={q:r,start:t.nextStart}:(e=r).start=t.nextStart,Ze(e,n)}),t})}function Qe(e){return Ze(e,"item")}function $e(e,t){if(0===e.length)return[];for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Xe(e){var t=e.id,r=y(e)+"/community/groups/"+t+"/addUsers",t=Object.assign({},e,{admins:void 0,users:void 0}),e=m(et("users",e.users,t),et("admins",e.admins,t)).map(function(e){return u(r,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(tt)}function et(o,e,i){return!e||e.length<1?[]:$e(e,25).map(function(e){return t=o,e=e,r=i,Object.assign({},r,((n={})[t]=e,n.params=I(I({},r.params),((r={})[t]=e,r)),n));var t,r,n})}function tt(e){var t=e.filter(function(e){return e.notAdded}).reduce(function(e,t){return e.concat(t.notAdded)},[]),e=e.filter(function(e){return e.errors}).reduce(function(e,t){return e.concat(t.errors)},[]),t={notAdded:t};return 0<e.length&&(t.errors=e),t}function rt(t){var e=t.id,r=t.users,n=y(t)+"/community/groups/"+e+"/removeUsers",e=$e(r,25).map(function(e){return e=I(I({},t),{users:e,params:{users:e}}),u(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(function(e){function t(r){return e.filter(function(e){return e[r]}).reduce(function(e,t){return e.concat(t[r])},[])}var r=t("errors"),n={notRemoved:t("notRemoved")};return r.length?I(I({},n),{errors:r}):n})}function nt(e){var r,t=e.id,n=y(e)+"/community/groups/"+t+"/invite",t=$e((r=e).users,25).map(function(e){var t=r;return(t=Object.assign({},t)).params=I(I({},t.params),{users:e,role:t.role,expiration:t.expiration}),t}).map(function(e){return u(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(t).then(ot)}function ot(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function it(e){return u(y(e)+"/community/groups/"+e.id+"/unprotect",e)}function at(e){return u(y(e)+"/community/groups/"+e.id+"/delete",I({},e))}function st(e){var t=y(e)+"/community/groups/"+e.id+"/updateUsers",r={authentication:e.authentication,params:{}};return"admin"===e.newMemberType?r.params.admins=e.users:r.params.users=e.users,u(t,r)}function ut(e){var n,t=y(e)+"/portals/self/createNotification",e=$e((n=e).users,n.batchSize||25).map(function(e){return e=e,t=n,(r=Object.assign({},t)).params=I(I({},r.params),{users:e,subject:t.subject,message:t.message,notificationChannelType:r.notificationChannelType}),r;var t,r}).map(function(e){return u(t,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(ct)}function ct(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function lt(e){var t,r,n={httpMethod:"GET"};return"string"==typeof e?r="https://www.arcgis.com/sharing/rest/community/users/"+e:(t=e.username||e.authentication.username,r=y(e)+"/community/users/"+encodeURIComponent(t),n=I(I({},e),n)),u(r,n)}function pt(t){return Qe({q:"id: "+t.id+" AND group: "+t.groupId,start:1,num:10,sortField:"title",authentication:t.authentication,httpMethod:"POST"}).then(function(e){if(0<e.total)return e.results.some(function(e){return e.id===t.id})})}function dt(l){return pt(l).then(function(e){if(e)return{itemId:l.id,shortcut:!0,notSharedWith:[]};var s,u,e=l.authentication.username,t=l.owner,c=l.confirmItemControl,t=t||e;return t!==e?(u=s=!1,Promise.all([lt({username:e,authentication:l.authentication}),lt({username:t,authentication:l.authentication}),Ye(l)]).then(function(e){var t=e[0],r=e[1],e=e[2],n=(s="org_admin"===t.role&&!t.roleId,u=t.orgId!==r.orgId,!!c),o=s,i=l,a=[];if(i.groupId!==t.favGroupId)if(n){if(!o)throw Error("This item can not be shared to shared editing group "+i.groupId+" by "+t.username+" as they not the item owner or org admin.");a.push(ht(t,t,!1,"Error adding "+t.username+" as member to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i),ht(t,r,!0,"none"===e?"Error adding user "+r.username+" to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.":"Error promoting user "+r.username+" to admin in edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i))}else if(o)a.push(ht(t,t,!1,"Error adding "+t.username+" as member to view group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i));else if("none"===e)throw new Error("This item can not be shared by "+t.username+" as they are not a member of the specified group "+i.groupId+".");return a}).then(function(e){var t=e[0],r=(void 0===t?{promise:Promise.resolve({notAdded:[]}),revert:function(e){return Promise.resolve(e)}}:t).revert;return Promise.all(e.map(function(e){return e.promise})).then(function(){return ft(l,s,u)}).then(function(e){return r(e)})})):ft(l)}).then(function(e){if(e.notSharedWith.length)throw Error("Item "+l.id+" could not be shared to group "+l.groupId+".");return e})}function ft(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.authentication.username,o=e.owner||n,i=y(e)+"/content/items/"+e.id+"/share";return(o===n||t&&!r)&&(i=y(e)+"/content/users/"+o+"/items/"+e.id+"/share"),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},u(i,e)}function ht(e,t,r,n,o){var i,a=t.groups||[],s=a.find(function(e){return e.id===o.groupId});if(e.orgId!==t.orgId)throw Error("User "+t.username+" is not a member of the same org as "+e.username+". Consequently they can not be added added to group "+o.groupId+" nor can item "+o.id+" be shared to the group.");if(!s&&511<a.length)throw Error("User "+t.username+" already has 512 groups, and can not be added to group "+o.groupId+". Consequently item "+o.id+" can not be shared to the group.");return a=s?r&&"member"===s.userMembership.memberType?(i=st({id:o.groupId,users:[t.username],newMemberType:"admin",authentication:o.authentication}).then(function(e){e=e.results.reduce(function(e,t){return t.success||e.push(t.username),e},[]);return Promise.resolve({notAdded:e})}).catch(function(){return{notAdded:[t.username]}}),function(e){return st({id:o.groupId,users:[t.username],newMemberType:"member",authentication:o.authentication}).then(function(){return e}).catch(function(){return e})}):(i=Promise.resolve({notAdded:[]}),function(e){return Promise.resolve(e)}):(i=Xe(((e={id:o.groupId})[r?"admins":"users"]=[t.username],e.authentication=o.authentication,e)).then(function(e){if(e.errors&&e.errors.length)throw e.errors[0];return e}).catch(function(){return{notAdded:[t.username]}}),function(e){return rt({id:o.groupId,users:[t.username],authentication:o.authentication}).then(function(){return e})}),{promise:i.then(function(e){if(e.notAdded.length)throw new Error(n);return e}),revert:a}}function mt(a){return pt(a).then(function(e){if(!e)return Promise.resolve({itemId:a.id,shortcut:!0,notUnsharedFrom:[]});var o=a.authentication.username,i=a.owner;return Promise.all([Ye(a),lt({username:o,authentication:a.authentication})]).then(function(e){var t=e[0],e=e[1],e="org_admin"===e.role&&!e.roleId;if(!((i||o)===o)&&!e&&["admin","owner"].indexOf(t)<0)throw Error("This item can not be unshared from group "+a.groupId+" by "+o+" as they not the item owner, an org admin, group admin or group owner.");var e=a,t=e.authentication.username,r=e.owner||t,n=y(e)+"/content/items/"+e.id+"/unshare";return r===t&&(n=y(e)+"/content/users/"+r+"/items/"+e.id+"/unshare"),e.params={groups:e.groupId},u(n,e)}).then(function(e){if(e.notUnsharedFrom.length)throw Error("Item "+a.id+" could not be unshared to group "+a.groupId);return e})})}function gt(e){var t=null;return t=t||"self",t=y(e)+"/portals/"+t,e=I({httpMethod:"GET"},e),u(t,e)}function bt(e){if("string"==typeof e)return e.replace(/\/sharing\/rest\/?$/,"");if("object"==typeof e){var t=e.portalSelf||e,r=t.portalHostname,n=t.urlKey,o=t.customBaseUrl;if(r||n&&o)return t.isPortal?"https://"+t.portalHostname:"https://"+t.urlKey+"."+t.customBaseUrl}return bt(y(e))}var yt={devext:"https://d1011m9qpnz5mw.cloudfront.net",qaext:"https://dyq9ux9ryu4qj.cloudfront.net",www:"https://d1iq7pbacwn5rb.cloudfront.net"};function vt(e){return e.isPortal?bt(e)+"/apps/sites":(e=e.portalHostname.split(".")[0],(yt[e]||yt.www)+"/opendata-ui/assets")}function v(e){return bt(e)+"/sharing/rest"}function wt(e){return e=(e=e.toLowerCase()).includes("//")?e.split("//")[1]:e}function At(e){if(!e)return[];e=e.replace(/^http(s?):\/\//,"");return["http://"+e,"https://"+e]}function Dt(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function St(e){if(e.isPortal)throw new Error("Hub Url is not available in ArcGIS Enterprise");return Dt(e.portalHostname)}function xt(e,t){return bt(t)+"/home/item.html?id="+e}var Et=function(e,t,r){var n=e.id,e=e.access,t=v(t)+"/content/items/"+n,n=new URLSearchParams({f:"json"});return"public"!==e&&r&&n.append("token",r),t+"?"+n.toString()},kt=function(e,t,r){t=Et(e,t,r),r="\\/"+e.id+"\\?f=json",r=new RegExp(r);return t&&t.replace(r,"/"+e.id+"/data").replace(/\&token/,"?token")};function Ct(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function Tt(e){var t=e;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://qaext.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://devext.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://www.arcgis.com"),t}function qt(e){return It.test(e)}var It=/\/(map|feature)server/i,Ot=function(e){e=e.match(It),e=e&&e[1];return e&&J(e)+" Service"};function Pt(e){var t=e&&e.hubApiUrl;return t||Dt(v(e))}var Ut="/api/v3/domains",Nt="/api/v3/datasets",Rt="/api/discussions/v1",Ft=(Object.defineProperty(w.prototype,"session",{get:function(){return this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isAuthenticated",{get:function(){return!!this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"userRequestOptions",{get:function(){if(this.isAuthenticated)return{authentication:this._authentication,portal:this.sharingApiUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"requestOptions",{get:function(){var e={portal:this.sharingApiUrl};return e=this.isAuthenticated?{authentication:this._authentication,portal:this.sharingApiUrl}:e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubRequestOptions",{get:function(){return{authentication:this.session,isPortal:this.isPortal,portalSelf:this.portal,hubApiUrl:this.hubUrl,portal:this.sharingApiUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"portalUrl",{get:function(){return this.isAuthenticated?this.isPortal?"https://"+this._portalSelf.portalHostname:"https://"+this._portalSelf.urlKey+"."+this._portalSelf.customBaseUrl:this._portalUrl},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"sharingApiUrl",{get:function(){return this.portalUrl+"/sharing/rest"},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubUrl",{get:function(){return this._hubUrl},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPortal",{get:function(){return this._portalSelf?this._portalSelf.isPortal:-1===this._portalUrl.indexOf("arcgis.com")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"discussionsServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+Rt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubSearchServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+Nt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"domainServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+Ut},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"eventsConfig",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.events")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubEnabled",{get:function(){return a(this._portalSelf,"portalProperties.hub.enabled",!1)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"communityOrgId",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.orgId")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"communityOrgHostname",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.portalHostname")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"communityOrgUrl",{get:function(){if(this.communityOrgHostname)return"https://"+this.communityOrgHostname},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"helperServices",{get:function(){if(this._portalSelf)return this._portalSelf.helperServices},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"currentUser",{get:function(){return this._currentUser},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"portal",{get:function(){return this._portalSelf},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),w);function w(e){this._portalUrl="https://www.arcgis.com",this.id=e.id,this._portalUrl=e.portalUrl,this._hubUrl=e.hubUrl,e.authentication&&(this._authentication=e.authentication),e.portalSelf&&(this._portalSelf=e.portalSelf),e.currentUser&&(this._currentUser=e.currentUser),e.properties&&(this._properties=e.properties)}A.create=function(r){return void 0===r&&(r={}),f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return[4,(t=new A(r)).initialize()];case 1:return e.sent(),[2,t]}})})},A.prototype.setAuthentication=function(t){return f(this,void 0,void 0,function(){return h(this,function(e){switch(e.label){case 0:return this._authentication=t,this._portalUrl=t.portal.replace("/sharing/rest",""),[4,this.initialize()];case 1:return e.sent(),[2]}})})},A.prototype.setProperties=function(e){this._properties=e,this._context=new Ft(this.contextOpts)},A.prototype.clearAuthentication=function(){this._context.isPortal||(this._portalUrl=Tt(this._portalUrl)),this._authentication=null,this._portalSelf=null,this._currentUser=null,this._context=new Ft(this.contextOpts)},Object.defineProperty(A.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),A.prototype.initialize=function(){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:if(!this._authentication||this._portalSelf&&this._currentUser)return[3,4];i.debug("ArcGISContextManager-"+this.id+": Initializing"),t=this._authentication.username,t=[gt({authentication:this._authentication}),lt({username:t,authentication:this._authentication})],e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(t)];case 2:return n=e.sent(),r=n[0],n=n[1],this._portalSelf=r,this._currentUser=n,i.debug("ArcGISContextManager-"+this.id+": received portalSelf and currentUser"),[3,4];case 3:throw r=e.sent(),n='ArcGISContextManager could not fetch portal & user for "'+this._authentication.username+'" using '+this._authentication.portal+".",i.error(n),console.error(n),r;case 4:return i.debug("ArcGISContextManager-"+this.id+": updating context"),this._context=new Ft(this.contextOpts),[2]}})})},Object.defineProperty(A.prototype,"contextOpts",{get:function(){var e={id:this.id,portalUrl:this._portalUrl,hubUrl:this._hubUrl,properties:this._properties};return this._authentication&&(e.authentication=this._authentication),this._portalSelf&&(e.portalSelf=this._portalSelf),this._currentUser&&(e.currentUser=this._currentUser),e},enumerable:!1,configurable:!0});var Lt=A;function A(e){this._portalUrl="https://www.arcgis.com",this._logLevel=n.Level.error,this.id=(new Date).getTime(),e.logLevel&&(this._logLevel=e.logLevel),i.setLogLevel(this._logLevel),i.debug("ArcGISContextManager:ctor: Creating "+this.id),e.properties&&(this._properties=e.properties),e.authentication?(this._authentication=e.authentication,this._portalUrl=this._authentication.portal.replace("/sharing/rest","")):e.portalUrl&&(this._portalUrl=e.portalUrl),this._hubUrl=Ct(this._portalUrl),e.portal&&(this._portalSelf=c(e.portal)),e.currentUser&&(this._currentUser=c(e.currentUser))}var _t=function(e){var t;if(e)return t=e.toLocaleLowerCase(),Object.keys(D).find(function(e){return D[e].some(function(e){return e.toLocaleLowerCase()===t})})},D={app:["Application","City Engine Web Scene","CityEngine Web Scene","Dashboard","Insights Page","Insights Workbook","Operation View","Web Mapping Application","StoryMap","Web Experience","Urban Model"],dataset:["CSV Collection","CSV","Feature Collection Template","Feature Collection","Feature Layer","Feature Service","File Geodatabase","GeoJSON","GeoJson","KML Collection","KML","Microsoft Excel","Raster Layer","Shapefile","Stream Service","Table"],document:["CAD Drawing","Document Link","Hub Page","Site Page","Image","iWork Keynote","iWork Numbers","iWork Pages","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","PDF","Pro Map","Report Template"],event:["Hub Event"],feedback:["Form","Quick Capture Project"],initiative:["Hub Initiative"],template:["Hub Initiative Template"],solution:["Solution"],map:["Image Collection","Image Service","Map Service Layer","Map Service","Scene Service","Scene Layer","Vector Tile Service","Web Map Service","Web Map Tile Service","Web Map","Web Scene","WFS","WMS","WMTS"],other:["360 VR Experience","AppBuilder Widget Package","Application Configuration","ArcPad Package","Code Attachment","Code Sample","Desktop Add In","Desktop Application Template","Desktop Application","Desktop Style","Explorer Add In","Explorer Layer","Geocoding Service","Geometry Service","Geoprocessing Package","Geoprocessing Sample","Geoprocessing Service","Layer File","Layer Package","Layer Template","Layer","Layout","Locator Package","Map Area","Map Document","Map Package","Map Service Definition","Map Template","Mobile Application","Mobile Map Package","Native Application","Network Analysis Service","Operations Dashboard Add In","Project Package","Project Template","Raster Function Template","Rule Package","Scene Package","Service Definition","SQLite Geodatabase","Style","Tile Package","Vector Tile Package","Workflow Manager Package"],site:["Hub Site Application","Site Application"]},S=D.app,jt=D.dataset,Bt=D.document,Mt=D.event,x=D.feedback,Gt=D.initiative,Ht=D.map,Vt=D.other,Kt=D.site,zt=["360 VR Experience","Application","CityEngine Web Scene","Code Sample","CSV Collection","CSV","CAD Drawing","Desktop Application","Desktop Application Template","Desktop Style","File Geodatabase","GeoJson","Geoprocessing Package","Geoprocessing Sample","Image","iWork Keynote","iWork Numbers","KML Collection","KML","Layer","Layer File","Layer Package","Layout","Locator Package","Map Package","Map Service Definition","Map Template","Microsoft Excel","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","Operations Dashboard Add In","PDF","Pro Map","Project Package","Project Template","Raster function template","Rule Package","Service Definition","Shapefile","Vector Tile Package","Workflow Manager Package"],Yt=["Data"],Wt={app:S.concat(x),dataset:jt,document:Bt,event:Mt,initiative:Gt,map:Ht,other:Vt,site:Kt,downloadableTypes:zt,downloadableTypeKeywords:Yt,apiTypes:["Feature Service","Map Service","Image Service"]};function Jt(e){return-1!==zt.indexOf(e.type)||e.typeKeywords&&Yt.some(function(t){return e.typeKeywords.some(function(e){return e===t})})}var Zt=new RegExp(/.+(?:map|feature|image)server/i);function Qt(e){var t=e.match(Zt);return t?t[0]:s(e.split("?")[0])}function $t(e){return[[e.xmin,e.ymin],[e.xmax,e.ymax]]}var Xt={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};function er(e){var t=e.portalSelf,r=t.defaultExtent,t=q(t,"helperServices.geometry.url");if(!t)return Promise.resolve(Xt);if(!r)return Promise.resolve(Xt);t+="/project",r={httpMethod:"POST",params:{geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[r]}),transformForward:!1,transformation:"",inSR:r.spatialReference.wkid,outSR:4326,f:"json"}};return e.authentication&&(r.authentication=e.authentication),u(t,r).then(function(e){e=e.geometries[0];return{xmin:e.xmin,ymin:e.ymin,xmax:e.xmax,ymax:e.ymax,spatialReference:{wkid:4326}}}).catch(function(e){return Xt})}var tr=function(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])};function rr(e){return console.warn("DEPRECATED: use isBBox() instead"),tr(e)}var nr=function(e){var t=e[0],r=t[0],t=t[1],e=e[1],n=e[0],e=e[1];return{rings:[[[r,t],[n,t],[n,e],[r,e],[r,t]]],spatialReference:{wkid:4326}}};function or(e){var t,r;switch((e||"").toLowerCase()){case"image service":t="dataset";break;case"feature service":case"raster layer":t="map";break;case"microsoft excel":t="document";break;case"cad drawing":case"feature collection template":case"report template":t="content";break;default:t={other:"content",solution:"template"}[r=_t(e)]||r}return t}var E,ir=function(e){return e&&e.isPortal},ar=function(e,t){return!!e&&"public"===e.access&&!ir(t)},sr=function(e,t){return!ir(t)&&"public"===e.access&&"CSV"===e.type&&e.size<=5e6},ur=function(e,t,r){var n,o,r=lr(e,t,r);return r||(o="/content","feedback"===(n=or(e))?o="/feedback/surveys":cr(e)?o="/pages":-1<["app","dataset","document","map","template"].indexOf(n)&&(o="/"+n+"s"),r=o+"/"+t),r},cr=function(e){return["Hub Page","Site Page"].includes(e)},lr=function(e,t,r){var n;return"Solution"===e&&(0<(null==r?void 0:r.indexOf("Deployed"))&&(n="/content/"+t),n="/templates/"+t+"/about"),n};function pr(e){return{updateFrequency:"metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",reviseDate:"metadata.dataIdInfo.idCitation.date.reviseDate",pubDate:"metadata.dataIdInfo.idCitation.date.pubDate",createDate:"metadata.dataIdInfo.idCitation.date.createDate",metadataUpdateFrequency:"metadata.mdMaint.maintFreq.MaintFreqCd.@_value",metadataUpdatedDate:"metadata.mdDateSt"}[e]}function dr(e,t){t=pr(t);return t&&q(e,t)}(S=E=E||{}).Year="year",S.Month="month",S.Day="day",S.Time="time";var fr=function(e,t){t=t.url&&Qt(t.url);return t&&e.linkage.includes(t)},hr=function(e,t,r){var n=e.linkage,r=q(r,"authentication.token");return r&&fr(e,t)&&(t=new URL(e.linkage),(e=new URLSearchParams(t.search)).set("token",r),t.search=e.toString(),n=t.toString()),n},mr=[{type:"CC0-1.0",abbr:"CC0",name:"Public Domain Dedication",url:"http://creativecommons.org/publicdomain/zero/1.0"},{type:"CC-BY-4.0",abbr:"CC BY",name:"Attribution 4.0 International",url:"http://creativecommons.org/licenses/by/4.0"},{type:"CC-BY-3.0",abbr:"CC BY 3.0",name:"Attribution 3.0 Unported",url:"http://creativecommons.org/licenses/by/3.0"},{type:"CC-BY-2.5",abbr:"CC BY 2.5",name:"Attribution 2.5 Generic",url:"http://creativecommons.org/licenses/by/2.5"},{type:"CC-BY-2.0",abbr:"CC BY 2.0",name:"Attribution 2.0 Generic",url:"http://creativecommons.org/licenses/by/2.0"},{type:"CC-BY-1.0",abbr:"CC BY 1.0",name:"Attribution 1.0 Generic",url:"http://creativecommons.org/licenses/by/1.0"},{type:"CC-BY-SA-4.0",abbr:"CC BY-SA",name:"Attribution-ShareAlike 4.0 International",url:"http://creativecommons.org/licenses/by-sa/4.0"},{type:"CC-BY-SA-3.0",abbr:"CC BY-SA 3.0",name:"Attribution-ShareAlike 3.0 Unported",url:"http://creativecommons.org/licenses/by-sa/3.0"},{type:"CC-BY-SA-2.5",abbr:"CC BY-SA 2.5",name:"Attribution-ShareAlike 2.5 Generic",url:"http://creativecommons.org/licenses/by-sa/2.5"},{type:"CC-BY-SA-2.0",abbr:"CC BY-SA 2.0",name:"Attribution-ShareAlike 2.0 Generic",url:"http://creativecommons.org/licenses/by-sa/2.0"},{type:"CC-BY-SA-1.0",abbr:"CC BY-SA 1.0",name:"Attribution-ShareAlike 1.0 Generic",url:"http://creativecommons.org/licenses/by-sa/1.0"},{type:"CC-BY-ND-4.0",abbr:"CC BY-ND",name:"Attribution-NoDerivatives 4.0 International",url:"http://creativecommons.org/licenses/by-nd/4.0"},{type:"CC-BY-ND-3.0",abbr:"CC BY-ND 3.0",name:"Attribution-NoDerivs 3.0 Unported",url:"http://creativecommons.org/licenses/by-nd/3.0"},{type:"CC-BY-ND-2.5",abbr:"CC BY-ND 2.5",name:"Attribution-NoDerivs 2.5 Generic",url:"http://creativecommons.org/licenses/by-nd/2.5"},{type:"CC-BY-ND-2.0",abbr:"CC BY-ND 2.0",name:"Attribution-NoDerivs 2.0 Generic",url:"http://creativecommons.org/licenses/by-nd/2.0"},{type:"CC-BY-ND-1.0",abbr:"CC BY-ND 1.0",name:"Attribution-NoDerivs 1.0 Generic",url:"http://creativecommons.org/licenses/by-nd/1.0"},{type:"CC-BY-NC-4.0",abbr:"CC BY-NC",name:"Attribution-NonCommercial 4.0 International",url:"https://creativecommons.org/licenses/by-nc/4.0"},{type:"CC-BY-NC-3.0",abbr:"CC BY-NC 3.0",name:"Attribution-NonCommercial 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc/3.0"},{type:"CC-BY-NC-2.5",abbr:"CC BY-NC 2.5",name:"Attribution-NonCommercial 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc/2.5"},{type:"CC-BY-NC-2.0",abbr:"CC BY-NC 2.0",name:"Attribution-NonCommercial 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc/2.0"},{type:"CC-BY-NC-1.0",abbr:"CC BY-NC 1.0",name:"Attribution-NonCommercial 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc/1.0"},{type:"CC-BY-NC-SA-4.0",abbr:"CC BY-NC-SA",name:"Attribution-NonCommercial-ShareAlike 4.0 International",url:"https://creativecommons.org/licenses/by-nc-sa/4.0"},{type:"CC-BY-NC-SA-3.0",abbr:"CC BY-NC-SA 3.0",name:"Attribution-NonCommercial-ShareAlike 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-sa/3.0"},{type:"CC-BY-NC-SA-2.5",abbr:"CC BY-NC-SA 2.5",name:"Attribution-NonCommercial-ShareAlike 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.5"},{type:"CC-BY-NC-SA-2.0",abbr:"CC BY-NC-SA 2.0",name:"Attribution-NonCommercial-ShareAlike 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.0"},{type:"CC-BY-NC-SA-1.0",abbr:"CC BY-NC-SA 1.0",name:"Attribution-NonCommercial-ShareAlike 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/1.0"},{type:"CC-BY-NC-ND-4.0",abbr:"CC BY-NC-ND",name:"Attribution-NonCommercial-NoDerivatives 4.0 International",url:"https://creativecommons.org/licenses/by-nc-nd/4.0"},{type:"CC-BY-NC-ND-3.0",abbr:"CC BY-NC-ND 3.0",name:"Attribution-NonCommercial-NoDerivs 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-nd/3.0"},{type:"CC-BY-NC-ND-2.5",abbr:"CC BY-NC-ND 2.5",name:"Attribution-NonCommercial-NoDerivs 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.5"},{type:"CC-BY-NC-ND-2.0",abbr:"CC BY-NC-ND 2.0",name:"Attribution-NonCommercial-NoDerivs 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.0"},{type:"CC-BY-NC-ND-1.0",abbr:"CC BY-NC-ND 1.0",name:"Attribution-NonCommercial-NoDerivs 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/1.0"},{type:"PDDL-1.0",abbr:"PDDL",name:"ODC Public Domain Dedication and License",url:"http://opendatacommons.org/licenses/pddl/summary"},{type:"ODbL-1.0",abbr:"ODbL",name:"ODC Open Database License",url:"http://opendatacommons.org/licenses/odbl/summary"},{type:"ODC-BY-1.0",abbr:"ODC BY",name:"ODC Attribution License",url:"http://opendatacommons.org/licenses/by/summary"}];function gr(r){var e,t=!(e={type:(r=r||"")?"custom":"none",text:r}),n=mr.filter(function(e){return e=e,(t=(t=r).toLowerCase()).includes(e.name.toLowerCase())||t.includes(e.url.toLowerCase())||t.includes(e.abbr.toLowerCase());var t});return n.length&&(t=!0,e=n.pop()),t||(n=void 0,!function(e){try{return new URL(e).protocol}catch(e){return}}(r)?(t=r,new RegExp(/^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)>((?:.(?!\<\/a\>))*.)?<\/a>$|^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)\/>/).test(t)&&(t=new RegExp(/href\s?=\s?["'](.*?)["']/),n=r.match(t)[1])):n=r,n&&(e.url=n,e.text="")),e.text||delete e.text,e}function br(e,t,r){if(!e||!e.thumbnail)return null;var n=r||{},o=n.token,n=n.width,t=Et(e,t,o=o||"string"!=typeof r?o:r).split("?"),r=t[0],o=t[1],t=new URLSearchParams(o),o=(t.delete("f"),n&&t.append("w",n+""),t.toString()),n=r+"/info/"+e.thumbnail;return o?n+"?"+o:n}function yr(e,t){return{"001":n.UpdateFrequency.Continual,"002":n.UpdateFrequency.Daily,"003":n.UpdateFrequency.Weekly,"004":n.UpdateFrequency.Fortnightly,"005":n.UpdateFrequency.Monthly,"006":n.UpdateFrequency.Quarterly,"007":n.UpdateFrequency.Biannually,"008":n.UpdateFrequency.Annually,"009":n.UpdateFrequency.AsNeeded,"010":n.UpdateFrequency.Irregular,"011":n.UpdateFrequency.NotPlanned,"012":n.UpdateFrequency.Unknown,"013":n.UpdateFrequency.Semimonthly}[dr(e,t||"updateFrequency")]}function vr(e){return null!=(e={appbuilderExtension:"file",appbuilderWidgetPackage:"widgets-source",application:"web",applicationConfiguration:"app-gear",arcgisProMap:"desktop",cadDrawing:"file-cad",cityEngineWebScene:"urban-model",codeAttachment:"file-code",codeSample:"file-code",colorSet:"palette",contentCategorySet:"label",csv:"file-csv",cSV:"file-csv",cSVCollection:"file-csv",dashboard:"dashboard",desktopApplication:"desktop",documentLink:"link",excaliburImageryProject:"file",explorerMap:"file",exportPackage:"file",featureCollection:"data",featureCollectionTemplate:"file",featureLayer:"data",featureService:"collection",fileGeodatabase:"data",form:"survey",geocodingService:"file",geodataService:"file",geometryService:"file",geopackage:"file",geoprocessingService:"file",globeLayer:"layers",globeService:"file",hubInitiative:"initiative",hubInitiativeTemplate:"initiative-template",hubPage:"browser",hubSiteApplication:"web",image:"file-image",imageService:"data",insightsModel:"file",insightsPage:"graph-moving-average",insightsTheme:"palette",insightsWorkbook:"graph-moving-average",iWorkPages:"file-text",iWorkKeynote:"presentation",iWorkNumbers:"file-report",kML:"data",kMLCollection:"data",layer:"layers",layerPackage:"layers",layerTemplate:"file",locatorPackage:"file",mapArea:"file",mapDocument:"map-contents",mapImageLayer:"collection",mapPackage:"file",mapService:"collection",microsoftExcel:"file-report",microsoftPowerpoint:"presentation",microsoftWord:"file-text",mission:"file",mobileMapPackage:"map-contents",nativeApplication:"mobile",nativeApplicationInstaller:"file",nativeApplicationTemplate:"file",mobileApplication:"mobile",networkAnalysisService:"file",notebook:"code",orientedImageryCatalog:"file",orthoMappingProject:"file",orthoMappingTemplate:"file",pDF:"file-pdf",quickCaptureProject:"mobile",rasterFunctionTemplate:"file",rasterLayer:"map",realTimeAnalytic:"file",relationalDatabaseConnection:"file",reportTemplate:"file",sceneLayer:"data",sceneService:"urban-model",serviceDefinition:"file",shapefile:"data",solution:"puzzle-piece",sqliteGeodatabase:"file",statisticalDataCollection:"file",storymap:"tour",storyMap:"tour",storymapTheme:"palette",symbolSet:"file",table:"table",urbanModel:"urban-model",vectorTilePackage:"file-shape",vectorTileService:"map",visioDocument:"conditional-rules",webExperience:"apps",webMap:"map",webMappingApplication:"apps",webScene:"urban-model",wfs:"map",wFS:"map",wMS:"map",wMTS:"map",workflowManagerService:"file",workforceProject:"list-check"}[z(e||"")])?e:"file"}function wr(e,t){var r=(r=t.authentication)&&r.token;return{portalHome:xt(e.id,t),portalApi:Et(e,t,r),portalData:kt(e,t,r),thumbnail:br(e,t,{token:r})}}function Ar(e,t){var r;return r=sr(e,t)?Pt(t)+"/datasets/"+e.id+"_0/FeatureServer/0":r}var Dr=function(e){e=e&&1===e.length?e[0]:void 0;return e&&e.capabilities.includes("Query")?e:void 0},Sr=function(e,t,r){return e&&t&&1<t.length&&!Cr(r)},xr=(n.UpdateFrequency=void 0,(x=n.UpdateFrequency||(n.UpdateFrequency={})).Continual="continual",x.Daily="daily",x.Weekly="weekly",x.Fortnightly="fortnightly",x.Monthly="monthly",x.Quarterly="quarterly",x.Biannually="biannually",x.Annually="annually",x.AsNeeded="as-needed",x.Irregular="irregular",x.NotPlanned="not-planned",x.Unknown="unknown",x.Semimonthly="semimonthly",function(e,t){e=dr(e,t),/^\d{4}$/.test(e=""+e)?(r=new Date(+e,0,1),n=E.Year):/^\d{4}-\d{1,2}$/.test(e)?(o=e.split("-"),r=new Date(+o[0],+o[1]-1,1),n=E.Month):/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)?(o=e.split("-"),r=new Date(+o[0],+o[1]-1,+o[2]),n=E.Day):Number.isNaN(Date.parse(e))||(r=new Date(e),n=e.includes("T")?E.Time:E.Day);var r,n,o=r&&n&&{date:r,precision:n};return o&&I(I({},o),{source:"metadata."+pr(t)})}),Er=function(e,t){t+=".editingInfo.lastEditDate",e=q(e,t);return e&&{date:new Date(e),source:t,precision:E.Day}},kr=function(e,t){return{date:new Date(e[t]),precision:E.Day,source:"item."+t}},Cr=function(e){e=e&&e.match(/\/\d+$/);return e&&e[0].slice(1)},Tr=function(e){return e&&"feature service"===e.toLowerCase()};function qr(e){var t=(e=void 0===e?{}:e).type,r=e.typeKeywords||[];return("Site Application"===e.type||"Web Mapping Application"===e.type&&d(r,"hubSite"))&&(t="Hub Site Application"),("Site Page"===e.type||"Web Mapping Application"===e.type&&d(r,"hubPage"))&&(t="Hub Page"),"Hub Initiative"===e.type&&d(r,"hubInitiativeTemplate")&&(t="Hub Initiative Template"),t="Web Mapping Application"===e.type&&d(r,"hubSolutionTemplate")?"Solution":t}function Ir(e){var t;if("public"===e.access)return t=e.id,(e=Or(e))?t+"_"+e:t}var Or=function(e){return Cr(e.url)||Tr(e.type)&&e.typeKeywords&&d(e.typeKeywords,"Singlelayer")&&"0"};function Pr(e){if(!e)return e;var t=["categories",""];return e.map(function(e){return e.split("/")}).reduce(function(e,t,r){return m(e,t)},[]).filter(function(e){return!d(t,e.toLowerCase())})}function Ur(e,t,r){var n=Cr(e.url),o=n?parseInt(n,10):r;return t&&(Z(o)?Tr(e.type)&&Dr(t):t.find(function(e){return e.id===o}))}function Nr(e){return e.isView}var Rr=function(n,e){var t,r,o=e||{},i=o.slug,a=o.requestOptions,s=o.data,u=o.metadata,c=o.groupIds,l=o.ownerUser,p=o.org,d=o.errors,f=o.server,h=o.layers,m=o.recordCount,g=o.boundary,b=o.extent,y=o.searchDescription,o=o.statistics,v=Ur(n,h,null==e?void 0:e.layerId),e=ar(n,a)?v?n.id+"_"+v.id:Ir(n):void 0,w=i||e||n.id,A=((Sr(r=v,h,(t=n).url)?r.name:t.title||t.name)||"").replace(/_/g," "),D=Sr(v,h,n.url)&&v.description,S=v?v.type:qr(n),x=I({relative:ur(S,w,n.typeKeywords)},a&&wr(n,a)),E=Ar(n,a),k=(r=n,xr((t={metadata:u,layer:v,server:f}).metadata,"reviseDate")||Er(t,"layer")||Er(t,"server")||kr(r,"modified")),C=(a=n,xr(t=u,"pubDate")||xr(t,"createDate")||kr(a,"created")),T=(r=n,xr(u,"metadataUpdatedDate")||kr(r,"modified"));return I(I({item:n},n),{slug:i,data:s,metadata:u,groupIds:c,ownerUser:l,org:p,errors:d||[],server:f,layers:h,recordCount:m,statistics:o,hubId:e,identifier:w,get isProxied(){return!!E},layer:v,name:A,get title(){return A},get description(){return y||D||n.description},type:S,get family(){return or(S)},get url(){return E||(v?Qt(n.url)+"/"+v.id:n.url)},get categories(){return Pr(n.categories)},get actionLinks(){return n.properties&&n.properties.links},get hubActions(){return n.properties&&n.properties.actions},get isDownloadable(){return Jt(n)},get structuredLicense(){return gr(n.licenseInfo)},get permissions(){return{visibility:n.access,control:n.itemControl||"view"}},get extent(){return!tr(n.extent)&&b&&tr(b.coordinates)?b.coordinates:n.extent},get boundary(){return g||function(e){var t,r=e.extent,n=tr(r),e=(null==(e=e.properties)?void 0:e.boundary)||(n?"item":void 0);switch(e){case"item":t=n?nr(r):null;break;case"none":t=null}return{provenance:e,geometry:t}}(n)},get summary(){return D||n.snippet||n.description},urls:x,get portalHomeUrl(){return x.portalHome},get portalDataUrl(){return x.portalData},get portalApiUrl(){return x.portalApi},get thumbnailUrl(){return x.thumbnail},get createdDate(){return new Date(n.created)},createdDateSource:"item.created",get updatedDate(){return k.date},get updatedDateSource(){return k.source},get updatedDatePrecision(){return k.precision},get modified(){return k.date.getTime()},get publishedDate(){return C.date},get publishedDateSource(){return C.source},get publishedDatePrecision(){return C.precision},get metadataUpdatedDate(){return T.date},get metadataUpdatedDateSource(){return T.source},get metadataUpdatedDatePrecision(){return T.precision},get updateFrequency(){return yr(u)},get metadataUpdateFrequency(){return yr(u,"metadataUpdateFrequency")},get publisher(){return{name:n.owner,username:n.owner}},get metrics(){return n.properties&&n.properties.metrics},get spatialReference(){var e;return(null==(e=null==v?void 0:v.extent)?void 0:e.spatialReference)||function(e){e=e.spatialReference;if(!e||"object"==typeof e)return e;e=parseInt(e+"",10);return isNaN(e)?null:{wkid:e}}(n)||null},get viewDefinition(){var e=v&&Nr(v)&&s&&Array.isArray(s.layers)&&s.layers.find(function(e){return e.id===v.id});return e?e.layerDefinition:void 0},get orgId(){return p?p.id:n.orgId||(null==l?void 0:l.orgId)},get contentTypeIcon(){return console.warn("DEPRECATED: it is now the responsibility of the consuming package to determine the icon"),vr(S)},get license(){return console.warn("DEPRECATED: use structuredLicense instead"),{name:"Custom License",description:n.accessInformation}},get hubType(){return console.warn("DEPRECATED: use family instead"),or(S)},get additionalResources(){var t=n,e=u,r=void 0;return null===(e=q(e,"metadata.distInfo.distTranOps.onLineSrc")||null)?null:(e=Array.isArray(e)?e:[e]).map(function(e){return{name:e.orName,url:hr(e,t,r),isDataSource:fr(e,t)}})}})};function Fr(e){e=e?e.split("_"):[];return{itemId:e[0],layerId:e[1]}}function Lr(e){e=Fr(e).itemId;return!(!e||fe(e))}function _r(e,t){return/.+::.+/.test(e)?e:t+"::"+e}function jr(e,t){return t&&e.match(t+"::")?e.split(t+"::")[1]:e}function k(){this.operations=[]}k.prototype.startOperation=function(e){e=c(e);e.startedAt=(new Date).getTime(),e.state="working",this.operations.push(e)},k.prototype.start=function(e,t){e={type:e,id:a(t,"id",V(e+"_")),inputs:a(t,"inputs",{}),cleanup:a(t,"cleanup","n/a"),startedAt:(new Date).getTime(),state:"working"};return this.operations.push(e),e.id},k.prototype.getOperation=function(t){return this.operations.find(function(e){return e.id===t})},k.prototype.getOperations=function(){return this.operations},k.prototype.finish=function(e,t){var r=this.getOperation(e);if(!r)throw new Error("No operation with id "+e+" present in stack");r.duration=(new Date).getTime()-r.startedAt,r.state="completed",t&&(r.output=c(t))},k.prototype.merge=function(e){this.operations=m(this.operations,e.operations)},k.prototype.getCompleted=function(){return c(this.operations.filter(function(e){return"completed"===e.state}))},k.prototype.getWorking=function(){return c(this.operations.filter(function(e){return"working"===e.state}))},k.prototype.toString=function(){return this.operations.sort(function(e,t){return e.startedAt<t.startedAt?-1:t.startedAt<e.startedAt?1:0}).map(Mr).join("\n")},k.prototype.serialize=function(){return{operations:c(this.getOperations())}};var Br=k;function Mr(e){var t=e.startedAt+" : Operation "+e.id+" started with inputs "+JSON.stringify(e.inputs)+" but was not completed";return t="completed"===e.state?e.startedAt+" : Operation "+e.id+" took "+e.duration+" ms with inputs "+JSON.stringify(e.inputs)+" and output "+(e.output?JSON.stringify(e.output):"n/a"):t}var Gr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Hr(e,t,r){return e(r={path:t,exports:{},require:function(e,t){throw null==t&&r.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},r.exports),r.exports}function Vr(e,t){t=Object.assign({},Wr,t),e=e.replace(/<!--[\s\S]*?-->/g,"");for(var r=new Kr("!xml"),n=r,o=new RegExp("<((!\\[CDATA\\[([\\s\\S]*?)(\\]\\]>))|(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))([^>]*)>|((\\/)(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))>))([^<]*)","g"),i=o.exec(e),a=o.exec(e);i;){var s,u="]]>"===(u=i)[4]?Yr.CDATA:"/"===u[10]?Yr.CLOSING:void 0!==u[8]&&"/"===u[8].substr(u[8].length-1)?Yr.SELF:Yr.OPENING;u===Yr.CLOSING?(n.parent&&i[14]&&(n.parent.val=C.getValue(n.parent.val)+""+Jr(i[14],t)),n=n.parent):u===Yr.CDATA?t.cdataTagName?((s=new Kr(t.cdataTagName,n,i[3])).attrsMap=$r(i[8],t),n.addChild(s),n.val=C.getValue(n.val)+t.cdataPositionChar,i[14]&&(n.val+=Jr(i[14],t))):n.val=(n.val||"")+(i[3]||"")+Jr(i[14],t):u===Yr.SELF?(s=new Kr(t.ignoreNameSpace?i[7]:i[5],n,""),i[8]&&1<i[8].length&&(i[8]=i[8].substr(0,i[8].length-1)),s.attrsMap=$r(i[8],t),n.addChild(s)):((s=new Kr(t.ignoreNameSpace?i[7]:i[5],n,Jr(i[14],t))).attrsMap=$r(i[8],t),n.addChild(s),n=s),i=a,a=o.exec(e)}return r}var C=Hr(function(e,t){function r(e,t){return null!=(t=t.exec(e))}t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t){if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o++)e[r[o]]=t[r[o]]},t.getValue=function(e){return t.isExist(e)?e:""},t.doesMatch=r,t.doesNotMatch=function(e,t){return!r(e,t)},t.getAllMatches=function(e,t){for(var r=[],n=t.exec(e);n;){for(var o=[],i=n.length,a=0;a<i;a++)o.push(n[a]);r.push(o),n=t.exec(e)}return r}}),Kr=function(e,t,r){this.tagname=e,this.parent=t,this.child=[],this.attrsMap,this.val=r,this.addChild=function(e){this.child.push(e)}},zr=Hr(function(e,t){var r=Gr;function s(e,t){if(!e)return t;var r,n={};for(r in t)n[r]=(k(e,r)?e:t)[r];return n}function f(e,t){var r="";return 55296<=e&&e<=57343||1114111<e?(t&&T("character reference outside the permissible Unicode range"),"�"):k(D,e)?(t&&T("disallowed character reference"),D[e]):(t&&C(S,e)&&T("disallowed character reference"),65535<e&&(r+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+x(e))}function u(e){return"&#x"+e.toString(16).toUpperCase()+";"}function c(e){return"&#"+e+";"}function l(e,t){function r(e){return a(e.charCodeAt(0))}(t=s(t,l.options)).strict&&y.test(e)&&T("forbidden code point");var n=t.encodeEverything,o=t.useNamedReferences,i=t.allowUnsafeSymbols,a=t.decimal?c:u;return n?(e=e.replace(d,function(e){return o&&k(g,e)?"&"+g[e]+";":r(e)}),o&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),o&&(e=e.replace(m,function(e){return"&"+g[e]+";"}))):o?e=(e=(e=i?e:e.replace(b,function(e){return"&"+g[e]+";"})).replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(m,function(e){return"&"+g[e]+";"}):i||(e=e.replace(b,r)),e.replace(p,function(e){var t=e.charCodeAt(0),e=e.charCodeAt(1);return a(1024*(t-55296)+e-56320+65536)}).replace(h,r)}function n(e,p){var d=(p=s(p,n.options)).strict;return d&&a.test(e)&&T("malformed character reference"),e.replace(v,function(e,t,r,n,o,i,a,s){var u,c,l;return t?(t=t,c=r,d&&!c&&T("character reference was not terminated by a semicolon"),u=parseInt(t,10),f(u,d)):n?(r=n,c=o,d&&!c&&T("character reference was not terminated by a semicolon"),u=parseInt(r,16),f(u,d)):i?k(w,l=i)?w[l]:(d&&T("named character reference was not terminated by a semicolon"),e):(l=a,(t=s)&&p.isAttributeValue?(d&&"="==t&&T("`&` did not start a character reference"),e):(d&&T("named character reference was not terminated by a semicolon"),A[l]+(t||"")))})}var o=t,t=e&&e.exports==o&&e,e="object"==typeof Gr&&Gr,p=(e.global!==e&&e.window!==e||(r=e),/[\uD800-\uDBFF][\uDC00-\uDFFF]/g),d=/[\x01-\x7F]/g,h=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,m=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,g={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},b=/["&'<>`]/g,i={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},a=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,y=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,v=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g,w={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},A={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},D={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},S=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,E={}.hasOwnProperty,k=function(e,t){return E.call(e,t)},C=function(e,t){for(var r=-1,n=e.length;++r<n;)if(e[r]==t)return!0;return!1},T=function(e){throw Error("Parse error: "+e)},q=(n.options={isAttributeValue:!(l.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1}),strict:!1},{version:"1.1.1",encode:l,decode:n,escape:function(e){return e.replace(b,function(e){return i[e]})},unescape:n});if(o&&!o.nodeType)if(t)t.exports=q;else for(var I in q)k(q,I)&&(o[I]=q[I]);else r.he=q}),Yr={OPENING:1,CLOSING:2,SELF:3,CDATA:4},Wr={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,decodeHTMLchar:!1,cdataTagName:!1,cdataPositionChar:"\\c"};function Jr(e,t){return e&&(t.trimValues&&(e=e.trim()),e=Zr(e=t.decodeHTMLchar?zr.decode(e):e,t.parseNodeValue)),e}function Zr(e,t){return t&&"string"==typeof e?""===e.trim()||isNaN(e)?"true"===e||"false"!==e&&e:-1!==e.indexOf(".")?Number.parseFloat(e):Number.parseInt(e,10):C.isExist(e)?e:""}var Qr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function $r(e,t){if(!t.ignoreAttributes&&"string"==typeof e){e=e.replace(/\r?\n/g," ");for(var r=C.getAllMatches(e,Qr),n=r.length,o={},i=0;i<n;i++){var a=function(e,t){if(t.ignoreNameSpace){var t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}(r[i][1],t);a.length&&(void 0!==r[i][4]?(t.trimValues&&(r[i][4]=r[i][4].trim()),t.decodeHTMLchar&&(r[i][4]=zr.decode(r[i][4],{isAttributeValue:!0})),o[t.attributeNamePrefix+a]=Zr(r[i][4],t.parseAttributeValue)):t.allowBooleanAttributes&&(o[t.attributeNamePrefix+a]=!0))}if(Object.keys(o).length)return t.attrNodeName?((e={})[t.attrNodeName]=o,e):o}}var Xr=function(e,t){for(var r={},n=0;n<e.child.length;n++){var o,i=e.child[n].tagname,a=Xr(e.child[n],t);void 0!==r[i]?(Array.isArray(r[i])||(o=r[i],r[i]=[],r[i].push(o)),r[i].push(a)):r[i]=t.arrayMode?[a]:a}return C.merge(r,e.attrsMap),C.isEmptyObject(r)?C.isExist(e.val)?e.val:"":(C.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(r[t.textNodeName]=e.val),r)},en={parse:function(e,t){return t=Object.assign({},Wr,t),Xr(Vr(e,t),t)},getTraversalObj:Vr,convertToJson:Xr}.parse;function tn(e,t){return Ke(e,I(I({},t),{fileName:"metadata/metadata.xml"})).then(function(e){return en(e,{ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#value"})}).catch(function(){return null})}function rn(e,t,r){var n=t.data,o=t.stack,t=t.requestOptions;return o.finish(r,{error:e}),{data:I(I({},n),{errors:sn(e,n.errors)}),stack:o,requestOptions:t}}function nn(e,t,r){return t=t.reduce(function(e,t){t=an[t];return t&&e.push(t),e},[]),le(t)({data:{item:e},stack:new Br,requestOptions:r}).then(function(e){return e.data})}var on,an={groupIds:function(t){var e,r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichGroupIds");return e=r.item.id,u(Ge(e,e=o)+"/groups",e).then(function(e){e=m(e.admin,e.member,e.other).map(function(e){return e.id});return n.finish(i),{data:I(I({},r),{groupIds:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},metadata:function(e){var t=e.data,r=e.stack,n=e.requestOptions,o=r.start("enrichMetadata");return tn(t.item.id,n).then(function(e){return r.finish(o),{data:I(I({},t),{metadata:e}),stack:r,requestOptions:n}})},ownerUser:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichOwner");return lt(I({username:r.item.owner},o)).then(function(e){return n.finish(i),{data:I(I({},r),{ownerUser:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},data:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichData");return He(r.item.id,o).then(function(e){return n.finish(i),{data:I(I({},r),{data:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},server:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichServer"),e=r.item.url,e=I(I({},o),{url:e});return u(s((e=e).url),e).then(function(e){return n.finish(i),{data:I(I({},r),{server:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},layers:function(t){var e,r,n=t.data,o=t.stack,i=t.requestOptions,a=o.start("enrichLayers"),s=n.item.url,s=I(I({},i),{url:s});return r=(e=s).url,e=ue(s,["url"]),u(Qt(r)+"/layers",e).then(function(e){return m(e.layers,e.tables).filter(function(e){return"Group Layer"!==e.type})}).then(function(e){return o.finish(a),{data:I(I({},n),{layers:e}),stack:o,requestOptions:i}}).catch(function(e){return rn(e,t,a)})}},sn=function(e,t){return m(t=void 0===t?[]:t,[{type:"Other",message:"string"==typeof e?e:e.message}])},un=function(e){e=[].concat.apply([],e.filter(Array.isArray));return e.length?e:void 0},cn=(ae(ln,on=Error),ln);function ln(e,t,r){e=on.call(this,e)||this;return e.status=r,e.url=t,e}function pn(e,t){var r,n,t=I({httpMethod:"GET"},t),o=t.fetch||fetch,i=I({"Content-Type":"application/json"},t.headers),a=("GET"===t.httpMethod?r=t.params:n=JSON.stringify(t.params),Re({host:Pt(t),path:("/api/v3/"+e).replace(/\/\//g,"/"),query:r}));return o(a,{method:t.httpMethod,headers:i,body:n}).then(function(e){if(e.ok)return e.json();throw new cn(e.statusText,a,e.status)})}function dn(e){var t=["groupIds","metadata","ownerUser","org"];return function(e){e=qr(e);return d(["template","solution"],or(e))||d(["Web Map","Web Scene"],e)}(e)&&t.push("data"),qt(e.url)?t.concat("server","layers"):t}function fn(e,t){return(e=c(e)).params=I(I({},e.params),{"fields[datasets]":"slug,boundary,extent,searchDescription,statistics"}),t&&(e.params["filter[slug]"]=t),e}function hn(e){var t=(r=Fr(e.id)).itemId,r=(r=r.layerId)&&parseInt(r,10),e=e.attributes;return{itemId:t,layerId:r,slug:e.slug,boundary:e.boundary,extent:e.extent,searchDescription:e.searchDescription,statistics:e.statistics}}function mn(i,a){return f(void 0,void 0,void 0,function(){var n,o;return h(this,function(e){switch(e.label){case 0:n=i.url,o=i.viewDefinition,o=null==o?void 0:o.definitionExpression,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,(t=I(I({},a),{url:n,where:o,returnCountOnly:!0}),r=Se(t,["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:I({where:"1=1",outFields:"*"},t.params)}),u(s(t.url)+"/query",r))];case 2:return[2,e.sent().count];case 3:return e.sent(),[2,1/0];case 4:return[2]}var t,r})})}var gn=function(r,n){return f(void 0,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return[4,pn("/datasets",fn(n,r))];case 1:return t=e.sent(),[2,hn(t.data[0])]}})})},bn=function(r,n){return f(void 0,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,pn("/datasets/"+r,fn(n))];case 1:return t=e.sent(),[2,hn(t.data)];case 2:return t=e.sent(),[2,{errors:sn(t)}];case 3:return[2]}})})},yn=function(n,o){return f(void 0,void 0,void 0,function(){var t,r;return h(this,function(e){switch(e.label){case 0:return[4,Me(n,o)];case 1:return t=e.sent(),r=(null==o?void 0:o.enrichments)||dn(t),[4,nn(t,r,o)];case 2:return r=e.sent(),[2,(i=I(I({},r),{item:t}),a=o,f(void 0,void 0,void 0,function(){var t,r,n,o;return h(this,function(e){switch(e.label){case 0:return(t=i.item,r=i.data,n=i.layers,(n=n&&Ur(t,n,a&&a.layerId))&&Nr(n)&&!r)?[4,nn(t,["data"],a)]:[3,2];case 1:return o=e.sent(),[3,3];case 2:o=void 0,e.label=3;case 3:return n=o,[2,I(I(I({},i),n),{errors:un([i.errors,null==n?void 0:n.errors])})]}})}))]}var i,a})})};function vn(e){void 0===e&&(e=""),console.warn("DEPRECATED: Use getCollection() instead. getCategory will be removed at v10.0.0");e=_t(e);return"feedback"===e?"app":e}function wn(t,e){return d(["template","feedback"],t.family)?t.id:cr(t.type)?(r=(q(e,"data.values.pages")||[]).find(function(e){return e.id===t.id}))?r.slug:t.id:t.slug?(r=q(e,"domainInfo.orgKey"),q(e,"data.values.isUmbrella")?t.slug:jr(t.slug,r)):t.hubId||t.id;var r}function An(e){return Rr(e)}function Dn(e){if(e){var t,r,n,o,i,a,s,u,c,l,p,d,f,h,m,g,b,y,v,w,A,D,S,x,E,k,C,T,q,I,O,P,U,N,F,L,_,j,B,M,G,H,R=e.id,e=e.attributes;if(e)return R=Fr(R).itemId,t=e.owner,r=e.orgId,n=e.created,o=e.modified,i=e.name,a=e.title,s=e.type,u=e.typeKeywords,c=e.description,l=e.snippet,p=e.tags,d=e.thumbnail,f=e.categories,h=e.contentStatus,m=e.spatialReference,g=e.accessInformation,b=e.licenseInfo,y=e.culture,v=e.url,w=e.access,A=e.proxyFilter,D=e.properties,S=e.appCategories,x=e.industries,E=e.languages,k=e.largeThumbnail,C=e.banner,T=e.screenshots,q=e.listed,I=e.ownerFolder,O=e.size,P=e.protected,U=e.commentsEnabled,N=e.numComments,F=e.numRatings,L=e.avgRating,_=e.numViews,j=e.itemControl,B=e.scoreCompleteness,M=e.itemExtent,G=e.itemModified,H=e.modifiedProvenance,e=e.serviceSpatialReference,{id:R,owner:t,orgId:r,created:n,modified:G||"item.modified"===H&&o,title:a||i,type:v&&Ot(v)||s,typeKeywords:u,description:c,tags:p,snippet:l,thumbnail:d,extent:M||[],categories:f,contentStatus:h,spatialReference:m||e,accessInformation:g,licenseInfo:b,culture:y,url:v,access:w,size:O,protected:P,proxyFilter:A,properties:D,appCategories:S,industries:x,languages:E,largeThumbnail:k,banner:C,screenshots:T,listed:q,ownerFolder:I,commentsEnabled:U,numComments:N,numRatings:F,avgRating:L,numViews:_,itemControl:j,scoreCompleteness:B}}}function Sn(e,t){return t?"CSV":z(e||"")}function xn(e,t){var r=wn(e,t);return{relative:e=kn(e,r),absolute:""+q(t,"item.url").replace(/\/$/,"")+e}}function En(e,t){return t=I(I({},e.urls),t),I(I({},e),{urls:t})}function kn(e,t){return ur(e.type,t||e.identifier,e.typeKeywords)}var Cn=function(e,t){var t=xn(e,t),r=t.relative,t=t.absolute;return En(e,{relative:r,site:t})};const Tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var In={atob:function(t){if((t=(t=(t=""+t).replace(/[ \t\n\f\r]/g,"")).length%4==0?t.replace(/==?$/,""):t).length%4==1||/[^+/0-9A-Za-z]/.test(t))return null;let r="",n=0,o=0;for(let e=0;e<t.length;e++)n=(n<<=6)|function(e){e=Tn.indexOf(e);return e<0?void 0:e}(t[e]),24===(o+=6)&&(r=(r=(r+=String.fromCharCode((16711680&n)>>16))+String.fromCharCode((65280&n)>>8))+String.fromCharCode(255&n),n=o=0);return 12===o?(n>>=4,r+=String.fromCharCode(n)):18===o&&(n>>=2,r=(r+=String.fromCharCode((65280&n)>>8))+String.fromCharCode(255&n)),r},btoa:function(e){let t;for(e=""+e,t=0;t<e.length;t++)if(255<e.charCodeAt(t))return null;let r="";for(t=0;t<e.length;t+=3){const n=[void 0,void 0,void 0,void 0];n[0]=e.charCodeAt(t)>>2,n[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(n[1]|=e.charCodeAt(t+1)>>4,n[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(n[2]|=e.charCodeAt(t+2)>>6,n[3]=63&e.charCodeAt(t+2));for(let e=0;e<n.length;e++)void 0===n[e]?r+="=":r+=function(e){if(0<=e&&e<64)return qn[e];return}(n[e])}return r}},On="4326",Pn={csv:{name:"CSV",itemTypes:["CSV","CSV Collection"],supportsProjection:!0},kml:{name:"KML",itemTypes:["KML","KML Collection"],supportsProjection:!1},shapefile:{name:"Shapefile",itemTypes:["Shapefile"],supportsProjection:!0},fileGeodatabase:{name:"File Geodatabase",itemTypes:["File Geodatabase"],supportsProjection:!0},geojson:{name:"GeoJson",itemTypes:["GeoJson"],supportsProjection:!1},excel:{name:"Excel",itemTypes:["Microsoft Excel"],supportsProjection:!0},featureCollection:{name:"Feature Collection",itemTypes:["Feature Collection"],supportsProjection:!0}};function Un(e){var t,r;return"object"==typeof e?(t=e.wkid,r=e.wkt,t?t+"":In.btoa(r)):e}function Nn(e){return"spatialRefId:"+Un(function(t){var r;try{r=JSON.parse(t)}catch(e){r=t}return r}(e))}function Rn(e){return"exportItem:"+e}function Fn(e){return e?"exportLayer:0"+e:"exportLayer:null"}function Ln(e){var t,r=e.autoAddResult,n=e.inviteResult,o=e.primaryEmailResult,e=e.secondaryEmailResult;return(o||e)&&(t={success:(o=[o,e].filter(function(e){return e})).every(function(e){return e.success})},(e=o.reduce(function(e,t){return e.concat(a(t,"errors",[]))},[])).length&&(t.errors=e)),{success:[r,n,t].filter(function(e){return e}).every(function(e){return e.success}),autoAdd:r,invite:n,email:t}}function _n(t,e){var r;return t&&(r=!q(t,"notAdded.length")&&!t.errors,e.autoAddResult={success:r},r||(r=t.errors||[],q(t,"notAdded.length")&&r.push(new p("Users not auto-added: "+t.notAdded.join(", "))),e.autoAddResult.errors=r,r=e.usersToAutoAdd.filter(function(e){return d(t.notAdded,e.username)}),e.usersToInvite=e.usersToInvite.concat(r))),e}function jn(e,t){return e.orgId===t.orgId}function Bn(e){return"org_admin"===e.role&&!e.roleId}function Mn(e,t,r,n){var o=Promise.resolve(null);return e.length&&(r={authentication:r,message:t.body,subject:t.subject,notificationChannelType:"email",users:e.map(function(e){return e.username})},n||(r.batchSize=1),o=ut(r)),o}function Gn(t){var r,e=Promise.resolve(t);return t.email&&t.secondaryRO&&q(t,"inviteResult.success")&&(r=a(t,"secondaryRO.portalSelf.user",{}),e=Mn(t.usersToInvite.filter(function(e){return jn(e,r)}),t.email,t.secondaryRO.authentication,Bn(r)).then(function(e){return t.secondaryEmailResult=e,t})),e}function Hn(e,t,r){var n=Promise.resolve(null);return n=t.length?Xe({id:e,users:t.map(function(e){return e.username}),authentication:r}):n}function Vn(t){return Hn(q(t,"groupId"),q(t,"usersToAutoAdd"),q(t,"primaryRO.authentication")).then(function(e){return _n(e,t)})}function Kn(e,t,r,n,o){void 0===n&&(n=20160),void 0===o&&(o="group_member");var i=Promise.resolve(null);return i=t.length?nt({id:e,users:t.map(function(e){return e.username}),authentication:r,role:o,expiration:n}):i}function zn(t){return Kn(q(t,"groupId"),q(t,"usersToInvite"),q(t,"primaryRO.authentication")).then(function(e){return t.inviteResult=e,t})}function Yn(t){var e=Promise.resolve(t);return e=t.email&&q(t,"inviteResult.success")?Mn(t.usersToEmail,t.email,t.primaryRO.authentication,Bn(t.requestingUser)).then(function(e){return t.primaryEmailResult=e,t}):e}function Wn(e,t){var r,n=[];return-1!==t.privileges.indexOf("portal:admin:assignToGroups")&&(r=[t.orgId,t.cOrgId].filter(function(e){return e}),n=e.filter(function(e){return-1!==r.indexOf(e.orgId)})),n}function Jn(e,t){var r=Wn(e,t);return e.filter(function(t){return!r.some(function(e){return e.username===t.username})})}function Zn(e,t,r){void 0===r&&(r=!1);e=Jn(e,t).filter(function(e){return jn(e,t)});return r&&e.push(t),e}var Qn=["ar","bs","ca","cs","da","de","en","es","et","el","fi","fr","hr","he","hu","it","id","ja","ko","lt","lv","nb","nl","pl","pt","pt-br","pt-pt","ro","ru","sl","sr","sv","th","tr","uk","vi","zh","zh-cn","zh-tw","zh-hk"];function $n(e,t){if("object"==typeof e&&null!==e&&"string"==typeof t){for(var r=t.split("."),n=0;n<r.length-1;n++){if(!e.hasOwnProperty(r[n]))return;e=e[r[n]]}delete e[r[r.length-1]]}}function Xn(e){var t=c(e.item);return t.text=JSON.stringify(e.data),t}function eo(e,t){return Promise.all([Me(e,t),He(e,t)]).then(function(e){return{item:e[0],data:e[1]}})}function to(e,t){var r=c(e),n=c(e.item);return n.data=c(e.data),je(I({item:n},t)).then(function(e){return r.item.id=e.id,r.item.created=(new Date).getTime(),r.item.modified=r.item.created,r})}function ro(e,t){var r=c(e),n=c(e.item);return n.data=c(e.data),_e(I({item:n},t)).then(function(){return r.item.modified=(new Date).getTime(),r})}function no(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return[4,He(r.id,n)];case 1:return t=e.sent(),[2,{item:r,data:t}]}})})}function oo(e,t,r){return void 0===r&&(r=void 0),t.split(".").reduce(function(e,t){return e?e[t]:r},e)}function io(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}function ao(e){return e instanceof Date}function so(e){return"function"==typeof e}function uo(e){return"object"==typeof e}function co(e){return e instanceof RegExp}function lo(e){return"object"==typeof e}function po(e){var o,t,r;return Array.isArray(e)?(t=e.map(n).filter(function(e){return null!=e}),r=t=t,t=t.reduce(function(e,t){return mo(t)&&ho(t)&&(e<(t=fo(t))&&(e=t)),e},-1),r=-1<t?0===t?[]:"{{delete:"+(t-1)+"}}":r):e&&lo(e)?(o=io(e,n),t=0<(t=Object.keys(o).reduce(function(e,t){var r,n=o[t];return mo(n)&&ho(n)?(r=fo(n))>e.maxLevel&&(e.maxLevel=r):e.obj[t]=n,e},{obj:{},maxLevel:-1})).maxLevel?1===t.maxLevel?void 0:"{{delete:"+(t.maxLevel-1)+"}}":t.obj):e="string"==typeof(e=r=e)&&ho(r)?function(e){var t=e,e=fo(e);t=0===e?void 0:"{{delete:"+e+"}}";return t}(r):e;function n(e,t){return po(e)}}var fo=function(e){return parseInt(e.replace(/{|}/g,"").split(":")[1])};function ho(e){return e&&"string"==typeof e&&-1<e.indexOf("{{delete")}var mo=function(e){return"string"==typeof e};function go(e,t,r,n){return void 0===n&&(n=0),t?t:"{{delete:"+n+"}}"}var bo=function(e){var t={};if(Array.isArray(e))t=e.map(bo);else if("object"==typeof e)for(var r in e)null!=e[r]&&"object"==typeof e[r]?t[r]=bo(e[r]):t[r]=e[r];else t=e;return t},yo=/{{\s*?[\w].*?}}/g,vo=function(e){return"string"==typeof e};function wo(e){return e||""===e||0===e}function Ao(e,a,s){if((s=bo(s=void 0===s?null:s)||{}).optional)throw new Error("Please do not pass in an `optional` transform; adlib provides that internally.");return s.optional=go,po(function r(e,n,o){return o=o||"",Array.isArray(e)?e.map(t):!e||!uo(e)||ao(e)||co(e)||so(e)?n(e,o):Object.assign({},e,io(e,t));function t(e,t){return r(e,n,o?o+"."+t:t)}}(e,function(t,e){if(!vo(t))return t;var r,n=t.match(yo);return n&&n.length?(n.map(function(e){var o,i=!1,t=e.replace(/{|}/g,"").trim(),r=(-1<t.indexOf("||")&&(r=t.split("||").map(function(e){return e.trim()}),o=r.length,t=r.find(function(e,t){var r,n;return n=a,r=(r=e).split(":")[0],null!=(n=oo(n,r,null))?e:t+1===o&&(i=!0,isNaN(e)?e:parseInt(e))})),{key:e,value:t});return i||(t=function(e,t,r){var n,o=e.split(":");if(1<o.length){var i,a=o[0],s=o[1];if(o[2]&&(i=o[2]),!r||!r[s]||"function"!=typeof r[s])throw new Error("Attempted to apply non-existant transform "+s+" on "+a+" with params "+e);n=oo(t,a),n=r[s](a,n,t,i)}else n=oo(t,e);return n}(t,a,s),r.value=wo(t)?t:e),r}).forEach(function(e){t===e.key?("string"!=typeof e.value||isNaN(e.value)||""===e.value||(-1<e.value.indexOf(".")?e.value=parseFloat(e.value):e.value=parseInt(e.value)),r=e.value):t=t.replace(e.key,e.value)}),wo(r)?r:t):t}))}function Do(e,t,r){return Ao(e,t,r)}function So(e,t,r){return Qe({q:'title:"'+e+'" AND '+Object.keys(t).map(function(e){return e+':"'+t[e]+'"'}).join(" AND "),authentication:r}).then(function(e){return 0<e.results.length}).catch(function(e){throw Error("Error in doesItemExistWithTitle "+e)})}function xo(e,t){return t.toLowerCase()+"-"+he(e)}function Eo(e,t){e=e.filter(function(e){return!e.startsWith("slug|")});return e.push("slug|"+t),e}function ko(e,t){return Co({slug:e},t).then(function(e){return e.length?e[0]:null})}function Co(e,t){t={q:"",filter:'typekeywords:"slug|'+e.slug+'"',authentication:t.authentication};return e.exclude&&(t.q="NOT id:"+e.exclude),Qe(t).then(function(e){return e.results}).catch(function(e){throw Error("Error in getItemBySlug "+e)})}function To(t,r,n){void 0===n&&(n=0);var o=t.slug;return Co({slug:o=n?t.slug+"-"+n:o,exclude:t.existingId},r).then(function(e){return e.length?To(t,r,++n):o}).catch(function(e){throw Error("Error in getUniqueSlug "+e)})}var qo=["id","isOrgItem","proxyFilter","ownerFolder","protected","owner","created","modified","guid","name","access","size","listed","numComments","numRatings","avgRating","numViews","scoreCompleteness","groupDesignations","listed","screenshots","banner","appCategories","industries","languages","largeThumbnail"];function Io(n,o,i,a){return f(this,void 0,void 0,function(){var t,r;return h(this,function(e){switch(e.label){case 0:t=I({item:{id:n},params:{thumbnail:o},filename:i},a),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,_e(t)];case 2:if(e.sent().success)return[3,4];throw new N("Set Project Thumbnail","Unknown error setting thumbnail.");case 3:throw(r=e.sent())instanceof Error?new N("Set Project Thumbnail",r.message,r):new N("Set Project Thumbnail","Unknown error setting thumbnail.");case 4:return[2]}})})}function Oo(e,t,r){return u(v(r)+"/oauth2/registerApp",{method:"POST",authentication:r.authentication,params:{itemId:e,appType:"browser",redirect_uris:JSON.stringify(t)}})}var Po={arcgis:{label:"ArcGIS Online",url:"https://www.arcgis.com",type:"arcgis"},arcgisQA:{label:"ArcGIS Online QAEXT",url:"https://qaext.arcgis.com",type:"arcgis"},arcgisDEV:{label:"ArcGIS Online DEVEXT",url:"https://devext.arcgis.com",type:"arcgis"},hub:{label:"ArcGIS Hub",url:"https://hub.arcgis.com/api",type:"arcgis-hub"},hubDEV:{label:"ArcGIS Hub DEV",url:"https://hubdev.arcgis.com/api",type:"arcgis-hub"},hubQA:{label:"ArcGIS Hub QA",url:"https://hubqa.arcgis.com/api",type:"arcgis-hub"}};function Uo(e){return"string"==typeof e&&e in Po?Po[e]:e}function No(e,t){var r=c(e);return t.from<e.from&&(r.from=t.from),t.to>e.to&&(r.to=t.to),r}function Ro(r,n){var o={};return["any","all","not","exact"].forEach(function(e){var t=m(Fo(r,e),Fo(n,e));t.length&&(o[e]=t.filter(Y))}),o}function Fo(e,t){var r=[];return e[t]&&(e=e[t],r=Array.isArray(e)?e:[e]),r}function Lo(e){var t={};return Array.isArray(e)?t={any:e}:("string"==typeof e&&(t={any:[e]}),"object"==typeof e&&(t=e)),t}function _o(e){var t=new Date,r={type:"date-range",from:t.getTime(),to:t.getTime()};switch(e.unit){case"hours":case"days":case"weeks":r.from=r.to-{min:6e4,hours:36e5,days:864e5,weeks:6048e5}[e.unit]*e.num;break;case"months":t.setMonth(t.getMonth()-e.num),r.from=t.getTime();break;case"years":t.setFullYear(t.getFullYear()-e.num),r.from=t.getTime()}return r}function T(e,t,r){var e=c(e),n=t.q,t=t.filter;return n&&(e.q=(e.q?" ("+e.q+" "+r+" "+n+")":n).trim()),t&&(e.filter=(e.filter?"("+e.filter+" "+r+" "+t+")":t).trim()),e}function jo(e,t){var r={q:"",filter:""};return t.exact&&(m(["username","firstname","lastname","fullname","email"],["title","tags","typekeywords","type","name","owner"],["title","typekeywords","owner"]).includes(e)?r.filter=Mo("AND",e,t.exact):("string"==typeof t.exact&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all.push(t.exact)),Array.isArray(t.exact)&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all=t.all.concat(t.exact)))),t.any&&(r.q=Mo("OR",e,t.any)),t.all&&(r.q=(r.q?r.q+" AND ":"")+Mo("AND",e,t.all)),t.not&&(r.q=(r.q?r.q+" AND ":"")+Mo("OR","-"+e,t.not)),r}function Bo(e,t){return{q:e+":["+t.from+" TO "+t.to+"]",filter:""}}function Mo(e,t,r){return Array.isArray(r)?"("+t+':"'+r.join('" '+e+" "+t+':"')+'")':t+':"'+r+'"'}function Go(e,t,r,n){var o=c(e);return e.authentication&&(o.authentication=Oe.deserialize(e.authentication.serialize())),o.start=-1<t?t:r+1,function(e){return e&&(o.authentication=e),n(o)}}function Ho(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/groups/"+t.id+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}function Vo(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/users/"+t.username+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}var Ko={$apps:[{type:{any:["Code Sample","Web Mapping Application","Mobile Application","Application","Desktop Application Template","Desktop Application","Operation View","Dashboard","Operations Dashboard Extension","Workforce Project","Insights Workbook","Insights Page","Insights Model","Hub Page","Hub Initiative","Hub Site Application","StoryMap","Web Experience","Web Experience Template","Form"],not:["Code Attachment","Featured Items","Symbol Set","Color Set","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]},typekeywords:{not:["MapAreaPackage","SMX"]}}],$storymap:[{type:"StoryMap"},{type:"Web Mapping Application",typekeywords:["Story Map"]}],$dashboard:[{type:"Dashboard",typekeywords:{any:["Dashboard"],not:["ArcGIS Operation View","Add In","Extension"]}}],$dataset:[],$experience:[{type:{any:["Web Experience"],not:["Web Experience Template"]}}],$site:[{type:["Hub Site Application","Site Application"]},{type:["Web Mapping Application"],typekeywords:["hubSite"]}],$initiative:[{type:{any:"Hub Initiative",not:"Hub Initiative Template"}}],$document:[{typekeywords:{any:"Document",not:["MapAreaPackage","SMX"]},type:{any:["Image","Layout","Desktop Style","Project Template","Report Template","Pro Report","Statistical Data Collection","360 VR Experience","netCDF","PDF","CSV","Administrative Report","Raster function template"],not:["Image Service","Explorer Document","Explorer Map","Globe Document","Scene Document","Code Attachment","Featured Items","Symbol Set","ColorSet","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]}}]};function zo(e){var t,o=[];return null!=(t=e.aggregations)&&t.counts&&e.aggregations.counts.forEach(function(r){var e={label:r.fieldName,attribute:r.fieldName,type:"multi-select"},n=[];r.fieldValues.forEach(function(e){var t={filterType:"content"},e=(t[r.fieldName]=e.value,{label:e.value,value:e.value,count:e.count,selected:!1,filter:t});n.push(e)}),e.options=n,o.push(e)}),o}function Yo(e){var e=e.map(Wo),n=["created","modified"],o=m(["filterType","subFilters","term"],n),e=e.reduce(function(r,e){return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r.hasOwnProperty(t)?o.includes(t)?n.includes(t)?r[t]=No(r[t],e):"term"===t?r[t]=r[t]+" "+e:"subFilters"===t&&(r[t]=m(r[t],e)):r[t]=Ro(r[t],e):r[t]=c(e)}),r},{});return e.filterType="content",e}function Wo(e){var t=Jo(e);return Array.isArray(e.subFilters)&&(t.subFilters=t.subFilters.reduce(function(e,t){return"string"==typeof t?Ko[t]&&(e=e.concat(Ko[t])):e.push(t),e},[])),$o(t)}function Jo(e){var r=c(e);return r.subFilters=r.subFilters||[],r.type&&(Array.isArray(r.type)?r.type=r.type.reduce(function(e,t){return Zo(t)?r.subFilters=r.subFilters.concat(Qo(t)):e.push(t),e},[]):Zo(r.type)&&(e=r.type,r.subFilters=r.subFilters.concat(Qo(e)),delete r.type)),r}function Zo(e){var t=!1;return t="string"==typeof e?e in Ko:t}function Qo(e){return Ko[e]}function $o(t){var e,r={},n=(t.term&&(r.term=t.term),["created","modified"]),o=m(["filterType","subFilters","term"],n);return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r[t]=Lo(e))}),t.subFilters&&Array.isArray(t.subFilters)&&(e=t.subFilters,r.subFilters=e.map($o)),n.forEach(function(e){t[e]&&("relative-date"===t[e].type?r[e]=_o(t[e]):r[e]=c(t[e]))}),r}function Xo(e){var t,r=ei(e);return e.subFilters&&(t=e.subFilters.reduce(function(e,t){return e="object"==typeof t?T(e,ei(t),"OR"):e},{q:"",filter:""}),r=T(r,t,"AND")),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function ei(e){var r={q:"",filter:""},n=["created","modified"],o=m(["filterType","subFilters","term"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=T(r,jo(t,e),"AND")),n.includes(t)&&(r=T(r,Bo(t,e),"AND"))}),r}function ti(e,t,r){var i,n=Xo(Wo(e)),e=(null!=(e=r.aggregations)&&e.length&&(n.countFields=r.aggregations.join(","),n.countSize=200),["authentication","num","sortField","sortOrder","site"].forEach(function(e){r.hasOwnProperty(e)&&(n[e]=r[e])}),i=t,function n(o){return f(this,void 0,void 0,function(){var t,r;return h(this,function(e){switch(e.label){case 0:return[4,Qe(o)];case 1:return t=e.sent(),[4,Promise.all(t.results.map(function(e){return i(e,o)}))];case 2:return r=e.sent(),[2,{total:t.total,results:r,facets:[],hasNext:-1<t.nextStart,next:Go(o,t.nextStart,t.total,n)}]}})})});return r.api&&!r.authentication&&(t=Uo(r.api),n.portal=t.url),e(n)}ni.prototype.modelToObject=function(e,t){return r=this.mappings,oi(e,"modelKey",t,"objectKey",r);var r},ni.prototype.objectToModel=function(e,t){return r=this.mappings,oi(e,"objectKey",t,"modelKey",r);var r};var ri=ni;function ni(e){this.mappings=e}function oi(r,n,e,o,t){var i=c(e);return t.forEach(function(e){var t=q(e,n),e=q(e,o),t=q(r,t);null!=t&&$(i,e,t)}),i}var jt="Hub Project",ii={name:"No title provided",tags:[],typeKeywords:["Hub Project"],status:"inactive"},ai={item:{type:jt,title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:["Hub Project"],properties:{slug:""}},data:{display:"about",timeline:{},status:"inactive",contacts:[],schemaVersion:1}};function si(){var t=[];return["created","culture","description","extent","id","modified","owner","snippet","tags","typeKeywords","url","type"].forEach(function(e){t.push({objectKey:e,modelKey:"item."+e})}),["contacts","display","geometry","headerImage","layout","location","status"].forEach(function(e){t.push({objectKey:e,modelKey:"data."+e})}),t.push({objectKey:"slug",modelKey:"item.properties.slug"}),t.push({objectKey:"orgUrlKey",modelKey:"item.properties.orgUrlKey"}),t.push({objectKey:"name",modelKey:"item.title"}),t}function ui(i,a){return f(this,void 0,void 0,function(){var t,r,n,o;return h(this,function(e){switch(e.label){case 0:return(t=I(I({},ii),i)).slug||(t.slug=xo(t.name,t.orgUrlKey)),[4,To({slug:(r=t).slug},a)];case 1:return r.slug=e.sent(),t.typeKeywords=Eo(t.typeKeywords,t.slug),n=new ri(si()),[4,to(o=n.objectToModel(t,c(ai)),a)];case 2:return o=e.sent(),[2,n.modelToObject(o,{})]}})})}function ci(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,To({slug:(t=o).slug,existingId:o.id},i)];case 1:return t.slug=e.sent(),[4,eo(o.id,i)];case 2:return n=e.sent(),r=new ri(si()),[4,ro(r.objectToModel(o,n),i)];case 3:return n=e.sent(),[2,r.modelToObject(n,o)]}})})}function li(e,t){e=(fe(e)?Me:ko)(e,t);return e.then(function(e){return fi(e,t)})}function pi(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){switch(e.label){case 0:return[4,We(I(I({},r),{id:t}))];case 1:return e.sent(),[2]}})})}function di(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return[2,ti(Yo([{filterType:"content",type:{exact:["Hub Project"]}},t]),fi,r)]})})}function fi(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,no(o,i)];case 1:return t=e.sent(),n=new ri(si()),i.authentication&&(r=i.authentication,r=r.token),(n=n.modelToObject(t,{})).thumbnailUrl=br(t.item,i,r),[2,n]}})})}O.init=function(e){return new O(e)},Object.defineProperty(O.prototype,"context",{get:function(){return this._contextManager?this._contextManager.context:this._context},enumerable:!1,configurable:!0}),O.prototype.create=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return t.orgUrlKey||(t.orgUrlKey=this.context.portal.urlKey),[2,ui(t,r||this.context.userRequestOptions)];throw new N("Create Project","Creating Hub Projects requires authentication.")})})},O.prototype.update=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,ci(t,r||this.context.userRequestOptions)];throw new N("Update Project","Updating Hub Projects requires authentication.")})})},O.prototype.destroy=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,pi(t,r||this.context.userRequestOptions)];throw new N("Destroy Project","Destroying Hub Projects requires authentication.")})})},O.prototype.get=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return console.warn("HubProjectManager.get is deprecated and will be removed. Use .fetch() instead."),[2,this.fetch(t,r)]})})},O.prototype.fetch=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.requestOptions)return[2,li(t,r||this.context.requestOptions)];throw new N("Fetch Project","Can not retrieve context.requestOptions from Context Manager. HubProjectManager is configured incorrectly.")})})},O.prototype.search=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return!r.authentication&&this.context.session&&(r.authentication=this.context.session),[2,di(t,r)]})})},O.prototype.updateThumbnail=function(r,n,o,i){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=i||this.context.userRequestOptions,[4,Io(r.id,n,o,t)];case 1:return e.sent(),[2,this.fetch(r.id,i)]}})})},O.prototype.fromItem=function(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){return t=n||this.context.userRequestOptions,[2,fi(r,t)]})})};var hi,mi=O;function O(e){e instanceof Lt?this._contextManager=e:this._context=e}function gi(e,t){var r=e;return r=-1===e.indexOf("token")&&-1<e.indexOf(t.authentication.portal)?e+"?token="+t.authentication.token:r}function bi(e,t){return(t=void 0===t?{}:t).credentials||(t.credentials="same-origin"),fetch(e,t).then(function(e){return e.blob()})}function yi(r){return bi(r.url).then(function(e){return Le(t={id:r.id,owner:r.owner,name:r.fileName,resource:e,authentication:r.authentication}).then(function(e){e=y(t)+"/content/users/"+e+"/items/"+t.id+"/addResources";return t.params=I({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content,access:t.private?"private":"inherit"},t.params),u(e,t)});var t})}function vi(t){return bi(t.url).then(function(e){return _e({item:{id:t.id,owner:t.owner},params:{fileName:t.fileName,thumbnail:e},authentication:t.authentication}).catch(function(e){return Promise.resolve()})}).catch(function(e){return Promise.resolve()})}function wi(r){var n={},o=["created","modified"],i=m(["term","searchUserAccess"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||l(t,Lo(e),n),o.includes(t)&&(e=c(q(r,t)),"relative-date"===q(r,t+".type")?l(t,_o(e),n):l(t,e,n))}),r.hasOwnProperty("searchUserAccess")&&(n.searchUserAccess=r.searchUserAccess),r.term&&(n.term=r.term),n}function Ai(e){var r={q:"",filter:""},n=["created","modified"],o=m(["term","searchUserAccess","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=T(r,jo(t,e),"AND")),n.includes(t)&&(r=T(r,Bo(t,e),"AND"))}),e.hasOwnProperty("searchUserAccess")&&(r.searchUserAccess=e.searchUserAccess),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function Di(r){var n={},o=["created","modified","lastlogin"],i=m(["disabled","term"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||l(t,Lo(e),n),o.includes(t)&&(e=c(q(r,t)),"relative-date"===q(r,t+".type")?l(t,_o(e),n):l(t,e,n))}),r.hasOwnProperty("disabled")&&(n.disabled=r.disabled),r.term&&(n.term=r.term),n}function Si(e){var r={q:"",filter:""},n=["created","modified","lastlogin"],o=m(["term","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=T(r,jo(t,e),"AND")),n.includes(t)&&(r=T(r,Bo(t,e),"AND"))}),e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),e.term&&(r.q=("("+e.term+") "+r.q).trim()),r}function xi(o){function i(e){return e.thumbnailUrl=br(e,r,t),e}var e,t,r=(null==(e=o.authentication)?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);return Qe(o).then(function(e){var t=-1<e.nextStart,r=e.results.map(An),n=(r=(r=o.site?r.map(function(e){return Cn(e,o.site)}):r).map(i),zo(e));return{total:e.total,results:r,facets:n,hasNext:t,next:Go(o,e.nextStart,e.total,xi)}})}function Ei(o){function i(e){return e.siteTeamUrl=o.site.item.url+"/teams/"+e.id+"/about",e}function a(e){return e.thumbnailUrl=Ho(r,e,t),e}var e,t,r=(null==(e=o.authentication)?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);return Ze(o,"group").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!=(t=null==(t=o.site)?void 0:t.item)&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Go(o,e.nextStart,e.total,Ei)}})}function ki(o){function i(e){return e.profileUrl=o.site.item.url+"/people/"+e.username+"/profile",e}function a(e){return e.thumbnail&&(e.thumbnailUrl=Vo(t,e,r)),e}var t=o.authentication.portal,r=o.authentication.token;return Ze(o,"user").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!=(t=null==(t=o.site)?void 0:t.item)&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Go(o,e.nextStart,e.total,ki)}})}function Ci(e){if(1.4<=q(e,"item.properties.schemaVersion"))return e;var e=c(e),t=q(e,"data.values.gacode");return e.data.values.telemetry={consentNotice:{isTheme:!0,consentText:"",policyURL:""},customAnalytics:{ga:{customerTracker:{enabled:Boolean(t),id:t}}}},$n(e,"data.values.gacode"),l("item.properties.schemaVersion",1.4,e),e}function Ti(t){return f(this,void 0,void 0,function(){return h(this,function(e){return 200<=t.status&&t.status<300?[2,t.json()]:[2,t.json().then(function(e){throw e.error?new Error(e.error.title+" :: "+e.error.detail+" :: "+t.status):new Error("Got "+t.status+" "+t.statusText)})]})})}function P(e){var t={},e=q(e,"authentication.token");return e&&(t.Authorization=e),t}function U(e){return(e||"https://hub.arcgis.com")+"/api/v3/domains"}function qi(e,t){var r=e,n="hubsubdomain|"+(r=-1<e.indexOf("#/")?e.split("#/")[1]:r);return Qe(Object.assign({q:"typekeywords: "+n},t)).then(function(e){return e.results.filter(function(e){return d(e.typeKeywords,n)})[0]}).then(function(e){if(e)return{hostname:e.url,siteId:e.id};throw new Error("site not found")})}function Ii(e,t){if(t.isPortal)throw new Error("addDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",""+U(t.hubApiUrl)),n=e.siteTitle;return"number"==typeof n&&(e.siteTitle=n.toString()),fetch(t,{method:"POST",headers:r,mode:"cors",body:JSON.stringify(e)}).then(Ti)}function Oi(e,t){if(t.isPortal)throw new Error("domainExists is not available in ArcGIS Enterprise.");e=wt(e);e=U(t.hubApiUrl)+"/"+e,t=P(t);return fetch(e,{method:"GET",headers:t,mode:"cors"}).then(function(e){return 404!==e.status})}function Pi(e,t){return qi(e,t).then(function(e){return!0}).catch(function(e){return!1})}function Ui(t,r,n,o){var i=t;return Oi((i=(o=void 0===o?0:o)?t+"-"+o:t)+"-"+r,n).then(function(e){return e?Ui(t,r,n,o+1):i})}function Ni(t,r,n){var o=(n=void 0===n?0:n)?t+"-"+n:t;return Pi(o,r).then(function(e){return e?Ni(t,r,n+1):o})}function Ri(e,t){return t.isPortal?qi(e,t):(e=U(t.hubApiUrl)+"/"+e,t=P(t),fetch(e,{method:"GET",headers:t,mode:"cors"}).then(Ti))}function Fi(e,t){if(t.isPortal)throw new Error("removeDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",U(t.hubApiUrl)+"/"+e);return fetch(t,{method:"DELETE",headers:r,mode:"cors"}).then(Ti)}function Li(e,t){if(t.isPortal)throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",U(t.hubApiUrl)+"/?siteId="+e);return fetch(t,{method:"DELETE",headers:r,mode:"cors"}).then(Ti)}function _i(e,t){var e=c(e),r=63;return t&&(r-=t.length+1),e=e.length>r?e.slice(0,r-6)+"-"+de(5):e}function ji(e,t){return(t.isPortal?Ni(e,t):Ui(e,t.portalSelf.urlKey+"."+wt(Pt(t)),t)).then(function(e){return _i(e,t.portalSelf.urlKey)})}function Bi(r,n){return n.isPortal?Promise.resolve([]):Promise.all(["defaultHostname","customHostname"].reduce(function(e,t){var t=q(r,"data.values."+t);return t&&(t={hostname:t,clientKey:r.data.values.clientId,orgId:n.portalSelf.id,orgTitle:n.portalSelf.name,orgKey:n.portalSelf.urlKey,siteId:r.item.id,siteTitle:r.item.title,sslOnly:!0},e.push(Ii(t,n))),e},[]))}function Mi(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:if(n.isPortal)throw new Error("removeDomainByHostname is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");e.label=1;case 1:return e.trys.push([1,5,,6]),[4,Ri(r,n)];case 2:return(t=e.sent(),t=q(t,"id"))?[4,Fi(t,n)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:throw t=e.sent(),new Error("Error removing domain entry for "+r+": "+t);case 6:return[2]}})})}function Gi(e,t){return fe(e)?Hi(e,t):Ri(wt(e).split("/")[0],t).then(function(e){return Hi(e.siteId,t)})}function Hi(e,t){return eo(e,t).then(ca)}function Vi(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=a(r,"rootCause",r),(n=hi.call(this,e,t,r)||this).name="HubError",n.stack=a(r,"stack",(new Error).stack),n}ae(Vi,hi=pe);var N=Vi;var Ki="Hub Site Application",zi="Site Application",Yi={name:"No title provided",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],capabilities:["api_explorer","pages","my_data","social_logins","json_chart_card","document_iframes","items_view","app_page","underlinedLinks","globalNav","socialSharing"],catalog:{groups:[]},subdomain:"",defaultHostname:"",customHostname:"",clientId:"",map:null,feeds:{},pages:[],theme:null,contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}}},Wi={item:{title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],properties:{slug:"",orgUrlKey:"",defaultHostname:"",customHostname:"",clientId:"",subdomain:"",schemaVersion:1.5},url:""},data:{catalog:{groups:[]},feeds:{},values:{title:"",defaultHostname:"",customHostname:"",subdomain:"",faviconUrl:"",uiVersion:"2.4",clientId:"",map:{basemaps:{}},defaultExtent:{},pages:[],theme:{},layout:{sections:[],header:{component:{name:"site-header",settings:{fullWidth:!1,iframeHeight:"150px",iframeUrl:"",links:[],logoUrl:"",title:"default site",markdown:"",headerType:"default",schemaVersion:3,showLogo:!0,showTitle:!0,logo:{display:{},state:"valid"},shortTitle:"",menuLinks:[],socialLinks:{facebook:{},twitter:{},instagram:{},youtube:{}}}},showEditor:!1},footer:{component:{name:"site-footer",settings:{footerType:"none",markdown:"",schemaVersion:2.1}},showEditor:!1}},contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}}}}};function Ji(){var t=[];["created","culture","description","extent","id","modified","owner","snippet","tags","typeKeywords","url","type"].forEach(function(e){t.push({objectKey:e,modelKey:"item."+e})}),["catalog","feeds"].forEach(function(e){t.push({objectKey:e,modelKey:"data."+e})});return["pages","theme","capabilities","subdomain","defaultHostname","customHostname","clientId","defaultExtent","map","telemetry","headerSass"].forEach(function(e){t.push({objectKey:e,modelKey:"data.values."+e})}),t.push({objectKey:"slug",modelKey:"item.properties.slug"}),t.push({objectKey:"orgUrlKey",modelKey:"item.properties.orgUrlKey"}),t.push({objectKey:"name",modelKey:"item.title"}),t}function Zi(s,u){return f(this,void 0,void 0,function(){var t,r,n,o,i,a;return h(this,function(e){switch(e.label){case 0:return t=I(I({},Yi),s),r=u.portalSelf,t.type=u.isPortal?zi:Ki,t.slug||(t.slug=xo(t.name,t.orgUrlKey)),t.typeKeywords=Eo(t.typeKeywords,t.slug),t.subdomain||(t.subdomain=he(t.name)),[4,ji((n=t).subdomain,u)];case 1:return n.subdomain=e.sent(),u.isPortal?(t.typeKeywords.push(("hubsubdomain|"+t.subdomain).toLowerCase()),t.url=u.authentication.portal.replace("/sharing/rest","/apps/sites")+"/#/"+t.subdomain):(t.defaultHostname=t.subdomain+"-"+r.urlKey+"."+wt(Pt(u)),t.url="https://"+(t.customHostname||t.defaultHostname)),t.orgUrlKey=r.urlKey,t.theme||(t.theme=aa(r)),t.defaultExtent||(t.defaultExtent=r.defaultExtent),t.culture||(t.culture=r.culture),q(t,"map.basemaps.primary")||l("map.basemaps.primary",r.defaultBasemap,t),q(t,"layout.header.component.settings.title")||l("layout.header.component.settings.title",t.name,t),o=new ri(Ji()),[4,to(i=o.objectToModel(t,c(Wi)),u)];case 2:return[4,na(i=e.sent(),u)];case 3:return a=e.sent(),i.data.values.clientId=a.client_id,[4,Bi(i,u)];case 4:return e.sent(),[4,ro(i,u)];case 5:return a=e.sent(),[2,o.modelToObject(a,{})]}})})}function Qi(i,a){return f(this,void 0,void 0,function(){var t,r,n,o;return h(this,function(e){switch(e.label){case 0:return t=new ri(Ji()),r=t.objectToModel(i,c(Wi)),[4,eo(i.id,a)];case 1:return n=e.sent(),[4,function(o,i,a){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){return t={clientKey:o.data.values.clientId,orgId:a.portalSelf.id,orgTitle:a.portalSelf.name,orgKey:a.portalSelf.urlKey,siteId:o.item.id,siteTitle:o.item.title,sslOnly:!0},r={remove:[],add:[]},["customHostname","defaultHostname"].forEach(function(e){var t=q(i,"data.values."+e),e=q(o,"data.values."+e);e!==t&&(r.remove.push(t),r.add.push(e))}),n=[],r.add.map(function(e){e=I({hostname:e},t);n.push(Ii(e,a))}),r.remove.map(function(e){n.push(Mi(e,a))}),[2,Promise.all(n)]})})}(r,n,a)];case 2:return e.sent(),r.item.properties.slug!==n.item.properties.slug&&(r.item.typeKeywords=Eo(r.item.typeKeywords,r.item.properties.slug)),[4,ro(t.objectToModel(i,n),a)];case 3:return o=e.sent(),[2,t.modelToObject(o,i)]}})})}function $i(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){switch(e.label){case 0:return r.isPortal?[3,2]:[4,Li(t,r)];case 1:e.sent(),e.label=2;case 2:return[4,We(I(I({},r),{id:t}))];case 3:return e.sent(),[2]}})})}function Xi(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,Gi(o,i)];case 1:return t=e.sent(),r=new ri(Ji()),r=r.modelToObject(t,{}),i.authentication&&(n=i.authentication,n=n.token),r.thumbnailUrl=br(t.item,i,n),[2,r]}})})}function ea(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,no(o,i)];case 1:return t=e.sent(),n=new ri(Ji()),i.authentication&&(r=i.authentication,r=r.token),(n=n.modelToObject(t,{})).thumbnailUrl=br(t.item,i,r),[2,n]}})})}function ta(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return[2,ti(Yo([{filterType:"content",type:"$site"},t]),ea,r)]})})}R.init=function(e){return new R(e)},Object.defineProperty(R.prototype,"context",{get:function(){return this._contextManager?this._contextManager.context:this._context},enumerable:!1,configurable:!0}),R.prototype.create=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return t.orgUrlKey||(t.orgUrlKey=this.context.portal.urlKey),[2,Zi(t,r||this.context.hubRequestOptions)];throw new N("Create Site","Creating Hub Sites requires authentication.")})})},R.prototype.update=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,Qi(t,r||this.context.hubRequestOptions)];throw new N("Update Site","Updating a Hub Site requires authentication.")})})},R.prototype.destroy=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,$i(t,r||this.context.hubRequestOptions)];throw new N("Destroy Site","Destroying Hub Sites requires authentication.")})})},R.prototype.fetch=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){try{if(r||this.context.hubRequestOptions)return[2,Xi(t,r||this.context.hubRequestOptions)];throw new N("Fetch Site","Can not retrieve context.hubRequestOptions from Context Manager. HubSiteManager is configured incorrectly.")}catch(e){throw new N("Fetch Site","Can not retrieve context.hubRequestOptions from Context Manager. HubSiteManager is configured incorrectly.",e)}return[2]})})},R.prototype.search=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return!r.authentication&&this.context.session&&(r.authentication=this.context.session),[2,ta(t,r)]})})},R.prototype.updateThumbnail=function(r,n,o,i){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=i||this.context.userRequestOptions,[4,Io(r.id,n,o,t)];case 1:return e.sent(),[2,this.fetch(r.id,i)]}})})},R.prototype.fromItem=function(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){return t=n||this.context.userRequestOptions,[2,ea(r,t)]})})};var ra=R;function R(e){e instanceof Lt?this._contextManager=e:this._context=e}function na(e,t){if(t.isPortal)return Promise.resolve({});var r=[e.data.values.defaultHostname],r=(q(e,"data.values.customHostname")&&r.push(e.data.values.customHostname),r.reduce(function(e,t){return e.concat(At(t))},[]));return Oo(e.item.id,r,t)}var oa=1.5,ia={header:{background:"#fff",text:"#4c4c4c"},body:{background:"#fff",text:"#4c4c4c",link:"#0079c1"},button:{background:"#0079c1",text:"#fff"},logo:{small:""},fonts:{base:{url:"",family:"Avenir Next"},heading:{url:"",family:"Avenir Next"}}};function aa(e){var t=c(ia),e=q(e,"portalProperties.sharedTheme");return t=e?W(t,X(e)):t}function sa(e){if(1.5<=q(e,"item.properties.schemaVersion"))return e;var r,e=c(e),t=e.data.values.dcatConfig;return e.data.feeds={},t&&(e.data.feeds.dcatUS11=(r=JSON.stringify(t),Object.keys(ua).forEach(function(e){var t=ua[e];r=r.split(e).join(t)}),JSON.parse(r))),e.item.properties.schemaVersion=1.5,e}var ua={"{{default.name}}":"{{name}}","{{default.description}}":"{{description}}","{{item.tags}}":"{{tags}}","{{item.created:toISO}}":"{{created:toISO}}","{{item.modified:toISO}}":"{{modified:toISO}}","{{default.source.source}}":"{{source}}","{{item.owner}}":"{{owner}}","{{org.portalProperties.links.contactUs.url}}":"{{orgContactEmail}}","{{org.name}}":"{{orgName}}","{{item.categories}}":"{{categories}}","{{item.licenseInfo}}":"{{licenseInfo}}","{{item.modified}}":"{{modified}}","{{enrichments.categories}}":"{{categories}}","{{default.id}}":"{{id}}","{{item.licenseInfo || No License}}":"{{licenseInfo || No License}}","{{org.portalProperties.links.contactUs.url || mailto:data@tempe.gov}}":"{{orgContactEmail || mailto:data@tempe.gov}}","{{default.description || No Description}}":"{{description || No Description}}","{{item.id}}":"{{id}}"};function ca(e){return q(e,"item.properties.schemaVersion")===oa?e:sa(e=Ci(e=function(e){if(1.3<=q(e,"item.properties.schemaVersion"))return e;var t=q(e=c(e),"data.catalog.groups")||[];return e.data.catalog.groups=t.filter(fe),e.item.properties.schemaVersion=1.3,e}(e=function(e){if(1.2<=q(e,"item.properties.schemaVersion"))return e;var t=q(e=c(e),"data.catalog")||{};return q(e,"data.values.groups")&&(t.groups=c(e.data.values.groups),delete e.data.values.groups),e.data.catalog=t,e.item.properties.schemaVersion=1.2,e}(e=function(e){if(1.1<=q(e,"item.properties.schemaVersion"))return e;var t=c(e);return["subdomain","defaultHostname","internalUrl","customHostname","externalUrl"].forEach(function(e){t.data.values[e]&&"string"==typeof t.data.values[e]&&(t.data.values[e]=t.data.values[e].toLowerCase())}),t.item.properties.schemaVersion=1.1,t}(e=function(e){if(1<=q(e,"item.properties.schemaVersion"))return e;var t=c(e);return["groupId","title"].forEach(function(e){delete t.data.values[e]}),t.item.properties||(t.item.properties={}),t.item.properties.schemaVersion=1,t.data.values.groups&&Array.isArray(t.data.values.groups)&&(e=t.data.values.groups.map(function(e){return"object"==typeof e?e.id:e}).filter(function(e){return!!e}),t.data.values.groups=e),t}(e))))))}function la(e,t){return Ve(I({id:e,relationshipType:"Survey2Service",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function pa(e,t){return Ve(I({id:e,relationshipType:"Service2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function da(e,t){return Ve(I({id:e,relationshipType:"Survey2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function fa(t){function e(e){return-1<t.typeKeywords.indexOf(e)}var r=e("FieldworkerView");return r=r||["Survey123","Feature Service","View Service"].every(e)&&!e("StakeholderView")}ha.create=function(r){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return r.contextManager?[2,new ha(r.contextManager)]:[3,1];case 1:return t=r.managerOptions||{},[4,Lt.create(t)];case 2:return[2,new ha(e.sent())]}})})},Object.defineProperty(ha.prototype,"context",{get:function(){return this._contextManager.context},enumerable:!1,configurable:!0}),Object.defineProperty(ha.prototype,"projects",{get:function(){return this._projectManager||(this._projectManager=mi.init(this._contextManager)),this._projectManager},enumerable:!1,configurable:!0}),Object.defineProperty(ha.prototype,"sites",{get:function(){return this._siteManager||(this._siteManager=ra.init(this._contextManager)),this._siteManager},enumerable:!1,configurable:!0});Bt=ha;function ha(e){this._contextManager=e}n.ArcGISContext=Ft,n.ArcGISContextManager=Lt,n.DEFAULT_THEME=ia,n.ENTERPRISE_SITE_ITEM_TYPE=zi,n.GLOBAL_EXTENT=Xt,n.HUB_CDN_URLMAP=yt,n.HUB_LOCALES=Qn,n.HUB_PROJECT_ITEM_TYPE=jt,n.HUB_SITE_ITEM_TYPE=Ki,n.Hub=Bt,n.HubError=N,n.HubProjectManager=mi,n.HubSiteManager=ra,n.Logger=i,n.OperationError=pe,n.OperationStack=Br,n.PORTAL_EXPORT_TYPES=Pn,n.REQUIRED_PRIVS=Ne,n.RemoteServerError=cn,n.SEARCH_APIS=Po,n.SITE_SCHEMA_VERSION=oa,n.STANDARD_LICENSES=mr,n.WGS84_WKID=On,n._addTokenToResourceUrl=gi,n._canEmailUser=jn,n._checkStatusAndParseJson=Ti,n._consolidateResults=Ln,n._deepMapValues=L,n._ensureSafeDomainLength=_i,n._ensureTelemetry=Ci,n._fetchSite=Xi,n._formatAutoAddResponse=_n,n._getAuthHeader=P,n._getAutoAddUsers=Wn,n._getDomainServiceUrl=U,n._getEmailUsers=Zn,n._getHttpAndHttpsUris=At,n._getInviteUsers=Jn,n._getLocation=function(){if(window)return window.location},n._isDate=j,n._isFunction=B,n._isObject=M,n._isOrgAdmin=Bn,n._isRegExp=G,n._isString=_,n._lookupPortal=qi,n._mapValues=F,n._processAutoAdd=Vn,n._processInvite=zn,n._processPrimaryEmail=Yn,n._processSecondaryEmail=Gn,n._searchContent=function(o,i){var a;return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){return t=Wo(o),r=Uo(i.api||"arcgis"),[2,"arcgis"===r.type?(n=Xo(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),null!=(a=i.aggregations)&&a.length&&(n.countFields=i.aggregations.join(","),n.countSize=200),xi(n)):Promise.resolve({total:0,results:[],facets:[],hasNext:!1,next:function(){Promise.resolve(null)}})]})})},n._searchGroups=function(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){if(t=wi(o),"arcgis"===(r=Uo(i.api||"arcgis")).type)return n=Ai(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),[2,Ei(n)];throw new Error("_searchGroups is not implemented for non-arcgis apis")})})},n._searchUsers=function(n,o){return f(this,void 0,void 0,function(){var t,r;return h(this,function(e){if(!o.authentication)throw new Error("Authentication required to search for users.");if(t=Di(n),"arcgis"===Uo(o.api||"arcgis").type)return r=Si(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){o.hasOwnProperty(e)&&(r[e]=o[e])}),[2,ki(r)];throw new Error("_searchUsers is not implemented for non-arcgis apis")})})},n._unprotectAndRemoveGroup=function(e){var t=o(it,{success:!0}),r=o(at,{success:!0});return t(e).then(function(){return r(e)})},n._unprotectAndRemoveItem=function(e){var t=o(ze,{success:!0}),r=o(We,{success:!0});return t(e).then(function(){return r(e)})},n.addContextToSlug=_r,n.addDays=function(e,t){try{var r=new Date(e);return new Date(r.setDate(r.getDate()+t)).toISOString().split("T")[0]}catch(e){throw new Error("Invalid Date")}},n.addDomain=Ii,n.addSiteDomains=Bi,n.addSolutionResourceUrlToAssets=function(e,t){var r,n,o=e.assets||e.resources||[];return e.bundleItemId&&(r=v(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=o.map(function(e){return{name:e.name,type:e.type||"resource",url:r+"/resources/"+n+"-"+e.name}})),o},n.addUsersToGroup=function(e,t,r,n,o){var i=c(a(r,"portalSelf.user",{}));return i.cOrgId=q(r,"portalSelf.portalProperties.hub.settings.communityOrg.orgId"),Vn({groupId:e,allUsers:t,primaryRO:r,email:n,secondaryRO:o,requestingUser:i,usersToAutoAdd:Wn(t,i),usersToInvite:Jn(t,i),usersToEmail:Zn(t,i,q(n,"copyMe"))}).then(zn).then(Yn).then(Gn).then(Ln)},n.applyPropertiesToItems=function(e,t){return e.map(function(e){return e.properties||(e.properties={}),Object.assign(e.properties,t),e})},n.arrayToObject=function(e,r){return e.reduce(function(e,t){return e[q(t,r)]=t,e},{})},n.atob=In.atob,n.autoAddUsers=Hn,n.bBoxToPolygon=nr,n.batch=oe,n.btoa=In.btoa,n.buildDraft=function(e,t){return te(e,{},t)},n.buildExistingExportsPortalQuery=function(e,t){var r,n,o,i,a=(t=function(e){if(e)return{onlyTypes:e.onlyTypes,layerId:e.layerId,spatialRefId:e.spatialRefId};return{}}(t)).onlyTypes,s=t.layerId,t=t.spatialRefId,u=Object.keys(Pn).map(function(e){return Pn[e]}),c=new Set(Q(u.filter(function(e){return!e.supportsProjection}).map(function(e){return e.itemTypes}))),a=a||Q(u.map(function(e){return e.itemTypes})),u=(new Je).startGroup().match(Rn(e)).in("typekeywords").and().match(Fn(s)).in("typekeywords").endGroup().and().startGroup();function l(e,t){var r;t.startGroup().match(/\s/g.test(e)?e:'"'+e+'"').in("type").and().match(Nn((t=e,e=On,e=(r=i)&&!o.has(t)?r:e))).in("typekeywords").endGroup()}return r=u,n=(e={types:a,spatialRefId:t,noProjectionItemTypes:c}).types,o=e.noProjectionItemTypes,i=e.spatialRefId,n.forEach(function(e,t){l(e,r),t<n.length-1&&r.or()}),u.endGroup(),u.toParam()},n.buildUrl=Re,n.camelize=z,n.canEditEvent=function(e,t){var r=!1;return Pe(t)&&(e=q(e,"initiative.item.properties.collaborationGroupId"),t=t.groups,r=!!e&&!!H(void 0===t?[]:t,"id",e)),r},n.canEditItem=Ue,n.canEditSite=function(e,t){var r=!1;return r=!q(e,"properties.isDefaultHubHome")&&Pe(t)?Ue(e,t):r},n.canEditSiteContent=function(e,t){var r,n=!1,o=q(e,"properties.isDefaultHubHome"),i=Pe(t);return!o&&i?n=Ue(e,t):i&&(o=t.orgId,i=e.orgId,o&&o===i&&(r=t.privileges||[],n=Ne.every(function(e){return d(r,e)}))),n},n.capitalize=J,n.categories=Wt,n.chunkArray=function(e,t){for(var r=[],n=0;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r},n.clearSession=function(e,t){(t=void 0===t?window:t).localStorage&&t.localStorage.removeItem("__CONTEXT_"+e)},n.cloneObject=c,n.completeOAuth2=function(t,e){var r=(e=(e=void 0===e?window:e).location.href.match(/access_token=(.+)&expires_in=.+&username=([^&]+)/))[1],n="https://www.arcgis.com/sharing/rest/community/users/"+decodeURIComponent(e[2]);return u(n,{params:{token:r},httpMethod:"GET"}).then(function(e){return Date.now()-e.created<5e3?u(n+"/update",{params:{token:r,tags:["hubRole:participant","org:"+e.orgId],access:"public"}}).then(function(){return Oe.completeOAuth2(t)}):Oe.completeOAuth2(t)})},n.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(function(r,n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(n.apply(void 0,e))}})},n.composeContent=Rr,n.constructSlug=xo,n.convertContentDefinitionToFilter=$o,n.convertContentFilterToSearchOptions=ei,n.convertItemToProject=fi,n.convertItemToSite=ea,n.convertPortalResponseToFacets=zo,n.convertSolutionTemplateResourcesToAssets=function(e,t){var r,n,o=[];return e.resources&&e.bundleItemId&&(r=v(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=e.resources.map(function(e){return{name:e,type:"resource",url:r+"/resources/"+n+"-"+e}})),o},n.convertToWellKnownLocale=function(e){var t="en";return e=(e=void 0===e?"en":e).toLowerCase(),-1<Qn.indexOf(e)?t=e:1<(e=e.split("-")).length&&-1<Qn.indexOf(e[0])&&(t=e[0]),t},n.convertUrlsToAnchorTags=function(t){var e=t.match(/((((ftp|https?):\/\/)|(w{3}\.))[-\w@:%_+.~#?,&//=]+)/g);return e&&e.forEach(function(e){t=t.replace(e,'<a target="_blank" href="'+e+'">'+e+"</a>")}),t.replace("(","<br/>(")},n.createExtent=function(e,t,r,n,o){return{xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:{wkid:o=void 0===o?4326:o}}},n.createId=V,n.createModel=to,n.createOperationPipeline=le,n.createProject=ui,n.createSite=Zi,n.dasherize=function(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase().replace(/[ _]/g,"-")},n.datasetToContent=function(e){var t=Dn(e),r=(e=e.attributes).errors,n=e.boundary,o=e.metadata,i=e.slug,a=e.groupIds,s=e.orgId,u=e.orgName,c=e.organization,l=e.orgExtent,p=e.server,d=e.layers,f=e.layer,h=e.recordCount,m=e.statistics,g=e.extent,e=e.searchDescription,f=f&&f.id;return Rr(t,{layerId:f,slug:i,errors:r,metadata:o||null,groupIds:a,org:s&&{id:s,name:u||c,extent:l},server:p,layers:d,recordCount:h,boundary:n,extent:g,searchDescription:e,statistics:m})},n.datasetToItem=Dn,n.deepFind=re,n.deepFindById=function(e,t){return re(e,function(e){return e.id===t})},n.deepSet=$,n.deepStringReplace=ee,n.deleteProp=$n,n.destroyProject=pi,n.destroySite=$i,n.doesItemExistWithTitle=So,n.domainExists=Oi,n.domainExistsPortal=Pi,n.emailOrgUsers=Mn,n.ensureProp=function(e,t){return $(e,t)},n.ensureUniqueDomainName=ji,n.ensureUniqueString=function(e,t){for(var r=!1,n=0,o=t;!r;)d(e,o)?o=t+"-"+ ++n:r=!0;return o},n.expandApi=Uo,n.expandApis=function(e){return e.map(Uo)},n.expandContentFilter=Wo,n.expandGroupFilter=wi,n.expandTypeField=Jo,n.expandUserFilter=Di,n.extend=W,n.extentToBBox=$t,n.failSafe=o,n.failSafeUpdate=function(e,t){return o(_e,{id:e.item.id,success:!0})(Object.assign({item:Xn(e)},t))},n.fetchAllPages=function(n,o,r,i){void 0===r&&(r=-1);var a=o.num||100,e=o.start||1;return(-1===r?n(I(I({},o),{num:a,start:e})):Promise.resolve({nextStart:e,total:r,results:[],num:a})).then(function(t){if(-1===t.nextStart)return[t];for(var e=[],r=t.nextStart;r<=t.total;r+=a)e.push(r);return oe(e,function(e){return n(I(I({},o),{start:e,num:a}))},i).then(function(e){return m([t],e)})}).then(function(e){var e=e.reduce(function(e,t){return m(e,t.results)},[]),t=-1===r?e.length:r;return e.slice(0,t)})},n.fetchAndUploadResource=yi,n.fetchAndUploadThumbnail=vi,n.fetchContent=function(s,d){return f(void 0,void 0,void 0,function(){var t,r,n,o,i,a;return h(this,function(e){switch(e.label){case 0:return Lr(s)?[4,(l=_r(s,null==d?void 0:d.siteOrgKey),p=d,f(void 0,void 0,void 0,function(){var t,r,n,o,i,a,s;return h(this,function(e){switch(e.label){case 0:return[4,gn(l,p)];case 1:return t=e.sent(),r=t.itemId,n=t.layerId,[4,yn(r,p)];case 2:return(i=e.sent(),o=i.item,i=ue(i,["item"]),a=p&&p.layerId,Z(a)||a===n)?[3,4]:(n=a,s=[I({},t)],[4,bn(r+"_"+n,p)]);case 3:t=I.apply(void 0,s.concat([e.sent()])),e.label=4;case 4:return[2,Rr(o,I(I(I({requestOptions:p},i),t),{layerId:n,slug:l,errors:un([i.errors,t.errors])}))]}})}))]:[3,2];case 1:return r=e.sent(),[3,4];case 2:return[4,(u=s,c=d,f(void 0,void 0,void 0,function(){var t,r,n,o,i,a,s;return h(this,function(e){switch(e.label){case 0:return t=Fr(u).itemId,[4,yn(t,c)];case 1:return(t=e.sent(),r=t.item,n=ue(t,["item"]),o=c&&c.layerId,ar(r,c))?[4,bn(u,c)]:[3,3];case 2:return a=e.sent(),[3,4];case 3:a={},e.label=4;case 4:return s=(i=a).layerId,[2,Rr(r,I(I(I({requestOptions:c},n),i),{layerId:Z(o)?s:o,errors:un([n.errors,i.errors])}))]}})}))];case 3:r=e.sent(),e.label=4;case 4:return(n=(t=r).layer,o=t.type,i=t,n&&["Feature Layer","Table"].includes(o))?[4,mn(t,d)]:[3,6];case 5:return a=e.sent(),[3,7];case 6:a=void 0,e.label=7;case 7:return i.recordCount=a,[2,t]}var u,c,l,p})})},n.fetchHubTranslation=function(t,e,r){void 0===r&&(r="cors");var n=(vt(e)+"/locales/"+t+".json").toLocaleLowerCase();return fetch(n,{method:"GET",credentials:"same-origin",mode:r}).then(function(e){return e.json()}).catch(function(e){throw Error("Attempt to fetch locale "+t+" from "+n+" failed: "+JSON.stringify(e))})},n.fetchImageAsBlob=bi,n.fetchModelFromItem=no,n.fetchProject=li,n.fetchSite=function(e,t){return console.warn("@esri/hub-common::fetchSite is deprecated. Please use @esri/hub-common::fetchSiteModel instead"),Gi(e,t)},n.fetchSiteModel=Gi,n.filterBy=function(e,t,r){return e.filter(function(e){return q(e,t)===r})},n.findBy=H,n.findItemsBySlug=Co,n.flattenArray=Q,n.generateRandomString=de,n.getCategory=vn,n.getContentIdentifier=wn,n.getContentSiteUrls=xn,n.getContentTypeIcon=vr,n.getContentTypeLabel=Sn,n.getCulture=function(e){return q(e,"portalSelf.user.culture")||q(e,"portalSelf.culture")||"en-us"},n.getDomainsForSite=function(e,t){return t.isPortal?Promise.resolve([]):(e=U(t.hubApiUrl)+"?siteId="+e,t=P(t),fetch(e,{method:"GET",headers:t,mode:"cors"}).then(Ti).catch(function(e){throw Error("Error in getDomainsForSite "+e)}))},n.getExportItemTypeKeyword=Rn,n.getExportLayerTypeKeyword=Fn,n.getFamily=or,n.getGeographicOrgExtent=er,n.getGroupThumbnailUrl=Ho,n.getHubApiFromPortalUrl=Ct,n.getHubApiUrl=Pt,n.getHubApiUrlFromPortal=function(e){return St(e)+"/api/v3"},n.getHubLocaleAssetUrl=vt,n.getHubProduct=function(e){var t=q(e,"portalProperties.hub.enabled")||!1?"premium":"basic";return t=e.isPortal&&"singletenant"===e.portalMode?"portal":t},n.getHubUrlFromPortal=St,n.getInputFeatureServiceModel=la,n.getItemApiUrl=Et,n.getItemAssets=function(e,t){var r=v(t.portalSelf)+"/content/items/"+e.id,n=br(e,t),o=[];return n&&o.push({name:e.thumbnail,url:n,type:"thumbnail"}),n=e.id,n=Ge(n,e=t)+"/resources",(e=I({},e)).params=I({num:1e3},e.params),u(n,e).then(function(e){e=e.resources.map(function(e){return{name:e.resource,type:"resource",url:r+"/resources/"+e.resource}});return o.concat(e)})},n.getItemBySlug=ko,n.getItemDataUrl=kt,n.getItemHomeUrl=xt,n.getItemHubId=Ir,n.getItemHubType=function(e){return console.warn("DEPRECATED: Use getFamily() instead. getItemHubType() will be removed at v10.0.0"),e=qr(e="string"==typeof e?{type:e}:e),_t(e)},n.getItemLayer=Ur,n.getItemLayerId=Or,n.getItemThumbnailUrl=br,n.getLayerIdFromUrl=Cr,n.getModel=eo,n.getModelBySlug=function(e,r){return ko(e,r).then(function(e){var t=[Promise.resolve(e)];return e?t.push(He(e.id,r)):t.push(Promise.resolve(null)),Promise.all(t)}).then(function(e){return e[0]?{item:e[0],data:e[1]}:null})},n.getModelFromOptions=function(e,t){var r=e+"Model",e=e+"Id";if(t[r])return Promise.resolve(t[r]);if(t[e])return o(eo,{item:{id:t[e]},isMissing:!0})(t[e],t);throw new Error("getModelFromOptions requires either a ."+r+" or ."+e+" property.")},n.getNextFunction=Go,n.getOrgDefaultTheme=aa,n.getOrgExtentAsBBox=function(e){return er(e).then($t)},n.getPortalApiUrl=v,n.getPortalBaseFromOrgUrl=Tt,n.getPortalUrl=bt,n.getPortalUrls=wr,n.getProp=q,n.getProps=function(r,e){return e.reduce(function(e,t){t=q(r,t);return t&&e.push(t),e},[])},n.getProxyUrl=Ar,n.getServiceTypeFromUrl=Ot,n.getSession=function(e,t){var r=null;return r=(t=void 0===t?window:t).localStorage&&(t=t.localStorage.getItem("__CONTEXT_"+e))?Oe.deserialize(t):r},n.getSiteById=Hi,n.getSourceFeatureServiceModelFromFieldworker=pa,n.getSpatialRefTypeKeyword=Nn,n.getStakeholderModel=da,n.getStructuredLicense=gr,n.getSubscriptionType=function(e){return a(e,"subscriptionInfo.type","Enterprise")},n.getSurveyModels=function(e,r){var n,o;return("string"==typeof e?Me(e,r):Promise.resolve(e)).then(function(t){var e=[la(t.id,r),da(t.id,r)];return Promise.all(e).then(function(e){var t=e[0],e=e[1];return o=e,t&&fa(t.item)?pa((n=t).item.id,r):t}).then(function(e){return{form:{item:t},featureService:e,fieldworker:n,stakeholder:o}})})},n.getTypeCategories=function(e){return(e=vn(qr(e=void 0===e?{}:e)))?((e=Array.from(e))[0]=e[0].toUpperCase(),[e.join("")]):["Other"]},n.getTypes=function(e){return Wt[(e=void 0===e?"":e).toLowerCase()]},n.getUniqueDomainName=Ui,n.getUniqueDomainNamePortal=Ni,n.getUniqueItemTitle=function t(r,n,o,i){var a=(i=void 0===i?0:i)?r+" "+i:r;return So(a,n,o).then(function(e){return e?t(r,n,o,++i):a}).catch(function(e){throw Error("Error in getUniqueItemTitle "+e)})},n.getUniqueSlug=To,n.getUserThumbnailUrl=Vo,n.getWithDefault=a,n.hasBasePriv=Pe,n.hubApiRequest=pn,n.hubApiSearch=function(e){var t=(t=e.authentication)&&t.serialize&&{authentication:t.serialize()};return pn("/search",I(I({},{headers:t,httpMethod:"POST"}),e))},n.includes=d,n.incrementString=function(e){var t=e.match(/-\s(\d+$)/);return t?(t=parseInt(t[1],10),e=e.replace("- "+t,"- "+(t+1))):e+=" - 1",e},n.interpolate=Do,n.interpolateItemId=function(e){return Do(e,{item:{id:e.item.id},appid:e.item.id},{toISO:function(e,t){return t}})},n.inviteUsers=Kn,n.isBBox=tr,n.isDomainForLegacySite=function(e){return!fe(e.siteId)},n.isDomainUsedElsewhere=function(e,t,r){return Ri(e,r).then(function(e){return e.siteId!==t}).catch(function(){return!1})},n.isDownloadable=Jt,n.isExtentCoordinateArray=rr,n.isFeatureService=Tr,n.isFieldworkerView=fa,n.isGuid=fe,n.isLayerView=Nr,n.isMapOrFeatureServerUrl=qt,n.isNil=Z,n.isSlug=Lr,n.isUpdateGroup=me,n.isValidDomain=function(t,e){if(e.isPortal)throw new Error("isValidDomain is not available in ArcGIS Enterprise.");var r=U(e.hubApiUrl)+"/validate?hostname="+t,e=P(e);return fetch(r,{method:"GET",headers:e,mode:"cors"}).then(function(e){return e.json()}).catch(function(e){return{success:!1,input:t,error:{code:400,detail:e,message:"lookupFailed"}}})},n.isValidExtent=function(t){return!!t&&[rr,function(t){return["xmin","ymin","xmax","ymax"].every(function(e){return"number"==typeof t[e]})}].some(function(e){return e(t)})},n.itemPropsNotInTemplates=qo,n.itemToContent=An,n.last=function(e){return e[e.length-1]},n.lookupDomain=Ri,n.mapBy=function(t,e){return(e=void 0===e?[]:e).map(function(e){return e[t]})},n.maybeAdd=function(e,t,r){return null!=t&&((r=c(r))[e]=t),r},n.maybePush=K,n.mergeContentFilter=Yo,n.mergeDateRange=No,n.mergeGroupFilters=function(e){var e=e.map(wi),o=["created","modified"],i=m(["filterType","term"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t,r=e[0],e=e[1];n.hasOwnProperty(r)?(t=q(n,r),i.includes(r)?o.includes(r)?l(r,No(t,e),n):"term"===r&&(n[r]=n[r]+" "+e):l(r,Ro(t,e),n)):l(r,c(e),n)}),n},{filterType:"group"})},n.mergeMatchOptions=Ro,n.mergeObjects=te,n.mergeSearchOptions=T,n.mergeUserFilters=function(e){var e=e.map(Di),o=["created","modified","lastlogin"],i=m(["disabled","term","filterType"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t,r=e[0],e=e[1];n.hasOwnProperty(r)?(t=q(n,r),i.includes(r)?o.includes(r)?l(r,No(t,e),n):"term"===r&&(n[r]=n[r]+" "+e):l(r,Ro(t,e),n)):l(r,c(e),n)}),n},{filterType:"user"})},n.normalizeItemType=qr,n.normalizeSolutionTemplateItem=function(e){var t=c(e);return qo.forEach(function(e){delete t[e]}),t.extent="{{organization.defaultExtentBBox}}",t},n.objectToArray=function(r,n){return void 0===n&&(n="id"),Object.keys(r).reduce(function(e,t){return r[t][n]=t,e.push(c(r[t])),e},[])},n.objectToJsonBlob=function(e){if("undefined"!=typeof Blob)return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")},n.parseDatasetId=Fr,n.parseItemCategories=Pr,n.processRevertableTasks=function(e){return Promise.all(e).then(function(e){function t(e){return"fullfilled"===e.status}var r,n=e.filter(t),e=e.filter(function(e){return!t(e)});if(e.length)throw r=n.map(function(e){return e.revert()}),Promise.all(r).catch(function(){}),e[0].error;return n.map(function(e){return e.results})})},n.propifyString=function(e){return e=z(e=(e=e.replace(/^[0-9]*/g,"")).replace(/[^\w\s]/g,""))},n.registerBrowserApp=Oo,n.registerSiteAsApplication=na,n.relativeDateToDateRange=_o,n.removeContextFromSlug=jr,n.removeDomain=Fi,n.removeDomainByHostname=Mi,n.removeDomainsBySiteId=Li,n.removeEmptyProps=X,n.replaceItemId=function(e,t,r){return void 0===r&&(r="{{appid}}"),ee(c(e),new RegExp(t,"g"),r)},n.runRevertableTask=function(e,t){return e().then(function(e){return{status:"fullfilled",results:e,revert:t}}).catch(function(e){return{status:"rejected",error:e}})},n.saveSession=function(e,t,r){(r=void 0===r?window:r).localStorage&&r.localStorage.setItem("__CONTEXT_"+e,t.serialize())},n.searchProjects=di,n.searchSites=ta,n.serializeContentFilterForPortal=Xo,n.serializeDateRange=Bo,n.serializeGroupFilterForPortal=Ai,n.serializeMatchOptions=jo,n.serializeModel=Xn,n.serializeSpatialReference=Un,n.serializeStringOrArray=Mo,n.serializeUserFilterForPortal=Si,n.setContentHubId=function(e,t){var r=e.id,r=e.slug||t||r,e=I(I({},e),{hubId:t,identifier:r});return En(e,{relative:kn(e)})},n.setContentSiteUrls=Cn,n.setContentType=function(e,t){var t=qr(I(I({},e.item),{type:t})),r=or(t),n=vr(t),o=Sn(t,e.isProxied),e=I(I({},e),{type:t,family:r,normalizedType:t,contentTypeIcon:n,contentTypeLabel:o});return En(e,{relative:kn(e)})},n.setItemThumbnail=Io,n.setProp=l,n.setSlugKeyword=Eo,n.shareItemToGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),dt(e)}))},n.slugify=he,n.stringToBlob=function(e,t){if(void 0===t&&(t="application/octet-stream"),"undefined"==typeof Blob)throw new Error("stringToBlob is not currently supported on Node");for(var r=[],n=0;n<e.length;n++)r[n]=e.charCodeAt(n);var o=new Uint8Array(r);return new Blob([o],{type:t})},n.stripProtocol=wt,n.unique=Y,n.uniqueBy=function(e,r){return e.reduce(function(e,t){return K(e.find(function(e){return q(e,r)===q(t,r)})?null:t,e)},[])},n.unprotectModel=function(e,t){return e.item.protected?ze(Object.assign({id:e.item.id},t)):Promise.resolve({success:!0})},n.unshareItemFromGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),mt(e)}))},n.updateDomain=function(e,t){if(t.isPortal)throw new Error("updateDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",U(t.hubApiUrl)+"/"+e.id),n=e.siteTitle;return"number"==typeof n&&(e.siteTitle=n.toString()),fetch(t,{method:"PUT",headers:r,mode:"cors",body:JSON.stringify(e)}).then(Ti)},n.updateModel=ro,n.updateProject=ci,n.updateSite=Qi,n.upgradeProtocol=function(e){return-1===e.indexOf("http")?"https://"+e:-1!==e.indexOf("http://")?e.replace(/^http:/i,"https:"):e},n.upgradeSiteSchema=ca,n.uploadResourcesFromUrl=function(n,e,o){return Array.isArray(e)?(e=e.reduce(function(e,t){var r;return t.url&&(r={id:n.item.id,owner:n.item.owner,fileName:t.name,url:gi(t.url,o),authentication:o.authentication},"thumbnail"===t.type?e.push(vi(r)):e.push(yi(r))),e},[]),Promise.all(e)):Promise.resolve([])},n.valueToMatchOptions=Lo,n.without=function(e,t){return e.filter(function(e){return e!==t})},n.withoutByProp=function(t,r,e){return e.filter(function(e){return e[t]!==r})},Object.defineProperty(n,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arcgisHub=e.arcgisHub||{})}(this,function(n){"use strict";function F(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}function L(e,r,n){return n=n||"",Array.isArray(e)?e.map(t):!e||!M(e)||j(e)||G(e)||B(e)?r(e,n):Object.assign({},e,F(e,t));function t(e,t){return L(e,r,""+(n?n+"."+t:t))}}function _(e){return"string"==typeof e||e instanceof String}function j(e){return e instanceof Date}function B(e){return"function"==typeof e}function M(e){return"object"==typeof e}function G(e){return e instanceof RegExp}function q(e,t){return t.split(".").reduce(function(e,t){return e?e[t]:void 0},e)}function c(e){var t,r={};if(Array.isArray(e))r=e.map(c);else if("object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&(null!=(t=e[n])&&"object"==typeof t?t instanceof Date?r[n]=new Date(t.getTime()):r[n]=c(t):r[n]=t);else r=e;return r}function H(e,r,n){return e?e.reduce(function(e,t){return e=q(t,r)===n?t:e},null):null}function V(e){return""+(e=void 0===e?"i":e)+Math.random().toString(36).substr(2,8)}function K(e,t){return null!=e&&(t=c(t)).push(e),t}function z(e){return(e=(e=e.toLowerCase()).replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi," ")).replace(/(\-|\_|\.|\s)+(.)?/g,function(e,t,r){return r?r.toUpperCase():""}).replace(/(^|\/)([A-Z])/g,function(e,t,r){return e.toLowerCase()})}function Y(e,t,r){return r.indexOf(e)===t}function W(e,n,o){void 0===o&&(o=!0);e=c(e);return Object.keys(n).reduce(function(e,t){var r;return null!==n[t]&&void 0!==n[t]&&(r=c(n[t]),Array.isArray(r)?e[t]=r:e[t]=o&&"object"==typeof r?W(e[t]||{},r,o):r),e},e)}function J(e){return(e=Array.from(e))[0]=e[0].toUpperCase(),e.join("")}var Z=function(e){return null==e};function Q(e){return e.reduce(function(e,t){return e.concat(t)},[])}function $(e,t,r){void 0===r&&(r={});var t=t.split("."),n=e,o=t.length-1;t.forEach(function(e,t){n.hasOwnProperty(e)&&null!=n[e]?t===o&&("object"!=typeof n[e]||Array.isArray(n[e])?n[e]=r:n[e]=Object.assign(n[e],c(r))):n[e]=t===o?r:{},n=n[e]})}function a(e,t,r){e=q(e,t);return void 0!==e?e:r}function X(t){return Object.keys(t).forEach(function(e){t[e]&&"object"==typeof t[e]?X(t[e]):null==t[e]&&delete t[e]}),t}function ee(e,r,n){return L(e,function(e){if(!_(e))return e;var t=G(r)?r:new RegExp(r,"g");return e.replace(t,n)})}function te(t,r,e){return Array.isArray(e)&&e.length?(e.forEach(function(e){void 0!==q(t,e)&&$(r,e,q(t,e))}),r):t}function l(e,t,r){$(r,e=Array.isArray(e)?e.join("."):e,t)}function re(r,n){return Array.isArray(r)?r.reduce(function(e,t){return n(t)?e=t:ne(t)&&(t=re(t,n))&&(e=t),e},void 0):ne(r)?n(r)?r:Object.keys(r).reduce(function(e,t){return e=ne(r[t])&&(t=re(r[t],n))?t:e},void 0):void 0}function ne(e){var t=!1;return t=!e||!M(e)||j(e)||G(e)||B(e)?t:!0}function oe(e,n,o){void 0===o&&(o=5);return e.reduce(function(e,t){var r=e[e.length-1];return r&&r.length!==o||e.push(r=[]),r.push(t),e},[]).reduce(function(e,r){return e.then(function(t){var e=r.map(function(e){return n(e)});return Promise.all(e).then(function(e){return t.concat(e)})})},Promise.resolve([]))}function d(e,t){return-1!==e.indexOf(t)}var ie=function(e,t){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function ae(e,t){function r(){this.constructor=e}ie(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var se,I=function(){return(I=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function ue(e,t){var r={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function f(e,a,s,u){return new(s=s||Promise)(function(r,t){function n(e){try{i(u.next(e))}catch(e){t(e)}}function o(e){try{i(u.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(n,o)}i((u=u.apply(e,a||[])).next())})}function h(n,o){var i,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,a&&(s=2&t[0]?a.return:t[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){u.label=t[1];break}if(6===t[0]&&u.label<s[1]){u.label=s[1],s=t;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(t);break}s[2]&&u.ops.pop(),u.trys.pop();continue}t=o.call(n,u)}catch(e){t=[6,e],a=0}finally{i=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function m(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function ce(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=a(r,"rootCause",r),(n=se.call(this,t)||this).operation=e,n.name="OperationError",n.rootCause=r,Object.setPrototypeOf(n,ce.prototype),n.stack=a(r,"stack",(new Error).stack),n}ae(ce,se=Error);function le(e){return function(r){return e.reduce(function(e,t){return e.then(t).catch(function(e){return"OperationError"===e.name?Promise.reject(e):(e="IPipeableFn did not reject with an OperationError \n Operation Stack: \n "+r.stack.toString(),(e=new pe("pipeline execution error",e)).operationStack=r.stack.serialize(),Promise.reject(e))})},Promise.resolve(r))}}var pe=ce;function o(r,n){return void 0===n&&(n={}),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.apply(void 0,e).catch(function(e){return n})}}function de(e){var r=(new Date).getTime();return Array(e).fill(0).reduce(function(e){var t=(r+16*Math.random())%16|0;return r=Math.floor(r/16),e=""+e+t.toString(16)},"")}function fe(e){"{"===e[0]&&(e=e.substring(1,e.length-1));return/^(\{){0,1}[0-9a-fA-F]{8}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{4}[-]?[0-9a-fA-F]{12}(\}){0,1}$/gi.test(e)}function he(e){return"string"==typeof e?e.trim().toLowerCase().replace(/ +/g,"-").replace(/[^\w-]/g,"").replace(/-+/g,"-"):e}n.Level=void 0,(S=n.Level||(n.Level={}))[S.all=0]="all",S[S.debug=1]="debug",S[S.info=2]="info",S[S.warn=3]="warn",S[S.error=4]="error",S[S.off=5]="off";e.setLogLevel=function(e){this.logLevel=e},e.log=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.log.apply(console,m([e],t))},e.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.debug)&&console.debug.apply(console,m([e],t))},e.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.info)&&console.info.apply(console,m([e],t))},e.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.warn)&&console.warn.apply(console,m([e],t))},e.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.isLevelPermitted(n.Level.error)&&console.error.apply(console,m([e],t))},e.isLevelPermitted=function(e){return this.logLevel<=e},e.logLevel=n.Level.off;var i=e;function e(){}function me(e){return e.capabilities.includes("updateitemcontrol")}function ge(t){return Object.keys(t).some(function(e){e=t[e];if(!e)return!1;switch((e=e&&e.toParam?e.toParam():e).constructor.name){case"Array":case"Object":case"Date":case"Function":case"Boolean":case"String":case"Number":return!1;default:return!0}})}function be(o){var i={};return Object.keys(o).forEach(function(e){var t=o[e];if((t=t&&t.toParam?t.toParam():t)||0===t||"boolean"==typeof t||"string"==typeof t){switch(t.constructor.name){case"Array":var r=null==(r=null==(r=t[0])?void 0:r.constructor)?void 0:r.name,n="Array"===r?t:"Object"===r?JSON.stringify(t):t.join(",");break;case"Object":n=JSON.stringify(t);break;case"Date":n=t.valueOf();break;case"Function":n=null;break;case"Boolean":n=t+"";break;default:n=t}(n||0===n||"string"==typeof n||Array.isArray(n))&&(i[e]=n)}}),i}function ye(e){var t=be(e);return Object.keys(t).map(function(e){return function t(r,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(function(e){return t(r,e)}).join("&"):encodeURIComponent(r)+"="+encodeURIComponent(e)}(e,t[e])}).join("&")}var p=function(e,t,r,n,o){e=e||"UNKNOWN_ERROR",t=t||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message="UNKNOWN_ERROR_CODE"===t?e:t+": "+e,this.originalMessage=e,this.code=t,this.response=r,this.url=n,this.options=o};function t(e){console&&console.warn&&console.warn.apply(console,[e])}p.prototype=Object.create(Error.prototype),p.prototype.constructor=p;var ve,we="@esri/arcgis-rest-js",Ae={httpMethod:"POST",params:{f:"json"}},g=(ae(De,ve=p),De.prototype.retry=function(e,n){function o(t,r){e(i.url,i.options).then(function(e){e=I(I({},i.options),{authentication:e});return a+=1,u(i.url,e)}).then(function(e){t(e)}).catch(function(e){"ArcGISAuthError"===e.name&&a<n?o(t,r):"ArcGISAuthError"===e.name&&n<=a?r(i):r(e)})}var i=this,a=(void 0===n&&(n=3),0);return new Promise(function(e,t){o(e,t)})},De);function De(e,t,r,n,o){r=ve.call(this,e=void 0===e?"AUTHENTICATION_ERROR":e,t=void 0===t?"AUTHENTICATION_ERROR_CODE":t,r,n,o)||this;return r.name="ArcGISAuthError",r.message="AUTHENTICATION_ERROR_CODE"===t?e:t+": "+e,r}function u(a,e){void 0===e&&(e={params:{f:"json"}});var s=I(I(I({httpMethod:"POST"},Ae),e),{params:I(I({},Ae.params),e.params),headers:I(I({},Ae.headers),e.headers)}),e=[],t=[];if(s.fetch||"undefined"==typeof fetch?(e.push("`fetch`"),t.push("`node-fetch`")):s.fetch=fetch.bind(Function("return this")()),"undefined"==typeof Promise&&(e.push("`Promise`"),t.push("`es6-promise`")),"undefined"==typeof FormData&&(e.push("`FormData`"),t.push("`isomorphic-form-data`")),!s.fetch||"undefined"==typeof Promise||"undefined"==typeof FormData)throw new Error("`arcgis-rest-request` requires a `fetch` implementation and global variables for `Promise` and `FormData` to be present in the global scope. You are missing "+e.join(", ")+". We recommend installing the "+t.join(", ")+" modules at the root of your application to add these to the global scope. See https://bit.ly/2KNwWaJ for more info.");var e=s.httpMethod,u=s.authentication,n=s.rawResponse,c=I({f:"json"},s.params),r=null,l={method:e,credentials:s.credentials||"same-origin"};return s.headers&&s.headers["X-Esri-Auth-Client-Id"]&&-1<a.indexOf("/oauth2/platformSelf")&&(l.credentials="include"),(u?u.getToken(a,{fetch:s.fetch}).catch(function(e){return e.url=a,e.options=s,r=e,Promise.resolve("")}):Promise.resolve("")).then(function(e){e.length&&(c.token=e),u&&u.getDomainCredentials&&(l.credentials=u.getDomainCredentials(a));var t,r,n,o,i={},e=("GET"===l.method&&(c.token&&s.hideToken&&"undefined"==typeof window&&(i["X-Esri-Authorization"]="Bearer "+c.token,delete c.token),r=""===ye(c)?a:a+"?"+ye(c),s.maxUrlLength&&r.length>s.maxUrlLength||c.token&&s.hideToken?(l.method="POST",e.length&&s.hideToken&&(c.token=e,delete i["X-Esri-Authorization"])):a=r),new RegExp("/items/.+/updateResources").test(a));return"POST"===l.method&&(l.body=(r=e,r=ge(t=c)||r,o=be(t),r?(n=new FormData,Object.keys(o).forEach(function(e){var t;"undefined"!=typeof Blob&&o[e]instanceof Blob?(t=o.fileName||o[e].name||e,n.append(e,o[e],t)):n.append(e,o[e])}),n):ye(t))),l.headers=I(I({},i),s.headers),"undefined"!=typeof window||l.headers.referer||(l.headers.referer=we),ge(c)||e||(l.headers["Content-Type"]="application/x-www-form-urlencoded"),s.fetch(a,l)}).then(function(e){var t,r;if(!e.ok)throw t=e.status,r=e.statusText,new p(r,"HTTP "+t,e,a,s);if(n)return e;switch(c.f){case"json":case"geojson":return e.json();case"html":case"text":return e.text();default:return e.blob()}}).then(function(e){var t;return"json"!==c.f&&"geojson"!==c.f||n?e:(e=function(t,e,r,n){if(400<=t.code)throw i=t.message,a=t.code,new p(i,a,t,e,r);if(t.error){var o=t.error,i=o.message,a=o.code,o=o.messageCode,s=o||a||"UNKNOWN_ERROR_CODE";if(498===a||499===a||"GWM_0003"===o||400===a&&"Unable to generate token."===i)throw n||new g(i,s,t,e,r);throw new p(i,s,t,e,r)}if("failed"!==t.status&&"failure"!==t.status)return t;i=void 0,a="UNKNOWN_ERROR_CODE";try{i=JSON.parse(t.statusMessage).message,a=JSON.parse(t.statusMessage).code}catch(e){i=t.statusMessage||t.message}throw new p(i,a,t,e,r)}(e,a,s,r),r&&(t=a.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0],s.authentication.federatedServers[t]={token:[],expires:new Date(Date.now()+864e5)},r=null),e)})}function Se(r,e,t){var n=I(I({params:{}},t),r);return n.params=e.reduce(function(e,t){return!r[t]&&"boolean"!=typeof r[t]||(e[t]=r[t]),e},n.params),["params","httpMethod","rawResponse","authentication","portal","fetch","maxUrlLength","headers"].reduce(function(e,t){return n[t]&&(e[t]=n[t]),e},{})}function s(e){return"string"==typeof e&&"/"===(e=e.trim())[e.length-1]?e.slice(0,-1):e}function xe(e){return e.replace(/^#/,"").split("&").reduce(function(e,t){r=(t=(t=t).split("="))[0],t=t[1];var r={key:decodeURIComponent(r),value:decodeURIComponent(t)};return e[r.key]=r.value,e},{})}function Ee(e,t){return t.rawResponse=!1,u(e,t).then(function(e){var t={token:e.access_token,username:e.username,expires:new Date(Date.now()+(1e3*e.expires_in-1e3)),ssl:!0===e.ssl};return e.refresh_token&&(t.refreshToken=e.refresh_token),t})}function ke(e,t){return"undefined"!=typeof window&&window.location&&window.location.host?t.params.referer=window.location.host:t.params.referer=we,u(e,t)}var Ce=/^https?:\/\/(\S+)\.arcgis\.com.+/;function Te(e){return Ce.test(e)}function qe(e){if(!Ce.test(e))return null;e=e.match(Ce)[1].split(".").pop();return e.includes("dev")?"dev":e.includes("qa")?"qa":"production"}function Ie(e,t){t=s(function(e){if(!Ce.test(e))return e;switch(qe(e)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}(t)).replace(/https?:\/\//,""),e=s(e).replace(/https?:\/\//,"");return new RegExp(e,"i").test(t)}Object.defineProperty(b.prototype,"token",{get:function(){return this._token},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"tokenExpires",{get:function(){return this._tokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"refreshToken",{get:function(){return this._refreshToken},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"refreshTokenExpires",{get:function(){return this._refreshTokenExpires},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"trustedServers",{get:function(){return console.log("DEPRECATED: use federatedServers instead"),this.federatedServers},enumerable:!1,configurable:!0}),b.beginOAuth2=function(e,t){void 0===t&&(t=window),e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r,n,o=I({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",state:e.clientId,locale:""},e),i=o.portal,a=o.provider,s=o.clientId,u=o.expiration,c=o.redirectUri,l=o.popup,p=o.popupWindowFeatures,d=o.state,f=o.locale,o=o.params,a="arcgis"===a?i+"/oauth2/authorize?client_id="+s+"&response_type=token&expiration="+(e.duration||u)+"&redirect_uri="+encodeURIComponent(c)+"&state="+d+"&locale="+f:i+"/oauth2/social/authorize?client_id="+s+"&socialLoginProviderName="+a+"&autoAccountCreateForSocial=true&response_type=token&expiration="+(e.duration||u)+"&redirect_uri="+encodeURIComponent(c)+"&state="+d+"&locale="+f;{if(o&&(a=a+"&"+ye(o)),l)return(n={promise:null,resolve:null,reject:null}).promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),r=n,t["__ESRI_REST_AUTH_HANDLER_"+s]=function(e,t){if(e)return e=JSON.parse(e),void r.reject(new g(e.errorMessage,e.error));t&&(e=JSON.parse(t),r.resolve(new b({clientId:s,portal:i,ssl:e.ssl,token:e.token,tokenExpires:new Date(e.expires),username:e.username})))},t.open(a,"oauth-window",p),r.promise;t.location.href=a}},b.completeOAuth2=function(e,o){void 0===o&&(o=window);var e=I({portal:"https://www.arcgis.com/sharing/rest",popup:!0},e),i=e.portal,a=e.clientId,s=e.popup;function t(e,t){try{var r=void 0,n="__ESRI_REST_AUTH_HANDLER_"+a;if(s&&(o.opener?o.opener.parent&&o.opener.parent[n]?r=o.opener.parent[n]:o.opener&&o.opener[n]&&(r=o.opener[n]):o!==o.parent&&o.parent&&o.parent[n]&&(r=o.parent[n]),r))return r(e?JSON.stringify(e):void 0,JSON.stringify(t)),void o.close()}catch(e){throw new g('Unable to complete authentication. It\'s possible you specified popup based oAuth2 but no handler from "beginOAuth2()" present. This generally happens because the "popup" option differs between "beginOAuth2()" and "completeOAuth2()".')}if(e)throw new g(e.errorMessage,e.error);return new b({clientId:a,portal:i,ssl:t.ssl,token:t.token,tokenExpires:t.expires,username:t.username})}e=xe(o.location.hash);if(!e.access_token)return r=void 0,n="Unknown error",e.error&&(r=e.error,n=e.error_description),t({error:r,errorMessage:n});var r=e.access_token,n=new Date(Date.now()+1e3*parseInt(e.expires_in,10)-6e4),u=e.username;return t(void 0,{token:r,expires:n,ssl:"true"===e.ssl,username:u})},b.fromParent=function(e,n){var o;return!n&&window&&(n=window),new Promise(function(t,r){o=function(e){if(e.source===n.parent&&e.data)try{return t(b.parentMessageHandler(e))}catch(e){return r(e)}},n.addEventListener("message",o,!1),n.parent.postMessage({type:"arcgis:auth:requestCredential"},e)}).then(function(e){return n.removeEventListener("message",o,!1),e})},b.authorize=function(e,t){e.duration&&console.log("DEPRECATED: 'duration' is deprecated - use 'expiration' instead");var r=I({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),n=r.portal,o=r.clientId,i=r.expiration,r=r.redirectUri;t.writeHead(301,{Location:n+"/oauth2/authorize?client_id="+o+"&expiration="+(e.duration||i)+"&response_type=code&redirect_uri="+encodeURIComponent(r)}),t.end()},b.exchangeAuthorizationCode=function(e,t){var e=I({portal:"https://www.arcgis.com/sharing/rest",refreshTokenTTL:20160},e),r=e.portal,n=e.clientId,o=e.redirectUri,i=e.refreshTokenTTL;return Ee(r+"/oauth2/token",{params:{grant_type:"authorization_code",client_id:n,redirect_uri:o,code:t}}).then(function(e){return new b({clientId:n,portal:r,ssl:e.ssl,redirectUri:o,refreshToken:e.refreshToken,refreshTokenTTL:i,refreshTokenExpires:new Date(Date.now()+60*(i-1)*1e3),token:e.token,tokenExpires:e.expires,username:e.username})})},b.deserialize=function(e){e=JSON.parse(e);return new b({clientId:e.clientId,refreshToken:e.refreshToken,refreshTokenExpires:new Date(e.refreshTokenExpires),username:e.username,password:e.password,token:e.token,tokenExpires:new Date(e.tokenExpires),portal:e.portal,ssl:e.ssl,tokenDuration:e.tokenDuration,redirectUri:e.redirectUri,refreshTokenTTL:e.refreshTokenTTL})},b.fromCredential=function(e){var t=void 0===e.ssl||e.ssl,r=e.expires||Date.now()+72e5;return new b({portal:e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest",ssl:t,token:e.token,username:e.userId,tokenExpires:new Date(r)})},b.parentMessageHandler=function(e){if("arcgis:auth:credential"===e.data.type)return b.fromCredential(e.data.credential);var t;throw"arcgis:auth:error"===e.data.type?((t=new Error(e.data.error.message)).name=e.data.error.name,t):new Error("Unknown message type.")},b.prototype.toCredential=function(){return{expires:this.tokenExpires.getTime(),server:this.portal,ssl:this.ssl,token:this.token,userId:this.username}},b.prototype.getUser=function(e){var t,r=this;return this._pendingUserRequest||(this._user?Promise.resolve(this._user):(t=this.portal+"/community/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1}),this._pendingUserRequest=u(t,e).then(function(e){return r._user=e,r._pendingUserRequest=null,e}),this._pendingUserRequest))},b.prototype.getPortal=function(e){var t,r=this;return this._pendingPortalRequest||(this._portalInfo?Promise.resolve(this._portalInfo):(t=this.portal+"/portals/self",e=I(I({httpMethod:"GET",authentication:this},e),{rawResponse:!1}),this._pendingPortalRequest=u(t,e).then(function(e){return r._portalInfo=e,r._pendingPortalRequest=null,e}),this._pendingPortalRequest))},b.prototype.getUsername=function(){return this.username?Promise.resolve(this.username):this._user?Promise.resolve(this._user.username):this.getUser().then(function(e){return e.username})},b.prototype.getToken=function(e,t){return r=this.portal,n=e,o=Te(r),i=Te(n),r=qe(r),n=qe(n),o&&i&&r===n||new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t);var r,n,o,i},b.prototype.validateAppAccess=function(r){return this.getToken(this.portal).then(function(e){return u((t=void 0===t?"https://www.arcgis.com/sharing/rest":t)+"/oauth2/validateAppAccess",{method:"POST",params:{f:"json",client_id:r,token:e}});var t})},b.prototype.toJSON=function(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,refreshTokenTTL:this.refreshTokenTTL}},b.prototype.serialize=function(){return JSON.stringify(this)},b.prototype.enablePostMessageAuth=function(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)},b.prototype.disablePostMessageAuth=function(e){(e=!e&&window?window:e).removeEventListener("message",this._hostHandler,!1)},b.prototype.refreshSession=function(e){return this._user=null,this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new g("Unable to refresh token."))},b.prototype.getServerRootUrl=function(e){var e=s(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/)[0].match(/(https?:\/\/)(.+)/),t=(e[0],e[1]),e=e[2].split("/"),r=e[0],e=e.slice(1);return""+t+r.toLowerCase()+"/"+e.join("/")},b.prototype.getDomainCredentials=function(t){return this.trustedDomains&&this.trustedDomains.length&&this.trustedDomains.some(function(e){return t.startsWith(e)})?"include":"same-origin"},b.prototype.createPostMessageHandler=function(o){var i=this;return function(e){var t=-1<o.indexOf(e.origin),r="arcgis:auth:requestCredential"===e.data.type,n=i.tokenExpires.getTime()>Date.now();t&&r&&(t={},t=n?((r=i.toCredential()).server=r.server.replace("/sharing/rest",""),{type:"arcgis:auth:credential",credential:r}):{type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Session token was expired, and not returned to the child application"}},e.source.postMessage(t,e.origin))}},b.prototype.getTokenForServer=function(t,r){var n=this,o=this.getServerRootUrl(t),e=this.federatedServers[o];return e&&e.expires&&e.expires.getTime()>Date.now()?Promise.resolve(e.token):this._pendingTokenRequests[o]||(this._pendingTokenRequests[o]=this.fetchAuthorizedDomains().then(function(){return u(o+"/rest/info",{credentials:n.getDomainCredentials(t)}).then(function(e){if(e.owningSystemUrl){if(Ie(e.owningSystemUrl,n.portal))return u(e.owningSystemUrl+"/sharing/rest/info",r);throw new g(t+" is not federated with "+n.portal+".","NOT_FEDERATED")}if(e.authInfo&&void 0!==n.federatedServers[o])return Promise.resolve({authInfo:e.authInfo});throw new g(t+" is not federated with any portal and is not explicitly trusted.","NOT_FEDERATED")}).then(function(e){return e.authInfo.tokenServicesUrl}).then(function(e){return n.token&&n.tokenExpires.getTime()>Date.now()?ke(e,{params:{token:n.token,serverUrl:t,expiration:n.tokenDuration,client:"referer"}}):ke(e,{params:{username:n.username,password:n.password,expiration:n.tokenDuration,client:"referer"}}).then(function(e){return n._token=e.token,n._tokenExpires=new Date(e.expires),e})}).then(function(e){return n.federatedServers[o]={expires:new Date(e.expires),token:e.token},delete n._pendingTokenRequests[o],e.token})}),this._pendingTokenRequests[o])},b.prototype.getFreshToken=function(e){var t=this;return this.token&&!this.tokenExpires||this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshSession(e).then(function(e){return t._pendingTokenRequests[t.portal]=null,e.token})),this._pendingTokenRequests[this.portal])},b.prototype.refreshWithUsernameAndPassword=function(e){var t=this,e=I({params:{username:this.username,password:this.password,expiration:this.tokenDuration}},e);return ke(this.portal+"/generateToken",e).then(function(e){return t._token=e.token,t._tokenExpires=new Date(e.expires),t})},b.prototype.refreshWithRefreshToken=function(e){var t=this;if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()<Date.now())return this.refreshRefreshToken(e);e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return Ee(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t})},b.prototype.refreshRefreshToken=function(e){var t=this,e=I({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return Ee(this.portal+"/oauth2/token",e).then(function(e){return t._token=e.token,t._tokenExpires=e.expires,t._refreshToken=e.refreshToken,t._refreshTokenExpires=new Date(Date.now()+60*(t.refreshTokenTTL-1)*1e3),t})},b.prototype.fetchAuthorizedDomains=function(){var t=this;return this.server||!this.portal?Promise.resolve(this):this.getPortal().then(function(e){return e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(t.trustedDomains=e.authorizedCrossOriginDomains.filter(function(e){return!e.startsWith("http://")}).map(function(e){return e.startsWith("https://")?e:"https://"+e})),t})};var Oe=b;function b(e){var t;this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.username=e.username,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?s(e.portal):"https://www.arcgis.com/sharing/rest",this.ssl=e.ssl,this.provider=e.provider||"arcgis",this.tokenDuration=e.tokenDuration||20160,this.redirectUri=e.redirectUri,this.refreshTokenTTL=e.refreshTokenTTL||20160,this.server=e.server,this.federatedServers={},this.trustedDomains=[],e.server&&(t=this.getServerRootUrl(e.server),this.federatedServers[t]={token:e.token,expires:e.tokenExpires}),this._pendingTokenRequests={}}function Pe(e){e=e.privileges;return d(void 0===e?[]:e,"portal:user:createItem")}function Ue(e,t){var r,n=!1,o=e.itemControl,i=e.owner,a=e.orgId,s=t.roleId,u=t.role,c=t.username,l=t.groups,p=t.orgId,o=d(["admin","update"],o)||!!i&&i===c||!!(!!a&&a===p)&&!s&&"org_admin"===u,i=Pe(t);return i&&o?n=!0:i&&(r=m(q(e,"groupIds")||[],[q(e,"properties.collaborationGroupId")]),n=l.some(function(e){return me(e)&&d(r,e.id)})),n}var Ne=["portal:user:createGroup","portal:user:createItem","portal:user:shareToGroup","portal:user:viewOrgGroups","portal:user:viewOrgItems"];function Re(e){var r,t=e.host,n=e.path,e=e.query,t=t.endsWith("/")?t:t+"/",n=new URL(n,t);return n.search=(void 0===(r=e)&&(r={}),t=Object.keys(r).filter(function(e){return void 0!==r[e]}).reduce(function(e,t){return e[t]=r[t],e},{}),new URLSearchParams(t).toString()),n.toString()}function y(e){return(e=void 0===e?{}:e).portal?s(e.portal):e.authentication?e.authentication.portal:"https://www.arcgis.com/sharing/rest"}function Fe(e){var t=JSON.parse(JSON.stringify(e));return t.data&&("undefined"!=typeof Blob&&e.data instanceof Blob||"ReadStream"===e.data.constructor.name?t.file=e.data:t.text=e.data,delete t.data),t}function Le(e){return e.owner?Promise.resolve(e.owner):e.item&&e.item.owner?Promise.resolve(e.item.owner):e.authentication&&e.authentication.getUsername?e.authentication.getUsername():Promise.reject(new Error("Could not determine the owner of this item. Pass the `owner`, `item.owner`, or `authentication` option."))}function _e(t){return Le(t).then(function(e){e=t.folderId?y(t)+"/content/users/"+e+"/"+t.folderId+"/items/"+t.item.id+"/update":y(t)+"/content/users/"+e+"/items/"+t.item.id+"/update";return t.params=I(I({},t.params),Fe(t.item)),u(e,t)})}function je(e){var r,e=I({folderId:null},e);return(r=e).multipart&&!r.filename?Promise.reject(new Error("The filename is required for a multipart request.")):Le(r).then(function(e){var e=y(r)+"/content/users/"+e,t=e+"/addItem",e=(r.folderId&&(t=e+"/"+r.folderId+"/addItem"),r.params=I(I({},r.params),Fe(r.item)),Se(r,["owner","folderId","file","dataUrl","text","async","multipart","filename","overwrite"],{params:I({},r.params)}));return u(t,e)})}var Be=/[\x00-\x1F\x7F-\x9F\xA0]/g;function Me(e,t){return u(Ge(e,t),I({httpMethod:"GET"},t))}var Ge=function(e,t){return("string"==typeof t?t:y(t))+"/content/items/"+e};function He(e,t){e=Ge(e,t)+"/data",t=I({httpMethod:"GET",params:{}},t);return t.file&&(t.params.f=null),u(e,t).catch(function(e){var t=RegExp(/The string did not match the expected pattern|(Unexpected end of (JSON input|data at line 1 column 1))/i);if(!t.test(e.message))throw e})}function Ve(e){var t=Ge(e.id,e)+"/relatedItems",r=I({httpMethod:"GET",params:{direction:e.direction}},e);return"string"==typeof e.relationshipType?r.params.relationshipType=e.relationshipType:r.params.relationshipTypes=e.relationshipType,delete r.direction,delete r.relationshipType,u(t,r)}function Ke(e,t){var r,n,o=t||{},i=o.fileName,i=void 0===i?"iteminfo.xml":i,o=o.readAs,o=void 0===o?"text":o,t=I({httpMethod:"GET"},t);return i="/info/"+i,r=o,o=""+Ge(o=e,e=t)+i,i=I({params:{}},e),n=i.rawResponse,i.rawResponse=!0,i.params.f=null,u(o,i).then(function(e){return n?e:"json"!==r?e[r]():e.text().then(function(e){return JSON.parse(e.replace(Be,""))})})}function ze(t){return Le(t).then(function(e){return u(y(t)+"/content/users/"+e+"/items/"+t.id+"/unprotect",t)})}function Ye(e){return t=e.groupId,u(y(e=e)+"/community/groups/"+t,I({httpMethod:"GET"},e)).then(function(e){return e.userMembership.memberType}).catch(function(){return"none"});var t}function We(t){return Le(t).then(function(e){return u(y(t)+"/content/users/"+e+"/items/"+t.id+"/delete",t)})}r.prototype.match=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.termStack=this.termStack.concat(e),this},r.prototype.in=function(e){return this.hasRange||this.hasTerms?(e&&"*"!==e&&(this.q+=e+":"),this.commit()):(t("`in("+(e?'"'+e+'"':"")+")`"+" was called with no call to `match(...)` or `from(...)`/`to(...)`. Your query was not modified."),this)},r.prototype.startGroup=function(){return this.commit(),0<this.openGroups&&(this.q+=" "),this.openGroups++,this.q+="(",this},r.prototype.endGroup=function(){return this.openGroups<=0?t("`endGroup(...)` was called without calling `startGroup(...)` first. Your query was not modified."):(this.commit(),this.openGroups--,this.q+=")"),this},r.prototype.and=function(){return this.addModifier("and")},r.prototype.or=function(){return this.addModifier("or")},r.prototype.not=function(){return this.addModifier("not")},r.prototype.from=function(e){return this.hasTerms?t('`from(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[0]=e,this},r.prototype.to=function(e){return this.hasTerms?t('`to(...)` is not allowed after `match(...)` try using `.from(...).to(...).in(...)`. Optionally, you may see this because dates are incorrectly formatted. Dates should be a primative Date value, aka a number in milliseconds or Date object, ie new Date("2020-01-01"). Your query was not modified.'):this.rangeStack[1]=e,this},r.prototype.boost=function(e){return this.commit(),this.q+="^"+e,this},r.prototype.toParam=function(){return this.commit(),this.cleanup(),this.q},r.prototype.clone=function(){return this.commit(),this.cleanup(),new r(this.q+"")},r.prototype.addModifier=function(e){return this.currentModifer?(t("You have called `"+this.currentModifer+"()` after `"+e+"()`. Your current query was not modified."),this):(this.commit(),""===this.q&&"not"!==e?t("You have called `"+e+"()` without calling another method to modify your query first. Try calling `match()` first."):(this.currentModifer=e,this.q+=""===this.q?"":" ",this.q+=e.toUpperCase()+" "),this)},r.prototype.needsQuotes=function(e){return/\s|:/g.test(e)},r.prototype.formatTerm=function(e){return e instanceof Date?e.getTime():"string"==typeof e&&this.needsQuotes(e)?'"'+e+'"':e},r.prototype.commit=function(){var t=this;return this.currentModifer=void 0,this.hasRange&&(this.q+="["+this.formatTerm(this.rangeStack[0])+" TO "+this.formatTerm(this.rangeStack[1])+"]",this.rangeStack=[void 0,void 0]),this.hasTerms&&(this.q+=this.termStack.map(function(e){return t.formatTerm(e)}).join(" "),this.termStack=[]),this},Object.defineProperty(r.prototype,"hasTerms",{get:function(){return 0<this.termStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasRange",{get:function(){return this.rangeStack.length&&this.rangeStack[0]&&this.rangeStack[1]},enumerable:!1,configurable:!0}),r.prototype.cleanup=function(){if(0<this.openGroups)for(t("Automatically closing "+this.openGroups+" group(s). You can use `endGroup(...)` to remove this warning.");0<this.openGroups;)this.q+=")",this.openGroups--;var e=this.q;this.q=e.replace(/( AND ?| NOT ?| OR ?)*$/,""),e!==this.q&&t("`startGroup(...)` was called without calling `endGroup(...)` first. Your query was not modified."),this.q=this.q.replace(/(\(\))*/,"")};var Je=r;function r(e){void 0===e&&(e=""),this.termStack=[],this.rangeStack=[],this.openGroups=0,this.q=e}function Ze(r,n){var e,t="string"==typeof r||r instanceof Je?{httpMethod:"GET",params:{q:r}}:Se(r,["q","num","start","sortField","sortOrder","searchUserAccess","searchUserName","filter","countFields","countSize","categories","categoryFilters"],{httpMethod:"GET"});switch(n){case"item":e="/search";break;case"group":e="/community/groups";break;case"groupContent":if("string"==typeof r||r instanceof Je||!r.groupId)return Promise.reject(new Error("you must pass a `groupId` option to `searchGroupContent`"));e="/content/groups/"+r.groupId+"/search";break;default:e="/portals/self/users/search"}return u(y(t)+e,t).then(function(t){return t.nextStart&&-1!==t.nextStart&&(t.nextPage=function(){var e;return"string"==typeof r||r instanceof Je?e={q:r,start:t.nextStart}:(e=r).start=t.nextStart,Ze(e,n)}),t})}function Qe(e){return Ze(e,"item")}function $e(e,t){if(0===e.length)return[];for(var r=[],n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}function Xe(e){var t=e.id,r=y(e)+"/community/groups/"+t+"/addUsers",t=Object.assign({},e,{admins:void 0,users:void 0}),e=m(et("users",e.users,t),et("admins",e.admins,t)).map(function(e){return u(r,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(tt)}function et(o,e,i){return!e||e.length<1?[]:$e(e,25).map(function(e){return t=o,e=e,r=i,Object.assign({},r,((n={})[t]=e,n.params=I(I({},r.params),((r={})[t]=e,r)),n));var t,r,n})}function tt(e){var t=e.filter(function(e){return e.notAdded}).reduce(function(e,t){return e.concat(t.notAdded)},[]),e=e.filter(function(e){return e.errors}).reduce(function(e,t){return e.concat(t.errors)},[]),t={notAdded:t};return 0<e.length&&(t.errors=e),t}function rt(t){var e=t.id,r=t.users,n=y(t)+"/community/groups/"+e+"/removeUsers",e=$e(r,25).map(function(e){return e=I(I({},t),{users:e,params:{users:e}}),u(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(function(e){function t(r){return e.filter(function(e){return e[r]}).reduce(function(e,t){return e.concat(t[r])},[])}var r=t("errors"),n={notRemoved:t("notRemoved")};return r.length?I(I({},n),{errors:r}):n})}function nt(e){var r,t=e.id,n=y(e)+"/community/groups/"+t+"/invite",t=$e((r=e).users,25).map(function(e){var t=r;return(t=Object.assign({},t)).params=I(I({},t.params),{users:e,role:t.role,expiration:t.expiration}),t}).map(function(e){return u(n,e).catch(function(e){return{errors:[e]}})});return Promise.all(t).then(ot)}function ot(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function it(e){return u(y(e)+"/community/groups/"+e.id+"/unprotect",e)}function at(e){return u(y(e)+"/community/groups/"+e.id+"/delete",I({},e))}function st(e){var t=y(e)+"/community/groups/"+e.id+"/updateUsers",r={authentication:e.authentication,params:{}};return"admin"===e.newMemberType?r.params.admins=e.users:r.params.users=e.users,u(t,r)}function ut(e){var n,t=y(e)+"/portals/self/createNotification",e=$e((n=e).users,n.batchSize||25).map(function(e){return e=e,t=n,(r=Object.assign({},t)).params=I(I({},r.params),{users:e,subject:t.subject,message:t.message,notificationChannelType:r.notificationChannelType}),r;var t,r}).map(function(e){return u(t,e).catch(function(e){return{errors:[e]}})});return Promise.all(e).then(ct)}function ct(e){var t=e.every(function(e){return e.success}),e=e.reduce(function(e,t){return e.concat(t.errors||[])},[]),t={success:t};return 0<e.length&&(t.errors=e),t}function lt(e){var t,r,n={httpMethod:"GET"};return"string"==typeof e?r="https://www.arcgis.com/sharing/rest/community/users/"+e:(t=e.username||e.authentication.username,r=y(e)+"/community/users/"+encodeURIComponent(t),n=I(I({},e),n)),u(r,n)}function pt(t){return Qe({q:"id: "+t.id+" AND group: "+t.groupId,start:1,num:10,sortField:"title",authentication:t.authentication,httpMethod:"POST"}).then(function(e){if(0<e.total)return e.results.some(function(e){return e.id===t.id})})}function dt(l){return pt(l).then(function(e){if(e)return{itemId:l.id,shortcut:!0,notSharedWith:[]};var s,u,e=l.authentication.username,t=l.owner,c=l.confirmItemControl,t=t||e;return t!==e?(u=s=!1,Promise.all([lt({username:e,authentication:l.authentication}),lt({username:t,authentication:l.authentication}),Ye(l)]).then(function(e){var t=e[0],r=e[1],e=e[2],n=(s="org_admin"===t.role&&!t.roleId,u=t.orgId!==r.orgId,!!c),o=s,i=l,a=[];if(i.groupId!==t.favGroupId)if(n){if(!o)throw Error("This item can not be shared to shared editing group "+i.groupId+" by "+t.username+" as they not the item owner or org admin.");a.push(ht(t,t,!1,"Error adding "+t.username+" as member to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i),ht(t,r,!0,"none"===e?"Error adding user "+r.username+" to edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.":"Error promoting user "+r.username+" to admin in edit group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i))}else if(o)a.push(ht(t,t,!1,"Error adding "+t.username+" as member to view group "+i.groupId+". Consequently item "+i.id+" was not shared to the group.",i));else if("none"===e)throw new Error("This item can not be shared by "+t.username+" as they are not a member of the specified group "+i.groupId+".");return a}).then(function(e){var t=e[0],r=(void 0===t?{promise:Promise.resolve({notAdded:[]}),revert:function(e){return Promise.resolve(e)}}:t).revert;return Promise.all(e.map(function(e){return e.promise})).then(function(){return ft(l,s,u)}).then(function(e){return r(e)})})):ft(l)}).then(function(e){if(e.notSharedWith.length)throw Error("Item "+l.id+" could not be shared to group "+l.groupId+".");return e})}function ft(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var n=e.authentication.username,o=e.owner||n,i=y(e)+"/content/items/"+e.id+"/share";return(o===n||t&&!r)&&(i=y(e)+"/content/users/"+o+"/items/"+e.id+"/share"),e.params={groups:e.groupId,confirmItemControl:e.confirmItemControl},u(i,e)}function ht(e,t,r,n,o){var i,a=t.groups||[],s=a.find(function(e){return e.id===o.groupId});if(e.orgId!==t.orgId)throw Error("User "+t.username+" is not a member of the same org as "+e.username+". Consequently they can not be added added to group "+o.groupId+" nor can item "+o.id+" be shared to the group.");if(!s&&511<a.length)throw Error("User "+t.username+" already has 512 groups, and can not be added to group "+o.groupId+". Consequently item "+o.id+" can not be shared to the group.");return a=s?r&&"member"===s.userMembership.memberType?(i=st({id:o.groupId,users:[t.username],newMemberType:"admin",authentication:o.authentication}).then(function(e){e=e.results.reduce(function(e,t){return t.success||e.push(t.username),e},[]);return Promise.resolve({notAdded:e})}).catch(function(){return{notAdded:[t.username]}}),function(e){return st({id:o.groupId,users:[t.username],newMemberType:"member",authentication:o.authentication}).then(function(){return e}).catch(function(){return e})}):(i=Promise.resolve({notAdded:[]}),function(e){return Promise.resolve(e)}):(i=Xe(((e={id:o.groupId})[r?"admins":"users"]=[t.username],e.authentication=o.authentication,e)).then(function(e){if(e.errors&&e.errors.length)throw e.errors[0];return e}).catch(function(){return{notAdded:[t.username]}}),function(e){return rt({id:o.groupId,users:[t.username],authentication:o.authentication}).then(function(){return e})}),{promise:i.then(function(e){if(e.notAdded.length)throw new Error(n);return e}),revert:a}}function mt(a){return pt(a).then(function(e){if(!e)return Promise.resolve({itemId:a.id,shortcut:!0,notUnsharedFrom:[]});var o=a.authentication.username,i=a.owner;return Promise.all([Ye(a),lt({username:o,authentication:a.authentication})]).then(function(e){var t=e[0],e=e[1],e="org_admin"===e.role&&!e.roleId;if(!((i||o)===o)&&!e&&["admin","owner"].indexOf(t)<0)throw Error("This item can not be unshared from group "+a.groupId+" by "+o+" as they not the item owner, an org admin, group admin or group owner.");var e=a,t=e.authentication.username,r=e.owner||t,n=y(e)+"/content/items/"+e.id+"/unshare";return r===t&&(n=y(e)+"/content/users/"+r+"/items/"+e.id+"/unshare"),e.params={groups:e.groupId},u(n,e)}).then(function(e){if(e.notUnsharedFrom.length)throw Error("Item "+a.id+" could not be unshared to group "+a.groupId);return e})})}function gt(e){var t=null;return t=t||"self",t=y(e)+"/portals/"+t,e=I({httpMethod:"GET"},e),u(t,e)}function bt(e){if("string"==typeof e)return e.replace(/\/sharing\/rest\/?$/,"");if("object"==typeof e){var t=e.portalSelf||e,r=t.portalHostname,n=t.urlKey,o=t.customBaseUrl;if(r||n&&o)return t.isPortal?"https://"+t.portalHostname:"https://"+t.urlKey+"."+t.customBaseUrl}return bt(y(e))}var yt={devext:"https://d1011m9qpnz5mw.cloudfront.net",qaext:"https://dyq9ux9ryu4qj.cloudfront.net",www:"https://d1iq7pbacwn5rb.cloudfront.net"};function vt(e){return e.isPortal?bt(e)+"/apps/sites":(e=e.portalHostname.split(".")[0],(yt[e]||yt.www)+"/opendata-ui/assets")}function v(e){return bt(e)+"/sharing/rest"}function wt(e){return e=(e=e.toLowerCase()).includes("//")?e.split("//")[1]:e}function At(e){if(!e)return[];e=e.replace(/^http(s?):\/\//,"");return["http://"+e,"https://"+e]}function Dt(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function St(e){if(e.isPortal)throw new Error("Hub Url is not available in ArcGIS Enterprise");return Dt(e.portalHostname)}function xt(e,t){return bt(t)+"/home/item.html?id="+e}var Et=function(e,t,r){var n=e.id,e=e.access,t=v(t)+"/content/items/"+n,n=new URLSearchParams({f:"json"});return"public"!==e&&r&&n.append("token",r),t+"?"+n.toString()},kt=function(e,t,r){t=Et(e,t,r),r="\\/"+e.id+"\\?f=json",r=new RegExp(r);return t&&t.replace(r,"/"+e.id+"/data").replace(/\&token/,"?token")};function Ct(e){var t;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://hubqa.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://hubdev.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://hub.arcgis.com"),t}function Tt(e){var t=e;return e.match(/(qaext|\.mapsqa)\.arcgis.com/)?t="https://qaext.arcgis.com":e.match(/(devext|\.mapsdevext)\.arcgis.com/)?t="https://devext.arcgis.com":e.match(/(www|\.maps)\.arcgis.com/)&&(t="https://www.arcgis.com"),t}function qt(e){return It.test(e)}var It=/\/(map|feature)server/i,Ot=function(e){e=e.match(It),e=e&&e[1];return e&&J(e)+" Service"};function Pt(e){var t=e&&e.hubApiUrl;return t||Dt(v(e))}var Ut="/api/v3/domains",Nt="/api/v3/datasets",Rt="/api/discussions/v1",Ft=(Object.defineProperty(w.prototype,"session",{get:function(){return this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isAuthenticated",{get:function(){return!!this._authentication},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"userRequestOptions",{get:function(){if(this.isAuthenticated)return{authentication:this._authentication,portal:this.sharingApiUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"requestOptions",{get:function(){var e={portal:this.sharingApiUrl};return e=this.isAuthenticated?{authentication:this._authentication,portal:this.sharingApiUrl}:e},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubRequestOptions",{get:function(){return{authentication:this.session,isPortal:this.isPortal,portalSelf:this.portal,hubApiUrl:this.hubUrl,portal:this.sharingApiUrl}},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"portalUrl",{get:function(){return this.isAuthenticated?this.isPortal?"https://"+this._portalSelf.portalHostname:"https://"+this._portalSelf.urlKey+"."+this._portalSelf.customBaseUrl:this._portalUrl},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"sharingApiUrl",{get:function(){return this.portalUrl+"/sharing/rest"},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubUrl",{get:function(){return this._hubUrl},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"isPortal",{get:function(){return this._portalSelf?this._portalSelf.isPortal:-1===this._portalUrl.indexOf("arcgis.com")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"discussionsServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+Rt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubSearchServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+Nt},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"domainServiceUrl",{get:function(){if(this._hubUrl)return""+this._hubUrl+Ut},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"eventsConfig",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.events")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"hubEnabled",{get:function(){return a(this._portalSelf,"portalProperties.hub.enabled",!1)},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"communityOrgId",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.orgId")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"communityOrgHostname",{get:function(){if(this._portalSelf)return q(this._portalSelf,"portalProperties.hub.settings.communityOrg.portalHostname")},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"communityOrgUrl",{get:function(){if(this.communityOrgHostname)return"https://"+this.communityOrgHostname},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"helperServices",{get:function(){if(this._portalSelf)return this._portalSelf.helperServices},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"currentUser",{get:function(){return this._currentUser},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"portal",{get:function(){return this._portalSelf},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),w);function w(e){this._portalUrl="https://www.arcgis.com",this.id=e.id,this._portalUrl=e.portalUrl,this._hubUrl=e.hubUrl,e.authentication&&(this._authentication=e.authentication),e.portalSelf&&(this._portalSelf=e.portalSelf),e.currentUser&&(this._currentUser=e.currentUser),e.properties&&(this._properties=e.properties)}A.create=function(r){return void 0===r&&(r={}),f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return[4,(t=new A(r)).initialize()];case 1:return e.sent(),[2,t]}})})},A.prototype.setAuthentication=function(t){return f(this,void 0,void 0,function(){return h(this,function(e){switch(e.label){case 0:return this._authentication=t,this._portalUrl=t.portal.replace("/sharing/rest",""),[4,this.initialize()];case 1:return e.sent(),[2]}})})},A.prototype.setProperties=function(e){this._properties=e,this._context=new Ft(this.contextOpts)},A.prototype.clearAuthentication=function(){this._context.isPortal||(this._portalUrl=Tt(this._portalUrl)),this._authentication=null,this._portalSelf=null,this._currentUser=null,this._context=new Ft(this.contextOpts)},Object.defineProperty(A.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),A.prototype.initialize=function(){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:if(!this._authentication||this._portalSelf&&this._currentUser)return[3,4];i.debug("ArcGISContextManager-"+this.id+": Initializing"),t=this._authentication.username,t=[gt({authentication:this._authentication}),lt({username:t,authentication:this._authentication})],e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.all(t)];case 2:return n=e.sent(),r=n[0],n=n[1],this._portalSelf=r,this._currentUser=n,i.debug("ArcGISContextManager-"+this.id+": received portalSelf and currentUser"),[3,4];case 3:throw r=e.sent(),n='ArcGISContextManager could not fetch portal & user for "'+this._authentication.username+'" using '+this._authentication.portal+".",i.error(n),console.error(n),r;case 4:return i.debug("ArcGISContextManager-"+this.id+": updating context"),this._context=new Ft(this.contextOpts),[2]}})})},Object.defineProperty(A.prototype,"contextOpts",{get:function(){var e={id:this.id,portalUrl:this._portalUrl,hubUrl:this._hubUrl,properties:this._properties};return this._authentication&&(e.authentication=this._authentication),this._portalSelf&&(e.portalSelf=this._portalSelf),this._currentUser&&(e.currentUser=this._currentUser),e},enumerable:!1,configurable:!0});var Lt=A;function A(e){this._portalUrl="https://www.arcgis.com",this._logLevel=n.Level.error,this.id=(new Date).getTime(),e.logLevel&&(this._logLevel=e.logLevel),i.setLogLevel(this._logLevel),i.debug("ArcGISContextManager:ctor: Creating "+this.id),e.properties&&(this._properties=e.properties),e.authentication?(this._authentication=e.authentication,this._portalUrl=this._authentication.portal.replace("/sharing/rest","")):e.portalUrl&&(this._portalUrl=e.portalUrl),this._hubUrl=Ct(this._portalUrl),e.portal&&(this._portalSelf=c(e.portal)),e.currentUser&&(this._currentUser=c(e.currentUser))}var _t=function(e){var t;if(e)return t=e.toLocaleLowerCase(),Object.keys(D).find(function(e){return D[e].some(function(e){return e.toLocaleLowerCase()===t})})},D={app:["Application","City Engine Web Scene","CityEngine Web Scene","Dashboard","Insights Page","Insights Workbook","Operation View","Web Mapping Application","StoryMap","Web Experience","Urban Model"],dataset:["CSV Collection","CSV","Feature Collection Template","Feature Collection","Feature Layer","Feature Service","File Geodatabase","GeoJSON","GeoJson","KML Collection","KML","Microsoft Excel","Raster Layer","Shapefile","Stream Service","Table"],document:["CAD Drawing","Document Link","Hub Page","Site Page","Image","iWork Keynote","iWork Numbers","iWork Pages","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","PDF","Pro Map","Report Template"],event:["Hub Event"],feedback:["Form","Quick Capture Project"],initiative:["Hub Initiative"],template:["Hub Initiative Template"],solution:["Solution"],map:["Image Collection","Image Service","Map Service Layer","Map Service","Scene Service","Scene Layer","Vector Tile Service","Web Map Service","Web Map Tile Service","Web Map","Web Scene","WFS","WMS","WMTS"],other:["360 VR Experience","AppBuilder Widget Package","Application Configuration","ArcPad Package","Code Attachment","Code Sample","Desktop Add In","Desktop Application Template","Desktop Application","Desktop Style","Explorer Add In","Explorer Layer","Geocoding Service","Geometry Service","Geoprocessing Package","Geoprocessing Sample","Geoprocessing Service","Layer File","Layer Package","Layer Template","Layer","Layout","Locator Package","Map Area","Map Document","Map Package","Map Service Definition","Map Template","Mobile Application","Mobile Map Package","Native Application","Network Analysis Service","Operations Dashboard Add In","Project Package","Project Template","Raster Function Template","Rule Package","Scene Package","Service Definition","SQLite Geodatabase","Style","Tile Package","Vector Tile Package","Workflow Manager Package"],site:["Hub Site Application","Site Application"]},S=D.app,jt=D.dataset,Bt=D.document,Mt=D.event,x=D.feedback,Gt=D.initiative,Ht=D.map,Vt=D.other,Kt=D.site,zt=["360 VR Experience","Application","CityEngine Web Scene","Code Sample","CSV Collection","CSV","CAD Drawing","Desktop Application","Desktop Application Template","Desktop Style","File Geodatabase","GeoJson","Geoprocessing Package","Geoprocessing Sample","Image","iWork Keynote","iWork Numbers","KML Collection","KML","Layer","Layer File","Layer Package","Layout","Locator Package","Map Package","Map Service Definition","Map Template","Microsoft Excel","Microsoft Powerpoint","Microsoft Visio","Microsoft Word","Notebook","Operations Dashboard Add In","PDF","Pro Map","Project Package","Project Template","Raster function template","Rule Package","Service Definition","Shapefile","Vector Tile Package","Workflow Manager Package"],Yt=["Data"],Wt={app:S.concat(x),dataset:jt,document:Bt,event:Mt,initiative:Gt,map:Ht,other:Vt,site:Kt,downloadableTypes:zt,downloadableTypeKeywords:Yt,apiTypes:["Feature Service","Map Service","Image Service"]};function Jt(e){return-1!==zt.indexOf(e.type)||e.typeKeywords&&Yt.some(function(t){return e.typeKeywords.some(function(e){return e===t})})}var Zt=new RegExp(/.+(?:map|feature|image)server/i);function Qt(e){var t=e.match(Zt);return t?t[0]:s(e.split("?")[0])}function $t(e){return[[e.xmin,e.ymin],[e.xmax,e.ymax]]}var Xt={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}};function er(e){var t=e.portalSelf,r=t.defaultExtent,t=q(t,"helperServices.geometry.url");if(!t)return Promise.resolve(Xt);if(!r)return Promise.resolve(Xt);t+="/project",r={httpMethod:"POST",params:{geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[r]}),transformForward:!1,transformation:"",inSR:r.spatialReference.wkid,outSR:4326,f:"json"}};return e.authentication&&(r.authentication=e.authentication),u(t,r).then(function(e){e=e.geometries[0];return{xmin:e.xmin,ymin:e.ymin,xmax:e.xmax,ymax:e.ymax,spatialReference:{wkid:4326}}}).catch(function(e){return Xt})}var tr=function(e){return Array.isArray(e)&&Array.isArray(e[0])&&Array.isArray(e[1])};function rr(e){return console.warn("DEPRECATED: use isBBox() instead"),tr(e)}var nr=function(e){var t=e[0],r=t[0],t=t[1],e=e[1],n=e[0],e=e[1];return{rings:[[[r,t],[n,t],[n,e],[r,e],[r,t]]],spatialReference:{wkid:4326}}};function or(e){var t,r;switch((e||"").toLowerCase()){case"image service":t="dataset";break;case"feature service":case"raster layer":t="map";break;case"microsoft excel":t="document";break;case"cad drawing":case"feature collection template":case"report template":t="content";break;default:t={other:"content",solution:"template"}[r=_t(e)]||r}return t}var E,ir=function(e){return e&&e.isPortal},ar=function(e,t){return!!e&&"public"===e.access&&!ir(t)},sr=function(e,t){return!ir(t)&&"public"===e.access&&"CSV"===e.type&&e.size<=5e6},ur=function(e,t,r){var n,o,r=lr(e,t,r);return r||(o="/content","feedback"===(n=or(e))?o="/feedback/surveys":cr(e)?o="/pages":-1<["app","dataset","document","map","template"].indexOf(n)&&(o="/"+n+"s"),r=o+"/"+t),r},cr=function(e){return["Hub Page","Site Page"].includes(e)},lr=function(e,t,r){var n;return"Solution"===e&&(0<(null==r?void 0:r.indexOf("Deployed"))&&(n="/content/"+t),n="/templates/"+t+"/about"),n};function pr(e){return{updateFrequency:"metadata.dataIdInfo.resMaint.maintFreq.MaintFreqCd.@_value",reviseDate:"metadata.dataIdInfo.idCitation.date.reviseDate",pubDate:"metadata.dataIdInfo.idCitation.date.pubDate",createDate:"metadata.dataIdInfo.idCitation.date.createDate",metadataUpdateFrequency:"metadata.mdMaint.maintFreq.MaintFreqCd.@_value",metadataUpdatedDate:"metadata.mdDateSt"}[e]}function dr(e,t){t=pr(t);return t&&q(e,t)}(S=E=E||{}).Year="year",S.Month="month",S.Day="day",S.Time="time";var fr=function(e,t){t=t.url&&Qt(t.url);return t&&e.linkage.includes(t)},hr=function(e,t,r){var n=e.linkage,r=q(r,"authentication.token");return r&&fr(e,t)&&(t=new URL(e.linkage),(e=new URLSearchParams(t.search)).set("token",r),t.search=e.toString(),n=t.toString()),n},mr=[{type:"CC0-1.0",abbr:"CC0",name:"Public Domain Dedication",url:"http://creativecommons.org/publicdomain/zero/1.0"},{type:"CC-BY-4.0",abbr:"CC BY",name:"Attribution 4.0 International",url:"http://creativecommons.org/licenses/by/4.0"},{type:"CC-BY-3.0",abbr:"CC BY 3.0",name:"Attribution 3.0 Unported",url:"http://creativecommons.org/licenses/by/3.0"},{type:"CC-BY-2.5",abbr:"CC BY 2.5",name:"Attribution 2.5 Generic",url:"http://creativecommons.org/licenses/by/2.5"},{type:"CC-BY-2.0",abbr:"CC BY 2.0",name:"Attribution 2.0 Generic",url:"http://creativecommons.org/licenses/by/2.0"},{type:"CC-BY-1.0",abbr:"CC BY 1.0",name:"Attribution 1.0 Generic",url:"http://creativecommons.org/licenses/by/1.0"},{type:"CC-BY-SA-4.0",abbr:"CC BY-SA",name:"Attribution-ShareAlike 4.0 International",url:"http://creativecommons.org/licenses/by-sa/4.0"},{type:"CC-BY-SA-3.0",abbr:"CC BY-SA 3.0",name:"Attribution-ShareAlike 3.0 Unported",url:"http://creativecommons.org/licenses/by-sa/3.0"},{type:"CC-BY-SA-2.5",abbr:"CC BY-SA 2.5",name:"Attribution-ShareAlike 2.5 Generic",url:"http://creativecommons.org/licenses/by-sa/2.5"},{type:"CC-BY-SA-2.0",abbr:"CC BY-SA 2.0",name:"Attribution-ShareAlike 2.0 Generic",url:"http://creativecommons.org/licenses/by-sa/2.0"},{type:"CC-BY-SA-1.0",abbr:"CC BY-SA 1.0",name:"Attribution-ShareAlike 1.0 Generic",url:"http://creativecommons.org/licenses/by-sa/1.0"},{type:"CC-BY-ND-4.0",abbr:"CC BY-ND",name:"Attribution-NoDerivatives 4.0 International",url:"http://creativecommons.org/licenses/by-nd/4.0"},{type:"CC-BY-ND-3.0",abbr:"CC BY-ND 3.0",name:"Attribution-NoDerivs 3.0 Unported",url:"http://creativecommons.org/licenses/by-nd/3.0"},{type:"CC-BY-ND-2.5",abbr:"CC BY-ND 2.5",name:"Attribution-NoDerivs 2.5 Generic",url:"http://creativecommons.org/licenses/by-nd/2.5"},{type:"CC-BY-ND-2.0",abbr:"CC BY-ND 2.0",name:"Attribution-NoDerivs 2.0 Generic",url:"http://creativecommons.org/licenses/by-nd/2.0"},{type:"CC-BY-ND-1.0",abbr:"CC BY-ND 1.0",name:"Attribution-NoDerivs 1.0 Generic",url:"http://creativecommons.org/licenses/by-nd/1.0"},{type:"CC-BY-NC-4.0",abbr:"CC BY-NC",name:"Attribution-NonCommercial 4.0 International",url:"https://creativecommons.org/licenses/by-nc/4.0"},{type:"CC-BY-NC-3.0",abbr:"CC BY-NC 3.0",name:"Attribution-NonCommercial 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc/3.0"},{type:"CC-BY-NC-2.5",abbr:"CC BY-NC 2.5",name:"Attribution-NonCommercial 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc/2.5"},{type:"CC-BY-NC-2.0",abbr:"CC BY-NC 2.0",name:"Attribution-NonCommercial 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc/2.0"},{type:"CC-BY-NC-1.0",abbr:"CC BY-NC 1.0",name:"Attribution-NonCommercial 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc/1.0"},{type:"CC-BY-NC-SA-4.0",abbr:"CC BY-NC-SA",name:"Attribution-NonCommercial-ShareAlike 4.0 International",url:"https://creativecommons.org/licenses/by-nc-sa/4.0"},{type:"CC-BY-NC-SA-3.0",abbr:"CC BY-NC-SA 3.0",name:"Attribution-NonCommercial-ShareAlike 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-sa/3.0"},{type:"CC-BY-NC-SA-2.5",abbr:"CC BY-NC-SA 2.5",name:"Attribution-NonCommercial-ShareAlike 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.5"},{type:"CC-BY-NC-SA-2.0",abbr:"CC BY-NC-SA 2.0",name:"Attribution-NonCommercial-ShareAlike 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/2.0"},{type:"CC-BY-NC-SA-1.0",abbr:"CC BY-NC-SA 1.0",name:"Attribution-NonCommercial-ShareAlike 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-sa/1.0"},{type:"CC-BY-NC-ND-4.0",abbr:"CC BY-NC-ND",name:"Attribution-NonCommercial-NoDerivatives 4.0 International",url:"https://creativecommons.org/licenses/by-nc-nd/4.0"},{type:"CC-BY-NC-ND-3.0",abbr:"CC BY-NC-ND 3.0",name:"Attribution-NonCommercial-NoDerivs 3.0 Unported",url:"https://creativecommons.org/licenses/by-nc-nd/3.0"},{type:"CC-BY-NC-ND-2.5",abbr:"CC BY-NC-ND 2.5",name:"Attribution-NonCommercial-NoDerivs 2.5 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.5"},{type:"CC-BY-NC-ND-2.0",abbr:"CC BY-NC-ND 2.0",name:"Attribution-NonCommercial-NoDerivs 2.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/2.0"},{type:"CC-BY-NC-ND-1.0",abbr:"CC BY-NC-ND 1.0",name:"Attribution-NonCommercial-NoDerivs 1.0 Generic",url:"https://creativecommons.org/licenses/by-nc-nd/1.0"},{type:"PDDL-1.0",abbr:"PDDL",name:"ODC Public Domain Dedication and License",url:"http://opendatacommons.org/licenses/pddl/summary"},{type:"ODbL-1.0",abbr:"ODbL",name:"ODC Open Database License",url:"http://opendatacommons.org/licenses/odbl/summary"},{type:"ODC-BY-1.0",abbr:"ODC BY",name:"ODC Attribution License",url:"http://opendatacommons.org/licenses/by/summary"}];function gr(r){var e,t=!(e={type:(r=r||"")?"custom":"none",text:r}),n=mr.filter(function(e){return e=e,(t=(t=r).toLowerCase()).includes(e.name.toLowerCase())||t.includes(e.url.toLowerCase())||t.includes(e.abbr.toLowerCase());var t});return n.length&&(t=!0,e=n.pop()),t||(n=void 0,!function(e){try{return new URL(e).protocol}catch(e){return}}(r)?(t=r,new RegExp(/^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)>((?:.(?!\<\/a\>))*.)?<\/a>$|^<a[\s]+(href\s?=\s?["'].*?["'])+([^>]?)\/>/).test(t)&&(t=new RegExp(/href\s?=\s?["'](.*?)["']/),n=r.match(t)[1])):n=r,n&&(e.url=n,e.text="")),e.text||delete e.text,e}function br(e,t,r){if(!e||!e.thumbnail)return null;var n=r||{},o=n.token,n=n.width,t=Et(e,t,o=o||"string"!=typeof r?o:r).split("?"),r=t[0],o=t[1],t=new URLSearchParams(o),o=(t.delete("f"),n&&t.append("w",n+""),t.toString()),n=r+"/info/"+e.thumbnail;return o?n+"?"+o:n}function yr(e,t){return{"001":n.UpdateFrequency.Continual,"002":n.UpdateFrequency.Daily,"003":n.UpdateFrequency.Weekly,"004":n.UpdateFrequency.Fortnightly,"005":n.UpdateFrequency.Monthly,"006":n.UpdateFrequency.Quarterly,"007":n.UpdateFrequency.Biannually,"008":n.UpdateFrequency.Annually,"009":n.UpdateFrequency.AsNeeded,"010":n.UpdateFrequency.Irregular,"011":n.UpdateFrequency.NotPlanned,"012":n.UpdateFrequency.Unknown,"013":n.UpdateFrequency.Semimonthly}[dr(e,t||"updateFrequency")]}function vr(e){return null!=(e={appbuilderExtension:"file",appbuilderWidgetPackage:"widgets-source",application:"web",applicationConfiguration:"app-gear",arcgisProMap:"desktop",cadDrawing:"file-cad",cityEngineWebScene:"urban-model",codeAttachment:"file-code",codeSample:"file-code",colorSet:"palette",contentCategorySet:"label",csv:"file-csv",cSV:"file-csv",cSVCollection:"file-csv",dashboard:"dashboard",desktopApplication:"desktop",documentLink:"link",excaliburImageryProject:"file",explorerMap:"file",exportPackage:"file",featureCollection:"data",featureCollectionTemplate:"file",featureLayer:"data",featureService:"collection",fileGeodatabase:"data",form:"survey",geocodingService:"file",geodataService:"file",geometryService:"file",geopackage:"file",geoprocessingService:"file",globeLayer:"layers",globeService:"file",hubInitiative:"initiative",hubInitiativeTemplate:"initiative-template",hubPage:"browser",hubSiteApplication:"web",image:"file-image",imageService:"data",insightsModel:"file",insightsPage:"graph-moving-average",insightsTheme:"palette",insightsWorkbook:"graph-moving-average",iWorkPages:"file-text",iWorkKeynote:"presentation",iWorkNumbers:"file-report",kML:"data",kMLCollection:"data",layer:"layers",layerPackage:"layers",layerTemplate:"file",locatorPackage:"file",mapArea:"file",mapDocument:"map-contents",mapImageLayer:"collection",mapPackage:"file",mapService:"collection",microsoftExcel:"file-report",microsoftPowerpoint:"presentation",microsoftWord:"file-text",mission:"file",mobileMapPackage:"map-contents",nativeApplication:"mobile",nativeApplicationInstaller:"file",nativeApplicationTemplate:"file",mobileApplication:"mobile",networkAnalysisService:"file",notebook:"code",orientedImageryCatalog:"file",orthoMappingProject:"file",orthoMappingTemplate:"file",pDF:"file-pdf",quickCaptureProject:"mobile",rasterFunctionTemplate:"file",rasterLayer:"map",realTimeAnalytic:"file",relationalDatabaseConnection:"file",reportTemplate:"file",sceneLayer:"data",sceneService:"urban-model",serviceDefinition:"file",shapefile:"data",solution:"puzzle-piece",sqliteGeodatabase:"file",statisticalDataCollection:"file",storymap:"tour",storyMap:"tour",storymapTheme:"palette",symbolSet:"file",table:"table",urbanModel:"urban-model",vectorTilePackage:"file-shape",vectorTileService:"map",visioDocument:"conditional-rules",webExperience:"apps",webMap:"map",webMappingApplication:"apps",webScene:"urban-model",wfs:"map",wFS:"map",wMS:"map",wMTS:"map",workflowManagerService:"file",workforceProject:"list-check"}[z(e||"")])?e:"file"}function wr(e,t){var r=(r=t.authentication)&&r.token;return{portalHome:xt(e.id,t),portalApi:Et(e,t,r),portalData:kt(e,t,r),thumbnail:br(e,t,{token:r})}}function Ar(e,t){var r;return r=sr(e,t)?Pt(t)+"/datasets/"+e.id+"_0/FeatureServer/0":r}var Dr=function(e){e=e&&1===e.length?e[0]:void 0;return e&&e.capabilities.includes("Query")?e:void 0},Sr=function(e,t,r){return e&&t&&1<t.length&&!Cr(r)},xr=(n.UpdateFrequency=void 0,(x=n.UpdateFrequency||(n.UpdateFrequency={})).Continual="continual",x.Daily="daily",x.Weekly="weekly",x.Fortnightly="fortnightly",x.Monthly="monthly",x.Quarterly="quarterly",x.Biannually="biannually",x.Annually="annually",x.AsNeeded="as-needed",x.Irregular="irregular",x.NotPlanned="not-planned",x.Unknown="unknown",x.Semimonthly="semimonthly",function(e,t){e=dr(e,t),/^\d{4}$/.test(e=""+e)?(r=new Date(+e,0,1),n=E.Year):/^\d{4}-\d{1,2}$/.test(e)?(o=e.split("-"),r=new Date(+o[0],+o[1]-1,1),n=E.Month):/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)?(o=e.split("-"),r=new Date(+o[0],+o[1]-1,+o[2]),n=E.Day):Number.isNaN(Date.parse(e))||(r=new Date(e),n=e.includes("T")?E.Time:E.Day);var r,n,o=r&&n&&{date:r,precision:n};return o&&I(I({},o),{source:"metadata."+pr(t)})}),Er=function(e,t){t+=".editingInfo.lastEditDate",e=q(e,t);return e&&{date:new Date(e),source:t,precision:E.Day}},kr=function(e,t){return{date:new Date(e[t]),precision:E.Day,source:"item."+t}},Cr=function(e){e=e&&e.match(/\/\d+$/);return e&&e[0].slice(1)},Tr=function(e){return e&&"feature service"===e.toLowerCase()};function qr(e){var t=(e=void 0===e?{}:e).type,r=e.typeKeywords||[];return("Site Application"===e.type||"Web Mapping Application"===e.type&&d(r,"hubSite"))&&(t="Hub Site Application"),("Site Page"===e.type||"Web Mapping Application"===e.type&&d(r,"hubPage"))&&(t="Hub Page"),"Hub Initiative"===e.type&&d(r,"hubInitiativeTemplate")&&(t="Hub Initiative Template"),t="Web Mapping Application"===e.type&&d(r,"hubSolutionTemplate")?"Solution":t}function Ir(e){var t;if("public"===e.access)return t=e.id,(e=Or(e))?t+"_"+e:t}var Or=function(e){return Cr(e.url)||Tr(e.type)&&e.typeKeywords&&d(e.typeKeywords,"Singlelayer")&&"0"};function Pr(e){if(!e)return e;var t=["categories",""];return e.map(function(e){return e.split("/")}).reduce(function(e,t,r){return m(e,t)},[]).filter(function(e){return!d(t,e.toLowerCase())})}function Ur(e,t,r){var n=Cr(e.url),o=n?parseInt(n,10):r;return t&&(Z(o)?Tr(e.type)&&Dr(t):t.find(function(e){return e.id===o}))}function Nr(e){return e.isView}var Rr=function(n,e){var t,r,o=e||{},i=o.slug,a=o.requestOptions,s=o.data,u=o.metadata,c=o.groupIds,l=o.ownerUser,p=o.org,d=o.errors,f=o.server,h=o.layers,m=o.recordCount,g=o.boundary,b=o.extent,y=o.searchDescription,o=o.statistics,v=Ur(n,h,null==e?void 0:e.layerId),e=ar(n,a)?v?n.id+"_"+v.id:Ir(n):void 0,w=i||e||n.id,A=((Sr(r=v,h,(t=n).url)?r.name:t.title||t.name)||"").replace(/_/g," "),D=Sr(v,h,n.url)&&v.description,S=v?v.type:qr(n),x=I({relative:ur(S,w,n.typeKeywords)},a&&wr(n,a)),E=Ar(n,a),k=(r=n,xr((t={metadata:u,layer:v,server:f}).metadata,"reviseDate")||Er(t,"layer")||Er(t,"server")||kr(r,"modified")),C=(a=n,xr(t=u,"pubDate")||xr(t,"createDate")||kr(a,"created")),T=(r=n,xr(u,"metadataUpdatedDate")||kr(r,"modified"));return I(I({item:n},n),{slug:i,data:s,metadata:u,groupIds:c,ownerUser:l,org:p,errors:d||[],server:f,layers:h,recordCount:m,statistics:o,hubId:e,identifier:w,get isProxied(){return!!E},layer:v,name:A,get title(){return A},get description(){return D||n.description},type:S,get family(){return or(S)},get url(){return E||(v?Qt(n.url)+"/"+v.id:n.url)},get categories(){return Pr(n.categories)},get actionLinks(){return n.properties&&n.properties.links},get hubActions(){return n.properties&&n.properties.actions},get isDownloadable(){return Jt(n)},get structuredLicense(){return gr(n.licenseInfo)},get permissions(){return{visibility:n.access,control:n.itemControl||"view"}},get extent(){return!tr(n.extent)&&b&&tr(b.coordinates)?b.coordinates:n.extent},get boundary(){return g||function(e){var t,r=e.extent,n=tr(r),e=(null==(e=e.properties)?void 0:e.boundary)||(n?"item":void 0);switch(e){case"item":t=n?nr(r):null;break;case"none":t=null}return{provenance:e,geometry:t}}(n)},get summary(){return y||n.snippet||n.description},urls:x,get portalHomeUrl(){return x.portalHome},get portalDataUrl(){return x.portalData},get portalApiUrl(){return x.portalApi},get thumbnailUrl(){return x.thumbnail},get createdDate(){return new Date(n.created)},createdDateSource:"item.created",get updatedDate(){return k.date},get updatedDateSource(){return k.source},get updatedDatePrecision(){return k.precision},get modified(){return k.date.getTime()},get publishedDate(){return C.date},get publishedDateSource(){return C.source},get publishedDatePrecision(){return C.precision},get metadataUpdatedDate(){return T.date},get metadataUpdatedDateSource(){return T.source},get metadataUpdatedDatePrecision(){return T.precision},get updateFrequency(){return yr(u)},get metadataUpdateFrequency(){return yr(u,"metadataUpdateFrequency")},get publisher(){return{name:n.owner,username:n.owner}},get metrics(){return n.properties&&n.properties.metrics},get spatialReference(){var e;return(null==(e=null==v?void 0:v.extent)?void 0:e.spatialReference)||function(e){e=e.spatialReference;if(!e||"object"==typeof e)return e;e=parseInt(e+"",10);return isNaN(e)?null:{wkid:e}}(n)||null},get viewDefinition(){var e=v&&Nr(v)&&s&&Array.isArray(s.layers)&&s.layers.find(function(e){return e.id===v.id});return e?e.layerDefinition:void 0},get orgId(){return p?p.id:n.orgId||(null==l?void 0:l.orgId)},get contentTypeIcon(){return console.warn("DEPRECATED: it is now the responsibility of the consuming package to determine the icon"),vr(S)},get license(){return console.warn("DEPRECATED: use structuredLicense instead"),{name:"Custom License",description:n.accessInformation}},get hubType(){return console.warn("DEPRECATED: use family instead"),or(S)},get additionalResources(){var t=n,e=u,r=void 0;return null===(e=q(e,"metadata.distInfo.distTranOps.onLineSrc")||null)?null:(e=Array.isArray(e)?e:[e]).map(function(e){return{name:e.orName,url:hr(e,t,r),isDataSource:fr(e,t)}})}})};function Fr(e){e=e?e.split("_"):[];return{itemId:e[0],layerId:e[1]}}function Lr(e){e=Fr(e).itemId;return!(!e||fe(e))}function _r(e,t){return/.+::.+/.test(e)?e:t+"::"+e}function jr(e,t){return t&&e.match(t+"::")?e.split(t+"::")[1]:e}function k(){this.operations=[]}k.prototype.startOperation=function(e){e=c(e);e.startedAt=(new Date).getTime(),e.state="working",this.operations.push(e)},k.prototype.start=function(e,t){e={type:e,id:a(t,"id",V(e+"_")),inputs:a(t,"inputs",{}),cleanup:a(t,"cleanup","n/a"),startedAt:(new Date).getTime(),state:"working"};return this.operations.push(e),e.id},k.prototype.getOperation=function(t){return this.operations.find(function(e){return e.id===t})},k.prototype.getOperations=function(){return this.operations},k.prototype.finish=function(e,t){var r=this.getOperation(e);if(!r)throw new Error("No operation with id "+e+" present in stack");r.duration=(new Date).getTime()-r.startedAt,r.state="completed",t&&(r.output=c(t))},k.prototype.merge=function(e){this.operations=m(this.operations,e.operations)},k.prototype.getCompleted=function(){return c(this.operations.filter(function(e){return"completed"===e.state}))},k.prototype.getWorking=function(){return c(this.operations.filter(function(e){return"working"===e.state}))},k.prototype.toString=function(){return this.operations.sort(function(e,t){return e.startedAt<t.startedAt?-1:t.startedAt<e.startedAt?1:0}).map(Mr).join("\n")},k.prototype.serialize=function(){return{operations:c(this.getOperations())}};var Br=k;function Mr(e){var t=e.startedAt+" : Operation "+e.id+" started with inputs "+JSON.stringify(e.inputs)+" but was not completed";return t="completed"===e.state?e.startedAt+" : Operation "+e.id+" took "+e.duration+" ms with inputs "+JSON.stringify(e.inputs)+" and output "+(e.output?JSON.stringify(e.output):"n/a"):t}var Gr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Hr(e,t,r){return e(r={path:t,exports:{},require:function(e,t){throw null==t&&r.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},r.exports),r.exports}function Vr(e,t){t=Object.assign({},Wr,t),e=e.replace(/<!--[\s\S]*?-->/g,"");for(var r=new Kr("!xml"),n=r,o=new RegExp("<((!\\[CDATA\\[([\\s\\S]*?)(\\]\\]>))|(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))([^>]*)>|((\\/)(([\\w:\\-\\._]*:)?([\\w:\\-\\._]+))>))([^<]*)","g"),i=o.exec(e),a=o.exec(e);i;){var s,u="]]>"===(u=i)[4]?Yr.CDATA:"/"===u[10]?Yr.CLOSING:void 0!==u[8]&&"/"===u[8].substr(u[8].length-1)?Yr.SELF:Yr.OPENING;u===Yr.CLOSING?(n.parent&&i[14]&&(n.parent.val=C.getValue(n.parent.val)+""+Jr(i[14],t)),n=n.parent):u===Yr.CDATA?t.cdataTagName?((s=new Kr(t.cdataTagName,n,i[3])).attrsMap=$r(i[8],t),n.addChild(s),n.val=C.getValue(n.val)+t.cdataPositionChar,i[14]&&(n.val+=Jr(i[14],t))):n.val=(n.val||"")+(i[3]||"")+Jr(i[14],t):u===Yr.SELF?(s=new Kr(t.ignoreNameSpace?i[7]:i[5],n,""),i[8]&&1<i[8].length&&(i[8]=i[8].substr(0,i[8].length-1)),s.attrsMap=$r(i[8],t),n.addChild(s)):((s=new Kr(t.ignoreNameSpace?i[7]:i[5],n,Jr(i[14],t))).attrsMap=$r(i[8],t),n.addChild(s),n=s),i=a,a=o.exec(e)}return r}var C=Hr(function(e,t){function r(e,t){return null!=(t=t.exec(e))}t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t){if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o++)e[r[o]]=t[r[o]]},t.getValue=function(e){return t.isExist(e)?e:""},t.doesMatch=r,t.doesNotMatch=function(e,t){return!r(e,t)},t.getAllMatches=function(e,t){for(var r=[],n=t.exec(e);n;){for(var o=[],i=n.length,a=0;a<i;a++)o.push(n[a]);r.push(o),n=t.exec(e)}return r}}),Kr=function(e,t,r){this.tagname=e,this.parent=t,this.child=[],this.attrsMap,this.val=r,this.addChild=function(e){this.child.push(e)}},zr=Hr(function(e,t){var r=Gr;function s(e,t){if(!e)return t;var r,n={};for(r in t)n[r]=(k(e,r)?e:t)[r];return n}function f(e,t){var r="";return 55296<=e&&e<=57343||1114111<e?(t&&T("character reference outside the permissible Unicode range"),"�"):k(D,e)?(t&&T("disallowed character reference"),D[e]):(t&&C(S,e)&&T("disallowed character reference"),65535<e&&(r+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+x(e))}function u(e){return"&#x"+e.toString(16).toUpperCase()+";"}function c(e){return"&#"+e+";"}function l(e,t){function r(e){return a(e.charCodeAt(0))}(t=s(t,l.options)).strict&&y.test(e)&&T("forbidden code point");var n=t.encodeEverything,o=t.useNamedReferences,i=t.allowUnsafeSymbols,a=t.decimal?c:u;return n?(e=e.replace(d,function(e){return o&&k(g,e)?"&"+g[e]+";":r(e)}),o&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),o&&(e=e.replace(m,function(e){return"&"+g[e]+";"}))):o?e=(e=(e=i?e:e.replace(b,function(e){return"&"+g[e]+";"})).replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(m,function(e){return"&"+g[e]+";"}):i||(e=e.replace(b,r)),e.replace(p,function(e){var t=e.charCodeAt(0),e=e.charCodeAt(1);return a(1024*(t-55296)+e-56320+65536)}).replace(h,r)}function n(e,p){var d=(p=s(p,n.options)).strict;return d&&a.test(e)&&T("malformed character reference"),e.replace(v,function(e,t,r,n,o,i,a,s){var u,c,l;return t?(t=t,c=r,d&&!c&&T("character reference was not terminated by a semicolon"),u=parseInt(t,10),f(u,d)):n?(r=n,c=o,d&&!c&&T("character reference was not terminated by a semicolon"),u=parseInt(r,16),f(u,d)):i?k(w,l=i)?w[l]:(d&&T("named character reference was not terminated by a semicolon"),e):(l=a,(t=s)&&p.isAttributeValue?(d&&"="==t&&T("`&` did not start a character reference"),e):(d&&T("named character reference was not terminated by a semicolon"),A[l]+(t||"")))})}var o=t,t=e&&e.exports==o&&e,e="object"==typeof Gr&&Gr,p=(e.global!==e&&e.window!==e||(r=e),/[\uD800-\uDBFF][\uDC00-\uDFFF]/g),d=/[\x01-\x7F]/g,h=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,m=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,g={"":"shy","":"zwnj","":"zwj","":"lrm","":"ic","":"it","":"af","":"rlm","":"ZeroWidthSpace","":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp"," ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},b=/["&'<>`]/g,i={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},a=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,y=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,v=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)([=a-zA-Z0-9])?/g,w={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"",InvisibleTimes:"",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:" ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"",zwnj:""},A={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},D={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},S=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,E={}.hasOwnProperty,k=function(e,t){return E.call(e,t)},C=function(e,t){for(var r=-1,n=e.length;++r<n;)if(e[r]==t)return!0;return!1},T=function(e){throw Error("Parse error: "+e)},q=(n.options={isAttributeValue:!(l.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1}),strict:!1},{version:"1.1.1",encode:l,decode:n,escape:function(e){return e.replace(b,function(e){return i[e]})},unescape:n});if(o&&!o.nodeType)if(t)t.exports=q;else for(var I in q)k(q,I)&&(o[I]=q[I]);else r.he=q}),Yr={OPENING:1,CLOSING:2,SELF:3,CDATA:4},Wr={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,decodeHTMLchar:!1,cdataTagName:!1,cdataPositionChar:"\\c"};function Jr(e,t){return e&&(t.trimValues&&(e=e.trim()),e=Zr(e=t.decodeHTMLchar?zr.decode(e):e,t.parseNodeValue)),e}function Zr(e,t){return t&&"string"==typeof e?""===e.trim()||isNaN(e)?"true"===e||"false"!==e&&e:-1!==e.indexOf(".")?Number.parseFloat(e):Number.parseInt(e,10):C.isExist(e)?e:""}var Qr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function $r(e,t){if(!t.ignoreAttributes&&"string"==typeof e){e=e.replace(/\r?\n/g," ");for(var r=C.getAllMatches(e,Qr),n=r.length,o={},i=0;i<n;i++){var a=function(e,t){if(t.ignoreNameSpace){var t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}(r[i][1],t);a.length&&(void 0!==r[i][4]?(t.trimValues&&(r[i][4]=r[i][4].trim()),t.decodeHTMLchar&&(r[i][4]=zr.decode(r[i][4],{isAttributeValue:!0})),o[t.attributeNamePrefix+a]=Zr(r[i][4],t.parseAttributeValue)):t.allowBooleanAttributes&&(o[t.attributeNamePrefix+a]=!0))}if(Object.keys(o).length)return t.attrNodeName?((e={})[t.attrNodeName]=o,e):o}}var Xr=function(e,t){for(var r={},n=0;n<e.child.length;n++){var o,i=e.child[n].tagname,a=Xr(e.child[n],t);void 0!==r[i]?(Array.isArray(r[i])||(o=r[i],r[i]=[],r[i].push(o)),r[i].push(a)):r[i]=t.arrayMode?[a]:a}return C.merge(r,e.attrsMap),C.isEmptyObject(r)?C.isExist(e.val)?e.val:"":(C.isExist(e.val)&&("string"!=typeof e.val||""!==e.val&&e.val!==t.cdataPositionChar)&&(r[t.textNodeName]=e.val),r)},en={parse:function(e,t){return t=Object.assign({},Wr,t),Xr(Vr(e,t),t)},getTraversalObj:Vr,convertToJson:Xr}.parse;function tn(e,t){return Ke(e,I(I({},t),{fileName:"metadata/metadata.xml"})).then(function(e){return en(e,{ignoreAttributes:!1,attributeNamePrefix:"@_",textNodeName:"#value"})}).catch(function(){return null})}function rn(e,t,r){var n=t.data,o=t.stack,t=t.requestOptions;return o.finish(r,{error:e}),{data:I(I({},n),{errors:sn(e,n.errors)}),stack:o,requestOptions:t}}function nn(e,t,r){return t=t.reduce(function(e,t){t=an[t];return t&&e.push(t),e},[]),le(t)({data:{item:e},stack:new Br,requestOptions:r}).then(function(e){return e.data})}var on,an={groupIds:function(t){var e,r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichGroupIds");return e=r.item.id,u(Ge(e,e=o)+"/groups",e).then(function(e){e=m(e.admin,e.member,e.other).map(function(e){return e.id});return n.finish(i),{data:I(I({},r),{groupIds:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},metadata:function(e){var t=e.data,r=e.stack,n=e.requestOptions,o=r.start("enrichMetadata");return tn(t.item.id,n).then(function(e){return r.finish(o),{data:I(I({},t),{metadata:e}),stack:r,requestOptions:n}})},ownerUser:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichOwner");return lt(I({username:r.item.owner},o)).then(function(e){return n.finish(i),{data:I(I({},r),{ownerUser:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},data:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichData");return He(r.item.id,o).then(function(e){return n.finish(i),{data:I(I({},r),{data:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},server:function(t){var r=t.data,n=t.stack,o=t.requestOptions,i=n.start("enrichServer"),e=r.item.url,e=I(I({},o),{url:e});return u(s((e=e).url),e).then(function(e){return n.finish(i),{data:I(I({},r),{server:e}),stack:n,requestOptions:o}}).catch(function(e){return rn(e,t,i)})},layers:function(t){var e,r,n=t.data,o=t.stack,i=t.requestOptions,a=o.start("enrichLayers"),s=n.item.url,s=I(I({},i),{url:s});return r=(e=s).url,e=ue(s,["url"]),u(Qt(r)+"/layers",e).then(function(e){return m(e.layers,e.tables).filter(function(e){return"Group Layer"!==e.type})}).then(function(e){return o.finish(a),{data:I(I({},n),{layers:e}),stack:o,requestOptions:i}}).catch(function(e){return rn(e,t,a)})}},sn=function(e,t){return m(t=void 0===t?[]:t,[{type:"Other",message:"string"==typeof e?e:e.message}])},un=function(e){e=[].concat.apply([],e.filter(Array.isArray));return e.length?e:void 0},cn=(ae(ln,on=Error),ln);function ln(e,t,r){e=on.call(this,e)||this;return e.status=r,e.url=t,e}function pn(e,t){var r,n,t=I({httpMethod:"GET"},t),o=t.fetch||fetch,i=I({"Content-Type":"application/json"},t.headers),a=("GET"===t.httpMethod?r=t.params:n=JSON.stringify(t.params),Re({host:Pt(t),path:("/api/v3/"+e).replace(/\/\//g,"/"),query:r}));return o(a,{method:t.httpMethod,headers:i,body:n}).then(function(e){if(e.ok)return e.json();throw new cn(e.statusText,a,e.status)})}function dn(e){var t=["groupIds","metadata","ownerUser","org"];return function(e){e=qr(e);return d(["template","solution"],or(e))||d(["Web Map","Web Scene"],e)}(e)&&t.push("data"),qt(e.url)?t.concat("server","layers"):t}function fn(e,t){return(e=c(e)).params=I(I({},e.params),{"fields[datasets]":"slug,boundary,extent,searchDescription,statistics"}),t&&(e.params["filter[slug]"]=t),e}function hn(e){var t=(r=Fr(e.id)).itemId,r=(r=r.layerId)&&parseInt(r,10),e=e.attributes;return{itemId:t,layerId:r,slug:e.slug,boundary:e.boundary,extent:e.extent,searchDescription:e.searchDescription,statistics:e.statistics}}function mn(i,a){return f(void 0,void 0,void 0,function(){var n,o;return h(this,function(e){switch(e.label){case 0:n=i.url,o=i.viewDefinition,o=null==o?void 0:o.definitionExpression,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,(t=I(I({},a),{url:n,where:o,returnCountOnly:!0}),r=Se(t,["where","objectIds","relationParam","time","distance","units","outFields","geometry","geometryType","spatialRel","returnGeometry","maxAllowableOffset","geometryPrecision","inSR","outSR","gdbVersion","returnDistinctValues","returnIdsOnly","returnCountOnly","returnExtentOnly","orderByFields","groupByFieldsForStatistics","outStatistics","returnZ","returnM","multipatchOption","resultOffset","resultRecordCount","quantizationParameters","returnCentroid","resultType","historicMoment","returnTrueCurves","sqlFormat","returnExceededLimitFeatures","f"],{httpMethod:"GET",params:I({where:"1=1",outFields:"*"},t.params)}),u(s(t.url)+"/query",r))];case 2:return[2,e.sent().count];case 3:return e.sent(),[2,1/0];case 4:return[2]}var t,r})})}var gn=function(r,n){return f(void 0,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return[4,pn("/datasets",fn(n,r))];case 1:return t=e.sent(),[2,hn(t.data[0])]}})})},bn=function(r,n){return f(void 0,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,pn("/datasets/"+r,fn(n))];case 1:return t=e.sent(),[2,hn(t.data)];case 2:return t=e.sent(),[2,{errors:sn(t)}];case 3:return[2]}})})},yn=function(n,o){return f(void 0,void 0,void 0,function(){var t,r;return h(this,function(e){switch(e.label){case 0:return[4,Me(n,o)];case 1:return t=e.sent(),r=(null==o?void 0:o.enrichments)||dn(t),[4,nn(t,r,o)];case 2:return r=e.sent(),[2,(i=I(I({},r),{item:t}),a=o,f(void 0,void 0,void 0,function(){var t,r,n,o;return h(this,function(e){switch(e.label){case 0:return(t=i.item,r=i.data,n=i.layers,(n=n&&Ur(t,n,a&&a.layerId))&&Nr(n)&&!r)?[4,nn(t,["data"],a)]:[3,2];case 1:return o=e.sent(),[3,3];case 2:o=void 0,e.label=3;case 3:return n=o,[2,I(I(I({},i),n),{errors:un([i.errors,null==n?void 0:n.errors])})]}})}))]}var i,a})})};function vn(e){void 0===e&&(e=""),console.warn("DEPRECATED: Use getCollection() instead. getCategory will be removed at v10.0.0");e=_t(e);return"feedback"===e?"app":e}function wn(t,e){return d(["template","feedback"],t.family)?t.id:cr(t.type)?(r=(q(e,"data.values.pages")||[]).find(function(e){return e.id===t.id}))?r.slug:t.id:t.slug?(r=q(e,"domainInfo.orgKey"),q(e,"data.values.isUmbrella")?t.slug:jr(t.slug,r)):t.hubId||t.id;var r}function An(e){return Rr(e)}function Dn(e){if(e){var t,r,n,o,i,a,s,u,c,l,p,d,f,h,m,g,b,y,v,w,A,D,S,x,E,k,C,T,q,I,O,P,U,N,F,L,_,j,B,M,G,H,R=e.id,e=e.attributes;if(e)return R=Fr(R).itemId,t=e.owner,r=e.orgId,n=e.created,o=e.modified,i=e.name,a=e.title,s=e.type,u=e.typeKeywords,c=e.description,l=e.snippet,p=e.tags,d=e.thumbnail,f=e.categories,h=e.contentStatus,m=e.spatialReference,g=e.accessInformation,b=e.licenseInfo,y=e.culture,v=e.url,w=e.access,A=e.proxyFilter,D=e.properties,S=e.appCategories,x=e.industries,E=e.languages,k=e.largeThumbnail,C=e.banner,T=e.screenshots,q=e.listed,I=e.ownerFolder,O=e.size,P=e.protected,U=e.commentsEnabled,N=e.numComments,F=e.numRatings,L=e.avgRating,_=e.numViews,j=e.itemControl,B=e.scoreCompleteness,M=e.itemExtent,G=e.itemModified,H=e.modifiedProvenance,e=e.serviceSpatialReference,{id:R,owner:t,orgId:r,created:n,modified:G||"item.modified"===H&&o,title:a||i,type:v&&Ot(v)||s,typeKeywords:u,description:c,tags:p,snippet:l,thumbnail:d,extent:M||[],categories:f,contentStatus:h,spatialReference:m||e,accessInformation:g,licenseInfo:b,culture:y,url:v,access:w,size:O,protected:P,proxyFilter:A,properties:D,appCategories:S,industries:x,languages:E,largeThumbnail:k,banner:C,screenshots:T,listed:q,ownerFolder:I,commentsEnabled:U,numComments:N,numRatings:F,avgRating:L,numViews:_,itemControl:j,scoreCompleteness:B}}}function Sn(e,t){return t?"CSV":z(e||"")}function xn(e,t){var r=wn(e,t);return{relative:e=kn(e,r),absolute:""+q(t,"item.url").replace(/\/$/,"")+e}}function En(e,t){return t=I(I({},e.urls),t),I(I({},e),{urls:t})}function kn(e,t){return ur(e.type,t||e.identifier,e.typeKeywords)}var Cn=function(e,t){var t=xn(e,t),r=t.relative,t=t.absolute;return En(e,{relative:r,site:t})};const Tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const qn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var In={atob:function(t){if((t=(t=(t=""+t).replace(/[ \t\n\f\r]/g,"")).length%4==0?t.replace(/==?$/,""):t).length%4==1||/[^+/0-9A-Za-z]/.test(t))return null;let r="",n=0,o=0;for(let e=0;e<t.length;e++)n=(n<<=6)|function(e){e=Tn.indexOf(e);return e<0?void 0:e}(t[e]),24===(o+=6)&&(r=(r=(r+=String.fromCharCode((16711680&n)>>16))+String.fromCharCode((65280&n)>>8))+String.fromCharCode(255&n),n=o=0);return 12===o?(n>>=4,r+=String.fromCharCode(n)):18===o&&(n>>=2,r=(r+=String.fromCharCode((65280&n)>>8))+String.fromCharCode(255&n)),r},btoa:function(e){let t;for(e=""+e,t=0;t<e.length;t++)if(255<e.charCodeAt(t))return null;let r="";for(t=0;t<e.length;t+=3){const n=[void 0,void 0,void 0,void 0];n[0]=e.charCodeAt(t)>>2,n[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(n[1]|=e.charCodeAt(t+1)>>4,n[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(n[2]|=e.charCodeAt(t+2)>>6,n[3]=63&e.charCodeAt(t+2));for(let e=0;e<n.length;e++)void 0===n[e]?r+="=":r+=function(e){if(0<=e&&e<64)return qn[e];return}(n[e])}return r}},On="4326",Pn={csv:{name:"CSV",itemTypes:["CSV","CSV Collection"],supportsProjection:!0},kml:{name:"KML",itemTypes:["KML","KML Collection"],supportsProjection:!1},shapefile:{name:"Shapefile",itemTypes:["Shapefile"],supportsProjection:!0},fileGeodatabase:{name:"File Geodatabase",itemTypes:["File Geodatabase"],supportsProjection:!0},geojson:{name:"GeoJson",itemTypes:["GeoJson"],supportsProjection:!1},excel:{name:"Excel",itemTypes:["Microsoft Excel"],supportsProjection:!0},featureCollection:{name:"Feature Collection",itemTypes:["Feature Collection"],supportsProjection:!0}};function Un(e){var t,r;return"object"==typeof e?(t=e.wkid,r=e.wkt,t?t+"":In.btoa(r)):e}function Nn(e){return"spatialRefId:"+Un(function(t){var r;try{r=JSON.parse(t)}catch(e){r=t}return r}(e))}function Rn(e){return"exportItem:"+e}function Fn(e){return e?"exportLayer:0"+e:"exportLayer:null"}function Ln(e){var t,r=e.autoAddResult,n=e.inviteResult,o=e.primaryEmailResult,e=e.secondaryEmailResult;return(o||e)&&(t={success:(o=[o,e].filter(function(e){return e})).every(function(e){return e.success})},(e=o.reduce(function(e,t){return e.concat(a(t,"errors",[]))},[])).length&&(t.errors=e)),{success:[r,n,t].filter(function(e){return e}).every(function(e){return e.success}),autoAdd:r,invite:n,email:t}}function _n(t,e){var r;return t&&(r=!q(t,"notAdded.length")&&!t.errors,e.autoAddResult={success:r},r||(r=t.errors||[],q(t,"notAdded.length")&&r.push(new p("Users not auto-added: "+t.notAdded.join(", "))),e.autoAddResult.errors=r,r=e.usersToAutoAdd.filter(function(e){return d(t.notAdded,e.username)}),e.usersToInvite=e.usersToInvite.concat(r))),e}function jn(e,t){return e.orgId===t.orgId}function Bn(e){return"org_admin"===e.role&&!e.roleId}function Mn(e,t,r,n){var o=Promise.resolve(null);return e.length&&(r={authentication:r,message:t.body,subject:t.subject,notificationChannelType:"email",users:e.map(function(e){return e.username})},n||(r.batchSize=1),o=ut(r)),o}function Gn(t){var r,e=Promise.resolve(t);return t.email&&t.secondaryRO&&q(t,"inviteResult.success")&&(r=a(t,"secondaryRO.portalSelf.user",{}),e=Mn(t.usersToInvite.filter(function(e){return jn(e,r)}),t.email,t.secondaryRO.authentication,Bn(r)).then(function(e){return t.secondaryEmailResult=e,t})),e}function Hn(e,t,r){var n=Promise.resolve(null);return n=t.length?Xe({id:e,users:t.map(function(e){return e.username}),authentication:r}):n}function Vn(t){return Hn(q(t,"groupId"),q(t,"usersToAutoAdd"),q(t,"primaryRO.authentication")).then(function(e){return _n(e,t)})}function Kn(e,t,r,n,o){void 0===n&&(n=20160),void 0===o&&(o="group_member");var i=Promise.resolve(null);return i=t.length?nt({id:e,users:t.map(function(e){return e.username}),authentication:r,role:o,expiration:n}):i}function zn(t){return Kn(q(t,"groupId"),q(t,"usersToInvite"),q(t,"primaryRO.authentication")).then(function(e){return t.inviteResult=e,t})}function Yn(t){var e=Promise.resolve(t);return e=t.email&&q(t,"inviteResult.success")?Mn(t.usersToEmail,t.email,t.primaryRO.authentication,Bn(t.requestingUser)).then(function(e){return t.primaryEmailResult=e,t}):e}function Wn(e,t){var r,n=[];return-1!==t.privileges.indexOf("portal:admin:assignToGroups")&&(r=[t.orgId,t.cOrgId].filter(function(e){return e}),n=e.filter(function(e){return-1!==r.indexOf(e.orgId)})),n}function Jn(e,t){var r=Wn(e,t);return e.filter(function(t){return!r.some(function(e){return e.username===t.username})})}function Zn(e,t,r){void 0===r&&(r=!1);e=Jn(e,t).filter(function(e){return jn(e,t)});return r&&e.push(t),e}var Qn=["ar","bs","ca","cs","da","de","en","es","et","el","fi","fr","hr","he","hu","it","id","ja","ko","lt","lv","nb","nl","pl","pt","pt-br","pt-pt","ro","ru","sl","sr","sv","th","tr","uk","vi","zh","zh-cn","zh-tw","zh-hk"];function $n(e,t){if("object"==typeof e&&null!==e&&"string"==typeof t){for(var r=t.split("."),n=0;n<r.length-1;n++){if(!e.hasOwnProperty(r[n]))return;e=e[r[n]]}delete e[r[r.length-1]]}}function Xn(e){var t=c(e.item);return t.text=JSON.stringify(e.data),t}function eo(e,t){return Promise.all([Me(e,t),He(e,t)]).then(function(e){return{item:e[0],data:e[1]}})}function to(e,t){var r=c(e),n=c(e.item);return n.data=c(e.data),je(I({item:n},t)).then(function(e){return r.item.id=e.id,r.item.created=(new Date).getTime(),r.item.modified=r.item.created,r})}function ro(e,t){var r=c(e),n=c(e.item);return n.data=c(e.data),_e(I({item:n},t)).then(function(){return r.item.modified=(new Date).getTime(),r})}function no(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return[4,He(r.id,n)];case 1:return t=e.sent(),[2,{item:r,data:t}]}})})}function oo(e,t,r){return void 0===r&&(r=void 0),t.split(".").reduce(function(e,t){return e?e[t]:r},e)}function io(r,n){return Object.keys(r).reduce(function(e,t){return e[t]=n(r[t],t,r),e},{})}function ao(e){return e instanceof Date}function so(e){return"function"==typeof e}function uo(e){return"object"==typeof e}function co(e){return e instanceof RegExp}function lo(e){return"object"==typeof e}function po(e){var o,t,r;return Array.isArray(e)?(t=e.map(n).filter(function(e){return null!=e}),r=t=t,t=t.reduce(function(e,t){return mo(t)&&ho(t)&&(e<(t=fo(t))&&(e=t)),e},-1),r=-1<t?0===t?[]:"{{delete:"+(t-1)+"}}":r):e&&lo(e)?(o=io(e,n),t=0<(t=Object.keys(o).reduce(function(e,t){var r,n=o[t];return mo(n)&&ho(n)?(r=fo(n))>e.maxLevel&&(e.maxLevel=r):e.obj[t]=n,e},{obj:{},maxLevel:-1})).maxLevel?1===t.maxLevel?void 0:"{{delete:"+(t.maxLevel-1)+"}}":t.obj):e="string"==typeof(e=r=e)&&ho(r)?function(e){var t=e,e=fo(e);t=0===e?void 0:"{{delete:"+e+"}}";return t}(r):e;function n(e,t){return po(e)}}var fo=function(e){return parseInt(e.replace(/{|}/g,"").split(":")[1])};function ho(e){return e&&"string"==typeof e&&-1<e.indexOf("{{delete")}var mo=function(e){return"string"==typeof e};function go(e,t,r,n){return void 0===n&&(n=0),t?t:"{{delete:"+n+"}}"}var bo=function(e){var t={};if(Array.isArray(e))t=e.map(bo);else if("object"==typeof e)for(var r in e)null!=e[r]&&"object"==typeof e[r]?t[r]=bo(e[r]):t[r]=e[r];else t=e;return t},yo=/{{\s*?[\w].*?}}/g,vo=function(e){return"string"==typeof e};function wo(e){return e||""===e||0===e}function Ao(e,a,s){if((s=bo(s=void 0===s?null:s)||{}).optional)throw new Error("Please do not pass in an `optional` transform; adlib provides that internally.");return s.optional=go,po(function r(e,n,o){return o=o||"",Array.isArray(e)?e.map(t):!e||!uo(e)||ao(e)||co(e)||so(e)?n(e,o):Object.assign({},e,io(e,t));function t(e,t){return r(e,n,o?o+"."+t:t)}}(e,function(t,e){if(!vo(t))return t;var r,n=t.match(yo);return n&&n.length?(n.map(function(e){var o,i=!1,t=e.replace(/{|}/g,"").trim(),r=(-1<t.indexOf("||")&&(r=t.split("||").map(function(e){return e.trim()}),o=r.length,t=r.find(function(e,t){var r,n;return n=a,r=(r=e).split(":")[0],null!=(n=oo(n,r,null))?e:t+1===o&&(i=!0,isNaN(e)?e:parseInt(e))})),{key:e,value:t});return i||(t=function(e,t,r){var n,o=e.split(":");if(1<o.length){var i,a=o[0],s=o[1];if(o[2]&&(i=o[2]),!r||!r[s]||"function"!=typeof r[s])throw new Error("Attempted to apply non-existant transform "+s+" on "+a+" with params "+e);n=oo(t,a),n=r[s](a,n,t,i)}else n=oo(t,e);return n}(t,a,s),r.value=wo(t)?t:e),r}).forEach(function(e){t===e.key?("string"!=typeof e.value||isNaN(e.value)||""===e.value||(-1<e.value.indexOf(".")?e.value=parseFloat(e.value):e.value=parseInt(e.value)),r=e.value):t=t.replace(e.key,e.value)}),wo(r)?r:t):t}))}function Do(e,t,r){return Ao(e,t,r)}function So(e,t,r){return Qe({q:'title:"'+e+'" AND '+Object.keys(t).map(function(e){return e+':"'+t[e]+'"'}).join(" AND "),authentication:r}).then(function(e){return 0<e.results.length}).catch(function(e){throw Error("Error in doesItemExistWithTitle "+e)})}function xo(e,t){return t.toLowerCase()+"-"+he(e)}function Eo(e,t){e=e.filter(function(e){return!e.startsWith("slug|")});return e.push("slug|"+t),e}function ko(e,t){return Co({slug:e},t).then(function(e){return e.length?e[0]:null})}function Co(e,t){t={q:"",filter:'typekeywords:"slug|'+e.slug+'"',authentication:t.authentication};return e.exclude&&(t.q="NOT id:"+e.exclude),Qe(t).then(function(e){return e.results}).catch(function(e){throw Error("Error in getItemBySlug "+e)})}function To(t,r,n){void 0===n&&(n=0);var o=t.slug;return Co({slug:o=n?t.slug+"-"+n:o,exclude:t.existingId},r).then(function(e){return e.length?To(t,r,++n):o}).catch(function(e){throw Error("Error in getUniqueSlug "+e)})}var qo=["id","isOrgItem","proxyFilter","ownerFolder","protected","owner","created","modified","guid","name","access","size","listed","numComments","numRatings","avgRating","numViews","scoreCompleteness","groupDesignations","listed","screenshots","banner","appCategories","industries","languages","largeThumbnail"];function Io(n,o,i,a){return f(this,void 0,void 0,function(){var t,r;return h(this,function(e){switch(e.label){case 0:t=I({item:{id:n},params:{thumbnail:o},filename:i},a),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,_e(t)];case 2:if(e.sent().success)return[3,4];throw new N("Set Project Thumbnail","Unknown error setting thumbnail.");case 3:throw(r=e.sent())instanceof Error?new N("Set Project Thumbnail",r.message,r):new N("Set Project Thumbnail","Unknown error setting thumbnail.");case 4:return[2]}})})}function Oo(e,t,r){return u(v(r)+"/oauth2/registerApp",{method:"POST",authentication:r.authentication,params:{itemId:e,appType:"browser",redirect_uris:JSON.stringify(t)}})}var Po={arcgis:{label:"ArcGIS Online",url:"https://www.arcgis.com",type:"arcgis"},arcgisQA:{label:"ArcGIS Online QAEXT",url:"https://qaext.arcgis.com",type:"arcgis"},arcgisDEV:{label:"ArcGIS Online DEVEXT",url:"https://devext.arcgis.com",type:"arcgis"},hub:{label:"ArcGIS Hub",url:"https://hub.arcgis.com/api",type:"arcgis-hub"},hubDEV:{label:"ArcGIS Hub DEV",url:"https://hubdev.arcgis.com/api",type:"arcgis-hub"},hubQA:{label:"ArcGIS Hub QA",url:"https://hubqa.arcgis.com/api",type:"arcgis-hub"}};function Uo(e){return"string"==typeof e&&e in Po?Po[e]:e}function No(e,t){var r=c(e);return t.from<e.from&&(r.from=t.from),t.to>e.to&&(r.to=t.to),r}function Ro(r,n){var o={};return["any","all","not","exact"].forEach(function(e){var t=m(Fo(r,e),Fo(n,e));t.length&&(o[e]=t.filter(Y))}),o}function Fo(e,t){var r=[];return e[t]&&(e=e[t],r=Array.isArray(e)?e:[e]),r}function Lo(e){var t={};return Array.isArray(e)?t={any:e}:("string"==typeof e&&(t={any:[e]}),"object"==typeof e&&(t=e)),t}function _o(e){var t=new Date,r={type:"date-range",from:t.getTime(),to:t.getTime()};switch(e.unit){case"hours":case"days":case"weeks":r.from=r.to-{min:6e4,hours:36e5,days:864e5,weeks:6048e5}[e.unit]*e.num;break;case"months":t.setMonth(t.getMonth()-e.num),r.from=t.getTime();break;case"years":t.setFullYear(t.getFullYear()-e.num),r.from=t.getTime()}return r}function T(e,t,r){var e=c(e),n=t.q,t=t.filter;return n&&(e.q=(e.q?" ("+e.q+" "+r+" "+n+")":n).trim()),t&&(e.filter=(e.filter?"("+e.filter+" "+r+" "+t+")":t).trim()),e}function jo(e,t){var r={q:"",filter:""};return t.exact&&(m(["username","firstname","lastname","fullname","email"],["title","tags","typekeywords","type","name","owner"],["title","typekeywords","owner"]).includes(e)?r.filter=Mo("AND",e,t.exact):("string"==typeof t.exact&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all.push(t.exact)),Array.isArray(t.exact)&&(t.all||(t.all=[]),"string"==typeof t.all&&(t.all=[t.all]),t.all=t.all.concat(t.exact)))),t.any&&(r.q=Mo("OR",e,t.any)),t.all&&(r.q=(r.q?r.q+" AND ":"")+Mo("AND",e,t.all)),t.not&&(r.q=(r.q?r.q+" AND ":"")+Mo("OR","-"+e,t.not)),r}function Bo(e,t){return{q:e+":["+t.from+" TO "+t.to+"]",filter:""}}function Mo(e,t,r){return Array.isArray(r)?"("+t+':"'+r.join('" '+e+" "+t+':"')+'")':t+':"'+r+'"'}function Go(e,t,r,n){var o=c(e);return e.authentication&&(o.authentication=Oe.deserialize(e.authentication.serialize())),o.start=-1<t?t:r+1,function(e){return e&&(o.authentication=e),n(o)}}function Ho(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/groups/"+t.id+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}function Vo(e,t,r){var n=null;return t.thumbnail&&(n=e+"/community/users/"+t.username+"/info/"+t.thumbnail,r&&"public"!==t.access&&(n=n+"?token="+r)),n}var Ko={$apps:[{type:{any:["Code Sample","Web Mapping Application","Mobile Application","Application","Desktop Application Template","Desktop Application","Operation View","Dashboard","Operations Dashboard Extension","Workforce Project","Insights Workbook","Insights Page","Insights Model","Hub Page","Hub Initiative","Hub Site Application","StoryMap","Web Experience","Web Experience Template","Form"],not:["Code Attachment","Featured Items","Symbol Set","Color Set","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]},typekeywords:{not:["MapAreaPackage","SMX"]}}],$storymap:[{type:"StoryMap"},{type:"Web Mapping Application",typekeywords:["Story Map"]}],$dashboard:[{type:"Dashboard",typekeywords:{any:["Dashboard"],not:["ArcGIS Operation View","Add In","Extension"]}}],$dataset:[],$experience:[{type:{any:["Web Experience"],not:["Web Experience Template"]}}],$site:[{type:["Hub Site Application","Site Application"]},{type:["Web Mapping Application"],typekeywords:["hubSite"]}],$initiative:[{type:{any:"Hub Initiative",not:"Hub Initiative Template"}}],$document:[{typekeywords:{any:"Document",not:["MapAreaPackage","SMX"]},type:{any:["Image","Layout","Desktop Style","Project Template","Report Template","Pro Report","Statistical Data Collection","360 VR Experience","netCDF","PDF","CSV","Administrative Report","Raster function template"],not:["Image Service","Explorer Document","Explorer Map","Globe Document","Scene Document","Code Attachment","Featured Items","Symbol Set","ColorSet","Windows Viewer Add In","Windows Viewer Configuration","Map Area","Indoors Map Configuration"]}}]};function zo(e){var t,o=[];return null!=(t=e.aggregations)&&t.counts&&e.aggregations.counts.forEach(function(r){var e={label:r.fieldName,attribute:r.fieldName,type:"multi-select"},n=[];r.fieldValues.forEach(function(e){var t={filterType:"content"},e=(t[r.fieldName]=e.value,{label:e.value,value:e.value,count:e.count,selected:!1,filter:t});n.push(e)}),e.options=n,o.push(e)}),o}function Yo(e){var e=e.map(Wo),n=["created","modified"],o=m(["filterType","subFilters","term"],n),e=e.reduce(function(r,e){return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];r.hasOwnProperty(t)?o.includes(t)?n.includes(t)?r[t]=No(r[t],e):"term"===t?r[t]=r[t]+" "+e:"subFilters"===t&&(r[t]=m(r[t],e)):r[t]=Ro(r[t],e):r[t]=c(e)}),r},{});return e.filterType="content",e}function Wo(e){var t=Jo(e);return Array.isArray(e.subFilters)&&(t.subFilters=t.subFilters.reduce(function(e,t){return"string"==typeof t?Ko[t]&&(e=e.concat(Ko[t])):e.push(t),e},[])),$o(t)}function Jo(e){var r=c(e);return r.subFilters=r.subFilters||[],r.type&&(Array.isArray(r.type)?r.type=r.type.reduce(function(e,t){return Zo(t)?r.subFilters=r.subFilters.concat(Qo(t)):e.push(t),e},[]):Zo(r.type)&&(e=r.type,r.subFilters=r.subFilters.concat(Qo(e)),delete r.type)),r}function Zo(e){var t=!1;return t="string"==typeof e?e in Ko:t}function Qo(e){return Ko[e]}function $o(t){var e,r={},n=(t.term&&(r.term=t.term),["created","modified"]),o=m(["filterType","subFilters","term"],n);return Object.entries(t).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r[t]=Lo(e))}),t.subFilters&&Array.isArray(t.subFilters)&&(e=t.subFilters,r.subFilters=e.map($o)),n.forEach(function(e){t[e]&&("relative-date"===t[e].type?r[e]=_o(t[e]):r[e]=c(t[e]))}),r}function Xo(e){var t,r=ei(e);return e.subFilters&&(t=e.subFilters.reduce(function(e,t){return e="object"==typeof t?T(e,ei(t),"OR"):e},{q:"",filter:""}),r=T(r,t,"AND")),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function ei(e){var r={q:"",filter:""},n=["created","modified"],o=m(["filterType","subFilters","term"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=T(r,jo(t,e),"AND")),n.includes(t)&&(r=T(r,Bo(t,e),"AND"))}),r}function ti(e,t,r){var i,n=Xo(Wo(e)),e=(null!=(e=r.aggregations)&&e.length&&(n.countFields=r.aggregations.join(","),n.countSize=200),["authentication","num","sortField","sortOrder","site"].forEach(function(e){r.hasOwnProperty(e)&&(n[e]=r[e])}),i=t,function n(o){return f(this,void 0,void 0,function(){var t,r;return h(this,function(e){switch(e.label){case 0:return[4,Qe(o)];case 1:return t=e.sent(),[4,Promise.all(t.results.map(function(e){return i(e,o)}))];case 2:return r=e.sent(),[2,{total:t.total,results:r,facets:[],hasNext:-1<t.nextStart,next:Go(o,t.nextStart,t.total,n)}]}})})});return r.api&&!r.authentication&&(t=Uo(r.api),n.portal=t.url),e(n)}ni.prototype.modelToObject=function(e,t){return r=this.mappings,oi(e,"modelKey",t,"objectKey",r);var r},ni.prototype.objectToModel=function(e,t){return r=this.mappings,oi(e,"objectKey",t,"modelKey",r);var r};var ri=ni;function ni(e){this.mappings=e}function oi(r,n,e,o,t){var i=c(e);return t.forEach(function(e){var t=q(e,n),e=q(e,o),t=q(r,t);null!=t&&$(i,e,t)}),i}var jt="Hub Project",ii={name:"No title provided",tags:[],typeKeywords:["Hub Project"],status:"inactive"},ai={item:{type:jt,title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:["Hub Project"],properties:{slug:""}},data:{display:"about",timeline:{},status:"inactive",contacts:[],schemaVersion:1}};function si(){var t=[];return["created","culture","description","extent","id","modified","owner","snippet","tags","typeKeywords","url","type"].forEach(function(e){t.push({objectKey:e,modelKey:"item."+e})}),["contacts","display","geometry","headerImage","layout","location","status"].forEach(function(e){t.push({objectKey:e,modelKey:"data."+e})}),t.push({objectKey:"slug",modelKey:"item.properties.slug"}),t.push({objectKey:"orgUrlKey",modelKey:"item.properties.orgUrlKey"}),t.push({objectKey:"name",modelKey:"item.title"}),t}function ui(i,a){return f(this,void 0,void 0,function(){var t,r,n,o;return h(this,function(e){switch(e.label){case 0:return(t=I(I({},ii),i)).slug||(t.slug=xo(t.name,t.orgUrlKey)),[4,To({slug:(r=t).slug},a)];case 1:return r.slug=e.sent(),t.typeKeywords=Eo(t.typeKeywords,t.slug),n=new ri(si()),[4,to(o=n.objectToModel(t,c(ai)),a)];case 2:return o=e.sent(),[2,n.modelToObject(o,{})]}})})}function ci(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,To({slug:(t=o).slug,existingId:o.id},i)];case 1:return t.slug=e.sent(),[4,eo(o.id,i)];case 2:return n=e.sent(),r=new ri(si()),[4,ro(r.objectToModel(o,n),i)];case 3:return n=e.sent(),[2,r.modelToObject(n,o)]}})})}function li(e,t){e=(fe(e)?Me:ko)(e,t);return e.then(function(e){return fi(e,t)})}function pi(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){switch(e.label){case 0:return[4,We(I(I({},r),{id:t}))];case 1:return e.sent(),[2]}})})}function di(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return[2,ti(Yo([{filterType:"content",type:{exact:["Hub Project"]}},t]),fi,r)]})})}function fi(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,no(o,i)];case 1:return t=e.sent(),n=new ri(si()),i.authentication&&(r=i.authentication,r=r.token),(n=n.modelToObject(t,{})).thumbnailUrl=br(t.item,i,r),[2,n]}})})}O.init=function(e){return new O(e)},Object.defineProperty(O.prototype,"context",{get:function(){return this._contextManager?this._contextManager.context:this._context},enumerable:!1,configurable:!0}),O.prototype.create=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return t.orgUrlKey||(t.orgUrlKey=this.context.portal.urlKey),[2,ui(t,r||this.context.userRequestOptions)];throw new N("Create Project","Creating Hub Projects requires authentication.")})})},O.prototype.update=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,ci(t,r||this.context.userRequestOptions)];throw new N("Update Project","Updating Hub Projects requires authentication.")})})},O.prototype.destroy=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,pi(t,r||this.context.userRequestOptions)];throw new N("Destroy Project","Destroying Hub Projects requires authentication.")})})},O.prototype.get=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return console.warn("HubProjectManager.get is deprecated and will be removed. Use .fetch() instead."),[2,this.fetch(t,r)]})})},O.prototype.fetch=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.requestOptions)return[2,li(t,r||this.context.requestOptions)];throw new N("Fetch Project","Can not retrieve context.requestOptions from Context Manager. HubProjectManager is configured incorrectly.")})})},O.prototype.search=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return!r.authentication&&this.context.session&&(r.authentication=this.context.session),[2,di(t,r)]})})},O.prototype.updateThumbnail=function(r,n,o,i){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=i||this.context.userRequestOptions,[4,Io(r.id,n,o,t)];case 1:return e.sent(),[2,this.fetch(r.id,i)]}})})},O.prototype.fromItem=function(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){return t=n||this.context.userRequestOptions,[2,fi(r,t)]})})};var hi,mi=O;function O(e){e instanceof Lt?this._contextManager=e:this._context=e}function gi(e,t){var r=e;return r=-1===e.indexOf("token")&&-1<e.indexOf(t.authentication.portal)?e+"?token="+t.authentication.token:r}function bi(e,t){return(t=void 0===t?{}:t).credentials||(t.credentials="same-origin"),fetch(e,t).then(function(e){return e.blob()})}function yi(r){return bi(r.url).then(function(e){return Le(t={id:r.id,owner:r.owner,name:r.fileName,resource:e,authentication:r.authentication}).then(function(e){e=y(t)+"/content/users/"+e+"/items/"+t.id+"/addResources";return t.params=I({file:t.resource,fileName:t.name,resourcesPrefix:t.prefix,text:t.content,access:t.private?"private":"inherit"},t.params),u(e,t)});var t})}function vi(t){return bi(t.url).then(function(e){return _e({item:{id:t.id,owner:t.owner},params:{fileName:t.fileName,thumbnail:e},authentication:t.authentication}).catch(function(e){return Promise.resolve()})}).catch(function(e){return Promise.resolve()})}function wi(r){var n={},o=["created","modified"],i=m(["term","searchUserAccess"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||l(t,Lo(e),n),o.includes(t)&&(e=c(q(r,t)),"relative-date"===q(r,t+".type")?l(t,_o(e),n):l(t,e,n))}),r.hasOwnProperty("searchUserAccess")&&(n.searchUserAccess=r.searchUserAccess),r.term&&(n.term=r.term),n}function Ai(e){var r={q:"",filter:""},n=["created","modified"],o=m(["term","searchUserAccess","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=T(r,jo(t,e),"AND")),n.includes(t)&&(r=T(r,Bo(t,e),"AND"))}),e.hasOwnProperty("searchUserAccess")&&(r.searchUserAccess=e.searchUserAccess),e.term&&(r.q=(e.term+" "+r.q).trim()),r}function Di(r){var n={},o=["created","modified","lastlogin"],i=m(["disabled","term"],o);return Object.entries(r).forEach(function(e){var t=e[0],e=e[1];i.includes(t)||l(t,Lo(e),n),o.includes(t)&&(e=c(q(r,t)),"relative-date"===q(r,t+".type")?l(t,_o(e),n):l(t,e,n))}),r.hasOwnProperty("disabled")&&(n.disabled=r.disabled),r.term&&(n.term=r.term),n}function Si(e){var r={q:"",filter:""},n=["created","modified","lastlogin"],o=m(["term","filterType"],n);return Object.entries(e).forEach(function(e){var t=e[0],e=e[1];o.includes(t)||(r=T(r,jo(t,e),"AND")),n.includes(t)&&(r=T(r,Bo(t,e),"AND"))}),e.hasOwnProperty("disabled")&&(r.disabled=e.disabled),e.term&&(r.q=("("+e.term+") "+r.q).trim()),r}function xi(o){function i(e){return e.thumbnailUrl=br(e,r,t),e}var e,t,r=(null==(e=o.authentication)?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);return Qe(o).then(function(e){var t=-1<e.nextStart,r=e.results.map(An),n=(r=(r=o.site?r.map(function(e){return Cn(e,o.site)}):r).map(i),zo(e));return{total:e.total,results:r,facets:n,hasNext:t,next:Go(o,e.nextStart,e.total,xi)}})}function Ei(o){function i(e){return e.siteTeamUrl=o.site.item.url+"/teams/"+e.id+"/about",e}function a(e){return e.thumbnailUrl=Ho(r,e,t),e}var e,t,r=(null==(e=o.authentication)?void 0:e.portal)||o.portal;o.authentication&&(t=o.authentication.token);return Ze(o,"group").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!=(t=null==(t=o.site)?void 0:t.item)&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Go(o,e.nextStart,e.total,Ei)}})}function ki(o){function i(e){return e.profileUrl=o.site.item.url+"/people/"+e.username+"/profile",e}function a(e){return e.thumbnail&&(e.thumbnailUrl=Vo(t,e,r)),e}var t=o.authentication.portal,r=o.authentication.token;return Ze(o,"user").then(function(e){var t,r=-1<e.nextStart,n=e.results.map(a);return null!=(t=null==(t=o.site)?void 0:t.item)&&t.url&&(n=e.results.map(i)),{hasNext:r,total:e.total,results:n,next:Go(o,e.nextStart,e.total,ki)}})}function Ci(e){if(1.4<=q(e,"item.properties.schemaVersion"))return e;var e=c(e),t=q(e,"data.values.gacode");return e.data.values.telemetry={consentNotice:{isTheme:!0,consentText:"",policyURL:""},customAnalytics:{ga:{customerTracker:{enabled:Boolean(t),id:t}}}},$n(e,"data.values.gacode"),l("item.properties.schemaVersion",1.4,e),e}function Ti(t){return f(this,void 0,void 0,function(){return h(this,function(e){return 200<=t.status&&t.status<300?[2,t.json()]:[2,t.json().then(function(e){throw e.error?new Error(e.error.title+" :: "+e.error.detail+" :: "+t.status):new Error("Got "+t.status+" "+t.statusText)})]})})}function P(e){var t={},e=q(e,"authentication.token");return e&&(t.Authorization=e),t}function U(e){return(e||"https://hub.arcgis.com")+"/api/v3/domains"}function qi(e,t){var r=e,n="hubsubdomain|"+(r=-1<e.indexOf("#/")?e.split("#/")[1]:r);return Qe(Object.assign({q:"typekeywords: "+n},t)).then(function(e){return e.results.filter(function(e){return d(e.typeKeywords,n)})[0]}).then(function(e){if(e)return{hostname:e.url,siteId:e.id};throw new Error("site not found")})}function Ii(e,t){if(t.isPortal)throw new Error("addDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",""+U(t.hubApiUrl)),n=e.siteTitle;return"number"==typeof n&&(e.siteTitle=n.toString()),fetch(t,{method:"POST",headers:r,mode:"cors",body:JSON.stringify(e)}).then(Ti)}function Oi(e,t){if(t.isPortal)throw new Error("domainExists is not available in ArcGIS Enterprise.");e=wt(e);e=U(t.hubApiUrl)+"/"+e,t=P(t);return fetch(e,{method:"GET",headers:t,mode:"cors"}).then(function(e){return 404!==e.status})}function Pi(e,t){return qi(e,t).then(function(e){return!0}).catch(function(e){return!1})}function Ui(t,r,n,o){var i=t;return Oi((i=(o=void 0===o?0:o)?t+"-"+o:t)+"-"+r,n).then(function(e){return e?Ui(t,r,n,o+1):i})}function Ni(t,r,n){var o=(n=void 0===n?0:n)?t+"-"+n:t;return Pi(o,r).then(function(e){return e?Ni(t,r,n+1):o})}function Ri(e,t){return t.isPortal?qi(e,t):(e=U(t.hubApiUrl)+"/"+e,t=P(t),fetch(e,{method:"GET",headers:t,mode:"cors"}).then(Ti))}function Fi(e,t){if(t.isPortal)throw new Error("removeDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",U(t.hubApiUrl)+"/"+e);return fetch(t,{method:"DELETE",headers:r,mode:"cors"}).then(Ti)}function Li(e,t){if(t.isPortal)throw new Error("removeDomainsBySiteId is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",U(t.hubApiUrl)+"/?siteId="+e);return fetch(t,{method:"DELETE",headers:r,mode:"cors"}).then(Ti)}function _i(e,t){var e=c(e),r=63;return t&&(r-=t.length+1),e=e.length>r?e.slice(0,r-6)+"-"+de(5):e}function ji(e,t){return(t.isPortal?Ni(e,t):Ui(e,t.portalSelf.urlKey+"."+wt(Pt(t)),t)).then(function(e){return _i(e,t.portalSelf.urlKey)})}function Bi(r,n){return n.isPortal?Promise.resolve([]):Promise.all(["defaultHostname","customHostname"].reduce(function(e,t){var t=q(r,"data.values."+t);return t&&(t={hostname:t,clientKey:r.data.values.clientId,orgId:n.portalSelf.id,orgTitle:n.portalSelf.name,orgKey:n.portalSelf.urlKey,siteId:r.item.id,siteTitle:r.item.title,sslOnly:!0},e.push(Ii(t,n))),e},[]))}function Mi(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:if(n.isPortal)throw new Error("removeDomainByHostname is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");e.label=1;case 1:return e.trys.push([1,5,,6]),[4,Ri(r,n)];case 2:return(t=e.sent(),t=q(t,"id"))?[4,Fi(t,n)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:throw t=e.sent(),new Error("Error removing domain entry for "+r+": "+t);case 6:return[2]}})})}function Gi(e,t){return fe(e)?Hi(e,t):Ri(wt(e).split("/")[0],t).then(function(e){return Hi(e.siteId,t)})}function Hi(e,t){return eo(e,t).then(ca)}function Vi(e,t,r){var n=this;return t=t||"UNKNOWN_ERROR",r=a(r,"rootCause",r),(n=hi.call(this,e,t,r)||this).name="HubError",n.stack=a(r,"stack",(new Error).stack),n}ae(Vi,hi=pe);var N=Vi;var Ki="Hub Site Application",zi="Site Application",Yi={name:"No title provided",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],capabilities:["api_explorer","pages","my_data","social_logins","json_chart_card","document_iframes","items_view","app_page","underlinedLinks","globalNav","socialSharing"],catalog:{groups:[]},subdomain:"",defaultHostname:"",customHostname:"",clientId:"",map:null,feeds:{},pages:[],theme:null,contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}}},Wi={item:{title:"No Title Provided",description:"No Description Provided",snippet:"",tags:[],typeKeywords:["Hub Site","hubSite","DELETEMESITE"],properties:{slug:"",orgUrlKey:"",defaultHostname:"",customHostname:"",clientId:"",subdomain:"",schemaVersion:1.5},url:""},data:{catalog:{groups:[]},feeds:{},values:{title:"",defaultHostname:"",customHostname:"",subdomain:"",faviconUrl:"",uiVersion:"2.4",clientId:"",map:{basemaps:{}},defaultExtent:{},pages:[],theme:{},layout:{sections:[],header:{component:{name:"site-header",settings:{fullWidth:!1,iframeHeight:"150px",iframeUrl:"",links:[],logoUrl:"",title:"default site",markdown:"",headerType:"default",schemaVersion:3,showLogo:!0,showTitle:!0,logo:{display:{},state:"valid"},shortTitle:"",menuLinks:[],socialLinks:{facebook:{},twitter:{},instagram:{},youtube:{}}}},showEditor:!1},footer:{component:{name:"site-footer",settings:{footerType:"none",markdown:"",schemaVersion:2.1}},showEditor:!1}},contentViews:{sidePanelOpen:{app:!0,map:!0,dataset:!0,document:!0,feedback:!0}}}}};function Ji(){var t=[];["created","culture","description","extent","id","modified","owner","snippet","tags","typeKeywords","url","type"].forEach(function(e){t.push({objectKey:e,modelKey:"item."+e})}),["catalog","feeds"].forEach(function(e){t.push({objectKey:e,modelKey:"data."+e})});return["pages","theme","capabilities","subdomain","defaultHostname","customHostname","clientId","defaultExtent","map","telemetry","headerSass"].forEach(function(e){t.push({objectKey:e,modelKey:"data.values."+e})}),t.push({objectKey:"slug",modelKey:"item.properties.slug"}),t.push({objectKey:"orgUrlKey",modelKey:"item.properties.orgUrlKey"}),t.push({objectKey:"name",modelKey:"item.title"}),t}function Zi(s,u){return f(this,void 0,void 0,function(){var t,r,n,o,i,a;return h(this,function(e){switch(e.label){case 0:return t=I(I({},Yi),s),r=u.portalSelf,t.type=u.isPortal?zi:Ki,t.slug||(t.slug=xo(t.name,t.orgUrlKey)),t.typeKeywords=Eo(t.typeKeywords,t.slug),t.subdomain||(t.subdomain=he(t.name)),[4,ji((n=t).subdomain,u)];case 1:return n.subdomain=e.sent(),u.isPortal?(t.typeKeywords.push(("hubsubdomain|"+t.subdomain).toLowerCase()),t.url=u.authentication.portal.replace("/sharing/rest","/apps/sites")+"/#/"+t.subdomain):(t.defaultHostname=t.subdomain+"-"+r.urlKey+"."+wt(Pt(u)),t.url="https://"+(t.customHostname||t.defaultHostname)),t.orgUrlKey=r.urlKey,t.theme||(t.theme=aa(r)),t.defaultExtent||(t.defaultExtent=r.defaultExtent),t.culture||(t.culture=r.culture),q(t,"map.basemaps.primary")||l("map.basemaps.primary",r.defaultBasemap,t),q(t,"layout.header.component.settings.title")||l("layout.header.component.settings.title",t.name,t),o=new ri(Ji()),[4,to(i=o.objectToModel(t,c(Wi)),u)];case 2:return[4,na(i=e.sent(),u)];case 3:return a=e.sent(),i.data.values.clientId=a.client_id,[4,Bi(i,u)];case 4:return e.sent(),[4,ro(i,u)];case 5:return a=e.sent(),[2,o.modelToObject(a,{})]}})})}function Qi(i,a){return f(this,void 0,void 0,function(){var t,r,n,o;return h(this,function(e){switch(e.label){case 0:return t=new ri(Ji()),r=t.objectToModel(i,c(Wi)),[4,eo(i.id,a)];case 1:return n=e.sent(),[4,function(o,i,a){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){return t={clientKey:o.data.values.clientId,orgId:a.portalSelf.id,orgTitle:a.portalSelf.name,orgKey:a.portalSelf.urlKey,siteId:o.item.id,siteTitle:o.item.title,sslOnly:!0},r={remove:[],add:[]},["customHostname","defaultHostname"].forEach(function(e){var t=q(i,"data.values."+e),e=q(o,"data.values."+e);e!==t&&(r.remove.push(t),r.add.push(e))}),n=[],r.add.map(function(e){e=I({hostname:e},t);n.push(Ii(e,a))}),r.remove.map(function(e){n.push(Mi(e,a))}),[2,Promise.all(n)]})})}(r,n,a)];case 2:return e.sent(),r.item.properties.slug!==n.item.properties.slug&&(r.item.typeKeywords=Eo(r.item.typeKeywords,r.item.properties.slug)),[4,ro(t.objectToModel(i,n),a)];case 3:return o=e.sent(),[2,t.modelToObject(o,i)]}})})}function $i(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){switch(e.label){case 0:return r.isPortal?[3,2]:[4,Li(t,r)];case 1:e.sent(),e.label=2;case 2:return[4,We(I(I({},r),{id:t}))];case 3:return e.sent(),[2]}})})}function Xi(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,Gi(o,i)];case 1:return t=e.sent(),r=new ri(Ji()),r=r.modelToObject(t,{}),i.authentication&&(n=i.authentication,n=n.token),r.thumbnailUrl=br(t.item,i,n),[2,r]}})})}function ea(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){switch(e.label){case 0:return[4,no(o,i)];case 1:return t=e.sent(),n=new ri(Ji()),i.authentication&&(r=i.authentication,r=r.token),(n=n.modelToObject(t,{})).thumbnailUrl=br(t.item,i,r),[2,n]}})})}function ta(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return[2,ti(Yo([{filterType:"content",type:"$site"},t]),ea,r)]})})}R.init=function(e){return new R(e)},Object.defineProperty(R.prototype,"context",{get:function(){return this._contextManager?this._contextManager.context:this._context},enumerable:!1,configurable:!0}),R.prototype.create=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return t.orgUrlKey||(t.orgUrlKey=this.context.portal.urlKey),[2,Zi(t,r||this.context.hubRequestOptions)];throw new N("Create Site","Creating Hub Sites requires authentication.")})})},R.prototype.update=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,Qi(t,r||this.context.hubRequestOptions)];throw new N("Update Site","Updating a Hub Site requires authentication.")})})},R.prototype.destroy=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){if(r||this.context.isAuthenticated)return[2,$i(t,r||this.context.hubRequestOptions)];throw new N("Destroy Site","Destroying Hub Sites requires authentication.")})})},R.prototype.fetch=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){try{if(r||this.context.hubRequestOptions)return[2,Xi(t,r||this.context.hubRequestOptions)];throw new N("Fetch Site","Can not retrieve context.hubRequestOptions from Context Manager. HubSiteManager is configured incorrectly.")}catch(e){throw new N("Fetch Site","Can not retrieve context.hubRequestOptions from Context Manager. HubSiteManager is configured incorrectly.",e)}return[2]})})},R.prototype.search=function(t,r){return f(this,void 0,void 0,function(){return h(this,function(e){return!r.authentication&&this.context.session&&(r.authentication=this.context.session),[2,ta(t,r)]})})},R.prototype.updateThumbnail=function(r,n,o,i){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=i||this.context.userRequestOptions,[4,Io(r.id,n,o,t)];case 1:return e.sent(),[2,this.fetch(r.id,i)]}})})},R.prototype.fromItem=function(r,n){return f(this,void 0,void 0,function(){var t;return h(this,function(e){return t=n||this.context.userRequestOptions,[2,ea(r,t)]})})};var ra=R;function R(e){e instanceof Lt?this._contextManager=e:this._context=e}function na(e,t){if(t.isPortal)return Promise.resolve({});var r=[e.data.values.defaultHostname],r=(q(e,"data.values.customHostname")&&r.push(e.data.values.customHostname),r.reduce(function(e,t){return e.concat(At(t))},[]));return Oo(e.item.id,r,t)}var oa=1.5,ia={header:{background:"#fff",text:"#4c4c4c"},body:{background:"#fff",text:"#4c4c4c",link:"#0079c1"},button:{background:"#0079c1",text:"#fff"},logo:{small:""},fonts:{base:{url:"",family:"Avenir Next"},heading:{url:"",family:"Avenir Next"}}};function aa(e){var t=c(ia),e=q(e,"portalProperties.sharedTheme");return t=e?W(t,X(e)):t}function sa(e){if(1.5<=q(e,"item.properties.schemaVersion"))return e;var r,e=c(e),t=e.data.values.dcatConfig;return e.data.feeds={},t&&(e.data.feeds.dcatUS11=(r=JSON.stringify(t),Object.keys(ua).forEach(function(e){var t=ua[e];r=r.split(e).join(t)}),JSON.parse(r))),e.item.properties.schemaVersion=1.5,e}var ua={"{{default.name}}":"{{name}}","{{default.description}}":"{{description}}","{{item.tags}}":"{{tags}}","{{item.created:toISO}}":"{{created:toISO}}","{{item.modified:toISO}}":"{{modified:toISO}}","{{default.source.source}}":"{{source}}","{{item.owner}}":"{{owner}}","{{org.portalProperties.links.contactUs.url}}":"{{orgContactEmail}}","{{org.name}}":"{{orgName}}","{{item.categories}}":"{{categories}}","{{item.licenseInfo}}":"{{licenseInfo}}","{{item.modified}}":"{{modified}}","{{enrichments.categories}}":"{{categories}}","{{default.id}}":"{{id}}","{{item.licenseInfo || No License}}":"{{licenseInfo || No License}}","{{org.portalProperties.links.contactUs.url || mailto:data@tempe.gov}}":"{{orgContactEmail || mailto:data@tempe.gov}}","{{default.description || No Description}}":"{{description || No Description}}","{{item.id}}":"{{id}}"};function ca(e){return q(e,"item.properties.schemaVersion")===oa?e:sa(e=Ci(e=function(e){if(1.3<=q(e,"item.properties.schemaVersion"))return e;var t=q(e=c(e),"data.catalog.groups")||[];return e.data.catalog.groups=t.filter(fe),e.item.properties.schemaVersion=1.3,e}(e=function(e){if(1.2<=q(e,"item.properties.schemaVersion"))return e;var t=q(e=c(e),"data.catalog")||{};return q(e,"data.values.groups")&&(t.groups=c(e.data.values.groups),delete e.data.values.groups),e.data.catalog=t,e.item.properties.schemaVersion=1.2,e}(e=function(e){if(1.1<=q(e,"item.properties.schemaVersion"))return e;var t=c(e);return["subdomain","defaultHostname","internalUrl","customHostname","externalUrl"].forEach(function(e){t.data.values[e]&&"string"==typeof t.data.values[e]&&(t.data.values[e]=t.data.values[e].toLowerCase())}),t.item.properties.schemaVersion=1.1,t}(e=function(e){if(1<=q(e,"item.properties.schemaVersion"))return e;var t=c(e);return["groupId","title"].forEach(function(e){delete t.data.values[e]}),t.item.properties||(t.item.properties={}),t.item.properties.schemaVersion=1,t.data.values.groups&&Array.isArray(t.data.values.groups)&&(e=t.data.values.groups.map(function(e){return"object"==typeof e?e.id:e}).filter(function(e){return!!e}),t.data.values.groups=e),t}(e))))))}function la(e,t){return Ve(I({id:e,relationshipType:"Survey2Service",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function pa(e,t){return Ve(I({id:e,relationshipType:"Service2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function da(e,t){return Ve(I({id:e,relationshipType:"Survey2Data",direction:"forward"},t)).then(function(e){var t,e=e.relatedItems[0];return t=e?{item:e}:t})}function fa(t){function e(e){return-1<t.typeKeywords.indexOf(e)}var r=e("FieldworkerView");return r=r||["Survey123","Feature Service","View Service"].every(e)&&!e("StakeholderView")}ha.create=function(r){return f(this,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return r.contextManager?[2,new ha(r.contextManager)]:[3,1];case 1:return t=r.managerOptions||{},[4,Lt.create(t)];case 2:return[2,new ha(e.sent())]}})})},Object.defineProperty(ha.prototype,"context",{get:function(){return this._contextManager.context},enumerable:!1,configurable:!0}),Object.defineProperty(ha.prototype,"projects",{get:function(){return this._projectManager||(this._projectManager=mi.init(this._contextManager)),this._projectManager},enumerable:!1,configurable:!0}),Object.defineProperty(ha.prototype,"sites",{get:function(){return this._siteManager||(this._siteManager=ra.init(this._contextManager)),this._siteManager},enumerable:!1,configurable:!0});Bt=ha;function ha(e){this._contextManager=e}n.ArcGISContext=Ft,n.ArcGISContextManager=Lt,n.DEFAULT_THEME=ia,n.ENTERPRISE_SITE_ITEM_TYPE=zi,n.GLOBAL_EXTENT=Xt,n.HUB_CDN_URLMAP=yt,n.HUB_LOCALES=Qn,n.HUB_PROJECT_ITEM_TYPE=jt,n.HUB_SITE_ITEM_TYPE=Ki,n.Hub=Bt,n.HubError=N,n.HubProjectManager=mi,n.HubSiteManager=ra,n.Logger=i,n.OperationError=pe,n.OperationStack=Br,n.PORTAL_EXPORT_TYPES=Pn,n.REQUIRED_PRIVS=Ne,n.RemoteServerError=cn,n.SEARCH_APIS=Po,n.SITE_SCHEMA_VERSION=oa,n.STANDARD_LICENSES=mr,n.WGS84_WKID=On,n._addTokenToResourceUrl=gi,n._canEmailUser=jn,n._checkStatusAndParseJson=Ti,n._consolidateResults=Ln,n._deepMapValues=L,n._ensureSafeDomainLength=_i,n._ensureTelemetry=Ci,n._fetchSite=Xi,n._formatAutoAddResponse=_n,n._getAuthHeader=P,n._getAutoAddUsers=Wn,n._getDomainServiceUrl=U,n._getEmailUsers=Zn,n._getHttpAndHttpsUris=At,n._getInviteUsers=Jn,n._getLocation=function(){if(window)return window.location},n._isDate=j,n._isFunction=B,n._isObject=M,n._isOrgAdmin=Bn,n._isRegExp=G,n._isString=_,n._lookupPortal=qi,n._mapValues=F,n._processAutoAdd=Vn,n._processInvite=zn,n._processPrimaryEmail=Yn,n._processSecondaryEmail=Gn,n._searchContent=function(o,i){var a;return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){return t=Wo(o),r=Uo(i.api||"arcgis"),[2,"arcgis"===r.type?(n=Xo(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),null!=(a=i.aggregations)&&a.length&&(n.countFields=i.aggregations.join(","),n.countSize=200),xi(n)):Promise.resolve({total:0,results:[],facets:[],hasNext:!1,next:function(){Promise.resolve(null)}})]})})},n._searchGroups=function(o,i){return f(this,void 0,void 0,function(){var t,r,n;return h(this,function(e){if(t=wi(o),"arcgis"===(r=Uo(i.api||"arcgis")).type)return n=Ai(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){i.hasOwnProperty(e)&&(n[e]=i[e])}),n.authentication||(n.portal=r.url+"/sharing/rest"),[2,Ei(n)];throw new Error("_searchGroups is not implemented for non-arcgis apis")})})},n._searchUsers=function(n,o){return f(this,void 0,void 0,function(){var t,r;return h(this,function(e){if(!o.authentication)throw new Error("Authentication required to search for users.");if(t=Di(n),"arcgis"===Uo(o.api||"arcgis").type)return r=Si(t),["authentication","num","sortField","sortOrder","site"].forEach(function(e){o.hasOwnProperty(e)&&(r[e]=o[e])}),[2,ki(r)];throw new Error("_searchUsers is not implemented for non-arcgis apis")})})},n._unprotectAndRemoveGroup=function(e){var t=o(it,{success:!0}),r=o(at,{success:!0});return t(e).then(function(){return r(e)})},n._unprotectAndRemoveItem=function(e){var t=o(ze,{success:!0}),r=o(We,{success:!0});return t(e).then(function(){return r(e)})},n.addContextToSlug=_r,n.addDays=function(e,t){try{var r=new Date(e);return new Date(r.setDate(r.getDate()+t)).toISOString().split("T")[0]}catch(e){throw new Error("Invalid Date")}},n.addDomain=Ii,n.addSiteDomains=Bi,n.addSolutionResourceUrlToAssets=function(e,t){var r,n,o=e.assets||e.resources||[];return e.bundleItemId&&(r=v(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=o.map(function(e){return{name:e.name,type:e.type||"resource",url:r+"/resources/"+n+"-"+e.name}})),o},n.addUsersToGroup=function(e,t,r,n,o){var i=c(a(r,"portalSelf.user",{}));return i.cOrgId=q(r,"portalSelf.portalProperties.hub.settings.communityOrg.orgId"),Vn({groupId:e,allUsers:t,primaryRO:r,email:n,secondaryRO:o,requestingUser:i,usersToAutoAdd:Wn(t,i),usersToInvite:Jn(t,i),usersToEmail:Zn(t,i,q(n,"copyMe"))}).then(zn).then(Yn).then(Gn).then(Ln)},n.applyPropertiesToItems=function(e,t){return e.map(function(e){return e.properties||(e.properties={}),Object.assign(e.properties,t),e})},n.arrayToObject=function(e,r){return e.reduce(function(e,t){return e[q(t,r)]=t,e},{})},n.atob=In.atob,n.autoAddUsers=Hn,n.bBoxToPolygon=nr,n.batch=oe,n.btoa=In.btoa,n.buildDraft=function(e,t){return te(e,{},t)},n.buildExistingExportsPortalQuery=function(e,t){var r,n,o,i,a=(t=function(e){if(e)return{onlyTypes:e.onlyTypes,layerId:e.layerId,spatialRefId:e.spatialRefId};return{}}(t)).onlyTypes,s=t.layerId,t=t.spatialRefId,u=Object.keys(Pn).map(function(e){return Pn[e]}),c=new Set(Q(u.filter(function(e){return!e.supportsProjection}).map(function(e){return e.itemTypes}))),a=a||Q(u.map(function(e){return e.itemTypes})),u=(new Je).startGroup().match(Rn(e)).in("typekeywords").and().match(Fn(s)).in("typekeywords").endGroup().and().startGroup();function l(e,t){var r;t.startGroup().match(/\s/g.test(e)?e:'"'+e+'"').in("type").and().match(Nn((t=e,e=On,e=(r=i)&&!o.has(t)?r:e))).in("typekeywords").endGroup()}return r=u,n=(e={types:a,spatialRefId:t,noProjectionItemTypes:c}).types,o=e.noProjectionItemTypes,i=e.spatialRefId,n.forEach(function(e,t){l(e,r),t<n.length-1&&r.or()}),u.endGroup(),u.toParam()},n.buildUrl=Re,n.camelize=z,n.canEditEvent=function(e,t){var r=!1;return Pe(t)&&(e=q(e,"initiative.item.properties.collaborationGroupId"),t=t.groups,r=!!e&&!!H(void 0===t?[]:t,"id",e)),r},n.canEditItem=Ue,n.canEditSite=function(e,t){var r=!1;return r=!q(e,"properties.isDefaultHubHome")&&Pe(t)?Ue(e,t):r},n.canEditSiteContent=function(e,t){var r,n=!1,o=q(e,"properties.isDefaultHubHome"),i=Pe(t);return!o&&i?n=Ue(e,t):i&&(o=t.orgId,i=e.orgId,o&&o===i&&(r=t.privileges||[],n=Ne.every(function(e){return d(r,e)}))),n},n.capitalize=J,n.categories=Wt,n.chunkArray=function(e,t){for(var r=[],n=0;n<e.length;)r.push(e.slice(n,n+t)),n+=t;return r},n.clearSession=function(e,t){(t=void 0===t?window:t).localStorage&&t.localStorage.removeItem("__CONTEXT_"+e)},n.cloneObject=c,n.completeOAuth2=function(t,e){var r=(e=(e=void 0===e?window:e).location.href.match(/access_token=(.+)&expires_in=.+&username=([^&]+)/))[1],n="https://www.arcgis.com/sharing/rest/community/users/"+decodeURIComponent(e[2]);return u(n,{params:{token:r},httpMethod:"GET"}).then(function(e){return Date.now()-e.created<5e3?u(n+"/update",{params:{token:r,tags:["hubRole:participant","org:"+e.orgId],access:"public"}}).then(function(){return Oe.completeOAuth2(t)}):Oe.completeOAuth2(t)})},n.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce(function(r,n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(n.apply(void 0,e))}})},n.composeContent=Rr,n.constructSlug=xo,n.convertContentDefinitionToFilter=$o,n.convertContentFilterToSearchOptions=ei,n.convertItemToProject=fi,n.convertItemToSite=ea,n.convertPortalResponseToFacets=zo,n.convertSolutionTemplateResourcesToAssets=function(e,t){var r,n,o=[];return e.resources&&e.bundleItemId&&(r=v(t.portalSelf)+"/content/items/"+e.bundleItemId,n=e.itemId,o=e.resources.map(function(e){return{name:e,type:"resource",url:r+"/resources/"+n+"-"+e}})),o},n.convertToWellKnownLocale=function(e){var t="en";return e=(e=void 0===e?"en":e).toLowerCase(),-1<Qn.indexOf(e)?t=e:1<(e=e.split("-")).length&&-1<Qn.indexOf(e[0])&&(t=e[0]),t},n.convertUrlsToAnchorTags=function(t){var e=t.match(/((((ftp|https?):\/\/)|(w{3}\.))[-\w@:%_+.~#?,&//=]+)/g);return e&&e.forEach(function(e){t=t.replace(e,'<a target="_blank" href="'+e+'">'+e+"</a>")}),t.replace("(","<br/>(")},n.createExtent=function(e,t,r,n,o){return{xmin:e,ymin:t,xmax:r,ymax:n,spatialReference:{wkid:o=void 0===o?4326:o}}},n.createId=V,n.createModel=to,n.createOperationPipeline=le,n.createProject=ui,n.createSite=Zi,n.dasherize=function(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").toLowerCase().replace(/[ _]/g,"-")},n.datasetToContent=function(e){var t=Dn(e),r=(e=e.attributes).errors,n=e.boundary,o=e.metadata,i=e.slug,a=e.groupIds,s=e.orgId,u=e.orgName,c=e.organization,l=e.orgExtent,p=e.server,d=e.layers,f=e.layer,h=e.recordCount,m=e.statistics,g=e.extent,e=e.searchDescription,f=f&&f.id;return Rr(t,{layerId:f,slug:i,errors:r,metadata:o||null,groupIds:a,org:s&&{id:s,name:u||c,extent:l},server:p,layers:d,recordCount:h,boundary:n,extent:g,searchDescription:e,statistics:m})},n.datasetToItem=Dn,n.deepFind=re,n.deepFindById=function(e,t){return re(e,function(e){return e.id===t})},n.deepSet=$,n.deepStringReplace=ee,n.deleteProp=$n,n.destroyProject=pi,n.destroySite=$i,n.doesItemExistWithTitle=So,n.domainExists=Oi,n.domainExistsPortal=Pi,n.emailOrgUsers=Mn,n.ensureProp=function(e,t){return $(e,t)},n.ensureUniqueDomainName=ji,n.ensureUniqueString=function(e,t){for(var r=!1,n=0,o=t;!r;)d(e,o)?o=t+"-"+ ++n:r=!0;return o},n.expandApi=Uo,n.expandApis=function(e){return e.map(Uo)},n.expandContentFilter=Wo,n.expandGroupFilter=wi,n.expandTypeField=Jo,n.expandUserFilter=Di,n.extend=W,n.extentToBBox=$t,n.failSafe=o,n.failSafeUpdate=function(e,t){return o(_e,{id:e.item.id,success:!0})(Object.assign({item:Xn(e)},t))},n.fetchAllPages=function(n,o,r,i){void 0===r&&(r=-1);var a=o.num||100,e=o.start||1;return(-1===r?n(I(I({},o),{num:a,start:e})):Promise.resolve({nextStart:e,total:r,results:[],num:a})).then(function(t){if(-1===t.nextStart)return[t];for(var e=[],r=t.nextStart;r<=t.total;r+=a)e.push(r);return oe(e,function(e){return n(I(I({},o),{start:e,num:a}))},i).then(function(e){return m([t],e)})}).then(function(e){var e=e.reduce(function(e,t){return m(e,t.results)},[]),t=-1===r?e.length:r;return e.slice(0,t)})},n.fetchAndUploadResource=yi,n.fetchAndUploadThumbnail=vi,n.fetchContent=function(s,d){return f(void 0,void 0,void 0,function(){var t,r,n,o,i,a;return h(this,function(e){switch(e.label){case 0:return Lr(s)?[4,(l=_r(s,null==d?void 0:d.siteOrgKey),p=d,f(void 0,void 0,void 0,function(){var t,r,n,o,i,a,s;return h(this,function(e){switch(e.label){case 0:return[4,gn(l,p)];case 1:return t=e.sent(),r=t.itemId,n=t.layerId,[4,yn(r,p)];case 2:return(i=e.sent(),o=i.item,i=ue(i,["item"]),a=p&&p.layerId,Z(a)||a===n)?[3,4]:(n=a,s=[I({},t)],[4,bn(r+"_"+n,p)]);case 3:t=I.apply(void 0,s.concat([e.sent()])),e.label=4;case 4:return[2,Rr(o,I(I(I({requestOptions:p},i),t),{layerId:n,slug:l,errors:un([i.errors,t.errors])}))]}})}))]:[3,2];case 1:return r=e.sent(),[3,4];case 2:return[4,(u=s,c=d,f(void 0,void 0,void 0,function(){var t,r,n,o,i,a,s;return h(this,function(e){switch(e.label){case 0:return t=Fr(u).itemId,[4,yn(t,c)];case 1:return(t=e.sent(),r=t.item,n=ue(t,["item"]),o=c&&c.layerId,ar(r,c))?[4,bn(u,c)]:[3,3];case 2:return a=e.sent(),[3,4];case 3:a={},e.label=4;case 4:return s=(i=a).layerId,[2,Rr(r,I(I(I({requestOptions:c},n),i),{layerId:Z(o)?s:o,errors:un([n.errors,i.errors])}))]}})}))];case 3:r=e.sent(),e.label=4;case 4:return(n=(t=r).layer,o=t.type,i=t,n&&["Feature Layer","Table"].includes(o))?[4,mn(t,d)]:[3,6];case 5:return a=e.sent(),[3,7];case 6:a=void 0,e.label=7;case 7:return i.recordCount=a,[2,t]}var u,c,l,p})})},n.fetchHubTranslation=function(t,e,r){void 0===r&&(r="cors");var n=(vt(e)+"/locales/"+t+".json").toLocaleLowerCase();return fetch(n,{method:"GET",credentials:"same-origin",mode:r}).then(function(e){return e.json()}).catch(function(e){throw Error("Attempt to fetch locale "+t+" from "+n+" failed: "+JSON.stringify(e))})},n.fetchImageAsBlob=bi,n.fetchModelFromItem=no,n.fetchProject=li,n.fetchSite=function(e,t){return console.warn("@esri/hub-common::fetchSite is deprecated. Please use @esri/hub-common::fetchSiteModel instead"),Gi(e,t)},n.fetchSiteModel=Gi,n.filterBy=function(e,t,r){return e.filter(function(e){return q(e,t)===r})},n.findBy=H,n.findItemsBySlug=Co,n.flattenArray=Q,n.generateRandomString=de,n.getCategory=vn,n.getContentIdentifier=wn,n.getContentSiteUrls=xn,n.getContentTypeIcon=vr,n.getContentTypeLabel=Sn,n.getCulture=function(e){return q(e,"portalSelf.user.culture")||q(e,"portalSelf.culture")||"en-us"},n.getDomainsForSite=function(e,t){return t.isPortal?Promise.resolve([]):(e=U(t.hubApiUrl)+"?siteId="+e,t=P(t),fetch(e,{method:"GET",headers:t,mode:"cors"}).then(Ti).catch(function(e){throw Error("Error in getDomainsForSite "+e)}))},n.getExportItemTypeKeyword=Rn,n.getExportLayerTypeKeyword=Fn,n.getFamily=or,n.getGeographicOrgExtent=er,n.getGroupThumbnailUrl=Ho,n.getHubApiFromPortalUrl=Ct,n.getHubApiUrl=Pt,n.getHubApiUrlFromPortal=function(e){return St(e)+"/api/v3"},n.getHubLocaleAssetUrl=vt,n.getHubProduct=function(e){var t=q(e,"portalProperties.hub.enabled")||!1?"premium":"basic";return t=e.isPortal&&"singletenant"===e.portalMode?"portal":t},n.getHubUrlFromPortal=St,n.getInputFeatureServiceModel=la,n.getItemApiUrl=Et,n.getItemAssets=function(e,t){var r=v(t.portalSelf)+"/content/items/"+e.id,n=br(e,t),o=[];return n&&o.push({name:e.thumbnail,url:n,type:"thumbnail"}),n=e.id,n=Ge(n,e=t)+"/resources",(e=I({},e)).params=I({num:1e3},e.params),u(n,e).then(function(e){e=e.resources.map(function(e){return{name:e.resource,type:"resource",url:r+"/resources/"+e.resource}});return o.concat(e)})},n.getItemBySlug=ko,n.getItemDataUrl=kt,n.getItemHomeUrl=xt,n.getItemHubId=Ir,n.getItemHubType=function(e){return console.warn("DEPRECATED: Use getFamily() instead. getItemHubType() will be removed at v10.0.0"),e=qr(e="string"==typeof e?{type:e}:e),_t(e)},n.getItemLayer=Ur,n.getItemLayerId=Or,n.getItemThumbnailUrl=br,n.getLayerIdFromUrl=Cr,n.getModel=eo,n.getModelBySlug=function(e,r){return ko(e,r).then(function(e){var t=[Promise.resolve(e)];return e?t.push(He(e.id,r)):t.push(Promise.resolve(null)),Promise.all(t)}).then(function(e){return e[0]?{item:e[0],data:e[1]}:null})},n.getModelFromOptions=function(e,t){var r=e+"Model",e=e+"Id";if(t[r])return Promise.resolve(t[r]);if(t[e])return o(eo,{item:{id:t[e]},isMissing:!0})(t[e],t);throw new Error("getModelFromOptions requires either a ."+r+" or ."+e+" property.")},n.getNextFunction=Go,n.getOrgDefaultTheme=aa,n.getOrgExtentAsBBox=function(e){return er(e).then($t)},n.getPortalApiUrl=v,n.getPortalBaseFromOrgUrl=Tt,n.getPortalUrl=bt,n.getPortalUrls=wr,n.getProp=q,n.getProps=function(r,e){return e.reduce(function(e,t){t=q(r,t);return t&&e.push(t),e},[])},n.getProxyUrl=Ar,n.getServiceTypeFromUrl=Ot,n.getSession=function(e,t){var r=null;return r=(t=void 0===t?window:t).localStorage&&(t=t.localStorage.getItem("__CONTEXT_"+e))?Oe.deserialize(t):r},n.getSiteById=Hi,n.getSourceFeatureServiceModelFromFieldworker=pa,n.getSpatialRefTypeKeyword=Nn,n.getStakeholderModel=da,n.getStructuredLicense=gr,n.getSubscriptionType=function(e){return a(e,"subscriptionInfo.type","Enterprise")},n.getSurveyModels=function(e,r){var n,o;return("string"==typeof e?Me(e,r):Promise.resolve(e)).then(function(t){var e=[la(t.id,r),da(t.id,r)];return Promise.all(e).then(function(e){var t=e[0],e=e[1];return o=e,t&&fa(t.item)?pa((n=t).item.id,r):t}).then(function(e){return{form:{item:t},featureService:e,fieldworker:n,stakeholder:o}})})},n.getTypeCategories=function(e){return(e=vn(qr(e=void 0===e?{}:e)))?((e=Array.from(e))[0]=e[0].toUpperCase(),[e.join("")]):["Other"]},n.getTypes=function(e){return Wt[(e=void 0===e?"":e).toLowerCase()]},n.getUniqueDomainName=Ui,n.getUniqueDomainNamePortal=Ni,n.getUniqueItemTitle=function t(r,n,o,i){var a=(i=void 0===i?0:i)?r+" "+i:r;return So(a,n,o).then(function(e){return e?t(r,n,o,++i):a}).catch(function(e){throw Error("Error in getUniqueItemTitle "+e)})},n.getUniqueSlug=To,n.getUserThumbnailUrl=Vo,n.getWithDefault=a,n.hasBasePriv=Pe,n.hubApiRequest=pn,n.hubApiSearch=function(e){var t=(t=e.authentication)&&t.serialize&&{authentication:t.serialize()};return pn("/search",I(I({},{headers:t,httpMethod:"POST"}),e))},n.includes=d,n.incrementString=function(e){var t=e.match(/-\s(\d+$)/);return t?(t=parseInt(t[1],10),e=e.replace("- "+t,"- "+(t+1))):e+=" - 1",e},n.interpolate=Do,n.interpolateItemId=function(e){return Do(e,{item:{id:e.item.id},appid:e.item.id},{toISO:function(e,t){return t}})},n.inviteUsers=Kn,n.isBBox=tr,n.isDomainForLegacySite=function(e){return!fe(e.siteId)},n.isDomainUsedElsewhere=function(e,t,r){return Ri(e,r).then(function(e){return e.siteId!==t}).catch(function(){return!1})},n.isDownloadable=Jt,n.isExtentCoordinateArray=rr,n.isFeatureService=Tr,n.isFieldworkerView=fa,n.isGuid=fe,n.isLayerView=Nr,n.isMapOrFeatureServerUrl=qt,n.isNil=Z,n.isSlug=Lr,n.isUpdateGroup=me,n.isValidDomain=function(t,e){if(e.isPortal)throw new Error("isValidDomain is not available in ArcGIS Enterprise.");var r=U(e.hubApiUrl)+"/validate?hostname="+t,e=P(e);return fetch(r,{method:"GET",headers:e,mode:"cors"}).then(function(e){return e.json()}).catch(function(e){return{success:!1,input:t,error:{code:400,detail:e,message:"lookupFailed"}}})},n.isValidExtent=function(t){return!!t&&[rr,function(t){return["xmin","ymin","xmax","ymax"].every(function(e){return"number"==typeof t[e]})}].some(function(e){return e(t)})},n.itemPropsNotInTemplates=qo,n.itemToContent=An,n.last=function(e){return e[e.length-1]},n.lookupDomain=Ri,n.mapBy=function(t,e){return(e=void 0===e?[]:e).map(function(e){return e[t]})},n.maybeAdd=function(e,t,r){return null!=t&&((r=c(r))[e]=t),r},n.maybePush=K,n.mergeContentFilter=Yo,n.mergeDateRange=No,n.mergeGroupFilters=function(e){var e=e.map(wi),o=["created","modified"],i=m(["filterType","term"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t,r=e[0],e=e[1];n.hasOwnProperty(r)?(t=q(n,r),i.includes(r)?o.includes(r)?l(r,No(t,e),n):"term"===r&&(n[r]=n[r]+" "+e):l(r,Ro(t,e),n)):l(r,c(e),n)}),n},{filterType:"group"})},n.mergeMatchOptions=Ro,n.mergeObjects=te,n.mergeSearchOptions=T,n.mergeUserFilters=function(e){var e=e.map(Di),o=["created","modified","lastlogin"],i=m(["disabled","term","filterType"],o);return e.reduce(function(n,e){return Object.entries(e).forEach(function(e){var t,r=e[0],e=e[1];n.hasOwnProperty(r)?(t=q(n,r),i.includes(r)?o.includes(r)?l(r,No(t,e),n):"term"===r&&(n[r]=n[r]+" "+e):l(r,Ro(t,e),n)):l(r,c(e),n)}),n},{filterType:"user"})},n.normalizeItemType=qr,n.normalizeSolutionTemplateItem=function(e){var t=c(e);return qo.forEach(function(e){delete t[e]}),t.extent="{{organization.defaultExtentBBox}}",t},n.objectToArray=function(r,n){return void 0===n&&(n="id"),Object.keys(r).reduce(function(e,t){return r[t][n]=t,e.push(c(r[t])),e},[])},n.objectToJsonBlob=function(e){if("undefined"!=typeof Blob)return new Blob([JSON.stringify(e)],{type:"application/json"});throw new Error("objectToJsonBlob is not currently supported on Node")},n.parseDatasetId=Fr,n.parseItemCategories=Pr,n.processRevertableTasks=function(e){return Promise.all(e).then(function(e){function t(e){return"fullfilled"===e.status}var r,n=e.filter(t),e=e.filter(function(e){return!t(e)});if(e.length)throw r=n.map(function(e){return e.revert()}),Promise.all(r).catch(function(){}),e[0].error;return n.map(function(e){return e.results})})},n.propifyString=function(e){return e=z(e=(e=e.replace(/^[0-9]*/g,"")).replace(/[^\w\s]/g,""))},n.registerBrowserApp=Oo,n.registerSiteAsApplication=na,n.relativeDateToDateRange=_o,n.removeContextFromSlug=jr,n.removeDomain=Fi,n.removeDomainByHostname=Mi,n.removeDomainsBySiteId=Li,n.removeEmptyProps=X,n.replaceItemId=function(e,t,r){return void 0===r&&(r="{{appid}}"),ee(c(e),new RegExp(t,"g"),r)},n.runRevertableTask=function(e,t){return e().then(function(e){return{status:"fullfilled",results:e,revert:t}}).catch(function(e){return{status:"rejected",error:e}})},n.saveSession=function(e,t,r){(r=void 0===r?window:r).localStorage&&r.localStorage.setItem("__CONTEXT_"+e,t.serialize())},n.searchProjects=di,n.searchSites=ta,n.serializeContentFilterForPortal=Xo,n.serializeDateRange=Bo,n.serializeGroupFilterForPortal=Ai,n.serializeMatchOptions=jo,n.serializeModel=Xn,n.serializeSpatialReference=Un,n.serializeStringOrArray=Mo,n.serializeUserFilterForPortal=Si,n.setContentHubId=function(e,t){var r=e.id,r=e.slug||t||r,e=I(I({},e),{hubId:t,identifier:r});return En(e,{relative:kn(e)})},n.setContentSiteUrls=Cn,n.setContentType=function(e,t){var t=qr(I(I({},e.item),{type:t})),r=or(t),n=vr(t),o=Sn(t,e.isProxied),e=I(I({},e),{type:t,family:r,normalizedType:t,contentTypeIcon:n,contentTypeLabel:o});return En(e,{relative:kn(e)})},n.setItemThumbnail=Io,n.setProp=l,n.setSlugKeyword=Eo,n.shareItemToGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),dt(e)}))},n.slugify=he,n.stringToBlob=function(e,t){if(void 0===t&&(t="application/octet-stream"),"undefined"==typeof Blob)throw new Error("stringToBlob is not currently supported on Node");for(var r=[],n=0;n<e.length;n++)r[n]=e.charCodeAt(n);var o=new Uint8Array(r);return new Blob([o],{type:t})},n.stripProtocol=wt,n.unique=Y,n.uniqueBy=function(e,r){return e.reduce(function(e,t){return K(e.find(function(e){return q(e,r)===q(t,r)})?null:t,e)},[])},n.unprotectModel=function(e,t){return e.item.protected?ze(Object.assign({id:e.item.id},t)):Promise.resolve({success:!0})},n.unshareItemFromGroups=function(t,e,r,n){return Promise.all(e.map(function(e){e=Object.assign({},{id:t,groupId:e},r);return n&&(e.owner=n),mt(e)}))},n.updateDomain=function(e,t){if(t.isPortal)throw new Error("updateDomain is not available in ArcGIS Enterprise. Instead, edit the hubdomain typekeyword on the item");var r=P(t),t=(r["Content-Type"]="application/json",U(t.hubApiUrl)+"/"+e.id),n=e.siteTitle;return"number"==typeof n&&(e.siteTitle=n.toString()),fetch(t,{method:"PUT",headers:r,mode:"cors",body:JSON.stringify(e)}).then(Ti)},n.updateModel=ro,n.updateProject=ci,n.updateSite=Qi,n.upgradeProtocol=function(e){return-1===e.indexOf("http")?"https://"+e:-1!==e.indexOf("http://")?e.replace(/^http:/i,"https:"):e},n.upgradeSiteSchema=ca,n.uploadResourcesFromUrl=function(n,e,o){return Array.isArray(e)?(e=e.reduce(function(e,t){var r;return t.url&&(r={id:n.item.id,owner:n.item.owner,fileName:t.name,url:gi(t.url,o),authentication:o.authentication},"thumbnail"===t.type?e.push(vi(r)):e.push(yi(r))),e},[]),Promise.all(e)):Promise.resolve([])},n.valueToMatchOptions=Lo,n.without=function(e,t){return e.filter(function(e){return e!==t})},n.withoutByProp=function(t,r,e){return e.filter(function(e){return e[t]!==r})},Object.defineProperty(n,"__esModule",{value:!0})});
|
|
2
2
|
//# sourceMappingURL=common.umd.min.js.map
|