--> TEXT)\n if (morphedNodeType === ELEMENT_NODE) {\n if (toNodeType === ELEMENT_NODE) {\n if (!compareNodeNames(fromNode, toNode)) {\n onNodeDiscarded(fromNode);\n morphedNode = moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI));\n }\n } else {\n // Going from an element node to a text node\n morphedNode = toNode;\n }\n } else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) { // Text or comment node\n if (toNodeType === morphedNodeType) {\n if (morphedNode.nodeValue !== toNode.nodeValue) {\n morphedNode.nodeValue = toNode.nodeValue;\n }\n\n return morphedNode;\n } else {\n // Text node to something else\n morphedNode = toNode;\n }\n }\n }\n\n if (morphedNode === toNode) {\n // The \"to node\" was not compatible with the \"from node\" so we had to\n // toss out the \"from node\" and use the \"to node\"\n onNodeDiscarded(fromNode);\n } else {\n if (toNode.isSameNode && toNode.isSameNode(morphedNode)) {\n return;\n }\n\n morphEl(morphedNode, toNode, childrenOnly);\n\n // We now need to loop over any keyed nodes that might need to be\n // removed. We only do the removal if we know that the keyed node\n // never found a match. When a keyed node is matched up we remove\n // it out of fromNodesLookup and we use fromNodesLookup to determine\n // if a keyed node has been matched up or not\n if (keyedRemovalList) {\n for (var i=0, len=keyedRemovalList.length; i
{\n if(activeElement && activeElement.isSameNode(fromEl) && DOM.isFormInput(fromEl)){\n DOM.mergeFocusedInput(fromEl, toEl)\n return false\n }\n }\n })\n }\n\n constructor(view, container, id, html, streams, targetCID){\n this.view = view\n this.liveSocket = view.liveSocket\n this.container = container\n this.id = id\n this.rootID = view.root.id\n this.html = html\n this.streams = streams\n this.streamInserts = {}\n this.streamComponentRestore = {}\n this.targetCID = targetCID\n this.cidPatch = isCid(this.targetCID)\n this.pendingRemoves = []\n this.phxRemove = this.liveSocket.binding(\"remove\")\n this.callbacks = {\n beforeadded: [], beforeupdated: [], beforephxChildAdded: [],\n afteradded: [], afterupdated: [], afterdiscarded: [], afterphxChildAdded: [],\n aftertransitionsDiscarded: []\n }\n }\n\n before(kind, callback){ this.callbacks[`before${kind}`].push(callback) }\n after(kind, callback){ this.callbacks[`after${kind}`].push(callback) }\n\n trackBefore(kind, ...args){\n this.callbacks[`before${kind}`].forEach(callback => callback(...args))\n }\n\n trackAfter(kind, ...args){\n this.callbacks[`after${kind}`].forEach(callback => callback(...args))\n }\n\n markPrunableContentForRemoval(){\n let phxUpdate = this.liveSocket.binding(PHX_UPDATE)\n DOM.all(this.container, `[${phxUpdate}=append] > *, [${phxUpdate}=prepend] > *`, el => {\n el.setAttribute(PHX_PRUNE, \"\")\n })\n }\n\n perform(isJoinPatch){\n let {view, liveSocket, container, html} = this\n let targetContainer = this.isCIDPatch() ? this.targetCIDContainer(html) : container\n if(this.isCIDPatch() && !targetContainer){ return }\n\n let focused = liveSocket.getActiveElement()\n let {selectionStart, selectionEnd} = focused && DOM.hasSelectionRange(focused) ? focused : {}\n let phxUpdate = liveSocket.binding(PHX_UPDATE)\n let phxFeedbackFor = liveSocket.binding(PHX_FEEDBACK_FOR)\n let phxFeedbackGroup = liveSocket.binding(PHX_FEEDBACK_GROUP)\n let disableWith = liveSocket.binding(PHX_DISABLE_WITH)\n let phxViewportTop = liveSocket.binding(PHX_VIEWPORT_TOP)\n let phxViewportBottom = liveSocket.binding(PHX_VIEWPORT_BOTTOM)\n let phxTriggerExternal = liveSocket.binding(PHX_TRIGGER_ACTION)\n let added = []\n let feedbackContainers = []\n let updates = []\n let appendPrependUpdates = []\n\n let externalFormTriggered = null\n\n function morph(targetContainer, source, withChildren=false){\n morphdom(targetContainer, source, {\n // normally, we are running with childrenOnly, as the patch HTML for a LV\n // does not include the LV attrs (data-phx-session, etc.)\n // when we are patching a live component, we do want to patch the root element as well;\n // another case is the recursive patch of a stream item that was kept on reset (-> onBeforeNodeAdded)\n childrenOnly: targetContainer.getAttribute(PHX_COMPONENT) === null && !withChildren,\n getNodeKey: (node) => {\n if(DOM.isPhxDestroyed(node)){ return null }\n // If we have a join patch, then by definition there was no PHX_MAGIC_ID.\n // This is important to reduce the amount of elements morphdom discards.\n if(isJoinPatch){ return node.id }\n return node.id || (node.getAttribute && node.getAttribute(PHX_MAGIC_ID))\n },\n // skip indexing from children when container is stream\n skipFromChildren: (from) => { return from.getAttribute(phxUpdate) === PHX_STREAM },\n // tell morphdom how to add a child\n addChild: (parent, child) => {\n let {ref, streamAt} = this.getStreamInsert(child)\n if(ref === undefined){ return parent.appendChild(child) }\n\n this.setStreamRef(child, ref)\n\n // streaming\n if(streamAt === 0){\n parent.insertAdjacentElement(\"afterbegin\", child)\n } else if(streamAt === -1){\n parent.appendChild(child)\n } else if(streamAt > 0){\n let sibling = Array.from(parent.children)[streamAt]\n parent.insertBefore(child, sibling)\n }\n },\n onBeforeNodeAdded: (el) => {\n DOM.maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom)\n this.trackBefore(\"added\", el)\n\n let morphedEl = el\n // this is a stream item that was kept on reset, recursively morph it\n if(!isJoinPatch && this.streamComponentRestore[el.id]){\n morphedEl = this.streamComponentRestore[el.id]\n delete this.streamComponentRestore[el.id]\n morph.call(this, morphedEl, el, true)\n }\n\n return morphedEl\n },\n onNodeAdded: (el) => {\n if(el.getAttribute){ this.maybeReOrderStream(el, true) }\n if(DOM.isFeedbackContainer(el, phxFeedbackFor)) feedbackContainers.push(el)\n\n // hack to fix Safari handling of img srcset and video tags\n if(el instanceof HTMLImageElement && el.srcset){\n el.srcset = el.srcset\n } else if(el instanceof HTMLVideoElement && el.autoplay){\n el.play()\n }\n if(DOM.isNowTriggerFormExternal(el, phxTriggerExternal)){\n externalFormTriggered = el\n }\n\n // nested view handling\n if((DOM.isPhxChild(el) && view.ownsElement(el)) || DOM.isPhxSticky(el) && view.ownsElement(el.parentNode)){\n this.trackAfter(\"phxChildAdded\", el)\n }\n added.push(el)\n },\n onNodeDiscarded: (el) => this.onNodeDiscarded(el),\n onBeforeNodeDiscarded: (el) => {\n if(el.getAttribute && el.getAttribute(PHX_PRUNE) !== null){ return true }\n if(el.parentElement !== null && el.id &&\n DOM.isPhxUpdate(el.parentElement, phxUpdate, [PHX_STREAM, \"append\", \"prepend\"])){\n return false\n }\n if(this.maybePendingRemove(el)){ return false }\n if(this.skipCIDSibling(el)){ return false }\n\n return true\n },\n onElUpdated: (el) => {\n if(DOM.isNowTriggerFormExternal(el, phxTriggerExternal)){\n externalFormTriggered = el\n }\n updates.push(el)\n this.maybeReOrderStream(el, false)\n },\n onBeforeElUpdated: (fromEl, toEl) => {\n DOM.maybeAddPrivateHooks(toEl, phxViewportTop, phxViewportBottom)\n // mark both from and to els as feedback containers, as we don't know yet which one will be used\n // and we also need to remove the phx-no-feedback class when the phx-feedback-for attribute is removed\n if(DOM.isFeedbackContainer(fromEl, phxFeedbackFor) || DOM.isFeedbackContainer(toEl, phxFeedbackFor)){\n feedbackContainers.push(fromEl)\n feedbackContainers.push(toEl)\n }\n DOM.cleanChildNodes(toEl, phxUpdate)\n if(this.skipCIDSibling(toEl)){\n // if this is a live component used in a stream, we may need to reorder it\n this.maybeReOrderStream(fromEl)\n return false\n }\n if(DOM.isPhxSticky(fromEl)){ return false }\n if(DOM.isIgnored(fromEl, phxUpdate) || (fromEl.form && fromEl.form.isSameNode(externalFormTriggered))){\n this.trackBefore(\"updated\", fromEl, toEl)\n DOM.mergeAttrs(fromEl, toEl, {isIgnored: DOM.isIgnored(fromEl, phxUpdate)})\n updates.push(fromEl)\n DOM.applyStickyOperations(fromEl)\n return false\n }\n if(fromEl.type === \"number\" && (fromEl.validity && fromEl.validity.badInput)){ return false }\n if(!DOM.syncPendingRef(fromEl, toEl, disableWith)){\n if(DOM.isUploadInput(fromEl)){\n this.trackBefore(\"updated\", fromEl, toEl)\n updates.push(fromEl)\n }\n DOM.applyStickyOperations(fromEl)\n return false\n }\n\n // nested view handling\n if(DOM.isPhxChild(toEl)){\n let prevSession = fromEl.getAttribute(PHX_SESSION)\n DOM.mergeAttrs(fromEl, toEl, {exclude: [PHX_STATIC]})\n if(prevSession !== \"\"){ fromEl.setAttribute(PHX_SESSION, prevSession) }\n fromEl.setAttribute(PHX_ROOT_ID, this.rootID)\n DOM.applyStickyOperations(fromEl)\n return false\n }\n\n // input handling\n DOM.copyPrivates(toEl, fromEl)\n\n let isFocusedFormEl = focused && fromEl.isSameNode(focused) && DOM.isFormInput(fromEl)\n // skip patching focused inputs unless focus is a select that has changed options\n let focusedSelectChanged = isFocusedFormEl && this.isChangedSelect(fromEl, toEl)\n if(isFocusedFormEl && fromEl.type !== \"hidden\" && !focusedSelectChanged){\n this.trackBefore(\"updated\", fromEl, toEl)\n DOM.mergeFocusedInput(fromEl, toEl)\n DOM.syncAttrsToProps(fromEl)\n updates.push(fromEl)\n DOM.applyStickyOperations(fromEl)\n return false\n } else {\n // blur focused select if it changed so native UI is updated (ie safari won't update visible options)\n if(focusedSelectChanged){ fromEl.blur() }\n if(DOM.isPhxUpdate(toEl, phxUpdate, [\"append\", \"prepend\"])){\n appendPrependUpdates.push(new DOMPostMorphRestorer(fromEl, toEl, toEl.getAttribute(phxUpdate)))\n }\n\n DOM.syncAttrsToProps(toEl)\n DOM.applyStickyOperations(toEl)\n this.trackBefore(\"updated\", fromEl, toEl)\n return true\n }\n }\n })\n }\n\n this.trackBefore(\"added\", container)\n this.trackBefore(\"updated\", container, container)\n\n liveSocket.time(\"morphdom\", () => {\n this.streams.forEach(([ref, inserts, deleteIds, reset]) => {\n inserts.forEach(([key, streamAt, limit]) => {\n this.streamInserts[key] = {ref, streamAt, limit, reset}\n })\n if(reset !== undefined){\n DOM.all(container, `[${PHX_STREAM_REF}=\"${ref}\"]`, child => {\n this.removeStreamChildElement(child)\n })\n }\n deleteIds.forEach(id => {\n let child = container.querySelector(`[id=\"${id}\"]`)\n if(child){ this.removeStreamChildElement(child) }\n })\n })\n\n // clear stream items from the dead render if they are not inserted again\n if(isJoinPatch){\n DOM.all(this.container, `[${phxUpdate}=${PHX_STREAM}]`, el => {\n // make sure to only remove elements owned by the current view\n // see https://github.com/phoenixframework/phoenix_live_view/issues/3047\n this.liveSocket.owner(el, (view) => {\n if(view === this.view){\n Array.from(el.children).forEach(child => {\n this.removeStreamChildElement(child)\n })\n }\n })\n })\n }\n\n morph.call(this, targetContainer, html)\n })\n\n if(liveSocket.isDebugEnabled()){\n detectDuplicateIds()\n // warn if there are any inputs named \"id\"\n Array.from(document.querySelectorAll(\"input[name=id]\")).forEach(node => {\n if(node.form){\n console.error(\"Detected an input with name=\\\"id\\\" inside a form! This will cause problems when patching the DOM.\\n\", node)\n }\n })\n }\n\n if(appendPrependUpdates.length > 0){\n liveSocket.time(\"post-morph append/prepend restoration\", () => {\n appendPrependUpdates.forEach(update => update.perform())\n })\n }\n\n DOM.maybeHideFeedback(targetContainer, feedbackContainers, phxFeedbackFor, phxFeedbackGroup)\n\n liveSocket.silenceEvents(() => DOM.restoreFocus(focused, selectionStart, selectionEnd))\n DOM.dispatchEvent(document, \"phx:update\")\n added.forEach(el => this.trackAfter(\"added\", el))\n updates.forEach(el => this.trackAfter(\"updated\", el))\n\n this.transitionPendingRemoves()\n\n if(externalFormTriggered){\n liveSocket.unload()\n // use prototype's submit in case there's a form control with name or id of \"submit\"\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit\n Object.getPrototypeOf(externalFormTriggered).submit.call(externalFormTriggered)\n }\n return true\n }\n\n onNodeDiscarded(el){\n // nested view handling\n if(DOM.isPhxChild(el) || DOM.isPhxSticky(el)){ this.liveSocket.destroyViewByEl(el) }\n this.trackAfter(\"discarded\", el)\n }\n\n maybePendingRemove(node){\n if(node.getAttribute && node.getAttribute(this.phxRemove) !== null){\n this.pendingRemoves.push(node)\n return true\n } else {\n return false\n }\n }\n\n removeStreamChildElement(child){\n // we need to store the node if it is actually re-added in the same patch\n // we do NOT want to execute phx-remove, we do NOT want to call onNodeDiscarded\n if(this.streamInserts[child.id]){\n this.streamComponentRestore[child.id] = child\n child.remove()\n } else {\n // only remove the element now if it has no phx-remove binding\n if(!this.maybePendingRemove(child)){\n child.remove()\n this.onNodeDiscarded(child)\n }\n }\n }\n\n getStreamInsert(el){\n let insert = el.id ? this.streamInserts[el.id] : {}\n return insert || {}\n }\n\n setStreamRef(el, ref){\n DOM.putSticky(el, PHX_STREAM_REF, el => el.setAttribute(PHX_STREAM_REF, ref))\n }\n\n maybeReOrderStream(el, isNew){\n let {ref, streamAt, reset} = this.getStreamInsert(el)\n if(streamAt === undefined){ return }\n\n // we need to set the PHX_STREAM_REF here as well as addChild is invoked only for parents\n this.setStreamRef(el, ref)\n\n if(!reset && !isNew){\n // we only reorder if the element is new or it's a stream reset\n return\n }\n\n // check if the element has a parent element;\n // it doesn't if we are currently recursively morphing (restoring a saved stream child)\n // because the element is not yet added to the real dom;\n // reordering does not make sense in that case anyway\n if(!el.parentElement){ return }\n\n if(streamAt === 0){\n el.parentElement.insertBefore(el, el.parentElement.firstElementChild)\n } else if(streamAt > 0){\n let children = Array.from(el.parentElement.children)\n let oldIndex = children.indexOf(el)\n if(streamAt >= children.length - 1){\n el.parentElement.appendChild(el)\n } else {\n let sibling = children[streamAt]\n if(oldIndex > streamAt){\n el.parentElement.insertBefore(el, sibling)\n } else {\n el.parentElement.insertBefore(el, sibling.nextElementSibling)\n }\n }\n }\n\n this.maybeLimitStream(el)\n }\n\n maybeLimitStream(el){\n let {limit} = this.getStreamInsert(el)\n let children = limit !== null && Array.from(el.parentElement.children)\n if(limit && limit < 0 && children.length > limit * -1){\n children.slice(0, children.length + limit).forEach(child => this.removeStreamChildElement(child))\n } else if(limit && limit >= 0 && children.length > limit){\n children.slice(limit).forEach(child => this.removeStreamChildElement(child))\n }\n }\n\n transitionPendingRemoves(){\n let {pendingRemoves, liveSocket} = this\n if(pendingRemoves.length > 0){\n liveSocket.transitionRemoves(pendingRemoves)\n liveSocket.requestDOMUpdate(() => {\n pendingRemoves.forEach(el => {\n let child = DOM.firstPhxChild(el)\n if(child){ liveSocket.destroyViewByEl(child) }\n el.remove()\n })\n this.trackAfter(\"transitionsDiscarded\", pendingRemoves)\n })\n }\n }\n\n isChangedSelect(fromEl, toEl){\n if(!(fromEl instanceof HTMLSelectElement) || fromEl.multiple){ return false }\n if(fromEl.options.length !== toEl.options.length){ return true }\n\n let fromSelected = fromEl.selectedOptions[0]\n let toSelected = toEl.selectedOptions[0]\n if(fromSelected && fromSelected.hasAttribute(\"selected\")){\n toSelected.setAttribute(\"selected\", fromSelected.getAttribute(\"selected\"))\n }\n\n // in general we have to be very careful with using isEqualNode as it does not a reliable\n // DOM tree equality check, but for selection attributes and options it works fine\n return !fromEl.isEqualNode(toEl)\n }\n\n isCIDPatch(){ return this.cidPatch }\n\n skipCIDSibling(el){\n return el.nodeType === Node.ELEMENT_NODE && el.hasAttribute(PHX_SKIP)\n }\n\n targetCIDContainer(html){\n if(!this.isCIDPatch()){ return }\n let [first, ...rest] = DOM.findComponentNodeList(this.container, this.targetCID)\n if(rest.length === 0 && DOM.childNodeLength(html) === 1){\n return first\n } else {\n return first && first.parentNode\n }\n }\n\n indexOf(parent, child){ return Array.from(parent.children).indexOf(child) }\n}\n", "import {\n COMPONENTS,\n DYNAMICS,\n TEMPLATES,\n EVENTS,\n PHX_COMPONENT,\n PHX_SKIP,\n PHX_MAGIC_ID,\n REPLY,\n STATIC,\n TITLE,\n STREAM,\n ROOT,\n} from \"./constants\"\n\nimport {\n isObject,\n logError,\n isCid,\n} from \"./utils\"\n\nconst VOID_TAGS = new Set([\n \"area\",\n \"base\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"hr\",\n \"img\",\n \"input\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\"\n])\nconst quoteChars = new Set([\"'\", '\"'])\n\nexport let modifyRoot = (html, attrs, clearInnerHTML) => {\n let i = 0\n let insideComment = false\n let beforeTag, afterTag, tag, tagNameEndsAt, id, newHTML\n\n let lookahead = html.match(/^(\\s*(?:\\s*)*)<([^\\s\\/>]+)/)\n if(lookahead === null) { throw new Error(`malformed html ${html}`) }\n\n i = lookahead[0].length\n beforeTag = lookahead[1]\n tag = lookahead[2]\n tagNameEndsAt = i\n\n // Scan the opening tag for id, if there is any\n for(i; i < html.length; i++){\n if(html.charAt(i) === \">\" ){ break }\n if(html.charAt(i) === \"=\"){\n let isId = html.slice(i - 3, i) === \" id\"\n i++;\n let char = html.charAt(i)\n if (quoteChars.has(char)) {\n let attrStartsAt = i\n i++\n for(i; i < html.length; i++){\n if(html.charAt(i) === char){ break }\n }\n if (isId) {\n id = html.slice(attrStartsAt + 1, i)\n break\n }\n }\n }\n }\n\n let closeAt = html.length - 1\n insideComment = false\n while(closeAt >= beforeTag.length + tag.length){\n let char = html.charAt(closeAt)\n if(insideComment){\n if(char === \"-\" && html.slice(closeAt - 3, closeAt) === \"\" && html.slice(closeAt - 2, closeAt) === \"--\"){\n insideComment = true\n closeAt -= 3\n } else if(char === \">\"){\n break\n } else {\n closeAt -= 1\n }\n }\n afterTag = html.slice(closeAt + 1, html.length)\n\n let attrsStr =\n Object.keys(attrs)\n .map(attr => attrs[attr] === true ? attr : `${attr}=\"${attrs[attr]}\"`)\n .join(\" \")\n\n if(clearInnerHTML){\n // Keep the id if any\n let idAttrStr = id ? ` id=\"${id}\"` : \"\";\n if(VOID_TAGS.has(tag)){\n newHTML = `<${tag}${idAttrStr}${attrsStr === \"\" ? \"\" : \" \"}${attrsStr}/>`\n } else {\n newHTML = `<${tag}${idAttrStr}${attrsStr === \"\" ? \"\" : \" \"}${attrsStr}>${tag}>`\n }\n } else {\n let rest = html.slice(tagNameEndsAt, closeAt + 1)\n newHTML = `<${tag}${attrsStr === \"\" ? \"\" : \" \"}${attrsStr}${rest}`\n }\n\n return [newHTML, beforeTag, afterTag]\n}\n\nexport default class Rendered {\n static extract(diff){\n let {[REPLY]: reply, [EVENTS]: events, [TITLE]: title} = diff\n delete diff[REPLY]\n delete diff[EVENTS]\n delete diff[TITLE]\n return {diff, title, reply: reply || null, events: events || []}\n }\n\n constructor(viewId, rendered){\n this.viewId = viewId\n this.rendered = {}\n this.magicId = 0\n this.mergeDiff(rendered)\n }\n\n parentViewId(){ return this.viewId }\n\n toString(onlyCids){\n let [str, streams] = this.recursiveToString(this.rendered, this.rendered[COMPONENTS], onlyCids, true, {})\n return [str, streams]\n }\n\n recursiveToString(rendered, components = rendered[COMPONENTS], onlyCids, changeTracking, rootAttrs){\n onlyCids = onlyCids ? new Set(onlyCids) : null\n let output = {buffer: \"\", components: components, onlyCids: onlyCids, streams: new Set()}\n this.toOutputBuffer(rendered, null, output, changeTracking, rootAttrs)\n return [output.buffer, output.streams]\n }\n\n componentCIDs(diff){ return Object.keys(diff[COMPONENTS] || {}).map(i => parseInt(i)) }\n\n isComponentOnlyDiff(diff){\n if(!diff[COMPONENTS]){ return false }\n return Object.keys(diff).length === 1\n }\n\n getComponent(diff, cid){ return diff[COMPONENTS][cid] }\n\n resetRender(cid){\n // we are racing a component destroy, it could not exist, so\n // make sure that we don't try to set reset on undefined\n if(this.rendered[COMPONENTS][cid]){\n this.rendered[COMPONENTS][cid].reset = true\n }\n }\n\n mergeDiff(diff){\n let newc = diff[COMPONENTS]\n let cache = {}\n delete diff[COMPONENTS]\n this.rendered = this.mutableMerge(this.rendered, diff)\n this.rendered[COMPONENTS] = this.rendered[COMPONENTS] || {}\n\n if(newc){\n let oldc = this.rendered[COMPONENTS]\n\n for(let cid in newc){\n newc[cid] = this.cachedFindComponent(cid, newc[cid], oldc, newc, cache)\n }\n\n for(let cid in newc){ oldc[cid] = newc[cid] }\n diff[COMPONENTS] = newc\n }\n }\n\n cachedFindComponent(cid, cdiff, oldc, newc, cache){\n if(cache[cid]){\n return cache[cid]\n } else {\n let ndiff, stat, scid = cdiff[STATIC]\n\n if(isCid(scid)){\n let tdiff\n\n if(scid > 0){\n tdiff = this.cachedFindComponent(scid, newc[scid], oldc, newc, cache)\n } else {\n tdiff = oldc[-scid]\n }\n\n stat = tdiff[STATIC]\n ndiff = this.cloneMerge(tdiff, cdiff, true)\n ndiff[STATIC] = stat\n } else {\n ndiff = cdiff[STATIC] !== undefined || oldc[cid] === undefined ?\n cdiff : this.cloneMerge(oldc[cid], cdiff, false)\n }\n\n cache[cid] = ndiff\n return ndiff\n }\n }\n\n mutableMerge(target, source){\n if(source[STATIC] !== undefined){\n return source\n } else {\n this.doMutableMerge(target, source)\n return target\n }\n }\n\n doMutableMerge(target, source){\n for(let key in source){\n let val = source[key]\n let targetVal = target[key]\n let isObjVal = isObject(val)\n if(isObjVal && val[STATIC] === undefined && isObject(targetVal)){\n this.doMutableMerge(targetVal, val)\n } else {\n target[key] = val\n }\n }\n if(target[ROOT]){\n target.newRender = true\n }\n }\n\n // Merges cid trees together, copying statics from source tree.\n //\n // The `pruneMagicId` is passed to control pruning the magicId of the\n // target. We must always prune the magicId when we are sharing statics\n // from another component. If not pruning, we replicate the logic from\n // mutableMerge, where we set newRender to true if there is a root\n // (effectively forcing the new version to be rendered instead of skipped)\n //\n cloneMerge(target, source, pruneMagicId){\n let merged = {...target, ...source}\n for(let key in merged){\n let val = source[key]\n let targetVal = target[key]\n if(isObject(val) && val[STATIC] === undefined && isObject(targetVal)){\n merged[key] = this.cloneMerge(targetVal, val, pruneMagicId)\n } else if(val === undefined && isObject(targetVal)){\n merged[key] = this.cloneMerge(targetVal, {}, pruneMagicId)\n }\n }\n if(pruneMagicId){\n delete merged.magicId\n delete merged.newRender\n } else if(target[ROOT]){\n merged.newRender = true\n }\n return merged\n }\n\n componentToString(cid){\n let [str, streams] = this.recursiveCIDToString(this.rendered[COMPONENTS], cid, null)\n let [strippedHTML, _before, _after] = modifyRoot(str, {})\n return [strippedHTML, streams]\n }\n\n pruneCIDs(cids){\n cids.forEach(cid => delete this.rendered[COMPONENTS][cid])\n }\n\n // private\n\n get(){ return this.rendered }\n\n isNewFingerprint(diff = {}){ return !!diff[STATIC] }\n\n templateStatic(part, templates){\n if(typeof (part) === \"number\") {\n return templates[part]\n } else {\n return part\n }\n }\n\n nextMagicID(){\n this.magicId++\n return `m${this.magicId}-${this.parentViewId()}`\n }\n\n // Converts rendered tree to output buffer.\n //\n // changeTracking controls if we can apply the PHX_SKIP optimization.\n // It is disabled for comprehensions since we must re-render the entire collection\n // and no individual element is tracked inside the comprehension.\n toOutputBuffer(rendered, templates, output, changeTracking, rootAttrs = {}){\n if(rendered[DYNAMICS]){ return this.comprehensionToBuffer(rendered, templates, output) }\n let {[STATIC]: statics} = rendered\n statics = this.templateStatic(statics, templates)\n let isRoot = rendered[ROOT]\n let prevBuffer = output.buffer\n if(isRoot){ output.buffer = \"\" }\n\n // this condition is called when first rendering an optimizable function component.\n // LC have their magicId previously set\n if(changeTracking && isRoot && !rendered.magicId){\n rendered.newRender = true\n rendered.magicId = this.nextMagicID()\n }\n\n output.buffer += statics[0]\n for(let i = 1; i < statics.length; i++){\n this.dynamicToBuffer(rendered[i - 1], templates, output, changeTracking)\n output.buffer += statics[i]\n }\n\n // Applies the root tag \"skip\" optimization if supported, which clears\n // the root tag attributes and innerHTML, and only maintains the magicId.\n // We can only skip when changeTracking is supported (outside of a comprehension),\n // and when the root element hasn't experienced an unrendered merge (newRender true).\n if(isRoot){\n let skip = false\n let attrs\n // When a LC is re-added to the page, we need to re-render the entire LC tree,\n // therefore changeTracking is false; however, we need to keep all the magicIds\n // from any function component so the next time the LC is updated, we can apply\n // the skip optimization\n if(changeTracking || rendered.magicId){\n skip = changeTracking && !rendered.newRender\n attrs = {[PHX_MAGIC_ID]: rendered.magicId, ...rootAttrs}\n } else {\n attrs = rootAttrs\n }\n if(skip){ attrs[PHX_SKIP] = true }\n let [newRoot, commentBefore, commentAfter] = modifyRoot(output.buffer, attrs, skip)\n rendered.newRender = false\n output.buffer = prevBuffer + commentBefore + newRoot + commentAfter\n }\n }\n\n comprehensionToBuffer(rendered, templates, output){\n let {[DYNAMICS]: dynamics, [STATIC]: statics, [STREAM]: stream} = rendered\n let [_ref, _inserts, deleteIds, reset] = stream || [null, {}, [], null]\n statics = this.templateStatic(statics, templates)\n let compTemplates = templates || rendered[TEMPLATES]\n for(let d = 0; d < dynamics.length; d++){\n let dynamic = dynamics[d]\n output.buffer += statics[0]\n for(let i = 1; i < statics.length; i++){\n // Inside a comprehension, we don't track how dynamics change\n // over time (and features like streams would make that impossible\n // unless we move the stream diffing away from morphdom),\n // so we can't perform root change tracking.\n let changeTracking = false\n this.dynamicToBuffer(dynamic[i - 1], compTemplates, output, changeTracking)\n output.buffer += statics[i]\n }\n }\n\n if(stream !== undefined && (rendered[DYNAMICS].length > 0 || deleteIds.length > 0 || reset)){\n delete rendered[STREAM]\n rendered[DYNAMICS] = []\n output.streams.add(stream)\n }\n }\n\n dynamicToBuffer(rendered, templates, output, changeTracking){\n if(typeof (rendered) === \"number\"){\n let [str, streams] = this.recursiveCIDToString(output.components, rendered, output.onlyCids)\n output.buffer += str\n output.streams = new Set([...output.streams, ...streams])\n } else if(isObject(rendered)){\n this.toOutputBuffer(rendered, templates, output, changeTracking, {})\n } else {\n output.buffer += rendered\n }\n }\n\n recursiveCIDToString(components, cid, onlyCids){\n let component = components[cid] || logError(`no component for CID ${cid}`, components)\n let attrs = {[PHX_COMPONENT]: cid}\n let skip = onlyCids && !onlyCids.has(cid)\n // Two optimization paths apply here:\n //\n // 1. The onlyCids optimization works by the server diff telling us only specific\n // cid's have changed. This allows us to skip rendering any component that hasn't changed,\n // which ultimately sets PHX_SKIP root attribute and avoids rendering the innerHTML.\n //\n // 2. The root PHX_SKIP optimization generalizes to all HEEx function components, and\n // works in the same PHX_SKIP attribute fashion as 1, but the newRender tracking is done\n // at the general diff merge level. If we merge a diff with new dynamics, we necessarily have\n // experienced a change which must be a newRender, and thus we can't skip the render.\n //\n // Both optimization flows apply here. newRender is set based on the onlyCids optimization, and\n // we track a deterministic magicId based on the cid.\n //\n // changeTracking is about the entire tree\n // newRender is about the current root in the tree\n //\n // By default changeTracking is enabled, but we special case the flow where the client is pruning\n // cids and the server adds the component back. In such cases, we explicitly disable changeTracking\n // with resetRender for this cid, then re-enable it after the recursive call to skip the optimization\n // for the entire component tree.\n component.newRender = !skip\n component.magicId = `c${cid}-${this.parentViewId()}`\n // enable change tracking as long as the component hasn't been reset\n let changeTracking = !component.reset\n let [html, streams] = this.recursiveToString(component, components, onlyCids, changeTracking, attrs)\n // disable reset after we've rendered\n delete component.reset\n\n return [html, streams]\n }\n}\n", "let viewHookID = 1\nexport default class ViewHook {\n static makeID(){ return viewHookID++ }\n static elementID(el){ return el.phxHookId }\n\n constructor(view, el, callbacks){\n this.__view = view\n this.liveSocket = view.liveSocket\n this.__callbacks = callbacks\n this.__listeners = new Set()\n this.__isDisconnected = false\n this.el = el\n this.el.phxHookId = this.constructor.makeID()\n for(let key in this.__callbacks){ this[key] = this.__callbacks[key] }\n }\n\n __mounted(){ this.mounted && this.mounted() }\n __updated(){ this.updated && this.updated() }\n __beforeUpdate(){ this.beforeUpdate && this.beforeUpdate() }\n __destroyed(){ this.destroyed && this.destroyed() }\n __reconnected(){\n if(this.__isDisconnected){\n this.__isDisconnected = false\n this.reconnected && this.reconnected()\n }\n }\n __disconnected(){\n this.__isDisconnected = true\n this.disconnected && this.disconnected()\n }\n\n pushEvent(event, payload = {}, onReply = function (){ }){\n return this.__view.pushHookEvent(this.el, null, event, payload, onReply)\n }\n\n pushEventTo(phxTarget, event, payload = {}, onReply = function (){ }){\n return this.__view.withinTargets(phxTarget, (view, targetCtx) => {\n return view.pushHookEvent(this.el, targetCtx, event, payload, onReply)\n })\n }\n\n handleEvent(event, callback){\n let callbackRef = (customEvent, bypass) => bypass ? event : callback(customEvent.detail)\n window.addEventListener(`phx:${event}`, callbackRef)\n this.__listeners.add(callbackRef)\n return callbackRef\n }\n\n removeHandleEvent(callbackRef){\n let event = callbackRef(null, true)\n window.removeEventListener(`phx:${event}`, callbackRef)\n this.__listeners.delete(callbackRef)\n }\n\n upload(name, files){\n return this.__view.dispatchUploads(null, name, files)\n }\n\n uploadTo(phxTarget, name, files){\n return this.__view.withinTargets(phxTarget, (view, targetCtx) => {\n view.dispatchUploads(targetCtx, name, files)\n })\n }\n\n __cleanup__(){\n this.__listeners.forEach(callbackRef => this.removeHandleEvent(callbackRef))\n }\n}\n", "import {\n BEFORE_UNLOAD_LOADER_TIMEOUT,\n CHECKABLE_INPUTS,\n CONSECUTIVE_RELOADS,\n PHX_AUTO_RECOVER,\n PHX_COMPONENT,\n PHX_CONNECTED_CLASS,\n PHX_DISABLE_WITH,\n PHX_DISABLE_WITH_RESTORE,\n PHX_DISABLED,\n PHX_LOADING_CLASS,\n PHX_EVENT_CLASSES,\n PHX_ERROR_CLASS,\n PHX_CLIENT_ERROR_CLASS,\n PHX_SERVER_ERROR_CLASS,\n PHX_FEEDBACK_FOR,\n PHX_FEEDBACK_GROUP,\n PHX_HAS_FOCUSED,\n PHX_HAS_SUBMITTED,\n PHX_HOOK,\n PHX_PAGE_LOADING,\n PHX_PARENT_ID,\n PHX_PROGRESS,\n PHX_READONLY,\n PHX_REF,\n PHX_REF_SRC,\n PHX_ROOT_ID,\n PHX_SESSION,\n PHX_STATIC,\n PHX_TRACK_STATIC,\n PHX_TRACK_UPLOADS,\n PHX_UPDATE,\n PHX_UPLOAD_REF,\n PHX_VIEW_SELECTOR,\n PHX_MAIN,\n PHX_MOUNTED,\n PUSH_TIMEOUT,\n PHX_VIEWPORT_TOP,\n PHX_VIEWPORT_BOTTOM,\n} from \"./constants\"\n\nimport {\n clone,\n closestPhxBinding,\n isEmpty,\n isEqualObj,\n logError,\n maybe,\n isCid,\n} from \"./utils\"\n\nimport Browser from \"./browser\"\nimport DOM from \"./dom\"\nimport DOMPatch from \"./dom_patch\"\nimport LiveUploader from \"./live_uploader\"\nimport Rendered from \"./rendered\"\nimport ViewHook from \"./view_hook\"\nimport JS from \"./js\"\n\nlet serializeForm = (form, metadata, onlyNames = []) => {\n const {submitter, ...meta} = metadata\n\n // We must inject the submitter in the order that it exists in the DOM\n // releative to other inputs. For example, for checkbox groups, the order must be maintained.\n let injectedElement\n if(submitter && submitter.name){\n const input = document.createElement(\"input\")\n input.type = \"hidden\"\n // set the form attribute if the submitter has one;\n // this can happen if the element is outside the actual form element\n const formId = submitter.getAttribute(\"form\")\n if(formId){\n input.setAttribute(\"form\", formId)\n }\n input.name = submitter.name\n input.value = submitter.value\n submitter.parentElement.insertBefore(input, submitter)\n injectedElement = input\n }\n\n const formData = new FormData(form)\n const toRemove = []\n\n formData.forEach((val, key, _index) => {\n if(val instanceof File){ toRemove.push(key) }\n })\n\n // Cleanup after building fileData\n toRemove.forEach(key => formData.delete(key))\n\n const params = new URLSearchParams()\n\n for(let [key, val] of formData.entries()){\n if(onlyNames.length === 0 || onlyNames.indexOf(key) >= 0){\n params.append(key, val)\n }\n }\n\n // remove the injected element again\n // (it would be removed by the next dom patch anyway, but this is cleaner)\n if(submitter && injectedElement){\n submitter.parentElement.removeChild(injectedElement)\n }\n\n for(let metaKey in meta){ params.append(metaKey, meta[metaKey]) }\n\n return params.toString()\n}\n\nexport default class View {\n constructor(el, liveSocket, parentView, flash, liveReferer){\n this.isDead = false\n this.liveSocket = liveSocket\n this.flash = flash\n this.parent = parentView\n this.root = parentView ? parentView.root : this\n this.el = el\n this.id = this.el.id\n this.ref = 0\n this.childJoins = 0\n this.loaderTimer = null\n this.pendingDiffs = []\n this.pendingForms = new Set()\n this.redirect = false\n this.href = null\n this.joinCount = this.parent ? this.parent.joinCount - 1 : 0\n this.joinPending = true\n this.destroyed = false\n this.joinCallback = function(onDone){ onDone && onDone() }\n this.stopCallback = function(){ }\n this.pendingJoinOps = this.parent ? null : []\n this.viewHooks = {}\n this.formSubmits = []\n this.children = this.parent ? null : {}\n this.root.children[this.id] = {}\n this.formsForRecovery = {}\n this.channel = this.liveSocket.channel(`lv:${this.id}`, () => {\n let url = this.href && this.expandURL(this.href)\n return {\n redirect: this.redirect ? url : undefined,\n url: this.redirect ? undefined : url || undefined,\n params: this.connectParams(liveReferer),\n session: this.getSession(),\n static: this.getStatic(),\n flash: this.flash,\n }\n })\n }\n\n setHref(href){ this.href = href }\n\n setRedirect(href){\n this.redirect = true\n this.href = href\n }\n\n isMain(){ return this.el.hasAttribute(PHX_MAIN) }\n\n connectParams(liveReferer){\n let params = this.liveSocket.params(this.el)\n let manifest =\n DOM.all(document, `[${this.binding(PHX_TRACK_STATIC)}]`)\n .map(node => node.src || node.href).filter(url => typeof (url) === \"string\")\n\n if(manifest.length > 0){ params[\"_track_static\"] = manifest }\n params[\"_mounts\"] = this.joinCount\n params[\"_live_referer\"] = liveReferer\n\n return params\n }\n\n isConnected(){ return this.channel.canPush() }\n\n getSession(){ return this.el.getAttribute(PHX_SESSION) }\n\n getStatic(){\n let val = this.el.getAttribute(PHX_STATIC)\n return val === \"\" ? null : val\n }\n\n destroy(callback = function (){ }){\n this.destroyAllChildren()\n this.destroyed = true\n delete this.root.children[this.id]\n if(this.parent){ delete this.root.children[this.parent.id][this.id] }\n clearTimeout(this.loaderTimer)\n let onFinished = () => {\n callback()\n for(let id in this.viewHooks){\n this.destroyHook(this.viewHooks[id])\n }\n }\n\n DOM.markPhxChildDestroyed(this.el)\n\n this.log(\"destroyed\", () => [\"the child has been removed from the parent\"])\n this.channel.leave()\n .receive(\"ok\", onFinished)\n .receive(\"error\", onFinished)\n .receive(\"timeout\", onFinished)\n }\n\n setContainerClasses(...classes){\n this.el.classList.remove(\n PHX_CONNECTED_CLASS,\n PHX_LOADING_CLASS,\n PHX_ERROR_CLASS,\n PHX_CLIENT_ERROR_CLASS,\n PHX_SERVER_ERROR_CLASS\n )\n this.el.classList.add(...classes)\n }\n\n showLoader(timeout){\n clearTimeout(this.loaderTimer)\n if(timeout){\n this.loaderTimer = setTimeout(() => this.showLoader(), timeout)\n } else {\n for(let id in this.viewHooks){ this.viewHooks[id].__disconnected() }\n this.setContainerClasses(PHX_LOADING_CLASS)\n }\n }\n\n execAll(binding){\n DOM.all(this.el, `[${binding}]`, el => this.liveSocket.execJS(el, el.getAttribute(binding)))\n }\n\n hideLoader(){\n clearTimeout(this.loaderTimer)\n this.setContainerClasses(PHX_CONNECTED_CLASS)\n this.execAll(this.binding(\"connected\"))\n }\n\n triggerReconnected(){\n for(let id in this.viewHooks){ this.viewHooks[id].__reconnected() }\n }\n\n log(kind, msgCallback){\n this.liveSocket.log(this, kind, msgCallback)\n }\n\n transition(time, onStart, onDone = function(){}){\n this.liveSocket.transition(time, onStart, onDone)\n }\n\n // calls the callback with the view and target element for the given phxTarget\n // targets can be:\n // * an element itself, then it is simply passed to liveSocket.owner;\n // * a CID (Component ID), then we first search the component's element in the DOM\n // * a selector, then we search the selector in the DOM and call the callback\n // for each element found with the corresponding owner view\n withinTargets(phxTarget, callback, dom = document, viewEl){\n // in the form recovery case we search in a template fragment instead of\n // the real dom, therefore we optionally pass dom and viewEl\n\n if(phxTarget instanceof HTMLElement || phxTarget instanceof SVGElement){\n return this.liveSocket.owner(phxTarget, view => callback(view, phxTarget))\n }\n\n if(isCid(phxTarget)){\n let targets = DOM.findComponentNodeList(viewEl || this.el, phxTarget)\n if(targets.length === 0){\n logError(`no component found matching phx-target of ${phxTarget}`)\n } else {\n callback(this, parseInt(phxTarget))\n }\n } else {\n let targets = Array.from(dom.querySelectorAll(phxTarget))\n if(targets.length === 0){ logError(`nothing found matching the phx-target selector \"${phxTarget}\"`) }\n targets.forEach(target => this.liveSocket.owner(target, view => callback(view, target)))\n }\n }\n\n applyDiff(type, rawDiff, callback){\n this.log(type, () => [\"\", clone(rawDiff)])\n let {diff, reply, events, title} = Rendered.extract(rawDiff)\n callback({diff, reply, events})\n if(typeof title === \"string\"){ window.requestAnimationFrame(() => DOM.putTitle(title)) }\n }\n\n onJoin(resp){\n let {rendered, container, liveview_version} = resp\n if(container){\n let [tag, attrs] = container\n this.el = DOM.replaceRootContainer(this.el, tag, attrs)\n }\n this.childJoins = 0\n this.joinPending = true\n this.flash = null\n if(this.root === this){\n this.formsForRecovery = this.getFormsForRecovery()\n }\n\n if(liveview_version !== this.liveSocket.version()){\n console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${liveview_version}. To avoid issues, please ensure that your assets use the same version as the server.`)\n }\n\n Browser.dropLocal(this.liveSocket.localStorage, window.location.pathname, CONSECUTIVE_RELOADS)\n this.applyDiff(\"mount\", rendered, ({diff, events}) => {\n this.rendered = new Rendered(this.id, diff)\n let [html, streams] = this.renderContainer(null, \"join\")\n this.dropPendingRefs()\n this.joinCount++\n\n this.maybeRecoverForms(html, () => {\n this.onJoinComplete(resp, html, streams, events)\n })\n })\n }\n\n dropPendingRefs(){\n DOM.all(document, `[${PHX_REF_SRC}=\"${this.id}\"][${PHX_REF}]`, el => {\n el.removeAttribute(PHX_REF)\n el.removeAttribute(PHX_REF_SRC)\n })\n }\n\n onJoinComplete({live_patch}, html, streams, events){\n // In order to provide a better experience, we want to join\n // all LiveViews first and only then apply their patches.\n if(this.joinCount > 1 || (this.parent && !this.parent.isJoinPending())){\n return this.applyJoinPatch(live_patch, html, streams, events)\n }\n\n // One downside of this approach is that we need to find phxChildren\n // in the html fragment, instead of directly on the DOM. The fragment\n // also does not include PHX_STATIC, so we need to copy it over from\n // the DOM.\n let newChildren = DOM.findPhxChildrenInFragment(html, this.id).filter(toEl => {\n let fromEl = toEl.id && this.el.querySelector(`[id=\"${toEl.id}\"]`)\n let phxStatic = fromEl && fromEl.getAttribute(PHX_STATIC)\n if(phxStatic){ toEl.setAttribute(PHX_STATIC, phxStatic) }\n // set PHX_ROOT_ID to prevent events from being dispatched to the root view\n // while the child join is still pending\n if(fromEl){ fromEl.setAttribute(PHX_ROOT_ID, this.root.id) }\n return this.joinChild(toEl)\n })\n\n if(newChildren.length === 0){\n if(this.parent){\n this.root.pendingJoinOps.push([this, () => this.applyJoinPatch(live_patch, html, streams, events)])\n this.parent.ackJoin(this)\n } else {\n this.onAllChildJoinsComplete()\n this.applyJoinPatch(live_patch, html, streams, events)\n }\n } else {\n this.root.pendingJoinOps.push([this, () => this.applyJoinPatch(live_patch, html, streams, events)])\n }\n }\n\n attachTrueDocEl(){\n this.el = DOM.byId(this.id)\n this.el.setAttribute(PHX_ROOT_ID, this.root.id)\n }\n\n // this is invoked for dead and live views, so we must filter by\n // by owner to ensure we aren't duplicating hooks across disconnect\n // and connected states. This also handles cases where hooks exist\n // in a root layout with a LV in the body\n execNewMounted(){\n let phxViewportTop = this.binding(PHX_VIEWPORT_TOP)\n let phxViewportBottom = this.binding(PHX_VIEWPORT_BOTTOM)\n DOM.all(this.el, `[${phxViewportTop}], [${phxViewportBottom}]`, hookEl => {\n if(this.ownsElement(hookEl)){\n DOM.maybeAddPrivateHooks(hookEl, phxViewportTop, phxViewportBottom)\n this.maybeAddNewHook(hookEl)\n }\n })\n DOM.all(this.el, `[${this.binding(PHX_HOOK)}], [data-phx-${PHX_HOOK}]`, hookEl => {\n if(this.ownsElement(hookEl)){\n this.maybeAddNewHook(hookEl)\n }\n })\n DOM.all(this.el, `[${this.binding(PHX_MOUNTED)}]`, el => {\n if(this.ownsElement(el)){\n this.maybeMounted(el)\n }\n })\n }\n\n applyJoinPatch(live_patch, html, streams, events){\n this.attachTrueDocEl()\n let patch = new DOMPatch(this, this.el, this.id, html, streams, null)\n patch.markPrunableContentForRemoval()\n this.performPatch(patch, false, true)\n this.joinNewChildren()\n this.execNewMounted()\n\n this.joinPending = false\n this.liveSocket.dispatchEvents(events)\n this.applyPendingUpdates()\n\n if(live_patch){\n let {kind, to} = live_patch\n this.liveSocket.historyPatch(to, kind)\n }\n this.hideLoader()\n if(this.joinCount > 1){ this.triggerReconnected() }\n this.stopCallback()\n }\n\n triggerBeforeUpdateHook(fromEl, toEl){\n this.liveSocket.triggerDOM(\"onBeforeElUpdated\", [fromEl, toEl])\n let hook = this.getHook(fromEl)\n let isIgnored = hook && DOM.isIgnored(fromEl, this.binding(PHX_UPDATE))\n if(hook && !fromEl.isEqualNode(toEl) && !(isIgnored && isEqualObj(fromEl.dataset, toEl.dataset))){\n hook.__beforeUpdate()\n return hook\n }\n }\n\n maybeMounted(el){\n let phxMounted = el.getAttribute(this.binding(PHX_MOUNTED))\n let hasBeenInvoked = phxMounted && DOM.private(el, \"mounted\")\n if(phxMounted && !hasBeenInvoked){\n this.liveSocket.execJS(el, phxMounted)\n DOM.putPrivate(el, \"mounted\", true)\n }\n }\n\n maybeAddNewHook(el, force){\n let newHook = this.addHook(el)\n if(newHook){ newHook.__mounted() }\n }\n\n performPatch(patch, pruneCids, isJoinPatch = false){\n let removedEls = []\n let phxChildrenAdded = false\n let updatedHookIds = new Set()\n\n patch.after(\"added\", el => {\n this.liveSocket.triggerDOM(\"onNodeAdded\", [el])\n let phxViewportTop = this.binding(PHX_VIEWPORT_TOP)\n let phxViewportBottom = this.binding(PHX_VIEWPORT_BOTTOM)\n DOM.maybeAddPrivateHooks(el, phxViewportTop, phxViewportBottom)\n this.maybeAddNewHook(el)\n if(el.getAttribute){ this.maybeMounted(el) }\n })\n\n patch.after(\"phxChildAdded\", el => {\n if(DOM.isPhxSticky(el)){\n this.liveSocket.joinRootViews()\n } else {\n phxChildrenAdded = true\n }\n })\n\n patch.before(\"updated\", (fromEl, toEl) => {\n let hook = this.triggerBeforeUpdateHook(fromEl, toEl)\n if(hook){ updatedHookIds.add(fromEl.id) }\n })\n\n patch.after(\"updated\", el => {\n if(updatedHookIds.has(el.id)){ this.getHook(el).__updated() }\n })\n\n patch.after(\"discarded\", (el) => {\n if(el.nodeType === Node.ELEMENT_NODE){ removedEls.push(el) }\n })\n\n patch.after(\"transitionsDiscarded\", els => this.afterElementsRemoved(els, pruneCids))\n patch.perform(isJoinPatch)\n this.afterElementsRemoved(removedEls, pruneCids)\n\n return phxChildrenAdded\n }\n\n afterElementsRemoved(elements, pruneCids){\n let destroyedCIDs = []\n elements.forEach(parent => {\n let components = DOM.all(parent, `[${PHX_COMPONENT}]`)\n let hooks = DOM.all(parent, `[${this.binding(PHX_HOOK)}]`)\n components.concat(parent).forEach(el => {\n let cid = this.componentID(el)\n if(isCid(cid) && destroyedCIDs.indexOf(cid) === -1){ destroyedCIDs.push(cid) }\n })\n hooks.concat(parent).forEach(hookEl => {\n let hook = this.getHook(hookEl)\n hook && this.destroyHook(hook)\n })\n })\n // We should not pruneCids on joins. Otherwise, in case of\n // rejoins, we may notify cids that no longer belong to the\n // current LiveView to be removed.\n if(pruneCids){\n this.maybePushComponentsDestroyed(destroyedCIDs)\n }\n }\n\n joinNewChildren(){\n DOM.findPhxChildren(this.el, this.id).forEach(el => this.joinChild(el))\n }\n\n maybeRecoverForms(html, callback){\n const phxChange = this.binding(\"change\")\n const oldForms = this.root.formsForRecovery\n // So why do we create a template element here?\n // One way to recover forms would be to immediately apply the mount\n // patch and then afterwards recover the forms. However, this would\n // cause a flicker, because the mount patch would remove the form content\n // until it is restored. Therefore LV decided to do form recovery with the\n // raw HTML before it is applied and delay the mount patch until the form\n // recovery events are done.\n let template = document.createElement(\"template\")\n template.innerHTML = html\n // because we work with a template element, we must manually copy the attributes\n // otherwise the owner / target helpers don't work properly\n const rootEl = template.content.firstElementChild\n rootEl.id = this.id\n rootEl.setAttribute(PHX_ROOT_ID, this.root.id)\n rootEl.setAttribute(PHX_SESSION, this.getSession())\n rootEl.setAttribute(PHX_STATIC, this.getStatic())\n rootEl.setAttribute(PHX_PARENT_ID, this.parent ? this.parent.id : null)\n\n // we go over all form elements in the new HTML for the LV\n // and look for old forms in the `formsForRecovery` object;\n // the formsForRecovery can also contain forms from child views\n const formsToRecover =\n // we go over all forms in the new DOM; because this is only the HTML for the current\n // view, we can be sure that all forms are owned by this view:\n DOM.all(template.content, \"form\")\n // only recover forms that have an id and are in the old DOM\n .filter(newForm => newForm.id && oldForms[newForm.id])\n // abandon forms we already tried to recover to prevent looping a failed state\n .filter(newForm => !this.pendingForms.has(newForm.id))\n // only recover if the form has the same phx-change value\n .filter(newForm => oldForms[newForm.id].getAttribute(phxChange) === newForm.getAttribute(phxChange))\n .map(newForm => {\n return [oldForms[newForm.id], newForm]\n })\n\n if(formsToRecover.length === 0){\n return callback()\n }\n\n formsToRecover.forEach(([oldForm, newForm], i) => {\n this.pendingForms.add(newForm.id)\n this.pushFormRecovery(oldForm, newForm, template.content, () => {\n this.pendingForms.delete(newForm.id)\n // we only call the callback once all forms have been recovered\n if(i === formsToRecover.length - 1){\n callback()\n }\n })\n })\n }\n\n getChildById(id){ return this.root.children[this.id][id] }\n\n getDescendentByEl(el){\n if(el.id === this.id){\n return this\n } else {\n return this.children[el.getAttribute(PHX_PARENT_ID)][el.id]\n }\n }\n\n destroyDescendent(id){\n for(let parentId in this.root.children){\n for(let childId in this.root.children[parentId]){\n if(childId === id){ return this.root.children[parentId][childId].destroy() }\n }\n }\n }\n\n joinChild(el){\n let child = this.getChildById(el.id)\n if(!child){\n let view = new View(el, this.liveSocket, this)\n this.root.children[this.id][view.id] = view\n view.join()\n this.childJoins++\n return true\n }\n }\n\n isJoinPending(){ return this.joinPending }\n\n ackJoin(_child){\n this.childJoins--\n\n if(this.childJoins === 0){\n if(this.parent){\n this.parent.ackJoin(this)\n } else {\n this.onAllChildJoinsComplete()\n }\n }\n }\n\n onAllChildJoinsComplete(){\n // we can clear pending form recoveries now that we've joined.\n // They either all resolved or were abandoned\n this.pendingForms.clear()\n // we can also clear the formsForRecovery object to not keep old form elements around\n this.formsForRecovery = {}\n this.joinCallback(() => {\n this.pendingJoinOps.forEach(([view, op]) => {\n if(!view.isDestroyed()){ op() }\n })\n this.pendingJoinOps = []\n })\n }\n\n update(diff, events){\n if(this.isJoinPending() || (this.liveSocket.hasPendingLink() && this.root.isMain())){\n return this.pendingDiffs.push({diff, events})\n }\n\n this.rendered.mergeDiff(diff)\n let phxChildrenAdded = false\n\n // When the diff only contains component diffs, then walk components\n // and patch only the parent component containers found in the diff.\n // Otherwise, patch entire LV container.\n if(this.rendered.isComponentOnlyDiff(diff)){\n this.liveSocket.time(\"component patch complete\", () => {\n let parentCids = DOM.findExistingParentCIDs(this.el, this.rendered.componentCIDs(diff))\n parentCids.forEach(parentCID => {\n if(this.componentPatch(this.rendered.getComponent(diff, parentCID), parentCID)){ phxChildrenAdded = true }\n })\n })\n } else if(!isEmpty(diff)){\n this.liveSocket.time(\"full patch complete\", () => {\n let [html, streams] = this.renderContainer(diff, \"update\")\n let patch = new DOMPatch(this, this.el, this.id, html, streams, null)\n phxChildrenAdded = this.performPatch(patch, true)\n })\n }\n\n this.liveSocket.dispatchEvents(events)\n if(phxChildrenAdded){ this.joinNewChildren() }\n }\n\n renderContainer(diff, kind){\n return this.liveSocket.time(`toString diff (${kind})`, () => {\n let tag = this.el.tagName\n // Don't skip any component in the diff nor any marked as pruned\n // (as they may have been added back)\n let cids = diff ? this.rendered.componentCIDs(diff) : null\n let [html, streams] = this.rendered.toString(cids)\n return [`<${tag}>${html}${tag}>`, streams]\n })\n }\n\n componentPatch(diff, cid){\n if(isEmpty(diff)) return false\n let [html, streams] = this.rendered.componentToString(cid)\n let patch = new DOMPatch(this, this.el, this.id, html, streams, cid)\n let childrenAdded = this.performPatch(patch, true)\n return childrenAdded\n }\n\n getHook(el){ return this.viewHooks[ViewHook.elementID(el)] }\n\n addHook(el){\n if(ViewHook.elementID(el) || !el.getAttribute){ return }\n let hookName = el.getAttribute(`data-phx-${PHX_HOOK}`) || el.getAttribute(this.binding(PHX_HOOK))\n if(hookName && !this.ownsElement(el)){ return }\n let callbacks = this.liveSocket.getHookCallbacks(hookName)\n\n if(callbacks){\n if(!el.id){ logError(`no DOM ID for hook \"${hookName}\". Hooks require a unique ID on each element.`, el) }\n let hook = new ViewHook(this, el, callbacks)\n this.viewHooks[ViewHook.elementID(hook.el)] = hook\n return hook\n } else if(hookName !== null){\n logError(`unknown hook found for \"${hookName}\"`, el)\n }\n }\n\n destroyHook(hook){\n hook.__destroyed()\n hook.__cleanup__()\n delete this.viewHooks[ViewHook.elementID(hook.el)]\n }\n\n applyPendingUpdates(){\n this.pendingDiffs.forEach(({diff, events}) => this.update(diff, events))\n this.pendingDiffs = []\n this.eachChild(child => child.applyPendingUpdates())\n }\n\n eachChild(callback){\n let children = this.root.children[this.id] || {}\n for(let id in children){ callback(this.getChildById(id)) }\n }\n\n onChannel(event, cb){\n this.liveSocket.onChannel(this.channel, event, resp => {\n if(this.isJoinPending()){\n this.root.pendingJoinOps.push([this, () => cb(resp)])\n } else {\n this.liveSocket.requestDOMUpdate(() => cb(resp))\n }\n })\n }\n\n bindChannel(){\n // The diff event should be handled by the regular update operations.\n // All other operations are queued to be applied only after join.\n this.liveSocket.onChannel(this.channel, \"diff\", (rawDiff) => {\n this.liveSocket.requestDOMUpdate(() => {\n this.applyDiff(\"update\", rawDiff, ({diff, events}) => this.update(diff, events))\n })\n })\n this.onChannel(\"redirect\", ({to, flash}) => this.onRedirect({to, flash}))\n this.onChannel(\"live_patch\", (redir) => this.onLivePatch(redir))\n this.onChannel(\"live_redirect\", (redir) => this.onLiveRedirect(redir))\n this.channel.onError(reason => this.onError(reason))\n this.channel.onClose(reason => this.onClose(reason))\n }\n\n destroyAllChildren(){ this.eachChild(child => child.destroy()) }\n\n onLiveRedirect(redir){\n let {to, kind, flash} = redir\n let url = this.expandURL(to)\n this.liveSocket.historyRedirect(url, kind, flash)\n }\n\n onLivePatch(redir){\n let {to, kind} = redir\n this.href = this.expandURL(to)\n this.liveSocket.historyPatch(to, kind)\n }\n\n expandURL(to){\n return to.startsWith(\"/\") ? `${window.location.protocol}//${window.location.host}${to}` : to\n }\n\n onRedirect({to, flash}){ this.liveSocket.redirect(to, flash) }\n\n isDestroyed(){ return this.destroyed }\n\n joinDead(){ this.isDead = true }\n\n join(callback){\n this.showLoader(this.liveSocket.loaderTimeout)\n this.bindChannel()\n if(this.isMain()){\n this.stopCallback = this.liveSocket.withPageLoading({to: this.href, kind: \"initial\"})\n }\n this.joinCallback = (onDone) => {\n onDone = onDone || function(){}\n callback ? callback(this.joinCount, onDone) : onDone()\n }\n this.liveSocket.wrapPush(this, {timeout: false}, () => {\n return this.channel.join()\n .receive(\"ok\", data => {\n if(!this.isDestroyed()){\n this.liveSocket.requestDOMUpdate(() => this.onJoin(data))\n }\n })\n .receive(\"error\", resp => !this.isDestroyed() && this.onJoinError(resp))\n .receive(\"timeout\", () => !this.isDestroyed() && this.onJoinError({reason: \"timeout\"}))\n })\n }\n\n onJoinError(resp){\n if(resp.reason === \"reload\"){\n this.log(\"error\", () => [`failed mount with ${resp.status}. Falling back to page request`, resp])\n if(this.isMain()){ this.onRedirect({to: this.href}) }\n return\n } else if(resp.reason === \"unauthorized\" || resp.reason === \"stale\"){\n this.log(\"error\", () => [\"unauthorized live_redirect. Falling back to page request\", resp])\n if(this.isMain()){ this.onRedirect({to: this.href}) }\n return\n }\n if(resp.redirect || resp.live_redirect){\n this.joinPending = false\n this.channel.leave()\n }\n if(resp.redirect){ return this.onRedirect(resp.redirect) }\n if(resp.live_redirect){ return this.onLiveRedirect(resp.live_redirect) }\n this.displayError([PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_SERVER_ERROR_CLASS])\n this.log(\"error\", () => [\"unable to join\", resp])\n if(this.liveSocket.isConnected()){ this.liveSocket.reloadWithJitter(this) }\n }\n\n onClose(reason){\n if(this.isDestroyed()){ return }\n if(this.liveSocket.hasPendingLink() && reason !== \"leave\"){\n return this.liveSocket.reloadWithJitter(this)\n }\n this.destroyAllChildren()\n this.liveSocket.dropActiveElement(this)\n // document.activeElement can be null in Internet Explorer 11\n if(document.activeElement){ document.activeElement.blur() }\n if(this.liveSocket.isUnloaded()){\n this.showLoader(BEFORE_UNLOAD_LOADER_TIMEOUT)\n }\n }\n\n onError(reason){\n this.onClose(reason)\n if(this.liveSocket.isConnected()){ this.log(\"error\", () => [\"view crashed\", reason]) }\n if(!this.liveSocket.isUnloaded()){\n if(this.liveSocket.isConnected()){\n this.displayError([PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_SERVER_ERROR_CLASS])\n } else {\n this.displayError([PHX_LOADING_CLASS, PHX_ERROR_CLASS, PHX_CLIENT_ERROR_CLASS])\n }\n }\n }\n\n displayError(classes){\n if(this.isMain()){ DOM.dispatchEvent(window, \"phx:page-loading-start\", {detail: {to: this.href, kind: \"error\"}}) }\n this.showLoader()\n this.setContainerClasses(...classes)\n this.execAll(this.binding(\"disconnected\"))\n }\n\n pushWithReply(refGenerator, event, payload, onReply = function (){ }){\n if(!this.isConnected()){ return }\n\n let [ref, [el], opts] = refGenerator ? refGenerator() : [null, [], {}]\n let onLoadingDone = function(){ }\n if(opts.page_loading || (el && (el.getAttribute(this.binding(PHX_PAGE_LOADING)) !== null))){\n onLoadingDone = this.liveSocket.withPageLoading({kind: \"element\", target: el})\n }\n\n if(typeof (payload.cid) !== \"number\"){ delete payload.cid }\n return (\n this.liveSocket.wrapPush(this, {timeout: true}, () => {\n return this.channel.push(event, payload, PUSH_TIMEOUT).receive(\"ok\", resp => {\n let finish = (hookReply) => {\n if(resp.redirect){ this.onRedirect(resp.redirect) }\n if(resp.live_patch){ this.onLivePatch(resp.live_patch) }\n if(resp.live_redirect){ this.onLiveRedirect(resp.live_redirect) }\n onLoadingDone()\n onReply(resp, hookReply)\n }\n if(resp.diff){\n this.liveSocket.requestDOMUpdate(() => {\n this.applyDiff(\"update\", resp.diff, ({diff, reply, events}) => {\n if(ref !== null){ this.undoRefs(ref) }\n this.update(diff, events)\n finish(reply)\n })\n })\n } else {\n if(ref !== null){ this.undoRefs(ref) }\n finish(null)\n }\n })\n })\n )\n }\n\n undoRefs(ref, onlyEls){\n onlyEls = onlyEls ? new Set(onlyEls) : null\n if(!this.isConnected()){ return } // exit if external form triggered\n\n DOM.all(document, `[${PHX_REF_SRC}=\"${this.id}\"][${PHX_REF}=\"${ref}\"]`, el => {\n if(onlyEls && !onlyEls.has(el)){ return }\n\n el.dispatchEvent(new CustomEvent(\"phx:unlock\", {bubbles: true, cancelable: false}))\n let disabledVal = el.getAttribute(PHX_DISABLED)\n let readOnlyVal = el.getAttribute(PHX_READONLY)\n // remove refs\n el.removeAttribute(PHX_REF)\n el.removeAttribute(PHX_REF_SRC)\n // restore inputs\n if(readOnlyVal !== null){\n el.readOnly = readOnlyVal === \"true\" ? true : false\n el.removeAttribute(PHX_READONLY)\n }\n if(disabledVal !== null){\n el.disabled = disabledVal === \"true\" ? true : false\n el.removeAttribute(PHX_DISABLED)\n }\n // remove classes\n PHX_EVENT_CLASSES.forEach(className => DOM.removeClass(el, className))\n // restore disables\n let disableRestore = el.getAttribute(PHX_DISABLE_WITH_RESTORE)\n if(disableRestore !== null){\n el.innerText = disableRestore\n el.removeAttribute(PHX_DISABLE_WITH_RESTORE)\n }\n let toEl = DOM.private(el, PHX_REF)\n if(toEl){\n let hook = this.triggerBeforeUpdateHook(el, toEl)\n DOMPatch.patchEl(el, toEl, this.liveSocket.getActiveElement())\n if(hook){ hook.__updated() }\n DOM.deletePrivate(el, PHX_REF)\n }\n })\n }\n\n putRef(elements, event, opts = {}){\n let newRef = this.ref++\n let disableWith = this.binding(PHX_DISABLE_WITH)\n if(opts.loading){ elements = elements.concat(DOM.all(document, opts.loading))}\n\n for(let el of elements){\n el.setAttribute(PHX_REF, newRef)\n el.setAttribute(PHX_REF_SRC, this.el.id)\n if(opts.submitter && !(el === opts.submitter || el === opts.form)){ continue }\n\n el.classList.add(`phx-${event}-loading`)\n el.dispatchEvent(new CustomEvent(`phx:${event}-loading`, {bubbles: true, cancelable: false}))\n let disableText = el.getAttribute(disableWith)\n if(disableText !== null){\n if(!el.getAttribute(PHX_DISABLE_WITH_RESTORE)){\n el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.innerText)\n }\n if(disableText !== \"\"){ el.innerText = disableText }\n // PHX_DISABLED could have already been set in disableForm\n el.setAttribute(PHX_DISABLED, el.getAttribute(PHX_DISABLED) || el.disabled)\n el.setAttribute(\"disabled\", \"\")\n }\n }\n return [newRef, elements, opts]\n }\n\n componentID(el){\n let cid = el.getAttribute && el.getAttribute(PHX_COMPONENT)\n return cid ? parseInt(cid) : null\n }\n\n targetComponentID(target, targetCtx, opts = {}){\n if(isCid(targetCtx)){ return targetCtx }\n\n let cidOrSelector = opts.target || target.getAttribute(this.binding(\"target\"))\n if(isCid(cidOrSelector)){\n return parseInt(cidOrSelector)\n } else if(targetCtx && (cidOrSelector !== null || opts.target)){\n return this.closestComponentID(targetCtx)\n } else {\n return null\n }\n }\n\n closestComponentID(targetCtx){\n if(isCid(targetCtx)){\n return targetCtx\n } else if(targetCtx){\n return maybe(targetCtx.closest(`[${PHX_COMPONENT}]`), el => this.ownsElement(el) && this.componentID(el))\n } else {\n return null\n }\n }\n\n pushHookEvent(el, targetCtx, event, payload, onReply){\n if(!this.isConnected()){\n this.log(\"hook\", () => [\"unable to push hook event. LiveView not connected\", event, payload])\n return false\n }\n let [ref, els, opts] = this.putRef([el], \"hook\")\n this.pushWithReply(() => [ref, els, opts], \"event\", {\n type: \"hook\",\n event: event,\n value: payload,\n cid: this.closestComponentID(targetCtx)\n }, (resp, reply) => onReply(reply, ref))\n\n return ref\n }\n\n extractMeta(el, meta, value){\n let prefix = this.binding(\"value-\")\n for(let i = 0; i < el.attributes.length; i++){\n if(!meta){ meta = {} }\n let name = el.attributes[i].name\n if(name.startsWith(prefix)){ meta[name.replace(prefix, \"\")] = el.getAttribute(name) }\n }\n if(el.value !== undefined && !(el instanceof HTMLFormElement)){\n if(!meta){ meta = {} }\n meta.value = el.value\n\n if(el.tagName === \"INPUT\" && CHECKABLE_INPUTS.indexOf(el.type) >= 0 && !el.checked){\n delete meta.value\n }\n }\n if(value){\n if(!meta){ meta = {} }\n for(let key in value){ meta[key] = value[key] }\n }\n return meta\n }\n\n\n pushEvent(type, el, targetCtx, phxEvent, meta, opts = {}, onReply){\n this.pushWithReply(() => this.putRef([el], type, opts), \"event\", {\n type: type,\n event: phxEvent,\n value: this.extractMeta(el, meta, opts.value),\n cid: this.targetComponentID(el, targetCtx, opts)\n }, (resp, reply) => onReply && onReply(reply))\n }\n\n pushFileProgress(fileEl, entryRef, progress, onReply = function (){ }){\n this.liveSocket.withinOwners(fileEl.form, (view, targetCtx) => {\n view.pushWithReply(null, \"progress\", {\n event: fileEl.getAttribute(view.binding(PHX_PROGRESS)),\n ref: fileEl.getAttribute(PHX_UPLOAD_REF),\n entry_ref: entryRef,\n progress: progress,\n cid: view.targetComponentID(fileEl.form, targetCtx)\n }, onReply)\n })\n }\n\n pushInput(inputEl, targetCtx, forceCid, phxEvent, opts, callback){\n let uploads\n let cid = isCid(forceCid) ? forceCid : this.targetComponentID(inputEl.form, targetCtx, opts)\n let refGenerator = () => this.putRef([inputEl, inputEl.form], \"change\", opts)\n let formData\n let meta = this.extractMeta(inputEl.form)\n if(inputEl instanceof HTMLButtonElement){ meta.submitter = inputEl }\n if(inputEl.getAttribute(this.binding(\"change\"))){\n formData = serializeForm(inputEl.form, {_target: opts._target, ...meta}, [inputEl.name])\n } else {\n formData = serializeForm(inputEl.form, {_target: opts._target, ...meta})\n }\n if(DOM.isUploadInput(inputEl) && inputEl.files && inputEl.files.length > 0){\n LiveUploader.trackFiles(inputEl, Array.from(inputEl.files))\n }\n uploads = LiveUploader.serializeUploads(inputEl)\n\n let event = {\n type: \"form\",\n event: phxEvent,\n value: formData,\n uploads: uploads,\n cid: cid\n }\n this.pushWithReply(refGenerator, \"event\", event, resp => {\n DOM.showError(inputEl, this.liveSocket.binding(PHX_FEEDBACK_FOR), this.liveSocket.binding(PHX_FEEDBACK_GROUP))\n if(DOM.isUploadInput(inputEl) && DOM.isAutoUpload(inputEl)){\n if(LiveUploader.filesAwaitingPreflight(inputEl).length > 0){\n let [ref, _els] = refGenerator()\n this.undoRefs(ref, [inputEl.form])\n this.uploadFiles(inputEl.form, targetCtx, ref, cid, (_uploads) => {\n callback && callback(resp)\n this.triggerAwaitingSubmit(inputEl.form)\n this.undoRefs(ref)\n })\n }\n } else {\n callback && callback(resp)\n }\n })\n }\n\n triggerAwaitingSubmit(formEl){\n let awaitingSubmit = this.getScheduledSubmit(formEl)\n if(awaitingSubmit){\n let [_el, _ref, _opts, callback] = awaitingSubmit\n this.cancelSubmit(formEl)\n callback()\n }\n }\n\n getScheduledSubmit(formEl){\n return this.formSubmits.find(([el, _ref, _opts, _callback]) => el.isSameNode(formEl))\n }\n\n scheduleSubmit(formEl, ref, opts, callback){\n if(this.getScheduledSubmit(formEl)){ return true }\n this.formSubmits.push([formEl, ref, opts, callback])\n }\n\n cancelSubmit(formEl){\n this.formSubmits = this.formSubmits.filter(([el, ref, _callback]) => {\n if(el.isSameNode(formEl)){\n this.undoRefs(ref)\n return false\n } else {\n return true\n }\n })\n }\n\n disableForm(formEl, opts = {}){\n let filterIgnored = el => {\n let userIgnored = closestPhxBinding(el, `${this.binding(PHX_UPDATE)}=ignore`, el.form)\n return !(userIgnored || closestPhxBinding(el, \"data-phx-update=ignore\", el.form))\n }\n let filterDisables = el => {\n return el.hasAttribute(this.binding(PHX_DISABLE_WITH))\n }\n let filterButton = el => el.tagName == \"BUTTON\"\n\n let filterInput = el => [\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(el.tagName)\n\n let formElements = Array.from(formEl.elements)\n let disables = formElements.filter(filterDisables)\n let buttons = formElements.filter(filterButton).filter(filterIgnored)\n let inputs = formElements.filter(filterInput).filter(filterIgnored)\n\n buttons.forEach(button => {\n button.setAttribute(PHX_DISABLED, button.disabled)\n button.disabled = true\n })\n inputs.forEach(input => {\n input.setAttribute(PHX_READONLY, input.readOnly)\n input.readOnly = true\n if(input.files){\n input.setAttribute(PHX_DISABLED, input.disabled)\n input.disabled = true\n }\n })\n formEl.setAttribute(this.binding(PHX_PAGE_LOADING), \"\")\n return this.putRef([formEl].concat(disables).concat(buttons).concat(inputs), \"submit\", opts)\n }\n\n pushFormSubmit(formEl, targetCtx, phxEvent, submitter, opts, onReply){\n let refGenerator = () => this.disableForm(formEl, {...opts, form: formEl, submitter: submitter})\n let cid = this.targetComponentID(formEl, targetCtx)\n if(LiveUploader.hasUploadsInProgress(formEl)){\n let [ref, _els] = refGenerator()\n let push = () => this.pushFormSubmit(formEl, targetCtx, phxEvent, submitter, opts, onReply)\n return this.scheduleSubmit(formEl, ref, opts, push)\n } else if(LiveUploader.inputsAwaitingPreflight(formEl).length > 0){\n let [ref, els] = refGenerator()\n let proxyRefGen = () => [ref, els, opts]\n this.uploadFiles(formEl, targetCtx, ref, cid, (uploads) => {\n // if we still having pending preflights it means we have invalid entries\n // and the phx-submit cannot be completed\n if(LiveUploader.inputsAwaitingPreflight(formEl).length > 0){\n return this.undoRefs(ref)\n }\n let meta = this.extractMeta(formEl)\n let formData = serializeForm(formEl, {submitter, ...meta})\n this.pushWithReply(proxyRefGen, \"event\", {\n type: \"form\",\n event: phxEvent,\n value: formData,\n cid: cid\n }, onReply)\n })\n } else if(!(formEl.hasAttribute(PHX_REF) && formEl.classList.contains(\"phx-submit-loading\"))){\n let meta = this.extractMeta(formEl)\n let formData = serializeForm(formEl, {submitter, ...meta})\n this.pushWithReply(refGenerator, \"event\", {\n type: \"form\",\n event: phxEvent,\n value: formData,\n cid: cid\n }, onReply)\n }\n }\n\n uploadFiles(formEl, targetCtx, ref, cid, onComplete){\n let joinCountAtUpload = this.joinCount\n let inputEls = LiveUploader.activeFileInputs(formEl)\n let numFileInputsInProgress = inputEls.length\n\n // get each file input\n inputEls.forEach(inputEl => {\n let uploader = new LiveUploader(inputEl, this, () => {\n numFileInputsInProgress--\n if(numFileInputsInProgress === 0){ onComplete() }\n });\n\n let entries = uploader.entries().map(entry => entry.toPreflightPayload())\n\n if(entries.length === 0) {\n numFileInputsInProgress--\n return\n }\n\n let payload = {\n ref: inputEl.getAttribute(PHX_UPLOAD_REF),\n entries: entries,\n cid: this.targetComponentID(inputEl.form, targetCtx)\n }\n\n this.log(\"upload\", () => [\"sending preflight request\", payload])\n\n this.pushWithReply(null, \"allow_upload\", payload, resp => {\n this.log(\"upload\", () => [\"got preflight response\", resp])\n // the preflight will reject entries beyond the max entries\n // so we error and cancel entries on the client that are missing from the response\n uploader.entries().forEach(entry => {\n if(resp.entries && !resp.entries[entry.ref]){\n this.handleFailedEntryPreflight(entry.ref, \"failed preflight\", uploader)\n }\n })\n // for auto uploads, we may have an empty entries response from the server\n // for form submits that contain invalid entries\n if(resp.error || Object.keys(resp.entries).length === 0){\n this.undoRefs(ref)\n let errors = resp.error || []\n errors.map(([entry_ref, reason]) => {\n this.handleFailedEntryPreflight(entry_ref, reason, uploader)\n })\n } else {\n let onError = (callback) => {\n this.channel.onError(() => {\n if(this.joinCount === joinCountAtUpload){ callback() }\n })\n }\n uploader.initAdapterUpload(resp, onError, this.liveSocket)\n }\n })\n })\n }\n\n handleFailedEntryPreflight(uploadRef, reason, uploader){\n if(uploader.isAutoUpload()){\n // uploadRef may be top level upload config ref or entry ref\n let entry = uploader.entries().find(entry => entry.ref === uploadRef.toString())\n if(entry){ entry.cancel() }\n } else {\n uploader.entries().map(entry => entry.cancel())\n }\n this.log(\"upload\", () => [`error for entry ${uploadRef}`, reason])\n }\n\n dispatchUploads(targetCtx, name, filesOrBlobs){\n let targetElement = this.targetCtxElement(targetCtx) || this.el\n let inputs = DOM.findUploadInputs(targetElement).filter(el => el.name === name)\n if(inputs.length === 0){ logError(`no live file inputs found matching the name \"${name}\"`) }\n else if(inputs.length > 1){ logError(`duplicate live file inputs found matching the name \"${name}\"`) }\n else { DOM.dispatchEvent(inputs[0], PHX_TRACK_UPLOADS, {detail: {files: filesOrBlobs}}) }\n }\n\n targetCtxElement(targetCtx) {\n if(isCid(targetCtx)){\n let [target] = DOM.findComponentNodeList(this.el, targetCtx)\n return target\n } else if(targetCtx) {\n return targetCtx\n } else {\n return null\n }\n }\n\n pushFormRecovery(oldForm, newForm, templateDom, callback){\n // we are only recovering forms inside the current view, therefore it is safe to\n // skip withinOwners here and always use this when referring to the view\n const phxChange = this.binding(\"change\")\n const phxTarget = newForm.getAttribute(this.binding(\"target\")) || newForm\n const phxEvent = newForm.getAttribute(this.binding(PHX_AUTO_RECOVER)) || newForm.getAttribute(this.binding(\"change\"))\n const inputs = Array.from(oldForm.elements).filter(el => DOM.isFormInput(el) && el.name && !el.hasAttribute(phxChange))\n if(inputs.length === 0){ return }\n\n // we must clear tracked uploads before recovery as they no longer have valid refs\n inputs.forEach(input => input.hasAttribute(PHX_UPLOAD_REF) && LiveUploader.clearFiles(input))\n // pushInput assumes that there is a source element that initiated the change;\n // because this is not the case when we recover forms, we provide the first input we find\n let input = inputs.find(el => el.type !== \"hidden\") || inputs[0]\n\n // in the case that there are multiple targets, we count the number of pending recovery events\n // and only call the callback once all events have been processed\n let pending = 0\n // withinTargets(phxTarget, callback, dom, viewEl)\n this.withinTargets(phxTarget, (targetView, targetCtx) => {\n const cid = this.targetComponentID(newForm, targetCtx)\n pending++\n targetView.pushInput(input, targetCtx, cid, phxEvent, {_target: input.name}, () => {\n pending--\n if(pending === 0){ callback() }\n })\n }, templateDom, templateDom)\n }\n\n pushLinkPatch(href, targetEl, callback){\n let linkRef = this.liveSocket.setPendingLink(href)\n let refGen = targetEl ? () => this.putRef([targetEl], \"click\") : null\n let fallback = () => this.liveSocket.redirect(window.location.href)\n let url = href.startsWith(\"/\") ? `${location.protocol}//${location.host}${href}` : href\n\n let push = this.pushWithReply(refGen, \"live_patch\", {url}, resp => {\n this.liveSocket.requestDOMUpdate(() => {\n if(resp.link_redirect){\n this.liveSocket.replaceMain(href, null, callback, linkRef)\n } else {\n if(this.liveSocket.commitPendingLink(linkRef)){\n this.href = href\n }\n this.applyPendingUpdates()\n callback && callback(linkRef)\n }\n })\n })\n\n if(push){\n push.receive(\"timeout\", fallback)\n } else {\n fallback()\n }\n }\n\n getFormsForRecovery(){\n if(this.joinCount === 0){ return {} }\n\n let phxChange = this.binding(\"change\")\n\n return DOM.all(this.el, `form[${phxChange}]`)\n .filter(form => form.id)\n .filter(form => form.elements.length > 0)\n .filter(form => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== \"ignore\")\n .map(form => form.cloneNode(true))\n .reduce((acc, form) => {\n acc[form.id] = form\n return acc\n }, {})\n }\n\n maybePushComponentsDestroyed(destroyedCIDs){\n let willDestroyCIDs = destroyedCIDs.filter(cid => {\n return DOM.findComponentNodeList(this.el, cid).length === 0\n })\n\n if(willDestroyCIDs.length > 0){\n // we must reset the render change tracking for cids that\n // could be added back from the server so we don't skip them\n willDestroyCIDs.forEach(cid => this.rendered.resetRender(cid))\n\n this.pushWithReply(null, \"cids_will_destroy\", {cids: willDestroyCIDs}, () => {\n // we must wait for pending transitions to complete before determining\n // if the cids were added back to the DOM in the meantime (#3139)\n this.liveSocket.requestDOMUpdate(() => {\n // See if any of the cids we wanted to destroy were added back,\n // if they were added back, we don't actually destroy them.\n let completelyDestroyCIDs = willDestroyCIDs.filter(cid => {\n return DOM.findComponentNodeList(this.el, cid).length === 0\n })\n \n if(completelyDestroyCIDs.length > 0){\n this.pushWithReply(null, \"cids_destroyed\", {cids: completelyDestroyCIDs}, (resp) => {\n this.rendered.pruneCIDs(resp.cids)\n })\n }\n })\n })\n }\n }\n\n ownsElement(el){\n let parentViewEl = el.closest(PHX_VIEW_SELECTOR)\n return el.getAttribute(PHX_PARENT_ID) === this.id ||\n (parentViewEl && parentViewEl.id === this.id) ||\n (!parentViewEl && this.isDead)\n }\n\n submitForm(form, targetCtx, phxEvent, submitter, opts = {}){\n DOM.putPrivate(form, PHX_HAS_SUBMITTED, true)\n const phxFeedbackFor = this.liveSocket.binding(PHX_FEEDBACK_FOR)\n const phxFeedbackGroup = this.liveSocket.binding(PHX_FEEDBACK_GROUP)\n const inputs = Array.from(form.elements)\n inputs.forEach(input => DOM.putPrivate(input, PHX_HAS_SUBMITTED, true))\n this.liveSocket.blurActiveElement(this)\n this.pushFormSubmit(form, targetCtx, phxEvent, submitter, opts, () => {\n inputs.forEach(input => DOM.showError(input, phxFeedbackFor, phxFeedbackGroup))\n this.liveSocket.restorePreviouslyActiveFocus()\n })\n }\n\n binding(kind){ return this.liveSocket.binding(kind) }\n}\n", "/** Initializes the LiveSocket\n *\n *\n * @param {string} endPoint - The string WebSocket endpoint, ie, `\"wss://example.com/live\"`,\n * `\"/live\"` (inherited host & protocol)\n * @param {Phoenix.Socket} socket - the required Phoenix Socket class imported from \"phoenix\". For example:\n *\n * import {Socket} from \"phoenix\"\n * import {LiveSocket} from \"phoenix_live_view\"\n * let liveSocket = new LiveSocket(\"/live\", Socket, {...})\n *\n * @param {Object} [opts] - Optional configuration. Outside of keys listed below, all\n * configuration is passed directly to the Phoenix Socket constructor.\n * @param {Object} [opts.defaults] - The optional defaults to use for various bindings,\n * such as `phx-debounce`. Supports the following keys:\n *\n * - debounce - the millisecond phx-debounce time. Defaults 300\n * - throttle - the millisecond phx-throttle time. Defaults 300\n *\n * @param {Function} [opts.params] - The optional function for passing connect params.\n * The function receives the element associated with a given LiveView. For example:\n *\n * (el) => {view: el.getAttribute(\"data-my-view-name\", token: window.myToken}\n *\n * @param {string} [opts.bindingPrefix] - The optional prefix to use for all phx DOM annotations.\n * Defaults to \"phx-\".\n * @param {Object} [opts.hooks] - The optional object for referencing LiveView hook callbacks.\n * @param {Object} [opts.uploaders] - The optional object for referencing LiveView uploader callbacks.\n * @param {integer} [opts.loaderTimeout] - The optional delay in milliseconds to wait before apply\n * loading states.\n * @param {integer} [opts.maxReloads] - The maximum reloads before entering failsafe mode.\n * @param {integer} [opts.reloadJitterMin] - The minimum time between normal reload attempts.\n * @param {integer} [opts.reloadJitterMax] - The maximum time between normal reload attempts.\n * @param {integer} [opts.failsafeJitter] - The time between reload attempts in failsafe mode.\n * @param {Function} [opts.viewLogger] - The optional function to log debug information. For example:\n *\n * (view, kind, msg, obj) => console.log(`${view.id} ${kind}: ${msg} - `, obj)\n *\n * @param {Object} [opts.metadata] - The optional object mapping event names to functions for\n * populating event metadata. For example:\n *\n * metadata: {\n * click: (e, el) => {\n * return {\n * ctrlKey: e.ctrlKey,\n * metaKey: e.metaKey,\n * detail: e.detail || 1,\n * }\n * },\n * keydown: (e, el) => {\n * return {\n * key: e.key,\n * ctrlKey: e.ctrlKey,\n * metaKey: e.metaKey,\n * shiftKey: e.shiftKey\n * }\n * }\n * }\n * @param {Object} [opts.sessionStorage] - An optional Storage compatible object\n * Useful when LiveView won't have access to `sessionStorage`. For example, This could\n * happen if a site loads a cross-domain LiveView in an iframe. Example usage:\n *\n * class InMemoryStorage {\n * constructor() { this.storage = {} }\n * getItem(keyName) { return this.storage[keyName] || null }\n * removeItem(keyName) { delete this.storage[keyName] }\n * setItem(keyName, keyValue) { this.storage[keyName] = keyValue }\n * }\n *\n * @param {Object} [opts.localStorage] - An optional Storage compatible object\n * Useful for when LiveView won't have access to `localStorage`.\n * See `opts.sessionStorage` for examples.\n*/\n\nimport {\n BINDING_PREFIX,\n CONSECUTIVE_RELOADS,\n DEFAULTS,\n FAILSAFE_JITTER,\n LOADER_TIMEOUT,\n MAX_RELOADS,\n PHX_DEBOUNCE,\n PHX_DROP_TARGET,\n PHX_HAS_FOCUSED,\n PHX_KEY,\n PHX_LINK_STATE,\n PHX_LIVE_LINK,\n PHX_LV_DEBUG,\n PHX_LV_LATENCY_SIM,\n PHX_LV_PROFILE,\n PHX_MAIN,\n PHX_PARENT_ID,\n PHX_VIEW_SELECTOR,\n PHX_ROOT_ID,\n PHX_THROTTLE,\n PHX_TRACK_UPLOADS,\n PHX_SESSION,\n PHX_FEEDBACK_FOR,\n PHX_FEEDBACK_GROUP,\n RELOAD_JITTER_MIN,\n RELOAD_JITTER_MAX,\n PHX_REF,\n} from \"./constants\"\n\nimport {\n clone,\n closestPhxBinding,\n closure,\n debug,\n maybe\n} from \"./utils\"\n\nimport Browser from \"./browser\"\nimport DOM from \"./dom\"\nimport Hooks from \"./hooks\"\nimport LiveUploader from \"./live_uploader\"\nimport View from \"./view\"\nimport JS from \"./js\"\n\nexport default class LiveSocket {\n constructor(url, phxSocket, opts = {}){\n this.unloaded = false\n if(!phxSocket || phxSocket.constructor.name === \"Object\"){\n throw new Error(`\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\n\n import {Socket} from \"phoenix\"\n import {LiveSocket} from \"phoenix_live_view\"\n let liveSocket = new LiveSocket(\"/live\", Socket, {...})\n `)\n }\n this.socket = new phxSocket(url, opts)\n this.bindingPrefix = opts.bindingPrefix || BINDING_PREFIX\n this.opts = opts\n this.params = closure(opts.params || {})\n this.viewLogger = opts.viewLogger\n this.metadataCallbacks = opts.metadata || {}\n this.defaults = Object.assign(clone(DEFAULTS), opts.defaults || {})\n this.activeElement = null\n this.prevActive = null\n this.silenced = false\n this.main = null\n this.outgoingMainEl = null\n this.clickStartedAtTarget = null\n this.linkRef = 1\n this.roots = {}\n this.href = window.location.href\n this.pendingLink = null\n this.currentLocation = clone(window.location)\n this.hooks = opts.hooks || {}\n this.uploaders = opts.uploaders || {}\n this.loaderTimeout = opts.loaderTimeout || LOADER_TIMEOUT\n this.reloadWithJitterTimer = null\n this.maxReloads = opts.maxReloads || MAX_RELOADS\n this.reloadJitterMin = opts.reloadJitterMin || RELOAD_JITTER_MIN\n this.reloadJitterMax = opts.reloadJitterMax || RELOAD_JITTER_MAX\n this.failsafeJitter = opts.failsafeJitter || FAILSAFE_JITTER\n this.localStorage = opts.localStorage || window.localStorage\n this.sessionStorage = opts.sessionStorage || window.sessionStorage\n this.boundTopLevelEvents = false\n this.serverCloseRef = null\n this.domCallbacks = Object.assign({\n onPatchStart: closure(),\n onPatchEnd: closure(),\n onNodeAdded: closure(),\n onBeforeElUpdated: closure()},\n opts.dom || {})\n this.transitions = new TransitionSet()\n window.addEventListener(\"pagehide\", _e => {\n this.unloaded = true\n })\n this.socket.onOpen(() => {\n if(this.isUnloaded()){\n // reload page if being restored from back/forward cache and browser does not emit \"pageshow\"\n window.location.reload()\n }\n })\n }\n\n // public\n\n version(){ return LV_VSN }\n\n isProfileEnabled(){ return this.sessionStorage.getItem(PHX_LV_PROFILE) === \"true\" }\n\n isDebugEnabled(){ return this.sessionStorage.getItem(PHX_LV_DEBUG) === \"true\" }\n\n isDebugDisabled(){ return this.sessionStorage.getItem(PHX_LV_DEBUG) === \"false\" }\n\n enableDebug(){ this.sessionStorage.setItem(PHX_LV_DEBUG, \"true\") }\n\n enableProfiling(){ this.sessionStorage.setItem(PHX_LV_PROFILE, \"true\") }\n\n disableDebug(){ this.sessionStorage.setItem(PHX_LV_DEBUG, \"false\") }\n\n disableProfiling(){ this.sessionStorage.removeItem(PHX_LV_PROFILE) }\n\n enableLatencySim(upperBoundMs){\n this.enableDebug()\n console.log(\"latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable\")\n this.sessionStorage.setItem(PHX_LV_LATENCY_SIM, upperBoundMs)\n }\n\n disableLatencySim(){ this.sessionStorage.removeItem(PHX_LV_LATENCY_SIM) }\n\n getLatencySim(){\n let str = this.sessionStorage.getItem(PHX_LV_LATENCY_SIM)\n return str ? parseInt(str) : null\n }\n\n getSocket(){ return this.socket }\n\n connect(){\n // enable debug by default if on localhost and not explicitly disabled\n if(window.location.hostname === \"localhost\" && !this.isDebugDisabled()){ this.enableDebug() }\n let doConnect = () => {\n if(this.joinRootViews()){\n this.bindTopLevelEvents()\n this.socket.connect()\n } else if(this.main){\n this.socket.connect()\n } else {\n this.bindTopLevelEvents({dead: true})\n }\n this.joinDeadView()\n }\n if([\"complete\", \"loaded\", \"interactive\"].indexOf(document.readyState) >= 0){\n doConnect()\n } else {\n document.addEventListener(\"DOMContentLoaded\", () => doConnect())\n }\n }\n\n disconnect(callback){\n clearTimeout(this.reloadWithJitterTimer)\n // remove the socket close listener to avoid trying to handle\n // a server close event when it is actually caused by us disconnecting\n if(this.serverCloseRef){\n this.socket.off(this.serverCloseRef)\n this.serverCloseRef = null\n }\n this.socket.disconnect(callback)\n }\n\n replaceTransport(transport){\n clearTimeout(this.reloadWithJitterTimer)\n this.socket.replaceTransport(transport)\n this.connect()\n }\n\n execJS(el, encodedJS, eventType = null){\n this.owner(el, view => JS.exec(eventType, encodedJS, view, el))\n }\n\n // private\n\n execJSHookPush(el, phxEvent, data, callback){\n this.withinOwners(el, view => {\n JS.exec(\"hook\", phxEvent, view, el, [\"push\", {data, callback}])\n })\n }\n\n unload(){\n if(this.unloaded){ return }\n if(this.main && this.isConnected()){ this.log(this.main, \"socket\", () => [\"disconnect for page nav\"]) }\n this.unloaded = true\n this.destroyAllViews()\n this.disconnect()\n }\n\n triggerDOM(kind, args){ this.domCallbacks[kind](...args) }\n\n time(name, func){\n if(!this.isProfileEnabled() || !console.time){ return func() }\n console.time(name)\n let result = func()\n console.timeEnd(name)\n return result\n }\n\n log(view, kind, msgCallback){\n if(this.viewLogger){\n let [msg, obj] = msgCallback()\n this.viewLogger(view, kind, msg, obj)\n } else if(this.isDebugEnabled()){\n let [msg, obj] = msgCallback()\n debug(view, kind, msg, obj)\n }\n }\n\n requestDOMUpdate(callback){\n this.transitions.after(callback)\n }\n\n transition(time, onStart, onDone = function(){}){\n this.transitions.addTransition(time, onStart, onDone)\n }\n\n onChannel(channel, event, cb){\n channel.on(event, data => {\n let latency = this.getLatencySim()\n if(!latency){\n cb(data)\n } else {\n setTimeout(() => cb(data), latency)\n }\n })\n }\n\n wrapPush(view, opts, push){\n let latency = this.getLatencySim()\n let oldJoinCount = view.joinCount\n if(!latency){\n if(this.isConnected() && opts.timeout){\n return push().receive(\"timeout\", () => {\n if(view.joinCount === oldJoinCount && !view.isDestroyed()){\n this.reloadWithJitter(view, () => {\n this.log(view, \"timeout\", () => [\"received timeout while communicating with server. Falling back to hard refresh for recovery\"])\n })\n }\n })\n } else {\n return push()\n }\n }\n\n let fakePush = {\n receives: [],\n receive(kind, cb){ this.receives.push([kind, cb]) }\n }\n setTimeout(() => {\n if(view.isDestroyed()){ return }\n fakePush.receives.reduce((acc, [kind, cb]) => acc.receive(kind, cb), push())\n }, latency)\n return fakePush\n }\n\n reloadWithJitter(view, log){\n clearTimeout(this.reloadWithJitterTimer)\n this.disconnect()\n let minMs = this.reloadJitterMin\n let maxMs = this.reloadJitterMax\n let afterMs = Math.floor(Math.random() * (maxMs - minMs + 1)) + minMs\n let tries = Browser.updateLocal(this.localStorage, window.location.pathname, CONSECUTIVE_RELOADS, 0, count => count + 1)\n if(tries > this.maxReloads){\n afterMs = this.failsafeJitter\n }\n this.reloadWithJitterTimer = setTimeout(() => {\n // if view has recovered, such as transport replaced, then cancel\n if(view.isDestroyed() || view.isConnected()){ return }\n view.destroy()\n log ? log() : this.log(view, \"join\", () => [`encountered ${tries} consecutive reloads`])\n if(tries > this.maxReloads){\n this.log(view, \"join\", () => [`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`])\n }\n if(this.hasPendingLink()){\n window.location = this.pendingLink\n } else {\n window.location.reload()\n }\n }, afterMs)\n }\n\n getHookCallbacks(name){\n return name && name.startsWith(\"Phoenix.\") ? Hooks[name.split(\".\")[1]] : this.hooks[name]\n }\n\n isUnloaded(){ return this.unloaded }\n\n isConnected(){ return this.socket.isConnected() }\n\n getBindingPrefix(){ return this.bindingPrefix }\n\n binding(kind){ return `${this.getBindingPrefix()}${kind}` }\n\n channel(topic, params){ return this.socket.channel(topic, params) }\n\n joinDeadView(){\n let body = document.body\n if(body && !this.isPhxView(body) && !this.isPhxView(document.firstElementChild)){\n let view = this.newRootView(body)\n view.setHref(this.getHref())\n view.joinDead()\n if(!this.main){ this.main = view }\n window.requestAnimationFrame(() => view.execNewMounted())\n }\n }\n\n joinRootViews(){\n let rootsFound = false\n DOM.all(document, `${PHX_VIEW_SELECTOR}:not([${PHX_PARENT_ID}])`, rootEl => {\n if(!this.getRootById(rootEl.id)){\n let view = this.newRootView(rootEl)\n view.setHref(this.getHref())\n view.join()\n if(rootEl.hasAttribute(PHX_MAIN)){ this.main = view }\n }\n rootsFound = true\n })\n return rootsFound\n }\n\n redirect(to, flash){\n this.unload()\n Browser.redirect(to, flash)\n }\n\n replaceMain(href, flash, callback = null, linkRef = this.setPendingLink(href)){\n let liveReferer = this.currentLocation.href\n this.outgoingMainEl = this.outgoingMainEl || this.main.el\n let newMainEl = DOM.cloneNode(this.outgoingMainEl, \"\")\n this.main.showLoader(this.loaderTimeout)\n this.main.destroy()\n\n this.main = this.newRootView(newMainEl, flash, liveReferer)\n this.main.setRedirect(href)\n this.transitionRemoves(null, true)\n this.main.join((joinCount, onDone) => {\n if(joinCount === 1 && this.commitPendingLink(linkRef)){\n this.requestDOMUpdate(() => {\n DOM.findPhxSticky(document).forEach(el => newMainEl.appendChild(el))\n this.outgoingMainEl.replaceWith(newMainEl)\n this.outgoingMainEl = null\n callback && callback(linkRef)\n onDone()\n })\n }\n })\n }\n\n transitionRemoves(elements, skipSticky){\n let removeAttr = this.binding(\"remove\")\n elements = elements || DOM.all(document, `[${removeAttr}]`)\n\n if(skipSticky){\n const stickies = DOM.findPhxSticky(document) || []\n elements = elements.filter(el => !DOM.isChildOfAny(el, stickies))\n }\n elements.forEach(el => {\n this.execJS(el, el.getAttribute(removeAttr), \"remove\")\n })\n }\n\n isPhxView(el){ return el.getAttribute && el.getAttribute(PHX_SESSION) !== null }\n\n newRootView(el, flash, liveReferer){\n let view = new View(el, this, null, flash, liveReferer)\n this.roots[view.id] = view\n return view\n }\n\n owner(childEl, callback){\n let view = maybe(childEl.closest(PHX_VIEW_SELECTOR), el => this.getViewByEl(el)) || this.main\n if(view){ callback(view) }\n }\n\n withinOwners(childEl, callback){\n this.owner(childEl, view => callback(view, childEl))\n }\n\n getViewByEl(el){\n let rootId = el.getAttribute(PHX_ROOT_ID)\n return maybe(this.getRootById(rootId), root => root.getDescendentByEl(el))\n }\n\n getRootById(id){ return this.roots[id] }\n\n destroyAllViews(){\n for(let id in this.roots){\n this.roots[id].destroy()\n delete this.roots[id]\n }\n this.main = null\n }\n\n destroyViewByEl(el){\n let root = this.getRootById(el.getAttribute(PHX_ROOT_ID))\n if(root && root.id === el.id){\n root.destroy()\n delete this.roots[root.id]\n } else if(root){\n root.destroyDescendent(el.id)\n }\n }\n\n setActiveElement(target){\n if(this.activeElement === target){ return }\n this.activeElement = target\n let cancel = () => {\n if(target === this.activeElement){ this.activeElement = null }\n target.removeEventListener(\"mouseup\", this)\n target.removeEventListener(\"touchend\", this)\n }\n target.addEventListener(\"mouseup\", cancel)\n target.addEventListener(\"touchend\", cancel)\n }\n\n getActiveElement(){\n if(document.activeElement === document.body){\n return this.activeElement || document.activeElement\n } else {\n // document.activeElement can be null in Internet Explorer 11\n return document.activeElement || document.body\n }\n }\n\n dropActiveElement(view){\n if(this.prevActive && view.ownsElement(this.prevActive)){\n this.prevActive = null\n }\n }\n\n restorePreviouslyActiveFocus(){\n if(this.prevActive && this.prevActive !== document.body){\n this.prevActive.focus()\n }\n }\n\n blurActiveElement(){\n this.prevActive = this.getActiveElement()\n if(this.prevActive !== document.body){ this.prevActive.blur() }\n }\n\n bindTopLevelEvents({dead} = {}){\n if(this.boundTopLevelEvents){ return }\n\n this.boundTopLevelEvents = true\n // enter failsafe reload if server has gone away intentionally, such as \"disconnect\" broadcast\n this.serverCloseRef = this.socket.onClose(event => {\n // failsafe reload if normal closure and we still have a main LV\n if(event && event.code === 1000 && this.main){ return this.reloadWithJitter(this.main) }\n })\n document.body.addEventListener(\"click\", function (){ }) // ensure all click events bubble for mobile Safari\n window.addEventListener(\"pageshow\", e => {\n if(e.persisted){ // reload page if being restored from back/forward cache\n this.getSocket().disconnect()\n this.withPageLoading({to: window.location.href, kind: \"redirect\"})\n window.location.reload()\n }\n }, true)\n if(!dead){ this.bindNav() }\n this.bindClicks()\n if(!dead){ this.bindForms() }\n this.bind({keyup: \"keyup\", keydown: \"keydown\"}, (e, type, view, targetEl, phxEvent, phxTarget) => {\n let matchKey = targetEl.getAttribute(this.binding(PHX_KEY))\n let pressedKey = e.key && e.key.toLowerCase() // chrome clicked autocompletes send a keydown without key\n if(matchKey && matchKey.toLowerCase() !== pressedKey){ return }\n\n let data = {key: e.key, ...this.eventMeta(type, e, targetEl)}\n JS.exec(type, phxEvent, view, targetEl, [\"push\", {data}])\n })\n this.bind({blur: \"focusout\", focus: \"focusin\"}, (e, type, view, targetEl, phxEvent, phxTarget) => {\n if(!phxTarget){\n let data = {key: e.key, ...this.eventMeta(type, e, targetEl)}\n JS.exec(type, phxEvent, view, targetEl, [\"push\", {data}])\n }\n })\n this.bind({blur: \"blur\", focus: \"focus\"}, (e, type, view, targetEl, phxEvent, phxTarget) => {\n // blur and focus are triggered on document and window. Discard one to avoid dups\n if(phxTarget === \"window\"){\n let data = this.eventMeta(type, e, targetEl)\n JS.exec(type, phxEvent, view, targetEl, [\"push\", {data}])\n }\n })\n window.addEventListener(\"dragover\", e => e.preventDefault())\n window.addEventListener(\"drop\", e => {\n e.preventDefault()\n let dropTargetId = maybe(closestPhxBinding(e.target, this.binding(PHX_DROP_TARGET)), trueTarget => {\n return trueTarget.getAttribute(this.binding(PHX_DROP_TARGET))\n })\n let dropTarget = dropTargetId && document.getElementById(dropTargetId)\n let files = Array.from(e.dataTransfer.files || [])\n if(!dropTarget || dropTarget.disabled || files.length === 0 || !(dropTarget.files instanceof FileList)){ return }\n\n LiveUploader.trackFiles(dropTarget, files, e.dataTransfer)\n dropTarget.dispatchEvent(new Event(\"input\", {bubbles: true}))\n })\n this.on(PHX_TRACK_UPLOADS, e => {\n let uploadTarget = e.target\n if(!DOM.isUploadInput(uploadTarget)){ return }\n let files = Array.from(e.detail.files || []).filter(f => f instanceof File || f instanceof Blob)\n LiveUploader.trackFiles(uploadTarget, files)\n uploadTarget.dispatchEvent(new Event(\"input\", {bubbles: true}))\n })\n }\n\n eventMeta(eventName, e, targetEl){\n let callback = this.metadataCallbacks[eventName]\n return callback ? callback(e, targetEl) : {}\n }\n\n setPendingLink(href){\n this.linkRef++\n this.pendingLink = href\n return this.linkRef\n }\n\n commitPendingLink(linkRef){\n if(this.linkRef !== linkRef){\n return false\n } else {\n this.href = this.pendingLink\n this.pendingLink = null\n return true\n }\n }\n\n getHref(){ return this.href }\n\n hasPendingLink(){ return !!this.pendingLink }\n\n bind(events, callback){\n for(let event in events){\n let browserEventName = events[event]\n\n this.on(browserEventName, e => {\n let binding = this.binding(event)\n let windowBinding = this.binding(`window-${event}`)\n let targetPhxEvent = e.target.getAttribute && e.target.getAttribute(binding)\n if(targetPhxEvent){\n this.debounce(e.target, e, browserEventName, () => {\n this.withinOwners(e.target, view => {\n callback(e, event, view, e.target, targetPhxEvent, null)\n })\n })\n } else {\n DOM.all(document, `[${windowBinding}]`, el => {\n let phxEvent = el.getAttribute(windowBinding)\n this.debounce(el, e, browserEventName, () => {\n this.withinOwners(el, view => {\n callback(e, event, view, el, phxEvent, \"window\")\n })\n })\n })\n }\n })\n }\n }\n\n bindClicks(){\n window.addEventListener(\"mousedown\", e => this.clickStartedAtTarget = e.target)\n this.bindClick(\"click\", \"click\")\n }\n\n bindClick(eventName, bindingName){\n let click = this.binding(bindingName)\n window.addEventListener(eventName, e => {\n let target = null\n // a synthetic click event (detail 0) will not have caused a mousedown event,\n // therefore the clickStartedAtTarget is stale\n if(e.detail === 0) this.clickStartedAtTarget = e.target\n let clickStartedAtTarget = this.clickStartedAtTarget || e.target\n target = closestPhxBinding(clickStartedAtTarget, click)\n this.dispatchClickAway(e, clickStartedAtTarget)\n this.clickStartedAtTarget = null\n let phxEvent = target && target.getAttribute(click)\n if(!phxEvent){\n if(DOM.isNewPageClick(e, window.location)){ this.unload() }\n return\n }\n\n if(target.getAttribute(\"href\") === \"#\"){ e.preventDefault() }\n\n // noop if we are in the middle of awaiting an ack for this el already\n if(target.hasAttribute(PHX_REF)){ return }\n\n this.debounce(target, e, \"click\", () => {\n this.withinOwners(target, view => {\n JS.exec(\"click\", phxEvent, view, target, [\"push\", {data: this.eventMeta(\"click\", e, target)}])\n })\n })\n }, false)\n }\n\n dispatchClickAway(e, clickStartedAt){\n let phxClickAway = this.binding(\"click-away\")\n DOM.all(document, `[${phxClickAway}]`, el => {\n if(!(el.isSameNode(clickStartedAt) || el.contains(clickStartedAt))){\n this.withinOwners(el, view => {\n let phxEvent = el.getAttribute(phxClickAway)\n if(JS.isVisible(el) && JS.isInViewport(el)){\n JS.exec(\"click\", phxEvent, view, el, [\"push\", {data: this.eventMeta(\"click\", e, e.target)}])\n }\n })\n }\n })\n }\n\n bindNav(){\n if(!Browser.canPushState()){ return }\n if(history.scrollRestoration){ history.scrollRestoration = \"manual\" }\n let scrollTimer = null\n window.addEventListener(\"scroll\", _e => {\n clearTimeout(scrollTimer)\n scrollTimer = setTimeout(() => {\n Browser.updateCurrentState(state => Object.assign(state, {scroll: window.scrollY}))\n }, 100)\n })\n window.addEventListener(\"popstate\", event => {\n if(!this.registerNewLocation(window.location)){ return }\n let {type, id, root, scroll} = event.state || {}\n let href = window.location.href\n\n DOM.dispatchEvent(window, \"phx:navigate\", {detail: {href, patch: type === \"patch\", pop: true}})\n this.requestDOMUpdate(() => {\n if(this.main.isConnected() && (type === \"patch\" && id === this.main.id)){\n this.main.pushLinkPatch(href, null, () => {\n this.maybeScroll(scroll)\n })\n } else {\n this.replaceMain(href, null, () => {\n if(root){ this.replaceRootHistory() }\n this.maybeScroll(scroll)\n })\n }\n })\n }, false)\n window.addEventListener(\"click\", e => {\n let target = closestPhxBinding(e.target, PHX_LIVE_LINK)\n let type = target && target.getAttribute(PHX_LIVE_LINK)\n if(!type || !this.isConnected() || !this.main || DOM.wantsNewTab(e)){ return }\n\n // When wrapping an SVG element in an anchor tag, the href can be an SVGAnimatedString\n let href = target.href instanceof SVGAnimatedString ? target.href.baseVal : target.href\n\n let linkState = target.getAttribute(PHX_LINK_STATE)\n e.preventDefault()\n e.stopImmediatePropagation() // do not bubble click to regular phx-click bindings\n if(this.pendingLink === href){ return }\n\n this.requestDOMUpdate(() => {\n if(type === \"patch\"){\n this.pushHistoryPatch(href, linkState, target)\n } else if(type === \"redirect\"){\n this.historyRedirect(href, linkState)\n } else {\n throw new Error(`expected ${PHX_LIVE_LINK} to be \"patch\" or \"redirect\", got: ${type}`)\n }\n let phxClick = target.getAttribute(this.binding(\"click\"))\n if(phxClick){\n this.requestDOMUpdate(() => this.execJS(target, phxClick, \"click\"))\n }\n })\n }, false)\n }\n\n maybeScroll(scroll){\n if(typeof(scroll) === \"number\"){\n requestAnimationFrame(() => {\n window.scrollTo(0, scroll)\n }) // the body needs to render before we scroll.\n }\n }\n\n dispatchEvent(event, payload = {}){\n DOM.dispatchEvent(window, `phx:${event}`, {detail: payload})\n }\n\n dispatchEvents(events){\n events.forEach(([event, payload]) => this.dispatchEvent(event, payload))\n }\n\n withPageLoading(info, callback){\n DOM.dispatchEvent(window, \"phx:page-loading-start\", {detail: info})\n let done = () => DOM.dispatchEvent(window, \"phx:page-loading-stop\", {detail: info})\n return callback ? callback(done) : done\n }\n\n pushHistoryPatch(href, linkState, targetEl){\n if(!this.isConnected() || !this.main.isMain()){ return Browser.redirect(href) }\n\n this.withPageLoading({to: href, kind: \"patch\"}, done => {\n this.main.pushLinkPatch(href, targetEl, linkRef => {\n this.historyPatch(href, linkState, linkRef)\n done()\n })\n })\n }\n\n historyPatch(href, linkState, linkRef = this.setPendingLink(href)){\n if(!this.commitPendingLink(linkRef)){ return }\n\n Browser.pushState(linkState, {type: \"patch\", id: this.main.id}, href)\n DOM.dispatchEvent(window, \"phx:navigate\", {detail: {patch: true, href, pop: false}})\n this.registerNewLocation(window.location)\n }\n\n historyRedirect(href, linkState, flash){\n if(!this.isConnected() || !this.main.isMain()){ return Browser.redirect(href, flash) }\n\n // convert to full href if only path prefix\n if(/^\\/$|^\\/[^\\/]+.*$/.test(href)){\n let {protocol, host} = window.location\n href = `${protocol}//${host}${href}`\n }\n let scroll = window.scrollY\n this.withPageLoading({to: href, kind: \"redirect\"}, done => {\n this.replaceMain(href, flash, (linkRef) => {\n if(linkRef === this.linkRef){\n Browser.pushState(linkState, {type: \"redirect\", id: this.main.id, scroll: scroll}, href)\n DOM.dispatchEvent(window, \"phx:navigate\", {detail: {href, patch: false, pop: false}})\n this.registerNewLocation(window.location)\n }\n done()\n })\n })\n }\n\n replaceRootHistory(){\n Browser.pushState(\"replace\", {root: true, type: \"patch\", id: this.main.id})\n }\n\n registerNewLocation(newLocation){\n let {pathname, search} = this.currentLocation\n if(pathname + search === newLocation.pathname + newLocation.search){\n return false\n } else {\n this.currentLocation = clone(newLocation)\n return true\n }\n }\n\n bindForms(){\n let iterations = 0\n let externalFormSubmitted = false\n\n // disable forms on submit that track phx-change but perform external submit\n this.on(\"submit\", e => {\n let phxSubmit = e.target.getAttribute(this.binding(\"submit\"))\n let phxChange = e.target.getAttribute(this.binding(\"change\"))\n if(!externalFormSubmitted && phxChange && !phxSubmit){\n externalFormSubmitted = true\n e.preventDefault()\n this.withinOwners(e.target, view => {\n view.disableForm(e.target)\n // safari needs next tick\n window.requestAnimationFrame(() => {\n if(DOM.isUnloadableFormSubmit(e)){ this.unload() }\n e.target.submit()\n })\n })\n }\n }, true)\n\n this.on(\"submit\", e => {\n let phxEvent = e.target.getAttribute(this.binding(\"submit\"))\n if(!phxEvent){\n if(DOM.isUnloadableFormSubmit(e)){ this.unload() }\n return\n }\n e.preventDefault()\n e.target.disabled = true\n this.withinOwners(e.target, view => {\n JS.exec(\"submit\", phxEvent, view, e.target, [\"push\", {submitter: e.submitter}])\n })\n }, false)\n\n for(let type of [\"change\", \"input\"]){\n this.on(type, e => {\n let phxChange = this.binding(\"change\")\n let input = e.target\n let inputEvent = input.getAttribute(phxChange)\n let formEvent = input.form && input.form.getAttribute(phxChange)\n let phxEvent = inputEvent || formEvent\n if(!phxEvent){ return }\n if(input.type === \"number\" && input.validity && input.validity.badInput){ return }\n\n let dispatcher = inputEvent ? input : input.form\n let currentIterations = iterations\n iterations++\n let {at: at, type: lastType} = DOM.private(input, \"prev-iteration\") || {}\n // Browsers should always fire at least one \"input\" event before every \"change\"\n // Ignore \"change\" events, unless there was no prior \"input\" event.\n // This could happen if user code triggers a \"change\" event, or if the browser is non-conforming.\n if(at === currentIterations - 1 && type === \"change\" && lastType === \"input\"){ return }\n\n DOM.putPrivate(input, \"prev-iteration\", {at: currentIterations, type: type})\n\n this.debounce(input, e, type, () => {\n this.withinOwners(dispatcher, view => {\n DOM.putPrivate(input, PHX_HAS_FOCUSED, true)\n if(!DOM.isTextualInput(input)){\n this.setActiveElement(input)\n }\n JS.exec(\"change\", phxEvent, view, input, [\"push\", {_target: e.target.name, dispatcher: dispatcher}])\n })\n })\n }, false)\n }\n this.on(\"reset\", (e) => {\n let form = e.target\n DOM.resetForm(form, this.binding(PHX_FEEDBACK_FOR), this.binding(PHX_FEEDBACK_GROUP))\n let input = Array.from(form.elements).find(el => el.type === \"reset\")\n if(input){\n // wait until next tick to get updated input value\n window.requestAnimationFrame(() => {\n input.dispatchEvent(new Event(\"input\", {bubbles: true, cancelable: false}))\n })\n }\n })\n }\n\n debounce(el, event, eventType, callback){\n if(eventType === \"blur\" || eventType === \"focusout\"){ return callback() }\n\n let phxDebounce = this.binding(PHX_DEBOUNCE)\n let phxThrottle = this.binding(PHX_THROTTLE)\n let defaultDebounce = this.defaults.debounce.toString()\n let defaultThrottle = this.defaults.throttle.toString()\n\n this.withinOwners(el, view => {\n let asyncFilter = () => !view.isDestroyed() && document.body.contains(el)\n DOM.debounce(el, event, phxDebounce, defaultDebounce, phxThrottle, defaultThrottle, asyncFilter, () => {\n callback()\n })\n })\n }\n\n silenceEvents(callback){\n this.silenced = true\n callback()\n this.silenced = false\n }\n\n on(event, callback){\n window.addEventListener(event, e => {\n if(!this.silenced){ callback(e) }\n })\n }\n}\n\nclass TransitionSet {\n constructor(){\n this.transitions = new Set()\n this.pendingOps = []\n }\n\n reset(){\n this.transitions.forEach(timer => {\n clearTimeout(timer)\n this.transitions.delete(timer)\n })\n this.flushPendingOps()\n }\n\n after(callback){\n if(this.size() === 0){\n callback()\n } else {\n this.pushPendingOp(callback)\n }\n }\n\n addTransition(time, onStart, onDone){\n onStart()\n let timer = setTimeout(() => {\n this.transitions.delete(timer)\n onDone()\n this.flushPendingOps()\n }, time)\n this.transitions.add(timer)\n }\n\n pushPendingOp(op){ this.pendingOps.push(op) }\n\n size(){ return this.transitions.size }\n\n flushPendingOps(){\n if(this.size() > 0){ return }\n let op = this.pendingOps.shift()\n if(op){\n op()\n this.flushPendingOps()\n }\n }\n}\n"],
- "mappings": ";;;;;;;;;AAAA;AAAA;AAAA;;;ACAO,IAAM,sBAAsB;AAC5B,IAAM,cAAc;AACpB,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;AAC1B,IAAM,kBAAkB;AACxB,IAAM,oBAAoB;AAAA,EAC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;AACb,QAAG,KAAK,WAAW,GAAE;AACnB;AAAA,WACK;AACL,WAAK,cAAc;AAAA;AAAA;AAAA,EAIvB,cAAc,MAAM,SAAS,QAAO;AAClC;AACA,QAAI,QAAQ,WAAW,MAAM;AAC3B,WAAK,YAAY,OAAO;AACxB;AACA,WAAK;AAAA,OACJ;AACH,SAAK,YAAY,IAAI;AAAA;AAAA,EAGvB,cAAc,IAAG;AAAE,SAAK,WAAW,KAAK;AAAA;AAAA,EAExC,OAAM;AAAE,WAAO,KAAK,YAAY;AAAA;AAAA,EAEhC,kBAAiB;AACf,QAAG,KAAK,SAAS,GAAE;AAAE;AAAA;AACrB,QAAI,KAAK,KAAK,WAAW;AACzB,QAAG,IAAG;AACJ;AACA,WAAK;AAAA;AAAA;AAAA;",
- "names": []
+ "sourcesContent": ["/*\n================================================================================\nPhoenix LiveView JavaScript Client\n================================================================================\n\nSee the hexdocs at `https://hexdocs.pm/phoenix_live_view` for documentation.\n\n*/\n\nimport LiveSocket from \"./live_socket\"\nexport {\n LiveSocket\n}\n", "export const CONSECUTIVE_RELOADS = \"consecutive-reloads\"\nexport const MAX_RELOADS = 10\nexport const RELOAD_JITTER_MIN = 5000\nexport const RELOAD_JITTER_MAX = 10000\nexport const FAILSAFE_JITTER = 30000\nexport const PHX_EVENT_CLASSES = [\n \"phx-click-loading\", \"phx-change-loading\", \"phx-submit-loading\",\n \"phx-keydown-loading\", \"phx-keyup-loading\", \"phx-blur-loading\", \"phx-focus-loading\",\n \"phx-hook-loading\"\n]\nexport const PHX_COMPONENT = \"data-phx-component\"\nexport const PHX_LIVE_LINK = \"data-phx-link\"\nexport const PHX_TRACK_STATIC = \"track-static\"\nexport const PHX_LINK_STATE = \"data-phx-link-state\"\nexport const PHX_REF = \"data-phx-ref\"\nexport const PHX_REF_SRC = \"data-phx-ref-src\"\nexport const PHX_TRACK_UPLOADS = \"track-uploads\"\nexport const PHX_UPLOAD_REF = \"data-phx-upload-ref\"\nexport const PHX_PREFLIGHTED_REFS = \"data-phx-preflighted-refs\"\nexport const PHX_DONE_REFS = \"data-phx-done-refs\"\nexport const PHX_DROP_TARGET = \"drop-target\"\nexport const PHX_ACTIVE_ENTRY_REFS = \"data-phx-active-refs\"\nexport const PHX_LIVE_FILE_UPDATED = \"phx:live-file:updated\"\nexport const PHX_SKIP = \"data-phx-skip\"\nexport const PHX_MAGIC_ID = \"data-phx-id\"\nexport const PHX_PRUNE = \"data-phx-prune\"\nexport const PHX_PAGE_LOADING = \"page-loading\"\nexport const PHX_CONNECTED_CLASS = \"phx-connected\"\nexport const PHX_LOADING_CLASS = \"phx-loading\"\nexport const PHX_NO_FEEDBACK_CLASS = \"phx-no-feedback\"\nexport const PHX_ERROR_CLASS = \"phx-error\"\nexport const PHX_CLIENT_ERROR_CLASS = \"phx-client-error\"\nexport const PHX_SERVER_ERROR_CLASS = \"phx-server-error\"\nexport const PHX_PARENT_ID = \"data-phx-parent-id\"\nexport const PHX_MAIN = \"data-phx-main\"\nexport const PHX_ROOT_ID = \"data-phx-root-id\"\nexport const PHX_VIEWPORT_TOP = \"viewport-top\"\nexport const PHX_VIEWPORT_BOTTOM = \"viewport-bottom\"\nexport const PHX_TRIGGER_ACTION = \"trigger-action\"\nexport const PHX_FEEDBACK_FOR = \"feedback-for\"\nexport const PHX_FEEDBACK_GROUP = \"feedback-group\"\nexport const PHX_HAS_FOCUSED = \"phx-has-focused\"\nexport const FOCUSABLE_INPUTS = [\"text\", \"textarea\", \"number\", \"email\", \"password\", \"search\", \"tel\", \"url\", \"date\", \"time\", \"datetime-local\", \"color\", \"range\"]\nexport const CHECKABLE_INPUTS = [\"checkbox\", \"radio\"]\nexport const PHX_HAS_SUBMITTED = \"phx-has-submitted\"\nexport const PHX_SESSION = \"data-phx-session\"\nexport const PHX_VIEW_SELECTOR = `[${PHX_SESSION}]`\nexport const PHX_STICKY = \"data-phx-sticky\"\nexport const PHX_STATIC = \"data-phx-static\"\nexport const PHX_READONLY = \"data-phx-readonly\"\nexport const PHX_DISABLED = \"data-phx-disabled\"\nexport const PHX_DISABLE_WITH = \"disable-with\"\nexport const PHX_DISABLE_WITH_RESTORE = \"data-phx-disable-with-restore\"\nexport const PHX_HOOK = \"hook\"\nexport const PHX_DEBOUNCE = \"debounce\"\nexport const PHX_THROTTLE = \"throttle\"\nexport const PHX_UPDATE = \"update\"\nexport const PHX_STREAM = \"stream\"\nexport const PHX_STREAM_REF = \"data-phx-stream\"\nexport const PHX_KEY = \"key\"\nexport const PHX_PRIVATE = \"phxPrivate\"\nexport const PHX_AUTO_RECOVER = \"auto-recover\"\nexport const PHX_LV_DEBUG = \"phx:live-socket:debug\"\nexport const PHX_LV_PROFILE = \"phx:live-socket:profiling\"\nexport const PHX_LV_LATENCY_SIM = \"phx:live-socket:latency-sim\"\nexport const PHX_PROGRESS = \"progress\"\nexport const PHX_MOUNTED = \"mounted\"\nexport const LOADER_TIMEOUT = 1\nexport const BEFORE_UNLOAD_LOADER_TIMEOUT = 200\nexport const BINDING_PREFIX = \"phx-\"\nexport const PUSH_TIMEOUT = 30000\nexport const LINK_HEADER = \"x-requested-with\"\nexport const RESPONSE_URL_HEADER = \"x-response-url\"\nexport const DEBOUNCE_TRIGGER = \"debounce-trigger\"\nexport const THROTTLED = \"throttled\"\nexport const DEBOUNCE_PREV_KEY = \"debounce-prev-key\"\nexport const DEFAULTS = {\n debounce: 300,\n throttle: 300\n}\n\n// Rendered\nexport const DYNAMICS = \"d\"\nexport const STATIC = \"s\"\nexport const ROOT = \"r\"\nexport const COMPONENTS = \"c\"\nexport const EVENTS = \"e\"\nexport const REPLY = \"r\"\nexport const TITLE = \"t\"\nexport const TEMPLATES = \"p\"\nexport const STREAM = \"stream\"", "import {\n logError\n} from \"./utils\"\n\nexport default class EntryUploader {\n constructor(entry, chunkSize, liveSocket){\n this.liveSocket = liveSocket\n this.entry = entry\n this.offset = 0\n this.chunkSize = chunkSize\n this.chunkTimer = null\n this.errored = false\n this.uploadChannel = liveSocket.channel(`lvu:${entry.ref}`, {token: entry.metadata()})\n }\n\n error(reason){\n if(this.errored){ return }\n this.uploadChannel.leave()\n this.errored = true\n clearTimeout(this.chunkTimer)\n this.entry.error(reason)\n }\n\n upload(){\n this.uploadChannel.onError(reason => this.error(reason))\n this.uploadChannel.join()\n .receive(\"ok\", _data => this.readNextChunk())\n .receive(\"error\", reason => this.error(reason))\n }\n\n isDone(){ return this.offset >= this.entry.file.size }\n\n readNextChunk(){\n let reader = new window.FileReader()\n let blob = this.entry.file.slice(this.offset, this.chunkSize + this.offset)\n reader.onload = (e) => {\n if(e.target.error === null){\n this.offset += e.target.result.byteLength\n this.pushChunk(e.target.result)\n } else {\n return logError(\"Read error: \" + e.target.error)\n }\n }\n reader.readAsArrayBuffer(blob)\n }\n\n pushChunk(chunk){\n if(!this.uploadChannel.isJoined()){ return }\n this.uploadChannel.push(\"chunk\", chunk)\n .receive(\"ok\", () => {\n this.entry.progress((this.offset / this.entry.file.size) * 100)\n if(!this.isDone()){\n this.chunkTimer = setTimeout(() => this.readNextChunk(), this.liveSocket.getLatencySim() || 0)\n }\n })\n .receive(\"error\", ({reason}) => this.error(reason))\n }\n}\n", "import {\n PHX_VIEW_SELECTOR\n} from \"./constants\"\n\nimport EntryUploader from \"./entry_uploader\"\n\nexport let logError = (msg, obj) => console.error && console.error(msg, obj)\n\nexport let isCid = (cid) => {\n let type = typeof(cid)\n return type === \"number\" || (type === \"string\" && /^(0|[1-9]\\d*)$/.test(cid))\n}\n\nexport function detectDuplicateIds(){\n let ids = new Set()\n let elems = document.querySelectorAll(\"*[id]\")\n for(let i = 0, len = elems.length; i < len; i++){\n if(ids.has(elems[i].id)){\n console.error(`Multiple IDs detected: ${elems[i].id}. Ensure unique element ids.`)\n } else {\n ids.add(elems[i].id)\n }\n }\n}\n\nexport let debug = (view, kind, msg, obj) => {\n if(view.liveSocket.isDebugEnabled()){\n console.log(`${view.id} ${kind}: ${msg} - `, obj)\n }\n}\n\n// wraps value in closure or returns closure\nexport let closure = (val) => typeof val === \"function\" ? val : function (){ return val }\n\nexport let clone = (obj) => { return JSON.parse(JSON.stringify(obj)) }\n\nexport let closestPhxBinding = (el, binding, borderEl) => {\n do {\n if(el.matches(`[${binding}]`) && !el.disabled){ return el }\n el = el.parentElement || el.parentNode\n } while(el !== null && el.nodeType === 1 && !((borderEl && borderEl.isSameNode(el)) || el.matches(PHX_VIEW_SELECTOR)))\n return null\n}\n\nexport let isObject = (obj) => {\n return obj !== null && typeof obj === \"object\" && !(obj instanceof Array)\n}\n\nexport let isEqualObj = (obj1, obj2) => JSON.stringify(obj1) === JSON.stringify(obj2)\n\nexport let isEmpty = (obj) => {\n for(let x in obj){ return false }\n return true\n}\n\nexport let maybe = (el, callback) => el && callback(el)\n\nexport let channelUploader = function (entries, onError, resp, liveSocket){\n entries.forEach(entry => {\n let entryUploader = new EntryUploader(entry, resp.config.chunk_size, liveSocket)\n entryUploader.upload()\n })\n}\n", "let Browser = {\n canPushState(){ return (typeof (history.pushState) !== \"undefined\") },\n\n dropLocal(localStorage, namespace, subkey){\n return localStorage.removeItem(this.localKey(namespace, subkey))\n },\n\n updateLocal(localStorage, namespace, subkey, initial, func){\n let current = this.getLocal(localStorage, namespace, subkey)\n let key = this.localKey(namespace, subkey)\n let newVal = current === null ? initial : func(current)\n localStorage.setItem(key, JSON.stringify(newVal))\n return newVal\n },\n\n getLocal(localStorage, namespace, subkey){\n return JSON.parse(localStorage.getItem(this.localKey(namespace, subkey)))\n },\n\n updateCurrentState(callback){\n if(!this.canPushState()){ return }\n history.replaceState(callback(history.state || {}), \"\", window.location.href)\n },\n\n pushState(kind, meta, to){\n if(this.canPushState()){\n if(to !== window.location.href){\n if(meta.type == \"redirect\" && meta.scroll){\n // If we're redirecting store the current scrollY for the current history state.\n let currentState = history.state || {}\n currentState.scroll = meta.scroll\n history.replaceState(currentState, \"\", window.location.href)\n }\n\n delete meta.scroll // Only store the scroll in the redirect case.\n history[kind + \"State\"](meta, \"\", to || null) // IE will coerce undefined to string\n let hashEl = this.getHashTargetEl(window.location.hash)\n\n if(hashEl){\n hashEl.scrollIntoView()\n } else if(meta.type === \"redirect\"){\n window.scroll(0, 0)\n }\n }\n } else {\n this.redirect(to)\n }\n },\n\n setCookie(name, value){\n document.cookie = `${name}=${value}`\n },\n\n getCookie(name){\n return document.cookie.replace(new RegExp(`(?:(?:^|.*;\\s*)${name}\\s*\\=\\s*([^;]*).*$)|^.*$`), \"$1\")\n },\n\n redirect(toURL, flash){\n if(flash){ Browser.setCookie(\"__phoenix_flash__\", flash + \"; max-age=60000; path=/\") }\n window.location = toURL\n },\n\n localKey(namespace, subkey){ return `${namespace}-${subkey}` },\n\n getHashTargetEl(maybeHash){\n let hash = maybeHash.toString().substring(1)\n if(hash === \"\"){ return }\n return document.getElementById(hash) || document.querySelector(`a[name=\"${hash}\"]`)\n }\n}\n\nexport default Browser\n", "let ARIA = {\n focusMain(){\n let target = document.querySelector(\"main h1, main, h1\")\n if(target){\n let origTabIndex = target.tabIndex\n target.tabIndex = -1\n target.focus()\n target.tabIndex = origTabIndex\n }\n },\n\n anyOf(instance, classes){ return classes.find(name => instance instanceof name) },\n\n isFocusable(el, interactiveOnly){\n return(\n (el instanceof HTMLAnchorElement && el.rel !== \"ignore\") ||\n (el instanceof HTMLAreaElement && el.href !== undefined) ||\n (!el.disabled && (this.anyOf(el, [HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement, HTMLButtonElement]))) ||\n (el instanceof HTMLIFrameElement) ||\n (el.tabIndex > 0 || (!interactiveOnly && el.getAttribute(\"tabindex\") !== null && el.getAttribute(\"aria-hidden\") !== \"true\"))\n )\n },\n\n attemptFocus(el, interactiveOnly){\n if(this.isFocusable(el, interactiveOnly)){ try{ el.focus() } catch(e){} }\n return !!document.activeElement && document.activeElement.isSameNode(el)\n },\n\n focusFirstInteractive(el){\n let child = el.firstElementChild\n while(child){\n if(this.attemptFocus(child, true) || this.focusFirstInteractive(child, true)){\n return true\n }\n child = child.nextElementSibling\n }\n },\n\n focusFirst(el){\n let child = el.firstElementChild\n while(child){\n if(this.attemptFocus(child) || this.focusFirst(child)){\n return true\n }\n child = child.nextElementSibling\n }\n },\n\n focusLast(el){\n let child = el.lastElementChild\n while(child){\n if(this.attemptFocus(child) || this.focusLast(child)){\n return true\n }\n child = child.previousElementSibling\n }\n }\n}\nexport default ARIA", "import DOM from \"./dom\"\nimport ARIA from \"./aria\"\n\nlet focusStack = []\nlet default_transition_time = 200\n\nlet JS = {\n exec(eventType, phxEvent, view, sourceEl, defaults){\n let [defaultKind, defaultArgs] = defaults || [null, {callback: defaults && defaults.callback}]\n let commands = phxEvent.charAt(0) === \"[\" ?\n JSON.parse(phxEvent) : [[defaultKind, defaultArgs]]\n\n commands.forEach(([kind, args]) => {\n if(kind === defaultKind && defaultArgs.data){\n args.data = Object.assign(args.data || {}, defaultArgs.data)\n args.callback = args.callback || defaultArgs.callback\n }\n this.filterToEls(sourceEl, args).forEach(el => {\n this[`exec_${kind}`](eventType, phxEvent, view, sourceEl, el, args)\n })\n })\n },\n\n isVisible(el){\n return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length > 0)\n },\n\n // returns true if any part of the element is inside the viewport\n isInViewport(el){\n const rect = el.getBoundingClientRect()\n const windowHeight = window.innerHeight || document.documentElement.clientHeight\n const windowWidth = window.innerWidth || document.documentElement.clientWidth\n\n return (\n rect.right > 0 &&\n rect.bottom > 0 &&\n rect.left < windowWidth &&\n rect.top < windowHeight\n )\n },\n\n // private\n\n // commands\n\n exec_exec(eventType, phxEvent, view, sourceEl, el, {attr, to}){\n let nodes = to ? DOM.all(document, to) : [sourceEl]\n nodes.forEach(node => {\n let encodedJS = node.getAttribute(attr)\n if(!encodedJS){ throw new Error(`expected ${attr} to contain JS command on \"${to}\"`) }\n view.liveSocket.execJS(node, encodedJS, eventType)\n })\n },\n\n exec_dispatch(eventType, phxEvent, view, sourceEl, el, {to, event, detail, bubbles}){\n detail = detail || {}\n detail.dispatcher = sourceEl\n DOM.dispatchEvent(el, event, {detail, bubbles})\n },\n\n exec_push(eventType, phxEvent, view, sourceEl, el, args){\n let {event, data, target, page_loading, loading, value, dispatcher, callback} = args\n let pushOpts = {loading, value, target, page_loading: !!page_loading}\n let targetSrc = eventType === \"change\" && dispatcher ? dispatcher : sourceEl\n let phxTarget = target || targetSrc.getAttribute(view.binding(\"target\")) || targetSrc\n view.withinTargets(phxTarget, (targetView, targetCtx) => {\n if(!targetView.isConnected()){ return }\n if(eventType === \"change\"){\n let {newCid, _target} = args\n _target = _target || (DOM.isFormInput(sourceEl) ? sourceEl.name : undefined)\n if(_target){ pushOpts._target = _target }\n targetView.pushInput(sourceEl, targetCtx, newCid, event || phxEvent, pushOpts, callback)\n } else if(eventType === \"submit\"){\n let {submitter} = args\n targetView.submitForm(sourceEl, targetCtx, event || phxEvent, submitter, pushOpts, callback)\n } else {\n targetView.pushEvent(eventType, sourceEl, targetCtx, event || phxEvent, data, pushOpts, callback)\n }\n })\n },\n\n exec_navigate(eventType, phxEvent, view, sourceEl, el, {href, replace}){\n view.liveSocket.historyRedirect(href, replace ? \"replace\" : \"push\")\n },\n\n exec_patch(eventType, phxEvent, view, sourceEl, el, {href, replace}){\n view.liveSocket.pushHistoryPatch(href, replace ? \"replace\" : \"push\", sourceEl)\n },\n\n exec_focus(eventType, phxEvent, view, sourceEl, el){\n window.requestAnimationFrame(() => ARIA.attemptFocus(el))\n },\n\n exec_focus_first(eventType, phxEvent, view, sourceEl, el){\n window.requestAnimationFrame(() => ARIA.focusFirstInteractive(el) || ARIA.focusFirst(el))\n },\n\n exec_push_focus(eventType, phxEvent, view, sourceEl, el){\n window.requestAnimationFrame(() => focusStack.push(el || sourceEl))\n },\n\n exec_pop_focus(eventType, phxEvent, view, sourceEl, el){\n window.requestAnimationFrame(() => {\n const el = focusStack.pop()\n if(el){ el.focus() }\n })\n },\n\n exec_add_class(eventType, phxEvent, view, sourceEl, el, {names, transition, time}){\n this.addOrRemoveClasses(el, names, [], transition, time, view)\n },\n\n exec_remove_class(eventType, phxEvent, view, sourceEl, el, {names, transition, time}){\n this.addOrRemoveClasses(el, [], names, transition, time, view)\n },\n\n exec_toggle_class(eventType, phxEvent, view, sourceEl, el, {to, names, transition, time}){\n this.toggleClasses(el, names, transition, time, view)\n },\n\n exec_toggle_attr(eventType, phxEvent, view, sourceEl, el, {attr: [attr, val1, val2]}){\n if(el.hasAttribute(attr)){\n if(val2 !== undefined){\n // toggle between val1 and val2\n if(el.getAttribute(attr) === val1){\n this.setOrRemoveAttrs(el, [[attr, val2]], [])\n } else {\n this.setOrRemoveAttrs(el, [[attr, val1]], [])\n }\n } else {\n // remove attr\n this.setOrRemoveAttrs(el, [], [attr])\n }\n } else {\n this.setOrRemoveAttrs(el, [[attr, val1]], [])\n }\n },\n\n exec_transition(eventType, phxEvent, view, sourceEl, el, {time, transition}){\n this.addOrRemoveClasses(el, [], [], transition, time, view)\n },\n\n exec_toggle(eventType, phxEvent, view, sourceEl, el, {display, ins, outs, time}){\n this.toggle(eventType, view, el, display, ins, outs, time)\n },\n\n exec_show(eventType, phxEvent, view, sourceEl, el, {display, transition, time}){\n this.show(eventType, view, el, display, transition, time)\n },\n\n exec_hide(eventType, phxEvent, view, sourceEl, el, {display, transition, time}){\n this.hide(eventType, view, el, display, transition, time)\n },\n\n exec_set_attr(eventType, phxEvent, view, sourceEl, el, {attr: [attr, val]}){\n this.setOrRemoveAttrs(el, [[attr, val]], [])\n },\n\n exec_remove_attr(eventType, phxEvent, view, sourceEl, el, {attr}){\n this.setOrRemoveAttrs(el, [], [attr])\n },\n\n // utils for commands\n\n show(eventType, view, el, display, transition, time){\n if(!this.isVisible(el)){\n this.toggle(eventType, view, el, display, transition, null, time)\n }\n },\n\n hide(eventType, view, el, display, transition, time){\n if(this.isVisible(el)){\n this.toggle(eventType, view, el, display, null, transition, time)\n }\n },\n\n toggle(eventType, view, el, display, ins, outs, time){\n time = time || default_transition_time\n let [inClasses, inStartClasses, inEndClasses] = ins || [[], [], []]\n let [outClasses, outStartClasses, outEndClasses] = outs || [[], [], []]\n if(inClasses.length > 0 || outClasses.length > 0){\n if(this.isVisible(el)){\n let onStart = () => {\n this.addOrRemoveClasses(el, outStartClasses, inClasses.concat(inStartClasses).concat(inEndClasses))\n window.requestAnimationFrame(() => {\n this.addOrRemoveClasses(el, outClasses, [])\n window.requestAnimationFrame(() => this.addOrRemoveClasses(el, outEndClasses, outStartClasses))\n })\n }\n el.dispatchEvent(new Event(\"phx:hide-start\"))\n view.transition(time, onStart, () => {\n this.addOrRemoveClasses(el, [], outClasses.concat(outEndClasses))\n DOM.putSticky(el, \"toggle\", currentEl => currentEl.style.display = \"none\")\n el.dispatchEvent(new Event(\"phx:hide-end\"))\n })\n } else {\n if(eventType === \"remove\"){ return }\n let onStart = () => {\n this.addOrRemoveClasses(el, inStartClasses, outClasses.concat(outStartClasses).concat(outEndClasses))\n let stickyDisplay = display || this.defaultDisplay(el)\n DOM.putSticky(el, \"toggle\", currentEl => currentEl.style.display = stickyDisplay)\n window.requestAnimationFrame(() => {\n this.addOrRemoveClasses(el, inClasses, [])\n window.requestAnimationFrame(() => this.addOrRemoveClasses(el, inEndClasses, inStartClasses))\n })\n }\n el.dispatchEvent(new Event(\"phx:show-start\"))\n view.transition(time, onStart, () => {\n this.addOrRemoveClasses(el, [], inClasses.concat(inEndClasses))\n el.dispatchEvent(new Event(\"phx:show-end\"))\n })\n }\n } else {\n if(this.isVisible(el)){\n window.requestAnimationFrame(() => {\n el.dispatchEvent(new Event(\"phx:hide-start\"))\n DOM.putSticky(el, \"toggle\", currentEl => currentEl.style.display = \"none\")\n el.dispatchEvent(new Event(\"phx:hide-end\"))\n })\n } else {\n window.requestAnimationFrame(() => {\n el.dispatchEvent(new Event(\"phx:show-start\"))\n let stickyDisplay = display || this.defaultDisplay(el)\n DOM.putSticky(el, \"toggle\", currentEl => currentEl.style.display = stickyDisplay)\n el.dispatchEvent(new Event(\"phx:show-end\"))\n })\n }\n }\n },\n\n toggleClasses(el, classes, transition, time, view){\n window.requestAnimationFrame(() => {\n let [prevAdds, prevRemoves] = DOM.getSticky(el, \"classes\", [[], []])\n let newAdds = classes.filter(name => prevAdds.indexOf(name) < 0 && !el.classList.contains(name))\n let newRemoves = classes.filter(name => prevRemoves.indexOf(name) < 0 && el.classList.contains(name))\n this.addOrRemoveClasses(el, newAdds, newRemoves, transition, time, view)\n })\n },\n\n addOrRemoveClasses(el, adds, removes, transition, time, view){\n time = time || default_transition_time\n let [transitionRun, transitionStart, transitionEnd] = transition || [[], [], []]\n if(transitionRun.length > 0){\n let onStart = () => {\n this.addOrRemoveClasses(el, transitionStart, [].concat(transitionRun).concat(transitionEnd))\n window.requestAnimationFrame(() => {\n this.addOrRemoveClasses(el, transitionRun, [])\n window.requestAnimationFrame(() => this.addOrRemoveClasses(el, transitionEnd, transitionStart))\n })\n }\n let onDone = () => this.addOrRemoveClasses(el, adds.concat(transitionEnd), removes.concat(transitionRun).concat(transitionStart))\n return view.transition(time, onStart, onDone)\n }\n\n window.requestAnimationFrame(() => {\n let [prevAdds, prevRemoves] = DOM.getSticky(el, \"classes\", [[], []])\n let keepAdds = adds.filter(name => prevAdds.indexOf(name) < 0 && !el.classList.contains(name))\n let keepRemoves = removes.filter(name => prevRemoves.indexOf(name) < 0 && el.classList.contains(name))\n let newAdds = prevAdds.filter(name => removes.indexOf(name) < 0).concat(keepAdds)\n let newRemoves = prevRemoves.filter(name => adds.indexOf(name) < 0).concat(keepRemoves)\n\n DOM.putSticky(el, \"classes\", currentEl => {\n currentEl.classList.remove(...newRemoves)\n currentEl.classList.add(...newAdds)\n return [newAdds, newRemoves]\n })\n })\n },\n\n setOrRemoveAttrs(el, sets, removes){\n let [prevSets, prevRemoves] = DOM.getSticky(el, \"attrs\", [[], []])\n\n let alteredAttrs = sets.map(([attr, _val]) => attr).concat(removes)\n let newSets = prevSets.filter(([attr, _val]) => !alteredAttrs.includes(attr)).concat(sets)\n let newRemoves = prevRemoves.filter((attr) => !alteredAttrs.includes(attr)).concat(removes)\n\n DOM.putSticky(el, \"attrs\", currentEl => {\n newRemoves.forEach(attr => currentEl.removeAttribute(attr))\n newSets.forEach(([attr, val]) => currentEl.setAttribute(attr, val))\n return [newSets, newRemoves]\n })\n },\n\n hasAllClasses(el, classes){ return classes.every(name => el.classList.contains(name)) },\n\n isToggledOut(el, outClasses){\n return !this.isVisible(el) || this.hasAllClasses(el, outClasses)\n },\n\n filterToEls(sourceEl, {to}){\n return to ? DOM.all(document, to) : [sourceEl]\n },\n\n defaultDisplay(el){\n return {tr: \"table-row\", td: \"table-cell\"}[el.tagName.toLowerCase()] || \"block\"\n }\n}\n\nexport default JS", "import {\n CHECKABLE_INPUTS,\n DEBOUNCE_PREV_KEY,\n DEBOUNCE_TRIGGER,\n FOCUSABLE_INPUTS,\n PHX_COMPONENT,\n PHX_EVENT_CLASSES,\n PHX_HAS_FOCUSED,\n PHX_HAS_SUBMITTED,\n PHX_MAIN,\n PHX_NO_FEEDBACK_CLASS,\n PHX_PARENT_ID,\n PHX_PRIVATE,\n PHX_REF,\n PHX_REF_SRC,\n PHX_ROOT_ID,\n PHX_SESSION,\n PHX_STATIC,\n PHX_UPLOAD_REF,\n PHX_VIEW_SELECTOR,\n PHX_STICKY,\n THROTTLED\n} from \"./constants\"\n\nimport JS from \"./js\"\n\nimport {\n logError\n} from \"./utils\"\n\nlet DOM = {\n byId(id){ return document.getElementById(id) || logError(`no id found for ${id}`) },\n\n removeClass(el, className){\n el.classList.remove(className)\n if(el.classList.length === 0){ el.removeAttribute(\"class\") }\n },\n\n all(node, query, callback){\n if(!node){ return [] }\n let array = Array.from(node.querySelectorAll(query))\n return callback ? array.forEach(callback) : array\n },\n\n childNodeLength(html){\n let template = document.createElement(\"template\")\n template.innerHTML = html\n return template.content.childElementCount\n },\n\n isUploadInput(el){ return el.type === \"file\" && el.getAttribute(PHX_UPLOAD_REF) !== null },\n\n isAutoUpload(inputEl){ return inputEl.hasAttribute(\"data-phx-auto-upload\") },\n\n findUploadInputs(node){\n const formId = node.id\n const inputsOutsideForm = this.all(document, `input[type=\"file\"][${PHX_UPLOAD_REF}][form=\"${formId}\"]`)\n return this.all(node, `input[type=\"file\"][${PHX_UPLOAD_REF}]`).concat(inputsOutsideForm)\n },\n\n findComponentNodeList(node, cid){\n return this.filterWithinSameLiveView(this.all(node, `[${PHX_COMPONENT}=\"${cid}\"]`), node)\n },\n\n isPhxDestroyed(node){\n return node.id && DOM.private(node, \"destroyed\") ? true : false\n },\n\n wantsNewTab(e){\n let wantsNewTab = e.ctrlKey || e.shiftKey || e.metaKey || (e.button && e.button === 1)\n let isDownload = (e.target instanceof HTMLAnchorElement && e.target.hasAttribute(\"download\"))\n let isTargetBlank = e.target.hasAttribute(\"target\") && e.target.getAttribute(\"target\").toLowerCase() === \"_blank\"\n let isTargetNamedTab = e.target.hasAttribute(\"target\") && !e.target.getAttribute(\"target\").startsWith(\"_\")\n return wantsNewTab || isTargetBlank || isDownload || isTargetNamedTab\n },\n\n isUnloadableFormSubmit(e){\n // Ignore form submissions intended to close a native