You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
2.0 MiB
2 lines
2.0 MiB
2 years ago
|
/*! For license information please see 18.1cdf834c.chunk.js.LICENSE.txt */
|
||
|
(this["webpackJsonpsimpro-web"]=this["webpackJsonpsimpro-web"]||[]).push([[18,4,8],{1181:function(e,t,n){"use strict";var r=n(607),a=n(618),o=n(2),i=n.n(o),s=n(822),l=n(792),c=n(793),u=n(827),f=n(828),h=n(783),d=n(817),p=n(814),m=n(815),g=n(816),v=n(757),b=n(663),y=(n(630),n(695),n(656),n(597),n(431),n(943)),_=n.n(y),w=(n(1660),n(80)),E=(n(1661),n(1662)),C=n.n(E),x=n(972);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){S(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T={onEdited:"draw:edited",onDrawStart:"draw:drawstart",onDrawStop:"draw:drawstop",onDrawVertex:"draw:drawvertex",onEditStart:"draw:editstart",onEditMove:"draw:editmove",onEditResize:"draw:editresize",onEditVertex:"draw:editvertex",onEditStop:"draw:editstop",onDeleted:"draw:deleted",onDeleteStart:"draw:deletestart",onDeleteStop:"draw:deletestop"};function A(e){var t=Object(x.c)(),n=Object(o.useRef)(),r=Object(o.useRef)(e),a=function(n){var r=e.onCreated;(t.layerContainer||t.map).addLayer(n.layer),r&&r(n)};return i.a.useEffect((function(){var r=t.map,o=e.onMounted;for(var i in T)r.on(T[i],(function(t){var n=Object.keys(T).filter((function(e){return T[e]===t.type}));if(1===n.length){var r=n[0];e[r]&&e[r](t)}}));return r.on(_.a.Draw.Event.CREATED,a),n.current=P(e,t),r.addControl(n.current),o&&o(n.current),function(){for(var t in r.off(_.a.Draw.Event.CREATED,a),T)e[t]&&r.off(T[t],e[t])}}),[]),i.a.useEffect((function(){if(C()(e.draw,r.current.draw)&&C()(e.edit,r.current.edit)&&e.position===r.current.position)return!1;var a=t.map;n.current.remove(a),n.current=P(e,t),n.current.addTo(a);var o=e.onMounted;return o&&o(n.current),null}),[e.draw,e.edit,e.position]),null}function P(e,t){var n=t.layerContainer,r=e.draw,a=e.edit,o=e.position,i={edit:k(k({},a),{},{featureGroup:n})};return r&&(i.draw=k({},r)),o&&(i.position=o),new y.Control.Draw(i)}A.propTypes=k(k({},Object.keys(T).reduce((function(e,t){return e[t]=w.PropTypes.func,e}),{})),{},{onCreated:w.PropTypes.func,onMounted:w.PropTypes.func,draw:w.PropTypes.shape({polyline:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),polygon:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),rectangle:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),circle:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),marker:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool])}),edit:w.PropTypes.shape({edit:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),remove:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),poly:w.PropTypes.oneOfType([w.PropTypes.object,w.PropTypes.bool]),allowIntersection:w.PropTypes.bool}),position:w.PropTypes.oneOf(["topright","topleft","bottomright","bottomleft"]),leaflet:w.PropTypes.shape({map:w.PropTypes.instanceOf(y.Map),layerContainer:w.PropTypes.shape({addLayer:w.PropTypes.func.isRequired,removeLayer:w.PropTypes.func.isRequired})})});function L(){L=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(k){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new C(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(a,o){if("executing"===r)throw new Error("Generator is already running")
|