gridtracker/package.nw/lib/ol.js

5 wiersze
928 KiB
JavaScript

2023-02-23 00:55:04 +00:00
/* eslint-disable */
2023-02-21 04:20:13 +00:00
/*! For license information please see ol.js.LICENSE.txt */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.ol=n():t.ol=n()}(self,(function(){return function(){var t,n={226:function(t,n){n.read=function(t,n,i,r,e){var o,s,u=8*e-r-1,a=(1<<u)-1,h=a>>1,f=-7,c=i?e-1:0,l=i?-1:1,v=t[n+c];for(c+=l,o=v&(1<<-f)-1,v>>=-f,f+=u;f>0;o=256*o+t[n+c],c+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=r;f>0;s=256*s+t[n+c],c+=l,f-=8);if(0===o)o=1-h;else{if(o===a)return s?NaN:1/0*(v?-1:1);s+=Math.pow(2,r),o-=h}return(v?-1:1)*s*Math.pow(2,o-r)},n.write=function(t,n,i,r,e,o){var s,u,a,h=8*o-e-1,f=(1<<h)-1,c=f>>1,l=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,v=r?0:o-1,d=r?1:-1,p=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,s=f):(s=Math.floor(Math.log(n)/Math.LN2),n*(a=Math.pow(2,-s))<1&&(s--,a*=2),(n+=s+c>=1?l/a:l*Math.pow(2,1-c))*a>=2&&(s++,a/=2),s+c>=f?(u=0,s=f):s+c>=1?(u=(n*a-1)*Math.pow(2,e),s+=c):(u=n*Math.pow(2,c-1)*Math.pow(2,e),s=0));e>=8;t[i+v]=255&u,v+=d,u/=256,e-=8);for(s=s<<e|u,h+=e;h>0;t[i+v]=255&s,v+=d,s/=256,h-=8);t[i+v-d]|=128*p}},875:function(t,n,i){"use strict";const r=i(692),e=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),a=Symbol("maxAge"),h=Symbol("dispose"),f=Symbol("noDisposeOnSet"),c=Symbol("lruList"),l=Symbol("cache"),v=Symbol("updateAgeOnGet"),d=()=>1;const p=(t,n,i)=>{const r=t[l].get(n);if(r){const n=r.value;if(y(t,n)){if(w(t,r),!t[u])return}else i&&(t[v]&&(r.value.now=Date.now()),t[c].unshiftNode(r));return n.value}},y=(t,n)=>{if(!n||!n.maxAge&&!t[a])return!1;const i=Date.now()-n.now;return n.maxAge?i>n.maxAge:t[a]&&i>t[a]},m=t=>{if(t[o]>t[e])for(let n=t[c].tail;t[o]>t[e]&&null!==n;){const i=n.prev;w(t,n),n=i}},w=(t,n)=>{if(n){const i=n.value;t[h]&&t[h](i.key,i.value),t[o]-=i.length,t[l].delete(i.key),t[c].removeNode(n)}};class g{constructor(t,n,i,r,e){this.key=t,this.value=n,this.length=i,this.now=r,this.maxAge=e||0}}const b=(t,n,i,r)=>{let e=i.value;y(t,e)&&(w(t,i),t[u]||(e=void 0)),e&&n.call(r,e.value,e.key,t)};t.exports=class{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[e]=t.max||1/0;const n=t.length||d;if(this[s]="function"!=typeof n?d:n,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[a]=t.maxAge||0,this[h]=t.dispose,this[f]=t.noDisposeOnSet||!1,this[v]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[e]=t||1/0,m(this)}get max(){return this[e]}set allowStale(t){this[u]=!!t}get allowStale(){return this[u]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[a]=t,m(this)}get maxAge(){return this[a]}set lengthCalculator(t){"function"!=typeof t&&(t=d),t!==this[s]&&(this[s]=t,this[o]=0,this[c].forEach((t=>{t.length=this[s](t.value,t.key),this[o]+=t.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[c].length}rforEach(t,n){n=n||this;for(let i=this[c].tail;null!==i;){const r=i.prev;b(this,t,i,n),i=r}}forEach(t,n){n=n||this;for(let i=this[c].head;null!==i;){const r=i.next;b(this,t,i,n),i=r}}keys(){return this[c].toArray().map((t=>t.key))}values(){return this[c].toArray().map((t=>t.value))}reset(){this[h]&&this[c]&&this[c].length&&this[c].forEach((t=>this[h](t.key,t.value))),this[l]=new Map,this[c]=new r,this[o]=0}dump(){return this[c].map((t=>!y(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[c]}set(t,n,i){if((i=i||this[a])&&"number"!=typeof i)throw new TypeError("maxAge must be a number");const r=i?Date.now():0,u=this[s](n,t);if(this[l].has(t)){if(u>this[e])return w(this,this[l].get(t)),!1;const s=this[l].get(t).value;return this[h]&&(this[f]||this[h](t,s.value)),s.now=r,s.maxAge=i,s.value=n,this[o]+=u-s.length,s.length=u,this.get(t),m(this),!0}const v=new g(t,n,u,r,i);return v.length>th
//# sourceMappingURL=ol.js.map