mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-30 13:51:58 +00:00
4 lines
494 KiB
JavaScript
4 lines
494 KiB
JavaScript
|
!function(){"use strict";class t{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}var e="propertychange";class i{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}function n(t,e){return t>e?1:t<e?-1:0}function r(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let r=1;r<n;++r){const n=t[r];if(n===e)return r;if(n<e)return i(e,t[r-1],n)>0?r-1:r}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function s(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function o(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function a(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function l(){return!0}function h(){return!1}function u(){}function c(t){let e,i,n,r=!1;return function(){const s=Array.prototype.slice.call(arguments);return r&&this===n&&a(s,i)||(r=!0,n=this,i=s,e=t.apply(this,arguments)),e}}function d(t){return function(){let e;try{e=t()}catch(t){return Promise.reject(t)}return e instanceof Promise?e:Promise.resolve(e)}()}function p(t){for(const e in t)delete t[e]}function g(t){let e;for(e in t)return!1;return!e}class f extends i{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(e){const i="string"==typeof e,n=i?e:e.type,r=this.listeners_&&this.listeners_[n];if(!r)return;const s=i?new t(e):e;s.target||(s.target=this.eventTarget_||this);const o=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});let l;n in o||(o[n]=0,a[n]=0),++o[n];for(let t=0,e=r.length;t<e;++t)if(l="handleEvent"in r[t]?r[t].handleEvent(s):r[t].call(this,s),!1===l||s.propagationStopped){l=!1;break}if(0==--o[n]){let t=a[n];for(delete a[n];t--;)this.removeEventListener(n,u);delete o[n]}return l}disposeInternal(){this.listeners_&&p(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=u,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}var m="change",y="error",_="contextmenu",x="click",v="dblclick",w="keydown",b="keypress",C="load",S="touchmove",E="wheel";function T(t,e,i,n,r){if(n&&n!==t&&(i=i.bind(n)),r){const n=i;i=function(){t.removeEventListener(e,i),n.apply(this,arguments)}}const s={target:t,type:e,listener:i};return t.addEventListener(e,i),s}function R(t,e,i,n){return T(t,e,i,n,!0)}function I(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),p(t))}class M extends f{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(m)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let r=0;r<i;++r)n[r]=T(this,t[r],e);return n}return T(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let r=0;r<n;++r)i[r]=R(this,t[r],e)}else i=R(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)I(t[e]);else I(t)}(i);else if(Array.isArray(t))for(let i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}function k(){throw new Error("Unimplemented abstract method.
|
||
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
|
read:function(t,e,i,n,r){var s,o,a=8*r-n-1,l=(1<<a)-1,h=l>>1,u=-7,c=i?r-1:0,d=i?-1:1,p=t[e+c];for(c+=d,s=p&(1<<-u)-1,p>>=-u,u+=a;u>0;s=256*s+t[e+c],c+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=n;u>0;o=256*o+t[e+c],c+=d,u-=8);if(0===s)s=1-h;else{if(s===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),s-=h}return(p?-1:1)*o*Math.pow(2,s-n)},write:function(t,e,i,n,r,s){var o,a,l,h=8*s-r-1,u=(1<<h)-1,c=u>>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,g=n?1:-1,f=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+c>=1?d/l:d*Math.pow(2,1-c))*l>=2&&(o++,l/=2),o+c>=u?(a=0,o=u):o+c>=1?(a=(e*l-1)*Math.pow(2,r),o+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;t[i+p]=255&a,p+=g,a/=256,r-=8);for(o=o<<r|a,h+=r;h>0;t[i+p]=255&o,p+=g,o/=256,h-=8);t[i+p-g]|=128*f}},Vh=Zh,Yh=Bh;function Zh(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Zh.Varint=0,Zh.Fixed64=1,Zh.Bytes=2,Zh.Fixed32=5;var Uh=4294967296,$h=1/Uh,Kh="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Hh(t){return t.type===Zh.Bytes?t.readVarint()+t.pos:t.pos+1}function Jh(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Qh(t,e,i){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));i.realloc(n);for(var r=i.pos-1;r>=t;r--)i.buf[r+n]=i.buf[r]}function tu(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function eu(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function iu(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function nu(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function ru(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function su(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function ou(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function au(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function lu(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function hu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function uu(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function cu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Zh.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var n=this.readVarint(),r=n>>3,s=this.pos;this.type=7&n,t(r,e,this),this.pos===s&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=hu(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=cu(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=hu(this.buf,this.pos)+hu(this.buf,this.pos+4)*Uh;return this.pos+=8,t},readSFixed64:function(){var t=hu(this.buf,this.pos)+cu(this.buf,this.pos+4)*Uh;return this.pos+=8,t},readFloat:function(){var t=Yh.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Yh.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,n=this.buf;return e=127&(i=n[this.pos++]),i<128?e:(e|=(127&(i=n[this.pos++]))<<7,i<128?e:(e|=(127&(i=n[this.pos++]))<<14,i<128?e:(e|=(127&(i=n[this.pos++]))<<21,i<128?e:function(t,e,i){var n,r,s=i.buf;if(r=s[i.pos++],n=(112&r)>>4,r<128)return Jh(t,n,e);if(r=s[i.pos++],n|=(127&r)<<3,r<128)return Jh(t,n,e);if(r=s[i.pos++],n|=(127&r)<<10,r<128)return Jh(t,n,e);if(r=s[i.pos++],n|=(127&r)<<17,r<128)return Jh(t,n,e);if(r=s[i.pos++],n|=(127&r)<<24,r<128)return Jh(t,n,e);if(r=s[i.pos++],n|=(1&r)<<31,r<128)return Jh(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Kh?function(t,e,i){return Kh.decode(t.subarray(e,i))}(this.buf,e,t):function(t,e,i){var n="",r=e;for(;r<i;){var
|