diff --git a/console/src/main/resources/static/console-fe/src/components/ShowCodeing/ShowServiceCodeing.js b/console/src/main/resources/static/console-fe/src/components/ShowCodeing/ShowServiceCodeing.js
index 8f53e55b6..a0e07951c 100644
--- a/console/src/main/resources/static/console-fe/src/components/ShowCodeing/ShowServiceCodeing.js
+++ b/console/src/main/resources/static/console-fe/src/components/ShowCodeing/ShowServiceCodeing.js
@@ -19,6 +19,7 @@ import { ConfigProvider, Dialog, Loading, Tab } from '@alifd/next';
import './index.scss';
const TabPane = Tab.Item;
+
/**
*
* Service Registration Sample Code Show Window
@@ -46,55 +47,206 @@ class ShowServiceCodeing extends React.Component {
this.pythonCode = 'TODO';
this.record = {};
this.springCode = 'TODO';
- this.sprigboot_code = '/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n' +
- '* pom.xml\n' +
- '\t\n' +
- '\t com.alibaba.boot\n' +
- '\t nacos-discovery-spring-boot-starter\n' +
- '\t ${latest.version}\n' +
- '\t\n' +
- '*/\n' +
- '/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n' +
- '* application.properties\n' +
- ' nacos.discovery.server-addr=127.0.0.1:8848\n' +
- '*/ \n' +
- '// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n' +
- '\n' +
- 'package com.alibaba.nacos.example.spring.boot.controller;\n' +
- '\n' +
- 'import com.alibaba.nacos.api.annotation.NacosInjected;\n' +
- 'import com.alibaba.nacos.api.exception.NacosException;\n' +
- 'import com.alibaba.nacos.api.naming.NamingService;\n' +
- 'import com.alibaba.nacos.api.naming.pojo.Instance;\n' +
- 'import org.springframework.stereotype.Controller;\n' +
- 'import org.springframework.web.bind.annotation.RequestMapping;\n' +
- 'import org.springframework.web.bind.annotation.RequestParam;\n' +
- 'import org.springframework.web.bind.annotation.ResponseBody;\n' +
- '\n' +
- 'import java.util.List;\n' +
- '\n' +
- 'import static org.springframework.web.bind.annotation.RequestMethod.GET;\n' +
- '\n' +
- '@Controller\n' +
- '@RequestMapping("discovery")\n' +
- 'public class DiscoveryController {\n' +
- '\n' +
- ' @NacosInjected\n' +
- ' private NamingService namingService;\n' +
- '\n' +
- ' @RequestMapping(value = "/get", method = GET)\n' +
- ' @ResponseBody\n' +
- ' public List get(@RequestParam String serviceName) throws NacosException {\n' +
- ' return namingService.getAllInstances(serviceName);\n' +
- ' }\n' +
- '}';
- this.sprigcloud_code = `/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/
+ this.sprigbootCode = 'TODO';
+ this.sprigcloudCode = 'TODO';
+ }
+
+ componentDidMount() {
+ }
+
+ openLoading() {
+ this.setState({
+ loading: true,
+ });
+ }
+
+ closeLoading() {
+ this.setState({
+ loading: false,
+ });
+ }
+
+ getData() {
+ const namespace = getParams('namespace'); // 获取ak,sk
+ const obj = {
+ group: this.record.group || '',
+ dataId: this.record.dataId || '',
+ namespace,
+ inEdas: window.globalConfig.isParentEdas(),
+ };
+ this.defaultCode = this.getJavaCode(obj);
+ this.createCodeMirror('text/x-java', this.defaultCode);
+ this.springCode = this.getSpringCode(obj);
+ this.sprigbootCode = this.getSpringBootCode(obj);
+ this.sprigcloudCode = this.getSpringCloudCode(obj);
+ this.nodejsCode = this.getNodejsCode(obj);
+ this.cppCode = this.getCppCode(obj);
+ this.shellCode = this.getShellCode(obj);
+ this.pythonCode = this.getPythonCode(obj);
+ this.forceUpdate();
+ }
+
+ getJavaCode(data) {
+ return `/* Refer to document: https://github.com/alibaba/nacos/blob/master/example/src/main/java/com/alibaba/nacos/example
* pom.xml
-\t
-\t org.springframework.cloud
-\t spring-cloud-starter-alibaba-nacos-discovery
-\t \${latest.version}
-\t
+
+ com.alibaba.nacos
+ nacos-client
+ $\{latest.version}
+
+*/
+package com.alibaba.nacos.example;
+
+import java.util.Properties;
+
+import com.alibaba.nacos.api.exception.NacosException;
+import com.alibaba.nacos.api.naming.NamingFactory;
+import com.alibaba.nacos.api.naming.NamingService;
+import com.alibaba.nacos.api.naming.listener.Event;
+import com.alibaba.nacos.api.naming.listener.EventListener;
+import com.alibaba.nacos.api.naming.listener.NamingEvent;
+
+/**
+ * @author nkorange
+ */
+public class NamingExample {
+
+ public static void main(String[] args) throws NacosException {
+
+ Properties properties = new Properties();
+ properties.setProperty("serverAddr", System.getProperty("serverAddr"));
+ properties.setProperty("namespace", System.getProperty("namespace"));
+
+ NamingService naming = NamingFactory.createNamingService(properties);
+
+ naming.registerInstance("${this.record.name}", "11.11.11.11", 8888, "TEST1");
+
+ naming.registerInstance("${this.record.name}", "2.2.2.2", 9999, "DEFAULT");
+
+ System.out.println(naming.getAllInstances("${this.record.name}"));
+
+ naming.deregisterInstance("${this.record.name}", "2.2.2.2", 9999, "DEFAULT");
+
+ System.out.println(naming.getAllInstances("${this.record.name}"));
+
+ naming.subscribe("${this.record.name}", new EventListener() {
+ @Override
+ public void onEvent(Event event) {
+ System.out.println(((NamingEvent)event).getServiceName());
+ System.out.println(((NamingEvent)event).getInstances());
+ }
+ });
+ }
+}`;
+ }
+
+ getSpringCode(data) {
+ return `/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example
+* pom.xml
+
+ com.alibaba.nacos
+ nacos-spring-context
+ \${latest.version}
+
+*/
+
+// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring
+package com.alibaba.nacos.example.spring;
+
+import com.alibaba.nacos.api.annotation.NacosProperties;
+import com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))
+public class NacosConfiguration {
+
+}
+
+// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller
+package com.alibaba.nacos.example.spring.controller;
+
+import com.alibaba.nacos.api.annotation.NacosInjected;
+import com.alibaba.nacos.api.exception.NacosException;
+import com.alibaba.nacos.api.naming.NamingService;
+import com.alibaba.nacos.api.naming.pojo.Instance;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+
+import static org.springframework.web.bind.annotation.RequestMethod.GET;
+
+@Controller
+@RequestMapping("discovery")
+public class DiscoveryController {
+
+ @NacosInjected
+ private NamingService namingService;
+
+ @RequestMapping(value = "/get", method = GET)
+ @ResponseBody
+ public List get(@RequestParam String serviceName) throws NacosException {
+ return namingService.getAllInstances(serviceName);
+ }
+}`;
+ }
+
+ getSpringBootCode(data) {
+ return `/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example
+* pom.xml
+
+ com.alibaba.boot
+ nacos-discovery-spring-boot-starter
+ \${latest.version}
+
+*/
+/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources
+* application.properties
+ nacos.discovery.server-addr=127.0.0.1:8848
+*/
+// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller
+
+package com.alibaba.nacos.example.spring.boot.controller;
+
+import com.alibaba.nacos.api.annotation.NacosInjected;
+import com.alibaba.nacos.api.exception.NacosException;
+import com.alibaba.nacos.api.naming.NamingService;
+import com.alibaba.nacos.api.naming.pojo.Instance;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.List;
+
+import static org.springframework.web.bind.annotation.RequestMethod.GET;
+
+@Controller
+@RequestMapping("discovery")
+public class DiscoveryController {
+
+ @NacosInjected
+ private NamingService namingService;
+
+ @RequestMapping(value = "/get", method = GET)
+ @ResponseBody
+ public List get(@RequestParam String serviceName) throws NacosException {
+ return namingService.getAllInstances(serviceName);
+ }
+}`;
+ }
+
+ getSpringCloudCode(data) {
+ return `/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/
+* pom.xml
+
+ org.springframework.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+ \${latest.version}
+
*/
// nacos-spring-cloud-provider-example
@@ -102,7 +254,7 @@ class ShowServiceCodeing extends React.Component {
/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources
* application.properties
server.port=18080
-spring.application.name=service-provider
+spring.application.name=${this.record.name}
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
*/
@@ -121,27 +273,27 @@ import org.springframework.web.bind.annotation.RestController;
* @author xiaojing
*/
@SpringBootApplication
-@EnableDiscoveryClient
+@EnableDiscoveryClient
public class NacosProviderApplication {
-\tpublic static void main(String[] args) {
-\t\tSpringApplication.run(NacosProviderApplication.class, args);
-\t}
+ public static void main(String[] args) {
+ SpringApplication.run(NacosProviderApplication.class, args);
+}
-\t@RestController
-\tclass EchoController {
-\t\t@RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)
-\t\tpublic String echo(@PathVariable String string) {
-\t\t\treturn "Hello Nacos Discovery " + string;
-\t\t}
-\t}
+ @RestController
+ class EchoController {
+ @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)
+ public String echo(@PathVariable String string) {
+ return "Hello Nacos Discovery " + string;
+ }
+ }
}
// nacos-spring-cloud-consumer-example
/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources
* application.properties
-spring.application.name=service-consumer
+spring.application.name=micro-service-oauth2
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
*/
@@ -193,146 +345,6 @@ public class NacosConsumerApplication {
}`;
}
- componentDidMount() {}
-
- openLoading() {
- this.setState({
- loading: true,
- });
- }
-
- closeLoading() {
- this.setState({
- loading: false,
- });
- }
-
- getData() {
- const namespace = getParams('namespace'); // 获取ak,sk
- const obj = {
- group: this.record.group || '',
- dataId: this.record.dataId || '',
- namespace,
- inEdas: window.globalConfig.isParentEdas(),
- };
- this.defaultCode = this.getJavaCode(obj);
- this.createCodeMirror('text/x-java', this.defaultCode);
- this.springCode = this.getSpringCode(obj);
- this.nodejsCode = this.getNodejsCode(obj);
- this.cppCode = this.getCppCode(obj);
- this.shellCode = this.getShellCode(obj);
- this.pythonCode = this.getPythonCode(obj);
- this.forceUpdate();
- }
-
- getJavaCode(data) {
- return '/* Refer to document: https://github.com/alibaba/nacos/blob/master/example/src/main/java/com/alibaba/nacos/example\n' +
- '* pom.xml\n' +
- ' \n' +
- ' com.alibaba.nacos\n' +
- ' nacos-client\n' +
- ' ${latest.version}\n' +
- ' \n' +
- '*/\n' +
- 'package com.alibaba.nacos.example;\n' +
- '\n' +
- 'import java.util.Properties;\n' +
- '\n' +
- 'import com.alibaba.nacos.api.exception.NacosException;\n' +
- 'import com.alibaba.nacos.api.naming.NamingFactory;\n' +
- 'import com.alibaba.nacos.api.naming.NamingService;\n' +
- 'import com.alibaba.nacos.api.naming.listener.Event;\n' +
- 'import com.alibaba.nacos.api.naming.listener.EventListener;\n' +
- 'import com.alibaba.nacos.api.naming.listener.NamingEvent;\n' +
- '\n' +
- '/**\n' +
- ' * @author nkorange\n' +
- ' */\n' +
- 'public class NamingExample {\n' +
- '\n' +
- ' public static void main(String[] args) throws NacosException {\n' +
- '\n' +
- ' Properties properties = new Properties();\n' +
- ' properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n' +
- ' properties.setProperty("namespace", System.getProperty("namespace"));\n' +
- '\n' +
- ' NamingService naming = NamingFactory.createNamingService(properties);\n' +
- '\n' +
- ' naming.registerInstance("nacos.test.3", "11.11.11.11", 8888, "TEST1");\n' +
- '\n' +
- ' naming.registerInstance("nacos.test.3", "2.2.2.2", 9999, "DEFAULT");\n' +
- '\n' +
- ' System.out.println(naming.getAllInstances("nacos.test.3"));\n' +
- '\n' +
- ' naming.deregisterInstance("nacos.test.3", "2.2.2.2", 9999, "DEFAULT");\n' +
- '\n' +
- ' System.out.println(naming.getAllInstances("nacos.test.3"));\n' +
- '\n' +
- ' naming.subscribe("nacos.test.3", new EventListener() {\n' +
- ' @Override\n' +
- ' public void onEvent(Event event) {\n' +
- ' System.out.println(((NamingEvent)event).getServiceName());\n' +
- ' System.out.println(((NamingEvent)event).getInstances());\n' +
- ' }\n' +
- ' });\n' +
- ' }\n' +
- '}';
- }
-
- getSpringCode(data) {
- return `/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example
-* pom.xml
-\t
- com.alibaba.nacos
- nacos-spring-context
- \${latest.version}
-
-*/
-
-// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring
-package com.alibaba.nacos.example.spring;
-
-import com.alibaba.nacos.api.annotation.NacosProperties;
-import com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;
-import org.springframework.context.annotation.Configuration;
-
-@Configuration
-@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))
-public class NacosConfiguration {
-
-}
-
-// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller
-package com.alibaba.nacos.example.spring.controller;
-
-import com.alibaba.nacos.api.annotation.NacosInjected;
-import com.alibaba.nacos.api.exception.NacosException;
-import com.alibaba.nacos.api.naming.NamingService;
-import com.alibaba.nacos.api.naming.pojo.Instance;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
-
-import java.util.List;
-
-import static org.springframework.web.bind.annotation.RequestMethod.GET;
-
-@Controller
-@RequestMapping("discovery")
-public class DiscoveryController {
-
- @NacosInjected
- private NamingService namingService;
-
- @RequestMapping(value = "/get", method = GET)
- @ResponseBody
- public List get(@RequestParam String serviceName) throws NacosException {
- return namingService.getAllInstances(serviceName);
- }
-}`;
- }
-
getNodejsCode(data) {
return 'TODO';
}
@@ -433,13 +445,13 @@ public class DiscoveryController {
e.clientHeight&&0a.length&&a.every(function(e,t){return e===n[t]})},k.prototype.handleOpen=function(t,e,n,a){var o=this,r=void 0,i=this.props,s=i.mode,l=i.openMode,u=this.state.openKeys,c=u.indexOf(t);e&&-1===c?"inline"===s?"single"===l?(r=u.filter(function(e){return!o.isSibling(o.k2n[t].pos,o.k2n[e].pos)})).push(t):r=u.concat(t):(r=u.filter(function(e){return o.isAncestor(o.k2n[t].pos,o.k2n[e].pos)})).push(t):!e&&-1this.popupNode.offsetWidth&&y(this.popupNode,"width",f.offsetWidth+"px")}"outside"!==u||"hoz"===l&&1===n||(y(this.popupNode,"height",p.offsetHeight+"px"),y(this.popupNode,"overflow-y","scroll"));var h=this.popupProps;h.onOpen&&h.onOpen()},j.prototype.handlePopupClose=function(){var e=this.props.root.popupNodes,t=e.indexOf(this.popupNode);-1e.slidesToShow&&(t=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0){var r=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow;if(e.rtl)r=(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow;r&&(o=e.slideIndex>e.slideCount?(t=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(t=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))}}else e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(t=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth);if(e.centerMode&&(e.infinite?t+=e.slideWidth*Math.floor(e.slidesToShow/2):t=e.slideWidth*Math.floor(e.slidesToShow/2)),n=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+t,!0===e.variableWidth){var i=void 0;n=(a=e.slideCount<=e.slidesToShow||!1===e.infinite?s.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(i=e.slideIndex+e.slidesToShow,s.default.findDOMNode(e.trackRef).childNodes[i]))?-1*a.offsetLeft:0,!0===e.centerMode&&(a=!1===e.infinite?s.default.findDOMNode(e.trackRef).children[e.slideIndex]:s.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])&&(n=-1*a.offsetLeft+(e.listWidth-a.offsetWidth)/2)}return n}},function(e,t,n){"use strict";n(596)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.routerMiddleware=t.routerActions=t.goForward=t.goBack=t.go=t.replace=t.push=t.CALL_HISTORY_METHOD=t.routerReducer=t.LOCATION_CHANGE=t.syncHistoryWithStore=void 0;var a=n(295);Object.defineProperty(t,"LOCATION_CHANGE",{enumerable:!0,get:function(){return a.LOCATION_CHANGE}}),Object.defineProperty(t,"routerReducer",{enumerable:!0,get:function(){return a.routerReducer}});var o=n(296);Object.defineProperty(t,"CALL_HISTORY_METHOD",{enumerable:!0,get:function(){return o.CALL_HISTORY_METHOD}}),Object.defineProperty(t,"push",{enumerable:!0,get:function(){return o.push}}),Object.defineProperty(t,"replace",{enumerable:!0,get:function(){return o.replace}}),Object.defineProperty(t,"go",{enumerable:!0,get:function(){return o.go}}),Object.defineProperty(t,"goBack",{enumerable:!0,get:function(){return o.goBack}}),Object.defineProperty(t,"goForward",{enumerable:!0,get:function(){return o.goForward}}),Object.defineProperty(t,"routerActions",{enumerable:!0,get:function(){return o.routerActions}});var r=s(n(428)),i=s(n(429));function s(e){return e&&e.__esModule?e:{default:e}}t.syncHistoryWithStore=r.default,t.routerMiddleware=i.default},function(e,t,n){"use strict";function a(o){return function(e){var n=e.dispatch,a=e.getState;return function(t){return function(e){return"function"==typeof e?e(n,a,o):t(e)}}}}var o=a();o.withExtraArgument=a,t.a=o},function(e,t,n){"use strict";var a=n(142),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},d={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function p(e){return a.isMemo(e)?r:i[e.$$typeof]||o}i[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var f=Object.defineProperty,h=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,_=Object.prototype;e.exports=function e(t,n,a){if("string"==typeof n)return t;if(_){var o=y(n);o&&o!==_&&e(t,o,a)}var r=h(n);m&&(r=r.concat(m(n)));for(var i=p(t),s=p(n),l=0;l\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n * \n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("recieve:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\t\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\t\t\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=X.a.createElement("div",null);return X.a.createElement("div",null,X.a.createElement(R.a,{title:t.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:n,onClose:this.closeDialog.bind(this)},X.a.createElement("div",{style:{height:500}},X.a.createElement(g.a,{tip:t.loading,style:{width:"100%"},visible:this.state.loading},X.a.createElement(re.a,{shape:"text",style:{height:40,paddingBottom:10}},X.a.createElement(ie,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),X.a.createElement(ie,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),X.a.createElement(ie,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),X.a.createElement(ie,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),X.a.createElement(ie,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),X.a.createElement(ie,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),X.a.createElement(ie,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),X.a.createElement("div",{ref:"codepreview"})))))}}]),n}(X.a.Component),o.displayName="ShowCodeing",a=r))||a,le=(n(78),n(39)),ue=n.n(le),ce=(n(583),ue.a.Row),de=ue.a.Col,pe=(0,G.a.config)((l=s=function(e){function n(e){var t;return Object(F.a)(this,n),(t=Object(V.a)(this,Object(B.a)(n).call(this,e))).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},t}return Object(U.a)(n,e),Object(W.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale,t=void 0===e?{}:e;this.setState({title:t.confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=X.a.createElement("div",{style:{textAlign:"right"}},X.a.createElement(b.a,{type:"primary",onClick:this.closeDialog.bind(this)},t.determine));return X.a.createElement("div",null,X.a.createElement(R.a,{visible:this.state.visible,footer:n,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:t.deletetitle},X.a.createElement("div",null,X.a.createElement(ce,null,X.a.createElement(de,{span:"4",style:{paddingTop:16}},X.a.createElement(j.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),X.a.createElement(de,{span:"20"},X.a.createElement("div",null,X.a.createElement("h3",null,this.state.isok?t.deletedSuccessfully:t.deleteFailed),X.a.createElement("p",null,X.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID:"),X.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),X.a.createElement("p",null,X.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group:"),X.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":X.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(X.a.Component),s.displayName="DeleteDialog",i=l))||i,fe=(n(584),n(348)),he=n.n(fe),me=(0,G.a.config)((d=c=function(e){function t(){return Object(F.a)(this,t),Object(V.a)(this,Object(B.a)(t).apply(this,arguments))}return Object(U.a)(t,e),Object(W.a)(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=void 0===t?{}:t,a=e.height,o=e.locale,r=void 0===o?{}:o;return X.a.createElement("div",null,"notice"===n.modeType?X.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},X.a.createElement(he.a,{style:{marginBottom:1l?P.a.createElement($.a,{className:"pagination",total:s.count,pageSize:l,onChange:function(e){return a.onChangePage(e)}}):null,P.a.createElement(Z,{ref:this.editInstanceDialog,serviceName:r,clusterName:n,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},getInstanceList:function(){return a.getInstanceList()}})):null}}]),n}(P.a.Component),c.displayName="InstanceTable",u=d))||u,te=(n(597),Y.a.Item),ne={labelCol:{fixedSpan:10},wrapperCol:{span:14}},ae=(0,O.a.config)((h=f=function(e){function n(e){var t;return Object(T.a)(this,n),(t=Object(C.a)(this,Object(L.a)(n).call(this,e))).editServiceDialog=P.a.createRef(),t.editClusterDialog=P.a.createRef(),t.state={serviceName:Object(q.a)(e.location.search,"name"),groupName:Object(q.a)(e.location.search,"groupName"),loading:!1,currentPage:1,clusters:[],instances:{},service:{},pageSize:10,pageNum:{}},t}return Object(D.a)(n,e),Object(x.a)(n,[{key:"componentDidMount",value:function(){this.state.serviceName?this.getServiceDetail():this.props.history.goBack()}},{key:"getServiceDetail",value:function(){var r=this,e=this.state,t=e.serviceName,n=e.groupName;Object(I.c)({url:"v1/ns/catalog/service?serviceName=".concat(t,"&groupName=").concat(n),beforeSend:function(){return r.openLoading()},success:function(e){var t=e.clusters,n=void 0===t?[]:t,a=e.service,o=void 0===a?{}:a;return r.setState({service:o,clusters:n})},error:function(e){return k.a.error(e.responseText||"error")},complete:function(){return r.closeLoading()}})}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){this.editServiceDialog.current.getInstance().show(this.state.service)}},{key:"openClusterDialog",value:function(e){this.editClusterDialog.current.getInstance().show(e)}},{key:"render",value:function(){var t=this,e=this.props.locale,n=void 0===e?{}:e,a=this.state,o=a.serviceName,r=a.groupName,i=a.loading,s=a.service,l=void 0===s?{}:s,u=a.clusters,c=l.metadata,d=void 0===c?{}:c,p=l.selector,f=void 0===p?{}:p,h=Object(q.b)(K.c)(d);return P.a.createElement("div",{className:"main-container service-detail"},P.a.createElement(g.a,{shape:"flower",tip:"Loading...",className:"loading",visible:i,color:"#333"},P.a.createElement("h1",{style:{position:"relative",width:"100%"}},n.serviceDetails,P.a.createElement(M.a,{type:"primary",className:"header-btn",onClick:function(){return t.props.history.goBack()}},n.back),P.a.createElement(M.a,{type:"normal",className:"header-btn",onClick:function(){return t.openEditServiceDialog()}},n.editService)),P.a.createElement(Y.a,ne,P.a.createElement(te,{label:"".concat(n.serviceName,":")},P.a.createElement(S.a,{value:l.name,readOnly:!0})),P.a.createElement(te,{label:"".concat(n.groupName,":")},P.a.createElement(S.a,{value:l.groupName,readOnly:!0})),P.a.createElement(te,{label:"".concat(n.protectThreshold,":")},P.a.createElement(S.a,{value:l.protectThreshold,readOnly:!0})),P.a.createElement(te,{label:"".concat(n.metadata,":")},P.a.createElement(U.a,{language:"properties",width:"100%",height:200,value:h,options:K.e})),P.a.createElement(te,{label:"".concat(n.type,":")},P.a.createElement(S.a,{value:f.type,readOnly:!0})),"label"===l.type&&P.a.createElement(te,{label:"".concat(n.selector,":")},P.a.createElement(S.a,{value:f.selector,readOnly:!0}))),u.map(function(e){return P.a.createElement(_.a,{key:e.name,className:"cluster-card",title:"".concat(n.cluster,":"),subTitle:e.name,contentHeight:"auto",extra:P.a.createElement(M.a,{type:"normal",onClick:function(){return t.openClusterDialog(e)}},n.editCluster)},P.a.createElement(ee,{clusterName:e.name,serviceName:o,groupName:r}))})),P.a.createElement(A.a,{ref:this.editServiceDialog,openLoading:function(){return t.openLoading()},closeLoading:function(){return t.closeLoading()},getServiceDetail:function(){return t.getServiceDetail()}}),P.a.createElement(G,{ref:this.editClusterDialog,openLoading:function(){return t.openLoading()},closeLoading:function(){return t.closeLoading()},getServiceDetail:function(){return t.getServiceDetail()}}))}}]),n}(P.a.Component),f.displayName="ServiceDetail",p=h))||p;t.a=ae},function(e,t,n){"use strict";n(37);var a,o,r,i,s,l,u=n(25),c=n.n(u),d=(n(29),n(19)),p=n.n(d),f=(n(331),n(111)),h=n.n(f),m=(n(30),n(23)),g=n.n(m),y=(n(58),n(31)),_=n.n(y),v=(n(32),n(10)),b=n.n(v),M=(n(52),n(27)),w=n.n(M),k=(n(33),n(20)),S=n.n(k),T=(n(43),n(28)),x=n.n(T),C=n(14),L=n(15),D=n(16),E=n(17),O=n(22),N=n(18),Y=(n(26),n(8)),j=n.n(Y),P=(n(98),n(81)),I=n.n(P),A=(n(34),n(9)),R=n.n(A),H=(n(105),n(51)),z=n.n(H),F=n(41),W=n.n(F),V=n(0),B=n.n(V),K=n(1),U=(n(78),n(39)),q=n.n(U),G=(n(562),q.a.Row),J=q.a.Col,$=(0,j.a.config)((r=o=function(e){function n(e){var t;return Object(C.a)(this,n),(t=Object(D.a)(this,Object(E.a)(n).call(this,e))).diffeditor=B.a.createRef(),t.state={dialogvisible:!1},t}return Object(N.a)(n,e),Object(L.a)(n,[{key:"openDialog",value:function(e,t){var n=this;this.setState({dialogvisible:!0}),setTimeout(function(){n.createDiffCodeMirror(e,t)})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createDiffCodeMirror",value:function(e,t){var n=this.diffeditor.current;n.innerHTML="",this.diffeditor=window.CodeMirror.MergeView(n,{value:e||"",readOnly:!0,origLeft:null,orig:t||"",lineNumbers:!0,mode:this.mode,theme:"xq-light",highlightDifferences:!0,connect:"align",collapseIdentical:!1})}},{key:"confirmPub",value:function(){this.closeDialog(),this.props.publishConfig()}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=B.a.createElement("div",null," ",B.a.createElement(p.a,{type:"primary",onClick:this.confirmPub.bind(this)},t.publish));return B.a.createElement("div",null,B.a.createElement(S.a,{title:t.contents,style:{width:"80%"},visible:this.state.dialogvisible,footer:n,onClose:this.closeDialog.bind(this)},B.a.createElement("div",{style:{height:400}},B.a.createElement("div",null,B.a.createElement(G,null,B.a.createElement(J,{style:{textAlign:"center"}},t.currentArea),B.a.createElement(J,{style:{textAlign:"center"}},t.originalValue))),B.a.createElement("div",{style:{clear:"both",height:480},ref:this.diffeditor}))))}}]),n}(B.a.Component),o.displayName="DiffEditorDialog",a=r))||a,Q=n(83),X=n(112),Z=(n(563),z.a.Item),ee=R.a.Item,te=I.a.Group,ne=(0,j.a.config)((l=s=function(e){function t(e){var n;return Object(C.a)(this,t),(n=Object(D.a)(this,Object(E.a)(t).call(this,e)))._publishConfig=function(e){var t=n.props.locale,o=void 0===t?{}:t,r=Object(O.a)(n);n.codeValue=e,n.tenant=Object(K.b)("namespace")||"",n.serverId=Object(K.b)("serverId")||"center";var i={dataId:n.field.getValue("dataId"),appName:n.inApp?n.edasAppId:n.field.getValue("appName"),group:n.field.getValue("group"),desc:n.field.getValue("desc"),config_tags:n.state.config_tags.join(),type:n.state.configType,content:e,tenant:n.tenant};Object(K.c)({type:"post",contentType:"application/x-www-form-urlencoded",url:"v1/cs/configs",data:i,success:function(e){var t={};if(t.maintitle=o.toedittitle,t.title=B.a.createElement("div",null,o.toedit),t.content="",t.dataId=i.dataId,t.group=i.group,null!=e){t.isok=!0;var n=r.state.activeKey.split("-")[0];if("normal"===n&&!0===r.hasips){var a=(new Date).getTime();r.setState({tag:[{title:o.official,key:"normal-".concat(a)},{title:"BETA",key:"beta-".concat(a)}],hasbeta:!0,activeKey:"beta-".concat(a)}),i.betaIps=i.betaIps||i.ips,r.valueMap.beta=i,r.changeTab("beta-".concat(a))}"normal"===n&&!1===r.hasips&&(r.valueMap.normal=i),"beta"===n&&!0===r.hasips&&(r.valueMap.beta=i)}else t.isok=!1,t.message=e.message;r.successDialog.current.getInstance().openDialog(t)},error:function(){}})},n.diffEditorDialog=B.a.createRef(),n.successDialog=B.a.createRef(),n.edasAppName=Object(K.b)("edasAppName")||"",n.edasAppId=Object(K.b)("edasAppId")||"",n.inApp=n.edasAppName,n.field=new x.a(Object(O.a)(n)),n.dataId=Object(K.b)("dataId")||"yanlin",n.group=Object(K.b)("group")||"DEFAULT_GROUP",n.tenant=Object(K.b)("namespace")||"",n.state={configType:"text",codeValue:"",envname:"center",targetEnvName:"",envlist:[],envvalues:[],loading:!1,showmore:!1,activeKey:"normal",hasbeta:!1,ips:"",checkedBeta:!1,tagLst:[],config_tags:[],switchEncrypt:!1,tag:[]},n.codeValue="",n.mode="text",n.ips="",n.valueMap={},n.searchDataId=Object(K.b)("searchDataId")||"",n.searchGroup=Object(K.b)("searchGroup")||"",n}return Object(N.a)(t,e),Object(L.a)(t,[{key:"componentDidMount",value:function(){this.initData(),this.betaips=document.getElementById("betaips"),this.getDataDetail(),this.chontenttab=document.getElementById("chontenttab")}},{key:"initData",value:function(){var e=this.props.locale,t=void 0===e?{}:e;this.setState({tag:[{title:t.official,key:"normal"}]}),this.dataId.startsWith("cipher-")&&this.setState({switchEncrypt:!0})}},{key:"initMoacoEditor",value:function(e,t){var n=this;window.monaco?this.monacoEditor=window.monaco.editor.create(document.getElementById("container"),{value:t,language:this.state.configType,codeLens:!0,selectOnLineNumbers:!0,roundedSelection:!1,readOnly:!1,lineNumbersMinChars:!0,theme:"vs-dark",wordWrapColumn:120,folding:!1,showFoldingControls:"always",wordWrap:"wordWrapColumn",cursorStyle:"line",automaticLayout:!0}):window.importEditor(function(){n.monacoEditor=window.monaco.editor.create(document.getElementById("container"),{value:t,language:n.state.configType,codeLens:!0,selectOnLineNumbers:!0,roundedSelection:!1,readOnly:!1,lineNumbersMinChars:!0,theme:"vs-dark",wordWrapColumn:120,folding:!1,showFoldingControls:"always",wordWrap:"wordWrapColumn",cursorStyle:"line",automaticLayout:!0})})}},{key:"toggleMore",value:function(){this.setState({showmore:!this.state.showmore})}},{key:"navTo",value:function(e){this.serverId=Object(K.b)("serverId")||"",this.tenant=Object(K.b)("namespace")||"",this.props.history.push("".concat(e,"?serverId=").concat(this.serverId||"","&dataId=").concat(this.dataId,"&group=").concat(this.group,"&namespace=").concat(this.tenant))}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"getDataDetail",value:function(){var e=this.props.locale,o=void 0===e?{}:e,r=this;this.tenant=Object(K.b)("namespace")||"",this.serverId=Object(K.b)("serverId")||"center";var t="v1/cs/configs?show=all&dataId=".concat(this.dataId,"&group=").concat(this.group);Object(K.c)({url:t,beforeSend:function(){r.openLoading()},success:function(e){if(null!=e){var t=e;r.valueMap.normal=t,r.field.setValue("dataId",t.dataId),r.field.setValue("appName",r.inApp?r.edasAppName:t.appName),r.field.setValue("group",t.group),r.field.setValue("desc",t.desc),r.codeValue=t.content||"";var n=t.type||"text";if(r.setState({configType:n}),r.initMoacoEditor(n,r.codeValue),null!=t.configTags){var a=t.configTags.split(",");r.setConfigTags(a)}r.serverId={}.serverId,r.targetEnvs=[]}else S.a.alert({title:o.wrong,content:e.message})},complete:function(){r.closeLoading()}})}},{key:"goList",value:function(){var e=Object(K.b)("namespace");this.props.history.push("/configurationManagement?serverId=".concat(this.serverId,"&group=").concat(this.searchGroup,"&dataId=").concat(this.searchDataId,"&namespace=").concat(e))}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.commoneditor;n.innerHTML="",this.commoneditor=window.CodeMirror(n,{value:t,mode:e,lineNumbers:!0,theme:"xq-light",lint:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.commoneditor.on("change",this.codemirrorValueChanged.bind(this))}},{key:"codemirrorValueChanged",value:function(e){this.diffeditor&&this.diffeditor.edit.doc.setValue(e.getValue())}},{key:"createDiffCodeMirror",value:function(e,t){var n=this.diffEditorDialog.current.getInstance();n.innerHTML="",this.diffeditor=window.CodeMirror.MergeView(n,{value:e||"",origLeft:null,orig:t||"",lineNumbers:!0,mode:this.mode,theme:"xq-light",highlightDifferences:!0,connect:"align",collapseIdentical:!1})}},{key:"changeConfig",value:function(e){0===e&&(this.createCodeMirror("text",this.codeValue),this.mode="text"),1===e&&(this.createCodeMirror("application/json",this.codeValue),this.mode="application/json"),2===e&&(this.createCodeMirror("xml",this.codeValue),this.mode="xml"),this.setState({configType:e})}},{key:"setCodeValue",value:function(e){this.setState({codeValue:e})}},{key:"toggleDiff",value:function(e){if(e){this.chontenttab.style.display="block";var t=this.commoneditor.doc.getValue();this.diffeditor||this.createDiffCodeMirror(t,this.codeValue)}else this.chontenttab.style.display="none"}},{key:"publishConfig",value:function(){var o=this,e=this.props.locale,r=void 0===e?{}:e;this.field.validate(function(e,t){if(!e){var n="",a=o.state.configType;(n=o.monacoEditor?o.monacoEditor.getValue():o.codeValue)?X.a.validate({content:n,type:a})?o._publishConfig(n):S.a.confirm({content:"配置信息可能有语法错误, 确定提交吗?",onOk:function(){o._publishConfig(n)}}):w.a.error({content:r.submitFailed,align:"cc cc"})}})}},{key:"validateChart",value:function(e,t,n){var a=this.props.locale,o=void 0===a?{}:a;/[@#\$%\^&\*]+/g.test(t)?n(o.vdchart):n()}},{key:"changeEnv",value:function(e){this.targetEnvs=e,this.setState({envvalues:e})}},{key:"changeBeta",value:function(e){this.betaips.style.display=e?"block":"none",this.setState({checkedBeta:e})}},{key:"getIps",value:function(e){this.ips=e,this.setState({ips:e})}},{key:"setConfigTags",value:function(n){5\n\t com.alibaba.boot\n\t nacos-discovery-spring-boot-starter\n\t ${latest.version}\n\t\n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/ \n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}',t.sprigcloud_code='/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml\n\t\n\t org.springframework.cloud\n\t spring-cloud-starter-alibaba-nacos-discovery\n\t ${latest.version}\n\t\n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=service-provider\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/ \n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosProviderApplication {\n\n\tpublic static void main(String[] args) {\n\t\tSpringApplication.run(NacosProviderApplication.class, args);\n\t}\n\n\t@RestController\n\tclass EchoController {\n\t\t@RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n\t\tpublic String echo(@PathVariable String string) {\n\t\t\treturn "Hello Nacos Discovery " + string;\n\t\t}\n\t}\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=service-consumer\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/ \n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}',t}return Object(L.a)(n,e),Object(S.a)(n,[{key:"componentDidMount",value:function(){}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"getData",value:function(){var e=Object(H.b)("namespace"),t={group:this.record.group||"",dataId:this.record.dataId||"",namespace:e,inEdas:window.globalConfig.isParentEdas()};this.defaultCode=this.getJavaCode(t),this.createCodeMirror("text/x-java",this.defaultCode),this.springCode=this.getSpringCode(t),this.nodejsCode=this.getNodejsCode(t),this.cppCode=this.getCppCode(t),this.shellCode=this.getShellCode(t),this.pythonCode=this.getPythonCode(t),this.forceUpdate()}},{key:"getJavaCode",value:function(e){return'/* Refer to document: https://github.com/alibaba/nacos/blob/master/example/src/main/java/com/alibaba/nacos/example\n* pom.xml\n \n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("nacos.test.3", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("nacos.test.3", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("nacos.test.3"));\n\n naming.deregisterInstance("nacos.test.3", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("nacos.test.3"));\n\n naming.subscribe("nacos.test.3", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}'}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n\t\n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=R.a.createElement("div",null);return R.a.createElement("div",null,R.a.createElement(g.a,{title:t.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:n,onClose:this.closeDialog.bind(this)},R.a.createElement("div",{style:{height:500}},R.a.createElement(b.a,{tip:t.loading,style:{width:"100%"},visible:this.state.loading},R.a.createElement(V.a,{shape:"text",style:{height:40,paddingBottom:10}},R.a.createElement(B,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),R.a.createElement(B,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),R.a.createElement(B,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),R.a.createElement(B,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),R.a.createElement(B,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),R.a.createElement(B,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),R.a.createElement(B,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),R.a.createElement(B,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),R.a.createElement("div",{ref:"codepreview"})))))}}]),n}(R.a.Component),o.displayName="ShowServiceCodeing",a=r))||a,U=(n(595),I.a.Item),q=j.a.Row,G=j.a.Col,J=N.a.Column,$=(0,E.a.config)((l=s=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(T.a)(this,Object(x.a)(t).call(this,e))).getQueryLater=function(){setTimeout(function(){return n.queryServiceList()})},n.showcode=function(){setTimeout(function(){return n.queryServiceList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},n.editServiceDialog=R.a.createRef(),n.showcode=R.a.createRef(),n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new _.a(Object(C.a)(n)),n}return Object(L.a)(t,e),Object(S.a)(t,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var i=this,e=this.state,t=e.currentPage,n=e.pageSize,a=e.keyword,o=e.withInstances,r=["withInstances=".concat(void 0!==o&&o),"pageNo=".concat(t),"pageSize=".concat(n),"keyword=".concat(a)];Object(H.c)({url:"v1/ns/catalog/services?".concat(r.join("&")),beforeSend:function(){return i.openLoading()},success:function(e){var t=0this.state.pageSize&&R.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},R.a.createElement(M.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return a.setState({currentPage:e},function(){return a.queryServiceList()})}}))),R.a.createElement(K,{ref:this.showcode}),R.a.createElement(F.a,{ref:this.editServiceDialog,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},queryServiceList:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}}))}}]),t}(R.a.Component),s.displayName="ServiceList",i=l))||i;t.a=$},function(e,t,n){"use strict";n(37);var a,o,r,i=n(25),s=n.n(i),l=(n(80),n(48)),u=n.n(l),c=(n(79),n(21)),d=n.n(c),p=(n(34),n(9)),f=n.n(p),h=(n(32),n(10)),m=n.n(h),g=(n(43),n(28)),y=n.n(g),_=n(14),v=n(15),b=n(16),M=n(17),w=n(22),k=n(18),S=(n(26),n(8)),T=n.n(S),x=n(0),C=n.n(x),L=n(54),D=n(1),E=(n(568),(0,T.a.config)((r=o=function(e){function a(e){var t;Object(_.a)(this,a),(t=Object(b.a)(this,Object(M.a)(a).call(this,e))).field=new y.a(Object(w.a)(t)),t.appName=Object(D.b)("appName")||"",t.preAppName=t.appName,t.group=Object(D.b)("group")||"",t.preGroup=t.group,t.dataId=Object(D.b)("dataId")||"",t.preDataId=t.dataId,t.serverId=Object(D.b)("serverId")||"",t.state={value:"",visible:!1,total:0,pageSize:10,currentPage:1,dataSource:[],fieldValue:[],showAppName:!1,showgroup:!1,dataId:t.dataId,group:t.group,appName:t.appName,selectValue:[],loading:!1};var n={dataId:t.dataId||"",group:t.preGroup||"",appName:t.appName||"",serverId:t.serverId||""};return Object(D.d)(n),t}return Object(k.a)(a,e),Object(v.a)(a,[{key:"componentDidMount",value:function(){this.field.setValue("group",this.group),this.field.setValue("dataId",this.dataId)}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"keyDownSearch",value:function(e){var t=e||window.event;return 13!==(t.keyCode||t.which||t.charCode)||(this.getData(),!1)}},{key:"UNSAFE_componentWillMount",value:function(){window.addEventListener("keydown",this.keyDownSearch.bind(this),!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.keyDownSearch.bind(this))}},{key:"onSearch",value:function(){}},{key:"onChange",value:function(){}},{key:"cleanAndGetData",value:function(e){0=t.length?{value:void 0,done:!0}:(e=a(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var l=n(119),u=n(118);e.exports=function(s){return function(e,t){var n,a,o=String(u(e)),r=l(t),i=o.length;return r<0||i<=r?s?"":void 0:(n=o.charCodeAt(r))<55296||56319=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),r.Arguments=r.Array,a("keys"),a("values"),a("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(391),__esModule:!0}},function(e,t,n){n(392),n(397),n(398),n(399),e.exports=n(63).Symbol},function(e,t,n){"use strict";function a(e){var t=q[e]=E(H[W]);return t._k=e,t}function o(e,t){S(e);for(var n,a=w(t=C(t)),o=0,r=a.length;oo;)c(q,t=n[o++])||t==V||t==h||a.push(t);return a}function l(e){for(var t,n=e===J,a=R(n?G:C(e)),o=[],r=0;a.length>r;)!c(q,t=a[r++])||n&&!c(J,t)||o.push(q[t]);return o}var u=n(57),c=n(65),d=n(64),p=n(87),f=n(153),h=n(393).KEY,m=n(89),g=n(121),y=n(127),_=n(96),v=n(74),b=n(128),M=n(129),w=n(394),k=n(395),S=n(88),T=n(72),x=n(124),C=n(73),L=n(117),D=n(93),E=n(126),O=n(396),N=n(155),Y=n(123),j=n(71),P=n(94),I=N.f,A=j.f,R=O.f,H=u.Symbol,z=u.JSON,F=z&&z.stringify,W="prototype",V=v("_hidden"),B=v("toPrimitive"),K={}.propertyIsEnumerable,U=g("symbol-registry"),q=g("symbols"),G=g("op-symbols"),J=Object[W],$="function"==typeof H&&!!Y.f,Q=u.QObject,X=!Q||!Q[W]||!Q[W].findChild,Z=d&&m(function(){return 7!=E(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=I(J,t);a&&delete J[t],A(e,t,n),a&&e!==J&&A(J,t,a)}:A,ee=$&&"symbol"==typeof H.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof H},te=function(e,t,n){return e===J&&te(G,t,n),S(e),t=L(t,!0),S(n),c(q,t)?(n.enumerable?(c(e,V)&&e[V][t]&&(e[V][t]=!1),n=E(n,{enumerable:D(0,!1)})):(c(e,V)||A(e,V,D(1,{})),e[V][t]=!0),Z(e,t,n)):A(e,t,n)};$||(f((H=function(e){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var t=_(0ae;)v(ne[ae++]);for(var oe=P(v.store),re=0;oe.length>re;)M(oe[re++]);p(p.S+p.F*!$,"Symbol",{for:function(e){return c(U,e+="")?U[e]:U[e]=H(e)},keyFor:function(e){if(!ee(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){X=!0},useSimple:function(){X=!1}}),p(p.S+p.F*!$,"Object",{create:function(e,t){return void 0===t?E(e):o(E(e),t)},defineProperty:te,defineProperties:o,getOwnPropertyDescriptor:i,getOwnPropertyNames:s,getOwnPropertySymbols:l});var ie=m(function(){Y.f(1)});p(p.S+p.F*ie,"Object",{getOwnPropertySymbols:function(e){return Y.f(x(e))}}),z&&p(p.S+p.F*(!$||m(function(){var e=H();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))})),"JSON",{stringify:function(e){for(var t,n,a=[e],o=1;oi;)r.call(e,a=o[i++])&&t.push(a);return t}},function(e,t,n){var a=n(151);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(73),o=n(154).f,r={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==r.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(a(e))}},function(e,t){},function(e,t,n){n(129)("asyncIterator")},function(e,t,n){n(129)("observable")},function(e,t,n){e.exports={default:n(401),__esModule:!0}},function(e,t,n){n(402),e.exports=n(63).Object.setPrototypeOf},function(e,t,n){var a=n(87);a(a.S,"Object",{setPrototypeOf:n(403).set})},function(e,t,o){function r(e,t){if(a(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")}var n=o(72),a=o(88);e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,a){try{(a=o(146)(Function.call,o(155).f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return r(e,t),n?e.__proto__=t:a(e,t),e}}({},!1):void 0),check:r}},function(e,t,n){e.exports={default:n(405),__esModule:!0}},function(e,t,n){n(406);var a=n(63).Object;e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){var a=n(87);a(a.S,"Object",{create:n(126)})},function(e,t,n){"use strict";
+*/var l=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(e){a[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},a)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),r=1;re.clientHeight&&0a.length&&a.every(function(e,t){return e===n[t]})},k.prototype.handleOpen=function(t,e,n,a){var o=this,r=void 0,i=this.props,s=i.mode,l=i.openMode,u=this.state.openKeys,c=u.indexOf(t);e&&-1===c?"inline"===s?"single"===l?(r=u.filter(function(e){return!o.isSibling(o.k2n[t].pos,o.k2n[e].pos)})).push(t):r=u.concat(t):(r=u.filter(function(e){return o.isAncestor(o.k2n[t].pos,o.k2n[e].pos)})).push(t):!e&&-1this.popupNode.offsetWidth&&y(this.popupNode,"width",f.offsetWidth+"px")}"outside"!==u||"hoz"===l&&1===n||(y(this.popupNode,"height",p.offsetHeight+"px"),y(this.popupNode,"overflow-y","scroll"));var h=this.popupProps;h.onOpen&&h.onOpen()},j.prototype.handlePopupClose=function(){var e=this.props.root.popupNodes,t=e.indexOf(this.popupNode);-1e.slidesToShow&&(t=e.slideWidth*e.slidesToShow*-1,o=e.slideHeight*e.slidesToShow*-1),e.slideCount%e.slidesToScroll!=0){var r=e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow;if(e.rtl)r=(e.slideIndex>=e.slideCount?e.slideCount-e.slideIndex:e.slideIndex)+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow;r&&(o=e.slideIndex>e.slideCount?(t=(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideWidth*-1,(e.slidesToShow-(e.slideIndex-e.slideCount))*e.slideHeight*-1):(t=e.slideCount%e.slidesToScroll*e.slideWidth*-1,e.slideCount%e.slidesToScroll*e.slideHeight*-1))}}else e.slideCount%e.slidesToScroll!=0&&e.slideIndex+e.slidesToScroll>e.slideCount&&e.slideCount>e.slidesToShow&&(t=(e.slidesToShow-e.slideCount%e.slidesToScroll)*e.slideWidth);if(e.centerMode&&(e.infinite?t+=e.slideWidth*Math.floor(e.slidesToShow/2):t=e.slideWidth*Math.floor(e.slidesToShow/2)),n=e.vertical?e.slideIndex*e.slideHeight*-1+o:e.slideIndex*e.slideWidth*-1+t,!0===e.variableWidth){var i=void 0;n=(a=e.slideCount<=e.slidesToShow||!1===e.infinite?s.default.findDOMNode(e.trackRef).childNodes[e.slideIndex]:(i=e.slideIndex+e.slidesToShow,s.default.findDOMNode(e.trackRef).childNodes[i]))?-1*a.offsetLeft:0,!0===e.centerMode&&(a=!1===e.infinite?s.default.findDOMNode(e.trackRef).children[e.slideIndex]:s.default.findDOMNode(e.trackRef).children[e.slideIndex+e.slidesToShow+1])&&(n=-1*a.offsetLeft+(e.listWidth-a.offsetWidth)/2)}return n}},function(e,t,n){"use strict";n(596)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.routerMiddleware=t.routerActions=t.goForward=t.goBack=t.go=t.replace=t.push=t.CALL_HISTORY_METHOD=t.routerReducer=t.LOCATION_CHANGE=t.syncHistoryWithStore=void 0;var a=n(295);Object.defineProperty(t,"LOCATION_CHANGE",{enumerable:!0,get:function(){return a.LOCATION_CHANGE}}),Object.defineProperty(t,"routerReducer",{enumerable:!0,get:function(){return a.routerReducer}});var o=n(296);Object.defineProperty(t,"CALL_HISTORY_METHOD",{enumerable:!0,get:function(){return o.CALL_HISTORY_METHOD}}),Object.defineProperty(t,"push",{enumerable:!0,get:function(){return o.push}}),Object.defineProperty(t,"replace",{enumerable:!0,get:function(){return o.replace}}),Object.defineProperty(t,"go",{enumerable:!0,get:function(){return o.go}}),Object.defineProperty(t,"goBack",{enumerable:!0,get:function(){return o.goBack}}),Object.defineProperty(t,"goForward",{enumerable:!0,get:function(){return o.goForward}}),Object.defineProperty(t,"routerActions",{enumerable:!0,get:function(){return o.routerActions}});var r=s(n(428)),i=s(n(429));function s(e){return e&&e.__esModule?e:{default:e}}t.syncHistoryWithStore=r.default,t.routerMiddleware=i.default},function(e,t,n){"use strict";function a(o){return function(e){var n=e.dispatch,a=e.getState;return function(t){return function(e){return"function"==typeof e?e(n,a,o):t(e)}}}}var o=a();o.withExtraArgument=a,t.a=o},function(e,t,n){"use strict";var a=n(142),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},d={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function p(e){return a.isMemo(e)?r:i[e.$$typeof]||o}i[a.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var f=Object.defineProperty,h=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,_=Object.prototype;e.exports=function e(t,n,a){if("string"==typeof n)return t;if(_){var o=y(n);o&&o!==_&&e(t,o,a)}var r=h(n);m&&(r=r.concat(m(n)));for(var i=p(t),s=p(n),l=0;l\n com.alibaba.nacos\n nacos-client\n ${version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\nimport java.util.concurrent.Executor;\nimport com.alibaba.nacos.api.NacosFactory;\nimport com.alibaba.nacos.api.config.ConfigService;\nimport com.alibaba.nacos.api.config.listener.Listener;\nimport com.alibaba.nacos.api.exception.NacosException;\n\n/**\n * Config service example\n * \n * @author Nacos\n *\n */\npublic class ConfigExample {\n\n\tpublic static void main(String[] args) throws NacosException, InterruptedException {\n\t\tString serverAddr = "localhost";\n\t\tString dataId = "'.concat(e.dataId,'";\n\t\tString group = "').concat(e.group,'";\n\t\tProperties properties = new Properties();\n\t\tproperties.put(PropertyKeyConst.SERVER_ADDR, serverAddr);\n\t\tConfigService configService = NacosFactory.createConfigService(properties);\n\t\tString content = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tconfigService.addListener(dataId, group, new Listener() {\n\t\t\t@Override\n\t\t\tpublic void receiveConfigInfo(String configInfo) {\n\t\t\t\tSystem.out.println("recieve:" + configInfo);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic Executor getExecutor() {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t});\n\t\t\n\t\tboolean isPublishOk = configService.publishConfig(dataId, group, "content");\n\t\tSystem.out.println(isPublishOk);\n\t\t\n\t\tThread.sleep(3000);\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\n\t\tboolean isRemoveOk = configService.removeConfig(dataId, group);\n\t\tSystem.out.println(isRemoveOk);\n\t\tThread.sleep(3000);\n\n\t\tcontent = configService.getConfig(dataId, group, 5000);\n\t\tSystem.out.println(content);\n\t\tThread.sleep(300000);\n\n\t}\n}\n')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=X.a.createElement("div",null);return X.a.createElement("div",null,X.a.createElement(R.a,{title:t.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:n,onClose:this.closeDialog.bind(this)},X.a.createElement("div",{style:{height:500}},X.a.createElement(g.a,{tip:t.loading,style:{width:"100%"},visible:this.state.loading},X.a.createElement(re.a,{shape:"text",style:{height:40,paddingBottom:10}},X.a.createElement(ie,{title:"Java",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),X.a.createElement(ie,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigboot_code)}),X.a.createElement(ie,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloud_code)}),X.a.createElement(ie,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),X.a.createElement(ie,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),X.a.createElement(ie,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),X.a.createElement(ie,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),X.a.createElement("div",{ref:"codepreview"})))))}}]),n}(X.a.Component),o.displayName="ShowCodeing",a=r))||a,le=(n(78),n(39)),ue=n.n(le),ce=(n(583),ue.a.Row),de=ue.a.Col,pe=(0,G.a.config)((l=s=function(e){function n(e){var t;return Object(F.a)(this,n),(t=Object(V.a)(this,Object(B.a)(n).call(this,e))).state={visible:!1,title:"",content:"",isok:!0,dataId:"",group:""},t}return Object(U.a)(n,e),Object(W.a)(n,[{key:"componentDidMount",value:function(){this.initData()}},{key:"initData",value:function(){var e=this.props.locale,t=void 0===e?{}:e;this.setState({title:t.confManagement})}},{key:"openDialog",value:function(e){this.setState({visible:!0,title:e.title,content:e.content,isok:e.isok,dataId:e.dataId,group:e.group,message:e.message})}},{key:"closeDialog",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=X.a.createElement("div",{style:{textAlign:"right"}},X.a.createElement(b.a,{type:"primary",onClick:this.closeDialog.bind(this)},t.determine));return X.a.createElement("div",null,X.a.createElement(R.a,{visible:this.state.visible,footer:n,style:{width:555},onCancel:this.closeDialog.bind(this),onClose:this.closeDialog.bind(this),title:t.deletetitle},X.a.createElement("div",null,X.a.createElement(ce,null,X.a.createElement(de,{span:"4",style:{paddingTop:16}},X.a.createElement(j.a,{type:"".concat(this.state.isok?"success":"delete","-filling"),style:{color:this.state.isok?"green":"red"},size:"xl"})),X.a.createElement(de,{span:"20"},X.a.createElement("div",null,X.a.createElement("h3",null,this.state.isok?t.deletedSuccessfully:t.deleteFailed),X.a.createElement("p",null,X.a.createElement("span",{style:{color:"#999",marginRight:5}},"Data ID:"),X.a.createElement("span",{style:{color:"#c7254e"}},this.state.dataId)),X.a.createElement("p",null,X.a.createElement("span",{style:{color:"#999",marginRight:5}},"Group:"),X.a.createElement("span",{style:{color:"#c7254e"}},this.state.group)),this.state.isok?"":X.a.createElement("p",{style:{color:"red"}},this.state.message)))))))}}]),n}(X.a.Component),s.displayName="DeleteDialog",i=l))||i,fe=(n(584),n(348)),he=n.n(fe),me=(0,G.a.config)((d=c=function(e){function t(){return Object(F.a)(this,t),Object(V.a)(this,Object(B.a)(t).apply(this,arguments))}return Object(U.a)(t,e),Object(W.a)(t,[{key:"render",value:function(){var e=this.props,t=e.data,n=void 0===t?{}:t,a=e.height,o=e.locale,r=void 0===o?{}:o;return X.a.createElement("div",null,"notice"===n.modeType?X.a.createElement("div",{"data-spm-click":"gostr=/aliyun;locaid=notice"},X.a.createElement(he.a,{style:{marginBottom:1l?P.a.createElement($.a,{className:"pagination",total:s.count,pageSize:l,onChange:function(e){return a.onChangePage(e)}}):null,P.a.createElement(Z,{ref:this.editInstanceDialog,serviceName:r,clusterName:n,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},getInstanceList:function(){return a.getInstanceList()}})):null}}]),n}(P.a.Component),c.displayName="InstanceTable",u=d))||u,te=(n(597),Y.a.Item),ne={labelCol:{fixedSpan:10},wrapperCol:{span:14}},ae=(0,O.a.config)((h=f=function(e){function n(e){var t;return Object(T.a)(this,n),(t=Object(C.a)(this,Object(L.a)(n).call(this,e))).editServiceDialog=P.a.createRef(),t.editClusterDialog=P.a.createRef(),t.state={serviceName:Object(q.a)(e.location.search,"name"),groupName:Object(q.a)(e.location.search,"groupName"),loading:!1,currentPage:1,clusters:[],instances:{},service:{},pageSize:10,pageNum:{}},t}return Object(D.a)(n,e),Object(x.a)(n,[{key:"componentDidMount",value:function(){this.state.serviceName?this.getServiceDetail():this.props.history.goBack()}},{key:"getServiceDetail",value:function(){var r=this,e=this.state,t=e.serviceName,n=e.groupName;Object(I.c)({url:"v1/ns/catalog/service?serviceName=".concat(t,"&groupName=").concat(n),beforeSend:function(){return r.openLoading()},success:function(e){var t=e.clusters,n=void 0===t?[]:t,a=e.service,o=void 0===a?{}:a;return r.setState({service:o,clusters:n})},error:function(e){return k.a.error(e.responseText||"error")},complete:function(){return r.closeLoading()}})}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){this.editServiceDialog.current.getInstance().show(this.state.service)}},{key:"openClusterDialog",value:function(e){this.editClusterDialog.current.getInstance().show(e)}},{key:"render",value:function(){var t=this,e=this.props.locale,n=void 0===e?{}:e,a=this.state,o=a.serviceName,r=a.groupName,i=a.loading,s=a.service,l=void 0===s?{}:s,u=a.clusters,c=l.metadata,d=void 0===c?{}:c,p=l.selector,f=void 0===p?{}:p,h=Object(q.b)(K.c)(d);return P.a.createElement("div",{className:"main-container service-detail"},P.a.createElement(g.a,{shape:"flower",tip:"Loading...",className:"loading",visible:i,color:"#333"},P.a.createElement("h1",{style:{position:"relative",width:"100%"}},n.serviceDetails,P.a.createElement(M.a,{type:"primary",className:"header-btn",onClick:function(){return t.props.history.goBack()}},n.back),P.a.createElement(M.a,{type:"normal",className:"header-btn",onClick:function(){return t.openEditServiceDialog()}},n.editService)),P.a.createElement(Y.a,ne,P.a.createElement(te,{label:"".concat(n.serviceName,":")},P.a.createElement(S.a,{value:l.name,readOnly:!0})),P.a.createElement(te,{label:"".concat(n.groupName,":")},P.a.createElement(S.a,{value:l.groupName,readOnly:!0})),P.a.createElement(te,{label:"".concat(n.protectThreshold,":")},P.a.createElement(S.a,{value:l.protectThreshold,readOnly:!0})),P.a.createElement(te,{label:"".concat(n.metadata,":")},P.a.createElement(U.a,{language:"properties",width:"100%",height:200,value:h,options:K.e})),P.a.createElement(te,{label:"".concat(n.type,":")},P.a.createElement(S.a,{value:f.type,readOnly:!0})),"label"===l.type&&P.a.createElement(te,{label:"".concat(n.selector,":")},P.a.createElement(S.a,{value:f.selector,readOnly:!0}))),u.map(function(e){return P.a.createElement(_.a,{key:e.name,className:"cluster-card",title:"".concat(n.cluster,":"),subTitle:e.name,contentHeight:"auto",extra:P.a.createElement(M.a,{type:"normal",onClick:function(){return t.openClusterDialog(e)}},n.editCluster)},P.a.createElement(ee,{clusterName:e.name,serviceName:o,groupName:r}))})),P.a.createElement(A.a,{ref:this.editServiceDialog,openLoading:function(){return t.openLoading()},closeLoading:function(){return t.closeLoading()},getServiceDetail:function(){return t.getServiceDetail()}}),P.a.createElement(G,{ref:this.editClusterDialog,openLoading:function(){return t.openLoading()},closeLoading:function(){return t.closeLoading()},getServiceDetail:function(){return t.getServiceDetail()}}))}}]),n}(P.a.Component),f.displayName="ServiceDetail",p=h))||p;t.a=ae},function(e,t,n){"use strict";n(37);var a,o,r,i,s,l,u=n(25),c=n.n(u),d=(n(29),n(19)),p=n.n(d),f=(n(331),n(111)),h=n.n(f),m=(n(30),n(23)),g=n.n(m),y=(n(58),n(31)),_=n.n(y),v=(n(32),n(10)),b=n.n(v),M=(n(52),n(27)),w=n.n(M),k=(n(33),n(20)),S=n.n(k),T=(n(43),n(28)),x=n.n(T),C=n(14),L=n(15),D=n(16),E=n(17),O=n(22),N=n(18),Y=(n(26),n(8)),j=n.n(Y),P=(n(98),n(81)),I=n.n(P),A=(n(34),n(9)),R=n.n(A),H=(n(105),n(51)),z=n.n(H),F=n(41),W=n.n(F),V=n(0),B=n.n(V),K=n(1),U=(n(78),n(39)),q=n.n(U),G=(n(562),q.a.Row),J=q.a.Col,$=(0,j.a.config)((r=o=function(e){function n(e){var t;return Object(C.a)(this,n),(t=Object(D.a)(this,Object(E.a)(n).call(this,e))).diffeditor=B.a.createRef(),t.state={dialogvisible:!1},t}return Object(N.a)(n,e),Object(L.a)(n,[{key:"openDialog",value:function(e,t){var n=this;this.setState({dialogvisible:!0}),setTimeout(function(){n.createDiffCodeMirror(e,t)})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createDiffCodeMirror",value:function(e,t){var n=this.diffeditor.current;n.innerHTML="",this.diffeditor=window.CodeMirror.MergeView(n,{value:e||"",readOnly:!0,origLeft:null,orig:t||"",lineNumbers:!0,mode:this.mode,theme:"xq-light",highlightDifferences:!0,connect:"align",collapseIdentical:!1})}},{key:"confirmPub",value:function(){this.closeDialog(),this.props.publishConfig()}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=B.a.createElement("div",null," ",B.a.createElement(p.a,{type:"primary",onClick:this.confirmPub.bind(this)},t.publish));return B.a.createElement("div",null,B.a.createElement(S.a,{title:t.contents,style:{width:"80%"},visible:this.state.dialogvisible,footer:n,onClose:this.closeDialog.bind(this)},B.a.createElement("div",{style:{height:400}},B.a.createElement("div",null,B.a.createElement(G,null,B.a.createElement(J,{style:{textAlign:"center"}},t.currentArea),B.a.createElement(J,{style:{textAlign:"center"}},t.originalValue))),B.a.createElement("div",{style:{clear:"both",height:480},ref:this.diffeditor}))))}}]),n}(B.a.Component),o.displayName="DiffEditorDialog",a=r))||a,Q=n(83),X=n(112),Z=(n(563),z.a.Item),ee=R.a.Item,te=I.a.Group,ne=(0,j.a.config)((l=s=function(e){function t(e){var n;return Object(C.a)(this,t),(n=Object(D.a)(this,Object(E.a)(t).call(this,e)))._publishConfig=function(e){var t=n.props.locale,o=void 0===t?{}:t,r=Object(O.a)(n);n.codeValue=e,n.tenant=Object(K.b)("namespace")||"",n.serverId=Object(K.b)("serverId")||"center";var i={dataId:n.field.getValue("dataId"),appName:n.inApp?n.edasAppId:n.field.getValue("appName"),group:n.field.getValue("group"),desc:n.field.getValue("desc"),config_tags:n.state.config_tags.join(),type:n.state.configType,content:e,tenant:n.tenant};Object(K.c)({type:"post",contentType:"application/x-www-form-urlencoded",url:"v1/cs/configs",data:i,success:function(e){var t={};if(t.maintitle=o.toedittitle,t.title=B.a.createElement("div",null,o.toedit),t.content="",t.dataId=i.dataId,t.group=i.group,null!=e){t.isok=!0;var n=r.state.activeKey.split("-")[0];if("normal"===n&&!0===r.hasips){var a=(new Date).getTime();r.setState({tag:[{title:o.official,key:"normal-".concat(a)},{title:"BETA",key:"beta-".concat(a)}],hasbeta:!0,activeKey:"beta-".concat(a)}),i.betaIps=i.betaIps||i.ips,r.valueMap.beta=i,r.changeTab("beta-".concat(a))}"normal"===n&&!1===r.hasips&&(r.valueMap.normal=i),"beta"===n&&!0===r.hasips&&(r.valueMap.beta=i)}else t.isok=!1,t.message=e.message;r.successDialog.current.getInstance().openDialog(t)},error:function(){}})},n.diffEditorDialog=B.a.createRef(),n.successDialog=B.a.createRef(),n.edasAppName=Object(K.b)("edasAppName")||"",n.edasAppId=Object(K.b)("edasAppId")||"",n.inApp=n.edasAppName,n.field=new x.a(Object(O.a)(n)),n.dataId=Object(K.b)("dataId")||"yanlin",n.group=Object(K.b)("group")||"DEFAULT_GROUP",n.tenant=Object(K.b)("namespace")||"",n.state={configType:"text",codeValue:"",envname:"center",targetEnvName:"",envlist:[],envvalues:[],loading:!1,showmore:!1,activeKey:"normal",hasbeta:!1,ips:"",checkedBeta:!1,tagLst:[],config_tags:[],switchEncrypt:!1,tag:[]},n.codeValue="",n.mode="text",n.ips="",n.valueMap={},n.searchDataId=Object(K.b)("searchDataId")||"",n.searchGroup=Object(K.b)("searchGroup")||"",n}return Object(N.a)(t,e),Object(L.a)(t,[{key:"componentDidMount",value:function(){this.initData(),this.betaips=document.getElementById("betaips"),this.getDataDetail(),this.chontenttab=document.getElementById("chontenttab")}},{key:"initData",value:function(){var e=this.props.locale,t=void 0===e?{}:e;this.setState({tag:[{title:t.official,key:"normal"}]}),this.dataId.startsWith("cipher-")&&this.setState({switchEncrypt:!0})}},{key:"initMoacoEditor",value:function(e,t){var n=this;window.monaco?this.monacoEditor=window.monaco.editor.create(document.getElementById("container"),{value:t,language:this.state.configType,codeLens:!0,selectOnLineNumbers:!0,roundedSelection:!1,readOnly:!1,lineNumbersMinChars:!0,theme:"vs-dark",wordWrapColumn:120,folding:!1,showFoldingControls:"always",wordWrap:"wordWrapColumn",cursorStyle:"line",automaticLayout:!0}):window.importEditor(function(){n.monacoEditor=window.monaco.editor.create(document.getElementById("container"),{value:t,language:n.state.configType,codeLens:!0,selectOnLineNumbers:!0,roundedSelection:!1,readOnly:!1,lineNumbersMinChars:!0,theme:"vs-dark",wordWrapColumn:120,folding:!1,showFoldingControls:"always",wordWrap:"wordWrapColumn",cursorStyle:"line",automaticLayout:!0})})}},{key:"toggleMore",value:function(){this.setState({showmore:!this.state.showmore})}},{key:"navTo",value:function(e){this.serverId=Object(K.b)("serverId")||"",this.tenant=Object(K.b)("namespace")||"",this.props.history.push("".concat(e,"?serverId=").concat(this.serverId||"","&dataId=").concat(this.dataId,"&group=").concat(this.group,"&namespace=").concat(this.tenant))}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"getDataDetail",value:function(){var e=this.props.locale,o=void 0===e?{}:e,r=this;this.tenant=Object(K.b)("namespace")||"",this.serverId=Object(K.b)("serverId")||"center";var t="v1/cs/configs?show=all&dataId=".concat(this.dataId,"&group=").concat(this.group);Object(K.c)({url:t,beforeSend:function(){r.openLoading()},success:function(e){if(null!=e){var t=e;r.valueMap.normal=t,r.field.setValue("dataId",t.dataId),r.field.setValue("appName",r.inApp?r.edasAppName:t.appName),r.field.setValue("group",t.group),r.field.setValue("desc",t.desc),r.codeValue=t.content||"";var n=t.type||"text";if(r.setState({configType:n}),r.initMoacoEditor(n,r.codeValue),null!=t.configTags){var a=t.configTags.split(",");r.setConfigTags(a)}r.serverId={}.serverId,r.targetEnvs=[]}else S.a.alert({title:o.wrong,content:e.message})},complete:function(){r.closeLoading()}})}},{key:"goList",value:function(){var e=Object(K.b)("namespace");this.props.history.push("/configurationManagement?serverId=".concat(this.serverId,"&group=").concat(this.searchGroup,"&dataId=").concat(this.searchDataId,"&namespace=").concat(e))}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.commoneditor;n.innerHTML="",this.commoneditor=window.CodeMirror(n,{value:t,mode:e,lineNumbers:!0,theme:"xq-light",lint:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.commoneditor.on("change",this.codemirrorValueChanged.bind(this))}},{key:"codemirrorValueChanged",value:function(e){this.diffeditor&&this.diffeditor.edit.doc.setValue(e.getValue())}},{key:"createDiffCodeMirror",value:function(e,t){var n=this.diffEditorDialog.current.getInstance();n.innerHTML="",this.diffeditor=window.CodeMirror.MergeView(n,{value:e||"",origLeft:null,orig:t||"",lineNumbers:!0,mode:this.mode,theme:"xq-light",highlightDifferences:!0,connect:"align",collapseIdentical:!1})}},{key:"changeConfig",value:function(e){0===e&&(this.createCodeMirror("text",this.codeValue),this.mode="text"),1===e&&(this.createCodeMirror("application/json",this.codeValue),this.mode="application/json"),2===e&&(this.createCodeMirror("xml",this.codeValue),this.mode="xml"),this.setState({configType:e})}},{key:"setCodeValue",value:function(e){this.setState({codeValue:e})}},{key:"toggleDiff",value:function(e){if(e){this.chontenttab.style.display="block";var t=this.commoneditor.doc.getValue();this.diffeditor||this.createDiffCodeMirror(t,this.codeValue)}else this.chontenttab.style.display="none"}},{key:"publishConfig",value:function(){var o=this,e=this.props.locale,r=void 0===e?{}:e;this.field.validate(function(e,t){if(!e){var n="",a=o.state.configType;(n=o.monacoEditor?o.monacoEditor.getValue():o.codeValue)?X.a.validate({content:n,type:a})?o._publishConfig(n):S.a.confirm({content:"配置信息可能有语法错误, 确定提交吗?",onOk:function(){o._publishConfig(n)}}):w.a.error({content:r.submitFailed,align:"cc cc"})}})}},{key:"validateChart",value:function(e,t,n){var a=this.props.locale,o=void 0===a?{}:a;/[@#\$%\^&\*]+/g.test(t)?n(o.vdchart):n()}},{key:"changeEnv",value:function(e){this.targetEnvs=e,this.setState({envvalues:e})}},{key:"changeBeta",value:function(e){this.betaips.style.display=e?"block":"none",this.setState({checkedBeta:e})}},{key:"getIps",value:function(e){this.ips=e,this.setState({ips:e})}},{key:"setConfigTags",value:function(n){5\n com.alibaba.nacos\n nacos-client\n ${latest.version}\n \n*/\npackage com.alibaba.nacos.example;\n\nimport java.util.Properties;\n\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingFactory;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.listener.Event;\nimport com.alibaba.nacos.api.naming.listener.EventListener;\nimport com.alibaba.nacos.api.naming.listener.NamingEvent;\n\n/**\n * @author nkorange\n */\npublic class NamingExample {\n\n public static void main(String[] args) throws NacosException {\n\n Properties properties = new Properties();\n properties.setProperty("serverAddr", System.getProperty("serverAddr"));\n properties.setProperty("namespace", System.getProperty("namespace"));\n\n NamingService naming = NamingFactory.createNamingService(properties);\n\n naming.registerInstance("'.concat(this.record.name,'", "11.11.11.11", 8888, "TEST1");\n\n naming.registerInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.deregisterInstance("').concat(this.record.name,'", "2.2.2.2", 9999, "DEFAULT");\n\n System.out.println(naming.getAllInstances("').concat(this.record.name,'"));\n\n naming.subscribe("').concat(this.record.name,'", new EventListener() {\n @Override\n public void onEvent(Event event) {\n System.out.println(((NamingEvent)event).getServiceName());\n System.out.println(((NamingEvent)event).getInstances());\n }\n });\n }\n}')}},{key:"getSpringCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example\n* pom.xml\n \n com.alibaba.nacos\n nacos-spring-context\n ${latest.version}\n \n*/\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring\npackage com.alibaba.nacos.example.spring;\n\nimport com.alibaba.nacos.api.annotation.NacosProperties;\nimport com.alibaba.nacos.spring.context.annotation.discovery.EnableNacosDiscovery;\nimport org.springframework.context.annotation.Configuration;\n\n@Configuration\n@EnableNacosDiscovery(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848"))\npublic class NacosConfiguration {\n\n}\n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-example/nacos-spring-discovery-example/src/main/java/com/alibaba/nacos/example/spring/controller\npackage com.alibaba.nacos.example.spring.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringBootCode",value:function(e){return'/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example\n* pom.xml\n \n com.alibaba.boot\n nacos-discovery-spring-boot-starter\n ${latest.version}\n \n*/\n/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/resources\n* application.properties\n nacos.discovery.server-addr=127.0.0.1:8848\n*/ \n// Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-boot-example/nacos-spring-boot-discovery-example/src/main/java/com/alibaba/nacos/example/spring/boot/controller\n\npackage com.alibaba.nacos.example.spring.boot.controller;\n\nimport com.alibaba.nacos.api.annotation.NacosInjected;\nimport com.alibaba.nacos.api.exception.NacosException;\nimport com.alibaba.nacos.api.naming.NamingService;\nimport com.alibaba.nacos.api.naming.pojo.Instance;\nimport org.springframework.stereotype.Controller;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestParam;\nimport org.springframework.web.bind.annotation.ResponseBody;\n\nimport java.util.List;\n\nimport static org.springframework.web.bind.annotation.RequestMethod.GET;\n\n@Controller\n@RequestMapping("discovery")\npublic class DiscoveryController {\n\n @NacosInjected\n private NamingService namingService;\n\n @RequestMapping(value = "/get", method = GET)\n @ResponseBody\n public List get(@RequestParam String serviceName) throws NacosException {\n return namingService.getAllInstances(serviceName);\n }\n}'}},{key:"getSpringCloudCode",value:function(e){return"/* Refer to document: https://github.com/nacos-group/nacos-examples/blob/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/\n* pom.xml \n \n org.springframework.cloud\n spring-cloud-starter-alibaba-nacos-discovery\n ${latest.version}\n \n*/\n\n// nacos-spring-cloud-provider-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/resources\n* application.properties\nserver.port=18080\nspring.application.name=".concat(this.record.name,'\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/ \n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-provider-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient \npublic class NacosProviderApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(NacosProviderApplication.class, args);\n}\n\n @RestController\n class EchoController {\n @RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)\n public String echo(@PathVariable String string) {\n return "Hello Nacos Discovery " + string;\n }\n }\n}\n\n// nacos-spring-cloud-consumer-example\n\n/* Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/resources\n* application.properties\nspring.application.name=micro-service-oauth2\nspring.cloud.nacos.discovery.server-addr=127.0.0.1:8848\n*/ \n\n// Refer to document: https://github.com/nacos-group/nacos-examples/tree/master/nacos-spring-cloud-example/nacos-spring-cloud-discovery-example/nacos-spring-cloud-consumer-example/src/main/java/com/alibaba/nacos/example/spring/cloud\npackage com.alibaba.nacos.example.spring.cloud;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.cloud.client.discovery.EnableDiscoveryClient;\nimport org.springframework.cloud.client.loadbalancer.LoadBalanced;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\nimport org.springframework.web.client.RestTemplate;\n\n/**\n * @author xiaojing\n */\n@SpringBootApplication\n@EnableDiscoveryClient\npublic class NacosConsumerApplication {\n\n @LoadBalanced\n @Bean\n public RestTemplate restTemplate() {\n return new RestTemplate();\n }\n\n public static void main(String[] args) {\n SpringApplication.run(NacosConsumerApplication.class, args);\n }\n\n @RestController\n public class TestController {\n\n private final RestTemplate restTemplate;\n\n @Autowired\n public TestController(RestTemplate restTemplate) {this.restTemplate = restTemplate;}\n\n @RequestMapping(value = "/echo/{str}", method = RequestMethod.GET)\n public String echo(@PathVariable String str) {\n return restTemplate.getForObject("http://service-provider/echo/" + str, String.class);\n }\n }\n}')}},{key:"getNodejsCode",value:function(e){return"TODO"}},{key:"getCppCode",value:function(e){return"TODO"}},{key:"getShellCode",value:function(e){return"TODO"}},{key:"getPythonCode",value:function(e){return"TODO"}},{key:"openDialog",value:function(e){var t=this;this.setState({dialogvisible:!0}),this.record=e,setTimeout(function(){t.getData()})}},{key:"closeDialog",value:function(){this.setState({dialogvisible:!1})}},{key:"createCodeMirror",value:function(e,t){var n=this.refs.codepreview;n&&(n.innerHTML="",this.cm=window.CodeMirror(n,{value:t,mode:e,height:400,width:500,lineNumbers:!0,theme:"xq-light",lint:!0,tabMode:"indent",autoMatchParens:!0,textWrapping:!0,gutters:["CodeMirror-lint-markers"],extraKeys:{F1:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){e.getOption("fullScreen")&&e.setOption("fullScreen",!1)}}}),this.cm.setSize("auto","490px"))}},{key:"changeTab",value:function(e,t){var n=this;setTimeout(function(){n[e]=!0,n.createCodeMirror("text/javascript",t)})}},{key:"render",value:function(){var e=this.props.locale,t=void 0===e?{}:e,n=R.a.createElement("div",null);return R.a.createElement("div",null,R.a.createElement(g.a,{title:t.sampleCode,style:{width:"80%"},visible:this.state.dialogvisible,footer:n,onClose:this.closeDialog.bind(this)},R.a.createElement("div",{style:{height:500}},R.a.createElement(b.a,{tip:t.loading,style:{width:"100%"},visible:this.state.loading},R.a.createElement(V.a,{shape:"text",style:{height:40,paddingBottom:10}},R.a.createElement(B,{title:"Java",key:0,onClick:this.changeTab.bind(this,"commoneditor1",this.defaultCode)}),R.a.createElement(B,{title:"Spring",key:1,onClick:this.changeTab.bind(this,"commoneditor1",this.springCode)}),R.a.createElement(B,{title:"Spring Boot",key:2,onClick:this.changeTab.bind(this,"commoneditor2",this.sprigbootCode)}),R.a.createElement(B,{title:"Spring Cloud",key:21,onClick:this.changeTab.bind(this,"commoneditor21",this.sprigcloudCode)}),R.a.createElement(B,{title:"Node.js",key:3,onClick:this.changeTab.bind(this,"commoneditor3",this.nodejsCode)}),R.a.createElement(B,{title:"C++",key:4,onClick:this.changeTab.bind(this,"commoneditor4",this.cppCode)}),R.a.createElement(B,{title:"Shell",key:5,onClick:this.changeTab.bind(this,"commoneditor5",this.shellCode)}),R.a.createElement(B,{title:"Python",key:6,onClick:this.changeTab.bind(this,"commoneditor6",this.pythonCode)})),R.a.createElement("div",{ref:"codepreview"})))))}}]),n}(R.a.Component),o.displayName="ShowServiceCodeing",a=r))||a,U=(n(595),I.a.Item),q=j.a.Row,G=j.a.Col,J=N.a.Column,$=(0,E.a.config)((l=s=function(e){function t(e){var n;return Object(v.a)(this,t),(n=Object(T.a)(this,Object(x.a)(t).call(this,e))).getQueryLater=function(){setTimeout(function(){return n.queryServiceList()})},n.showcode=function(){setTimeout(function(){return n.queryServiceList()})},n.setNowNameSpace=function(e,t){return n.setState({nowNamespaceName:e,nowNamespaceId:t})},n.rowColor=function(e){return{className:e.healthyInstanceCount?"":"row-bg-red"}},n.editServiceDialog=R.a.createRef(),n.showcode=R.a.createRef(),n.state={loading:!1,total:0,pageSize:10,currentPage:1,keyword:"",dataSource:[]},n.field=new _.a(Object(C.a)(n)),n}return Object(L.a)(t,e),Object(S.a)(t,[{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"openEditServiceDialog",value:function(){try{this.editServiceDialog.current.getInstance().show(this.state.service)}catch(e){}}},{key:"queryServiceList",value:function(){var i=this,e=this.state,t=e.currentPage,n=e.pageSize,a=e.keyword,o=e.withInstances,r=["withInstances=".concat(void 0!==o&&o),"pageNo=".concat(t),"pageSize=".concat(n),"keyword=".concat(a)];Object(H.c)({url:"v1/ns/catalog/services?".concat(r.join("&")),beforeSend:function(){return i.openLoading()},success:function(e){var t=0this.state.pageSize&&R.a.createElement("div",{style:{marginTop:10,textAlign:"right"}},R.a.createElement(M.a,{current:this.state.currentPage,total:this.state.total,pageSize:this.state.pageSize,onChange:function(e){return a.setState({currentPage:e},function(){return a.queryServiceList()})}}))),R.a.createElement(K,{ref:this.showcode}),R.a.createElement(F.a,{ref:this.editServiceDialog,openLoading:function(){return a.openLoading()},closeLoading:function(){return a.closeLoading()},queryServiceList:function(){return a.setState({currentPage:1},function(){return a.queryServiceList()})}}))}}]),t}(R.a.Component),s.displayName="ServiceList",i=l))||i;t.a=$},function(e,t,n){"use strict";n(37);var a,o,r,i=n(25),s=n.n(i),l=(n(80),n(48)),u=n.n(l),c=(n(79),n(21)),d=n.n(c),p=(n(34),n(9)),f=n.n(p),h=(n(32),n(10)),m=n.n(h),g=(n(43),n(28)),y=n.n(g),_=n(14),v=n(15),b=n(16),M=n(17),w=n(22),k=n(18),S=(n(26),n(8)),T=n.n(S),x=n(0),C=n.n(x),L=n(54),D=n(1),E=(n(568),(0,T.a.config)((r=o=function(e){function a(e){var t;Object(_.a)(this,a),(t=Object(b.a)(this,Object(M.a)(a).call(this,e))).field=new y.a(Object(w.a)(t)),t.appName=Object(D.b)("appName")||"",t.preAppName=t.appName,t.group=Object(D.b)("group")||"",t.preGroup=t.group,t.dataId=Object(D.b)("dataId")||"",t.preDataId=t.dataId,t.serverId=Object(D.b)("serverId")||"",t.state={value:"",visible:!1,total:0,pageSize:10,currentPage:1,dataSource:[],fieldValue:[],showAppName:!1,showgroup:!1,dataId:t.dataId,group:t.group,appName:t.appName,selectValue:[],loading:!1};var n={dataId:t.dataId||"",group:t.preGroup||"",appName:t.appName||"",serverId:t.serverId||""};return Object(D.d)(n),t}return Object(k.a)(a,e),Object(v.a)(a,[{key:"componentDidMount",value:function(){this.field.setValue("group",this.group),this.field.setValue("dataId",this.dataId)}},{key:"openLoading",value:function(){this.setState({loading:!0})}},{key:"closeLoading",value:function(){this.setState({loading:!1})}},{key:"keyDownSearch",value:function(e){var t=e||window.event;return 13!==(t.keyCode||t.which||t.charCode)||(this.getData(),!1)}},{key:"UNSAFE_componentWillMount",value:function(){window.addEventListener("keydown",this.keyDownSearch.bind(this),!1)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("keydown",this.keyDownSearch.bind(this))}},{key:"onSearch",value:function(){}},{key:"onChange",value:function(){}},{key:"cleanAndGetData",value:function(e){0=t.length?{value:void 0,done:!0}:(e=a(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){var l=n(119),u=n(118);e.exports=function(s){return function(e,t){var n,a,o=String(u(e)),r=l(t),i=o.length;return r<0||i<=r?s?"":void 0:(n=o.charCodeAt(r))<55296||56319=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),r.Arguments=r.Array,a("keys"),a("values"),a("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){e.exports={default:n(391),__esModule:!0}},function(e,t,n){n(392),n(397),n(398),n(399),e.exports=n(63).Symbol},function(e,t,n){"use strict";function a(e){var t=q[e]=E(H[W]);return t._k=e,t}function o(e,t){S(e);for(var n,a=w(t=C(t)),o=0,r=a.length;oo;)c(q,t=n[o++])||t==V||t==h||a.push(t);return a}function l(e){for(var t,n=e===J,a=R(n?G:C(e)),o=[],r=0;a.length>r;)!c(q,t=a[r++])||n&&!c(J,t)||o.push(q[t]);return o}var u=n(57),c=n(65),d=n(64),p=n(87),f=n(153),h=n(393).KEY,m=n(89),g=n(121),y=n(127),_=n(96),v=n(74),b=n(128),M=n(129),w=n(394),k=n(395),S=n(88),T=n(72),x=n(124),C=n(73),L=n(117),D=n(93),E=n(126),O=n(396),N=n(155),Y=n(123),j=n(71),P=n(94),I=N.f,A=j.f,R=O.f,H=u.Symbol,z=u.JSON,F=z&&z.stringify,W="prototype",V=v("_hidden"),B=v("toPrimitive"),K={}.propertyIsEnumerable,U=g("symbol-registry"),q=g("symbols"),G=g("op-symbols"),J=Object[W],$="function"==typeof H&&!!Y.f,Q=u.QObject,X=!Q||!Q[W]||!Q[W].findChild,Z=d&&m(function(){return 7!=E(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a})?function(e,t,n){var a=I(J,t);a&&delete J[t],A(e,t,n),a&&e!==J&&A(J,t,a)}:A,ee=$&&"symbol"==typeof H.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof H},te=function(e,t,n){return e===J&&te(G,t,n),S(e),t=L(t,!0),S(n),c(q,t)?(n.enumerable?(c(e,V)&&e[V][t]&&(e[V][t]=!1),n=E(n,{enumerable:D(0,!1)})):(c(e,V)||A(e,V,D(1,{})),e[V][t]=!0),Z(e,t,n)):A(e,t,n)};$||(f((H=function(e){if(this instanceof H)throw TypeError("Symbol is not a constructor!");var t=_(0ae;)v(ne[ae++]);for(var oe=P(v.store),re=0;oe.length>re;)M(oe[re++]);p(p.S+p.F*!$,"Symbol",{for:function(e){return c(U,e+="")?U[e]:U[e]=H(e)},keyFor:function(e){if(!ee(e))throw TypeError(e+" is not a symbol!");for(var t in U)if(U[t]===e)return t},useSetter:function(){X=!0},useSimple:function(){X=!1}}),p(p.S+p.F*!$,"Object",{create:function(e,t){return void 0===t?E(e):o(E(e),t)},defineProperty:te,defineProperties:o,getOwnPropertyDescriptor:i,getOwnPropertyNames:s,getOwnPropertySymbols:l});var ie=m(function(){Y.f(1)});p(p.S+p.F*ie,"Object",{getOwnPropertySymbols:function(e){return Y.f(x(e))}}),z&&p(p.S+p.F*(!$||m(function(){var e=H();return"[null]"!=F([e])||"{}"!=F({a:e})||"{}"!=F(Object(e))})),"JSON",{stringify:function(e){for(var t,n,a=[e],o=1;oi;)r.call(e,a=o[i++])&&t.push(a);return t}},function(e,t,n){var a=n(151);e.exports=Array.isArray||function(e){return"Array"==a(e)}},function(e,t,n){var a=n(73),o=n(154).f,r={}.toString,i="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return i&&"[object Window]"==r.call(e)?function(e){try{return o(e)}catch(e){return i.slice()}}(e):o(a(e))}},function(e,t){},function(e,t,n){n(129)("asyncIterator")},function(e,t,n){n(129)("observable")},function(e,t,n){e.exports={default:n(401),__esModule:!0}},function(e,t,n){n(402),e.exports=n(63).Object.setPrototypeOf},function(e,t,n){var a=n(87);a(a.S,"Object",{setPrototypeOf:n(403).set})},function(e,t,o){function r(e,t){if(a(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")}var n=o(72),a=o(88);e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,a){try{(a=o(146)(Function.call,o(155).f(Object.prototype,"__proto__").set,2))(e,[]),n=!(e instanceof Array)}catch(e){n=!0}return function(e,t){return r(e,t),n?e.__proto__=t:a(e,t),e}}({},!1):void 0),check:r}},function(e,t,n){e.exports={default:n(405),__esModule:!0}},function(e,t,n){n(406);var a=n(63).Object;e.exports=function(e,t){return a.create(e,t)}},function(e,t,n){var a=n(87);a(a.S,"Object",{create:n(126)})},function(e,t,n){"use strict";
/** @license React v16.8.6
* react.production.min.js
*