agent-tasks 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +181 -188
  3. package/package.json +84 -84
  4. package/dist/context.d.ts +0 -21
  5. package/dist/context.d.ts.map +0 -1
  6. package/dist/context.js +0 -48
  7. package/dist/context.js.map +0 -1
  8. package/dist/db.d.ts +0 -10
  9. package/dist/db.d.ts.map +0 -1
  10. package/dist/db.js +0 -112
  11. package/dist/db.js.map +0 -1
  12. package/dist/domain/agent-bridge.d.ts +0 -13
  13. package/dist/domain/agent-bridge.d.ts.map +0 -1
  14. package/dist/domain/agent-bridge.js +0 -99
  15. package/dist/domain/agent-bridge.js.map +0 -1
  16. package/dist/domain/approvals.d.ts +0 -19
  17. package/dist/domain/approvals.d.ts.map +0 -1
  18. package/dist/domain/approvals.js +0 -99
  19. package/dist/domain/approvals.js.map +0 -1
  20. package/dist/domain/cleanup.d.ts +0 -28
  21. package/dist/domain/cleanup.d.ts.map +0 -1
  22. package/dist/domain/cleanup.js +0 -68
  23. package/dist/domain/cleanup.js.map +0 -1
  24. package/dist/domain/collaborators.d.ts +0 -15
  25. package/dist/domain/collaborators.d.ts.map +0 -1
  26. package/dist/domain/collaborators.js +0 -72
  27. package/dist/domain/collaborators.js.map +0 -1
  28. package/dist/domain/comments.d.ts +0 -14
  29. package/dist/domain/comments.d.ts.map +0 -1
  30. package/dist/domain/comments.js +0 -66
  31. package/dist/domain/comments.js.map +0 -1
  32. package/dist/domain/events.d.ts +0 -10
  33. package/dist/domain/events.d.ts.map +0 -1
  34. package/dist/domain/events.js +0 -61
  35. package/dist/domain/events.js.map +0 -1
  36. package/dist/domain/rules.d.ts +0 -2
  37. package/dist/domain/rules.d.ts.map +0 -1
  38. package/dist/domain/rules.js +0 -67
  39. package/dist/domain/rules.js.map +0 -1
  40. package/dist/domain/tasks.d.ts +0 -66
  41. package/dist/domain/tasks.d.ts.map +0 -1
  42. package/dist/domain/tasks.js +0 -655
  43. package/dist/domain/tasks.js.map +0 -1
  44. package/dist/domain/validate.d.ts +0 -16
  45. package/dist/domain/validate.d.ts.map +0 -1
  46. package/dist/domain/validate.js +0 -32
  47. package/dist/domain/validate.js.map +0 -1
  48. package/dist/event-bus.d.ts +0 -10
  49. package/dist/event-bus.d.ts.map +0 -1
  50. package/dist/event-bus.js +0 -38
  51. package/dist/event-bus.js.map +0 -1
  52. package/dist/index.d.ts +0 -3
  53. package/dist/index.d.ts.map +0 -1
  54. package/dist/index.js +0 -132
  55. package/dist/index.js.map +0 -1
  56. package/dist/server.d.ts +0 -10
  57. package/dist/server.d.ts.map +0 -1
  58. package/dist/server.js +0 -95
  59. package/dist/server.js.map +0 -1
  60. package/dist/session.d.ts +0 -7
  61. package/dist/session.d.ts.map +0 -1
  62. package/dist/session.js +0 -11
  63. package/dist/session.js.map +0 -1
  64. package/dist/storage/database.d.ts +0 -15
  65. package/dist/storage/database.d.ts.map +0 -1
  66. package/dist/storage/database.js +0 -224
  67. package/dist/storage/database.js.map +0 -1
  68. package/dist/tasks.d.ts +0 -32
  69. package/dist/tasks.d.ts.map +0 -1
  70. package/dist/tasks.js +0 -410
  71. package/dist/tasks.js.map +0 -1
  72. package/dist/transport/mcp.d.ts +0 -6
  73. package/dist/transport/mcp.d.ts.map +0 -1
  74. package/dist/transport/mcp.js +0 -731
  75. package/dist/transport/mcp.js.map +0 -1
  76. package/dist/transport/rest.d.ts +0 -4
  77. package/dist/transport/rest.d.ts.map +0 -1
  78. package/dist/transport/rest.js +0 -534
  79. package/dist/transport/rest.js.map +0 -1
  80. package/dist/transport/ws.d.ts +0 -10
  81. package/dist/transport/ws.d.ts.map +0 -1
  82. package/dist/transport/ws.js +0 -191
  83. package/dist/transport/ws.js.map +0 -1
  84. package/dist/types.d.ts +0 -147
  85. package/dist/types.d.ts.map +0 -1
  86. package/dist/types.js +0 -35
  87. package/dist/types.js.map +0 -1
  88. package/dist/ui/app.js +0 -1973
  89. package/dist/ui/index.html +0 -172
  90. package/dist/ui/morphdom.min.js +0 -1
  91. package/dist/ui/styles.css +0 -2435
@@ -1,172 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>agent-tasks</title>
7
- <link
8
- rel="icon"
9
- href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><rect x='2' y='3' width='8' height='26' rx='2' fill='%235d8da8'/><rect x='12' y='3' width='8' height='26' rx='2' fill='%235d8da8' opacity='.6'/><rect x='22' y='3' width='8' height='26' rx='2' fill='%235d8da8' opacity='.3'/></svg>"
10
- />
11
- <link rel="preconnect" href="https://fonts.googleapis.com" />
12
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
13
- <link
14
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap"
15
- rel="stylesheet"
16
- />
17
- <link
18
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap"
19
- rel="stylesheet"
20
- />
21
- <link rel="stylesheet" href="styles.css" />
22
- </head>
23
- <body>
24
- <header role="banner">
25
- <div class="header-left">
26
- <span class="material-symbols-outlined brand-icon">view_kanban</span>
27
- <h1>agent-tasks</h1>
28
- <span class="version" id="version"></span>
29
- <span
30
- id="connection-status"
31
- class="status-badge disconnected"
32
- role="status"
33
- aria-live="polite"
34
- >Connecting</span
35
- >
36
- </div>
37
- <div class="header-right">
38
- <div class="stats" id="stats" aria-live="polite" aria-atomic="true"></div>
39
- <button id="cleanup-btn" class="icon-btn" title="Clean up" aria-label="Clean up old tasks">
40
- <span class="material-symbols-outlined">mop</span>
41
- </button>
42
- <button id="theme-toggle" class="icon-btn" title="Toggle theme" aria-label="Toggle theme">
43
- <span class="material-symbols-outlined theme-icon">dark_mode</span>
44
- </button>
45
- </div>
46
- </header>
47
-
48
- <div class="filter-bar" id="filter-bar" role="search" aria-label="Task filters">
49
- <div class="filter-group">
50
- <span class="material-symbols-outlined filter-icon" aria-hidden="true">filter_list</span>
51
- <input
52
- type="text"
53
- id="filter-search"
54
- class="filter-input"
55
- placeholder="Search tasks... (/ or Ctrl+K)"
56
- autocomplete="off"
57
- aria-label="Search tasks"
58
- />
59
- <select id="filter-project" class="filter-select" aria-label="Filter by project">
60
- <option value="">All projects</option>
61
- </select>
62
- <select id="filter-assignee" class="filter-select" aria-label="Filter by assignee">
63
- <option value="">All assignees</option>
64
- </select>
65
- <select id="filter-priority" class="filter-select" aria-label="Filter by minimum priority">
66
- <option value="">Any priority</option>
67
- <option value="1">P1+</option>
68
- <option value="3">P3+</option>
69
- <option value="5">P5+</option>
70
- <option value="10">P10+</option>
71
- </select>
72
- </div>
73
- <div class="filter-chips" id="filter-chips"></div>
74
- </div>
75
-
76
- <div class="board-wrapper" id="board-wrapper">
77
- <main id="board" class="kanban-board" role="region" aria-label="Task board"></main>
78
-
79
- <aside id="side-panel" class="side-panel" role="complementary" aria-label="Task details">
80
- <div class="panel-header" id="panel-header-content"></div>
81
- <div class="panel-body" id="panel-body"></div>
82
- </aside>
83
- </div>
84
-
85
- <div id="loading-overlay" class="loading-overlay" aria-label="Loading">
86
- <div class="loading-spinner"></div>
87
- <div class="loading-text">Connecting to agent-tasks...</div>
88
- </div>
89
-
90
- <div
91
- id="task-modal"
92
- class="modal-overlay"
93
- hidden
94
- role="dialog"
95
- aria-modal="true"
96
- aria-labelledby="modal-title"
97
- >
98
- <div class="modal">
99
- <div class="modal-header">
100
- <h2 id="modal-title"></h2>
101
- <button class="icon-btn modal-close" id="modal-close-btn" aria-label="Close dialog">
102
- &times;
103
- </button>
104
- </div>
105
- <div id="modal-body" class="modal-body"></div>
106
- </div>
107
- </div>
108
-
109
- <div id="cleanup-modal" class="modal-overlay hidden" role="dialog" aria-modal="true">
110
- <div class="modal" style="max-width: 420px">
111
- <div class="modal-header">
112
- <h2>
113
- <span
114
- class="material-symbols-outlined"
115
- style="font-size: 20px; vertical-align: middle; margin-right: 6px"
116
- >mop</span
117
- >Clean Up
118
- </h2>
119
- <button class="icon-btn modal-close" id="cleanup-close-btn" aria-label="Close">
120
- &times;
121
- </button>
122
- </div>
123
- <div class="modal-body">
124
- <p style="color: var(--text-muted); margin-bottom: 12px">
125
- Remove old tasks and stale data:
126
- </p>
127
- <div class="cleanup-options">
128
- <button id="cleanup-completed" class="cleanup-option">
129
- <span class="material-symbols-outlined">auto_delete</span>
130
- <div>
131
- <strong>Purge completed</strong>
132
- <span>Remove completed and cancelled tasks (respects retention period)</span>
133
- </div>
134
- </button>
135
- <button id="cleanup-all" class="cleanup-option cleanup-option-danger">
136
- <span class="material-symbols-outlined">delete_sweep</span>
137
- <div>
138
- <strong>Purge all done</strong>
139
- <span>Remove ALL completed/done tasks immediately</span>
140
- </div>
141
- </button>
142
- <button id="cleanup-everything" class="cleanup-option cleanup-option-danger">
143
- <span class="material-symbols-outlined">delete_forever</span>
144
- <div>
145
- <strong>Purge everything</strong>
146
- <span>Remove ALL tasks regardless of status (cannot be undone)</span>
147
- </div>
148
- </button>
149
- </div>
150
- </div>
151
- </div>
152
- </div>
153
-
154
- <div id="toast-container" class="toast-container" aria-live="polite"></div>
155
-
156
- <script src="https://cdn.jsdelivr.net/npm/marked@15/marked.min.js"></script>
157
- <script src="https://cdn.jsdelivr.net/npm/dompurify@3/dist/purify.min.js"></script>
158
- <link
159
- rel="stylesheet"
160
- href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/styles/github.min.css"
161
- media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)"
162
- />
163
- <link
164
- rel="stylesheet"
165
- href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/styles/github-dark.min.css"
166
- media="(prefers-color-scheme: dark)"
167
- />
168
- <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11/build/highlight.min.js"></script>
169
- <script src="morphdom.min.js"></script>
170
- <script src="app.js"></script>
171
- </body>
172
- </html>
@@ -1 +0,0 @@
1
- (function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?module.exports=factory():typeof define==="function"&&define.amd?define(factory):(global=global||self,global.morphdom=factory())})(this,function(){"use strict";var DOCUMENT_FRAGMENT_NODE=11;function morphAttrs(fromNode,toNode){var toNodeAttrs=toNode.attributes;var attr;var attrName;var attrNamespaceURI;var attrValue;var fromValue;if(toNode.nodeType===DOCUMENT_FRAGMENT_NODE||fromNode.nodeType===DOCUMENT_FRAGMENT_NODE){return}for(var i=toNodeAttrs.length-1;i>=0;i--){attr=toNodeAttrs[i];attrName=attr.name;attrNamespaceURI=attr.namespaceURI;attrValue=attr.value;if(attrNamespaceURI){attrName=attr.localName||attrName;fromValue=fromNode.getAttributeNS(attrNamespaceURI,attrName);if(fromValue!==attrValue){if(attr.prefix==="xmlns"){attrName=attr.name}fromNode.setAttributeNS(attrNamespaceURI,attrName,attrValue)}}else{fromValue=fromNode.getAttribute(attrName);if(fromValue!==attrValue){fromNode.setAttribute(attrName,attrValue)}}}var fromNodeAttrs=fromNode.attributes;for(var d=fromNodeAttrs.length-1;d>=0;d--){attr=fromNodeAttrs[d];attrName=attr.name;attrNamespaceURI=attr.namespaceURI;if(attrNamespaceURI){attrName=attr.localName||attrName;if(!toNode.hasAttributeNS(attrNamespaceURI,attrName)){fromNode.removeAttributeNS(attrNamespaceURI,attrName)}}else{if(!toNode.hasAttribute(attrName)){fromNode.removeAttribute(attrName)}}}}var range;var NS_XHTML="http://www.w3.org/1999/xhtml";var doc=typeof document==="undefined"?undefined:document;var HAS_TEMPLATE_SUPPORT=!!doc&&"content"in doc.createElement("template");var HAS_RANGE_SUPPORT=!!doc&&doc.createRange&&"createContextualFragment"in doc.createRange();function createFragmentFromTemplate(str){var template=doc.createElement("template");template.innerHTML=str;return template.content.childNodes[0]}function createFragmentFromRange(str){if(!range){range=doc.createRange();range.selectNode(doc.body)}var fragment=range.createContextualFragment(str);return fragment.childNodes[0]}function createFragmentFromWrap(str){var fragment=doc.createElement("body");fragment.innerHTML=str;return fragment.childNodes[0]}function toElement(str){str=str.trim();if(HAS_TEMPLATE_SUPPORT){return createFragmentFromTemplate(str)}else if(HAS_RANGE_SUPPORT){return createFragmentFromRange(str)}return createFragmentFromWrap(str)}function compareNodeNames(fromEl,toEl){var fromNodeName=fromEl.nodeName;var toNodeName=toEl.nodeName;var fromCodeStart,toCodeStart;if(fromNodeName===toNodeName){return true}fromCodeStart=fromNodeName.charCodeAt(0);toCodeStart=toNodeName.charCodeAt(0);if(fromCodeStart<=90&&toCodeStart>=97){return fromNodeName===toNodeName.toUpperCase()}else if(toCodeStart<=90&&fromCodeStart>=97){return toNodeName===fromNodeName.toUpperCase()}else{return false}}function createElementNS(name,namespaceURI){return!namespaceURI||namespaceURI===NS_XHTML?doc.createElement(name):doc.createElementNS(namespaceURI,name)}function moveChildren(fromEl,toEl){var curChild=fromEl.firstChild;while(curChild){var nextChild=curChild.nextSibling;toEl.appendChild(curChild);curChild=nextChild}return toEl}function syncBooleanAttrProp(fromEl,toEl,name){if(fromEl[name]!==toEl[name]){fromEl[name]=toEl[name];if(fromEl[name]){fromEl.setAttribute(name,"")}else{fromEl.removeAttribute(name)}}}var specialElHandlers={OPTION:function(fromEl,toEl){var parentNode=fromEl.parentNode;if(parentNode){var parentName=parentNode.nodeName.toUpperCase();if(parentName==="OPTGROUP"){parentNode=parentNode.parentNode;parentName=parentNode&&parentNode.nodeName.toUpperCase()}if(parentName==="SELECT"&&!parentNode.hasAttribute("multiple")){if(fromEl.hasAttribute("selected")&&!toEl.selected){fromEl.setAttribute("selected","selected");fromEl.removeAttribute("selected")}parentNode.selectedIndex=-1}}syncBooleanAttrProp(fromEl,toEl,"selected")},INPUT:function(fromEl,toEl){syncBooleanAttrProp(fromEl,toEl,"checked");syncBooleanAttrProp(fromEl,toEl,"disabled");if(fromEl.value!==toEl.value){fromEl.value=toEl.value}if(!toEl.hasAttribute("value")){fromEl.removeAttribute("value")}},TEXTAREA:function(fromEl,toEl){var newValue=toEl.value;if(fromEl.value!==newValue){fromEl.value=newValue}var firstChild=fromEl.firstChild;if(firstChild){var oldValue=firstChild.nodeValue;if(oldValue==newValue||!newValue&&oldValue==fromEl.placeholder){return}firstChild.nodeValue=newValue}},SELECT:function(fromEl,toEl){if(!toEl.hasAttribute("multiple")){var selectedIndex=-1;var i=0;var curChild=fromEl.firstChild;var optgroup;var nodeName;while(curChild){nodeName=curChild.nodeName&&curChild.nodeName.toUpperCase();if(nodeName==="OPTGROUP"){optgroup=curChild;curChild=optgroup.firstChild;if(!curChild){curChild=optgroup.nextSibling;optgroup=null}}else{if(nodeName==="OPTION"){if(curChild.hasAttribute("selected")){selectedIndex=i;break}i++}curChild=curChild.nextSibling;if(!curChild&&optgroup){curChild=optgroup.nextSibling;optgroup=null}}}fromEl.selectedIndex=selectedIndex}}};var ELEMENT_NODE=1;var DOCUMENT_FRAGMENT_NODE$1=11;var TEXT_NODE=3;var COMMENT_NODE=8;function noop(){}function defaultGetNodeKey(node){if(node){return node.getAttribute&&node.getAttribute("id")||node.id}}function morphdomFactory(morphAttrs){return function morphdom(fromNode,toNode,options){if(!options){options={}}if(typeof toNode==="string"){if(fromNode.nodeName==="#document"||fromNode.nodeName==="HTML"){var toNodeHtml=toNode;toNode=doc.createElement("html");toNode.innerHTML=toNodeHtml}else if(fromNode.nodeName==="BODY"){var toNodeBody=toNode;toNode=doc.createElement("html");toNode.innerHTML=toNodeBody;var bodyElement=toNode.querySelector("body");if(bodyElement){toNode=bodyElement}}else{toNode=toElement(toNode)}}else if(toNode.nodeType===DOCUMENT_FRAGMENT_NODE$1){toNode=toNode.firstElementChild}var getNodeKey=options.getNodeKey||defaultGetNodeKey;var onBeforeNodeAdded=options.onBeforeNodeAdded||noop;var onNodeAdded=options.onNodeAdded||noop;var onBeforeElUpdated=options.onBeforeElUpdated||noop;var onElUpdated=options.onElUpdated||noop;var onBeforeNodeDiscarded=options.onBeforeNodeDiscarded||noop;var onNodeDiscarded=options.onNodeDiscarded||noop;var onBeforeElChildrenUpdated=options.onBeforeElChildrenUpdated||noop;var skipFromChildren=options.skipFromChildren||noop;var addChild=options.addChild||function(parent,child){return parent.appendChild(child)};var childrenOnly=options.childrenOnly===true;var fromNodesLookup=Object.create(null);var keyedRemovalList=[];function addKeyedRemoval(key){keyedRemovalList.push(key)}function walkDiscardedChildNodes(node,skipKeyedNodes){if(node.nodeType===ELEMENT_NODE){var curChild=node.firstChild;while(curChild){var key=undefined;if(skipKeyedNodes&&(key=getNodeKey(curChild))){addKeyedRemoval(key)}else{onNodeDiscarded(curChild);if(curChild.firstChild){walkDiscardedChildNodes(curChild,skipKeyedNodes)}}curChild=curChild.nextSibling}}}function removeNode(node,parentNode,skipKeyedNodes){if(onBeforeNodeDiscarded(node)===false){return}if(parentNode){parentNode.removeChild(node)}onNodeDiscarded(node);walkDiscardedChildNodes(node,skipKeyedNodes)}function indexTree(node){if(node.nodeType===ELEMENT_NODE||node.nodeType===DOCUMENT_FRAGMENT_NODE$1){var curChild=node.firstChild;while(curChild){var key=getNodeKey(curChild);if(key){fromNodesLookup[key]=curChild}indexTree(curChild);curChild=curChild.nextSibling}}}indexTree(fromNode);function handleNodeAdded(el){onNodeAdded(el);var curChild=el.firstChild;while(curChild){var nextSibling=curChild.nextSibling;var key=getNodeKey(curChild);if(key){var unmatchedFromEl=fromNodesLookup[key];if(unmatchedFromEl&&compareNodeNames(curChild,unmatchedFromEl)){curChild.parentNode.replaceChild(unmatchedFromEl,curChild);morphEl(unmatchedFromEl,curChild)}else{handleNodeAdded(curChild)}}else{handleNodeAdded(curChild)}curChild=nextSibling}}function cleanupFromEl(fromEl,curFromNodeChild,curFromNodeKey){while(curFromNodeChild){var fromNextSibling=curFromNodeChild.nextSibling;if(curFromNodeKey=getNodeKey(curFromNodeChild)){addKeyedRemoval(curFromNodeKey)}else{removeNode(curFromNodeChild,fromEl,true)}curFromNodeChild=fromNextSibling}}function morphEl(fromEl,toEl,childrenOnly){var toElKey=getNodeKey(toEl);if(toElKey){delete fromNodesLookup[toElKey]}if(!childrenOnly){var beforeUpdateResult=onBeforeElUpdated(fromEl,toEl);if(beforeUpdateResult===false){return}else if(beforeUpdateResult instanceof HTMLElement){fromEl=beforeUpdateResult;indexTree(fromEl)}morphAttrs(fromEl,toEl);onElUpdated(fromEl);if(onBeforeElChildrenUpdated(fromEl,toEl)===false){return}}if(fromEl.nodeName!=="TEXTAREA"){morphChildren(fromEl,toEl)}else{specialElHandlers.TEXTAREA(fromEl,toEl)}}function morphChildren(fromEl,toEl){var skipFrom=skipFromChildren(fromEl,toEl);var curToNodeChild=toEl.firstChild;var curFromNodeChild=fromEl.firstChild;var curToNodeKey;var curFromNodeKey;var fromNextSibling;var toNextSibling;var matchingFromEl;outer:while(curToNodeChild){toNextSibling=curToNodeChild.nextSibling;curToNodeKey=getNodeKey(curToNodeChild);while(!skipFrom&&curFromNodeChild){fromNextSibling=curFromNodeChild.nextSibling;if(curToNodeChild.isSameNode&&curToNodeChild.isSameNode(curFromNodeChild)){curToNodeChild=toNextSibling;curFromNodeChild=fromNextSibling;continue outer}curFromNodeKey=getNodeKey(curFromNodeChild);var curFromNodeType=curFromNodeChild.nodeType;var isCompatible=undefined;if(curFromNodeType===curToNodeChild.nodeType){if(curFromNodeType===ELEMENT_NODE){if(curToNodeKey){if(curToNodeKey!==curFromNodeKey){if(matchingFromEl=fromNodesLookup[curToNodeKey]){if(fromNextSibling===matchingFromEl){isCompatible=false}else{fromEl.insertBefore(matchingFromEl,curFromNodeChild);if(curFromNodeKey){addKeyedRemoval(curFromNodeKey)}else{removeNode(curFromNodeChild,fromEl,true)}curFromNodeChild=matchingFromEl;curFromNodeKey=getNodeKey(curFromNodeChild)}}else{isCompatible=false}}}else if(curFromNodeKey){isCompatible=false}isCompatible=isCompatible!==false&&compareNodeNames(curFromNodeChild,curToNodeChild);if(isCompatible){morphEl(curFromNodeChild,curToNodeChild)}}else if(curFromNodeType===TEXT_NODE||curFromNodeType==COMMENT_NODE){isCompatible=true;if(curFromNodeChild.nodeValue!==curToNodeChild.nodeValue){curFromNodeChild.nodeValue=curToNodeChild.nodeValue}}}if(isCompatible){curToNodeChild=toNextSibling;curFromNodeChild=fromNextSibling;continue outer}if(curFromNodeKey){addKeyedRemoval(curFromNodeKey)}else{removeNode(curFromNodeChild,fromEl,true)}curFromNodeChild=fromNextSibling}if(curToNodeKey&&(matchingFromEl=fromNodesLookup[curToNodeKey])&&compareNodeNames(matchingFromEl,curToNodeChild)){if(!skipFrom){addChild(fromEl,matchingFromEl)}morphEl(matchingFromEl,curToNodeChild)}else{var onBeforeNodeAddedResult=onBeforeNodeAdded(curToNodeChild);if(onBeforeNodeAddedResult!==false){if(onBeforeNodeAddedResult){curToNodeChild=onBeforeNodeAddedResult}if(curToNodeChild.actualize){curToNodeChild=curToNodeChild.actualize(fromEl.ownerDocument||doc)}addChild(fromEl,curToNodeChild);handleNodeAdded(curToNodeChild)}}curToNodeChild=toNextSibling;curFromNodeChild=fromNextSibling}cleanupFromEl(fromEl,curFromNodeChild,curFromNodeKey);var specialElHandler=specialElHandlers[fromEl.nodeName];if(specialElHandler){specialElHandler(fromEl,toEl)}}var morphedNode=fromNode;var morphedNodeType=morphedNode.nodeType;var toNodeType=toNode.nodeType;if(!childrenOnly){if(morphedNodeType===ELEMENT_NODE){if(toNodeType===ELEMENT_NODE){if(!compareNodeNames(fromNode,toNode)){onNodeDiscarded(fromNode);morphedNode=moveChildren(fromNode,createElementNS(toNode.nodeName,toNode.namespaceURI))}}else{morphedNode=toNode}}else if(morphedNodeType===TEXT_NODE||morphedNodeType===COMMENT_NODE){if(toNodeType===morphedNodeType){if(morphedNode.nodeValue!==toNode.nodeValue){morphedNode.nodeValue=toNode.nodeValue}return morphedNode}else{morphedNode=toNode}}}if(morphedNode===toNode){onNodeDiscarded(fromNode)}else{if(toNode.isSameNode&&toNode.isSameNode(morphedNode)){return}morphEl(morphedNode,toNode,childrenOnly);if(keyedRemovalList){for(var i=0,len=keyedRemovalList.length;i<len;i++){var elToRemove=fromNodesLookup[keyedRemovalList[i]];if(elToRemove){removeNode(elToRemove,elToRemove.parentNode,false)}}}}if(!childrenOnly&&morphedNode!==fromNode&&fromNode.parentNode){if(morphedNode.actualize){morphedNode=morphedNode.actualize(fromNode.ownerDocument||doc)}fromNode.parentNode.replaceChild(morphedNode,fromNode)}return morphedNode}}var morphdom=morphdomFactory(morphAttrs);return morphdom});