You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fipamo/themes/dash/assets/js/dash.min.map

1 line
74 KiB
Plaintext

{"version":3,"sources":["tools/events/EventEmitter.jsx","tools/events/DataEvent.jsx","tools/utilities/DataUtils.jsx","tools/effects/Animate.jsx","tools/effects/TextEffects.jsx","tools/utilities/StringUtils.jsx","tasks/EntryTasks.jsx","../../src/mirror.js","../../src/utils.js","../../src/input.js","../../src/editable.js","../../src/main.js","tools/utilities/TextEditor.jsx","controllers/DashEntry.jsx","controllers/DisplayManager.jsx","Base.jsx","Start.jsx"],"names":["EventEmitter","listeners","Map","label","callback","has","set","get","push","isFunction","obj","index","length","reduce","i","listener","splice","args","forEach","REQUEST_GOOD","REQUEST_LAME","IMG_REQUEST_GOOD","IMG_REQUEST_LAME","SETTINGS_LOADED","HTML_LOADED","ARCHIVES_JSON_LOADED","ARCHIVES_PAGE_LOADED","ARCHIVES_ENTRY_LOADED","PROJECT_UPDATED","PROJECT_ADDED","PROJECTS_SORTED","POST_IMAGE_ADDED","DataEvent","REQUEST_TYPE_POST","REQUEST_TYPE_GET","REQUEST_TYPE_PUT","REQUEST_TYPE_DELETE","CONTENT_TYPE_JSON","CONTENT_TYPE_FORM","DataUtils","self","requestURL","eventType","requestType","contentType","requestData","Promise","resolve","reject","request","XMLHttpRequest","upload","onprogress","handleLoadProgress","open","onload","e","status","setRequestHeader","send","JSON","stringify","url","responseType","response","Error","statusText","onerror","src","body","document","querySelector","myImage","Image","crossOrigin","imgLoad","then","imageURL","window","URL","createObjectURL","percentComplete","Math","ceil","loaded","total","Animate","properties","animation","anime","TexEffects","offset","complete","scrambleText","ScrambleText","timeOffset","chars","start","StringUtils","string","clean","replace","toLowerCase","quote_style","optTemp","noquotes","toString","OPTS","concat","ENT_HTML_QUOTE_SINGLE","EntryTasks","folio","dataUtils","edit","uploadFiles","postData","FormData","files","file","type","match","append","name","txt","createElement","innerHTML","getElementById","value","cleanString","postURL","postEventType","postID","getAttribute","console","log","POST_UPDATED","POST_ADDED","catch","err","valid","entry_form","title","price","description","attributes","createMirror","element","html","mirror","mirrorCss","css","tagName","attr","getComputedStyle","initialize","styles","keys","style","key","parentNode","insertBefore","nextSibling","rect","marker","ownerDocument","boundingRect","offsetLeft","offsetTop","offsetHeight","removeChild","isContentEditable","contentEditable","getContext","settings","customPos","iframe","noShadowCaret","contentWindow","contentDocument","getOffset","ctx","win","doc","getBoundingClientRect","docEl","documentElement","scrollLeft","pageXOffset","scrollTop","pageYOffset","top","left","isObject","createInputCaret","getPos","selectionStart","setPos","pos","setSelectionRange","elementOffset","position","getPosition","height","format","val","undefined","startRange","slice","endRange","createEditableCaret","sel","getSelection","found","find","parent","childNodes","node","nodeType","range","createRange","setStart","removeAllRanges","addRange","getRange","hasCustomPos","endOffset","endContainer","clonedRange","cloneRange","fixedPosition","setEnd","width","detach","shadowCaret","createTextNode","insertNode","selectNode","clientTop","clientLeft","inputOffset","rangeCount","getRangeAt","selectNodeContents","createCaret","options","caret","TextEditor","setInputs","hljs","initHighlightingOnLoad","addEventListener","f","fixLimit","refresh","editorButtons","querySelectorAll","handleEditorOption","handlePostImageAdd","click","spiffed","highlight","innerText","temp","preventDefault","pulled","deleteContents","target","id","stopPropagation","parse","Entry","reframe","editor","object","targets","duration","opacity","easing","display","visibility","TextEffects","scramble","handleDragOver","handleDrop","handleClicked","submitPost","note","message","dataTransfer","dropEffect","reader","FileReader","theFile","span","result","escape","join","appendChild","readAsDataURL","DisplayManager","currentDisplay","urlPieces","split","chooseDisplay","section","page","Base","admin","displayManager","base"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAMA;;;AAGF;AACA;AACA;AACA,0BACA;AAAA;;AACI,SAAKC,SAAL,GAAiB,IAAIC,GAAJ,EAAjB;AACH,IACD;AACA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AApE,EACKqD,IADL,CACU,UAACZ,QAAD,EAAc;AAChB,QAAA,KAAI,CAAC6G,QAAL,GAAgBjH,IAAI,CAACiN,KAAL,CAAW7M,QAAQ,CAAC,SAAD,CAAR,CAAoBA,QAA/B,CAAhB;;AACA,QAAA,KAAI,CAACiC,KAAL,GAFgB,CAGhB;;AAEH,OANL,EAOKwC,KAPL,CAOW,UAACC,GAAD,EAAS,CACZ;AACH,OATL;AAUH,MAED;AACA;AACA;;;;;;;;;;;ACzCJ;;;;AAEApE,QAAQ,CAACoL,gBAAT,CAA0B,kBAA1B,EAA8C,YAAW;AAErD,MAAI2D,IAAI,GAAG,IAAIH,aAAJ,EAAX;AACH,CAHD,EAGG,KAHH","file":"dash.min.map","sourceRoot":"../../src/com","sourcesContent":["class EventEmitter\n{\n\n //--------------------------\n // constructor\n //--------------------------\n constructor()\n {\n this.listeners = new Map();\n }\n //--------------------------\n // methods\n //--------------------------\n addListener(label, callback) {\n this.listeners.has(label) || this.listeners.set(label, []);\n this.listeners.get(label).push(callback);\n }\n\n removeListener(label, callback) {\n var isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n\n var listeners = this.listeners.get(label),\n index;\n\n if (listeners && listeners.length) {\n index = listeners.reduce((i, listener, index) => {\n return (isFunction(listener) && listener === callback)\n ? i = index\n : i;\n }, -1);\n\n if (index > -1) {\n listeners.splice(index, 1);\n this.listeners.set(label, listeners);\n return true;\n }\n }\n return false;\n }\n\n emitEvent(label, ...args) {\n var listeners = this.listeners.get(label);\n if (listeners && listeners.length) {\n listeners.forEach((listener) => {\n listener(...args);\n });\n return true;\n }\n return false;\n }\n //--------------------------\n // event handlers\n //--------------------------\n}\nexport default EventEmitter\n","export const REQUEST_GOOD = 'requestGood';\nexport const REQUEST_LAME = 'requestLame';\nexport const IMG_REQUEST_GOOD = 'imgRequestGood';\nexport const IMG_REQUEST_LAME = 'imgRequestLame';\nexport const SETTINGS_LOADED = 'dataLoaded';\nexport const HTML_LOADED = 'htmlLoaded';\nexport const ARCHIVES_JSON_LOADED = 'archivesJSONLoaded';\nexport const ARCHIVES_PAGE_LOADED = 'archivesPAGELoaded';\nexport const ARCHIVES_ENTRY_LOADED = 'archivesEntryLoaded';\nexport const PROJECT_UPDATED = 'projectUpdated';\nexport const PROJECT_ADDED = 'projectAdded';\nexport const PROJECTS_SORTED = 'projectsSorted';\nexport const POST_IMAGE_ADDED = 'postImageAdded';\n\nclass DataEvent\n{\n\n //--------------------------\n // methods\n //--------------------------\n\n\n\n //--------------------------\n // event handlers\n //--------------------------\n}\nexport default new DataEvent\n","export const REQUEST_TYPE_POST = \"POST\";\nexport const REQUEST_TYPE_GET = \"GET\";\nexport const REQUEST_TYPE_PUT = \"PUT\";\nexport const REQUEST_TYPE_DELETE = \"DELETE\";\nexport const CONTENT_TYPE_JSON = 'json';\nexport const CONTENT_TYPE_FORM = 'x-www-form-urlencoded';\nimport EventEmitter from '../events/EventEmitter.jsx';\nimport * as DataEvent from '../events/DataEvent.jsx';\nclass DataUtils extends EventEmitter {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n super();\n var self = this;\n }\n //--------------------------\n // methods\n //--------------------------\n request(requestURL, eventType, requestType = REQUEST_TYPE_GET, contentType = CONTENT_TYPE_JSON, requestData = null) {\n var self = this;\n return new Promise(function(resolve, reject) {\n var request = new XMLHttpRequest();\n request.upload.onprogress = self.handleLoadProgress;\n request.open(requestType, requestURL, true);\n request.onload = function(e) {\n if (request.status == 200) {\n resolve({\n request,\n eventType\n });\n } else {\n reject({\n request,\n eventType\n });\n }\n ;\n };\n if (requestType == REQUEST_TYPE_PUT || requestType == REQUEST_TYPE_POST) {\n switch (contentType) {\n case CONTENT_TYPE_JSON:\n request.setRequestHeader(\"Content-type\", \"application/\" + contentType);\n request.send(JSON.stringify(requestData));\n break;\n case CONTENT_TYPE_FORM:\n request.send(requestData);\n break;\n }\n } else {\n request.send();\n }\n })\n }\n imgLoad(url) {\n 'use strict';\n // Create new promise with the Promise() constructor;\n // This has as its argument a function with two parameters, resolve and reject\n return new Promise(function(resolve, reject) {\n // Standard XHR to load an image\n var request = new XMLHttpRequest();\n request.open('GET', url);\n request.responseType = 'blob';\n // When the request loads, check whether it was successful\n request.onload = function() {\n if (request.status === 200) {\n // If successful, resolve the promise by passing back the request response\n resolve(request.response);\n } else {\n // If it fails, reject the promise with a error message\n reject(new Error('Image didn\\'t load successfully; error code:' + request.statusText));\n }\n };\n request.onerror = function() {\n // Also deal with the case when the entire request fails to begin with\n // This is probably a network error, so reject the promise with an appropriate message\n reject(new Error('There was a network error.'));\n };\n // Send the request\n request.send();\n });\n }\n loadImage(src) {\n 'use strict';\n let self = this;\n return new Promise(function(resolve, reject) {\n // Get a reference to the body element, and create a new image object\n var body = document.querySelector('body'),\n myImage = new Image();\n myImage.crossOrigin = \"\"; // or \"anonymous\"\n // Call the function with the URL we want to load, but then chain the\n // promise then() method on to the end of it. This contains two callbacks\n self.imgLoad(src).then(function(response) {\n // The first runs when the promise resolves, with the request.reponse specified within the resolve() method.\n var imageURL = window.URL.createObjectURL(response);\n resolve(imageURL);\n //$('background-content').setStyle('background-image', 'url('+imageURL+')') //myImage.src = imageURL;\n //console.log(imageURL);\n //body.appendChild(myImage);\n // The second runs when the promise is rejected, and logs the Error specified with the reject() method.\n }, function(Error) {\n reject(Error)\n });\n });\n }\n //--------------------------\n // event handlers\n //--------------------------\n handleLoadProgress(e) {\n var percentComplete = Math.ceil((e.loaded / e.total) * 100);\n //console.log(percentComplete);\n }\n}\nexport default DataUtils;\n","import EventEmitter from '../events/EventEmitter.jsx';;\n\nclass Animate extends EventEmitter {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n super();\n }\n //--------------------------\n // methods\n //--------------------------\n object(properties) {\n var animation = anime(\n properties\n );\n //animation.start(properties);\n }\n //--------------------------\n // event handlers\n //--------------------------\n}\nexport default Animate\n","class TexEffects {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {}\n //--------------------------\n // methods\n //--------------------------\n scramble(obj, offset, complete)\n {\n var scrambleText = new ScrambleText(obj, {\n timeOffset: offset,\n chars: [\n '安',\n '以',\n '宇',\n '衣',\n '於',\n '加',\n '幾',\n '久',\n '計',\n '己',\n '左',\n '之',\n '寸',\n '世',\n '曽',\n '太',\n '知',\n '川',\n '天',\n '止',\n '奈',\n '仁',\n '奴',\n '称',\n '乃',\n '波',\n '比',\n '不',\n '部',\n '保',\n '末',\n '美',\n '武',\n '女',\n '毛',\n '也',\n '為',\n '由',\n '恵',\n '与',\n '良',\n '利',\n '留',\n '礼',\n '呂',\n '和',\n '遠',\n '无'\n ],\n callback: complete\n }).start();\n }\n //--------------------------\n // event handlers\n //--------------------------\n}\nexport default TexEffects\n","class StringUtils\n{\n\n //--------------------------\n // constructor\n //--------------------------\n constructor()\n {}\n //--------------------------\n // methods\n //--------------------------\n cleanString(string)\n {\n var clean = string.replace(/(^\\-+|[^a-zA-Z0-9\\/_| -]+|\\-+$)/g, '').toLowerCase().replace(/[\\/_| -]+/g, '-');\n return clean;\n }\n\n decodeHTML(string, quote_style) {\n var optTemp = 0,\n i = 0,\n noquotes = false;\n if (typeof quote_style === 'undefined') {\n quote_style = 2;\n }\n string = string.toString().replace(/&lt;/g, '<').replace(/&gt;/g, '>');\n var OPTS = {\n 'ENT_NOQUOTES': 0,\n 'ENT_HTML_QUOTE_SINGLE': 1,\n 'ENT_HTML_QUOTE_DOUBLE': 2,\n 'ENT_COMPAT': 2,\n 'ENT_QUOTES': 3,\n 'ENT_IGNORE': 4\n };\n if (quote_style === 0) {\n noquotes = true;\n }\n if (typeof quote_style !== 'number') { // Allow for a single string or an array of string flags\n quote_style = [].concat(quote_style);\n for (i = 0; i < quote_style.length; i++) {\n // Resolve string input to bitwise e.g. 'PATHINFO_EXTENSION' becomes 4\n if (OPTS[quote_style[i]] === 0) {\n noquotes = true;\n } else if (OPTS[quote_style[i]]) {\n optTemp = optTemp | OPTS[quote_style[i]];\n }\n }\n quote_style = optTemp;\n }\n if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {\n string = string.replace(/&#0*39;/g, \"'\"); // PHP doesn't currently escape if more than one 0, but it should\n // string = string.replace(/&apos;|&#x0*27;/g, \"'\"); // This would also be useful here, but not a part of PHP\n }\n if (!noquotes) {\n string = string.replace(/&quot;/g, '\"');\n }\n // Put this in last place to avoid escape being double-decoded\n string = string.replace(/&amp;/g, '&');\n return string;\n }\n\n //--------------------------\n // event handlers\n //--------------------------\n}\nexport default StringUtils\n","import DataUtils, { REQUEST_TYPE_GET, REQUEST_TYPE_PUT, REQUEST_TYPE_POST, REQUEST_TYPE_DELETE, CONTENT_TYPE_JSON, CONTENT_TYPE_FORM } from '../tools/utilities/DataUtils';\nimport * as DataEvent from '../tools/events/DataEvent';\nimport StringUtils from '../tools/utilities/StringUtils';\nclass EntryTasks {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n var folio = [];\n this.dataUtils = new DataUtils();\n }\n //--------------------------\n // methods\n //--------------------------\n start() {}\n\n submitPost(edit, uploadFiles) {\n let self = this;\n return new Promise(function(resolve, reject) {\n //collect form data\n //if(!this.validateForm())\n var postData = new FormData();\n //let projectImages = document.getElementById('projectImages');\n //var fileSelect = projectImages;\n var files = uploadFiles;\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n // Check the file type.\n if (!file.type.match('image.*')) {\n continue;\n }\n // Add the file to the request.\n postData.append('feature_image', file, file.name);\n }\n //var category = document.getElementById(\"content_category\");\n //let project_form = document.forms.namedItem(\"folio-project\");\n var txt = document.createElement(\"textarea\");\n txt.innerHTML = document.getElementById('edit-text-code').innerHTML;\n postData.append(\"title\", document.getElementById('entry_title').value);\n postData.append('slug', new StringUtils().cleanString(document.getElementById('entry_title').value));\n postData.append(\"entry_plaintext\", txt.value);\n postData.append(\"tags\", document.getElementById('entry_tags').value);\n let postURL;\n let postEventType;\n if (edit) {\n let postID = document.getElementById('post-sumbit-btn').getAttribute('data-id');\n console.log(\"POST ID: \"+postID);\n postURL = \"/api/blog/update/\" + postID;\n postEventType = DataEvent.POST_UPDATED;\n \n } else {\n postURL = \"/api/blog/add\";\n postEventType = DataEvent.POST_ADDED;\n }\n self.dataUtils.request(postURL, postEventType, REQUEST_TYPE_POST, CONTENT_TYPE_FORM, postData)\n .then((response) => {\n resolve({\n response\n })\n }).catch((err) => {\n reject({\n err\n });\n })\n });\n }\n\n validateForm() {\n let valid = false;\n if (this.entry_form.title.value == \"\" || this.entry_form.price.value == \"\" || this.entry_form.description == \"\") {\n return valid;\n } else {\n valid = true;\n return valid;\n }\n }\n//--------------------------\n// event handlers\n//--------------------------\n}\nexport { EntryTasks as default }\n","const attributes = [\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'borderTopWidth',\n 'boxSizing',\n 'fontFamily',\n 'fontSize',\n 'fontWeight',\n 'height',\n 'letterSpacing',\n 'lineHeight',\n 'marginBottom',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'outlineWidth',\n 'overflow',\n 'overflowX',\n 'overflowY',\n 'paddingBottom',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'textAlign',\n 'textOverflow',\n 'textTransform',\n 'whiteSpace',\n 'wordBreak',\n 'wordWrap',\n];\n\n/**\n * Create a mirror\n *\n * @param {Element} element The element\n * @param {string} html The html\n *\n * @return {object} The mirror object\n */\nconst createMirror = (element, html) => {\n\n /**\n * The mirror element\n */\n const mirror = document.createElement('div');\n\n /**\n * Create the CSS for the mirror object\n *\n * @return {object} The style object\n */\n const mirrorCss = () => {\n const css = {\n position: 'absolute',\n left: -9999,\n top: 0,\n zIndex: -2000\n };\n\n if (element.tagName === 'TEXTAREA') {\n attributes.push('width');\n }\n\n attributes.forEach((attr) => {\n css[attr] = getComputedStyle(element)[attr];\n });\n\n return css;\n };\n\n /**\n * Initialize the mirror\n *\n * @param {string} html The html\n *\n * @return {void}\n */\n const initialize = (html) => {\n const styles = mirrorCss();\n Object.keys(styles).forEach(key => {\n mirror.style[key] = styles[key];\n });\n mirror.innerHTML = html;\n element.parentNode.insertBefore(mirror, element.nextSibling);\n };\n\n /**\n * Get the rect\n *\n * @return {Rect} The bounding rect\n */\n const rect = () => {\n const marker = mirror.ownerDocument.getElementById('caret-position-marker');\n const boundingRect = {\n left: marker.offsetLeft,\n top: marker.offsetTop,\n height: marker.offsetHeight\n };\n mirror.parentNode.removeChild(mirror);\n\n return boundingRect;\n };\n\n initialize(html);\n\n return {\n rect,\n };\n};\n\nexport default createMirror;\n","/**\n * Check if a DOM Element is content editable\n *\n * @param {Element} element The DOM element\n *\n * @return {bool} If it is content editable\n */\nexport const isContentEditable = (element) => !!(\n element.contentEditable &&\n element.contentEditable === 'true'\n);\n\n/**\n * Get the context from settings passed in\n *\n * @param {object} settings The settings object\n *\n * @return {object} window and document\n */\nexport const getContext = (settings = {}) => {\n const { customPos, iframe, noShadowCaret } = settings;\n if (iframe) {\n return {\n iframe,\n window: iframe.contentWindow,\n document: iframe.contentDocument || iframe.contentWindow.document,\n noShadowCaret,\n customPos,\n };\n }\n\n return {\n window,\n document,\n noShadowCaret,\n customPos,\n };\n};\n\n/**\n * Get the offset of an element\n *\n * @param {Element} element The DOM element\n * @param {object} ctx The context\n *\n * @return {object} top and left\n */\nexport const getOffset = (element, ctx) => {\n const win = ctx && ctx.window || window;\n const doc = ctx && ctx.document || document;\n const rect = element.getBoundingClientRect();\n const docEl = doc.documentElement;\n const scrollLeft = win.pageXOffset || docEl.scrollLeft;\n const scrollTop = win.pageYOffset || docEl.scrollTop;\n\n return {\n top: rect.top + scrollTop,\n left: rect.left + scrollLeft\n };\n};\n\n/**\n * Check if a value is an object\n *\n * @param {any} value The value to check\n *\n * @return {bool} If it is an object\n */\nexport const isObject = (value) => typeof value === 'object' && value !== null;\n","import createMirror from './mirror';\nimport { getOffset as elementOffset } from './utils';\n\n/**\n * Create a Input caret object.\n *\n * @param {Element} element The element\n * @param {Object} ctx The context\n */\nconst createInputCaret = (element, ctx) => {\n\n /**\n * Get the current position\n *\n * @returns {int} The caret position\n */\n const getPos = () => {\n return element.selectionStart;\n };\n\n /**\n * Set the position\n *\n * @param {int} pos The position\n *\n * @return {Element} The element\n */\n const setPos = (pos) => {\n element.setSelectionRange(pos, pos);\n\n return element;\n };\n\n /**\n * The offset\n *\n * @param {int} pos The position\n *\n * @return {object} The offset\n */\n const getOffset = (pos) => {\n const rect = elementOffset(element);\n const position = getPosition(pos);\n\n return {\n top: rect.top + position.top + ctx.document.body.scrollTop,\n left: rect.left + position.left + ctx.document.body.scrollLeft,\n height: position.height,\n };\n };\n\n /**\n * Get the current position\n *\n * @param {int} pos The position\n *\n * @return {object} The position\n */\n const getPosition = (pos) => {\n const format = (val) => {\n let value = val.replace(/<|>|`|\"|&/g, '?')\n .replace(/\\r\\n|\\r|\\n/g,'<br/>');\n return value;\n };\n\n if (ctx.customPos || ctx.customPos === 0) {\n pos = ctx.customPos;\n }\n\n const position = pos === undefined ? getPos() : pos;\n const startRange = element.value.slice(0, position);\n const endRange = element.value.slice(position);\n let html = `<span style=\"position: relative; display: inline;\">${format(startRange)}</span>`;\n html += '<span id=\"caret-position-marker\" style=\"position: relative; display: inline;\">|</span>';\n html += `<span style=\"position: relative; display: inline;\">${format(endRange)}</span>`;\n\n const mirror = createMirror(element, html);\n const rect = mirror.rect();\n rect.pos = getPos();\n\n return rect;\n };\n\n return {\n getPos,\n setPos,\n getOffset,\n getPosition,\n };\n};\n\nexport default createInputCaret;\n","/**\n * Create an Editable Caret\n * @param {Element} element The editable element\n * @param {object|null} ctx The context\n *\n * @return {EditableCaret}\n */\nconst createEditableCaret = (element, ctx) => {\n\n /**\n * Set the caret position\n *\n * @param {int} pos The position to se\n *\n * @return {Element} The element\n */\n const setPos = (pos) => {\n const sel = ctx.window.getSelection();\n if (sel) {\n let offset = 0;\n let found = false;\n const find = (position, parent) => {\n for (let i = 0; i < parent.childNodes.length; i++) {\n const node = parent.childNodes[i];\n if (found) {\n break;\n }\n if (node.nodeType === 3) {\n if (offset + node.length >= position) {\n found = true;\n const range = ctx.document.createRange();\n range.setStart(node, position - offset);\n sel.removeAllRanges();\n sel.addRange(range);\n break;\n } else {\n offset += node.length;\n }\n } else {\n find(pos, node);\n }\n }\n };\n find(pos, element);\n }\n\n return element;\n };\n\n /**\n * Get the offset\n *\n * @return {object} The offset\n */\n const getOffset = () => {\n const range = getRange();\n let offset = {\n height: 0,\n left: 0,\n right: 0,\n };\n\n if (!range) {\n return offset;\n }\n\n const hasCustomPos = ctx.customPos || ctx.customPos === 0;\n\n // endContainer in Firefox would be the element at the start of\n // the line\n if ((range.endOffset - 1 > 0 && range.endContainer !== element) || hasCustomPos) {\n const clonedRange = range.cloneRange();\n const fixedPosition = hasCustomPos ? ctx.customPos : range.endOffset;\n clonedRange.setStart(range.endContainer, fixedPosition - 1 < 0 ? 0 : fixedPosition - 1);\n clonedRange.setEnd(range.endContainer, fixedPosition);\n const rect = clonedRange.getBoundingClientRect();\n offset = {\n height: rect.height,\n left: rect.left + rect.width,\n top: rect.top,\n };\n clonedRange.detach();\n }\n\n if ((!offset || (offset && offset.height === 0)) && !ctx.noShadowCaret) {\n const clonedRange = range.cloneRange();\n const shadowCaret = ctx.document.createTextNode('|');\n clonedRange.insertNode(shadowCaret);\n clonedRange.selectNode(shadowCaret);\n const rect = clonedRange.getBoundingClientRect();\n offset = {\n height: rect.height,\n left: rect.left,\n top: rect.top,\n };\n shadowCaret.parentNode.removeChild(shadowCaret);\n clonedRange.detach();\n }\n\n if (offset) {\n const doc = ctx.document.documentElement;\n offset.top += ctx.window.pageYOffset - (doc.clientTop || 0);\n offset.left += ctx.window.pageXOffset - (doc.clientLeft || 0);\n }\n\n return offset;\n };\n\n /**\n * Get the position\n *\n * @return {object} The position\n */\n const getPosition = () => {\n const offset = getOffset();\n const pos = getPos();\n const rect = element.getBoundingClientRect();\n const inputOffset = {\n top: rect.top + ctx.document.body.scrollTop,\n left: rect.left + ctx.document.body.scrollLeft\n };\n offset.left -= inputOffset.left;\n offset.top -= inputOffset.top;\n offset.pos = pos;\n\n return offset;\n };\n\n /**\n * Get the range\n *\n * @return {Range|null}\n */\n const getRange = () => {\n if (!ctx.window.getSelection) {\n return;\n }\n const sel = ctx.window.getSelection();\n\n return sel.rangeCount > 0 ? sel.getRangeAt(0) : null;\n };\n\n /**\n * Get the caret position\n *\n * @return {int} The position\n */\n const getPos = () => {\n const range = getRange();\n const clonedRange = range.cloneRange();\n clonedRange.selectNodeContents(element);\n clonedRange.setEnd(range.endContainer, range.endOffset);\n const pos = clonedRange.toString().length;\n clonedRange.detach();\n\n return pos;\n };\n\n return {\n getPos,\n setPos,\n getPosition,\n getOffset,\n getRange,\n };\n};\n\nexport default createEditableCaret;\n","import createInputCaret from './input';\nimport createEditableCaret from './editable';\nimport {\n isContentEditable,\n getContext,\n isObject,\n} from './utils';\n\nexport { getOffset } from './utils';\n\nconst createCaret = (element, ctx) => {\n if (isContentEditable(element)) {\n return createEditableCaret(element, ctx);\n }\n\n return createInputCaret(element, ctx);\n};\n\nexport const position = (element, value, settings = {}) => {\n let options = settings;\n if (isObject(value)) {\n options = value;\n value = null;\n }\n const ctx = getContext(options);\n const caret = createCaret(element, ctx);\n\n if (value || value === 0) {\n return caret.setPos(value);\n }\n\n return caret.getPosition();\n};\n\n/**\n *\n * @param {Element} element The DOM element\n * @param {number|undefined} value The value to set\n * @param {object} settings Any settings for context\n */\nexport const offset = (element, value, settings = {}) => {\n let options = settings;\n if (isObject(value)) {\n options = value;\n value = null;\n }\n\n const ctx = getContext(options);\n const caret = createCaret(element, ctx);\n return caret.getOffset(value);\n};\n","import DataUtils, {\n REQUEST_TYPE_GET,\n REQUEST_TYPE_PUT,\n REQUEST_TYPE_POST,\n REQUEST_TYPE_DELETE,\n CONTENT_TYPE_JSON,\n CONTENT_TYPE_FORM\n} from './DataUtils';\nimport * as DataEvent from '../events/DataEvent';\nimport {\n position,\n offset\n} from 'caret-pos';\n\nclass TextEditor {\n\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n this.setInputs();\n hljs.initHighlightingOnLoad();\n this.dataUtils = new DataUtils();\n this.url = '';\n window.addEventListener(\"scroll\", f => {\n var fixLimit = document.getElementById('header').offsetHeight + document.getElementById('entry-header').offsetHeight + document.getElementById('entry-feature').offsetHeight\n if (window.pageYOffset >= fixLimit) {\n document.getElementById('edit-control').style.position = \"fixed\"\n } else {\n document.getElementById('edit-control').style.position = \"relative\"\n }\n });\n this.refresh();\n }\n //--------------------------\n // methods\n //--------------------------\n setInputs() {\n let self = this;\n var editorButtons = document.querySelectorAll('.editor-button');\n for (var i = 0, length = editorButtons.length; i < length; i++) {\n editorButtons[i].addEventListener('click', e => this.handleEditorOption(e), false);\n }\n document.getElementById('edit-text-code').addEventListener('input', f => {\n self.refresh();\n })\n\n document.getElementById('post-image').addEventListener('change', e => this.handlePostImageAdd(e), false);\n document.getElementById('option-image').addEventListener('click', e => {\n document.getElementById('post-image').click();\n })\n }\n\n refresh() {\n var caret = position(document.getElementById('edit-text-code')).pos;\n var spiffed = hljs.highlight('markdown', document.getElementById('edit-text-code').innerText).value;\n var temp = document.createElement(\"div\");\n temp.innerText = spiffed;\n document.getElementById('edit-text-code').innerHTML = temp.innerText;\n position(document.getElementById('edit-text-code'), caret)\n }\n\n //--------------------------\n // event handlers\n //--------------------------\n handleEditorOption(e) {\n e.preventDefault();\n var self = this;\n var sel, range, pulled;\n sel = window.getSelection(); //console.log(sel)\n if (sel.rangeCount) {\n range = sel.getRangeAt(0);\n pulled = sel.getRangeAt(0).toString();\n range.deleteContents();\n switch (e.target.id) {\n case \"option-bold\":\n range.insertNode(document.createTextNode(\"**\" + pulled + \"**\"));\n break;\n case \"option-italic\":\n range.insertNode(document.createTextNode(\"*\" + pulled + \"*\"));\n break;\n case \"option-strikethrough\":\n range.insertNode(document.createTextNode(\"<del>\" + pulled + \"</del>\"));\n break;\n case \"option-header1\":\n range.insertNode(document.createTextNode(\"# \" + pulled));\n break;\n case \"option-header2\":\n range.insertNode(document.createTextNode(\"## \" + pulled));\n break;\n case \"option-header3\":\n range.insertNode(document.createTextNode(\"### \" + pulled));\n break;\n case \"option-link\":\n range.insertNode(document.createTextNode(\"[\" + pulled + \"](PASTE URL HERE)\"));\n break;\n case \"option-date\":\n console.log(\"DATE UPDATE\")\n break\n default:\n //range.insertNode(document.createTextNode(\"[\" + self.url + \"](PASTE URL HERE)\"));\n break;\n }\n }\n this.refresh()\n }\n\n handlePostImageAdd(e) {\n e.stopPropagation();\n e.preventDefault();\n let self = this;\n\n var postData = new FormData();\n var files = e.target.files;\n for (var i = 0; i < files.length; i++) {\n var file = files[i];\n // Check the file type.\n if (!file.type.match('image.*')) {\n continue;\n }\n postData.append('post_image', file, file.name);\n }\n var caret = position(document.getElementById('edit-text-code')).pos;\n self.dataUtils.request(\"/api/blog/add-post-image\", DataEvent.POST_IMAGE_ADDED, REQUEST_TYPE_POST, CONTENT_TYPE_FORM, postData)\n .then((response) => {\n //console.log(\"01 \"+response.request['response']);\n position(document.getElementById('edit-text-code'), caret)\n var sel, range, pulled;\n sel = window.getSelection(); //console.log(sel)\n //console.log(note.message)\n if (sel.rangeCount) {\n range = sel.getRangeAt(0);\n pulled = sel.getRangeAt(0).toString();\n range.deleteContents();\n range.insertNode(document.createTextNode(\"![image alt text](\" + JSON.parse(response.request['response']).url + \" 'image title')\"));\n }\n self.refresh();\n\n }).catch((err) => {\n console.log(err)\n })\n\n }\n}\nexport default TextEditor","//TOOLS\nimport DataUtils, {\n REQUEST_TYPE_GET,\n REQUEST_TYPE_PUT,\n REQUEST_TYPE_POST,\n REQUEST_TYPE_DELETE,\n CONTENT_TYPE_JSON,\n CONTENT_TYPE_FORM\n} from '../tools/utilities/DataUtils';\nimport * as DataEvent from '../tools/events/DataEvent';\nimport Animate from '../tools/effects/Animate';\nimport * as Ease from '../tools/effects/Animate';\nimport TextEffects from '../tools/effects/TextEffects';\nimport EntryTasks from '../tasks/EntryTasks';\nimport TextEditor from '../tools/utilities/TextEditor';\nclass Entry {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n reframe('iframe');\n this.uploadFiles;\n this.start();\n this.editor = new TextEditor();\n }\n //--------------------------\n // methods\n //--------------------------\n start() {\n new Animate().object({\n targets: document.getElementById('loader'),\n duration: 300,\n opacity: 0,\n easing: 'easeInOutQuad',\n complete: function() {\n document.getElementById('loader').style.display = 'none';\n document.getElementById('loader').style.visibility = 'hidden';\n new Animate().object({\n targets: document.getElementById('header'),\n duration: 10,\n opacity: 1,\n easing: 'easeInOutQuad',\n complete: function() {\n new TextEffects().scramble(document.getElementById('the-title'), 50, function() {\n\n if (document.getElementById('the-intro'))\n document.getElementById('the-intro').style.opacity = 1;\n if (document.getElementById('blog-entry'))\n document.getElementById('blog-entry').style.opacity = 1;\n //START SEcTION\n });\n }\n });\n }\n });\n\n if (document.getElementById('featured-image-drop')) {\n document.getElementById('featured-image-drop').addEventListener('dragover', this.handleDragOver, false);\n document.getElementById('featured-image-drop').addEventListener('drop', this.handleDrop, false);\n document.getElementById('featured-click').addEventListener('change', this.handleClicked, false);\n \n if(document.getElementById('new-upload-link'))\n {\n document.getElementById('new-upload-link').addEventListener('click', e=>{\n document.getElementById('featured-click').click();\n })\n }\n document.getElementById(\"post-sumbit-btn\").addEventListener('click', f => {\n f.preventDefault();\n let edit = false;\n if (f.target.getAttribute('data-action') == 'blog-update')\n edit = true;\n console.log('clicked')\n new EntryTasks().submitPost(edit, Entry.uploadFiles).then((response) => {\n let note = JSON.parse(response['response']['request'].response);\n console.log(note.message);\n }).catch((err) => {\n console.log(err)\n });\n });\n }\n }\n\n //--------------------------\n // event handlers\n //--------------------------\n handleDragOver(e) {\n e.stopPropagation();\n e.preventDefault();\n e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.\n }\n handleClicked(e) {\n e.stopPropagation();\n e.preventDefault();\n //console.log(\"IMAGES \" + e.target.files);\n Entry.uploadFiles = e.target.files;\n for (var i = 0, f; f = Entry.uploadFiles[i]; i++) {\n // Only process image files.\n if (!f.type.match('image.*')) {\n continue;\n }\n var reader = new FileReader();\n // Closure to capture the file information.\n reader.onload = (function(theFile) {\n return function(f) {\n // Render thumbnail.\n var span = document.createElement('span');\n span.innerHTML = [\n '<img src=\"',\n f.target.result,\n '\" title=\"',\n escape(theFile.name),\n '\"/>'\n ].join('');\n //document.getElementById('featured-image-drop').insertBefore(span, null);\n document.getElementById('featured-image-drop').innerHTML = '';\n document.getElementById('featured-image-drop').appendChild(span);\n };\n })(f);\n // Read in the image file as a data URL.\n reader.readAsDataURL(f);\n }\n\n }\n\n handleDrop(e) {\n e.stopPropagation();\n e.preventDefault();\n Entry.uploadFiles = e.dataTransfer.files;\n //console.log(MemberArea.uploadFiles.length);\n for (var i = 0, f; f = Entry.uploadFiles[i]; i++) {\n // Only process image files.\n if (!f.type.match('image.*')) {\n continue;\n }\n var reader = new FileReader();\n // Closure to capture the file information.\n reader.onload = (function(theFile) {\n return function(f) {\n // Render thumbnail.\n var span = document.createElement('span');\n span.innerHTML = [\n '<img src=\"',\n f.target.result,\n '\" title=\"',\n escape(theFile.name),\n '\"/>'\n ].join('');\n //document.getElementById('featured-image-drop').insertBefore(span, null);\n document.getElementById('featured-image-drop').innerHTML = '';\n document.getElementById('featured-image-drop').appendChild(span);\n };\n })(f);\n // Read in the image file as a data URL.\n reader.readAsDataURL(f);\n }\n }\n\n}\nEntry.uploadFiles = [];\nexport {\n Entry as\n default\n}","//TOOLS\nimport DataUtils, {\n REQUEST_TYPE_GET,\n REQUEST_TYPE_PUT,\n REQUEST_TYPE_POST,\n REQUEST_TYPE_DELETE,\n CONTENT_TYPE_JSON,\n CONTENT_TYPE_FORM\n} from '../tools/utilities/DataUtils.jsx';\nimport Entry from './DashEntry';\nimport Animate from '../tools/effects/Animate.jsx';\nclass DisplayManager {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n this.dataUtils = new DataUtils();\n this.currentDisplay = '';\n this.urlPieces = document.URL.split(\"/\");\n //grab url so system knows what to display \n this.chooseDisplay(this.urlPieces[5], this.urlPieces[6]);\n\n }\n //--------------------------\n // methods\n //--------------------------\n start() {\n let self = this;\n new Animate().object({\n targets: document.getElementById('loader'),\n duration: 300,\n opacity: 0,\n easing: 'easeInOutQuad',\n complete: function () {\n document.getElementById('loader').style.display = 'none';\n document.getElementById('loader').style.visibility = 'hidden';\n new Animate().object({\n targets: document.getElementById('header'),\n duration: 10,\n opacity: 1,\n easing: 'easeInOutQuad',\n complete: function () {\n document.getElementById('loader').style.display = 'none';\n document.getElementById('loader').style.visibility = 'hidden';\n }\n });\n }\n });\n }\n\n chooseDisplay(section, page) {\n this.currentDisplay = '';\n //console.log(section+\" \"+page)\n switch (section) {\n case 'entries':\n this\n this.currentDisplay = new Entry();\n break;\n \n default:\n // just chill\n break;\n }\n this.start();\n\n }\n //--------------------------\n // event handlers\n //--------------------------\n\n}\nexport {\n DisplayManager as\n default\n}","import DataUtils, { REQUEST_TYPE_GET, REQUEST_TYPE_PUT, REQUEST_TYPE_POST, REQUEST_TYPE_DELETE, CONTENT_TYPE_JSON, CONTENT_TYPE_FORM } from './tools/utilities/DataUtils.jsx';\nimport * as DataEvent from './tools/events/DataEvent.jsx';\nimport DisplayManager from './controllers/DisplayManager.jsx';\n\nexport default class Base {\n //--------------------------\n // constructor\n //--------------------------\n \n //TODO: Flip to unified structure defined in BMG, brah\n constructor() {\n var self = this;\n var admin = [];\n var folio = [];\n var displayManager = [];\n this.dataUtils = new DataUtils();\n this.settings = [];\n this.start(); \n }\n start() {\n this.displayManager = new DisplayManager();\n }\n //--------------------------\n // methods\n //--------------------------\n loadSettings() {\n var self = this;\n this.dataUtils.request('/base-assets/data/settings.json', DataEvent.SETTINGS_LOADED)\n .then((response) => {\n this.settings = JSON.parse(response['request'].response);\n this.start();\n //transfer \n \n })\n .catch((err) => {\n //console.log(err);\n });\n }\n\n //--------------------------\n // event handlers\n //--------------------------\n\n}\n","import Base from './Base.jsx'\n\ndocument.addEventListener('DOMContentLoaded', function() {\n\n var base = new Base();\n}, false);\n"]}