diff --git a/pom.xml b/pom.xml index 4ae887e..e803f48 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 org.chrisle.netbeans.plugins NbScratchFile - 1.7.2 + 1.8.0-SNAPSHOT nbm NbScratchFile <h1>Scratch Files for Netbeans (Required JDK 8 > 1.8.0_122 - <a href="https://github.com/Chris2011/NbScratchFile/issues/1#issuecomment-331884374">#1</a>)</h1> @@ -46,6 +46,7 @@ **/ui/tests/** **/ui/node_modules/** **/ui/node/** + **/ui/.tmp/** @@ -82,21 +83,21 @@ 1.6 - install node and npm + install node and yarn - install-node-and-npm + install-node-and-yarn - npm install + yarn install - npm + yarn - npm run build-prod + yarn run build-prod - npm + yarn run build-prod @@ -104,7 +105,8 @@ - v7.5.0 + v10.5.0 + v1.7.0 src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui @@ -119,6 +121,7 @@ ${project.author} ${project.artifactId} https://github.com/Chris2011/NbScratchFile + false true @@ -152,7 +155,7 @@ org.netbeans.html html4j-maven-plugin - 1.3 + 1.5.1 @@ -225,15 +228,46 @@ RELEASE82 - org.netbeans.external - net-java-html-boot + org.netbeans.api + org-netbeans-api-htmlui RELEASE82 jar + + + org.netbeans.external + net-java-html-boot + + + org.netbeans.external + net-java-html-boot-fx + + + org.netbeans.external + net-java-html + + + org.netbeans.external + net-java-html-geo + + + org.netbeans.external + net-java-html-json + + + org.netbeans.api + org-netbeans-libs-javafx + + org.netbeans.api - org-netbeans-api-htmlui + org-openide-modules RELEASE82 + + + org.netbeans.html + net.java.html.boot + 1.3 jar diff --git a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/CreateScratchFile.java b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/CreateScratchFile.java index 90e6d4a..4945f6e 100644 --- a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/CreateScratchFile.java +++ b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/CreateScratchFile.java @@ -1,142 +1,56 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.chrisle.netbeans.plugins.nbscratchfile; -import java.awt.Component; -import java.awt.KeyboardFocusManager; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; -import java.awt.event.WindowEvent; -import java.awt.event.WindowFocusListener; -import javax.swing.JComponent; -import javax.swing.JDialog; -import javax.swing.KeyStroke; -import net.java.html.js.JavaScriptBody; -import org.netbeans.api.htmlui.HTMLComponent; -import org.netbeans.api.htmlui.HTMLDialog; +import org.chrisle.netbeans.plugins.utils.WebViewDialog; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionReferences; import org.openide.awt.ActionRegistration; import org.openide.util.NbBundle.Messages; +/** + * + * @author Chris2011 + */ @ActionID( - category = "Tools", - id = "org.chrisle.netbeans.plugins.nbscratchfile.CreateScratchFile" + category = "Tools", + id = "org.chrisle.netbeans.plugins.nbscratchfile.CreateScratchFile" ) @ActionRegistration( - displayName = "#CTL_CreateScratchFile", - iconBase = "org/chrisle/netbeans/plugins/nbscratchfile/add_file.png" + displayName = "#CTL_CreateScratchFile", + iconBase = "org/chrisle/netbeans/plugins/nbscratchfile/add_file.png" ) @ActionReferences({ - @ActionReference(path = "Menu/File", position = 150) - , + @ActionReference(path = "Menu/File", position = 150), @ActionReference(path = "Shortcuts", name = "DOS-N") }) @Messages("CTL_CreateScratchFile=New Scratch File...") public final class CreateScratchFile implements ActionListener { - private final JDialog dialog; - private final JComponent jfxPanel; - private final NbScratchFileViewModel viewModel; + private static WebViewDialog _dialog; + public static final String viewPath = "/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/index.html"; - public CreateScratchFile() { - dialog = new JDialog(); - viewModel = new NbScratchFileViewModel(dialog); - jfxPanel = Pages.initWebView(viewModel); - initDialog(); + public static void setDialog(WebViewDialog dialog) { + _dialog = dialog; } - private void initDialog() { - dialog.add(jfxPanel); - dialog.setSize(700, 450); - dialog.setResizable(false); - dialog.setAlwaysOnTop(true); - dialog.setUndecorated(true); - dialog.addWindowFocusListener(new WindowFocusListener() { - @Override - public void windowGainedFocus(WindowEvent e) { - } - - @Override - public void windowLostFocus(WindowEvent e) { - dialog.setVisible(false); - } - }); - - dialog.getRootPane().registerKeyboardAction((ActionEvent e1) -> { - dialog.setVisible(false); - }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); - } - - @JavaScriptBody( - args = { "id", "tag", "css" }, body = "\n" - + "var sourceElem = id ? document.getElementById(id) : document.getElementsByTagName(tag)[0];\n" - + "sourceElem.setAttribute('style', css);\n" - + "" - ) - private static native void colorizeElement(String id, String tag, String css); - - /* this would rather be done on the TypeScript side as it doesn't talk to Java: - private void addHoverEffectToElement(Element sourceElem, String newCss, String oldCss) { - ((EventTarget) sourceElem).addEventListener("mouseover", (elem) -> { - sourceElem.setAttribute("style", newCss); - }, false); - - ((EventTarget) sourceElem).addEventListener("mouseout", (elem) -> { - sourceElem.setAttribute("style", oldCss); - }, false); - } - - private void addHoverEffectToElements(NodeList sourceElements, String newCss, String oldCss) { - for (int i = 0; i < sourceElements.getLength(); i++) { - addHoverEffectToElement((Element) sourceElements.item(i), newCss, oldCss); - } - } -*/ - @Override public void actionPerformed(ActionEvent e) { - showDialog(); - } - - @HTMLComponent(url = "/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/index.html", type = JComponent.class) - static void initWebView(NbScratchFileViewModel viewModel) { - exposeModel("NbScratchFileViewModel", viewModel); - - colorizeElement("languageSearch", null, String.format("background-color: %s; color: %s;", viewModel.getColor("TextField.background", false), viewModel.getColor("TextField.foreground", false))); - colorizeElement(null, "body", String.format("background-color: %s;", viewModel.getColor("Menu.background", false))); - colorizeElement(null, "ul", String.format("color: %s;", viewModel.getColor("Label.foreground", false))); - -// addHoverEffectToElements(webEngine.getDocument().getElementsByTagName("li"), String.format("background-color: %s; color: %s;", viewModel.getColor("Menu.background", true), viewModel.getColor("Menu.foreground", true)), String.format("background-color: %s; color: %s;", viewModel.getColor("Menu.background", false), viewModel.getColor("Menu.foreground", false))); - } - - @HTMLDialog(url = "/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/index.html") - static void workaroundNetBeansBug148() { - } - - @JavaScriptBody(args = { "name", "value" }, javacall = true, body = "\n" - + "window[name] = {" - + "setExt : function(ext, languageName) {\n" - + " value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::setExt(Ljava/lang/String;Ljava/lang/String;)(ext, languageName);\n" - + "},\n" - + "getColor : function(colorString, brighter) {\n" - + " return value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::getColor(Ljava/lang/String;Ljava/lang/Boolean;)(colorString, brighter);\n" - + "}\n" - + "};" - ) - private static native void exposeModel(String name, NbScratchFileViewModel value); - - public void showDialog() { - // try to use monitor, where the input focus is - // therefor get the topmost component based on the input focus - Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); - - if (null != focusOwner) { - while (focusOwner.getParent() != null) { - focusOwner = focusOwner.getParent(); - } - } - - dialog.setLocationRelativeTo(focusOwner); - dialog.setVisible(true); + _dialog.showDialog(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/Installer.java b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/Installer.java new file mode 100644 index 0000000..d6340e3 --- /dev/null +++ b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/Installer.java @@ -0,0 +1,51 @@ +package org.chrisle.netbeans.plugins.nbscratchfile; + +import javax.swing.JComponent; +import net.java.html.js.JavaScriptBody; +import org.chrisle.netbeans.plugins.utils.WebViewDialog; +import org.netbeans.api.htmlui.HTMLComponent; +import org.netbeans.api.htmlui.HTMLDialog; +import org.openide.modules.ModuleInstall; +import org.openide.windows.OnShowing; + +@OnShowing +public class Installer extends ModuleInstall implements Runnable { + private NbScratchFileViewModel viewModel; + private static final WebViewDialog dialog = new WebViewDialog(); + + @Override + public void run() { + viewModel = new NbScratchFileViewModel(dialog); + + System.out.println("Init Webview stuff."); + + dialog.init(Pages.initWebView(viewModel, dialog)); + CreateScratchFile.setDialog(dialog); + } + + @HTMLComponent(url = CreateScratchFile.viewPath, type = JComponent.class) + static void initWebView(NbScratchFileViewModel viewModel, WebViewDialog dialog) { + exposeModel("NbScratchFileViewModel", viewModel); + + dialog.colorizeElement("languageSearch", null, String.format("background-color: %s; color: %s;", viewModel.getColor("TextField.background", false), viewModel.getColor("TextField.foreground", false))); + dialog.colorizeElement(null, "body", String.format("background-color: %s;", viewModel.getColor("Menu.background", false))); + dialog.colorizeElement(null, "ul", String.format("color: %s;", viewModel.getColor("Label.foreground", false))); + +// dialog.addHoverEffectToElements(dialog.getWebEngine().getDocument().getElementsByTagName("li"), String.format("background-color: %s; color: %s;", viewModel.getColor("Menu.background", true), viewModel.getColor("Menu.foreground", true)), String.format("background-color: %s; color: %s;", viewModel.getColor("Menu.background", false), viewModel.getColor("Menu.foreground", false))); + } + + @HTMLDialog(url = CreateScratchFile.viewPath) + public static void workaroundNetBeansBug148() {} + + @JavaScriptBody(args = { "name", "value" }, javacall = true, body = "" + + "window[name] = {" + + "setExt : function(ext, languageName) {" + + " value.@org.chrisle.netbeans.plugins.nbscratchfile.NbScratchFileViewModel::setExt(Ljava/lang/String;Ljava/lang/String;)(ext, languageName);" + + "}," + + "getColor : function(colorString, brighter) {" + + " return value.@org.chrisle.netbeans.plugins.utils.BaseWebViewDialogViewModel::getColor(Ljava/lang/String;Ljava/lang/Boolean;)(colorString, brighter);" + + "}" + + "};" + ) + private static native void exposeModel(String name, NbScratchFileViewModel value); +} \ No newline at end of file diff --git a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/NbScratchFileViewModel.java b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/NbScratchFileViewModel.java index d7ec5e3..116b766 100644 --- a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/NbScratchFileViewModel.java +++ b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/NbScratchFileViewModel.java @@ -1,6 +1,20 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.chrisle.netbeans.plugins.nbscratchfile; -import java.awt.Color; import java.io.IOException; import java.nio.file.FileAlreadyExistsException; import java.nio.file.Files; @@ -8,14 +22,18 @@ import java.nio.file.Paths; import javax.swing.JDialog; import javax.swing.JOptionPane; -import javax.swing.UIManager; +import org.chrisle.netbeans.plugins.utils.BaseWebViewDialogViewModel; import org.netbeans.api.actions.Openable; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.loaders.DataObject; import org.openide.util.Exceptions; -public class NbScratchFileViewModel { +/** + * + * @author Chris2011 + */ +public class NbScratchFileViewModel extends BaseWebViewDialogViewModel { private int counter = 1; private final JDialog dialog; @@ -43,12 +61,4 @@ public void setExt(String ext, String languageName) { Exceptions.printStackTrace(ex); } } - - public String getColor(String colorString, Boolean brighter) { - return brighter ? getHex(UIManager.getColor(colorString).brighter()) : getHex(UIManager.getColor(colorString)); - } - - private String getHex(Color rgbColor) { - return String.format("#%s%s%s", Integer.toHexString(rgbColor.getRed()), Integer.toHexString(rgbColor.getGreen()), Integer.toHexString(rgbColor.getBlue())); - } } \ No newline at end of file diff --git a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchFileNodeChildFactory.java b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchFileNodeChildFactory.java index efd8be1..60e9e21 100644 --- a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchFileNodeChildFactory.java +++ b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchFileNodeChildFactory.java @@ -1,3 +1,18 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.chrisle.netbeans.plugins.nbscratchfile.servicenode; import java.io.File; @@ -14,7 +29,7 @@ /** * - * @author Chrl + * @author Chris2011 */ public class ScratchFileNodeChildFactory extends ChildFactory { private final File scratchDir; @@ -32,14 +47,13 @@ protected boolean createKeys(List list) { @Override protected Node createNodeForKey(File key) { - Node result = null; + Node result; try { DataObject dataObject = DataObject.find(FileUtil.toFileObject(key)); result = dataObject.getNodeDelegate(); result.setDisplayName(key.getName()); - } catch (DataObjectNotFoundException ex) { result = new AbstractNode(Children.LEAF, Lookups.singleton(key)); } diff --git a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNode.java b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNode.java index e458e6f..f861ad5 100644 --- a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNode.java +++ b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNode.java @@ -1,15 +1,35 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.chrisle.netbeans.plugins.nbscratchfile.servicenode; import org.netbeans.api.core.ide.ServicesTabNodeRegistration; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; +/** + * + * @author Chris2011 + */ @ServicesTabNodeRegistration( - name = "ScratchRootNode", - displayName = "Scratches", - shortDescription = "Saved scratches", - iconResource = "org/chrisle/netbeans/plugins/nbscratchfile/add_file.png", - position = 2021) + name = "ScratchRootNode", + displayName = "Scratches", + shortDescription = "Saved scratches", + iconResource = "org/chrisle/netbeans/plugins/nbscratchfile/add_file.png", + position = 2021 +) public class ScratchRootNode extends AbstractNode { public ScratchRootNode() { super(Children.create(new ScratchRootNodeChildFactory(), true)); @@ -17,4 +37,4 @@ public ScratchRootNode() { super.setShortDescription("Saved scratches"); super.setIconBaseWithExtension("org/chrisle/netbeans/plugins/nbscratchfile/add_file.png"); } -} \ No newline at end of file +} diff --git a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNodeChildFactory.java b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNodeChildFactory.java index 3cdd2f9..5e0c6a0 100644 --- a/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNodeChildFactory.java +++ b/src/main/java/org/chrisle/netbeans/plugins/nbscratchfile/servicenode/ScratchRootNodeChildFactory.java @@ -1,8 +1,23 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.chrisle.netbeans.plugins.nbscratchfile.servicenode; /** * - * @author Chris + * @author Chris2011 */ import java.io.File; import java.util.Arrays; diff --git a/src/main/java/org/chrisle/netbeans/plugins/utils/BaseWebViewDialogViewModel.java b/src/main/java/org/chrisle/netbeans/plugins/utils/BaseWebViewDialogViewModel.java new file mode 100644 index 0000000..cb8123d --- /dev/null +++ b/src/main/java/org/chrisle/netbeans/plugins/utils/BaseWebViewDialogViewModel.java @@ -0,0 +1,33 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.chrisle.netbeans.plugins.utils; + +import java.awt.Color; +import javax.swing.UIManager; + +/** + * + * @author Chris2011 + */ +public class BaseWebViewDialogViewModel { + public String getColor(String colorString, Boolean brighter) { + return brighter ? getHex(UIManager.getColor(colorString).brighter()) : getHex(UIManager.getColor(colorString)); + } + + private String getHex(Color rgbColor) { + return String.format("#%s%s%s", Integer.toHexString(rgbColor.getRed()), Integer.toHexString(rgbColor.getGreen()), Integer.toHexString(rgbColor.getBlue())); + } +} \ No newline at end of file diff --git a/src/main/java/org/chrisle/netbeans/plugins/utils/WebViewDialog.java b/src/main/java/org/chrisle/netbeans/plugins/utils/WebViewDialog.java new file mode 100644 index 0000000..8c4c1d1 --- /dev/null +++ b/src/main/java/org/chrisle/netbeans/plugins/utils/WebViewDialog.java @@ -0,0 +1,102 @@ +/* + * Copyright 2017 Chris2011. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.chrisle.netbeans.plugins.utils; + +import java.awt.Color; +import java.awt.Component; +import java.awt.KeyboardFocusManager; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.awt.event.WindowEvent; +import java.awt.event.WindowFocusListener; +import javax.swing.JComponent; +import javax.swing.JDialog; +import javax.swing.KeyStroke; +import net.java.html.js.JavaScriptBody; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.w3c.dom.events.Event; +import org.w3c.dom.events.EventTarget; + +/** + * + * @author Chris2011 + */ +public class WebViewDialog extends JDialog { + private static final long serialVersionUID = 5885621373197292877L; + + public void init(JComponent jfxPanel) { + super.add(jfxPanel); + super.setSize(550, 436); + super.setResizable(false); + super.setAlwaysOnTop(true); + super.setUndecorated(true); + super.getRootPane().setOpaque(false); + super.getContentPane().setBackground(new Color(0, 0, 0, 0)); + super.setBackground(new Color(0, 0, 0, 0)); + + super.addWindowFocusListener(new WindowFocusListener() { + @Override + public void windowGainedFocus(WindowEvent e) { + } + + @Override + public void windowLostFocus(WindowEvent e) { + WebViewDialog.this.setVisible(false); + } + }); + + super.getRootPane().registerKeyboardAction((ActionEvent e1) -> { + super.setVisible(false); + }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); + } + + @JavaScriptBody(args = { "id", "tag", "css" }, body = "" + + "var sourceElem = id ? document.getElementById(id) : document.getElementsByTagName(tag)[0];" + + "sourceElem.setAttribute('style', css);") + public native void colorizeElement(String id, String tag, String css); + + private void addHoverEffectToElement(Element sourceElem, String newCss, String oldCss) { + ((EventTarget) sourceElem).addEventListener("mouseover", (Event elem) -> { + sourceElem.setAttribute("style", newCss); + }, false); + + ((EventTarget) sourceElem).addEventListener("mouseout", (Event elem) -> { + sourceElem.setAttribute("style", oldCss); + }, false); + } + + public void addHoverEffectToElements(NodeList sourceElements, String newCss, String oldCss) { + for (int i = 0; i < sourceElements.getLength(); i++) { + addHoverEffectToElement((Element) sourceElements.item(i), newCss, oldCss); + } + } + + public void showDialog() { + // try to use monitor, where the input focus is + // therefor get the topmost component based on the input focus + Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner(); + + if (null != focusOwner) { + while (focusOwner.getParent() != null) { + focusOwner = focusOwner.getParent(); + } + } + + super.setLocationRelativeTo(focusOwner); + super.setVisible(true); + } +} diff --git a/src/main/nbm/manifest.mf b/src/main/nbm/manifest.mf index 165261c..46fccd9 100644 --- a/src/main/nbm/manifest.mf +++ b/src/main/nbm/manifest.mf @@ -1,3 +1,4 @@ Manifest-Version: 1.7.1 OpenIDE-Module-Display-Category: Tools -Built-By: Chris2011 \ No newline at end of file +Built-By: Chris2011 +OpenIDE-Module-Install: org/chrisle/netbeans/plugins/nbscratchfile/Installer.class diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/.gitignore b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/.gitignore new file mode 100644 index 0000000..4cb0818 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/.gitignore @@ -0,0 +1,6 @@ +dist +node_modules +nbproject +/npm-debug.log +.tmp +reports \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/README.md b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/README.md index 54d96b2..ab43129 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/README.md +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/README.md @@ -1,5 +1,5 @@ -# Knockout TypeScript Live Search Sample -This project sample uses TypeScript 2.*, Knockout, Webpack 3.*, Mocha (+Chai assertion lib), Protractor (with Mocha) and Scss. +# Vue TypeScript Live Search Sample +This project sample uses TypeScript 2.*, Vue 2.5, Webpack 4.*, Mocha (+Chai assertion lib), Protractor (with Mocha) and Scss. There is no need to install stuff globally, everything works right inside the sample folder. @@ -13,12 +13,17 @@ npm i The sample uses npm scripts, right inside the package.json * Start the webserver which builds the app, watches for file changes and does a livereload. -The URL is http://localhost:9000/generated/, The server creates a temp folder for the built app -to deliver it to the client (Maybe in memory, I don't know). +The URL is http://localhost:9000/, The server creates a temp folder (in memory) for the built app +to deliver it to the client. ``` npm run serve ``` +* Show local webpack version +``` +npm run ver +``` + * Create a build for development ``` npm run build-dev @@ -39,15 +44,24 @@ npm run test npm run e2e ``` -* Generate SVG sprite from SVG icons folder (app/icons) +* Fast build, to test new stuff fast and simple (Will run only webpack) +``` +npm run fast-build-dev +``` + +* Analyze package sizes ``` -npm run gen-sprite +npm run analyze-package ``` +* Sourcemap explorer +``` +npm run sourcemap-explorer +``` -So basically thats all you have to do to start coding! +* Generate SVG to PNG +``` +npm run svg2png +``` -## Known problems -While using the liveserver for livecoding, atm there is no script to generate the css file from the svg sprite -with all the classes inside of it to use. Atm it is only possible to see the result with icons in the UI after call -`npm run build-dev` and call the index.html file from 'dist' in your browser. \ No newline at end of file +So basically thats all you have to do to start coding! \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/App.vue b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/App.vue new file mode 100644 index 0000000..7fcec80 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/App.vue @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/app.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/app.ts deleted file mode 100644 index 87d70ec..0000000 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/app.ts +++ /dev/null @@ -1,83 +0,0 @@ -import * as ko from 'knockout'; -import {FileType} from "./model/FileType"; -import {LanguageType} from "./model/LanguageType"; -import {LanguageTypesDOMModel} from "./model/LanguageTypesDOMModel"; - -export class App { - private fileTypeWindowViewModel: FileType; - private languageTypesListModel: LanguageTypesDOMModel; - - constructor() { - this.fileTypeWindowViewModel = new FileType([ - new LanguageType('ANTLRv3', 'g', true), - new LanguageType('ANTLRv4', 'g4', true), - new LanguageType('Assembler', 'asm', false), - new LanguageType('Batch', 'bat', false), - new LanguageType('C', 'c', false), - new LanguageType('C#', 'cs', true), - new LanguageType('C++', 'cpp', false), - new LanguageType('CSS', 'css', false), - new LanguageType('Clojure', 'clj', true), - new LanguageType('CoffeeScript', 'coffee', true), - new LanguageType('Dockerfile', '', false), - new LanguageType('Freemarker', 'ftl', true), - new LanguageType('Galen', 'gspec', true), - new LanguageType('GLSL', 'glsl', true), - new LanguageType('Go', 'go', true), - new LanguageType('Groovy', 'groovy', true), - new LanguageType('HAML', 'haml', true), - new LanguageType('Handlebars', 'hbs', true), - new LanguageType('HTML', 'html', false), - new LanguageType('Ini', 'ini', false), - new LanguageType('Jade/Pug', 'pug', false), - new LanguageType('Java', 'java', false), - new LanguageType('JavaScript', 'js', false), - new LanguageType('JavaScript React', 'jsx', false), - new LanguageType('JSP', 'jsp', false), - new LanguageType('JSON', 'json', false), - new LanguageType('Kotlin', 'kt', true), - new LanguageType('Less', 'less', false), - new LanguageType('LISP', 'lisp', true), - new LanguageType('Lua', 'lua', true), - new LanguageType('Makefile', '', false), - new LanguageType('Markdown', 'md', true), - new LanguageType('Perl', 'pl', true), - new LanguageType('PHP', 'php', false), - new LanguageType('Plain Text', 'txt', false), - new LanguageType('PLSQL', 'plsql', true), - new LanguageType('Puppet', 'pp', true), - new LanguageType('Python', 'py', true), - new LanguageType('R', 'r', true), - new LanguageType('Ruby', 'rb', true), - new LanguageType('Rust', 'rs', true), - new LanguageType('Sass', 'sass', false), - new LanguageType('Scala', 'scala', true), - new LanguageType('Scss', 'scss', false), - new LanguageType('Smarty', 'tpl', false), - new LanguageType('SQL', 'sql', false), - new LanguageType('Shell Script', 'sh', true), - new LanguageType('Tex', 'tex', true), - new LanguageType('Twig', 'twig', false), - new LanguageType('TypeScript', 'ts', true), - new LanguageType('TypeScript React', 'tsx', true), - new LanguageType('Vue', 'vue', true), - new LanguageType('XML', 'xml', false), - new LanguageType('XSL', 'xsl', false), - new LanguageType('YAML', 'yaml', false) - ]); - - this.languageTypesListModel = new LanguageTypesDOMModel(); - } - - public main(): void { - this.fileTypeWindowViewModel.Language.subscribe(() => { - this.languageTypesListModel.init(); - }); - - ko.applyBindings(this.fileTypeWindowViewModel); - - this.languageTypesListModel.init(); - this.languageTypesListModel.handleItemSelectionWithArrowKeys(); - this.languageTypesListModel.selectFirstElem(); - } -} \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/LanguageSearchFieldComponent.vue b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/LanguageSearchFieldComponent.vue new file mode 100644 index 0000000..b0ef105 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/LanguageSearchFieldComponent.vue @@ -0,0 +1,72 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/LanguageTypeListComponent.vue b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/LanguageTypeListComponent.vue new file mode 100644 index 0000000..5fe53f4 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/LanguageTypeListComponent.vue @@ -0,0 +1,285 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/model/KeyCode.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/model/KeyCode.ts new file mode 100644 index 0000000..e0d6808 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/model/KeyCode.ts @@ -0,0 +1,5 @@ +export enum KeyCode { + Enter = 13, + Up = 38, + Down = 40 +} \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/LanguageType.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/model/LanguageType.ts similarity index 79% rename from src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/LanguageType.ts rename to src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/model/LanguageType.ts index 5b76de3..6f5e98c 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/LanguageType.ts +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/components/model/LanguageType.ts @@ -2,7 +2,6 @@ * * @author Chrl */ - declare const NbScratchFileViewModel: any; export class LanguageType { @@ -11,7 +10,7 @@ export class LanguageType { private fileExt: string; private isPluginRequired: boolean; - constructor(languageName: string, fileExt: string, isPluginRequired: boolean) { + constructor(languageName: string, fileExt: string, isPluginRequired: boolean = false) { this.icon = fileExt || languageName; this.languageName = languageName; this.fileExt = fileExt || languageName; @@ -34,11 +33,15 @@ export class LanguageType { return this.fileExt.toLowerCase(); } + public get IsPluginRequired(): boolean { + return this.isPluginRequired; + } + public setExt(languageType: LanguageType): void { NbScratchFileViewModel.setExt(languageType.FileExt, languageType.LanguageName); } - public showPluginRequiredMessage(): string { - return this.isPluginRequired ? ' - plugin is required' : ''; - } + // public showPluginRequiredMessage(): string { + // return this.isPluginRequired ? ' - plugin is required' : ''; + // } } \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/bat.old.svg b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/bat.old.svg deleted file mode 100644 index 847d503..0000000 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/bat.old.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/cpp-old.svg b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/cpp-old.svg deleted file mode 100644 index 2246ec8..0000000 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/cpp-old.svg +++ /dev/null @@ -1 +0,0 @@ -file_type_cpp2 \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/mmd.svg b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/mmd.svg new file mode 100644 index 0000000..44d0dea --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/icons/mmd.svg @@ -0,0 +1,30 @@ + + + background + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/index.html b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/index.html index 15c7a31..fe49767 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/index.html +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/index.html @@ -2,26 +2,13 @@ - Knockout TypeScript Live Search Sample + Vue TypeScript Live Search Sample - - - + -
- -
- -
    -
  • -
    - -
    -
    -
  • -
+
diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.scss b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.scss index 587bfb5..9cdf082 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.scss +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.scss @@ -1,76 +1,7 @@ -$body-border-width: 1px; -$input-height: 32px; -$body-height: 448px; -$wrapper-padding: 10px; -$list-height: $body-height - (2 * $body-border-width) - $input-height - (2 * $wrapper-padding); - body { - max-height: $body-height; margin: 0; - border: $body-border-width solid rgba(0, 0, 0, .5); + border: 1px solid rgba(0, 0, 0, .5); font-family: Arial; +} - .wrapper { - padding: $wrapper-padding; - - input { - padding-left: 8px; - border: 1px solid #c8ccd0; - border-radius: 2px; - box-sizing: border-box; - box-shadow: inset 0 0 1px rgba(145, 153, 161, 0.2), 0 0 0 rgba(255, 255, 255, 0); - width: 100%; - font-size: 16px; - outline: none; - height: $input-height; - } - } - - ul { - list-style: none; - margin: 0; - padding: 0; - overflow-y: scroll; - height: auto; - max-height: $list-height; - - li { - padding: .25em 0 0 .75em; - transition: background-color 100ms ease, color 100ms ease; - display: flex; - align-items: center; - - div, label { - display: inline-block; - vertical-align: middle; - } - - .icon { - width: 16px; - height: 16px; - margin-right: .5em; - } - - .small-text { - color: gray; - font-size: 80%; - margin-left: .3em; - } - - &:hover { - background-color: #e0e0e0; - color: darkslategray; - cursor: pointer; - } - - &.selected { - background-color: #2665e5; - color: #fff; - - .small-text { - color: #ccc; - } - } - } - } -} \ No newline at end of file +@import 'sprite.css'; \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.ts index c2c8476..d4dea3f 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.ts +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/main.ts @@ -1,12 +1,14 @@ -import {App} from "./app"; -import {} from './main.scss'; +import Vue from 'vue'; +import './main.scss'; -//import {WebpackRequire} from 'webpack-env'; -// -//declare var require: WebpackRequire; -// -//var files = require.context('./icons', false, /\.svg$/); -//files.keys().forEach(files); +import App from './App.vue'; -const starter: App = new App(); -starter.main(); \ No newline at end of file +new Vue({ + el: '#app', + render(h) { + return h('App'); + }, + components: { + App + } +}); \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/FileType.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/FileType.ts deleted file mode 100644 index fe900e6..0000000 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/FileType.ts +++ /dev/null @@ -1,87 +0,0 @@ -import * as ko from 'knockout'; -import {LanguageType} from "./LanguageType"; - -/** - * - * @author Chris - */ -declare const NbScratchFileViewModel: any; - -export class FileType { - private language: KnockoutObservable; - private languageTypes: KnockoutComputed>; - - private menuBgColor: KnockoutObservable; - private textFieldBgColor: KnockoutObservable; - private textFieldFgColor: KnockoutObservable; - - constructor(languageTypes: Array) { - this.language = ko.observable(''); - this.languageTypes = ko.computed(() => { - var searchTerm = this.language().toLowerCase(); - - return ko.utils.arrayFilter(languageTypes, (languageType: LanguageType) => { - return languageType.LanguageName.toLowerCase().indexOf(searchTerm) >= 0; - }).sort((elem1: LanguageType, elem2: LanguageType) => { - if(elem1.LanguageName > elem2.LanguageName) { - return 1; - } else if(elem1.LanguageName < elem2.LanguageName) { - return -1 - } - - return 0; - }); - // }).filter((languageType: LanguageType) => { - // languageType.LanguageName = this.manipulateString(languageType.LanguageName, searchTerm); - // - // return languageType; - // }); - }, this); - - this.menuBgColor = ko.observable(''); - this.textFieldBgColor = ko.observable(''); - this.textFieldFgColor = ko.observable(''); - } - - // private manipulateString(languageName: string, term: string): string { - // return term ? languageName.replace(term, `${term}`) : languageName - // } - - public get Language(): KnockoutObservable { - return this.language; - } - - public get MenuBgColor(): KnockoutObservable { - let self = this; - - setTimeout(() => { - self.menuBgColor(NbScratchFileViewModel.getColor('Menu.background')); - }, 200); - - return self.menuBgColor; - } - - public get TextFieldBgColor(): KnockoutObservable { - let self = this; - - setTimeout(() => { - self.textFieldBgColor(NbScratchFileViewModel.getColor('TextField.background')); - }, 200); - - return self.textFieldBgColor; - } - - public get TextFieldFgColor(): KnockoutObservable { - let self = this; - - setTimeout(() => { - self.textFieldFgColor(NbScratchFileViewModel.getColor('TextField.foreground')); - }, 200); - - return self.textFieldFgColor; - } - - public get LanguageTypes(): LanguageType[] { - return this.languageTypes(); - } -} \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/LanguageTypesDOMModel.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/LanguageTypesDOMModel.ts deleted file mode 100644 index ec0a74f..0000000 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/model/LanguageTypesDOMModel.ts +++ /dev/null @@ -1,188 +0,0 @@ -enum KeyCode { - Enter = 13, - Up = 38, - Down = 40 -} - -declare const NbScratchFileViewModel: any; - -export class LanguageTypesDOMModel { - private languageTypeList: HTMLUListElement = null; - private languageTypeListItems: NodeListOf; - private firstListElem: HTMLLIElement = null; - private lastListElem: HTMLLIElement = null; - private selectedElem: HTMLLIElement = null; - // private textOfSelectedLiElem: Node = null; - private inputField: HTMLInputElement = null; - - private getIndexOfElem(selectedElem: HTMLLIElement): number { - return [].findIndex.call(this.languageTypeListItems, (elem: HTMLLIElement) => { - return elem === selectedElem; - }); - } - - public init(): void { - this.languageTypeList = document.querySelector('#languageTypes') as HTMLUListElement; - this.languageTypeListItems = document.querySelectorAll('#languageTypes li') as NodeListOf; - this.firstListElem = document.querySelector('#languageTypes > li') as HTMLLIElement; - this.lastListElem = document.querySelector('#languageTypes > li:last-child') as HTMLLIElement; - this.inputField = document.querySelector('input') as HTMLInputElement; - - // TODO: Remove handler of each elem, befor setting again. - [].forEach.call(this.languageTypeListItems, (item: HTMLLIElement) => { - item.addEventListener('click', () => { - this.selectedElem = document.querySelector('.selected') as HTMLLIElement; - - if(this.selectedElem) { - this.selectedElem.classList.toggle('selected'); - } - - item.classList.toggle('selected'); - - // TODO: Test the click handler event. - console.log("clicked"); - - this.inputField.focus(); - }); - }); - } - - public get List(): HTMLUListElement { - return this.languageTypeList; - } - - public get LanguageTypeListItems(): NodeListOf { - return this.languageTypeListItems; - } - - public get SelectedElem(): HTMLLIElement { - return this.selectedElem; - } - - public get PreviousElement(): HTMLLIElement { - return this.selectedElem.previousElementSibling as HTMLLIElement; - } - - public get NextElement(): HTMLLIElement { - return this.selectedElem.nextElementSibling as HTMLLIElement; - } - - public set SelectedElem(value: HTMLLIElement) { - this.selectedElem = value; - } - - public get FirstListElem(): HTMLLIElement { - return this.firstListElem; - } - - public get LastListElem(): HTMLLIElement { - return this.lastListElem; - } - - public moveUp(): void { - if(this.selectedElem) { - if(!this.PreviousElement) { - this.selectedElem.classList.remove('selected'); - - this.selectedElem = this.lastListElem; - // this.textOfSelectedLiElem = this.selectedElem.lastChild; - - this.selectedElem.classList.toggle('selected'); - this.languageTypeList.scrollTop = 800; - } else { - if(this.selectedElem.offsetTop < 450) { - this.languageTypeList.scrollTop = (this.getIndexOfElem(this.selectedElem) / this.selectedElem.offsetHeight); - } - - this.selectedElem.classList.remove('selected'); - - this.selectedElem = this.PreviousElement; - // this.textOfSelectedLiElem = this.selectedElem.lastChild; - - this.selectedElem.classList.toggle('selected'); - } - } else { - this.selectedElem = this.LastListElem; - // this.textOfSelectedLiElem = this.selectedElem.lastChild; - - this.selectedElem.classList.toggle('selected'); - this.languageTypeList.scrollTop = 800; - } - } - - public moveDown(): void { - if(this.selectedElem) { - if(this.selectedElem.offsetTop > 400) { - this.languageTypeList.scrollTop = (this.getIndexOfElem(this.selectedElem) * this.selectedElem.offsetHeight); - } - - if(!this.NextElement) { - this.selectedElem.classList.remove('selected'); - - this.selectedElem = this.FirstListElem; - // this.textOfSelectedLiElem = this.selectedElem.lastChild; - - this.selectedElem.classList.toggle('selected'); - this.languageTypeList.scrollTop = 0; - } else { - this.selectedElem.classList.remove('selected'); - - this.selectedElem = this.NextElement; - // this.textOfSelectedLiElem = this.selectedElem.lastChild; - - this.selectedElem.classList.toggle('selected'); - } - } else { - this.selectedElem = this.FirstListElem; - // this.textOfSelectedLiElem = this.selectedElem.lastChild; - - this.selectedElem.classList.toggle('selected'); - } - } - - public handleItemSelectionWithArrowKeys(): void { - document.querySelector('body').addEventListener('keydown', (e: KeyboardEvent) => { - this.SelectedElem = document.querySelector('.selected') as HTMLLIElement; - - if(e.keyCode === KeyCode.Up) { - e.preventDefault(); - - this.moveUp(); - } else if(e.keyCode === KeyCode.Down) { - e.preventDefault(); - - this.moveDown(); - } - - if(e.keyCode === KeyCode.Enter) { - this.getDataFromSelectedElem(e); - } - }); - } - - public selectFirstElem(): void { - this.inputField.addEventListener('keyup', (e: KeyboardEvent) => { - if(e.keyCode !== KeyCode.Down && e.keyCode !== KeyCode.Up) { - this.selectedElem = document.querySelector('.selected') as HTMLLIElement; - - if(this.selectedElem) { - this.selectedElem.classList.remove('selected'); - } - - if(!!this.inputField.value) { - this.firstListElem && this.firstListElem.classList.add('selected'); - } else { - this.firstListElem && this.firstListElem.classList.remove('selected'); - } - - } - }); - } - - public getDataFromSelectedElem(e: KeyboardEvent): void { - if(this.selectedElem) { - this.inputField.value = ''; - NbScratchFileViewModel.setExt(this.selectedElem.querySelector('.ext').textContent.replace('(', '').replace(')', ''), this.selectedElem.querySelector('.name').textContent); - } - } -} \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/sprite.css b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/sprite.css new file mode 100644 index 0000000..4b3b5d3 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/sprite.css @@ -0,0 +1,58 @@ +[class^='svg-'], [class*=' svg-'] { background-image:url('./sprite.png'); width:16px; height:16px; } +.svg-asm { background-position:0 0; } +.svg-bat { background-position:0 -16px; } +.svg-c { background-position:0 -32px; } +.svg-clj { background-position:0 -48px; } +.svg-coffee { background-position:0 -64px; } +.svg-cpp { background-position:0 -80px; } +.svg-cs { background-position:0 -96px; } +.svg-css { background-position:0 -112px; } +.svg-dockerfile { background-position:0 -128px; } +.svg-ftl { background-position:0 -144px; } +.svg-g { background-position:0 -160px; } +.svg-g4 { background-position:0 -176px; } +.svg-glsl { background-position:0 -192px; } +.svg-go { background-position:0 -208px; } +.svg-groovy { background-position:0 -224px; } +.svg-gspec { background-position:0 -240px; } +.svg-haml { background-position:0 -256px; } +.svg-hbs { background-position:0 -272px; } +.svg-html { background-position:0 -288px; } +.svg-ini { background-position:0 -304px; } +.svg-java { background-position:0 -320px; } +.svg-js { background-position:0 -336px; } +.svg-json { background-position:0 -352px; } +.svg-jsp { background-position:0 -368px; } +.svg-jsx { background-position:0 -384px; } +.svg-kt { background-position:0 -400px; } +.svg-less { background-position:0 -416px; } +.svg-lisp { background-position:0 -432px; } +.svg-lua { background-position:0 -448px; } +.svg-makefile { background-position:0 -464px; } +.svg-md { background-position:0 -480px; } +.svg-mmd { background-position:0 -496px; } +.svg-perl { background-position:0 -512px; } +.svg-php { background-position:0 -528px; } +.svg-pl { background-position:0 -544px; } +.svg-plsql { background-position:0 -560px; } +.svg-pp { background-position:0 -576px; } +.svg-pug { background-position:0 -592px; } +.svg-py { background-position:0 -608px; } +.svg-r { background-position:0 -624px; } +.svg-rb { background-position:0 -640px; } +.svg-rs { background-position:0 -656px; } +.svg-sass { background-position:0 -672px; } +.svg-scala { background-position:0 -688px; } +.svg-scss { background-position:0 -704px; } +.svg-sh { background-position:0 -720px; } +.svg-sql { background-position:0 -736px; } +.svg-sqlite { background-position:0 -752px; } +.svg-tex { background-position:0 -768px; } +.svg-tpl { background-position:0 -784px; } +.svg-ts { background-position:0 -800px; } +.svg-tsx { background-position:0 -816px; } +.svg-twig { background-position:0 -832px; } +.svg-vue { background-position:0 -848px; } +.svg-xml { background-position:0 -864px; } +.svg-xsl { background-position:0 -880px; } +.svg-yaml { background-position:0 -896px; } diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/sprite.png b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/sprite.png new file mode 100644 index 0000000..a2a3f09 Binary files /dev/null and b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/sprite.png differ diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/vue-shim.d.ts b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/vue-shim.d.ts new file mode 100644 index 0000000..ad17f79 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/app/vue-shim.d.ts @@ -0,0 +1,4 @@ +declare module "*.vue" { + import Vue from "vue"; + export default Vue; +} \ No newline at end of file diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/build-scripts/gen-sprite.js b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/build-scripts/gen-sprite.js index e07d93a..a612237 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/build-scripts/gen-sprite.js +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/build-scripts/gen-sprite.js @@ -2,12 +2,12 @@ const nsg = require('node-sprite-generator'); nsg({ src: [ - 'dist/icons/*.png' + '.tmp/icons/*.png' ], compositor: 'jimp', stylesheet: 'prefixed-css', - spritePath: 'dist/sprite.png', - stylesheetPath: 'dist/sprite.css', + spritePath: 'app/sprite.png', + stylesheetPath: 'app/sprite.css', stylesheetOptions: { prefix: 'svg-' } diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/app.js b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/app.js index 0d1aee0..79e3b3d 100644 --- a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/app.js +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/dist/app.js @@ -1,7 +1,28 @@ -!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/generated/",t(t.s=1)}([function(e,t,n){var i,r,o;/*! - * Knockout JavaScript library v3.4.2 - * (c) The Knockout.js team - http://knockoutjs.com/ - * License: MIT (http://www.opensource.org/licenses/mit-license.php) +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=20)}([function(e,t,n){"use strict";n.r(t),function(e,n){ +/*! + * Vue.js v2.5.17 + * (c) 2014-2018 Evan You + * Released under the MIT License. */ -!function(){!function(s){var a=this||(0,eval)("this"),l=a.document,u=a.navigator,c=a.jQuery,d=a.JSON;!function(a){r=[t,n],i=a,(o="function"==typeof i?i.apply(t,r):i)!==s&&(e.exports=o)}(function(e,t){function n(e,t){return!!(null===e||typeof e in y)&&e===t}function i(e,t){var n;return function(){n||(n=v.utils.setTimeout(function(){n=s,e()},t))}}function r(e,t){var n;return function(){clearTimeout(n),n=v.utils.setTimeout(e,t)}}function o(e){var t=this;return e&&v.utils.objectForEach(e,function(e,n){var i=v.extenders[e];"function"==typeof i&&(t=i(t,n)||t)}),t}function p(e,t){t&&t!==h?"beforeChange"===t?this._limitBeforeChange(e):this._origNotifySubscribers(e,t):this._limitChange(e)}function f(e,t){null!==t&&t.dispose&&t.dispose()}function m(e,t){var n=this.computedObservable,i=n[S];i.isDisposed||(this.disposalCount&&this.disposalCandidates[t]?(n.addDependencyTracking(t,e,this.disposalCandidates[t]),this.disposalCandidates[t]=null,--this.disposalCount):i.dependencyTracking[t]||n.addDependencyTracking(t,e,i.isSleeping?{_target:e}:n.subscribeToDependency(e)),e._notificationIsPending&&e._notifyNextChangeIfValueIsDifferent())}function g(e,t,n,i){v.bindingHandlers[e]={init:function(e,r,o,s,a){var l,u;return v.computed(function(){var o=r(),s=v.utils.unwrapObservable(o),c=!n!=!s,d=!u;(d||t||c!==l)&&(d&&v.computedContext.getDependenciesCount()&&(u=v.utils.cloneNodes(v.virtualElements.childNodes(e),!0)),c?(d||v.virtualElements.setDomNodeChildren(e,v.utils.cloneNodes(u)),v.applyBindingsToDescendants(i?i(a,o):a,e)):v.virtualElements.emptyNode(e),l=c)},null,{disposeWhenNodeIsRemoved:e}),{controlsDescendantBindings:!0}}},v.expressionRewriting.bindingRewriteValidators[e]=!1,v.virtualElements.allowedBindings[e]=!0}var v=void 0!==e?e:{};v.exportSymbol=function(e,t){for(var n=e.split("."),i=v,r=0;r4?e:s}(),h=6===y,b=7===y,w=/\S+/g;return{fieldsIncludedWithJsonPost:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],arrayForEach:function(e,t){for(var n=0,i=e.length;n0?e.splice(n,1):0===n&&e.shift()},arrayGetDistinctValues:function(e){e=e||[];for(var t=[],n=0,i=e.length;n0){for(var i=n[0],r=i.parentNode,o=0,s=t.length;o1&&e[e.length-1].parentNode!==t;)e.length--;if(e.length>1){var n=e[0],i=e[e.length-1];for(e.length=0;n!==i;)e.push(n),n=n.nextSibling;e.push(i)}}return e},setOptionNodeSelectionState:function(e,t){y<7?e.setAttribute("selected",t):e.selected=t},stringTrim:function(e){return null===e||e===s?"":e.trim?e.trim():e.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},stringStartsWith:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},domNodeIsContainedBy:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(3===e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},domNodeIsAttachedToDocument:function(e){return v.utils.domNodeIsContainedBy(e,e.ownerDocument.documentElement)},anyDomNodeIsAttachedToDocument:function(e){return!!v.utils.arrayFirst(e,v.utils.domNodeIsAttachedToDocument)},tagNameLower:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},catchFunctionErrors:function(e){return v.onError?function(){try{return e.apply(this,arguments)}catch(e){throw v.onError&&v.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(v.utils.catchFunctionErrors(e),t)},deferError:function(e){setTimeout(function(){throw v.onError&&v.onError(e),e},0)},registerEventHandler:function(e,t,n){var i=v.utils.catchFunctionErrors(n),r=y&&g[t];if(v.options.useOnlyNativeEvents||r||!c)if(r||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw new Error("Browser doesn't support addEventListener or attachEvent");var o=function(t){i.call(e,t)},s="on"+t;e.attachEvent(s,o),v.utils.domNodeDisposal.addDisposeCallback(e,function(){e.detachEvent(s,o)})}else e.addEventListener(t,i,!1);else c(e).bind(t,i)},triggerEvent:function(e,t){if(!e||!e.nodeType)throw new Error("element must be a DOM node when calling triggerEvent");var n=i(e,t);if(v.options.useOnlyNativeEvents||!c||n)if("function"==typeof l.createEvent){if("function"!=typeof e.dispatchEvent)throw new Error("The supplied element doesn't support dispatchEvent");var r=m[t]||"HTMLEvents",o=l.createEvent(r);o.initEvent(t,!0,!0,a,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(o)}else if(n&&e.click)e.click();else{if(void 0===e.fireEvent)throw new Error("Browser doesn't support triggering events");e.fireEvent("on"+t)}else c(e).trigger(t)},unwrapObservable:function(e){return v.isObservable(e)?e():e},peekObservable:function(e){return v.isObservable(e)?e.peek():e},toggleDomNodeCssClass:r,setTextContent:function(e,t){var n=v.utils.unwrapObservable(t);null!==n&&n!==s||(n="");var i=v.virtualElements.firstChild(e);!i||3!=i.nodeType||v.virtualElements.nextSibling(i)?v.virtualElements.setDomNodeChildren(e,[e.ownerDocument.createTextNode(n)]):i.data=n,v.utils.forceRefresh(e)},setElementName:function(e,t){if(e.name=t,y<=7)try{e.mergeAttributes(l.createElement(""),!1)}catch(e){}},forceRefresh:function(e){if(y>=9){var t=1==e.nodeType?e:e.parentNode;t.style&&(t.style.zoom=t.style.zoom)}},ensureSelectElementIsRenderedCorrectly:function(e){if(y){var t=e.style.width;e.style.width=0,e.style.width=t}},range:function(e,t){e=v.utils.unwrapObservable(e),t=v.utils.unwrapObservable(t);for(var n=[],i=e;i<=t;i++)n.push(i);return n},makeArray:function(e){for(var t=[],n=0,i=e.length;n=0;o--)i(n[o])&&r.push(n[o]);return r},parseJson:function(e){return"string"==typeof e&&(e=v.utils.stringTrim(e))?d&&d.parse?d.parse(e):new Function("return "+e)():null},stringifyJson:function(e,t,n){if(!d||!d.stringify)throw new Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return d.stringify(v.utils.unwrapObservable(e),t,n)},postJson:function(t,n,i){i=i||{};var r=i.params||{},o=i.includeFields||this.fieldsIncludedWithJsonPost,s=t;if("object"==typeof t&&"form"===v.utils.tagNameLower(t)){var a=t;s=a.action;for(var u=o.length-1;u>=0;u--)for(var c=v.utils.getFormFields(a,o[u]),d=c.length-1;d>=0;d--)r[c[d].name]=c[d].value}n=v.utils.unwrapObservable(n);var p=l.createElement("form");p.style.display="none",p.action=s,p.method="post";for(var f in n){var m=l.createElement("input");m.type="hidden",m.name=f,m.value=v.utils.stringifyJson(v.utils.unwrapObservable(n[f])),p.appendChild(m)}e(r,function(e,t){var n=l.createElement("input");n.type="hidden",n.name=e,n.value=t,p.appendChild(n)}),l.body.appendChild(p),i.submitter?i.submitter(p):p.submit(),setTimeout(function(){p.parentNode.removeChild(p)},0)}}}(),v.exportSymbol("utils",v.utils),v.exportSymbol("utils.arrayForEach",v.utils.arrayForEach),v.exportSymbol("utils.arrayFirst",v.utils.arrayFirst),v.exportSymbol("utils.arrayFilter",v.utils.arrayFilter),v.exportSymbol("utils.arrayGetDistinctValues",v.utils.arrayGetDistinctValues),v.exportSymbol("utils.arrayIndexOf",v.utils.arrayIndexOf),v.exportSymbol("utils.arrayMap",v.utils.arrayMap),v.exportSymbol("utils.arrayPushAll",v.utils.arrayPushAll),v.exportSymbol("utils.arrayRemoveItem",v.utils.arrayRemoveItem),v.exportSymbol("utils.extend",v.utils.extend),v.exportSymbol("utils.fieldsIncludedWithJsonPost",v.utils.fieldsIncludedWithJsonPost),v.exportSymbol("utils.getFormFields",v.utils.getFormFields),v.exportSymbol("utils.peekObservable",v.utils.peekObservable),v.exportSymbol("utils.postJson",v.utils.postJson),v.exportSymbol("utils.parseJson",v.utils.parseJson),v.exportSymbol("utils.registerEventHandler",v.utils.registerEventHandler),v.exportSymbol("utils.stringifyJson",v.utils.stringifyJson),v.exportSymbol("utils.range",v.utils.range),v.exportSymbol("utils.toggleDomNodeCssClass",v.utils.toggleDomNodeCssClass),v.exportSymbol("utils.triggerEvent",v.utils.triggerEvent),v.exportSymbol("utils.unwrapObservable",v.utils.unwrapObservable),v.exportSymbol("utils.objectForEach",v.utils.objectForEach),v.exportSymbol("utils.addOrRemoveItem",v.utils.addOrRemoveItem),v.exportSymbol("utils.setTextContent",v.utils.setTextContent),v.exportSymbol("unwrap",v.utils.unwrapObservable),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var n=Array.prototype.slice.call(arguments,1);return function(){var i=n.slice(0);return i.push.apply(i,arguments),t.apply(e,i)}}),v.utils.domData=new function(){function e(e,r){var o=e[n];if(!o||"null"===o||!i[o]){if(!r)return s;o=e[n]="ko"+t++,i[o]={}}return i[o]}var t=0,n="__ko__"+(new Date).getTime(),i={};return{get:function(t,n){var i=e(t,!1);return i===s?s:i[n]},set:function(t,n,i){if(i!==s||e(t,!1)!==s){e(t,!0)[n]=i}},clear:function(e){var t=e[n];return!!t&&(delete i[t],e[n]=null,!0)},nextKey:function(){return t+++n}}},v.exportSymbol("utils.domData",v.utils.domData),v.exportSymbol("utils.domData.clear",v.utils.domData.clear),v.utils.domNodeDisposal=new function(){function e(e,t){var n=v.utils.domData.get(e,r);return n===s&&t&&(n=[],v.utils.domData.set(e,r,n)),n}function t(e){v.utils.domData.set(e,r,s)}function n(t){var n=e(t,!1);if(n){n=n.slice(0);for(var r=0;r]/);return t&&p[t[1]]||i}function t(t,n){n||(n=l);var i=n.parentWindow||n.defaultView||a,r=v.utils.stringTrim(t).toLowerCase(),o=n.createElement("div"),s=e(r),u=s[0],c="ignored
"+s[1]+t+s[2]+"
";for("function"==typeof i.innerShiv?o.appendChild(i.innerShiv(c)):(f&&n.appendChild(o),o.innerHTML=c,f&&o.parentNode.removeChild(o));u--;)o=o.lastChild;return v.utils.makeArray(o.lastChild.childNodes)}function n(e,t){if(c.parseHTML)return c.parseHTML(e,t)||[];var n=c.clean([e],t);if(n&&n[0]){for(var i=n[0];i.parentNode&&11!==i.parentNode.nodeType;)i=i.parentNode;i.parentNode&&i.parentNode.removeChild(i)}return n}var i=[0,"",""],r=[1,"","
"],o=[2,"","
"],u=[3,"","
"],d=[1,""],p={thead:r,tbody:r,tfoot:r,tr:o,td:u,th:u,option:d,optgroup:d},f=v.utils.ieVersion<=8;v.utils.parseHtmlFragment=function(e,i){return c?n(e,i):t(e,i)},v.utils.setHtml=function(e,t){if(v.utils.emptyDomNode(e),null!==(t=v.utils.unwrapObservable(t))&&t!==s)if("string"!=typeof t&&(t=t.toString()),c)c(e).html(t);else for(var n=v.utils.parseHtmlFragment(t,e.ownerDocument),i=0;it){if(++n>=5e3){u=o,v.utils.deferError(Error("'Too much recursion' after processing "+n+" task groups."));break}t=o}try{e()}catch(e){v.utils.deferError(e)}}}function t(){e(),u=o=r.length=0}function n(){v.tasks.scheduler(t)}var i,r=[],o=0,s=1,u=0;return i=a.MutationObserver?function(e){var t=l.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(t):l&&"onreadystatechange"in l.createElement("script")?function(e){var t=l.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,l.documentElement.removeChild(t),t=null,e()},l.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},{scheduler:i,schedule:function(e){return o||n(),r[o++]=e,s++},cancel:function(e){var t=e-(s-o);t>=u&&t0?(t.isDifferent(t[w],arguments[0])&&(t.valueWillMutate(),t[w]=arguments[0],t.valueHasMutated()),this):(v.dependencyDetection.registerDependency(t),t[w])}return t[w]=e,v.utils.canSetPrototype||v.utils.extend(t,v.subscribable.fn),v.subscribable.fn.init(t),v.utils.setPrototypeOfOrExtend(t,x),v.options.deferUpdates&&v.extenders.deferred(t,!0),t};var x={equalityComparer:n,peek:function(){return this[w]},valueHasMutated:function(){this.notifySubscribers(this[w])},valueWillMutate:function(){this.notifySubscribers(this[w],"beforeChange")}};v.utils.canSetPrototype&&v.utils.setPrototypeOf(x,v.subscribable.fn);var E=v.observable.protoProperty="__ko_proto__";x[E]=v.observable,v.hasPrototype=function(e,t){return null!==e&&e!==s&&e[E]!==s&&(e[E]===t||v.hasPrototype(e[E],t))},v.isObservable=function(e){return v.hasPrototype(e,v.observable)},v.isWriteableObservable=function(e){return"function"==typeof e&&e[E]===v.observable||!("function"!=typeof e||e[E]!==v.dependentObservable||!e.hasWriteFunction)},v.exportSymbol("observable",v.observable),v.exportSymbol("isObservable",v.isObservable),v.exportSymbol("isWriteableObservable",v.isWriteableObservable),v.exportSymbol("isWritableObservable",v.isWriteableObservable),v.exportSymbol("observable.fn",x),v.exportProperty(x,"peek",x.peek),v.exportProperty(x,"valueHasMutated",x.valueHasMutated),v.exportProperty(x,"valueWillMutate",x.valueWillMutate),v.observableArray=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");var t=v.observable(e);return v.utils.setPrototypeOfOrExtend(t,v.observableArray.fn),t.extend({trackArrayChanges:!0})},v.observableArray.fn={remove:function(e){for(var t=this.peek(),n=[],i="function"!=typeof e||v.isObservable(e)?function(t){return t===e}:e,r=0;r=0}):[]},destroy:function(e){var t=this.peek(),n="function"!=typeof e||v.isObservable(e)?function(t){return t===e}:e;this.valueWillMutate();for(var i=t.length-1;i>=0;i--){n(t[i])&&(t[i]._destroy=!0)}this.valueHasMutated()},destroyAll:function(e){return e===s?this.destroy(function(){return!0}):e?this.destroy(function(t){return v.utils.arrayIndexOf(e,t)>=0}):[]},indexOf:function(e){var t=this();return v.utils.arrayIndexOf(t,e)},replace:function(e,t){var n=this.indexOf(e);n>=0&&(this.valueWillMutate(),this.peek()[n]=t,this.valueHasMutated())}},v.utils.canSetPrototype&&v.utils.setPrototypeOf(v.observableArray.fn,v.observable.fn),v.utils.arrayForEach(["pop","push","reverse","shift","sort","splice","unshift"],function(e){v.observableArray.fn[e]=function(){var t=this.peek();this.valueWillMutate(),this.cacheDiffForKnownOperation(t,e,arguments);var n=t[e].apply(t,arguments);return this.valueHasMutated(),n===t?this:n}}),v.utils.arrayForEach(["slice"],function(e){v.observableArray.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}}),v.exportSymbol("observableArray",v.observableArray);var T="arrayChange";v.extenders.trackArrayChanges=function(e,t){function n(){if(!a){a=!0,o=e.notifySubscribers,e.notifySubscribers=function(e,t){return t&&t!==h||++u,o.apply(this,arguments)};var t=[].concat(e.peek()||[]);l=null,r=e.subscribe(function(n){if(n=[].concat(n||[]),e.hasSubscriptionsForEvent(T))var r=i(t,n);t=n,l=null,u=0,r&&r.length&&e.notifySubscribers(r,T)})}}function i(t,n){return(!l||u>1)&&(l=v.utils.compareArrays(t,n,e.compareArrayOptions)),l}if(e.compareArrayOptions={},t&&"object"==typeof t&&v.utils.extend(e.compareArrayOptions,t),e.compareArrayOptions.sparse=!0,!e.cacheDiffForKnownOperation){var r,o,a=!1,l=null,u=0,c=e.beforeSubscriptionAdd,d=e.afterSubscriptionRemove;e.beforeSubscriptionAdd=function(t){c&&c.call(e,t),t===T&&n()},e.afterSubscriptionRemove=function(t){d&&d.call(e,t),t!==T||e.hasSubscriptionsForEvent(T)||(o&&(e.notifySubscribers=o,o=s),r.dispose(),a=!1)},e.cacheDiffForKnownOperation=function(e,t,n){function i(e,t,n){return r[r.length]={status:e,value:t,index:n}}if(a&&!u){var r=[],o=e.length,s=n.length,c=0;switch(t){case"push":c=o;case"unshift":for(var d=0;d0){if("function"!=typeof r)throw new Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return r.apply(o.evaluatorFunctionTarget,arguments),this}return v.dependencyDetection.registerDependency(i),(o.isDirty||o.isSleeping&&i.haveDependenciesChanged())&&i.evaluateImmediate(),o.latestValue}if("object"==typeof e?n=e:(n=n||{},e&&(n.read=e)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var r=n.write,o={latestValue:s,isStale:!0,isDirty:!0,isBeingEvaluated:!1,suppressDisposalUntilDisposeWhenReturnsFalse:!1,isDisposed:!1,pure:!1,isSleeping:!1,readFunction:n.read,evaluatorFunctionTarget:t||n.owner,disposeWhenNodeIsRemoved:n.disposeWhenNodeIsRemoved||n.disposeWhenNodeIsRemoved||null,disposeWhen:n.disposeWhen||n.disposeWhen,domNodeDisposalCallback:null,dependencyTracking:{},dependenciesCount:0,evaluationTimeoutInstance:null};return i[S]=o,i.hasWriteFunction="function"==typeof r,v.utils.canSetPrototype||v.utils.extend(i,v.subscribable.fn),v.subscribable.fn.init(i),v.utils.setPrototypeOfOrExtend(i,D),n.pure?(o.pure=!0,o.isSleeping=!0,v.utils.extend(i,C)):n.deferEvaluation&&v.utils.extend(i,N),v.options.deferUpdates&&v.extenders.deferred(i,!0),i._options=n,o.disposeWhenNodeIsRemoved&&(o.suppressDisposalUntilDisposeWhenReturnsFalse=!0,o.disposeWhenNodeIsRemoved.nodeType||(o.disposeWhenNodeIsRemoved=null)),o.isSleeping||n.deferEvaluation||i.evaluateImmediate(),o.disposeWhenNodeIsRemoved&&i.isActive()&&v.utils.domNodeDisposal.addDisposeCallback(o.disposeWhenNodeIsRemoved,o.domNodeDisposalCallback=function(){i.dispose()}),i};var D={equalityComparer:n,getDependenciesCount:function(){return this[S].dependenciesCount},addDependencyTracking:function(e,t,n){if(this[S].pure&&t===this)throw Error("A 'pure' computed must not be called recursively");this[S].dependencyTracking[e]=n,n._order=this[S].dependenciesCount++,n._version=t.getVersion()},haveDependenciesChanged:function(){var e,t,n=this[S].dependencyTracking;for(e in n)if(n.hasOwnProperty(e)&&(t=n[e],this._evalDelayed&&t._target._notificationIsPending||t._target.hasChanged(t._version)))return!0},markDirty:function(){this._evalDelayed&&!this[S].isBeingEvaluated&&this._evalDelayed(!1)},isActive:function(){var e=this[S];return e.isDirty||e.dependenciesCount>0},respondToChange:function(){this._notificationIsPending?this[S].isDirty&&(this[S].isStale=!0):this.evaluatePossiblyAsync()},subscribeToDependency:function(e){if(e._deferUpdates&&!this[S].disposeWhenNodeIsRemoved){var t=e.subscribe(this.markDirty,this,"dirty"),n=e.subscribe(this.respondToChange,this);return{_target:e,dispose:function(){t.dispose(),n.dispose()}}}return e.subscribe(this.evaluatePossiblyAsync,this)},evaluatePossiblyAsync:function(){var e=this,t=e.throttleEvaluation;t&&t>=0?(clearTimeout(this[S].evaluationTimeoutInstance),this[S].evaluationTimeoutInstance=v.utils.setTimeout(function(){e.evaluateImmediate(!0)},t)):e._evalDelayed?e._evalDelayed(!0):e.evaluateImmediate(!0)},evaluateImmediate:function(e){var t=this,n=t[S],i=n.disposeWhen,r=!1;if(!n.isBeingEvaluated&&!n.isDisposed){if(n.disposeWhenNodeIsRemoved&&!v.utils.domNodeIsAttachedToDocument(n.disposeWhenNodeIsRemoved)||i&&i()){if(!n.suppressDisposalUntilDisposeWhenReturnsFalse)return void t.dispose()}else n.suppressDisposalUntilDisposeWhenReturnsFalse=!1;n.isBeingEvaluated=!0;try{r=this.evaluateImmediate_CallReadWithDependencyDetection(e)}finally{n.isBeingEvaluated=!1}return n.dependenciesCount||t.dispose(),r}},evaluateImmediate_CallReadWithDependencyDetection:function(e){var t=this,n=t[S],i=!1,r=n.pure?s:!n.dependenciesCount,o={computedObservable:t,disposalCandidates:n.dependencyTracking,disposalCount:n.dependenciesCount};v.dependencyDetection.begin({callbackTarget:o,callback:m,computed:t,isInitial:r}),n.dependencyTracking={},n.dependenciesCount=0;var a=this.evaluateImmediate_CallReadThenEndDependencyDetection(n,o);return t.isDifferent(n.latestValue,a)&&(n.isSleeping||t.notifySubscribers(n.latestValue,"beforeChange"),n.latestValue=a,t._latestValue=a,n.isSleeping?t.updateVersion():e&&t.notifySubscribers(n.latestValue),i=!0),r&&t.notifySubscribers(n.latestValue,"awake"),i},evaluateImmediate_CallReadThenEndDependencyDetection:function(e,t){try{var n=e.readFunction;return e.evaluatorFunctionTarget?n.call(e.evaluatorFunctionTarget):n()}finally{v.dependencyDetection.end(),t.disposalCount&&!e.isSleeping&&v.utils.objectForEach(t.disposalCandidates,f),e.isStale=e.isDirty=!1}},peek:function(e){var t=this[S];return(t.isDirty&&(e||!t.dependenciesCount)||t.isSleeping&&this.haveDependenciesChanged())&&this.evaluateImmediate(),t.latestValue},limit:function(e){v.subscribable.fn.limit.call(this,e),this._evalIfChanged=function(){return this[S].isStale?this.evaluateImmediate():this[S].isDirty=!1,this[S].latestValue},this._evalDelayed=function(e){this._limitBeforeChange(this[S].latestValue),this[S].isDirty=!0,e&&(this[S].isStale=!0),this._limitChange(this)}},dispose:function(){var e=this[S];!e.isSleeping&&e.dependencyTracking&&v.utils.objectForEach(e.dependencyTracking,function(e,t){t.dispose&&t.dispose()}),e.disposeWhenNodeIsRemoved&&e.domNodeDisposalCallback&&v.utils.domNodeDisposal.removeDisposeCallback(e.disposeWhenNodeIsRemoved,e.domNodeDisposalCallback),e.dependencyTracking=null,e.dependenciesCount=0,e.isDisposed=!0,e.isStale=!1,e.isDirty=!1,e.isSleeping=!1,e.disposeWhenNodeIsRemoved=null}},C={beforeSubscriptionAdd:function(e){var t=this,n=t[S];if(!n.isDisposed&&n.isSleeping&&"change"==e){if(n.isSleeping=!1,n.isStale||t.haveDependenciesChanged())n.dependencyTracking=null,n.dependenciesCount=0,t.evaluateImmediate()&&t.updateVersion();else{var i=[];v.utils.objectForEach(n.dependencyTracking,function(e,t){i[t._order]=e}),v.utils.arrayForEach(i,function(e,i){var r=n.dependencyTracking[e],o=t.subscribeToDependency(r._target);o._order=i,o._version=r._version,n.dependencyTracking[e]=o})}n.isDisposed||t.notifySubscribers(n.latestValue,"awake")}},afterSubscriptionRemove:function(e){var t=this[S];t.isDisposed||"change"!=e||this.hasSubscriptionsForEvent("change")||(v.utils.objectForEach(t.dependencyTracking,function(e,n){n.dispose&&(t.dependencyTracking[e]={_target:n._target,_order:n._order,_version:n._version},n.dispose())}),t.isSleeping=!0,this.notifySubscribers(s,"asleep"))},getVersion:function(){var e=this[S];return e.isSleeping&&(e.isStale||this.haveDependenciesChanged())&&this.evaluateImmediate(),v.subscribable.fn.getVersion.call(this)}},N={beforeSubscriptionAdd:function(e){"change"!=e&&"beforeChange"!=e||this.peek()}};v.utils.canSetPrototype&&v.utils.setPrototypeOf(D,v.subscribable.fn);var k=v.observable.protoProperty;v.computed[k]=v.observable,D[k]=v.computed,v.isComputed=function(e){return v.hasPrototype(e,v.computed)},v.isPureComputed=function(e){return v.hasPrototype(e,v.computed)&&e[S]&&e[S].pure},v.exportSymbol("computed",v.computed),v.exportSymbol("dependentObservable",v.computed),v.exportSymbol("isComputed",v.isComputed),v.exportSymbol("isPureComputed",v.isPureComputed),v.exportSymbol("computed.fn",D),v.exportProperty(D,"peek",D.peek),v.exportProperty(D,"dispose",D.dispose),v.exportProperty(D,"isActive",D.isActive),v.exportProperty(D,"getDependenciesCount",D.getDependenciesCount),v.pureComputed=function(e,t){return"function"==typeof e?v.computed(e,t,{pure:!0}):(e=v.utils.extend({},e),e.pure=!0,v.computed(e,t))},v.exportSymbol("pureComputed",v.pureComputed),function(){function e(i,r,o){if(o=o||new n,!!("object"!=typeof(i=r(i))||null===i||i===s||i instanceof RegExp||i instanceof Date||i instanceof String||i instanceof Number||i instanceof Boolean))return i;var a=i instanceof Array?[]:{};return o.save(i,a),t(i,function(t){var n=r(i[t]);switch(typeof n){case"boolean":case"number":case"string":case"function":a[t]=n;break;case"object":case"undefined":var l=o.get(n);a[t]=l!==s?l:e(n,r,o)}}),a}function t(e,t){if(e instanceof Array){for(var n=0;n=0?this.values[n]=t:(this.keys.push(e),this.values.push(t))},get:function(e){var t=v.utils.arrayIndexOf(this.keys,e);return t>=0?this.values[t]:s}}}(),v.exportSymbol("toJS",v.toJS),v.exportSymbol("toJSON",v.toJSON),function(){v.selectExtensions={readValue:function(e){switch(v.utils.tagNameLower(e)){case"option":return!0===e.__ko__hasDomDataOptionValue__?v.utils.domData.get(e,v.bindingHandlers.options.optionValueDomDataKey):v.utils.ieVersion<=7?e.getAttributeNode("value")&&e.getAttributeNode("value").specified?e.value:e.text:e.value;case"select":return e.selectedIndex>=0?v.selectExtensions.readValue(e.options[e.selectedIndex]):s;default:return e.value}},writeValue:function(e,t,n){switch(v.utils.tagNameLower(e)){case"option":switch(typeof t){case"string":v.utils.domData.set(e,v.bindingHandlers.options.optionValueDomDataKey,s),"__ko__hasDomDataOptionValue__"in e&&delete e.__ko__hasDomDataOptionValue__,e.value=t;break;default:v.utils.domData.set(e,v.bindingHandlers.options.optionValueDomDataKey,t),e.__ko__hasDomDataOptionValue__=!0,e.value="number"==typeof t?t:""}break;case"select":""!==t&&null!==t||(t=s);for(var i,r=-1,o=0,a=e.options.length;o=0||t===s&&e.size>1)&&(e.selectedIndex=r);break;default:null!==t&&t!==s||(t=""),e.value=t}}}}(),v.exportSymbol("selectExtensions",v.selectExtensions),v.exportSymbol("selectExtensions.readValue",v.selectExtensions.readValue),v.exportSymbol("selectExtensions.writeValue",v.selectExtensions.writeValue),v.expressionRewriting=function(){function e(e){if(v.utils.arrayIndexOf(i,e)>=0)return!1;var t=e.match(r);return null!==t&&(t[1]?"Object("+t[1]+")"+t[2]:e)}function t(e){var t=v.utils.stringTrim(e);123===t.charCodeAt(0)&&(t=t.slice(1,-1));var n,i=[],r=t.match(o),l=[],u=0;if(r){r.push(",");for(var c,d=0;c=r[d];++d){var p=c.charCodeAt(0);if(44===p){if(u<=0){i.push(n&&l.length?{key:n,value:l.join("")}:{unknown:n||l.join("")}),n=u=0,l=[];continue}}else if(58===p){if(!u&&!n&&1===l.length){n=l.pop();continue}}else if(47===p&&d&&c.length>1){var f=r[d-1].match(s);f&&!a[f[0]]&&(t=t.substr(t.indexOf(c)+1),r=t.match(o),r.push(","),d=-1,c="/")}else 40===p||123===p||91===p?++u:41===p||125===p||93===p?--u:n||l.length||34!==p&&39!==p||(c=c.slice(1,-1));l.push(c)}}return i}function n(n,i){function r(t,n){var i;if(!u){if(!function(e){return!e||!e.preprocess||(n=e.preprocess(n,t,r))}(v.getBindingHandler(t)))return;l[t]&&(i=e(n))&&s.push("'"+t+"':function(_z){"+i+"=_z}")}a&&(n="function(){return "+n+" }"),o.push("'"+t+"':"+n)}i=i||{};var o=[],s=[],a=i.valueAccessors,u=i.bindingParams,c="string"==typeof n?t(n):n;return v.utils.arrayForEach(c,function(e){r(e.key||e.unknown,e.value)}),s.length&&r("_ko_property_writers","{"+s.join(",")+" }"),o.join(",")}var i=["true","false","null","undefined"],r=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,o=RegExp("\"(?:[^\"\\\\]|\\\\.)*\"|'(?:[^'\\\\]|\\\\.)*'|/(?:[^/\\\\]|\\\\.)*/w*|[^\\s:,/][^,\"'{}()/:[\\]]*[^\\s,\"'{}()/:[\\]]|[^\\s]","g"),s=/[\])"'A-Za-z0-9_$]+$/,a={in:1,return:1,typeof:1},l={};return{bindingRewriteValidators:[],twoWayBindings:l,parseObjectLiteral:t,preProcessBindings:n,keyValueArrayContainsKey:function(e,t){for(var n=0;n0?i[i.length-1].nextSibling:e.nextSibling:null}function r(n){var r=n.firstChild,o=null;if(r)do{if(o)o.push(r);else if(e(r)){var s=i(r,!0);s?r=s:o=[r]}else t(r)&&(o=[r])}while(r=r.nextSibling);return o}var o=l&&"\x3c!--test--\x3e"===l.createComment("test").text,s=o?/^$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,a=o?/^$/:/^\s*\/ko\s*$/,u={ul:!0,ol:!0};v.virtualElements={allowedBindings:{},childNodes:function(t){return e(t)?n(t):t.childNodes},emptyNode:function(t){if(e(t))for(var n=v.virtualElements.childNodes(t),i=0,r=n.length;i=0:a?n:o()===n}var o=v.pureComputed(function(){return n.has("checkedValue")?v.utils.unwrapObservable(n.get("checkedValue")):n.has("value")?v.utils.unwrapObservable(n.get("value")):e.value}),a="checkbox"==e.type,l="radio"==e.type;if(a||l){var u=t(),c=a&&v.utils.unwrapObservable(u)instanceof Array,d=!(c&&u.push&&u.splice),p=c?o():s,f=l||c;l&&!e.name&&v.bindingHandlers.uniqueName.init(e,function(){return!0}),v.computed(i,null,{disposeWhenNodeIsRemoved:e}),v.utils.registerEventHandler(e,"click",i),v.computed(r,null,{disposeWhenNodeIsRemoved:e}),u=s}}},v.expressionRewriting.twoWayBindings.checked=!0,v.bindingHandlers.checkedValue={update:function(e,t){e.value=v.utils.unwrapObservable(t())}}}();v.bindingHandlers.css={update:function(e,t){var n=v.utils.unwrapObservable(t());null!==n&&"object"==typeof n?v.utils.objectForEach(n,function(t,n){n=v.utils.unwrapObservable(n),v.utils.toggleDomNodeCssClass(e,t,n)}):(n=v.utils.stringTrim(String(n||"")),v.utils.toggleDomNodeCssClass(e,e.__ko__cssValue,!1),e.__ko__cssValue=n,v.utils.toggleDomNodeCssClass(e,n,!0))}},v.bindingHandlers.enable={update:function(e,t){var n=v.utils.unwrapObservable(t());n&&e.disabled?e.removeAttribute("disabled"):n||e.disabled||(e.disabled=!0)}},v.bindingHandlers.disable={update:function(e,t){v.bindingHandlers.enable.update(e,function(){return!v.utils.unwrapObservable(t())})}},v.bindingHandlers.event={init:function(e,t,n,i,r){var o=t()||{};v.utils.objectForEach(o,function(o){"string"==typeof o&&v.utils.registerEventHandler(e,o,function(e){var s,a=t()[o];if(a){try{var l=v.utils.makeArray(arguments);i=r.$data,l.unshift(i),s=a.apply(i,l)}finally{!0!==s&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1!==n.get(o+"Bubble")||(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}})})}},v.bindingHandlers.foreach={makeTemplateValueAccessor:function(e){return function(){var t=e(),n=v.utils.peekObservable(t);return n&&"number"!=typeof n.length?(v.utils.unwrapObservable(t),{foreach:n.data,as:n.as,includeDestroyed:n.includeDestroyed,afterAdd:n.afterAdd,beforeRemove:n.beforeRemove,afterRender:n.afterRender,beforeMove:n.beforeMove,afterMove:n.afterMove,templateEngine:v.nativeTemplateEngine.instance}):{foreach:t,templateEngine:v.nativeTemplateEngine.instance}}},init:function(e,t,n,i,r){return v.bindingHandlers.template.init(e,v.bindingHandlers.foreach.makeTemplateValueAccessor(t))},update:function(e,t,n,i,r){return v.bindingHandlers.template.update(e,v.bindingHandlers.foreach.makeTemplateValueAccessor(t),n,i,r)}},v.expressionRewriting.bindingRewriteValidators.foreach=!1,v.virtualElements.allowedBindings.foreach=!0;v.bindingHandlers.hasfocus={init:function(e,t,n){var i=function(i){e.__ko_hasfocusUpdating=!0;var r=e.ownerDocument;if("activeElement"in r){var o;try{o=r.activeElement}catch(e){o=r.body}i=o===e}var s=t();v.expressionRewriting.writeValueToProperty(s,n,"hasfocus",i,!0),e.__ko_hasfocusLastValue=i,e.__ko_hasfocusUpdating=!1},r=i.bind(null,!0),o=i.bind(null,!1);v.utils.registerEventHandler(e,"focus",r),v.utils.registerEventHandler(e,"focusin",r),v.utils.registerEventHandler(e,"blur",o),v.utils.registerEventHandler(e,"focusout",o)},update:function(e,t){var n=!!v.utils.unwrapObservable(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===n||(n?e.focus():e.blur(),!n&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),v.dependencyDetection.ignore(v.utils.triggerEvent,null,[e,n?"focusin":"focusout"]))}},v.expressionRewriting.twoWayBindings.hasfocus=!0,v.bindingHandlers.hasFocus=v.bindingHandlers.hasfocus,v.expressionRewriting.twoWayBindings.hasFocus=!0,v.bindingHandlers.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){v.utils.setHtml(e,t())}},g("if"),g("ifnot",!1,!0),g("with",!0,!1,function(e,t){return e.createStaticChildContext(t)});var _={};v.bindingHandlers.options={init:function(e){if("select"!==v.utils.tagNameLower(e))throw new Error("options binding applies only to SELECT elements");for(;e.length>0;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(e,t,n){function i(){return v.utils.arrayFilter(e.options,function(e){return e.selected})}function r(e,t,n){var i=typeof t;return"function"==i?t(e):"string"==i?e[t]:n}function o(t,i,o){o.length&&(h=!m&&o[0].selected?[v.selectExtensions.readValue(o[0])]:[],b=!0);var a=e.ownerDocument.createElement("option");if(t===_)v.utils.setTextContent(a,n.get("optionsCaption")),v.selectExtensions.writeValue(a,s);else{var l=r(t,n.get("optionsValue"),t);v.selectExtensions.writeValue(a,v.utils.unwrapObservable(l));var u=r(t,n.get("optionsText"),l);v.utils.setTextContent(a,u)}return[a]}function a(t,i){if(b&&m)v.selectExtensions.writeValue(e,v.utils.unwrapObservable(n.get("value")),!0);else if(h.length){var r=v.utils.arrayIndexOf(h,v.selectExtensions.readValue(i[0]))>=0;v.utils.setOptionNodeSelectionState(i[0],r),b&&!r&&v.dependencyDetection.ignore(v.utils.triggerEvent,null,[e,"change"])}}var l,u,c=0==e.length,d=e.multiple,p=!c&&d?e.scrollTop:null,f=v.utils.unwrapObservable(t()),m=n.get("valueAllowUnset")&&n.has("value"),g=n.get("optionsIncludeDestroyed"),y={},h=[];m||(d?h=v.utils.arrayMap(i(),v.selectExtensions.readValue):e.selectedIndex>=0&&h.push(v.selectExtensions.readValue(e.options[e.selectedIndex]))),f&&(void 0===f.length&&(f=[f]),u=v.utils.arrayFilter(f,function(e){return g||e===s||null===e||!v.utils.unwrapObservable(e._destroy)}),n.has("optionsCaption")&&null!==(l=v.utils.unwrapObservable(n.get("optionsCaption")))&&l!==s&&u.unshift(_));var b=!1;y.beforeRemove=function(t){e.removeChild(t)};var w=a;n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(w=function(e,t){a(e,t),v.dependencyDetection.ignore(n.get("optionsAfterRender"),null,[t[0],e!==_?e:s])}),v.utils.setDomNodeChildrenFromArrayMapping(e,u,o,y,w),v.dependencyDetection.ignore(function(){if(m)v.selectExtensions.writeValue(e,v.utils.unwrapObservable(n.get("value")),!0);else{var t;t=d?h.length&&i().length=0?v.selectExtensions.readValue(e.options[e.selectedIndex])!==h[0]:h.length||e.selectedIndex>=0,t&&v.utils.triggerEvent(e,"change")}}),v.utils.ensureSelectElementIsRenderedCorrectly(e),p&&Math.abs(p-e.scrollTop)>20&&(e.scrollTop=p)}},v.bindingHandlers.options.optionValueDomDataKey=v.utils.domData.nextKey(),v.bindingHandlers.selectedOptions={after:["options","foreach"],init:function(e,t,n){v.utils.registerEventHandler(e,"change",function(){var i=t(),r=[];v.utils.arrayForEach(e.getElementsByTagName("option"),function(e){e.selected&&r.push(v.selectExtensions.readValue(e))}),v.expressionRewriting.writeValueToProperty(i,n,"selectedOptions",r)})},update:function(e,t){if("select"!=v.utils.tagNameLower(e))throw new Error("values binding applies only to SELECT elements");var n=v.utils.unwrapObservable(t()),i=e.scrollTop;n&&"number"==typeof n.length&&v.utils.arrayForEach(e.getElementsByTagName("option"),function(e){var t=v.utils.arrayIndexOf(n,v.selectExtensions.readValue(e))>=0;e.selected!=t&&v.utils.setOptionNodeSelectionState(e,t)}),e.scrollTop=i}},v.expressionRewriting.twoWayBindings.selectedOptions=!0,v.bindingHandlers.style={update:function(e,t){var n=v.utils.unwrapObservable(t()||{});v.utils.objectForEach(n,function(t,n){n=v.utils.unwrapObservable(n),null!==n&&n!==s&&!1!==n||(n=""),e.style[t]=n})}},v.bindingHandlers.submit={init:function(e,t,n,i,r){if("function"!=typeof t())throw new Error("The value for a submit binding must be a function");v.utils.registerEventHandler(e,"submit",function(n){var i,o=t();try{i=o.call(r.$data,e)}finally{!0!==i&&(n.preventDefault?n.preventDefault():n.returnValue=!1)}})}},v.bindingHandlers.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){v.utils.setTextContent(e,t())}},v.virtualElements.allowedBindings.text=!0,function(){if(a&&a.navigator)var e=function(e){if(e)return parseFloat(e[1])},t=a.opera&&a.opera.version&&parseInt(a.opera.version()),n=a.navigator.userAgent,i=e(n.match(/^(?:(?!chrome).)*version\/([^ ]*) safari/i)),r=e(n.match(/Firefox\/([^ ]*)/));if(v.utils.ieVersion<10)var o=v.utils.domData.nextKey(),l=v.utils.domData.nextKey(),u=function(e){var t=this.activeElement,n=t&&v.utils.domData.get(t,l);n&&n(e)},c=function(e,t){var n=e.ownerDocument;v.utils.domData.get(n,o)||(v.utils.domData.set(n,o,!0),v.utils.registerEventHandler(n,"selectionchange",u)),v.utils.domData.set(e,l,t)};v.bindingHandlers.textInput={init:function(e,n,o){var a,l,u=e.value,d=function(t){clearTimeout(a),l=a=s;var i=e.value;u!==i&&(t&&(e._ko_textInputProcessedEvent=t.type),u=i,v.expressionRewriting.writeValueToProperty(n(),o,"textInput",i))},p=function(t){if(!a){l=e.value;var n=d.bind(e,{type:t.type});a=v.utils.setTimeout(n,4)}},f=9==v.utils.ieVersion?p:d,m=function(){var t=v.utils.unwrapObservable(n());if(null!==t&&t!==s||(t=""),l!==s&&t===l)return void v.utils.setTimeout(m,4);e.value!==t&&(u=t,e.value=t)},g=function(t,n){v.utils.registerEventHandler(e,t,n)};v.bindingHandlers.textInput._forceUpdateOn?v.utils.arrayForEach(v.bindingHandlers.textInput._forceUpdateOn,function(e){"after"==e.slice(0,5)?g(e.slice(5),p):g(e,d)}):v.utils.ieVersion<10?(g("propertychange",function(e){"value"===e.propertyName&&f(e)}),8==v.utils.ieVersion&&(g("keyup",d),g("keydown",d)),v.utils.ieVersion>=8&&(c(e,f),g("dragend",p))):(g("input",d),i<5&&"textarea"===v.utils.tagNameLower(e)?(g("keydown",p),g("paste",p),g("cut",p)):t<11?g("keydown",p):r<4&&(g("DOMAutoComplete",d),g("dragdrop",d),g("drop",d))),g("change",d),v.computed(m,null,{disposeWhenNodeIsRemoved:e})}},v.expressionRewriting.twoWayBindings.textInput=!0,v.bindingHandlers.textinput={preprocess:function(e,t,n){n("textInput",e)}}}(),v.bindingHandlers.uniqueName={init:function(e,t){if(t()){var n="ko_unique_"+ ++v.bindingHandlers.uniqueName.currentIndex;v.utils.setElementName(e,n)}}},v.bindingHandlers.uniqueName.currentIndex=0,v.bindingHandlers.value={after:["options","foreach"],init:function(e,t,n){if("input"==e.tagName.toLowerCase()&&("checkbox"==e.type||"radio"==e.type))return void v.applyBindingAccessorsToNode(e,{checkedValue:t});var i=["change"],r=n.get("valueUpdate"),o=!1,s=null;r&&("string"==typeof r&&(r=[r]),v.utils.arrayPushAll(i,r),i=v.utils.arrayGetDistinctValues(i));var a=function(){s=null,o=!1;var i=t(),r=v.selectExtensions.readValue(e);v.expressionRewriting.writeValueToProperty(i,n,"value",r)};v.utils.ieVersion&&"input"==e.tagName.toLowerCase()&&"text"==e.type&&"off"!=e.autocomplete&&(!e.form||"off"!=e.form.autocomplete)&&-1==v.utils.arrayIndexOf(i,"propertychange")&&(v.utils.registerEventHandler(e,"propertychange",function(){o=!0}),v.utils.registerEventHandler(e,"focus",function(){o=!1}),v.utils.registerEventHandler(e,"blur",function(){o&&a()})),v.utils.arrayForEach(i,function(t){var n=a;v.utils.stringStartsWith(t,"after")&&(n=function(){s=v.selectExtensions.readValue(e),v.utils.setTimeout(a,0)},t=t.substring("after".length)),v.utils.registerEventHandler(e,t,n)});var l=function(){var i=v.utils.unwrapObservable(t()),r=v.selectExtensions.readValue(e);if(null!==s&&i===s)return void v.utils.setTimeout(l,0);if(i!==r)if("select"===v.utils.tagNameLower(e)){var o=n.get("valueAllowUnset"),a=function(){v.selectExtensions.writeValue(e,i,o)};a(),o||i===v.selectExtensions.readValue(e)?v.utils.setTimeout(a,0):v.dependencyDetection.ignore(v.utils.triggerEvent,null,[e,"change"])}else v.selectExtensions.writeValue(e,i)};v.computed(l,null,{disposeWhenNodeIsRemoved:e})},update:function(){}},v.expressionRewriting.twoWayBindings.value=!0,v.bindingHandlers.visible={update:function(e,t){var n=v.utils.unwrapObservable(t()),i=!("none"==e.style.display);n&&!i?e.style.display="":!n&&i&&(e.style.display="none")}},function(e){v.bindingHandlers[e]={init:function(t,n,i,r,o){var s=function(){var t={};return t[e]=n(),t};return v.bindingHandlers.event.init.call(this,t,s,i,r,o)}}}("click"),v.templateEngine=function(){},v.templateEngine.prototype.renderTemplateSource=function(e,t,n,i){throw new Error("Override renderTemplateSource")},v.templateEngine.prototype.createJavaScriptEvaluatorBlock=function(e){throw new Error("Override createJavaScriptEvaluatorBlock")},v.templateEngine.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){t=t||l;var n=t.getElementById(e);if(!n)throw new Error("Cannot find template with ID "+e);return new v.templateSources.domElement(n)}if(1==e.nodeType||8==e.nodeType)return new v.templateSources.anonymousTemplate(e);throw new Error("Unknown template type: "+e)},v.templateEngine.prototype.renderTemplate=function(e,t,n,i){var r=this.makeTemplateSource(e,i);return this.renderTemplateSource(r,t,n,i)},v.templateEngine.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},v.templateEngine.prototype.rewriteTemplate=function(e,t,n){var i=this.makeTemplateSource(e,n),r=t(i.text());i.text(r),i.data("isRewritten",!0)},v.exportSymbol("templateEngine",v.templateEngine),v.templateRewriting=function(){function e(e){for(var t=v.expressionRewriting.bindingRewriteValidators,n=0;n]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=//g;return{ensureTemplateIsRewritten:function(e,t,n){t.isTemplateRewritten(e,n)||t.rewriteTemplate(e,function(e){return v.templateRewriting.memoizeBindingAttributeSyntax(e,t)},n)},memoizeBindingAttributeSyntax:function(e,r){return e.replace(n,function(){return t(arguments[4],arguments[1],arguments[2],r)}).replace(i,function(){return t(arguments[1],"\x3c!-- ko --\x3e","#comment",r)})},applyMemoizedBindingsToNextSibling:function(e,t){return v.memoization.memoize(function(n,i){var r=n.nextSibling;r&&r.nodeName.toLowerCase()===t&&v.applyBindingAccessorsToNode(r,e,i)})}}}(),v.exportSymbol("__tr_ambtns",v.templateRewriting.applyMemoizedBindingsToNextSibling),function(){function e(e){return v.utils.domData.get(e,i)||{}}function t(e,t){v.utils.domData.set(e,i,t)}v.templateSources={};v.templateSources.domElement=function(e){if(this.domElement=e,e){var t=v.utils.tagNameLower(e);this.templateType="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},v.templateSources.domElement.prototype.text=function(){var e=1===this.templateType?"text":2===this.templateType?"value":"innerHTML";if(0==arguments.length)return this.domElement[e];var t=arguments[0];"innerHTML"===e?v.utils.setHtml(this.domElement,t):this.domElement[e]=t};var n=v.utils.domData.nextKey()+"_";v.templateSources.domElement.prototype.data=function(e){if(1===arguments.length)return v.utils.domData.get(this.domElement,n+e);v.utils.domData.set(this.domElement,n+e,arguments[1])};var i=v.utils.domData.nextKey();v.templateSources.domElement.prototype.nodes=function(){var n=this.domElement;if(0==arguments.length){return e(n).containerData||(3===this.templateType?n.content:4===this.templateType?n:s)}t(n,{containerData:arguments[0]})},v.templateSources.anonymousTemplate=function(e){this.domElement=e},v.templateSources.anonymousTemplate.prototype=new v.templateSources.domElement,v.templateSources.anonymousTemplate.prototype.constructor=v.templateSources.anonymousTemplate,v.templateSources.anonymousTemplate.prototype.text=function(){if(0==arguments.length){var n=e(this.domElement);return n.textData===s&&n.containerData&&(n.textData=n.containerData.innerHTML),n.textData}var i=arguments[0];t(this.domElement,{textData:i})},v.exportSymbol("templateSources",v.templateSources),v.exportSymbol("templateSources.domElement",v.templateSources.domElement),v.exportSymbol("templateSources.anonymousTemplate",v.templateSources.anonymousTemplate)}(),function(){function e(e,t,n){for(var i,r=e,o=v.virtualElements.nextSibling(t);r&&(i=r)!==o;)r=v.virtualElements.nextSibling(i),n(i,r)}function t(t,n){if(t.length){var i=t[0],r=t[t.length-1],o=i.parentNode,s=v.bindingProvider.instance,a=s.preprocessNode;if(a){if(e(i,r,function(e,t){var n=e.previousSibling,o=a.call(s,e);o&&(e===i&&(i=o[0]||t),e===r&&(r=o[o.length-1]||n))}),t.length=0,!i)return;i===r?t.push(i):(t.push(i,r),v.utils.fixUpContinuousNodeArray(t,o))}e(i,r,function(e){1!==e.nodeType&&8!==e.nodeType||v.applyBindings(n,e)}),e(i,r,function(e){1!==e.nodeType&&8!==e.nodeType||v.memoization.unmemoizeDomNodeAndDescendants(e,[n])}),v.utils.fixUpContinuousNodeArray(t,o)}}function n(e){return e.nodeType?e:e.length>0?e[0]:null}function i(e,i,r,o,s){s=s||{};var l=e&&n(e),u=(l||r||{}).ownerDocument,c=s.templateEngine||a;v.templateRewriting.ensureTemplateIsRewritten(r,c,u);var d=c.renderTemplate(r,o,s,u);if("number"!=typeof d.length||d.length>0&&"number"!=typeof d[0].nodeType)throw new Error("Template engine must return an array of DOM nodes");var p=!1;switch(i){case"replaceChildren":v.virtualElements.setDomNodeChildren(e,d),p=!0;break;case"replaceNode":v.utils.replaceDomNodes(e,d),p=!0;break;case"ignoreTargetNode":break;default:throw new Error("Unknown renderMode: "+i)}return p&&(t(d,o),s.afterRender&&v.dependencyDetection.ignore(s.afterRender,null,[d,o.$data])),d}function r(e,t,n){return v.isObservable(e)?e():"function"==typeof e?e(t,n):e}function o(e,t){var n=v.utils.domData.get(e,l);n&&"function"==typeof n.dispose&&n.dispose(),v.utils.domData.set(e,l,t&&t.isActive()?t:s)}var a;v.setTemplateEngine=function(e){if(e!=s&&!(e instanceof v.templateEngine))throw new Error("templateEngine must inherit from ko.templateEngine");a=e},v.renderTemplate=function(e,t,o,l,u){if(o=o||{},(o.templateEngine||a)==s)throw new Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var c=n(l),d=function(){return!c||!v.utils.domNodeIsAttachedToDocument(c)},p=c&&"replaceNode"==u?c.parentNode:c;return v.dependentObservable(function(){var s=t&&t instanceof v.bindingContext?t:new v.bindingContext(t,null,null,null,{exportDependencies:!0}),a=r(e,s.$data,s),d=i(l,u,a,s,o);"replaceNode"==u&&(l=d,c=n(l))},null,{disposeWhen:d,disposeWhenNodeIsRemoved:p})}return v.memoization.memoize(function(n){v.renderTemplate(e,t,o,n,"replaceNode")})},v.renderTemplateForEach=function(e,n,o,a,l){var u,c=function(t,n){return u=l.createChildContext(t,o.as,function(e){e.$index=n}),i(null,"ignoreTargetNode",r(e,t,u),u,o)},d=function(e,n,i){t(n,u),o.afterRender&&o.afterRender(n,e),u=null};return v.dependentObservable(function(){var e=v.utils.unwrapObservable(n)||[];void 0===e.length&&(e=[e]);var t=v.utils.arrayFilter(e,function(e){return o.includeDestroyed||e===s||null===e||!v.utils.unwrapObservable(e._destroy)});v.dependencyDetection.ignore(v.utils.setDomNodeChildrenFromArrayMapping,null,[a,t,c,o,d])},null,{disposeWhenNodeIsRemoved:a})};var l=v.utils.domData.nextKey();v.bindingHandlers.template={init:function(e,t){var n=v.utils.unwrapObservable(t());if("string"==typeof n||n.name)v.virtualElements.emptyNode(e);else if("nodes"in n){var i=n.nodes||[];if(v.isObservable(i))throw new Error('The "nodes" option must be a plain, non-observable array.');var r=v.utils.moveCleanedNodesToContainerElement(i);new v.templateSources.anonymousTemplate(e).nodes(r)}else{var o=v.virtualElements.childNodes(e),r=v.utils.moveCleanedNodesToContainerElement(o);new v.templateSources.anonymousTemplate(e).nodes(r)}return{controlsDescendantBindings:!0}},update:function(e,t,n,i,r){var s,a=t(),l=v.utils.unwrapObservable(a),u=!0,c=null;if("string"==typeof l?(s=a,l={}):(s=l.name,"if"in l&&(u=v.utils.unwrapObservable(l.if)),u&&"ifnot"in l&&(u=!v.utils.unwrapObservable(l.ifnot))),"foreach"in l){var d=u&&l.foreach||[];c=v.renderTemplateForEach(s||e,d,l,e,r)}else if(u){var p="data"in l?r.createStaticChildContext(l.data,l.as):r;c=v.renderTemplate(s||e,p,l,e)}else v.virtualElements.emptyNode(e);o(e,c)}},v.expressionRewriting.bindingRewriteValidators.template=function(e){var t=v.expressionRewriting.parseObjectLiteral(e);return 1==t.length&&t[0].unknown?null:v.expressionRewriting.keyValueArrayContainsKey(t,"name")?null:"This template engine does not support anonymous templates nested within its templates"},v.virtualElements.allowedBindings.template=!0}(),v.exportSymbol("setTemplateEngine",v.setTemplateEngine),v.exportSymbol("renderTemplate",v.renderTemplate),v.utils.findMovesInArrayComparison=function(e,t,n){if(e.length&&t.length){var i,r,o,s,a;for(i=r=0;(!n||i0&&(v.utils.replaceDomNodes(o,s),i&&v.dependencyDetection.ignore(i,null,[n,s,r])),o.length=0,v.utils.arrayPushAll(o,s)},null,{disposeWhenNodeIsRemoved:e,disposeWhen:function(){return!v.utils.anyDomNodeIsAttachedToDocument(o)}});return{mappedNodes:o,dependentObservable:a.isActive()?a:s}}var t=v.utils.domData.nextKey(),n=v.utils.domData.nextKey();v.utils.setDomNodeChildrenFromArrayMapping=function(i,r,o,a,l){function u(e,t){d=g[t],x!==t&&(D[e]=d),d.indexObservable(x++),v.utils.fixUpContinuousNodeArray(d.mappedNodes,i),b.push(d),T.push(d)}function c(e,t){if(e)for(var n=0,i=t.length;n=0)return 2}catch(e){}return 1}();this.renderTemplateSource=function(n,i,r,o){o=o||l,r=r||{},e();var s=n.data("precompiled");if(!s){var a=n.text()||"";a="{{ko_with $item.koBindingContext}}"+a+"{{/ko_with}}",s=c.template(null,a),n.data("precompiled",s)}var u=[i.$data],d=c.extend({koBindingContext:i},r.templateOptions),p=t(s,u,d);return p.appendTo(o.createElement("div")),c.fragments={},p},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){l.write(" + + + + + +
+ + + diff --git a/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/reports/webpack-bundle-analyzer/stats.json b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/reports/webpack-bundle-analyzer/stats.json new file mode 100644 index 0000000..08e2ce6 --- /dev/null +++ b/src/main/resources/org/chrisle/netbeans/plugins/nbscratchfile/ui/reports/webpack-bundle-analyzer/stats.json @@ -0,0 +1,6672 @@ +{ + "errors": [ + ], + "warnings": [ + ], + "version": "4.16.5", + "hash": "558ee36404d770cf7698", + "time": 8409, + "builtAt": 1535100007259, + "publicPath": "/", + "outputPath": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\dist", + "assetsByChunkName": { + "main": [ + "app.js", + "app.js.map" + ] + }, + "assets": [ + { + "name": "app.js", + "size": 107101, + "chunks": [ + 0 + ], + "chunkNames": [ + "main" + ], + "emitted": true + } + ], + "filteredAssets": 0, + "entrypoints": { + "main": { + "chunks": [ + 0 + ], + "assets": [ + "app.js", + "app.js.map" + ], + "children": { + }, + "childAssets": { + } + } + }, + "namedChunkGroups": { + "main": { + "chunks": [ + 0 + ], + "assets": [ + "app.js", + "app.js.map" + ], + "children": { + }, + "childAssets": { + } + } + }, + "chunks": [ + { + "id": 0, + "rendered": true, + "initial": true, + "entry": true, + "size": 347236, + "names": [ + "main" + ], + "files": [ + "app.js", + "app.js.map" + ], + "hash": "5bee08e6ad1327734342", + "siblings": [ + ], + "parents": [ + ], + "children": [ + ], + "childrenByOrder": { + }, + "modules": [ + { + "id": 0, + "identifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue\\dist\\vue.runtime.esm.js", + "name": "./node_modules/vue/dist/vue.runtime.esm.js", + "index": 1, + "index2": 4, + "size": 211990, + "cacheable": true, + "built": true, + "optional": false, + "prefetched": false, + "chunks": [ + 0 + ], + "issuer": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\babel-loader\\lib\\index.js!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\ts-loader\\index.js??ref--1-1!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\app\\main.ts", + "issuerId": 20, + "issuerName": "./app/main.ts", + "issuerPath": [ + { + "id": 20, + "identifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\babel-loader\\lib\\index.js!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\ts-loader\\index.js??ref--1-1!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\app\\main.ts", + "name": "./app/main.ts" + } + ], + "failed": false, + "errors": 0, + "warnings": 0, + "assets": [ + ], + "reasons": [ + { + "moduleId": 1, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue-class-component\\dist\\vue-class-component.common.js", + "module": "./node_modules/vue-class-component/dist/vue-class-component.common.js", + "moduleName": "./node_modules/vue-class-component/dist/vue-class-component.common.js", + "type": "cjs require", + "userRequest": "vue", + "loc": "12:26-40" + }, + { + "moduleId": 6, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\babel-loader\\lib\\index.js!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\ts-loader\\index.js??ref--1-1!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\app\\App.vue?vue&type=script&lang=ts&", + "module": "./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--1-1!./node_modules/vue-loader/lib??vue-loader-options!./app/App.vue?vue&type=script&lang=ts&", + "moduleName": "./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--1-1!./node_modules/vue-loader/lib??vue-loader-options!./app/App.vue?vue&type=script&lang=ts&", + "type": "cjs require", + "userRequest": "vue", + "loc": "22:12-26" + }, + { + "moduleId": 8, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\babel-loader\\lib\\index.js!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\ts-loader\\index.js??ref--1-1!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\app\\components\\LanguageSearchFieldComponent.vue?vue&type=script&lang=ts&", + "module": "./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--1-1!./node_modules/vue-loader/lib??vue-loader-options!./app/components/LanguageSearchFieldComponent.vue?vue&type=script&lang=ts&", + "moduleName": "./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--1-1!./node_modules/vue-loader/lib??vue-loader-options!./app/components/LanguageSearchFieldComponent.vue?vue&type=script&lang=ts&", + "type": "cjs require", + "userRequest": "vue", + "loc": "22:12-26" + }, + { + "moduleId": 11, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\babel-loader\\lib\\index.js!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\ts-loader\\index.js??ref--1-1!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\app\\components\\LanguageTypeListComponent.vue?vue&type=script&lang=ts&", + "module": "./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--1-1!./node_modules/vue-loader/lib??vue-loader-options!./app/components/LanguageTypeListComponent.vue?vue&type=script&lang=ts&", + "moduleName": "./node_modules/babel-loader/lib!./node_modules/ts-loader??ref--1-1!./node_modules/vue-loader/lib??vue-loader-options!./app/components/LanguageTypeListComponent.vue?vue&type=script&lang=ts&", + "type": "cjs require", + "userRequest": "vue", + "loc": "22:12-26" + }, + { + "moduleId": 14, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue-property-decorator\\lib\\vue-property-decorator.js", + "module": "./node_modules/vue-property-decorator/lib/vue-property-decorator.js", + "moduleName": "./node_modules/vue-property-decorator/lib/vue-property-decorator.js", + "type": "harmony side effect evaluation", + "userRequest": "vue", + "loc": "3:0-22" + }, + { + "moduleId": 14, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\vue-property-decorator\\lib\\vue-property-decorator.js", + "module": "./node_modules/vue-property-decorator/lib/vue-property-decorator.js", + "moduleName": "./node_modules/vue-property-decorator/lib/vue-property-decorator.js", + "type": "harmony export imported specifier", + "userRequest": "vue", + "loc": "6:0-26" + }, + { + "moduleId": 20, + "moduleIdentifier": "C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\babel-loader\\lib\\index.js!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\node_modules\\ts-loader\\index.js??ref--1-1!C:\\Projekte\\Netbeans Plugins\\NbScratchFile\\src\\main\\resources\\org\\chrisle\\netbeans\\plugins\\nbscratchfile\\ui\\app\\main.ts", + "module": "./app/main.ts", + "moduleName": "./app/main.ts", + "type": "cjs require", + "userRequest": "vue", + "loc": "4:12-26" + } + ], + "usedExports": true, + "providedExports": [ + "default" + ], + "optimizationBailout": [ + "ModuleConcatenation bailout: Module uses injected variables (global, setImmediate)" + ], + "depth": 1, + "source": "/*!\n * Vue.js v2.5.17\n * (c) 2014-2018 Evan You\n * Released under the MIT License.\n */\n/* */\n\nvar emptyObject = Object.freeze({});\n\n// these helpers produces better vm code in JS engines due to their\n// explicitness and function inlining\nfunction isUndef (v) {\n return v === undefined || v === null\n}\n\nfunction isDef (v) {\n return v !== undefined && v !== null\n}\n\nfunction isTrue (v) {\n return v === true\n}\n\nfunction isFalse (v) {\n return v === false\n}\n\n/**\n * Check if value is primitive\n */\nfunction isPrimitive (value) {\n return (\n typeof value === 'string' ||\n typeof value === 'number' ||\n // $flow-disable-line\n typeof value === 'symbol' ||\n typeof value === 'boolean'\n )\n}\n\n/**\n * Quick object check - this is primarily used to tell\n * Objects from primitive values when we know the value\n * is a JSON-compliant type.\n */\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\n/**\n * Get the raw type string of a value e.g. [object Object]\n */\nvar _toString = Object.prototype.toString;\n\nfunction toRawType (value) {\n return _toString.call(value).slice(8, -1)\n}\n\n/**\n * Strict object type check. Only returns true\n * for plain JavaScript objects.\n */\nfunction isPlainObject (obj) {\n return _toString.call(obj) === '[object Object]'\n}\n\nfunction isRegExp (v) {\n return _toString.call(v) === '[object RegExp]'\n}\n\n/**\n * Check if val is a valid array index.\n */\nfunction isValidArrayIndex (val) {\n var n = parseFloat(String(val));\n return n >= 0 && Math.floor(n) === n && isFinite(val)\n}\n\n/**\n * Convert a value to a string that is actually rendered.\n */\nfunction toString (val) {\n return val == null\n ? ''\n : typeof val === 'object'\n ? JSON.stringify(val, null, 2)\n : String(val)\n}\n\n/**\n * Convert a input value to a number for persistence.\n * If the conversion fails, return original string.\n */\nfunction toNumber (val) {\n var n = parseFloat(val);\n return isNaN(n) ? val : n\n}\n\n/**\n * Make a map and return a function for checking if a key\n * is in that map.\n */\nfunction makeMap (\n str,\n expectsLowerCase\n) {\n var map = Object.create(null);\n var list = str.split(',');\n for (var i = 0; i < list.length; i++) {\n map[list[i]] = true;\n }\n return expectsLowerCase\n ? function (val) { return map[val.toLowerCase()]; }\n : function (val) { return map[val]; }\n}\n\n/**\n * Check if a tag is a built-in tag.\n */\nvar isBuiltInTag = makeMap('slot,component', true);\n\n/**\n * Check if a attribute is a reserved attribute.\n */\nvar isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');\n\n/**\n * Remove an item from an array\n */\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\n/**\n * Check whether the object has the property.\n */\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached (fn) {\n var cache = Object.create(null);\n return (function cachedFn (str) {\n var hit = cache[str];\n return hit || (cache[str] = fn(str))\n })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })\n});\n\n/**\n * Capitalize a string.\n */\nvar capitalize = cached(function (str) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n});\n\n/**\n * Hyphenate a camelCase string.\n */\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = cached(function (str) {\n return str.replace(hyphenateRE, '-$1').toLowerCase()\n});\n\n/**\n * Simple bind polyfill for environments that do not support it... e.g.\n * PhantomJS 1.x. Technically we don't need this anymore since native bind is\n * now more performant in most browsers, but removing it would be breaking for\n * code that was able to run in PhantomJS 1.x, so this must be kept for\n * backwards compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind (fn, ctx) {\n function boundFn (a) {\n var l = arguments.length;\n return l\n ? l > 1\n ? fn.apply(ctx, arguments)\n : fn.call(ctx, a)\n : fn.call(ctx)\n }\n\n boundFn._length = fn.length;\n return boundFn\n}\n\nfunction nativeBind (fn, ctx) {\n return fn.bind(ctx)\n}\n\nvar bind = Function.prototype.bind\n ? nativeBind\n : polyfillBind;\n\n/**\n * Convert an Array-like object to a real Array.\n */\nfunction toArray (list, start) {\n start = start || 0;\n var i = list.length - start;\n var ret = new Array(i);\n while (i--) {\n ret[i] = list[i + start];\n }\n return ret\n}\n\n/**\n * Mix properties into target object.\n */\nfunction extend (to, _from) {\n for (var key in _from) {\n to[key] = _from[key];\n }\n return to\n}\n\n/**\n * Merge an Array of Objects into a single Object.\n */\nfunction toObject (arr) {\n var res = {};\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]) {\n extend(res, arr[i]);\n }\n }\n return res\n}\n\n/**\n * Perform no operation.\n * Stubbing args to make Flow happy without leaving useless transpiled code\n * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)\n */\nfunction noop (a, b, c) {}\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) { return false; };\n\n/**\n * Return same value\n */\nvar identity = function (_) { return _; };\n\n/**\n * Generate a static keys string from compiler modules.\n */\n\n\n/**\n * Check if two values are loosely equal - that is,\n * if they are plain objects, do they have the same shape?\n */\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = Array.isArray(a);\n var isArrayB = Array.isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\nfunction looseIndexOf (arr, val) {\n for (var i = 0; i < arr.length; i++) {\n if (looseEqual(arr[i], val)) { return i }\n }\n return -1\n}\n\n/**\n * Ensure a function is called only once.\n */\nfunction once (fn) {\n var called = false;\n return function () {\n if (!called) {\n called = true;\n fn.apply(this, arguments);\n }\n }\n}\n\nvar SSR_ATTR = 'data-server-rendered';\n\nvar ASSET_TYPES = [\n 'component',\n 'directive',\n 'filter'\n];\n\nvar LIFECYCLE_HOOKS = [\n 'beforeCreate',\n 'created',\n 'beforeMount',\n 'mounted',\n 'beforeUpdate',\n 'updated',\n 'beforeDestroy',\n 'destroyed',\n 'activated',\n 'deactivated',\n 'errorCaptured'\n];\n\n/* */\n\nvar config = ({\n /**\n * Option merge strategies (used in core/util/options)\n */\n // $flow-disable-line\n optionMergeStrategies: Object.create(null),\n\n /**\n * Whether to suppress warnings.\n */\n silent: false,\n\n /**\n * Show production mode tip message on boot?\n */\n productionTip: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to enable devtools\n */\n devtools: process.env.NODE_ENV !== 'production',\n\n /**\n * Whether to record perf\n */\n performance: false,\n\n /**\n * Error handler for watcher errors\n */\n errorHandler: null,\n\n /**\n * Warn handler for watcher warns\n */\n warnHandler: null,\n\n /**\n * Ignore certain custom elements\n */\n ignoredElements: [],\n\n /**\n * Custom user key aliases for v-on\n */\n // $flow-disable-line\n keyCodes: Object.create(null),\n\n /**\n * Check if a tag is reserved so that it cannot be registered as a\n * component. This is platform-dependent and may be overwritten.\n */\n isReservedTag: no,\n\n /**\n * Check if an attribute is reserved so that it cannot be used as a component\n * prop. This is platform-dependent and may be overwritten.\n */\n isReservedAttr: no,\n\n /**\n * Check if a tag is an unknown element.\n * Platform-dependent.\n */\n isUnknownElement: no,\n\n /**\n * Get the namespace of an element\n */\n getTagNamespace: noop,\n\n /**\n * Parse the real tag name for the specific platform.\n */\n parsePlatformTagName: identity,\n\n /**\n * Check if an attribute must be bound using property, e.g. value\n * Platform-dependent.\n */\n mustUseProp: no,\n\n /**\n * Exposed for legacy reasons\n */\n _lifecycleHooks: LIFECYCLE_HOOKS\n})\n\n/* */\n\n/**\n * Check if a string starts with $ or _\n */\nfunction isReserved (str) {\n var c = (str + '').charCodeAt(0);\n return c === 0x24 || c === 0x5F\n}\n\n/**\n * Define a property.\n */\nfunction def (obj, key, val, enumerable) {\n Object.defineProperty(obj, key, {\n value: val,\n enumerable: !!enumerable,\n writable: true,\n configurable: true\n });\n}\n\n/**\n * Parse simple path.\n */\nvar bailRE = /[^\\w.$]/;\nfunction parsePath (path) {\n if (bailRE.test(path)) {\n return\n }\n var segments = path.split('.');\n return function (obj) {\n for (var i = 0; i < segments.length; i++) {\n if (!obj) { return }\n obj = obj[segments[i]];\n }\n return obj\n }\n}\n\n/* */\n\n// can we use __proto__?\nvar hasProto = '__proto__' in {};\n\n// Browser environment sniffing\nvar inBrowser = typeof window !== 'undefined';\nvar inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;\nvar weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();\nvar UA = inBrowser && window.navigator.userAgent.toLowerCase();\nvar isIE = UA && /msie|trident/.test(UA);\nvar isIE9 = UA && UA.indexOf('msie 9.0') > 0;\nvar isEdge = UA && UA.indexOf('edge/') > 0;\nvar isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');\nvar isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');\nvar isChrome = UA && /chrome\\/\\d+/.test(UA) && !isEdge;\n\n// Firefox has a \"watch\" function on Object.prototype...\nvar nativeWatch = ({}).watch;\n\nvar supportsPassive = false;\nif (inBrowser) {\n try {\n var opts = {};\n Object.defineProperty(opts, 'passive', ({\n get: function get () {\n /* istanbul ignore next */\n supportsPassive = true;\n }\n })); // https://github.com/facebook/flow/issues/285\n window.addEventListener('test-passive', null, opts);\n } catch (e) {}\n}\n\n// this needs to be lazy-evaled because vue may be required before\n// vue-server-renderer can set VUE_ENV\nvar _isServer;\nvar isServerRendering = function () {\n if (_isServer === undefined) {\n /* istanbul ignore if */\n if (!inBrowser && !inWeex && typeof global !== 'undefined') {\n // detect presence of vue-server-renderer and avoid\n // Webpack shimming the process\n _isServer = global['process'].env.VUE_ENV === 'server';\n } else {\n _isServer = false;\n }\n }\n return _isServer\n};\n\n// detect devtools\nvar devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;\n\n/* istanbul ignore next */\nfunction isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}\n\nvar hasSymbol =\n typeof Symbol !== 'undefined' && isNative(Symbol) &&\n typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);\n\nvar _Set;\n/* istanbul ignore if */ // $flow-disable-line\nif (typeof Set !== 'undefined' && isNative(Set)) {\n // use native Set when available.\n _Set = Set;\n} else {\n // a non-standard Set polyfill that only works with primitive keys.\n _Set = (function () {\n function Set () {\n this.set = Object.create(null);\n }\n Set.prototype.has = function has (key) {\n return this.set[key] === true\n };\n Set.prototype.add = function add (key) {\n this.set[key] = true;\n };\n Set.prototype.clear = function clear () {\n this.set = Object.create(null);\n };\n\n return Set;\n }());\n}\n\n/* */\n\nvar warn = noop;\nvar tip = noop;\nvar generateComponentTrace = (noop); // work around flow check\nvar formatComponentName = (noop);\n\nif (process.env.NODE_ENV !== 'production') {\n var hasConsole = typeof console !== 'undefined';\n var classifyRE = /(?:^|[-_])(\\w)/g;\n var classify = function (str) { return str\n .replace(classifyRE, function (c) { return c.toUpperCase(); })\n .replace(/[-_]/g, ''); };\n\n warn = function (msg, vm) {\n var trace = vm ? generateComponentTrace(vm) : '';\n\n if (config.warnHandler) {\n config.warnHandler.call(null, msg, vm, trace);\n } else if (hasConsole && (!config.silent)) {\n console.error((\"[Vue warn]: \" + msg + trace));\n }\n };\n\n tip = function (msg, vm) {\n if (hasConsole && (!config.silent)) {\n console.warn(\"[Vue tip]: \" + msg + (\n vm ? generateComponentTrace(vm) : ''\n ));\n }\n };\n\n formatComponentName = function (vm, includeFile) {\n if (vm.$root === vm) {\n return ''\n }\n var options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm || {};\n var name = options.name || options._componentTag;\n var file = options.__file;\n if (!name && file) {\n var match = file.match(/([^/\\\\]+)\\.vue$/);\n name = match && match[1];\n }\n\n return (\n (name ? (\"<\" + (classify(name)) + \">\") : \"\") +\n (file && includeFile !== false ? (\" at \" + file) : '')\n )\n };\n\n var repeat = function (str, n) {\n var res = '';\n while (n) {\n if (n % 2 === 1) { res += str; }\n if (n > 1) { str += str; }\n n >>= 1;\n }\n return res\n };\n\n generateComponentTrace = function (vm) {\n if (vm._isVue && vm.$parent) {\n var tree = [];\n var currentRecursiveSequence = 0;\n while (vm) {\n if (tree.length > 0) {\n var last = tree[tree.length - 1];\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++;\n vm = vm.$parent;\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence];\n currentRecursiveSequence = 0;\n }\n }\n tree.push(vm);\n vm = vm.$parent;\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map(function (vm, i) { return (\"\" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)\n ? ((formatComponentName(vm[0])) + \"... (\" + (vm[1]) + \" recursive calls)\")\n : formatComponentName(vm))); })\n .join('\\n')\n } else {\n return (\"\\n\\n(found in \" + (formatComponentName(vm)) + \")\")\n }\n };\n}\n\n/* */\n\n\nvar uid = 0;\n\n/**\n * A dep is an observable that can have multiple\n * directives subscribing to it.\n */\nvar Dep = function Dep () {\n this.id = uid++;\n this.subs = [];\n};\n\nDep.prototype.addSub = function addSub (sub) {\n this.subs.push(sub);\n};\n\nDep.prototype.removeSub = function removeSub (sub) {\n remove(this.subs, sub);\n};\n\nDep.prototype.depend = function depend () {\n if (Dep.target) {\n Dep.target.addDep(this);\n }\n};\n\nDep.prototype.notify = function notify () {\n // stabilize the subscriber list first\n var subs = this.subs.slice();\n for (var i = 0, l = subs.length; i < l; i++) {\n subs[i].update();\n }\n};\n\n// the current target watcher being evaluated.\n// this is globally unique because there could be only one\n// watcher being evaluated at any time.\nDep.target = null;\nvar targetStack = [];\n\nfunction pushTarget (_target) {\n if (Dep.target) { targetStack.push(Dep.target); }\n Dep.target = _target;\n}\n\nfunction popTarget () {\n Dep.target = targetStack.pop();\n}\n\n/* */\n\nvar VNode = function VNode (\n tag,\n data,\n children,\n text,\n elm,\n context,\n componentOptions,\n asyncFactory\n) {\n this.tag = tag;\n this.data = data;\n this.children = children;\n this.text = text;\n this.elm = elm;\n this.ns = undefined;\n this.context = context;\n this.fnContext = undefined;\n this.fnOptions = undefined;\n this.fnScopeId = undefined;\n this.key = data && data.key;\n this.componentOptions = componentOptions;\n this.componentInstance = undefined;\n this.parent = undefined;\n this.raw = false;\n this.isStatic = false;\n this.isRootInsert = true;\n this.isComment = false;\n this.isCloned = false;\n this.isOnce = false;\n this.asyncFactory = asyncFactory;\n this.asyncMeta = undefined;\n this.isAsyncPlaceholder = false;\n};\n\nvar prototypeAccessors = { child: { configurable: true } };\n\n// DEPRECATED: alias for componentInstance for backwards compat.\n/* istanbul ignore next */\nprototypeAccessors.child.get = function () {\n return this.componentInstance\n};\n\nObject.defineProperties( VNode.prototype, prototypeAccessors );\n\nvar createEmptyVNode = function (text) {\n if ( text === void 0 ) text = '';\n\n var node = new VNode();\n node.text = text;\n node.isComment = true;\n return node\n};\n\nfunction createTextVNode (val) {\n return new VNode(undefined, undefined, undefined, String(val))\n}\n\n// optimized shallow clone\n// used for static nodes and slot nodes because they may be reused across\n// multiple renders, cloning them avoids errors when DOM manipulations rely\n// on their elm reference.\nfunction cloneVNode (vnode) {\n var cloned = new VNode(\n vnode.tag,\n vnode.data,\n vnode.children,\n vnode.text,\n vnode.elm,\n vnode.context,\n vnode.componentOptions,\n vnode.asyncFactory\n );\n cloned.ns = vnode.ns;\n cloned.isStatic = vnode.isStatic;\n cloned.key = vnode.key;\n cloned.isComment = vnode.isComment;\n cloned.fnContext = vnode.fnContext;\n cloned.fnOptions = vnode.fnOptions;\n cloned.fnScopeId = vnode.fnScopeId;\n cloned.isCloned = true;\n return cloned\n}\n\n/*\n * not type checking this file because flow doesn't play well with\n * dynamically accessing methods on Array prototype\n */\n\nvar arrayProto = Array.prototype;\nvar arrayMethods = Object.create(arrayProto);\n\nvar methodsToPatch = [\n 'push',\n 'pop',\n 'shift',\n 'unshift',\n 'splice',\n 'sort',\n 'reverse'\n];\n\n/**\n * Intercept mutating methods and emit events\n */\nmethodsToPatch.forEach(function (method) {\n // cache original method\n var original = arrayProto[method];\n def(arrayMethods, method, function mutator () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var result = original.apply(this, args);\n var ob = this.__ob__;\n var inserted;\n switch (method) {\n case 'push':\n case 'unshift':\n inserted = args;\n break\n case 'splice':\n inserted = args.slice(2);\n break\n }\n if (inserted) { ob.observeArray(inserted); }\n // notify change\n ob.dep.notify();\n return result\n });\n});\n\n/* */\n\nvar arrayKeys = Object.getOwnPropertyNames(arrayMethods);\n\n/**\n * In some cases we may want to disable observation inside a component's\n * update computation.\n */\nvar shouldObserve = true;\n\nfunction toggleObserving (value) {\n shouldObserve = value;\n}\n\n/**\n * Observer class that is attached to each observed\n * object. Once attached, the observer converts the target\n * object's property keys into getter/setters that\n * collect dependencies and dispatch updates.\n */\nvar Observer = function Observer (value) {\n this.value = value;\n this.dep = new Dep();\n this.vmCount = 0;\n def(value, '__ob__', this);\n if (Array.isArray(value)) {\n var augment = hasProto\n ? protoAugment\n : copyAugment;\n augment(value, arrayMethods, arrayKeys);\n this.observeArray(value);\n } else {\n this.walk(value);\n }\n};\n\n/**\n * Walk through each property and convert them into\n * getter/setters. This method should only be called when\n * value type is Object.\n */\nObserver.prototype.walk = function walk (obj) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n defineReactive(obj, keys[i]);\n }\n};\n\n/**\n * Observe a list of Array items.\n */\nObserver.prototype.observeArray = function observeArray (items) {\n for (var i = 0, l = items.length; i < l; i++) {\n observe(items[i]);\n }\n};\n\n// helpers\n\n/**\n * Augment an target Object or Array by intercepting\n * the prototype chain using __proto__\n */\nfunction protoAugment (target, src, keys) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}\n\n/**\n * Augment an target Object or Array by defining\n * hidden properties.\n */\n/* istanbul ignore next */\nfunction copyAugment (target, src, keys) {\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n def(target, key, src[key]);\n }\n}\n\n/**\n * Attempt to create an observer instance for a value,\n * returns the new observer if successfully observed,\n * or the existing observer if the value already has one.\n */\nfunction observe (value, asRootData) {\n if (!isObject(value) || value instanceof VNode) {\n return\n }\n var ob;\n if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {\n ob = value.__ob__;\n } else if (\n shouldObserve &&\n !isServerRendering() &&\n (Array.isArray(value) || isPlainObject(value)) &&\n Object.isExtensible(value) &&\n !value._isVue\n ) {\n ob = new Observer(value);\n }\n if (asRootData && ob) {\n ob.vmCount++;\n }\n return ob\n}\n\n/**\n * Define a reactive property on an Object.\n */\nfunction defineReactive (\n obj,\n key,\n val,\n customSetter,\n shallow\n) {\n var dep = new Dep();\n\n var property = Object.getOwnPropertyDescriptor(obj, key);\n if (property && property.configurable === false) {\n return\n }\n\n // cater for pre-defined getter/setters\n var getter = property && property.get;\n if (!getter && arguments.length === 2) {\n val = obj[key];\n }\n var setter = property && property.set;\n\n var childOb = !shallow && observe(val);\n Object.defineProperty(obj, key, {\n enumerable: true,\n configurable: true,\n get: function reactiveGetter () {\n var value = getter ? getter.call(obj) : val;\n if (Dep.target) {\n dep.depend();\n if (childOb) {\n childOb.dep.depend();\n if (Array.isArray(value)) {\n dependArray(value);\n }\n }\n }\n return value\n },\n set: function reactiveSetter (newVal) {\n var value = getter ? getter.call(obj) : val;\n /* eslint-disable no-self-compare */\n if (newVal === value || (newVal !== newVal && value !== value)) {\n return\n }\n /* eslint-enable no-self-compare */\n if (process.env.NODE_ENV !== 'production' && customSetter) {\n customSetter();\n }\n if (setter) {\n setter.call(obj, newVal);\n } else {\n val = newVal;\n }\n childOb = !shallow && observe(newVal);\n dep.notify();\n }\n });\n}\n\n/**\n * Set a property on an object. Adds the new property and\n * triggers change notification if the property doesn't\n * already exist.\n */\nfunction set (target, key, val) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot set reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val\n }\n if (key in target && !(key in Object.prototype)) {\n target[key] = val;\n return val\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid adding reactive properties to a Vue instance or its root $data ' +\n 'at runtime - declare it upfront in the data option.'\n );\n return val\n }\n if (!ob) {\n target[key] = val;\n return val\n }\n defineReactive(ob.value, key, val);\n ob.dep.notify();\n return val\n}\n\n/**\n * Delete a property and trigger change if necessary.\n */\nfunction del (target, key) {\n if (process.env.NODE_ENV !== 'production' &&\n (isUndef(target) || isPrimitive(target))\n ) {\n warn((\"Cannot delete reactive property on undefined, null, or primitive value: \" + ((target))));\n }\n if (Array.isArray(target) && isValidArrayIndex(key)) {\n target.splice(key, 1);\n return\n }\n var ob = (target).__ob__;\n if (target._isVue || (ob && ob.vmCount)) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Avoid deleting properties on a Vue instance or its root $data ' +\n '- just set it to null.'\n );\n return\n }\n if (!hasOwn(target, key)) {\n return\n }\n delete target[key];\n if (!ob) {\n return\n }\n ob.dep.notify();\n}\n\n/**\n * Collect dependencies on array elements when the array is touched, since\n * we cannot intercept array element access like property getters.\n */\nfunction dependArray (value) {\n for (var e = (void 0), i = 0, l = value.length; i < l; i++) {\n e = value[i];\n e && e.__ob__ && e.__ob__.dep.depend();\n if (Array.isArray(e)) {\n dependArray(e);\n }\n }\n}\n\n/* */\n\n/**\n * Option overwriting strategies are functions that handle\n * how to merge a parent option value and a child option\n * value into the final value.\n */\nvar strats = config.optionMergeStrategies;\n\n/**\n * Options with restrictions\n */\nif (process.env.NODE_ENV !== 'production') {\n strats.el = strats.propsData = function (parent, child, vm, key) {\n if (!vm) {\n warn(\n \"option \\\"\" + key + \"\\\" can only be used during instance \" +\n 'creation with the `new` keyword.'\n );\n }\n return defaultStrat(parent, child)\n };\n}\n\n/**\n * Helper that recursively merges two data objects together.\n */\nfunction mergeData (to, from) {\n if (!from) { return to }\n var key, toVal, fromVal;\n var keys = Object.keys(from);\n for (var i = 0; i < keys.length; i++) {\n key = keys[i];\n toVal = to[key];\n fromVal = from[key];\n if (!hasOwn(to, key)) {\n set(to, key, fromVal);\n } else if (isPlainObject(toVal) && isPlainObject(fromVal)) {\n mergeData(toVal, fromVal);\n }\n }\n return to\n}\n\n/**\n * Data\n */\nfunction mergeDataOrFn (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n // in a Vue.extend merge, both should be functions\n if (!childVal) {\n return parentVal\n }\n if (!parentVal) {\n return childVal\n }\n // when parentVal & childVal are both present,\n // we need to return a function that returns the\n // merged result of both functions... no need to\n // check if parentVal is a function here because\n // it has to be a function to pass previous merges.\n return function mergedDataFn () {\n return mergeData(\n typeof childVal === 'function' ? childVal.call(this, this) : childVal,\n typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal\n )\n }\n } else {\n return function mergedInstanceDataFn () {\n // instance merge\n var instanceData = typeof childVal === 'function'\n ? childVal.call(vm, vm)\n : childVal;\n var defaultData = typeof parentVal === 'function'\n ? parentVal.call(vm, vm)\n : parentVal;\n if (instanceData) {\n return mergeData(instanceData, defaultData)\n } else {\n return defaultData\n }\n }\n }\n}\n\nstrats.data = function (\n parentVal,\n childVal,\n vm\n) {\n if (!vm) {\n if (childVal && typeof childVal !== 'function') {\n process.env.NODE_ENV !== 'production' && warn(\n 'The \"data\" option should be a function ' +\n 'that returns a per-instance value in component ' +\n 'definitions.',\n vm\n );\n\n return parentVal\n }\n return mergeDataOrFn(parentVal, childVal)\n }\n\n return mergeDataOrFn(parentVal, childVal, vm)\n};\n\n/**\n * Hooks and props are merged as arrays.\n */\nfunction mergeHook (\n parentVal,\n childVal\n) {\n return childVal\n ? parentVal\n ? parentVal.concat(childVal)\n : Array.isArray(childVal)\n ? childVal\n : [childVal]\n : parentVal\n}\n\nLIFECYCLE_HOOKS.forEach(function (hook) {\n strats[hook] = mergeHook;\n});\n\n/**\n * Assets\n *\n * When a vm is present (instance creation), we need to do\n * a three-way merge between constructor options, instance\n * options and parent options.\n */\nfunction mergeAssets (\n parentVal,\n childVal,\n vm,\n key\n) {\n var res = Object.create(parentVal || null);\n if (childVal) {\n process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm);\n return extend(res, childVal)\n } else {\n return res\n }\n}\n\nASSET_TYPES.forEach(function (type) {\n strats[type + 's'] = mergeAssets;\n});\n\n/**\n * Watchers.\n *\n * Watchers hashes should not overwrite one\n * another, so we merge them as arrays.\n */\nstrats.watch = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n // work around Firefox's Object.prototype.watch...\n if (parentVal === nativeWatch) { parentVal = undefined; }\n if (childVal === nativeWatch) { childVal = undefined; }\n /* istanbul ignore if */\n if (!childVal) { return Object.create(parentVal || null) }\n if (process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = {};\n extend(ret, parentVal);\n for (var key$1 in childVal) {\n var parent = ret[key$1];\n var child = childVal[key$1];\n if (parent && !Array.isArray(parent)) {\n parent = [parent];\n }\n ret[key$1] = parent\n ? parent.concat(child)\n : Array.isArray(child) ? child : [child];\n }\n return ret\n};\n\n/**\n * Other object hashes.\n */\nstrats.props =\nstrats.methods =\nstrats.inject =\nstrats.computed = function (\n parentVal,\n childVal,\n vm,\n key\n) {\n if (childVal && process.env.NODE_ENV !== 'production') {\n assertObjectType(key, childVal, vm);\n }\n if (!parentVal) { return childVal }\n var ret = Object.create(null);\n extend(ret, parentVal);\n if (childVal) { extend(ret, childVal); }\n return ret\n};\nstrats.provide = mergeDataOrFn;\n\n/**\n * Default strategy.\n */\nvar defaultStrat = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n};\n\n/**\n * Validate component names\n */\nfunction checkComponents (options) {\n for (var key in options.components) {\n validateComponentName(key);\n }\n}\n\nfunction validateComponentName (name) {\n if (!/^[a-zA-Z][\\w-]*$/.test(name)) {\n warn(\n 'Invalid component name: \"' + name + '\". Component names ' +\n 'can only contain alphanumeric characters and the hyphen, ' +\n 'and must start with a letter.'\n );\n }\n if (isBuiltInTag(name) || config.isReservedTag(name)) {\n warn(\n 'Do not use built-in or reserved HTML elements as component ' +\n 'id: ' + name\n );\n }\n}\n\n/**\n * Ensure all props option syntax are normalized into the\n * Object-based format.\n */\nfunction normalizeProps (options, vm) {\n var props = options.props;\n if (!props) { return }\n var res = {};\n var i, val, name;\n if (Array.isArray(props)) {\n i = props.length;\n while (i--) {\n val = props[i];\n if (typeof val === 'string') {\n name = camelize(val);\n res[name] = { type: null };\n } else if (process.env.NODE_ENV !== 'production') {\n warn('props must be strings when using array syntax.');\n }\n }\n } else if (isPlainObject(props)) {\n for (var key in props) {\n val = props[key];\n name = camelize(key);\n res[name] = isPlainObject(val)\n ? val\n : { type: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"props\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(props)) + \".\",\n vm\n );\n }\n options.props = res;\n}\n\n/**\n * Normalize all injections into Object-based format\n */\nfunction normalizeInject (options, vm) {\n var inject = options.inject;\n if (!inject) { return }\n var normalized = options.inject = {};\n if (Array.isArray(inject)) {\n for (var i = 0; i < inject.length; i++) {\n normalized[inject[i]] = { from: inject[i] };\n }\n } else if (isPlainObject(inject)) {\n for (var key in inject) {\n var val = inject[key];\n normalized[key] = isPlainObject(val)\n ? extend({ from: key }, val)\n : { from: val };\n }\n } else if (process.env.NODE_ENV !== 'production') {\n warn(\n \"Invalid value for option \\\"inject\\\": expected an Array or an Object, \" +\n \"but got \" + (toRawType(inject)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Normalize raw function directives into object format.\n */\nfunction normalizeDirectives (options) {\n var dirs = options.directives;\n if (dirs) {\n for (var key in dirs) {\n var def = dirs[key];\n if (typeof def === 'function') {\n dirs[key] = { bind: def, update: def };\n }\n }\n }\n}\n\nfunction assertObjectType (name, value, vm) {\n if (!isPlainObject(value)) {\n warn(\n \"Invalid value for option \\\"\" + name + \"\\\": expected an Object, \" +\n \"but got \" + (toRawType(value)) + \".\",\n vm\n );\n }\n}\n\n/**\n * Merge two option objects into a new one.\n * Core utility used in both instantiation and inheritance.\n */\nfunction mergeOptions (\n parent,\n child,\n vm\n) {\n if (process.env.NODE_ENV !== 'production') {\n checkComponents(child);\n }\n\n if (typeof child === 'function') {\n child = child.options;\n }\n\n normalizeProps(child, vm);\n normalizeInject(child, vm);\n normalizeDirectives(child);\n var extendsFrom = child.extends;\n if (extendsFrom) {\n parent = mergeOptions(parent, extendsFrom, vm);\n }\n if (child.mixins) {\n for (var i = 0, l = child.mixins.length; i < l; i++) {\n parent = mergeOptions(parent, child.mixins[i], vm);\n }\n }\n var options = {};\n var key;\n for (key in parent) {\n mergeField(key);\n }\n for (key in child) {\n if (!hasOwn(parent, key)) {\n mergeField(key);\n }\n }\n function mergeField (key) {\n var strat = strats[key] || defaultStrat;\n options[key] = strat(parent[key], child[key], vm, key);\n }\n return options\n}\n\n/**\n * Resolve an asset.\n * This function is used because child instances need access\n * to assets defined in its ancestor chain.\n */\nfunction resolveAsset (\n options,\n type,\n id,\n warnMissing\n) {\n /* istanbul ignore if */\n if (typeof id !== 'string') {\n return\n }\n var assets = options[type];\n // check local registration variations first\n if (hasOwn(assets, id)) { return assets[id] }\n var camelizedId = camelize(id);\n if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }\n var PascalCaseId = capitalize(camelizedId);\n if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }\n // fallback to prototype chain\n var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];\n if (process.env.NODE_ENV !== 'production' && warnMissing && !res) {\n warn(\n 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,\n options\n );\n }\n return res\n}\n\n/* */\n\nfunction validateProp (\n key,\n propOptions,\n propsData,\n vm\n) {\n var prop = propOptions[key];\n var absent = !hasOwn(propsData, key);\n var value = propsData[key];\n // boolean casting\n var booleanIndex = getTypeIndex(Boolean, prop.type);\n if (booleanIndex > -1) {\n if (absent && !hasOwn(prop, 'default')) {\n value = false;\n } else if (value === '' || value === hyphenate(key)) {\n // only cast empty string / same name to boolean if\n // boolean has higher priority\n var stringIndex = getTypeIndex(String, prop.type);\n if (stringIndex < 0 || booleanIndex < stringIndex) {\n value = true;\n }\n }\n }\n // check default value\n if (value === undefined) {\n value = getPropDefaultValue(vm, prop, key);\n // since the default value is a fresh copy,\n // make sure to observe it.\n var prevShouldObserve = shouldObserve;\n toggleObserving(true);\n observe(value);\n toggleObserving(prevShouldObserve);\n }\n if (\n process.env.NODE_ENV !== 'production' &&\n // skip validation for weex recycle-list child component props\n !(false && isObject(value) && ('@binding' in value))\n ) {\n assertProp(prop, key, value, vm, absent);\n }\n return value\n}\n\n/**\n * Get the default value of a prop.\n */\nfunction getPropDefaultValue (vm, prop, key) {\n // no default, return undefined\n if (!hasOwn(prop, 'default')) {\n return undefined\n }\n var def = prop.default;\n // warn against non-factory defaults for Object & Array\n if (process.env.NODE_ENV !== 'production' && isObject(def)) {\n warn(\n 'Invalid default value for prop \"' + key + '\": ' +\n 'Props with type Object/Array must use a factory function ' +\n 'to return the default value.',\n vm\n );\n }\n // the raw prop value was also undefined from previous render,\n // return previous default value to avoid unnecessary watcher trigger\n if (vm && vm.$options.propsData &&\n vm.$options.propsData[key] === undefined &&\n vm._props[key] !== undefined\n ) {\n return vm._props[key]\n }\n // call factory function for non-Function types\n // a value is Function if its prototype is function even across different execution context\n return typeof def === 'function' && getType(prop.type) !== 'Function'\n ? def.call(vm)\n : def\n}\n\n/**\n * Assert whether a prop is valid.\n */\nfunction assertProp (\n prop,\n name,\n value,\n vm,\n absent\n) {\n if (prop.required && absent) {\n warn(\n 'Missing required prop: \"' + name + '\"',\n vm\n );\n return\n }\n if (value == null && !prop.required) {\n return\n }\n var type = prop.type;\n var valid = !type || type === true;\n var expectedTypes = [];\n if (type) {\n if (!Array.isArray(type)) {\n type = [type];\n }\n for (var i = 0; i < type.length && !valid; i++) {\n var assertedType = assertType(value, type[i]);\n expectedTypes.push(assertedType.expectedType || '');\n valid = assertedType.valid;\n }\n }\n if (!valid) {\n warn(\n \"Invalid prop: type check failed for prop \\\"\" + name + \"\\\".\" +\n \" Expected \" + (expectedTypes.map(capitalize).join(', ')) +\n \", got \" + (toRawType(value)) + \".\",\n vm\n );\n return\n }\n var validator = prop.validator;\n if (validator) {\n if (!validator(value)) {\n warn(\n 'Invalid prop: custom validator check failed for prop \"' + name + '\".',\n vm\n );\n }\n }\n}\n\nvar simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;\n\nfunction assertType (value, type) {\n var valid;\n var expectedType = getType(type);\n if (simpleCheckRE.test(expectedType)) {\n var t = typeof value;\n valid = t === expectedType.toLowerCase();\n // for primitive wrapper objects\n if (!valid && t === 'object') {\n valid = value instanceof type;\n }\n } else if (expectedType === 'Object') {\n valid = isPlainObject(value);\n } else if (expectedType === 'Array') {\n valid = Array.isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid: valid,\n expectedType: expectedType\n }\n}\n\n/**\n * Use function string name to check built-in types,\n * because a simple equality check will fail when running\n * across different vms / iframes.\n */\nfunction getType (fn) {\n var match = fn && fn.toString().match(/^\\s*function (\\w+)/);\n return match ? match[1] : ''\n}\n\nfunction isSameType (a, b) {\n return getType(a) === getType(b)\n}\n\nfunction getTypeIndex (type, expectedTypes) {\n if (!Array.isArray(expectedTypes)) {\n return isSameType(expectedTypes, type) ? 0 : -1\n }\n for (var i = 0, len = expectedTypes.length; i < len; i++) {\n if (isSameType(expectedTypes[i], type)) {\n return i\n }\n }\n return -1\n}\n\n/* */\n\nfunction handleError (err, vm, info) {\n if (vm) {\n var cur = vm;\n while ((cur = cur.$parent)) {\n var hooks = cur.$options.errorCaptured;\n if (hooks) {\n for (var i = 0; i < hooks.length; i++) {\n try {\n var capture = hooks[i].call(cur, err, vm, info) === false;\n if (capture) { return }\n } catch (e) {\n globalHandleError(e, cur, 'errorCaptured hook');\n }\n }\n }\n }\n }\n globalHandleError(err, vm, info);\n}\n\nfunction globalHandleError (err, vm, info) {\n if (config.errorHandler) {\n try {\n return config.errorHandler.call(null, err, vm, info)\n } catch (e) {\n logError(e, null, 'config.errorHandler');\n }\n }\n logError(err, vm, info);\n}\n\nfunction logError (err, vm, info) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Error in \" + info + \": \\\"\" + (err.toString()) + \"\\\"\"), vm);\n }\n /* istanbul ignore else */\n if ((inBrowser || inWeex) && typeof console !== 'undefined') {\n console.error(err);\n } else {\n throw err\n }\n}\n\n/* */\n/* globals MessageChannel */\n\nvar callbacks = [];\nvar pending = false;\n\nfunction flushCallbacks () {\n pending = false;\n var copies = callbacks.slice(0);\n callbacks.length = 0;\n for (var i = 0; i < copies.length; i++) {\n copies[i]();\n }\n}\n\n// Here we have async deferring wrappers using both microtasks and (macro) tasks.\n// In < 2.4 we used microtasks everywhere, but there are some scenarios where\n// microtasks have too high a priority and fire in between supposedly\n// sequential events (e.g. #4521, #6690) or even between bubbling of the same\n// event (#6566). However, using (macro) tasks everywhere also has subtle problems\n// when state is changed right before repaint (e.g. #6813, out-in transitions).\n// Here we use microtask by default, but expose a way to force (macro) task when\n// needed (e.g. in event handlers attached by v-on).\nvar microTimerFunc;\nvar macroTimerFunc;\nvar useMacroTask = false;\n\n// Determine (macro) task defer implementation.\n// Technically setImmediate should be the ideal choice, but it's only available\n// in IE. The only polyfill that consistently queues the callback after all DOM\n// events triggered in the same loop is by using MessageChannel.\n/* istanbul ignore if */\nif (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\n macroTimerFunc = function () {\n setImmediate(flushCallbacks);\n };\n} else if (typeof MessageChannel !== 'undefined' && (\n isNative(MessageChannel) ||\n // PhantomJS\n MessageChannel.toString() === '[object MessageChannelConstructor]'\n)) {\n var channel = new MessageChannel();\n var port = channel.port2;\n channel.port1.onmessage = flushCallbacks;\n macroTimerFunc = function () {\n port.postMessage(1);\n };\n} else {\n /* istanbul ignore next */\n macroTimerFunc = function () {\n setTimeout(flushCallbacks, 0);\n };\n}\n\n// Determine microtask defer implementation.\n/* istanbul ignore next, $flow-disable-line */\nif (typeof Promise !== 'undefined' && isNative(Promise)) {\n var p = Promise.resolve();\n microTimerFunc = function () {\n p.then(flushCallbacks);\n // in problematic UIWebViews, Promise.then doesn't completely break, but\n // it can get stuck in a weird state where callbacks are pushed into the\n // microtask queue but the queue isn't being flushed, until the browser\n // needs to do some other work, e.g. handle a timer. Therefore we can\n // \"force\" the microtask queue to be flushed by adding an empty timer.\n if (isIOS) { setTimeout(noop); }\n };\n} else {\n // fallback to macro\n microTimerFunc = macroTimerFunc;\n}\n\n/**\n * Wrap a function so that if any code inside triggers state change,\n * the changes are queued using a (macro) task instead of a microtask.\n */\nfunction withMacroTask (fn) {\n return fn._withTask || (fn._withTask = function () {\n useMacroTask = true;\n var res = fn.apply(null, arguments);\n useMacroTask = false;\n return res\n })\n}\n\nfunction nextTick (cb, ctx) {\n var _resolve;\n callbacks.push(function () {\n if (cb) {\n try {\n cb.call(ctx);\n } catch (e) {\n handleError(e, ctx, 'nextTick');\n }\n } else if (_resolve) {\n _resolve(ctx);\n }\n });\n if (!pending) {\n pending = true;\n if (useMacroTask) {\n macroTimerFunc();\n } else {\n microTimerFunc();\n }\n }\n // $flow-disable-line\n if (!cb && typeof Promise !== 'undefined') {\n return new Promise(function (resolve) {\n _resolve = resolve;\n })\n }\n}\n\n/* */\n\n/* not type checking this file because flow doesn't play well with Proxy */\n\nvar initProxy;\n\nif (process.env.NODE_ENV !== 'production') {\n var allowedGlobals = makeMap(\n 'Infinity,undefined,NaN,isFinite,isNaN,' +\n 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +\n 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +\n 'require' // for Webpack/Browserify\n );\n\n var warnNonPresent = function (target, key) {\n warn(\n \"Property or method \\\"\" + key + \"\\\" is not defined on the instance but \" +\n 'referenced during render. Make sure that this property is reactive, ' +\n 'either in the data option, or for class-based components, by ' +\n 'initializing the property. ' +\n 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',\n target\n );\n };\n\n var hasProxy =\n typeof Proxy !== 'undefined' && isNative(Proxy);\n\n if (hasProxy) {\n var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');\n config.keyCodes = new Proxy(config.keyCodes, {\n set: function set (target, key, value) {\n if (isBuiltInModifier(key)) {\n warn((\"Avoid overwriting built-in modifier in config.keyCodes: .\" + key));\n return false\n } else {\n target[key] = value;\n return true\n }\n }\n });\n }\n\n var hasHandler = {\n has: function has (target, key) {\n var has = key in target;\n var isAllowed = allowedGlobals(key) || key.charAt(0) === '_';\n if (!has && !isAllowed) {\n warnNonPresent(target, key);\n }\n return has || !isAllowed\n }\n };\n\n var getHandler = {\n get: function get (target, key) {\n if (typeof key === 'string' && !(key in target)) {\n warnNonPresent(target, key);\n }\n return target[key]\n }\n };\n\n initProxy = function initProxy (vm) {\n if (hasProxy) {\n // determine which proxy handler to use\n var options = vm.$options;\n var handlers = options.render && options.render._withStripped\n ? getHandler\n : hasHandler;\n vm._renderProxy = new Proxy(vm, handlers);\n } else {\n vm._renderProxy = vm;\n }\n };\n}\n\n/* */\n\nvar seenObjects = new _Set();\n\n/**\n * Recursively traverse an object to evoke all converted\n * getters, so that every nested property inside the object\n * is collected as a \"deep\" dependency.\n */\nfunction traverse (val) {\n _traverse(val, seenObjects);\n seenObjects.clear();\n}\n\nfunction _traverse (val, seen) {\n var i, keys;\n var isA = Array.isArray(val);\n if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {\n return\n }\n if (val.__ob__) {\n var depId = val.__ob__.dep.id;\n if (seen.has(depId)) {\n return\n }\n seen.add(depId);\n }\n if (isA) {\n i = val.length;\n while (i--) { _traverse(val[i], seen); }\n } else {\n keys = Object.keys(val);\n i = keys.length;\n while (i--) { _traverse(val[keys[i]], seen); }\n }\n}\n\nvar mark;\nvar measure;\n\nif (process.env.NODE_ENV !== 'production') {\n var perf = inBrowser && window.performance;\n /* istanbul ignore if */\n if (\n perf &&\n perf.mark &&\n perf.measure &&\n perf.clearMarks &&\n perf.clearMeasures\n ) {\n mark = function (tag) { return perf.mark(tag); };\n measure = function (name, startTag, endTag) {\n perf.measure(name, startTag, endTag);\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n perf.clearMeasures(name);\n };\n }\n}\n\n/* */\n\nvar normalizeEvent = cached(function (name) {\n var passive = name.charAt(0) === '&';\n name = passive ? name.slice(1) : name;\n var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first\n name = once$$1 ? name.slice(1) : name;\n var capture = name.charAt(0) === '!';\n name = capture ? name.slice(1) : name;\n return {\n name: name,\n once: once$$1,\n capture: capture,\n passive: passive\n }\n});\n\nfunction createFnInvoker (fns) {\n function invoker () {\n var arguments$1 = arguments;\n\n var fns = invoker.fns;\n if (Array.isArray(fns)) {\n var cloned = fns.slice();\n for (var i = 0; i < cloned.length; i++) {\n cloned[i].apply(null, arguments$1);\n }\n } else {\n // return handler return value for single handlers\n return fns.apply(null, arguments)\n }\n }\n invoker.fns = fns;\n return invoker\n}\n\nfunction updateListeners (\n on,\n oldOn,\n add,\n remove$$1,\n vm\n) {\n var name, def, cur, old, event;\n for (name in on) {\n def = cur = on[name];\n old = oldOn[name];\n event = normalizeEvent(name);\n /* istanbul ignore if */\n if (isUndef(cur)) {\n process.env.NODE_ENV !== 'production' && warn(\n \"Invalid handler for event \\\"\" + (event.name) + \"\\\": got \" + String(cur),\n vm\n );\n } else if (isUndef(old)) {\n if (isUndef(cur.fns)) {\n cur = on[name] = createFnInvoker(cur);\n }\n add(event.name, cur, event.once, event.capture, event.passive, event.params);\n } else if (cur !== old) {\n old.fns = cur;\n on[name] = old;\n }\n }\n for (name in oldOn) {\n if (isUndef(on[name])) {\n event = normalizeEvent(name);\n remove$$1(event.name, oldOn[name], event.capture);\n }\n }\n}\n\n/* */\n\nfunction mergeVNodeHook (def, hookKey, hook) {\n if (def instanceof VNode) {\n def = def.data.hook || (def.data.hook = {});\n }\n var invoker;\n var oldHook = def[hookKey];\n\n function wrappedHook () {\n hook.apply(this, arguments);\n // important: remove merged hook to ensure it's called only once\n // and prevent memory leak\n remove(invoker.fns, wrappedHook);\n }\n\n if (isUndef(oldHook)) {\n // no existing hook\n invoker = createFnInvoker([wrappedHook]);\n } else {\n /* istanbul ignore if */\n if (isDef(oldHook.fns) && isTrue(oldHook.merged)) {\n // already a merged invoker\n invoker = oldHook;\n invoker.fns.push(wrappedHook);\n } else {\n // existing plain hook\n invoker = createFnInvoker([oldHook, wrappedHook]);\n }\n }\n\n invoker.merged = true;\n def[hookKey] = invoker;\n}\n\n/* */\n\nfunction extractPropsFromVNodeData (\n data,\n Ctor,\n tag\n) {\n // we are only extracting raw values here.\n // validation and default values are handled in the child\n // component itself.\n var propOptions = Ctor.options.props;\n if (isUndef(propOptions)) {\n return\n }\n var res = {};\n var attrs = data.attrs;\n var props = data.props;\n if (isDef(attrs) || isDef(props)) {\n for (var key in propOptions) {\n var altKey = hyphenate(key);\n if (process.env.NODE_ENV !== 'production') {\n var keyInLowerCase = key.toLowerCase();\n if (\n key !== keyInLowerCase &&\n attrs && hasOwn(attrs, keyInLowerCase)\n ) {\n tip(\n \"Prop \\\"\" + keyInLowerCase + \"\\\" is passed to component \" +\n (formatComponentName(tag || Ctor)) + \", but the declared prop name is\" +\n \" \\\"\" + key + \"\\\". \" +\n \"Note that HTML attributes are case-insensitive and camelCased \" +\n \"props need to use their kebab-case equivalents when using in-DOM \" +\n \"templates. You should probably use \\\"\" + altKey + \"\\\" instead of \\\"\" + key + \"\\\".\"\n );\n }\n }\n checkProp(res, props, key, altKey, true) ||\n checkProp(res, attrs, key, altKey, false);\n }\n }\n return res\n}\n\nfunction checkProp (\n res,\n hash,\n key,\n altKey,\n preserve\n) {\n if (isDef(hash)) {\n if (hasOwn(hash, key)) {\n res[key] = hash[key];\n if (!preserve) {\n delete hash[key];\n }\n return true\n } else if (hasOwn(hash, altKey)) {\n res[key] = hash[altKey];\n if (!preserve) {\n delete hash[altKey];\n }\n return true\n }\n }\n return false\n}\n\n/* */\n\n// The template compiler attempts to minimize the need for normalization by\n// statically analyzing the template at compile time.\n//\n// For plain HTML markup, normalization can be completely skipped because the\n// generated render function is guaranteed to return Array. There are\n// two cases where extra normalization is needed:\n\n// 1. When the children contains components - because a functional component\n// may return an Array instead of a single root. In this case, just a simple\n// normalization is needed - if any child is an Array, we flatten the whole\n// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep\n// because functional components already normalize their own children.\nfunction simpleNormalizeChildren (children) {\n for (var i = 0; i < children.length; i++) {\n if (Array.isArray(children[i])) {\n return Array.prototype.concat.apply([], children)\n }\n }\n return children\n}\n\n// 2. When the children contains constructs that always generated nested Arrays,\n// e.g.