{"version":3,"sources":["utils/dom_tools.ts"],"names":["onload","callback","window","addEventListener","one","selector","document","querySelector","oneid","id","getElementById","all","nodeList","querySelectorAll","Array","from","createElementFromHTML","htmlString","div","createElement","innerHTML","trim","firstChild"],"mappings":"AAAM,SAAUA,OAAOC,GACnBC,OAAOC,iBAAiB,mBAAoBF,CAAQ,CACxD,CAEM,SAAUG,IAAIC,GAChB,OAAOC,SAASC,cAAcF,CAAQ,CAC1C,CAEM,SAAUG,MAAMC,GAClB,OAAOH,SAASI,eAAeD,CAAE,CACrC,CAEM,SAAUE,IAAIN,GAChB,IAAMO,EAAWN,SAASO,iBAAiBR,CAAQ,EACnD,OAAOS,MAAMC,KAAKH,CAAQ,CAC9B,CAEM,SAAUI,sBAAsBC,GAClC,IAAIC,EAAMZ,SAASa,cAAc,KAAK,EAItC,OAHAD,EAAIE,UAAYH,EAAWI,KAAI,EAGxBH,EAAII,UACf,QAvBgBtB,OAIAI,IAIAI,MAIAG,IAKAK,qBAMhB","file":"dom_tools.js","sourcesContent":["export function onload(callback: () => void): void {\r\n window.addEventListener('DOMContentLoaded', callback);\r\n}\r\n\r\nexport function one(selector: string): Element {\r\n return document.querySelector(selector);\r\n}\r\n\r\nexport function oneid(id: string): HTMLElement {\r\n return document.getElementById(id);\r\n}\r\n\r\nexport function all(selector: string): Element[] {\r\n const nodeList = document.querySelectorAll(selector);\r\n return Array.from(nodeList);\r\n}\r\n\r\nexport function createElementFromHTML(htmlString: string) {\r\n var div = document.createElement('div');\r\n div.innerHTML = htmlString.trim();\r\n \r\n // Change this to div.childNodes to support multiple top-level nodes.\r\n return div.firstChild;\r\n}"]}