cortex-react-ui 0.2.0 → 0.2.2
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/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/styles/Camera/index.css +4 -0
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
/*!
|
|
28
28
|
* leaflet.fullscreen
|
|
29
29
|
*/
|
|
30
|
-
function(t,r){e.exports?e.exports=r(p.default,v.default):r(t.L,t.screenfull)}("undefined"!=typeof self?self:this,(function(e,t){return e.Control.FullScreen=e.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:t,onAdd:function(t){var r,n="leaflet-control-zoom-fullscreen",o="";return r=t.zoomControl&&!this.options.forceSeparateButton?t.zoomControl._container:e.DomUtil.create("div","leaflet-bar"),this.options.content?o=this.options.content:n+=" fullscreen-icon",this._createButton(this.options.title,n,o,r,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),r},onRemove:function(){e.DomEvent.off(this.link,"click",e.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&(e.DomEvent.off(this._container,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).off(this._container,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this),e.DomEvent.off(document,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).off(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this))},_createButton:function(t,r,n,o,i,a){return this.link=e.DomUtil.create("a",r,o),this.link.href="#",this.link.title=t,this.link.innerHTML=n,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",t),L.DomEvent.disableClickPropagation(o),e.DomEvent.on(this.link,"click",e.DomEvent.stop).on(this.link,"click",i,a),this._screenfull.isEnabled&&(e.DomEvent.on(o,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).on(o,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,a),e.DomEvent.on(document,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).on(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,a)),this.link},toggleFullScreen:function(){var t=this._map;t._exitFired=!1,t._isFullscreen?(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.exit():(e.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize()),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1):(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.request(this.options.fullscreenElement?this.options.fullscreenElement:t._container):(e.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize()),t.fire("enterFullscreen"),t._isFullscreen=!0)},_toggleState:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel,this._map._isFullscreen?L.DomUtil.removeClass(this.link,"leaflet-fullscreen-on"):L.DomUtil.addClass(this.link,"leaflet-fullscreen-on")},_handleFullscreenChange:function(){var e=this._map;e.invalidateSize(),this._screenfull.isFullscreen||e._exitFired||(e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1)}}),e.Map.include({toggleFullscreen:function(){this.fullscreenControl.toggleFullScreen()}}),e.Map.addInitHook((function(){this.options.fullscreenControl&&this.addControl(e.control.fullscreen(this.options.fullscreenControlOptions))})),e.control.fullscreen=function(t){return new e.Control.FullScreen(t)},{leaflet:e,screenfull:t}}))}(jr);var Sr=jr.exports,Gr=function(t){var r=xr();return e.useEffect((function(){Sr.leaflet.control.fullscreen(w({position:"topleft"},t||{})).addTo(r)}),[]),b.exports.jsx(b.exports.Fragment,{})},Pr=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))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((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r};function Vr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){Or(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Or(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Lr={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 Qr(t){var r=hr(),n=e.useRef(),o=e.useRef(t),i=function(e){var n=t.onCreated;(r.layerContainer||r.map).addLayer(e.layer),n&&n(e)};return l.default.useEffect((function(){var e=r.map,o=t.onMounted;for(var a in Lr)e.on(Lr[a],(function(e){var r=Object.keys(Lr).filter((function(t){return Lr[t]===e.type}));if(1===r.length){var n=r[0];t[n]&&t[n](e)}}));return e.on(p.default.Draw.Event.CREATED,i),n.current=Ur(t,r),e.addControl(n.current),o&&o(n.current),function(){for(var r in e.off(p.default.Draw.Event.CREATED,i),Lr)t[r]&&e.off(Lr[r],t[r]);n.current.remove(e)}}),[]),l.default.useEffect((function(){if(!Pr(t.draw,o.current.draw)||!Pr(t.edit,o.current.edit)||t.position!==o.current.position){var e=r.map;n.current.remove(e),n.current=Ur(t,r),n.current.addTo(e);var i=t.onMounted;return i&&i(n.current),function(){n.current.remove(e)}}}),[t.draw,t.edit,t.position]),null}function Ur(e,t){var r=t.layerContainer,o=e.draw,i=e.edit,a=e.position,s={edit:Yr(Yr({},i),{},{featureGroup:r})};return o&&(s.draw=Yr({},o)),a&&(s.position=a),new n.Control.Draw(s)}Qr.propTypes=Yr(Yr({},Object.keys(Lr).reduce((function(e,t){return e[t]=r.PropTypes.func,e}),{})),{},{onCreated:r.PropTypes.func,onMounted:r.PropTypes.func,draw:r.PropTypes.shape({polyline:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),polygon:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),rectangle:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),circle:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),marker:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool])}),edit:r.PropTypes.shape({edit:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),remove:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),poly:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),allowIntersection:r.PropTypes.bool}),position:r.PropTypes.oneOf(["topright","topleft","bottomright","bottomleft"]),leaflet:r.PropTypes.shape({map:r.PropTypes.instanceOf(n.Map),layerContainer:r.PropTypes.shape({addLayer:r.PropTypes.func.isRequired,removeLayer:r.PropTypes.func.isRequired})})});var Wr=function(e){return b.exports.jsx(Qr,{onCreated:e.handleOnCreated,onDeleted:e.handleOnDeleted,position:e.position||"topright",draw:e.draw||{rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},edit:{edit:!1}})},Kr=function(t){var r={polygon:!0,marker:!0,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},n=e.useState(r),o=n[0],i=n[1],a=e.useContext(qr),s=a.locations,c=a.setLocations;return e.useEffect((function(){var e=p.default.icon({iconUrl:g.default,iconRetinaUrl:h.default,shadowUrl:m.default,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});p.default.Marker.prototype.options.icon=e,s&&s.length>0&&i((function(e){var t=w({},e);return Object.keys(t).forEach((function(e){t[e]=!1})),t}))}),[]),b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("style",{children:".leaflet-container { min-height: 80px; min-width: 80px; height: 100%; width: 100% }"}),b.exports.jsxs(Mr,w({center:t.center||[0,0],zoom:t.zoom||13,maxZoom:t.maxZoom,minZoom:t.minZoom},t.MapContainerProps,{children:[b.exports.jsx(kr,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),t.fullscreen&&b.exports.jsx(Gr,w({},"boolean"==typeof t.fullscreen?{}:t.fullscreen)),b.exports.jsxs(Br,{children:[null==s?void 0:s.map((function(e){return e.points.length>1?b.exports.jsx(Fr,{positions:e.points.map((function(e){return[e.latitude,e.longitude]}))},"marker-".concat(e.objId)):b.exports.jsx(Dr,{position:[e.points[0].latitude,e.points[0].longitude]},"marker-".concat(e.objId))})),t.drawTools&&b.exports.jsx(Wr,w({},"boolean"!=typeof t.drawTools?t.drawTools:{draw:o,handleOnCreated:function(e){var t,r,n=e.layerType,o=e.layer;i((function(e){var t=w({},e);return Object.keys(t).forEach((function(e){t[e]=!1})),t}));var a=[];"polygon"===n?a=null===(r=null===(t=o._latlngs)||void 0===t?void 0:t[0])||void 0===r?void 0:r.map((function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})):a.push({order:1,latitude:o._latlng.lat,longitude:o._latlng.lng,id:-1}),c((function(e){return E(E([],e,!0),[{points:a,id:-1}],!1)}))},handleOnDeleted:function(e){var t=e.layers._layers;i((function(e){return w(w({},r),{workaround:Math.random()})})),c((function(e){return(e||[]).filter((function(e){return!Object.values(t).some((function(t){return-1*t!==e.id}))}))}))}}))]}),t.centerActiveArea&&b.exports.jsx(Rr,w({autoCenter:s&&s.length>0},"boolean"==typeof t.centerActiveArea?{}:t.centerActiveArea))]}))]})},Jr=function(e){var t=e.containerRef;e.className;var r=e.children,n=e.onClick;e.onClose;var o=l.default.useRef(null);return l.default.useEffect((function(){if(o&&t&&o.current&&t.current){var e=t.current.getBoundingClientRect(),r=o.current.getBoundingClientRect(),n=e.width,i="0px",a="unset";e.right+r.width>=window.innerWidth&&(n=-r.width),r.bottom>=window.innerHeight&&(a="".concat(-(window.innerHeight-e.bottom-15).toFixed(),"px"),i="unset"),o.current.setAttribute("style","opacity: 1; left: ".concat(n.toFixed(),"px; bottom: ").concat(a,"; top: ").concat(i,";"))}}),[o]),b.exports.jsx("div",w({ref:o,className:"ui-menu"},{children:b.exports.jsx("ul",w({className:"ui-menuList",onClick:n,onContextMenu:n},{children:r}))}))};function Zr(e){var t=u.useState(),r=t[0],n=t[1];return u.useEffect((function(){n(function(e){var t;if(e){if("[object String]"===Object.prototype.toString.call(e)){var r=document.getElementById(e);return null!=r?r:void 0}var n=e;return n&&void 0!==n.current?null!==(t=n.current)&&void 0!==t?t:void 0:e}}(e))}),[e]),r}Jr.propTypes={className:f.default.string},Jr.defaultProps={className:void 0};var Hr=function(e){var t=e.className,r=e.children,n=e.placement,o=e.open,i=e.container,a=e.onOpen,s=e.onClose,c=l.default.useRef(null),u=Zr(i),d=l.default.useState(null),f=d[0],p=d[1];ir((function(){o&&s&&s()}),[c]);var h=l.default.useCallback((function(e){e.preventDefault(),e.ctrlKey||(p({mouseX:e.pageX-2,mouseY:e.pageY-4}),a&&a())}),[a]),g=function(e){e.preventDefault()};return l.default.useEffect((function(){var e=null!=u?u:document;return e.addEventListener("contextmenu",h),e!==document&&document.addEventListener("contextmenu",g),function(){e.removeEventListener("contextmenu",h),document.removeEventListener("contextmenu",g)}}),[u,h]),b.exports.jsx(z,w({ref:c,anchorPosition:null!==f?{top:f.mouseY,left:f.mouseX}:void 0,placement:n,open:o,overflow:!1},{children:b.exports.jsx(Jr,w({className:t,onClose:s,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:c},{children:r}))}))};Hr.propTypes={className:f.default.string},Hr.defaultProps={className:void 0};var _r=function(e){return e.className,b.exports.jsx("hr",{})};_r.propTypes={className:f.default.string},_r.defaultProps={className:void 0};var zr=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:j("ui-icon",t),transform:"rotate(90 0 0)",preserveAspectRatio:"xMidYMid meet"},{children:b.exports.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})}))},Xr=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:j("ui-icon",t)},{children:b.exports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}))},$r=function(e){var t=e.label,r=e.icon,n=e.className,o=e.style;e.active;var i=e.disable,a=e.children,s=e.itemTemplate,c=e.onClick,u=l.default.useState(!1),d=u[0],f=u[1],p=l.default.useRef(null),h=l.default.useCallback((function(e){c&&!0!==i&&c(e)}),[c]),g=null!=a;return b.exports.jsxs("li",w({className:j("ui-menuItem",!0===i?"ui-menuItem-disable":null,n),style:o,onMouseEnter:function(){f(!0)},onMouseLeave:function(){f(!1)},ref:p},{children:[b.exports.jsxs("button",w({type:"button",className:"ui-menuItem-btn",onClick:h},{children:[r&&b.exports.jsx("div",w({className:"ui-menuItem-icon"},{children:r})),b.exports.jsx("span",{children:null!=s?s:t}),g&&b.exports.jsx("div",w({className:"ui-menuItem-menuIconContainer"},{children:b.exports.jsx(zr,{className:"ui-menuItem-menuIcon"})}))]})),g&&d&&b.exports.jsx(Jr,w({containerRef:p},{children:a}))]}))};$r.propTypes={className:f.default.string},$r.defaultProps={className:void 0};var en=function(e){var t=e.className,r=e.children,n=e.placement,o=e.open,i=e.anchorPosition,a=e.anchorEl,s=e.onClose,c=l.default.useRef(null);return ir((function(){o&&s&&s()}),[c]),o&&(i||a)?b.exports.jsx(z,w({ref:c,anchorPosition:i,anchorEl:a,placement:n,open:o,overflow:!1,className:"ui-menu-popper"},{children:b.exports.jsx(Jr,w({className:t,onClose:s,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:c},{children:r}))})):null};en.propTypes={className:f.default.string},en.defaultProps={className:void 0};var tn=function(e){var t=e.title,r=e.className,n=e.children;return b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("li",w({className:j("ui-group-title",r)},{children:t})),n]})};tn.propTypes={className:f.default.string},tn.defaultProps={className:void 0};var rn=function(e){var t=e.url,r=e.queryParams,n=e.token,o=e.label,i=e.onStart,a=e.onCompleted,s=e.onError;return b.exports.jsx(b.exports.Fragment,{children:b.exports.jsx($r,{label:o,onClick:function(e){return A(void 0,void 0,void 0,(function(){var o,c,l,u,d,f,p,h;return C(this,(function(g){switch(g.label){case 0:i&&i(e),g.label=1;case 1:if(g.trys.push([1,4,,5]),!n)throw new Error("INVALID_TOKEN");if(!t)throw new Error("INVALID_URL");return(o={}).ContentType="application/json",o.Authorization="Bearer ".concat(n),c={method:"get",headers:o},l=new URL(t),r&&Object.keys(r).forEach((function(e){return l.searchParams.append(e,r[e])})),[4,fetch(l,c)];case 2:if(!(u=g.sent())||200!==u.status)throw new Error("An error occured while generating file");return[4,u.blob()];case 3:return(d=g.sent())&&(f=window.URL.createObjectURL(d),(p=document.createElement("a")).href=f,p.download=function(e){var t=e.get("Content-Disposition");if(!t)return null;var r=t.split(";"),n="filename=",o=r.find((function(e){return e.indexOf(n)>-1}));if(o){var i=o.search(n);if(i<0)return null;var a=o.substring(i+9).trim();if(0===a.length)return null;var s=a.substring(0,1);return'"'!==s&&"'"!==s?a:a.length<2||a[a.length-1]!==s?null:a.substring(1,a.length-1)}return null}(u.headers)||"file",p.click(),URL.revokeObjectURL(f),p.remove()),[3,5];case 4:throw h=g.sent(),s&&s(h),h;case 5:return a&&a(),[2]}}))}))}})})};rn.propTypes={label:f.default.string};var nn=function(e){e.open;var t=e.width,r=e.fullWidth,n=e.fullHeight,o=e.className,i=e.children,a=e.onClose,s=l.default.useRef(),c=l.default.useRef(null),u=l.default.useRef(null);l.default.useEffect((function(){return s.current=document.body.style.overflow,document.body.style.overflow="hidden",function(){var e;document.body.style.overflow=null!==(e=s.current)&&void 0!==e?e:"initial"}}),[]);var d=l.default.useCallback((function(){a&&a()}),[a]);return b.exports.jsx(R,w({ref:c},{children:b.exports.jsxs("div",w({ref:function(e){u.current=e},style:{position:"fixed",margin:"0"},role:"dialog",className:j("ui-dialog",o)},{children:[b.exports.jsx("div",{role:"presentation",className:"ui-dialog-overlay",onClick:d}),b.exports.jsx("div",w({className:j("ui-dialog-container",t?"ui-dialog-size-".concat(t):null,!0===r?"ui-dialog-size-fullwidth":null,!0===n?"ui-dialog-size-fullheight":null)},{children:i}))]}))}))};nn.propTypes={className:f.default.string},nn.defaultProps={className:void 0};var on=function(e){var t=e.className,r=e.children;return b.exports.jsx("div",w({className:j("ui-dialog-content",t)},{children:r}))};on.propTypes={className:f.default.string},on.defaultProps={className:void 0};var an=function(e){var t=e.className,r=e.children;return b.exports.jsx("footer",w({className:j("ui-dialog-footer",t)},{children:r}))};an.propTypes={className:f.default.string},an.defaultProps={className:void 0};var sn=function(e){var t=e.className,r=e.children;return b.exports.jsx("header",w({className:j("ui-dialog-header",t)},{children:r}))};sn.propTypes={className:f.default.string},sn.defaultProps={className:void 0};var cn=function(e){var t=e.className,r=e.children,n=e.closeDisable,o=e.onClose,i=l.default.useCallback((function(){o&&!0!==n&&o()}),[o,n]),a=void 0!==o;return b.exports.jsxs("h3",w({className:j("ui-dialog-title",t)},{children:[r,a&&b.exports.jsx("button",w({type:"button",className:j("ui-dialog-close",n?"ui-dialog-close-disable":null),tabIndex:0,onClick:i},{children:b.exports.jsx(Xr,{})}))]}))};cn.propTypes={className:f.default.string,children:f.default.node,closeDisable:f.default.bool},cn.defaultProps={className:void 0,children:void 0};var ln=function(e){var t=e.className,r=e.children;return b.exports.jsx("div",w({className:j("ui-dialog-actions",t)},{children:r}))};ln.propTypes={className:f.default.string,children:f.default.node},ln.defaultProps={className:void 0,children:void 0};var un=function(e){var t=e.title,r=e.ok,n=e.cancel,o=e.children,i=e.className,a=e.onClose,s=l.default.useCallback((function(){a&&a(!1)}),[a]),c=l.default.useCallback((function(){a&&a(!0)}),[a]),u=null!=r?r:"oui",d=null!=n?n:"Annuler";return b.exports.jsxs(nn,w({open:!0,className:j("ui-dialog-box","ui-dialog-confirm",i)},{children:[b.exports.jsx(sn,{children:b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsxs("svg",w({className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.5 438.5"},{children:[b.exports.jsx("path",{d:"M409.1,109.2c-19.6-33.6-46.2-60.2-79.8-79.8C295.7,9.8,259.1,0,219.3,0c-39.8,0-76.5,9.8-110.1,29.4\r\n C75.6,49,49,75.6,29.4,109.2C9.8,142.8,0,179.5,0,219.3c0,39.8,9.8,76.5,29.4,110.1c19.6,33.6,46.2,60.2,79.8,79.8\r\n c33.6,19.6,70.3,29.4,110.1,29.4s76.5-9.8,110.1-29.4c33.6-19.6,60.2-46.2,79.8-79.8c19.6-33.6,29.4-70.3,29.4-110.1\r\n C438.5,179.5,428.7,142.8,409.1,109.2z M387.4,290.2c-9.7,22.6-22.7,42-39,58.2c-16.3,16.3-35.7,29.3-58.2,39\r\n c-22.6,9.7-46.2,14.6-70.9,14.6s-48.4-4.9-70.9-14.6c-22.6-9.7-42-22.7-58.2-39c-16.3-16.3-29.3-35.7-39-58.2\r\n c-9.7-22.6-14.6-46.2-14.6-70.9c0-24.7,4.9-48.4,14.6-70.9c9.7-22.6,22.7-42,39-58.2c16.3-16.3,35.7-29.3,58.2-39\r\n c22.6-9.7,46.2-14.6,70.9-14.6c24.7,0,48.4,4.9,70.9,14.6c22.6,9.7,42,22.7,58.2,39c16.3,16.3,29.3,35.7,39,58.2\r\n c9.7,22.6,14.6,46.2,14.6,70.9C402,244,397.1,267.7,387.4,290.2z"}),b.exports.jsx("path",{d:"M217,294c-14.6,0-26.5,12.2-26.5,26.8c0,14.3,11.5,26.8,26.5,26.8s26.8-12.5,26.8-26.8C243.8,306.2,231.6,294,217,294z"}),b.exports.jsx("path",{d:"M221.5,90.8c-47.1,0-68.7,27.9-68.7,46.7c0,13.6,11.5,19.9,20.9,19.9c18.8,0,11.2-26.8,46.7-26.8c17.4,0,31.4,7.7,31.4,23.7\r\n c0,18.8-19.5,29.6-31,39.4c-10.1,8.7-23.4,23-23.4,53c0,18.1,4.9,23.4,19.2,23.4c17.1,0,20.6-7.7,20.6-14.3\r\n c0-18.1,0.4-28.6,19.5-43.6c9.4-7.3,39-31,39-63.8S266.1,90.8,221.5,90.8z"})]})),b.exports.jsx("h1",w({className:"ui-dialog-title"},{children:t}))]})}),b.exports.jsx(on,{children:o}),b.exports.jsxs(an,{children:[b.exports.jsx($,w({className:"dialog-action-ok dialog-action",onClick:c},{children:u})),b.exports.jsx($,w({className:"dialog-action-close dialog-action",onClick:s},{children:d}))]})]}))};un.propTypes={className:f.default.string},un.defaultProps={className:void 0};var dn=function(e){var t=e.title,r=e.ok,n=e.children,o=e.className,i=e.onClose,a=l.default.useCallback((function(){i&&i(!0)}),[i]),s=null!=r?r:"fermer";return b.exports.jsxs(nn,w({open:!0,className:j("ui-dialog-box","ui-dialog-error",o)},{children:[b.exports.jsx(sn,{children:b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsxs("svg",w({className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.533 438.533"},{children:[b.exports.jsx("path",{d:"M409.133,109.203c-19.608-33.592-46.205-60.189-79.798-79.796C295.736,9.801,259.058,0,219.273,0 c-39.781,0-76.47,9.801-110.063,29.407c-33.595,19.604-60.192,46.201-79.8,79.796C9.801,142.8,0,179.489,0,219.267 c0,39.78,9.804,76.463,29.407,110.062c19.607,33.592,46.204,60.189,79.799,79.798c33.597,19.605,70.283,29.407,110.063,29.407 s76.47-9.802,110.065-29.407c33.593-19.602,60.189-46.206,79.795-79.798c19.603-33.596,29.403-70.284,29.403-110.062 C438.533,179.485,428.732,142.795,409.133,109.203z M387.434,290.213c-9.709,22.556-22.696,41.97-38.969,58.245 c-16.271,16.269-35.689,29.26-58.245,38.965c-22.555,9.712-46.202,14.564-70.946,14.564c-24.744,0-48.391-4.853-70.948-14.564 c-22.554-9.705-41.971-22.696-58.245-38.965c-16.269-16.275-29.259-35.687-38.97-58.245 c-9.707-22.552-14.562-46.206-14.562-70.946c0-24.744,4.854-48.391,14.562-70.948c9.707-22.554,22.697-41.968,38.97-58.245 c16.274-16.269,35.691-29.26,58.245-38.97c22.554-9.704,46.205-14.558,70.948-14.558c24.74,0,48.395,4.851,70.946,14.558 c22.556,9.707,41.97,22.698,58.245,38.97c16.272,16.274,29.26,35.688,38.969,58.245c9.709,22.554,14.564,46.201,14.564,70.948 C402.002,244.011,397.143,267.664,387.434,290.213z"}),b.exports.jsx("path",{d:"M284.368,258.668c-19.219-14.086-40.926-21.129-65.095-21.129c-24.172,0-45.871,7.039-65.096,21.129 c-19.224,14.085-32.358,32.641-39.397,55.671c-1.521,4.757-1.143,9.381,1.141,13.847c2.286,4.469,5.898,7.467,10.85,8.993 c4.758,1.526,9.373,1.143,13.846-1.144c4.471-2.285,7.467-5.899,8.991-10.848c4.759-15.235,13.562-27.556,26.409-36.979 c12.847-9.418,27.263-14.127,43.252-14.127c15.987,0,30.412,4.712,43.251,14.127c12.854,9.424,21.655,21.744,26.412,36.979 c1.52,4.948,4.564,8.562,9.134,10.848c4.568,2.286,9.236,2.67,13.989,1.144c4.761-1.526,8.278-4.524,10.564-8.993 c2.286-4.466,2.669-9.09,1.14-13.847C316.729,291.312,303.591,272.75,284.368,258.668z"}),b.exports.jsx("path",{d:"M146.181,182.725c10.085,0,18.699-3.576,25.837-10.709c7.139-7.135,10.708-15.749,10.708-25.837 c0-10.089-3.569-18.699-10.708-25.837s-15.752-10.709-25.837-10.709c-10.088,0-18.702,3.571-25.84,10.709 c-7.135,7.139-10.707,15.749-10.707,25.837c0,10.088,3.568,18.702,10.707,25.837C127.482,179.152,136.093,182.725,146.181,182.725 z"}),b.exports.jsx("path",{d:"M292.359,109.631c-10.089,0-18.706,3.571-25.845,10.709c-7.132,7.139-10.708,15.749-10.708,25.837 c0,10.088,3.576,18.702,10.708,25.837c7.139,7.137,15.756,10.709,25.845,10.709c10.081,0,18.698-3.576,25.837-10.709 c7.139-7.135,10.708-15.749,10.708-25.837c0-10.089-3.569-18.699-10.708-25.837S302.44,109.631,292.359,109.631z"})]})),b.exports.jsx("h1",w({className:"ui-dialog-title"},{children:t}))]})}),b.exports.jsx(on,{children:n}),b.exports.jsx(an,{children:b.exports.jsx($,w({className:"dialog-action-ok dialog-action",onClick:a},{children:s}))})]}))};dn.propTypes={className:f.default.string},dn.defaultProps={className:void 0};var fn=function(e){var t=e.title,r=e.ok,n=e.children,o=e.className,i=e.onClose,a=l.default.useCallback((function(){i&&i(!0)}),[i]),s=null!=r?r:"fermer";return b.exports.jsxs(nn,w({open:!0,className:j("ui-dialog-box","ui-dialog-warning",o)},{children:[b.exports.jsx(sn,{children:b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsxs("svg",w({className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512 512"},{children:[b.exports.jsx("polygon",{fill:"#FFA418",points:"0,477.703 256,477.703 289.391,256 256,34.297"}),b.exports.jsx("polygon",{fill:"#FF8A1E",points:"256,34.297 256,477.703 512,477.703"}),b.exports.jsx("circle",{fill:"#324860",cx:"256",cy:"405.359",r:"16.696"}),b.exports.jsx("rect",{x:"239.304",y:"177.185",fill:"#324860",width:"33.391",height:"178.087"})]})),b.exports.jsx("h1",w({className:"ui-dialog-title"},{children:t}))]})}),b.exports.jsx(on,{children:n}),b.exports.jsx(an,{children:b.exports.jsx($,w({className:"dialog-action-ok dialog-action",onClick:a},{children:s}))})]}))};fn.propTypes={className:f.default.string},fn.defaultProps={className:void 0},exports.AuthDownloadLink=rn,exports.BarLoader=function(e){var t=e.title,r=e.color,n=e.className,o=e.isComplete;return b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("div",w({className:j("loader",null!=r?"loader-color-".concat(r):"loader-color-blue",!0===o?"completed":"",n)},{children:b.exports.jsx("div",{className:j("loaderBar",null!=r?"loaderBar-color-".concat(r):"loaderBar-color-blue")})})),b.exports.jsx("div",w({className:j("loaderBar-title")},{children:b.exports.jsx("span",{children:t})}))]})},exports.Button=$,exports.Camera=function(t){var r=t.onCapture,n=t.isOffline,o=void 0!==n&&n,i=t.mode,a=void 0===i?"photo":i,s=t.validateText,c=void 0===s?"Valider":s,l=t.resetText,u=void 0===l?"Annuler":l,d=t.isShowOffline,f=void 0!==d&&d;t.isShowVideoButton;var p=y(t,["onCapture","isOffline","mode","validateText","resetText","isShowOffline","isShowVideoButton"]),h=e.useRef(null),g=e.useRef(null),m=e.useRef(new rr),v=e.useState(a),E=v[0],x=v[1],B=e.useState(!1),T=B[0],M=B[1],D=e.useState(!1),F=D[0],k=D[1],I=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,q=function(){var t=e.useRef(null),r=e.useState(0),n=r[0],o=r[1],i=function(e){var t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60;return"".concat(t>0?t.toString().padStart(2,"0").concat(":"):"").concat(r>0?r.toString().padStart(2,"0").concat(":"):"").concat(n.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))},a=e.useMemo((function(){return i(n)}),[n]),s=e.useCallback((function(){o(0),t.current=setInterval((function(){o((function(e){return e+1}))}),1e3)}),[]),c=e.useCallback((function(){t.current&&(clearInterval(t.current),t.current=null)}),[]);return{formatTime:i,startTimer:s,stopTimer:c,formatedTime:a}}(),R=q.formatedTime,N=q.startTimer,j=q.stopTimer,S=e.useState({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null}),G=S[0],P=S[1],V=e.useState({facingMode:{exact:"environment"},width:{min:200},height:{min:300}}),Y=V[0],O=V[1];e.useEffect((function(){return O({facingMode:I?"environment":"user",width:{min:200},height:{min:300}}),function(){U(),j(),W()}}),[]),e.useEffect((function(){"video"===E&&M(!1)}),[G]);var L=e.useCallback((function(){return A(void 0,void 0,void 0,(function(){var e,t,r,n,o,i,a,s,c,l;return C(this,(function(u){if(e=null===(l=h.current)||void 0===l?void 0:l.getScreenshot()){for(t=atob(e.split(",")[1]),r=new Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);o=new Uint8Array(r),i=new Blob([o],{type:"image/jpeg"}),a="captured_image_".concat(Date.now().toString().slice(-7),".jpg"),s=new File([i],a,{type:"image/jpeg"}),c=URL.createObjectURL(s),P((function(e){return w(w({},e),{imageUrl:c,file:s})}))}return[2]}))}))}),[h,o,r]),Q=e.useCallback((function(){if(h.current&&h.current.stream){var e="webm",t="video/".concat(e);MediaRecorder.isTypeSupported("video/mp4")&&(e="mp4",t="video/mp4");var r=new MediaRecorder(h.current.stream,{mimeType:t}),n=[];r.ondataavailable=function(e){e.data.size>0&&n.push(e.data)},r.onstop=function(){return A(void 0,void 0,void 0,(function(){var r,o,i,a;return C(this,(function(s){return r=new Blob(n,{type:t}),o="captured_video_".concat(Date.now(),".").concat(e),i=new File([r],o,{type:t}),a=URL.createObjectURL(i),P((function(e){return w(w({},e),{videoUrl:a,isRecording:!1,file:i})})),j(),[2]}))}))},r.start(),g.current=r,N(),P((function(e){return w(w({},e),{isRecording:!0})}))}}),[h,o,N,j,r]),U=function(){P({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null})};return b.exports.jsx("div",w({className:"camera-container"},{children:G.imageUrl||G.videoUrl?b.exports.jsxs("div",w({className:"camera-preview camera-screen-animation"},{children:[G.imageUrl&&b.exports.jsx("img",{src:G.imageUrl,alt:"Capturé",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"}}),G.videoUrl&&b.exports.jsxs("video",w({width:"100%",height:"90%",id:"video",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},onEnded:function(){return M(!1)}},{children:[b.exports.jsx("source",{src:G.videoUrl,type:"video/mp4"}),b.exports.jsx("source",{src:G.videoUrl,type:"video/webm"}),b.exports.jsx("track",{kind:"captions",src:"",lang:"en",label:"English",default:!0}),"Your browser does not support the video."]})),G.videoUrl&&b.exports.jsx($,w({variant:"contained",className:"video-play-btn",onClick:function(){var e=document.getElementById("video");try{e.paused?e.play():e.pause(),M(!T)}catch(e){}}},{children:T?b.exports.jsx(_t,{}):b.exports.jsx(zt,{})})),b.exports.jsxs("div",w({className:"camera-controls"},{children:[b.exports.jsx($,w({variant:"contained",onClick:function(){return A(void 0,void 0,void 0,(function(){var e;return C(this,(function(t){switch(t.label){case 0:return o?[4,m.current.storeFile(G.file)]:[3,2];case 1:e=t.sent(),r({fileRowId:e,fileStoreName:"capturedFiles"}),t.label=2;case 2:return o||"photo"!==E||r({file:G.file,imageSrc:G.imageUrl}),o||"video"!==E||r({file:G.file,videoSrc:G.videoUrl}),U(),[2]}}))}))},className:"camera-button camera-button--download"},{children:c})),b.exports.jsx($,w({variant:"outlined",onClick:U,className:"camera-button camera-button--reset"},{children:u}))]}))]})):b.exports.jsxs("div",w({className:"camera-preview"},{children:[G.isRecording&&b.exports.jsxs("div",w({className:"camera-recording-timer",style:{display:"video"===E?"flex":"none"}},{children:[b.exports.jsx("span",{className:"camera-recording-dot"}),b.exports.jsx("span",{children:R})]})),!G.isRecording&&b.exports.jsx("button",w({type:"button",onClick:function(){return x("photo"===E?"video":"photo"),void U()},className:"camera-button camera-mode"},{children:b.exports.jsx("span",{children:"photo"===E?"Video":"Photo"})})),I&&!G.isRecording&&b.exports.jsx("button",w({type:"button",onClick:function(){k(!F),O({facingMode:F?"environment":"user",width:{min:200},height:{min:300}})},className:"camera-button camera-switch"},{children:b.exports.jsx($t,{size:18})})),o&&f&&b.exports.jsx("div",w({className:"camera-offline-mode"},{children:"Offline mode"})),b.exports.jsx(Pt,w({ref:h,videoConstraints:Y},p,{style:{height:"90% !important",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},screenshotFormat:"image/jpeg",allowFullScreen:!0})),b.exports.jsxs("div",w({className:"camera-controls"},{children:["photo"===E&&b.exports.jsx($,w({variant:"contained",className:"camera-button camera-button--capture",onClick:L},{children:b.exports.jsx(Ht,{size:28})})),"video"===E&&!G.isRecording&&b.exports.jsx($,w({variant:"contained",onClick:Q,className:"camera-button camera-button--record"},{children:b.exports.jsx(er,{size:30})})),"video"===E&&G.isRecording&&b.exports.jsx($,w({variant:"contained",onClick:W,className:"camera-button camera-button--record"},{children:b.exports.jsx(Xt,{size:28})}))]}))]}))}));function W(){g.current&&g.current.stop()}},exports.ChevronDownIcon=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:j("ui-icon",t),transform:"rotate(180 0 0)"},{children:b.exports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 8.29289C11.6834 7.90237 12.3166 7.90237 12.7071 8.29289L17.7071 13.2929C18.0976 13.6834 18.0976 14.3166 17.7071 14.7071C17.3166 15.0976 16.6834 15.0976 16.2929 14.7071L12 10.4142L7.70711 14.7071C7.31658 15.0976 6.68342 15.0976 6.29289 14.7071C5.90237 14.3166 5.90237 13.6834 6.29289 13.2929L11.2929 8.29289Z"})}))},exports.ChevronLeftIcon=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:j("ui-icon",t),transform:"rotate(270 0 0)",preserveAspectRatio:"xMidYMid meet"},{children:b.exports.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})}))},exports.ChevronRightIcon=zr,exports.ConfirmDialog=un,exports.ContextMenu=Hr,exports.CrossIcon=Xr,exports.Dialog=nn,exports.DialogActions=ln,exports.DialogContent=on,exports.DialogFooter=an,exports.DialogHeader=sn,exports.DialogTitle=cn,exports.Divider=_r,exports.DomContainer=R,exports.ErrorDialog=dn,exports.Map=function(t){var r=t.customButtons,n=t.onClose,o=t.onSave,i=y(t,["customButtons","onClose","onSave"]),a=e.useState(i.data?i.data:[]),s=a[0],c=a[1],l=function(){return A(void 0,void 0,void 0,(function(){return C(this,(function(e){return o(s[0].points),[2]}))}))},u=function(){return A(void 0,void 0,void 0,(function(){return C(this,(function(e){return n(),[2]}))}))};return e.useEffect((function(){var e,t,n=null===(e=null==r?void 0:r.saveButton)||void 0===e?void 0:e.addEventListener("click",(function(){l()})),o=null===(t=null==r?void 0:r.cancelButton)||void 0===t?void 0:t.addEventListener("click",(function(){u()}));return function(){var e,t;null===(e=null==r?void 0:r.saveButton)||void 0===e||e.removeEventListener("click",n),null===(t=null==r?void 0:r.cancelButton)||void 0===t||t.removeEventListener("click",o)}}),[s]),b.exports.jsx("div",w({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"90%",height:"400px",margin:"20px"}},{children:b.exports.jsxs(qr.Provider,w({value:{locations:s,setLocations:c}},{children:[b.exports.jsx(Kr,w({},i)),!r&&b.exports.jsxs("div",w({className:"cortex-widget-buttons"},{children:[b.exports.jsx("button",w({className:"cortex-widget-btn cortex-widget-btn-cancel",type:"button",onClick:u},{children:"Cancel"})),b.exports.jsx("button",w({className:"cortex-widget-btn cortex-widget-btn-save",type:"button",onClick:l},{children:"Save"}))]})),";"]}))}))},exports.Menu=Jr,exports.MenuGroup=tn,exports.MenuItem=$r,exports.Popper=z,exports.PopupMenu=en,exports.Scanner=function(t){var r=t.scanConfirmation,n=void 0===r||r,o=t.scanTrackerType,i=void 0===o?"centerText":o,a=y(t,["scanConfirmation","scanTrackerType"]),s=e.useState(!1),c=s[0],l=s[1],u=e.useState(!1),d=u[0],f=u[1],p=e.useState([]),h=p[0],g=p[1],m=function(){l(!1),f(!1)},v=e.useMemo((function(){switch(i){case"outline":return Et;case"boundingBox":return bt;case"centerText":return xt;default:return}}),[i]),A=e.useCallback((function(){m(),a.onScan(h)}),[a,h]),C=e.useCallback((function(e){n&&(l(!0),f(!0),g(e))}),[a]);return b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("div",w({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:"15px",margin:"20px"}},{children:b.exports.jsx(qt,w({formats:["qr_code","micro_qr_code","rm_qr_code","maxi_code","pdf417","aztec","data_matrix","matrix_codes","dx_film_edge","databar","databar_expanded","codabar","code_39","code_93","code_128","ean_8","ean_13","itf","linear_codes","upc_a","upc_e"],components:{audio:!0,onOff:!0,torch:!0,tracker:v,finder:!1},scanDelay:2e3,allowMultiple:!1},a,{onScan:C,paused:d}))})),b.exports.jsx(Gt,w({open:c,onClose:m,onConfirm:A},null==a?void 0:a.scanConfirmDialog))]})},exports.Selected=function(e){var t=e.title,r=e.data,n=e.onClick;return b.exports.jsx(b.exports.Fragment,{children:b.exports.jsxs("div",w({className:j("ui-selected-params")},{children:[b.exports.jsx("div",w({className:j("ui-selected-title")},{children:t})),b.exports.jsx("div",w({className:j("ui-selected-content")},{children:b.exports.jsx(b.exports.Fragment,{children:Array.isArray(r)&&r.map((function(e,t){return b.exports.jsx(b.exports.Fragment,{children:b.exports.jsx("div",w({className:j("ui-selected-button")},{children:b.exports.jsx("button",w({type:"button",onClick:function(){n(e)},className:1===e.selected?"ui-selected-btn":0===e.selected?"ui-not-selected":"ui-new-selected"},{children:e.name}))}),t)})}))})}))]}))})},exports.Spinner=X,exports.TagInput=function(e){var t=e.tags;e.className;var r=e.suggestions,n=e.disableFilter,o=e.onTextChange,i=e.onChange,a=l.default.useRef(null),s=l.default.useRef(null),c=l.default.useRef(null),u=l.default.useState(""),d=u[0],f=u[1],p=l.default.useState(!1),h=p[0],g=p[1];ir((function(){g(!1)}),[a,s]);var m=l.default.useCallback((function(e){if(i&&Array.isArray(t)){var r=t.findIndex((function(t){return t.id===e.id}));if(!(r<0)){var n=E([],t,!0);n.splice(r,1),i(n)}}}),[t,i]),v=l.default.useCallback((function(e){if(e){var r={id:e.id,label:e.label,value:e.value},n=Array.isArray(t)?E(E([],t,!0),[r],!1):[r];g(!1),i&&i(n),f(""),o&&o("")}}),[t,i,o]),y=l.default.useCallback((function(e){f(e),o&&o(e)}),[o]),A=Array.isArray(t)?t.map((function(e,t){return b.exports.jsx(ar,{tag:e,onDelete:function(){return m(e)}},t)})):[];return b.exports.jsxs("div",w({ref:c,className:"ui-taginput"},{children:[A,b.exports.jsx(sr,{ref:a,value:d,onChange:y,onClick:function(){g(!0)}}),b.exports.jsx(ur,{ref:s,open:h,anchorEl:a,filter:d,tags:t,suggestions:r,disableFilter:n,onSuggestionClick:v})]}))},exports.ToggleButton=function(e){var t=e.selected,r=e.value,n=e.size,o=e.children,i=e.className,a=e.onChange,s=l.default.useCallback((function(){a&&a(r)}),[a,r]);return b.exports.jsx("button",w({type:"button",className:j("ui-toggleBtn",void 0!==n?"ui-toggleBtn-size-".concat(n):"ui-toggleBtn-size-md",!0===t?"ui-toggleBtn-selected":null,i),onClick:s},{children:o}))},exports.Tooltip=function(e){var t=e.children,r=e.title;e.anchorEl;var n=e.enterDelay,o=void 0===n?0:n,i=e.leaveDelay,a=void 0===i?0:i,s=e.className,c=e.disabled,u=l.default.useState(void 0),d=u[0],f=u[1],p=l.default.useState(!1),h=p[0],g=p[1],m=l.default.useState(!0),v=m[0],y=m[1],A=l.default.useState(!1),C=A[0],E=A[1],x=l.default.useRef(),B=l.default.useRef();l.default.useEffect((function(){!0===c&&g(!1)}),[c]);var T,M=function(){g(!0)},D=function(){g(!1)},F=function(e){C||(clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),B.current=setTimeout((function(){D()}),a))},k=function(e){C||(clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),!0!==c&&(x.current=setTimeout((function(){M()}),o)))},I=function(e){E(!0),clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),!0!==c&&(x.current=setTimeout((function(){M()}),2e3))},q=function(e){clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),B.current=setTimeout((function(){D()}),3e3)};if(t){var R=w(w({},t.props),{onFocus:function(e){d||f(e.currentTarget),x.current=setTimeout((function(){M()}),o)},onMouseEnter:function(e){C||(clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),!0!==c&&(x.current=setTimeout((function(){M()}),o)))},onMouseLeave:F,onMouseOver:k,onTouchStart:I,onTouchEnd:q});T=l.default.cloneElement(t,R)}var N=h||!v;return b.exports.jsxs(b.exports.Fragment,{children:[T,b.exports.jsx(z,w({role:"tooltip",anchorEl:d,open:N,className:j("ui-tooltip",s),onMouseOver:C?void 0:k,onMouseLeave:C?void 0:F,onTouchStart:I,onTouchEnd:q},{children:b.exports.jsx(or,w({trigger:h,onEnter:function(){y(!1)},onExited:function(){y(!0)}},{children:b.exports.jsx("div",w({className:"ui-tooltip-content"},{children:r}))}))}))]})},exports.WarningDialog=fn;
|
|
30
|
+
function(t,r){e.exports?e.exports=r(p.default,v.default):r(t.L,t.screenfull)}("undefined"!=typeof self?self:this,(function(e,t){return e.Control.FullScreen=e.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:t,onAdd:function(t){var r,n="leaflet-control-zoom-fullscreen",o="";return r=t.zoomControl&&!this.options.forceSeparateButton?t.zoomControl._container:e.DomUtil.create("div","leaflet-bar"),this.options.content?o=this.options.content:n+=" fullscreen-icon",this._createButton(this.options.title,n,o,r,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),r},onRemove:function(){e.DomEvent.off(this.link,"click",e.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&(e.DomEvent.off(this._container,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).off(this._container,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this),e.DomEvent.off(document,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).off(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this))},_createButton:function(t,r,n,o,i,a){return this.link=e.DomUtil.create("a",r,o),this.link.href="#",this.link.title=t,this.link.innerHTML=n,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",t),L.DomEvent.disableClickPropagation(o),e.DomEvent.on(this.link,"click",e.DomEvent.stop).on(this.link,"click",i,a),this._screenfull.isEnabled&&(e.DomEvent.on(o,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).on(o,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,a),e.DomEvent.on(document,this._screenfull.raw.fullscreenchange,e.DomEvent.stop).on(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,a)),this.link},toggleFullScreen:function(){var t=this._map;t._exitFired=!1,t._isFullscreen?(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.exit():(e.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize()),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1):(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.request(this.options.fullscreenElement?this.options.fullscreenElement:t._container):(e.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize()),t.fire("enterFullscreen"),t._isFullscreen=!0)},_toggleState:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel,this._map._isFullscreen?L.DomUtil.removeClass(this.link,"leaflet-fullscreen-on"):L.DomUtil.addClass(this.link,"leaflet-fullscreen-on")},_handleFullscreenChange:function(){var e=this._map;e.invalidateSize(),this._screenfull.isFullscreen||e._exitFired||(e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1)}}),e.Map.include({toggleFullscreen:function(){this.fullscreenControl.toggleFullScreen()}}),e.Map.addInitHook((function(){this.options.fullscreenControl&&this.addControl(e.control.fullscreen(this.options.fullscreenControlOptions))})),e.control.fullscreen=function(t){return new e.Control.FullScreen(t)},{leaflet:e,screenfull:t}}))}(jr);var Sr=jr.exports,Gr=function(t){var r=xr();return e.useEffect((function(){Sr.leaflet.control.fullscreen(w({position:"topleft"},t||{})).addTo(r)}),[]),b.exports.jsx(b.exports.Fragment,{})},Pr=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(o=n;0!=o--;)if(!e(t[o],r[o]))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((n=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;0!=o--;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r};function Vr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){Or(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Or(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Lr={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 Qr(t){var r=hr(),n=e.useRef(),o=e.useRef(t),i=function(e){var n=t.onCreated;(r.layerContainer||r.map).addLayer(e.layer),n&&n(e)};return l.default.useEffect((function(){var e=r.map,o=t.onMounted;for(var a in Lr)e.on(Lr[a],(function(e){var r=Object.keys(Lr).filter((function(t){return Lr[t]===e.type}));if(1===r.length){var n=r[0];t[n]&&t[n](e)}}));return e.on(p.default.Draw.Event.CREATED,i),n.current=Ur(t,r),e.addControl(n.current),o&&o(n.current),function(){for(var r in e.off(p.default.Draw.Event.CREATED,i),Lr)t[r]&&e.off(Lr[r],t[r]);n.current.remove(e)}}),[]),l.default.useEffect((function(){if(!Pr(t.draw,o.current.draw)||!Pr(t.edit,o.current.edit)||t.position!==o.current.position){var e=r.map;n.current.remove(e),n.current=Ur(t,r),n.current.addTo(e);var i=t.onMounted;return i&&i(n.current),function(){n.current.remove(e)}}}),[t.draw,t.edit,t.position]),null}function Ur(e,t){var r=t.layerContainer,o=e.draw,i=e.edit,a=e.position,s={edit:Yr(Yr({},i),{},{featureGroup:r})};return o&&(s.draw=Yr({},o)),a&&(s.position=a),new n.Control.Draw(s)}Qr.propTypes=Yr(Yr({},Object.keys(Lr).reduce((function(e,t){return e[t]=r.PropTypes.func,e}),{})),{},{onCreated:r.PropTypes.func,onMounted:r.PropTypes.func,draw:r.PropTypes.shape({polyline:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),polygon:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),rectangle:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),circle:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),marker:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool])}),edit:r.PropTypes.shape({edit:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),remove:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),poly:r.PropTypes.oneOfType([r.PropTypes.object,r.PropTypes.bool]),allowIntersection:r.PropTypes.bool}),position:r.PropTypes.oneOf(["topright","topleft","bottomright","bottomleft"]),leaflet:r.PropTypes.shape({map:r.PropTypes.instanceOf(n.Map),layerContainer:r.PropTypes.shape({addLayer:r.PropTypes.func.isRequired,removeLayer:r.PropTypes.func.isRequired})})});var Wr=function(e){return b.exports.jsx(Qr,{onCreated:e.handleOnCreated,onDeleted:e.handleOnDeleted,position:e.position||"topright",draw:e.draw||{rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},edit:{edit:!1}})},Kr=function(t){var r={polygon:!0,marker:!0,rectangle:!1,circle:!1,circlemarker:!1,polyline:!1},n=e.useState(r),o=n[0],i=n[1],a=e.useContext(qr),s=a.locations,c=a.setLocations;return e.useEffect((function(){var e=p.default.icon({iconUrl:g.default,iconRetinaUrl:h.default,shadowUrl:m.default,iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]});p.default.Marker.prototype.options.icon=e,s&&s.length>0&&i((function(e){var t=w({},e);return Object.keys(t).forEach((function(e){t[e]=!1})),t}))}),[]),b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("style",{children:".leaflet-container { min-height: 80px; min-width: 80px; height: 100%; width: 100% }"}),b.exports.jsxs(Mr,w({center:t.center||[0,0],zoom:t.zoom||13,maxZoom:t.maxZoom,minZoom:t.minZoom},t.MapContainerProps,{children:[b.exports.jsx(kr,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),t.fullscreen&&b.exports.jsx(Gr,w({},"boolean"==typeof t.fullscreen?{}:t.fullscreen)),b.exports.jsxs(Br,{children:[null==s?void 0:s.map((function(e){return e.points.length>1?b.exports.jsx(Fr,{positions:e.points.map((function(e){return[e.latitude,e.longitude]}))},"marker-".concat(e.objId)):b.exports.jsx(Dr,{position:[e.points[0].latitude,e.points[0].longitude]},"marker-".concat(e.objId))})),t.drawTools&&b.exports.jsx(Wr,w({},"boolean"!=typeof t.drawTools?t.drawTools:{draw:o,handleOnCreated:function(e){var t,r,n=e.layerType,o=e.layer;i((function(e){var t=w({},e);return Object.keys(t).forEach((function(e){t[e]=!1})),t}));var a=[];"polygon"===n?a=null===(r=null===(t=o._latlngs)||void 0===t?void 0:t[0])||void 0===r?void 0:r.map((function(e,t){return{latitude:e.lat,longitude:e.lng,order:t+1}})):a.push({order:1,latitude:o._latlng.lat,longitude:o._latlng.lng,id:-1}),c((function(e){return E(E([],e,!0),[{points:a,id:-1}],!1)}))},handleOnDeleted:function(e){var t=e.layers._layers;i((function(e){return w(w({},r),{workaround:Math.random()})})),c((function(e){return(e||[]).filter((function(e){return!Object.values(t).some((function(t){return-1*t!==e.id}))}))}))}}))]}),t.centerActiveArea&&b.exports.jsx(Rr,w({autoCenter:s&&s.length>0},"boolean"==typeof t.centerActiveArea?{}:t.centerActiveArea))]}))]})},Jr=function(e){var t=e.containerRef;e.className;var r=e.children,n=e.onClick;e.onClose;var o=l.default.useRef(null);return l.default.useEffect((function(){if(o&&t&&o.current&&t.current){var e=t.current.getBoundingClientRect(),r=o.current.getBoundingClientRect(),n=e.width,i="0px",a="unset";e.right+r.width>=window.innerWidth&&(n=-r.width),r.bottom>=window.innerHeight&&(a="".concat(-(window.innerHeight-e.bottom-15).toFixed(),"px"),i="unset"),o.current.setAttribute("style","opacity: 1; left: ".concat(n.toFixed(),"px; bottom: ").concat(a,"; top: ").concat(i,";"))}}),[o]),b.exports.jsx("div",w({ref:o,className:"ui-menu"},{children:b.exports.jsx("ul",w({className:"ui-menuList",onClick:n,onContextMenu:n},{children:r}))}))};function Zr(e){var t=u.useState(),r=t[0],n=t[1];return u.useEffect((function(){n(function(e){var t;if(e){if("[object String]"===Object.prototype.toString.call(e)){var r=document.getElementById(e);return null!=r?r:void 0}var n=e;return n&&void 0!==n.current?null!==(t=n.current)&&void 0!==t?t:void 0:e}}(e))}),[e]),r}Jr.propTypes={className:f.default.string},Jr.defaultProps={className:void 0};var Hr=function(e){var t=e.className,r=e.children,n=e.placement,o=e.open,i=e.container,a=e.onOpen,s=e.onClose,c=l.default.useRef(null),u=Zr(i),d=l.default.useState(null),f=d[0],p=d[1];ir((function(){o&&s&&s()}),[c]);var h=l.default.useCallback((function(e){e.preventDefault(),e.ctrlKey||(p({mouseX:e.pageX-2,mouseY:e.pageY-4}),a&&a())}),[a]),g=function(e){e.preventDefault()};return l.default.useEffect((function(){var e=null!=u?u:document;return e.addEventListener("contextmenu",h),e!==document&&document.addEventListener("contextmenu",g),function(){e.removeEventListener("contextmenu",h),document.removeEventListener("contextmenu",g)}}),[u,h]),b.exports.jsx(z,w({ref:c,anchorPosition:null!==f?{top:f.mouseY,left:f.mouseX}:void 0,placement:n,open:o,overflow:!1},{children:b.exports.jsx(Jr,w({className:t,onClose:s,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:c},{children:r}))}))};Hr.propTypes={className:f.default.string},Hr.defaultProps={className:void 0};var _r=function(e){return e.className,b.exports.jsx("hr",{})};_r.propTypes={className:f.default.string},_r.defaultProps={className:void 0};var zr=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:j("ui-icon",t),transform:"rotate(90 0 0)",preserveAspectRatio:"xMidYMid meet"},{children:b.exports.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})}))},Xr=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:j("ui-icon",t)},{children:b.exports.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})}))},$r=function(e){var t=e.label,r=e.icon,n=e.className,o=e.style;e.active;var i=e.disable,a=e.children,s=e.itemTemplate,c=e.onClick,u=l.default.useState(!1),d=u[0],f=u[1],p=l.default.useRef(null),h=l.default.useCallback((function(e){c&&!0!==i&&c(e)}),[c]),g=null!=a;return b.exports.jsxs("li",w({className:j("ui-menuItem",!0===i?"ui-menuItem-disable":null,n),style:o,onMouseEnter:function(){f(!0)},onMouseLeave:function(){f(!1)},ref:p},{children:[b.exports.jsxs("button",w({type:"button",className:"ui-menuItem-btn",onClick:h},{children:[r&&b.exports.jsx("div",w({className:"ui-menuItem-icon"},{children:r})),b.exports.jsx("span",{children:null!=s?s:t}),g&&b.exports.jsx("div",w({className:"ui-menuItem-menuIconContainer"},{children:b.exports.jsx(zr,{className:"ui-menuItem-menuIcon"})}))]})),g&&d&&b.exports.jsx(Jr,w({containerRef:p},{children:a}))]}))};$r.propTypes={className:f.default.string},$r.defaultProps={className:void 0};var en=function(e){var t=e.className,r=e.children,n=e.placement,o=e.open,i=e.anchorPosition,a=e.anchorEl,s=e.onClose,c=l.default.useRef(null);return ir((function(){o&&s&&s()}),[c]),o&&(i||a)?b.exports.jsx(z,w({ref:c,anchorPosition:i,anchorEl:a,placement:n,open:o,overflow:!1,className:"ui-menu-popper"},{children:b.exports.jsx(Jr,w({className:t,onClose:s,onClick:function(e){e&&2===e.button&&(e.preventDefault(),e.stopPropagation())},containerRef:c},{children:r}))})):null};en.propTypes={className:f.default.string},en.defaultProps={className:void 0};var tn=function(e){var t=e.title,r=e.className,n=e.children;return b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("li",w({className:j("ui-group-title",r)},{children:t})),n]})};tn.propTypes={className:f.default.string},tn.defaultProps={className:void 0};var rn=function(e){var t=e.url,r=e.queryParams,n=e.token,o=e.label,i=e.onStart,a=e.onCompleted,s=e.onError;return b.exports.jsx(b.exports.Fragment,{children:b.exports.jsx($r,{label:o,onClick:function(e){return A(void 0,void 0,void 0,(function(){var o,c,l,u,d,f,p,h;return C(this,(function(g){switch(g.label){case 0:i&&i(e),g.label=1;case 1:if(g.trys.push([1,4,,5]),!n)throw new Error("INVALID_TOKEN");if(!t)throw new Error("INVALID_URL");return(o={}).ContentType="application/json",o.Authorization="Bearer ".concat(n),c={method:"get",headers:o},l=new URL(t),r&&Object.keys(r).forEach((function(e){return l.searchParams.append(e,r[e])})),[4,fetch(l,c)];case 2:if(!(u=g.sent())||200!==u.status)throw new Error("An error occured while generating file");return[4,u.blob()];case 3:return(d=g.sent())&&(f=window.URL.createObjectURL(d),(p=document.createElement("a")).href=f,p.download=function(e){var t=e.get("Content-Disposition");if(!t)return null;var r=t.split(";"),n="filename=",o=r.find((function(e){return e.indexOf(n)>-1}));if(o){var i=o.search(n);if(i<0)return null;var a=o.substring(i+9).trim();if(0===a.length)return null;var s=a.substring(0,1);return'"'!==s&&"'"!==s?a:a.length<2||a[a.length-1]!==s?null:a.substring(1,a.length-1)}return null}(u.headers)||"file",p.click(),URL.revokeObjectURL(f),p.remove()),[3,5];case 4:throw h=g.sent(),s&&s(h),h;case 5:return a&&a(),[2]}}))}))}})})};rn.propTypes={label:f.default.string};var nn=function(e){e.open;var t=e.width,r=e.fullWidth,n=e.fullHeight,o=e.className,i=e.children,a=e.onClose,s=l.default.useRef(),c=l.default.useRef(null),u=l.default.useRef(null);l.default.useEffect((function(){return s.current=document.body.style.overflow,document.body.style.overflow="hidden",function(){var e;document.body.style.overflow=null!==(e=s.current)&&void 0!==e?e:"initial"}}),[]);var d=l.default.useCallback((function(){a&&a()}),[a]);return b.exports.jsx(R,w({ref:c},{children:b.exports.jsxs("div",w({ref:function(e){u.current=e},style:{position:"fixed",margin:"0"},role:"dialog",className:j("ui-dialog",o)},{children:[b.exports.jsx("div",{role:"presentation",className:"ui-dialog-overlay",onClick:d}),b.exports.jsx("div",w({className:j("ui-dialog-container",t?"ui-dialog-size-".concat(t):null,!0===r?"ui-dialog-size-fullwidth":null,!0===n?"ui-dialog-size-fullheight":null)},{children:i}))]}))}))};nn.propTypes={className:f.default.string},nn.defaultProps={className:void 0};var on=function(e){var t=e.className,r=e.children;return b.exports.jsx("div",w({className:j("ui-dialog-content",t)},{children:r}))};on.propTypes={className:f.default.string},on.defaultProps={className:void 0};var an=function(e){var t=e.className,r=e.children;return b.exports.jsx("footer",w({className:j("ui-dialog-footer",t)},{children:r}))};an.propTypes={className:f.default.string},an.defaultProps={className:void 0};var sn=function(e){var t=e.className,r=e.children;return b.exports.jsx("header",w({className:j("ui-dialog-header",t)},{children:r}))};sn.propTypes={className:f.default.string},sn.defaultProps={className:void 0};var cn=function(e){var t=e.className,r=e.children,n=e.closeDisable,o=e.onClose,i=l.default.useCallback((function(){o&&!0!==n&&o()}),[o,n]),a=void 0!==o;return b.exports.jsxs("h3",w({className:j("ui-dialog-title",t)},{children:[r,a&&b.exports.jsx("button",w({type:"button",className:j("ui-dialog-close",n?"ui-dialog-close-disable":null),tabIndex:0,onClick:i},{children:b.exports.jsx(Xr,{})}))]}))};cn.propTypes={className:f.default.string,children:f.default.node,closeDisable:f.default.bool},cn.defaultProps={className:void 0,children:void 0};var ln=function(e){var t=e.className,r=e.children;return b.exports.jsx("div",w({className:j("ui-dialog-actions",t)},{children:r}))};ln.propTypes={className:f.default.string,children:f.default.node},ln.defaultProps={className:void 0,children:void 0};var un=function(e){var t=e.title,r=e.ok,n=e.cancel,o=e.children,i=e.className,a=e.onClose,s=l.default.useCallback((function(){a&&a(!1)}),[a]),c=l.default.useCallback((function(){a&&a(!0)}),[a]),u=null!=r?r:"oui",d=null!=n?n:"Annuler";return b.exports.jsxs(nn,w({open:!0,className:j("ui-dialog-box","ui-dialog-confirm",i)},{children:[b.exports.jsx(sn,{children:b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsxs("svg",w({className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.5 438.5"},{children:[b.exports.jsx("path",{d:"M409.1,109.2c-19.6-33.6-46.2-60.2-79.8-79.8C295.7,9.8,259.1,0,219.3,0c-39.8,0-76.5,9.8-110.1,29.4\r\n C75.6,49,49,75.6,29.4,109.2C9.8,142.8,0,179.5,0,219.3c0,39.8,9.8,76.5,29.4,110.1c19.6,33.6,46.2,60.2,79.8,79.8\r\n c33.6,19.6,70.3,29.4,110.1,29.4s76.5-9.8,110.1-29.4c33.6-19.6,60.2-46.2,79.8-79.8c19.6-33.6,29.4-70.3,29.4-110.1\r\n C438.5,179.5,428.7,142.8,409.1,109.2z M387.4,290.2c-9.7,22.6-22.7,42-39,58.2c-16.3,16.3-35.7,29.3-58.2,39\r\n c-22.6,9.7-46.2,14.6-70.9,14.6s-48.4-4.9-70.9-14.6c-22.6-9.7-42-22.7-58.2-39c-16.3-16.3-29.3-35.7-39-58.2\r\n c-9.7-22.6-14.6-46.2-14.6-70.9c0-24.7,4.9-48.4,14.6-70.9c9.7-22.6,22.7-42,39-58.2c16.3-16.3,35.7-29.3,58.2-39\r\n c22.6-9.7,46.2-14.6,70.9-14.6c24.7,0,48.4,4.9,70.9,14.6c22.6,9.7,42,22.7,58.2,39c16.3,16.3,29.3,35.7,39,58.2\r\n c9.7,22.6,14.6,46.2,14.6,70.9C402,244,397.1,267.7,387.4,290.2z"}),b.exports.jsx("path",{d:"M217,294c-14.6,0-26.5,12.2-26.5,26.8c0,14.3,11.5,26.8,26.5,26.8s26.8-12.5,26.8-26.8C243.8,306.2,231.6,294,217,294z"}),b.exports.jsx("path",{d:"M221.5,90.8c-47.1,0-68.7,27.9-68.7,46.7c0,13.6,11.5,19.9,20.9,19.9c18.8,0,11.2-26.8,46.7-26.8c17.4,0,31.4,7.7,31.4,23.7\r\n c0,18.8-19.5,29.6-31,39.4c-10.1,8.7-23.4,23-23.4,53c0,18.1,4.9,23.4,19.2,23.4c17.1,0,20.6-7.7,20.6-14.3\r\n c0-18.1,0.4-28.6,19.5-43.6c9.4-7.3,39-31,39-63.8S266.1,90.8,221.5,90.8z"})]})),b.exports.jsx("h1",w({className:"ui-dialog-title"},{children:t}))]})}),b.exports.jsx(on,{children:o}),b.exports.jsxs(an,{children:[b.exports.jsx($,w({className:"dialog-action-ok dialog-action",onClick:c},{children:u})),b.exports.jsx($,w({className:"dialog-action-close dialog-action",onClick:s},{children:d}))]})]}))};un.propTypes={className:f.default.string},un.defaultProps={className:void 0};var dn=function(e){var t=e.title,r=e.ok,n=e.children,o=e.className,i=e.onClose,a=l.default.useCallback((function(){i&&i(!0)}),[i]),s=null!=r?r:"fermer";return b.exports.jsxs(nn,w({open:!0,className:j("ui-dialog-box","ui-dialog-error",o)},{children:[b.exports.jsx(sn,{children:b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsxs("svg",w({className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 438.533 438.533"},{children:[b.exports.jsx("path",{d:"M409.133,109.203c-19.608-33.592-46.205-60.189-79.798-79.796C295.736,9.801,259.058,0,219.273,0 c-39.781,0-76.47,9.801-110.063,29.407c-33.595,19.604-60.192,46.201-79.8,79.796C9.801,142.8,0,179.489,0,219.267 c0,39.78,9.804,76.463,29.407,110.062c19.607,33.592,46.204,60.189,79.799,79.798c33.597,19.605,70.283,29.407,110.063,29.407 s76.47-9.802,110.065-29.407c33.593-19.602,60.189-46.206,79.795-79.798c19.603-33.596,29.403-70.284,29.403-110.062 C438.533,179.485,428.732,142.795,409.133,109.203z M387.434,290.213c-9.709,22.556-22.696,41.97-38.969,58.245 c-16.271,16.269-35.689,29.26-58.245,38.965c-22.555,9.712-46.202,14.564-70.946,14.564c-24.744,0-48.391-4.853-70.948-14.564 c-22.554-9.705-41.971-22.696-58.245-38.965c-16.269-16.275-29.259-35.687-38.97-58.245 c-9.707-22.552-14.562-46.206-14.562-70.946c0-24.744,4.854-48.391,14.562-70.948c9.707-22.554,22.697-41.968,38.97-58.245 c16.274-16.269,35.691-29.26,58.245-38.97c22.554-9.704,46.205-14.558,70.948-14.558c24.74,0,48.395,4.851,70.946,14.558 c22.556,9.707,41.97,22.698,58.245,38.97c16.272,16.274,29.26,35.688,38.969,58.245c9.709,22.554,14.564,46.201,14.564,70.948 C402.002,244.011,397.143,267.664,387.434,290.213z"}),b.exports.jsx("path",{d:"M284.368,258.668c-19.219-14.086-40.926-21.129-65.095-21.129c-24.172,0-45.871,7.039-65.096,21.129 c-19.224,14.085-32.358,32.641-39.397,55.671c-1.521,4.757-1.143,9.381,1.141,13.847c2.286,4.469,5.898,7.467,10.85,8.993 c4.758,1.526,9.373,1.143,13.846-1.144c4.471-2.285,7.467-5.899,8.991-10.848c4.759-15.235,13.562-27.556,26.409-36.979 c12.847-9.418,27.263-14.127,43.252-14.127c15.987,0,30.412,4.712,43.251,14.127c12.854,9.424,21.655,21.744,26.412,36.979 c1.52,4.948,4.564,8.562,9.134,10.848c4.568,2.286,9.236,2.67,13.989,1.144c4.761-1.526,8.278-4.524,10.564-8.993 c2.286-4.466,2.669-9.09,1.14-13.847C316.729,291.312,303.591,272.75,284.368,258.668z"}),b.exports.jsx("path",{d:"M146.181,182.725c10.085,0,18.699-3.576,25.837-10.709c7.139-7.135,10.708-15.749,10.708-25.837 c0-10.089-3.569-18.699-10.708-25.837s-15.752-10.709-25.837-10.709c-10.088,0-18.702,3.571-25.84,10.709 c-7.135,7.139-10.707,15.749-10.707,25.837c0,10.088,3.568,18.702,10.707,25.837C127.482,179.152,136.093,182.725,146.181,182.725 z"}),b.exports.jsx("path",{d:"M292.359,109.631c-10.089,0-18.706,3.571-25.845,10.709c-7.132,7.139-10.708,15.749-10.708,25.837 c0,10.088,3.576,18.702,10.708,25.837c7.139,7.137,15.756,10.709,25.845,10.709c10.081,0,18.698-3.576,25.837-10.709 c7.139-7.135,10.708-15.749,10.708-25.837c0-10.089-3.569-18.699-10.708-25.837S302.44,109.631,292.359,109.631z"})]})),b.exports.jsx("h1",w({className:"ui-dialog-title"},{children:t}))]})}),b.exports.jsx(on,{children:n}),b.exports.jsx(an,{children:b.exports.jsx($,w({className:"dialog-action-ok dialog-action",onClick:a},{children:s}))})]}))};dn.propTypes={className:f.default.string},dn.defaultProps={className:void 0};var fn=function(e){var t=e.title,r=e.ok,n=e.children,o=e.className,i=e.onClose,a=l.default.useCallback((function(){i&&i(!0)}),[i]),s=null!=r?r:"fermer";return b.exports.jsxs(nn,w({open:!0,className:j("ui-dialog-box","ui-dialog-warning",o)},{children:[b.exports.jsx(sn,{children:b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsxs("svg",w({className:"ui-dialog-icon",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0px",y:"0px",viewBox:"0 0 512 512"},{children:[b.exports.jsx("polygon",{fill:"#FFA418",points:"0,477.703 256,477.703 289.391,256 256,34.297"}),b.exports.jsx("polygon",{fill:"#FF8A1E",points:"256,34.297 256,477.703 512,477.703"}),b.exports.jsx("circle",{fill:"#324860",cx:"256",cy:"405.359",r:"16.696"}),b.exports.jsx("rect",{x:"239.304",y:"177.185",fill:"#324860",width:"33.391",height:"178.087"})]})),b.exports.jsx("h1",w({className:"ui-dialog-title"},{children:t}))]})}),b.exports.jsx(on,{children:n}),b.exports.jsx(an,{children:b.exports.jsx($,w({className:"dialog-action-ok dialog-action",onClick:a},{children:s}))})]}))};fn.propTypes={className:f.default.string},fn.defaultProps={className:void 0},exports.AuthDownloadLink=rn,exports.BarLoader=function(e){var t=e.title,r=e.color,n=e.className,o=e.isComplete;return b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("div",w({className:j("loader",null!=r?"loader-color-".concat(r):"loader-color-blue",!0===o?"completed":"",n)},{children:b.exports.jsx("div",{className:j("loaderBar",null!=r?"loaderBar-color-".concat(r):"loaderBar-color-blue")})})),b.exports.jsx("div",w({className:j("loaderBar-title")},{children:b.exports.jsx("span",{children:t})}))]})},exports.Button=$,exports.Camera=function(t){var r=t.onCapture,n=t.isOffline,o=void 0!==n&&n,i=t.mode,a=void 0===i?"photo":i,s=t.validateText,c=void 0===s?"Valider":s,l=t.resetText,u=void 0===l?"Annuler":l,d=t.isShowOffline,f=void 0!==d&&d;t.isShowVideoButton;var p=y(t,["onCapture","isOffline","mode","validateText","resetText","isShowOffline","isShowVideoButton"]),h=e.useRef(null),g=e.useRef(null),m=e.useRef(new rr),v=e.useState(a),E=v[0],x=v[1],B=e.useState(!1),T=B[0],M=B[1],D=e.useState(!1),F=D[0],k=D[1],I=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)||navigator.maxTouchPoints>0||"ontouchstart"in document.documentElement,q=function(){var t=e.useRef(null),r=e.useState(0),n=r[0],o=r[1],i=function(e){var t=Math.floor(e/86400),r=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),o=e%60;return"".concat(t>0?t.toString().padStart(2,"0").concat(":"):"").concat(r>0?r.toString().padStart(2,"0").concat(":"):"").concat(n.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))},a=e.useMemo((function(){return i(n)}),[n]),s=e.useCallback((function(){o(0),t.current=setInterval((function(){o((function(e){return e+1}))}),1e3)}),[]),c=e.useCallback((function(){t.current&&(clearInterval(t.current),t.current=null)}),[]);return{formatTime:i,startTimer:s,stopTimer:c,formatedTime:a}}(),R=q.formatedTime,N=q.startTimer,j=q.stopTimer,S=e.useState({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null}),G=S[0],P=S[1],V=e.useState({facingMode:"environment",width:{min:200},height:{min:300}});V[0];var Y=V[1];e.useEffect((function(){return Y({facingMode:I?"environment":"user",width:{min:200},height:{min:300}}),function(){Q(),j(),U()}}),[]),e.useEffect((function(){"video"===E&&M(!1)}),[G]);var O=e.useCallback((function(){return A(void 0,void 0,void 0,(function(){var e,t,r,n,o,i,a,s,c,l;return C(this,(function(u){if(e=null===(l=h.current)||void 0===l?void 0:l.getScreenshot()){for(t=atob(e.split(",")[1]),r=new Array(t.length),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);o=new Uint8Array(r),i=new Blob([o],{type:"image/jpeg"}),a="captured_image_".concat(Date.now().toString().slice(-7),".jpg"),s=new File([i],a,{type:"image/jpeg"}),c=URL.createObjectURL(s),P((function(e){return w(w({},e),{imageUrl:c,file:s})}))}return[2]}))}))}),[h,o,r]),L=e.useCallback((function(){if(h.current&&h.current.stream){var e="webm",t="video/".concat(e);MediaRecorder.isTypeSupported("video/mp4")&&(e="mp4",t="video/mp4");var r=new MediaRecorder(h.current.stream,{mimeType:t}),n=[];r.ondataavailable=function(e){e.data.size>0&&n.push(e.data)},r.onstop=function(){return A(void 0,void 0,void 0,(function(){var r,o,i,a;return C(this,(function(s){return r=new Blob(n,{type:t}),o="captured_video_".concat(Date.now(),".").concat(e),i=new File([r],o,{type:t}),a=URL.createObjectURL(i),P((function(e){return w(w({},e),{videoUrl:a,isRecording:!1,file:i})})),j(),[2]}))}))},r.start(),g.current=r,N(),P((function(e){return w(w({},e),{isRecording:!0})}))}}),[h,o,N,j,r]),Q=function(){P({imageUrl:null,videoUrl:null,isRecording:!1,storedFileId:null,file:null})};return b.exports.jsx("div",w({className:"camera-container"},{children:G.imageUrl||G.videoUrl?b.exports.jsxs("div",w({className:"camera-preview camera-screen-animation"},{children:[G.imageUrl&&b.exports.jsx("img",{src:G.imageUrl,alt:"Capturé",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"}}),G.videoUrl&&b.exports.jsxs("video",w({width:"100%",height:"90%",id:"video",style:{height:"90%",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center"},onEnded:function(){return M(!1)}},{children:[b.exports.jsx("source",{src:G.videoUrl,type:"video/mp4"}),b.exports.jsx("source",{src:G.videoUrl,type:"video/webm"}),b.exports.jsx("track",{kind:"captions",src:"",lang:"en",label:"English",default:!0}),"Your browser does not support the video."]})),G.videoUrl&&b.exports.jsx($,w({variant:"contained",className:"video-play-btn",onClick:function(){var e=document.getElementById("video");try{e.paused?e.play():e.pause(),M(!T)}catch(e){}}},{children:T?b.exports.jsx(_t,{}):b.exports.jsx(zt,{})})),b.exports.jsxs("div",w({className:"camera-controls"},{children:[b.exports.jsx($,w({variant:"contained",onClick:function(){return A(void 0,void 0,void 0,(function(){var e;return C(this,(function(t){switch(t.label){case 0:return o?[4,m.current.storeFile(G.file)]:[3,2];case 1:e=t.sent(),r({fileRowId:e,fileStoreName:"capturedFiles"}),t.label=2;case 2:return o||"photo"!==E||r({file:G.file,imageSrc:G.imageUrl}),o||"video"!==E||r({file:G.file,videoSrc:G.videoUrl}),Q(),[2]}}))}))},className:"camera-button camera-button--download"},{children:c})),b.exports.jsx($,w({variant:"outlined",onClick:Q,className:"camera-button camera-button--reset"},{children:u}))]}))]})):b.exports.jsxs("div",w({className:"camera-preview"},{children:[G.isRecording&&b.exports.jsxs("div",w({className:"camera-recording-timer",style:{display:"video"===E?"flex":"none"}},{children:[b.exports.jsx("span",{className:"camera-recording-dot"}),b.exports.jsx("span",{children:R})]})),!G.isRecording&&b.exports.jsx("button",w({type:"button",onClick:function(){return x("photo"===E?"video":"photo"),void Q()},className:"camera-button camera-mode"},{children:b.exports.jsx("span",{children:"photo"===E?"Video":"Photo"})})),I&&!G.isRecording&&b.exports.jsx("button",w({type:"button",onClick:function(){k(!F),Y({facingMode:F?"environment":"user",width:{min:200},height:{min:300}})},className:"camera-button camera-switch"},{children:b.exports.jsx($t,{size:18})})),o&&f&&b.exports.jsx("div",w({className:"camera-offline-mode"},{children:"Offline mode"})),b.exports.jsx(Pt,w({ref:h,videoConstraints:{facingMode:"environment",width:{min:200},height:{min:300}}},p,{style:{height:"90% !important",objectFit:"contain",overflowClipMargin:"content-box",overflow:"clip",aspectRatio:"16/9",display:"flex",justifySelf:"center",margin:"0 auto"},screenshotFormat:"image/jpeg",allowFullScreen:!0})),b.exports.jsxs("div",w({className:"camera-controls"},{children:["photo"===E&&b.exports.jsx($,w({variant:"contained",className:"camera-button camera-button--capture",onClick:O},{children:b.exports.jsx(Ht,{size:28})})),"video"===E&&!G.isRecording&&b.exports.jsx($,w({variant:"contained",onClick:L,className:"camera-button camera-button--record"},{children:b.exports.jsx(er,{size:30})})),"video"===E&&G.isRecording&&b.exports.jsx($,w({variant:"contained",onClick:U,className:"camera-button camera-button--record"},{children:b.exports.jsx(Xt,{size:28})}))]}))]}))}));function U(){g.current&&g.current.stop()}},exports.ChevronDownIcon=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",className:j("ui-icon",t),transform:"rotate(180 0 0)"},{children:b.exports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.2929 8.29289C11.6834 7.90237 12.3166 7.90237 12.7071 8.29289L17.7071 13.2929C18.0976 13.6834 18.0976 14.3166 17.7071 14.7071C17.3166 15.0976 16.6834 15.0976 16.2929 14.7071L12 10.4142L7.70711 14.7071C7.31658 15.0976 6.68342 15.0976 6.29289 14.7071C5.90237 14.3166 5.90237 13.6834 6.29289 13.2929L11.2929 8.29289Z"})}))},exports.ChevronLeftIcon=function(e){var t=e.className;return b.exports.jsx("svg",w({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 7",fill:"none",className:j("ui-icon",t),transform:"rotate(270 0 0)",preserveAspectRatio:"xMidYMid meet"},{children:b.exports.jsx("path",{d:"M5.3,0.3c0.4-0.4,1-0.4,1.4,0l5,5c0.4,0.4,0.4,1,0,1.4c-0.4,0.4-1,0.4-1.4,0L6,2.4L1.7,6.7c-0.4,0.4-1,0.4-1.4,0c-0.4-0.4-0.4-1,0-1.4L5.3,0.3z"})}))},exports.ChevronRightIcon=zr,exports.ConfirmDialog=un,exports.ContextMenu=Hr,exports.CrossIcon=Xr,exports.Dialog=nn,exports.DialogActions=ln,exports.DialogContent=on,exports.DialogFooter=an,exports.DialogHeader=sn,exports.DialogTitle=cn,exports.Divider=_r,exports.DomContainer=R,exports.ErrorDialog=dn,exports.Map=function(t){var r=t.customButtons,n=t.onClose,o=t.onSave,i=y(t,["customButtons","onClose","onSave"]),a=e.useState(i.data?i.data:[]),s=a[0],c=a[1],l=function(){return A(void 0,void 0,void 0,(function(){return C(this,(function(e){return o(s[0].points),[2]}))}))},u=function(){return A(void 0,void 0,void 0,(function(){return C(this,(function(e){return n(),[2]}))}))};return e.useEffect((function(){var e,t,n=null===(e=null==r?void 0:r.saveButton)||void 0===e?void 0:e.addEventListener("click",(function(){l()})),o=null===(t=null==r?void 0:r.cancelButton)||void 0===t?void 0:t.addEventListener("click",(function(){u()}));return function(){var e,t;null===(e=null==r?void 0:r.saveButton)||void 0===e||e.removeEventListener("click",n),null===(t=null==r?void 0:r.cancelButton)||void 0===t||t.removeEventListener("click",o)}}),[s]),b.exports.jsx("div",w({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"90%",height:"400px",margin:"20px"}},{children:b.exports.jsxs(qr.Provider,w({value:{locations:s,setLocations:c}},{children:[b.exports.jsx(Kr,w({},i)),!r&&b.exports.jsxs("div",w({className:"cortex-widget-buttons"},{children:[b.exports.jsx("button",w({className:"cortex-widget-btn cortex-widget-btn-cancel",type:"button",onClick:u},{children:"Cancel"})),b.exports.jsx("button",w({className:"cortex-widget-btn cortex-widget-btn-save",type:"button",onClick:l},{children:"Save"}))]})),";"]}))}))},exports.Menu=Jr,exports.MenuGroup=tn,exports.MenuItem=$r,exports.Popper=z,exports.PopupMenu=en,exports.Scanner=function(t){var r=t.scanConfirmation,n=void 0===r||r,o=t.scanTrackerType,i=void 0===o?"centerText":o,a=y(t,["scanConfirmation","scanTrackerType"]),s=e.useState(!1),c=s[0],l=s[1],u=e.useState(!1),d=u[0],f=u[1],p=e.useState([]),h=p[0],g=p[1],m=function(){l(!1),f(!1)},v=e.useMemo((function(){switch(i){case"outline":return Et;case"boundingBox":return bt;case"centerText":return xt;default:return}}),[i]),A=e.useCallback((function(){m(),a.onScan(h)}),[a,h]),C=e.useCallback((function(e){n&&(l(!0),f(!0),g(e))}),[a]);return b.exports.jsxs(b.exports.Fragment,{children:[b.exports.jsx("div",w({style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",gap:"15px",margin:"20px"}},{children:b.exports.jsx(qt,w({formats:["qr_code","micro_qr_code","rm_qr_code","maxi_code","pdf417","aztec","data_matrix","matrix_codes","dx_film_edge","databar","databar_expanded","codabar","code_39","code_93","code_128","ean_8","ean_13","itf","linear_codes","upc_a","upc_e"],components:{audio:!0,onOff:!0,torch:!0,tracker:v,finder:!1},scanDelay:2e3,allowMultiple:!1},a,{onScan:C,paused:d}))})),b.exports.jsx(Gt,w({open:c,onClose:m,onConfirm:A},null==a?void 0:a.scanConfirmDialog))]})},exports.Selected=function(e){var t=e.title,r=e.data,n=e.onClick;return b.exports.jsx(b.exports.Fragment,{children:b.exports.jsxs("div",w({className:j("ui-selected-params")},{children:[b.exports.jsx("div",w({className:j("ui-selected-title")},{children:t})),b.exports.jsx("div",w({className:j("ui-selected-content")},{children:b.exports.jsx(b.exports.Fragment,{children:Array.isArray(r)&&r.map((function(e,t){return b.exports.jsx(b.exports.Fragment,{children:b.exports.jsx("div",w({className:j("ui-selected-button")},{children:b.exports.jsx("button",w({type:"button",onClick:function(){n(e)},className:1===e.selected?"ui-selected-btn":0===e.selected?"ui-not-selected":"ui-new-selected"},{children:e.name}))}),t)})}))})}))]}))})},exports.Spinner=X,exports.TagInput=function(e){var t=e.tags;e.className;var r=e.suggestions,n=e.disableFilter,o=e.onTextChange,i=e.onChange,a=l.default.useRef(null),s=l.default.useRef(null),c=l.default.useRef(null),u=l.default.useState(""),d=u[0],f=u[1],p=l.default.useState(!1),h=p[0],g=p[1];ir((function(){g(!1)}),[a,s]);var m=l.default.useCallback((function(e){if(i&&Array.isArray(t)){var r=t.findIndex((function(t){return t.id===e.id}));if(!(r<0)){var n=E([],t,!0);n.splice(r,1),i(n)}}}),[t,i]),v=l.default.useCallback((function(e){if(e){var r={id:e.id,label:e.label,value:e.value},n=Array.isArray(t)?E(E([],t,!0),[r],!1):[r];g(!1),i&&i(n),f(""),o&&o("")}}),[t,i,o]),y=l.default.useCallback((function(e){f(e),o&&o(e)}),[o]),A=Array.isArray(t)?t.map((function(e,t){return b.exports.jsx(ar,{tag:e,onDelete:function(){return m(e)}},t)})):[];return b.exports.jsxs("div",w({ref:c,className:"ui-taginput"},{children:[A,b.exports.jsx(sr,{ref:a,value:d,onChange:y,onClick:function(){g(!0)}}),b.exports.jsx(ur,{ref:s,open:h,anchorEl:a,filter:d,tags:t,suggestions:r,disableFilter:n,onSuggestionClick:v})]}))},exports.ToggleButton=function(e){var t=e.selected,r=e.value,n=e.size,o=e.children,i=e.className,a=e.onChange,s=l.default.useCallback((function(){a&&a(r)}),[a,r]);return b.exports.jsx("button",w({type:"button",className:j("ui-toggleBtn",void 0!==n?"ui-toggleBtn-size-".concat(n):"ui-toggleBtn-size-md",!0===t?"ui-toggleBtn-selected":null,i),onClick:s},{children:o}))},exports.Tooltip=function(e){var t=e.children,r=e.title;e.anchorEl;var n=e.enterDelay,o=void 0===n?0:n,i=e.leaveDelay,a=void 0===i?0:i,s=e.className,c=e.disabled,u=l.default.useState(void 0),d=u[0],f=u[1],p=l.default.useState(!1),h=p[0],g=p[1],m=l.default.useState(!0),v=m[0],y=m[1],A=l.default.useState(!1),C=A[0],E=A[1],x=l.default.useRef(),B=l.default.useRef();l.default.useEffect((function(){!0===c&&g(!1)}),[c]);var T,M=function(){g(!0)},D=function(){g(!1)},F=function(e){C||(clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),B.current=setTimeout((function(){D()}),a))},k=function(e){C||(clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),!0!==c&&(x.current=setTimeout((function(){M()}),o)))},I=function(e){E(!0),clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),!0!==c&&(x.current=setTimeout((function(){M()}),2e3))},q=function(e){clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),B.current=setTimeout((function(){D()}),3e3)};if(t){var R=w(w({},t.props),{onFocus:function(e){d||f(e.currentTarget),x.current=setTimeout((function(){M()}),o)},onMouseEnter:function(e){C||(clearTimeout(x.current),clearTimeout(B.current),d||f(e.currentTarget),!0!==c&&(x.current=setTimeout((function(){M()}),o)))},onMouseLeave:F,onMouseOver:k,onTouchStart:I,onTouchEnd:q});T=l.default.cloneElement(t,R)}var N=h||!v;return b.exports.jsxs(b.exports.Fragment,{children:[T,b.exports.jsx(z,w({role:"tooltip",anchorEl:d,open:N,className:j("ui-tooltip",s),onMouseOver:C?void 0:k,onMouseLeave:C?void 0:F,onTouchStart:I,onTouchEnd:q},{children:b.exports.jsx(or,w({trigger:h,onEnter:function(){y(!1)},onExited:function(){y(!0)}},{children:b.exports.jsx("div",w({className:"ui-tooltip-content"},{children:r}))}))}))]})},exports.WarningDialog=fn;
|
|
31
31
|
//# sourceMappingURL=index.js.map
|