!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define(t):e.GeoTask=t()}(this,function(){"use strict";vare=(t.prototype._addListener=function(e,t,i){if(this.emit("newListener",e,t),this.events.has(e)){varr=this.events.get(e);i?r.unshift(t):r.push(t)}elsethis.events.set(e,[t]);varn=this.getMaxListeners();if(0<n&&this.listenerCount(e)>n){varo=newError("Possible EventEmitter memory leak detected.\n "+this.listenerCount(e)+" "+e.toString()+" listeners.\n Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",console.warn(o)}returnthis},t.prototype.addListener=function(e,t){returnthis._addListener(e,t,!1)},t.prototype.emit=function(e){for(vart=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(this.events.has(e)){for(varr=0,n=this.events.get(e).slice();r<n.length;r++){varo=n[r];try{o.apply(this,t)}catch(e){this.emit("error",e)}}return!0}if("error"===e)throw0<t.length?t[0]:Error("Unhandled error.");return!1},t.prototype.eventNames=function(){returnArray.from(this.events.keys())},t.prototype.getMaxListeners=function(){returnthis.maxListeners||t.defaultMaxListeners},t.prototype.listenerCount=function(e){returnthis.events.has(e)?this.events.get(e).length:0},t.prototype._listeners=function(e,t,i){if(!e.events.has(t))return[];varr=e.events.get(t);returni?this.unwrapListeners(r):r.slice(0)},t.prototype.unwrapListeners=function(e){for(vart=newArray(e.length),i=0;i<e.length;i++)t[i]=e[i].listener||e[i];returnt},t.prototype.listeners=function(e){returnthis._listeners(this,e,!0)},t.prototype.rawListeners=function(e){returnthis._listeners(this,e,!1)},t.prototype.off=function(e,t){returnthis.removeListener(e,t)},t.prototype.on=function(e,t){returnthis.addListener(e,t)},t.prototype.once=function(e,t){vari=this.onceWrap(e,t);returnthis.on(e,i),this},t.prototype.onceWrap=function(e,t){functioni(){for(vare=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.context.removeListener(this.eventName,this.rawListener),this.listener.apply(this.context,e)}varr={eventName:e,listener:t,rawListener:i,context:this},n=i.bind(r);return(r.rawListener=n).listener=t,n},t.prototype.prependListener=function(e,t){returnthis._addListener(e,t,!0)},t.prototype.prependOnceListener=function(e,t){vari=this.onceWrap(e,t);returnthis.prependListener(e,i),this},t.prototype.removeAllListeners=function(e){vart=this;if(void0===this.events)returnthis;if(this.events.has(e)){vari=this.events.get(e).slice();this.events.delete(e);for(varr=0,n=i;r<n.length;r++){varo=n[r];this.emit("removeListener",e,o)}}elsethis.eventNames().map(function(e){t.removeAllListeners(e)});returnthis},t.prototype.removeListener=function(e,t){if(this.events.has(e)){vari=this.events.get(e);-1!==i.indexOf(t)&&(i.splice(i.indexOf(t),1),this.emit("removeListener",e,t),0===i.length&&this.events.delete(e))}returnthis},t.prototype.setMaxListeners=function(e){returnthis.maxListeners=e,this},t.defaultMaxListeners=50,t);functiont(){this.events=newMap}vard=(i.jsapi="http://10.201.37.225:8080/smiapi/arcgis",i.jsapiversion4X="4.15",i);functioni(){}vars=d.jsapiversion4X,n="next";functiono(e){if(null===e&&(e=s),e.toString().toLowerCase()===n)returnn;vart=e&&e.match(/^(\d)\.(\d+)/);returnt&&{major:parseInt(t[1],10),minor:parseInt(t[2],10)}}functiona(e){returnvoid0===e&&(e=s),d.jsapi+"/"+e+"/init.js"}functionu(e){vart=document.createElement("link");returnt.rel="stylesheet",t.href=e,t}functionl(e,t){if(t){vari=document.querySelector(t);i.parentNode.insertBefore(e,i)}elsedocument.head.appendChild(e)}functionc(e){returndocument.querySelector('link[href*="'+e+'"]')}functionp(e){return!e||o(e)?function(e){void0===e&&(e=s),null===e&&(e=s);vart=a(e),i=t.substring(0,t.indexOf("init.js")),r=o(e);returnr===n||3!==r.major?i+"esri/themes/light/main.css":i+(r.minor<=10?"js/":"")+"esri/css/esri.css"}(e):e}functionh(e,t){vari=p(e),r=c(i);if(r||l(r=u(i),t),4===function(e){null===e&&(e=s);vart=e&&e.match(/^(\d)\.(\d+)/);returnt&&{major:parseInt(t[1],10),minor:parseInt(t[2],10)}}(e).major){varn=i.substring(0,i.indexOf("esri/themes/"))+"esri/themes/gis/css/gis.css",o=c(n);o||l(o=u(n),t)}returnr}varr={Promise:"undefined"!=typeofwindow?window.Promise:void0},y={};functionf(e,t,i){varr,n,o,s;i&&(o=i,s=function(e){o(e.error||newError("There was an error attempting to load "+n.src)),n.removeEventListener("error",s,!1)},(n=e).addEventListener("error",s,!1),r=s);vara=function(){t(e),e.removeEventListener("load",a,!1),r&&e.removeEventListener("error",r,!1)};e.addEventListener("load",a,!1)}functionv(){returndocument.querySelector("script[data-shsmi]")}functionm(){vare=window.require;returne&&e.on}functionw(e){void0===e&&(e={});varu={};[y,e].forEach(function(e){for(vartine)Object.prototype.hasOwnProperty.call(e,t)&&(u[t]=e[t])});varl=u.version,c=u.url||a(l);returnnewr.Promise(function(e,t){vari,r,n=v();if(n){varo=n.getAttribute("src");o!==c?t(newError("The ArcGIS API for JavaScript is already loaded ("+o+").")):m()?e(n):f(n,e,t)}elseif(m())t(newError("The ArcGIS API for JavaScript is already loaded."));else{vars=u.css;if(s)h(!0===s?l:s,u.insertCssBefore);elseh(null,u.insertCssBefore);if(u.dojoConfig)window.dojoConfig=u.dojoConfig;else{vara={async:!0,packages:[{location:d.jsapi+"/extensions",name:"smiapi"},{location:d.jsapi+"/extensions/geolocation",name:"geolocate",main:"geolocate"}],deps:["@dojo/framework/shim/main"],has:{"esri-promise-compatibility":1,"esri-featurelayer-webgl":1}};window.dojoConfig=a}i=c,(r=document.createElement("script")).type="text/javascript",r.src=i,r.setAttribute("data-shsmi","loading"),f(n=r,function(){n.setAttribute("data-shsmi","loaded"),e(n)},t),document.head.appendChild(n)}})}functiong(t){returnnewr.Promise(function(i,e){varr=window.require.on("error",e);window.require(t,function(){for(vare=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r.remove(),i(e)})})}functionb(e,t){if(void0===t&&(t={}),m())returng(e);vari=v(),r=i&&i.getAttribute("src");return!t.url&&r&&(t.url=r),w(t).then(function(){returng(e)})}varL=(x.prototype.S4=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)},x.prototype.get_uuid=function(){returnthis.S4()+this.S4()+"-"+this.S4()+"-"+this.S4()+"-"+this.S4()+"-"+this.S4()+this.S4()+this.S4()},x);functionx(){this.uuid=this.get_uuid()}varI=(k.maploaded="maploaded",k.zoomchanged="zoomchanged",k.extentchanged="extentchanged",k.centerchanged="centerchanged",k.blur="blur",k.click="click",k.doubleclick="doubleclick",k.drag="drag",k.focus="focus",k.hold="hold",k.keydown="key-down",k.keyup="key-up",k.mousewheel="mouse-wheel",k.pointerdown="pointer-down",k.pointerenter="pointer-enter",k.pointerleave="pointer-leave",k.pointermove="pointer-move",k.pointerup="pointer-up",k.resize="pointer-up",k.popupvisible="popup-visible",k);functionk(){}varq,j,S=(q=function(e,t){return(q=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(e,t){e.__proto__=t}||function(e,t){for(variint)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){functioni(){this.constructor=e}q(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,newi)}),_=function(e,s,a,u){returnnew(a=a||Promise)(function(i,t){functionr(e){try{o(u.next(e))}catch(e){t(e)}}functionn(e){try{o(u.throw(e))}catch(e){t(e)}}functiono(e){vart;e.done?i(e.value):((t=e.value)instanceofa?t:newa(function(e){e(t)})).then(r,n)}o((u=u.apply(e,s||[])).next())})},P=function(i,r){varn,o,s,e,a={label:0,sent:function(){if(1&s[0])throws[1];returns[1]},trys:[],ops:[]};returne={next:t(0),throw:t(1),return:t(2)},"function"==typeofSymbol&&(e[Symbol.iterator]=function(){returnthis}),e;functiont(t){returnfunction(e){returnfunction(t){if(n)thrownewTypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)returns;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case0:case1:s=t;break;case4:returna.label++,{value:t[1],done:!1};case5:a.label++,o=t[1],t=[0];continue;case7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(i,a)}catch(e){t=[6,e],o=0}finally{n=s=0}if(5&t[0])throwt[1];return{value:t[0]?t[1]:void0,done:!0}}([t,e])}}},M=(S(E,j=e),E.prototype.MapService=function(d){return_(this,void0,void0,function(){varc,t=this;returnP(this,function(e){switch(e.label){case0:returnc=null,[4,b(["esri/layers/GraphicsLayer","esri/Graphic","esri/tasks/IdentifyTask","esri/tasks/support/IdentifyParameters"]).then(function(e){vars=e[0],a=e[1],u=e[2],l=e[3];return_(t,void0,void0,function(){vart,i,r,n,o=this;returnP(this,function(e){switch(e.label){case0:returnthis.view?(t=null,d.layerUniqueId&&(i=this.view.map.findLayerById(d.layerUniqueId))&&(t=i.url),(t=t||d.url)?(r=newu(t),(n=newl).tolerance=void0===d.tolerance?20:d.tolerance,n.layerIds=void0===d.layerIds?["*"]:d.layerIds,n.geometry=d.geometry,n.mapExtent=this.view.extent,n.returnGeometry=!0,[4,r.execute(n).then(function(e){if(0<e.results.length&&d.displayed){varr=o.view.map.findLayerById(o.displayedLayerid);void0===r&&(r=news({title:o.displayedLayerid+"查询结果",id:o.displayedLayerid,listMode:"hide"}),o.view.map.add(r)),e.results.map(function(e){vart=null;t="point"===e.feature.geometry.type?d.marksymbol?d.marksymbol:{type:"simple-marker",style:"square",color:[255,0,0,.2],size:"8px",outline:{color:[255,0,0,1],width:1}}:"polyline"===e.feature.geometry.type?d.marksymbol?d.linesymbol:{type:"simple-line",color:[255,0,0,1],width:"2px",style:"short-dot"}:d.polygonsymbol?d.polygonsymbol:{type:"simple-fill",color:[255,255,255,.2],outline:{color:[255,0,0,1],width:"5px"}},e.feature.geometry.spatialReference=o.view.spatialReference;vari=newa({geometry:e.feature.geometry,attributes:e.feature.attributes,symbol:t});r.add(i)})}c=e})]):[2]):[2];case1:returne.sent(),[2]}})})})];case1:returne.sent(),[2,newr.Promise(function(e,t){e(c)})]}})})},E.prototype.FeatureService=function(u){return_(this,void0,void0,function(){vara,t=this;returnP(this,function(e){switch(e.label){case0:returna=null,[4,b(["esri/layers/GraphicsLayer","esri/Graphic","esri/layers/FeatureLayer"]).then(function(e){varo=e[0],s=e[1],r=e[2];return_(t,void0,void0,function(){vart,i,n=this;returnP(this,function(e){switch(e.label){case0:returnthis.view?(u.layerUniqueId&&(t=this.view.map.findLayerById(u.layerUniqueId)),t||u.url&&(t=newr({url:u.url,id:u.layerUniqueId,title:u.layerUniqueId,visible:!1}),this.view.map.add(t)),t?((i=t.createQuery()).geometry=u.geometry,[4,t.queryFeatures(i).then(function(e){if(0<e.features.length){if(u.displayed){varr=n.view.map.findLayerById(n.displayedLayerid);void0===r&&(r=newo({title:n.displayedLayerid+"查询结果",id:n.displayedLayerid,listMode:"hide"}),n.view.map.add(r)),e.features.map(function(e){vart=null;t="point"===e.geometry.type?u.marksymbol?u.marksymbol:{type:"simple-marker",style:"square",color:[255,0,0,.2],size:"8px",outline:{color:[255,0,0,1],width:1}}:"polyline"===e.geometry.type?u.marksymbol?u.linesymbol:{type:"simple-line",color:[255,0,0,1],width:"2px",style:"short-dot"}:u.polygonsymbol?u.polygonsymbol:{type:"simple-fill",color:[255,255,255,.2],outline:{color:[255,0,0,1],width:"5px"}},e.geometry.spatialReference=n.view.spatialReference;vari=news({geometry:e.geometry,attributes:e.attributes,symbol:t});r.add(i)})}a=e}})]):[2]):[2];case1:returne.sent(),[2]}})})})];case1:returne.sent(),[2,newr.Promise(function(e,t){e(a)})]}})})},E.prototype.SceneService=function(o){return_(this,void0,void0,function(){varn,t=this;returnP(this,function(e){switch(e.label){case0:returnn=null,[4,b(["esri/layers/GraphicsLayer","esri/Graphic","esri/layers/SceneLayer"]).then(function(e){e[0],e[1];varr=e[2];return_(t,void0,void0,function(){vart,i;returnP(this,function(e){switch(e.label){case0:returnthis.view?(o.layerUniqueId&&(t=this.view.map.findLayerById(o.layerUniqueId)),t||o.url&&(t=newr({url:o.url,id:o.layerUniqueId,title:o.layerUniqueId,visible:!1}),this.view.map.add(t)),t?((i=t.createQuery()).geometry=o.geometry,[4,t.queryFeatures(i).then(function(e){0<e.features.length&&(console.log(e.features),n=e)})]):[2]):[2];case1:returne.sent(),[2]}})})})];case1:returne.sent(),[2,newr.Promise(function(e,t){e(n)})]}})})},E.prototype.remove=function(){vare=this.view.map.findLayerById(this.displayedLayerid);e&&this.view.map.remove(e)},E.prototype.show=function(){vare=this.view.map.findLayerById(this.displayedLayerid);e&&(e.visible=!0)},E.prototype.hide=function(){vare=this.view.map.findLayerById(this.displayedLayerid);e&&(e.visible=!1)},E.prototype.init=function(t){return_(this,void0,void0,function(){varr=this;returnP(this,function(e){returnthis.displayedLayerid=(newL).uuid,this.view=t,this.view.on(I.click,function(i){r.view.hitTest(i).then(function(t){return_(r,void0,void0,function(){returnP(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.click,t.results[0].graphic,i.mapPoint),[2]})})})}),this.view.on(I.pointermove,function(i){r.view.hitTest(i).then(function(t){return_(r,void0,void0,function(){returnP(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.pointermove,t.results[0].graphic,this.view.toMap({x:i.x,y:i.y})),[2]})})})}),this.view.on(I.pointerenter,function(i){r.view.hitTest(i).then(function(t){return_(r,void0,void0,function(){returnP(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.pointerenter,t.results[0].graphic,this.view.toMap({x:i.x,y:i.y})),[2]})})})}),this.view.on(I.pointerleave,function(i){r.view.hitTest(i).then(function(t){return_(r,void0,void0,function(){returnP(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.pointerleave,t.results[0].graphic,this.view.toMap({x:i.x,y:i.y})),[2]})})})}),this.view.on(I.doubleclick,function(i){r.view.hitTest(i).then(function(t){return_(r,void0,void0,function(){returnP(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.doubleclick,t.results[0].graphic,i.mapPoint),[2]})})})}),[2]})})},E);functionE(e){vart=j.call(this)||this;returnt.view=null,t.displayedLayerid="",t.init(e),t}varB=(T.shqxboundary="qx_boundary",T.shjdboundary="jd_boundary",T.shjwhboundary="jwh_boundary",T);functionT(){}varU,G,O=(U=function(e,t){return(U=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(e,t){e.__proto__=t}||function(e,t){for(variint)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){functioni(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,newi)}),A=function(e,s,a,u){returnnew(a=a||Promise)(function(i,t){functionr(e){try{o(u.next(e))}catch(e){t(e)}}functionn(e){try{o(u.throw(e))}catch(e){t(e)}}functiono(e){vart;e.done?i(e.value):((t=e.value)instanceofa?t:newa(function(e){e(t)})).then(r,n)}o((u=u.apply(e,s||[])).next())})},C=function(i,r){varn,o,s,e,a={label:0,sent:function(){if(1&s[0])throws[1];returns[1]},trys:[],ops:[]};returne={next:t(0),throw:t(1),return:t(2)},"function"==typeofSymbol&&(e[Symbol.iterator]=function(){returnthis}),e;functiont(t){returnfunction(e){returnfunction(t){if(n)thrownewTypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(s=2&t[0]?o.return:t[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,t[1])).done)returns;switch(o=0,s&&(t=[2&t[0],s.value]),t[0]){case0:case1:s=t;break;case4:returna.label++,{value:t[1],done:!1};case5:a.label++,o=t[1],t=[0];continue;case7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=r.call(i,a)}catch(e){t=[6,e],o=0}finally{n=s=0}if(5&t[0])throwt[1];return{value:t[0]?t[1]:void0,done:!0}}([t,e])}}},F=(O(R,G=e),R.prototype.featureLayer=function(u){returnA(this,void0,void0,function(){vara,t=this;returnC(this,function(e){switch(e.label){case0:returna=null,[4,b(["esri/layers/GraphicsLayer","esri/Graphic","esri/layers/FeatureLayer"]).then(function(e){varo=e[0],s=e[1],r=e[2];returnA(t,void0,void0,function(){vart,i,n=this;returnC(this,function(e){switch(e.label){case0:returnthis.view?(u.layerUniqueId&&(t=this.view.map.findLayerById(u.layerUniqueId)),t||u.url&&(t=newr({url:u.url,id:u.layerUniqueId,title:u.layerUniqueId,visible:!1}),this.view.map.add(t)),t?(i=t.createQuery(),u.geometry&&(i.geometry=u.geometry),u.queryDefinition&&(i.where=u.queryDefinition),i.outFields=void0===u.outFields?["*"]:u.outFields,[4,t.queryFeatures(i).then(function(e){if(0<e.features.length){vari,r=n.view.map.findLayerById(n.displayedLayerid);void0===r&&(r=newo({title:n.displayedLayerid+"查询结果",id:n.displayedLayerid,listMode:"hide"}),n.view.map.add(r)),u.displayed&&(u.symbol?i=u.symbol:"polygon"===u.type?i={type:"simple-fill",color:[255,255,255,0],outline:{color:[255,0,0,1],width:"5px"}}:"polyline"===u.type?i={type:"simple-line",color:[255,0,0,0],width:"2px",style:"short-dot"}:"point"===u.type&&(i={type:"simple-marker",style:"square",color:[255,0,0,0],size:"8px",outline:{color:[255,0,0,0],width:1}}),e.features.map(function(e){e.geometry.spatialReference=n.view.spatialReference;vart=news({geometry:e.geometry,attributes:e.attributes,symbol:i});r.add(t)})),a=e}})]):[2]):[2];case1:returne.sent(),[2]}})})})];case1:returne.sent(),[2,newr.Promise(function(e,t){e(a)})]}})})},R.prototype.mapImageLayer=function(p){returnA(this,void0,void0,function(){vard,t=this;returnC(this,function(e){switch(e.label){case0:returnd=null,[4,b(["esri/layers/GraphicsLayer","esri/Graphic","esri/tasks/QueryTask","esri/tasks/support/Query"]).then(function(e){vara=e[0],u=e[1],l=e[2],c=e[3];returnA(t,void0,void0,function(){vart,i,r,n,o,s=this;returnC(this,function(e){switch(e.label){case0:returnp.layerUniqueId&&(i=this.view.map.findLayerById(p.layerUniqueId))&&(t=i.url),(t=t||p.url)?(r=void0===p.layerId?0:p.layerId,n=newl({url:t+"/"+r}),(o=newc).returnGeometry=!0,p.queryDefinition&&(o.where=p.queryDefinition),o.outFields=void0===p.outFields?["*"]:p.outFields,p.geometry&&(o.geometry=p.geometry),[4,n.execute(o).then(function(e){if(0<e.features.length){vari,r=s.view.map.findLayerById(s.displayedLayerid);void0===r&&(r=newa({title:s.displayedLayerid+"查询结果",id:s.displayedLayerid,listMode:"hide"}),s.view.map.add(r)),p.displayed&&(p.symbol?i=p.symbol:"polygon"===p.type?i={type:"simple-fill",color:[255,255,255,0],outline:{color:[255,0,0,1],width:"5px"}}:"polyline"===p.type?i={type:"simple-line",color:[255,0,0,0],width:"2px",style:"short-dot"}:"point"===p.type&&(i={type:"simple-marker",style:"square",color:[255,0,0,0],size:"8px",outline:{color:[255,0,0,0],width:1}}),e.features.map(function(e){e.geometry.spatialReference=s.view.spatialReference;vart=newu({geometry:e.geometry,attributes:e.attributes,symbol:i});r.add(t)})),d=e}})]):[2];case1:returne.sent(),[2]}})})})];case1:returne.sent(),[2,newr.Promise(function(e,t){e(d)})]}})})},R.prototype.remove=function(){vare=this.view.map.findLayerById(this.displayedLayerid);e&&this.view.map.remove(e)},R.prototype.show=function(){vare=this.view.map.findLayerById(this.displayedLayerid);e&&(e.visible=!0)},R.prototype.hide=function(){vare=this.view.map.findLayerById(this.displayedLayerid);e&&(e.visible=!1)},R.prototype.init=function(t){returnA(this,void0,void0,function(){varr=this;returnC(this,function(e){returnthis.displayedLayerid=(newL).uuid,this.view=t,this.view.on(I.click,function(i){r.view.hitTest(i).then(function(t){returnA(r,void0,void0,function(){returnC(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.click,t.results[0].graphic,i.mapPoint),[2]})})})}),this.view.on(I.pointermove,function(i){r.view.hitTest(i).then(function(t){returnA(r,void0,void0,function(){returnC(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.pointermove,t.results[0].graphic,this.view.toMap({x:i.x,y:i.y})),[2]})})})}),this.view.on(I.pointerenter,function(i){r.view.hitTest(i).then(function(t){returnA(r,void0,void0,function(){returnC(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.pointerenter,t.results[0].graphic,this.view.toMap({x:i.x,y:i.y})),[2]})})})}),this.view.on(I.pointerleave,function(i){r.view.hitTest(i).then(function(t){returnA(r,void0,void0,function(){returnC(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.pointerleave,t.results[0].graphic,this.view.toMap({x:i.x,y:i.y})),[2]})})})}),this.view.on(I.doubleclick,function(i){r.view.hitTest(i).then(function(t){returnA(r,void0,void0,function(){returnC(this,function(e){return0<t.results.length&&t.results[0].graphic.layer.id===this.displayedLayerid&&this.emit(I.doubleclick,t.results[0].graphic,i.mapPoint),[2]})})})}),[2]})})},R);functionR(e){vart=G.call(this)||this;returnt.view=null,t.displayedLayerid="",t.init(e),t}return{load:b,Layers:B,Identify:M,Query:F}});