silverstripe-webpack/app/client/dist/js/app_Site.Controllers.MapElementController.js

2 lines
37 KiB
JavaScript
Raw Normal View History

2022-03-15 19:48:57 +01:00
/*! For license information please see app_Site.Controllers.MapElementController.js.LICENSE.txt */
2022-11-01 21:16:18 +01:00
!function(){"use strict";var t={198:function(t){function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}t.exports=function equal(t,r){if(t===r)return!0;if(t&&r&&"object"==_typeof(t)&&"object"==_typeof(r)){if(t.constructor!==r.constructor)return!1;var o,a,i;if(Array.isArray(t)){if((o=t.length)!=r.length)return!1;for(a=o;0!==a--;)if(!equal(t[a],r[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(a=o;0!==a--;)if(!Object.prototype.hasOwnProperty.call(r,i[a]))return!1;for(a=o;0!==a--;){var l=i[a];if(!equal(t[l],r[l]))return!1}return!0}return t!==t&&r!==r}}},r={};function __webpack_require__(o){var a=r[o];if(void 0!==a)return a.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(t,r){for(var o in r)__webpack_require__.o(r,o)&&!__webpack_require__.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},__webpack_require__.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},function(){var t="ajax-load",r="load-ready",o="map-loaded",a="map-api-loaded",i="map-marker-click",l="map-popup-close",u=__webpack_require__(198),c=__webpack_require__.n(u);function sortKD(t,r,o,a,i,l){if(!(i-a<=o)){var u=a+i>>1;sort_select(t,r,u,a,i,l%2),sortKD(t,r,o,a,u-1,l+1),sortKD(t,r,o,u+1,i,l+1)}}function sort_select(t,r,o,a,i,l){for(;i>a;){if(i-a>600){var u=i-a+1,c=o-a+1,p=Math.log(u),d=.5*Math.exp(2*p/3),m=.5*Math.sqrt(p*d*(u-d)/u)*(c-u/2<0?-1:1);sort_select(t,r,o,Math.max(a,Math.floor(o-c*d/u+m)),Math.min(i,Math.floor(o+(u-c)*d/u+m)),l)}var g=r[2*o+l],h=a,y=i;for(swapItem(t,r,a,o),r[2*i+l]>g&&swapItem(t,r,a,i);h<y;){for(swapItem(t,r,h,y),h++,y--;r[2*h+l]<g;)h++;for(;r[2*y+l]>g;)y--}r[2*a+l]===g?swapItem(t,r,a,y):swapItem(t,r,++y,i),y<=o&&(a=y+1),o<=y&&(i=y-1)}}function swapItem(t,r,o,a){swap(t,o,a),swap(r,2*o,2*a),swap(r,2*o+1,2*a+1)}function swap(t,r,o){var a=t[r];t[r]=t[o],t[o]=a}function sqDist(t,r,o,a){var i=t-o,l=r-a;return i*i+l*l}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var p=function defaultGetX(t){return t[0]},d=function defaultGetY(t){return t[1]},m=function(){function KDBush(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:64,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Float64Array;_classCallCheck(this,KDBush),this.nodeSize=a,this.points=t;for(var l=t.length<65536?Uint16Array:Uint32Array,u=this.ids=new l(t.length),c=this.coords=new i(2*t.length),m=0;m<t.length;m++)u[m]=m,c[2*m]=r(t[m]),c[2*m+1]=o(t[m]);sortKD(u,c,a,0,u.length-1,0)}return function _createClass(t,r,o){return r&&_defineProperties(t.prototype,r),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(KDBush,[{key:"range",value:function range(t,r,o,a){return function range_range(t,r,o,a,i,l,u){for(var c,p,d=[0,t.length-1,0],m=[];d.length;){var g=d.pop(),h=d.pop(),y=d.pop();if(h-y<=u)for(var v=y;v<=h;v++)c=r[2*v],p=r[2*v+1],c>=o&&c<=i&&p>=a&&p<=l&&m.push(t[v]);else{var _=Math.floor((y+h)/2);c=r[2*_],p=r[2*_+1],c>=o&&c<=i&&p>=a&&p<=l&&m.push(t[_]);var k=(g+1)%2;(0===g?o<=c:a<=p)&&(d.push(y),d.push(_-1),d.push(k)),(0===g?i>=c:l>=p)&&(d.push(_+1),d.push(h),d.push(k))}}return m}(this.ids,this.co