From 2b26d3b52559c6e4eda79312b79850e0c41f89c4 Mon Sep 17 00:00:00 2001 From: Ro Date: Mon, 5 Nov 2018 17:32:33 -0500 Subject: [PATCH] started smoothing out rte notifcation handling, cleaned up styles for date picker --- themes/dash/assets/css/dash.css | 190 ++- themes/dash/assets/css/dash.css.map | 2 +- themes/dash/assets/js/dash.min.js | 1430 +++++++++-------- themes/dash/assets/js/dash.min.map | 2 +- themes/dash/entry-edit.pug | 33 +- themes/dash/src/com/controllers/DashEntry.jsx | 46 +- themes/dash/src/com/tasks/EntryTasks.jsx | 3 +- .../dash/src/com/tools/events/DataEvent.jsx | 4 + .../src/com/tools/utilities/TextEditor.jsx | 29 +- themes/dash/src/styles/main/_colors.styl | 4 + .../src/styles/main/_editor-highlight.styl | 2 +- themes/dash/src/styles/main/_editor.styl | 275 +--- themes/dash/src/styles/main/_entries.styl | 258 ++- 13 files changed, 1208 insertions(+), 1070 deletions(-) diff --git a/themes/dash/assets/css/dash.css b/themes/dash/assets/css/dash.css index 02d8f5d..54ec33b 100644 --- a/themes/dash/assets/css/dash.css +++ b/themes/dash/assets/css/dash.css @@ -2189,7 +2189,6 @@ select { width: 100%; } #entries-edit-index #entries-edit-index-wrapper #entry-header { - width: 100%; max-width: 900px; margin: 0 auto; padding: 0.75rem; @@ -2206,9 +2205,23 @@ select { background: #91867a; font-family: 'Apercu'; width: 100%; - height: 150px; + height: 115px; color: #4c463f; } +#entries-edit-index #entries-edit-index-wrapper #entry-header #entry-meta #entry-date { + background: #897e71; + border-radius: 0 3px 3px 0; + width: 105px; + font-family: 'Apercu'; + color: #cd898d; +} +#entries-edit-index #entries-edit-index-wrapper #entry-header #entry-meta label { + background: #81776b; + border-radius: 3px 0 0 3px; + display: inline-block; + padding: 5px; + color: #a69d93; +} #entries-edit-index #entries-edit-index-wrapper #entry-header #entry-meta #featured-click, #entries-edit-index #entries-edit-index-wrapper #entry-header #entry-meta #post-image { display: none; @@ -2257,75 +2270,6 @@ select { white-space: pre-wrap; line-break: normal; } -/** -------------------------------- --- Editor -------------------------------- -**/ -#edit-control { - margin: 10px 0 0 0; - top: 1px; - padding: 5px; - border-radius: 5px; - background: rgba(137,126,113,0.75); - z-index: 2000; -} -#edit-control button { - margin: 5px; -} -#edit-control #post-sumbit-btn { - height: 30px; - background: #65b16c; - color: #418147; -} -#edit-control #option-date { - height: 30px; - padding-top: 6px; -} -#edit-control #option-date svg { - margin: -13px 5px 0 0; - display: inline-block; - vertical-align: top; - fill: #eee; -} -#edit-control .content-editor-btn-icon { - height: 30px; - width: 30px; - background: #643c32; - padding: 5px 5px 1px 5px; - border-radius: 20px; - color: #968c80; - display: inline-block; - vertical-align: top; - text-align: center; -} -#edit-control .content-editor-btn-icon svg { - fill: #968c80; -} -#edit-control .content-editor-btn-text { - width: 30px; - background: #643c32; - padding: 5px; - border-radius: 20px; - color: #968c80; - vertical-align: top; - display: inline-block; - text-align: center; -} -#edit-control #option-bold { - font-weight: bold; - text-decoration: none; -} -#edit-control #option-italic { - font-weight: bold; - text-decoration: none; - font-style: italic; -} -#edit-control #option-strikethrough { - font-weight: bold; - text-decoration: line-through; - font-style: italic; -} .dp-modal { position: fixed; top: 0; @@ -2635,11 +2579,113 @@ select { transform: translate(-50%, -50%); } } +/** +------------------------------- +-- Editor +------------------------------- +**/ +#edit-control { + margin: 10px; + top: 1px; + padding: 5px; + border-radius: 5px; + background: rgba(137,126,113,0.75); + z-index: 2000; +} +#edit-control button { + margin: 5px; +} +#edit-control #post-sumbit-btn { + -moz-transition: all 0.3s linear; + -webkit-transition: all 0.3s linear; + -o-transition: all 0.3s linear; + transition: all 0.3s linear; + height: 30px; + width: 30px; + padding: 5px 5px 1px 5px; + border-radius: 20px; + display: inline-block; + vertical-align: top; + text-align: center; +} +#edit-control .icon-hide { + display: none; + visibility: hidden; +} +#edit-control .submit-start { + background: #eee; +} +#edit-control .submit-start svg { + fill: #cd898d; +} +#edit-control .submit-cool { + background: #65b16c; +} +#edit-control .submit-cool svg { + fill: #eee; +} +#edit-control #option-date { + height: 30px; + padding-top: 6px; +} +#edit-control #option-date svg { + margin: -13px 5px 0 0; + display: inline-block; + vertical-align: top; + fill: #eee; +} +#edit-control .content-editor-btn-icon { + height: 30px; + width: 30px; + background: #643c32; + padding: 5px 5px 1px 5px; + border-radius: 20px; + color: #968c80; + display: inline-block; + vertical-align: top; + text-align: center; +} +#edit-control .content-editor-btn-icon svg { + fill: #968c80; +} +#edit-control .content-editor-btn-text { + width: 30px; + background: #643c32; + padding: 5px; + border-radius: 20px; + color: #968c80; + vertical-align: top; + display: inline-block; + text-align: center; +} +#edit-control #option-bold { + font-weight: bold; + text-decoration: none; +} +#edit-control #option-italic { + font-weight: bold; + text-decoration: none; + font-style: italic; +} +#edit-control #option-strikethrough { + font-weight: bold; + text-decoration: line-through; + font-style: italic; +} +#edit-content-wrapper { + width: 98%; + max-width: 900px; + margin: 0 auto; + border-radius: 5px; +} +#edit-content-wrapper code { + border-radius: 5px; +} .hljs { display: block; overflow-x: auto; padding: 0.5em; - background: none; + background: #897e71; } .hljs, .hljs-subst { diff --git a/themes/dash/assets/css/dash.css.map b/themes/dash/assets/css/dash.css.map index bf70a98..c1ea448 100644 --- a/themes/dash/assets/css/dash.css.map +++ b/themes/dash/assets/css/dash.css.map @@ -1 +1 @@ -{"version":3,"sources":["../../src/styles/dash.styl","../../../../node_modules/bulma.styl/stylus/utilities/animations.styl","../../../../node_modules/bulma.styl/stylus/grid/columns.styl","../../../../node_modules/bulma.styl/stylus/utilities/mixins.styl","../../src/styles/main/_normalize.styl","../../src/styles/main/_typography.styl","../../src/styles/main/_structure.styl","../../src/styles/main/_mixins.styl","../../src/styles/main/_index.styl","../../src/styles/main/_settings.styl","../../src/styles/main/_fipamo.styl","../../src/styles/main/_folio.styl","../../src/styles/main/_forms.styl","../../src/styles/main/_entries.styl","../../src/styles/main/_editor.styl","../../src/styles/main/_editor-highlight.styl"],"names":[],"mappings":"AAAA;;;;;ACAW;AACT;IACE,WAAqB,aAArB;;AACF;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AAR;EACA,YAAW,KAAX;EACA,SAAQ,MAAR;EACA,YAAW,KAAX;;AAEJ;AAAO;EACH,OAAM,QAAN;;AAEJ;AAAgB;AAAe;AAAe;AAAY;EACtD,OAAmB,QAAnB;EACA,YAAW,OAAX;;AAEJ;AAAgB;AAAgB;AAAY;AAAa;AAAc;AAAa;EAChF,OAAiB,QAAjB;;AAEJ;AAAY;AAAc;AAAoB;EAC1C,OAAkB,QAAlB;;AAEJ;AAAoB;AAAc;AAAe;EAC7C,OAAM,QAAN;;AAEJ;AAAY;AAAY;AAAc;AAAmB;EACrD,OAAM,QAAN;;AAEJ;AAAgB;AAAmB;AAAe;AAAqB;AAAsB;AAAc;EACvG,OAAmB,QAAnB;;AAEJ;AAAiB;AAAc;AAAa;AAAgB;AAA8B;AAAoB;AAAuB;EACjI,OAAiB,QAAjB;;AAEJ;EACI,OAAM,QAAN;;AAEJ;AAAkB;AAAe;EAC7B,OAAM,QAAN;;AAEJ;AAAe;EACX,YAAW,OAAX;;AAEJ;AAAe;AAAc;EACzB,aAAY,OAAZ","file":"dash.css"} \ No newline at end of file +{"version":3,"sources":["../../src/styles/dash.styl","../../../../node_modules/bulma.styl/stylus/utilities/animations.styl","../../../../node_modules/bulma.styl/stylus/grid/columns.styl","../../../../node_modules/bulma.styl/stylus/utilities/mixins.styl","../../src/styles/main/_normalize.styl","../../src/styles/main/_typography.styl","../../src/styles/main/_structure.styl","../../src/styles/main/_mixins.styl","../../src/styles/main/_index.styl","../../src/styles/main/_settings.styl","../../src/styles/main/_fipamo.styl","../../src/styles/main/_folio.styl","../../src/styles/main/_forms.styl","../../src/styles/main/_entries.styl","../../src/styles/main/_editor.styl","../../src/styles/main/_editor-highlight.styl"],"names":[],"mappings":"AAAA;;;;;ACAW;AACT;IACE,WAAqB,aAArB;;AACF;IACE,WAAuB,eAAvB;;;AAJO;AACT;IACE,WAAqB,aAArB;;AACF;IACE,WAAuB,eAAvB;;;AAJO;AACT;IACE,WAAqB,aAArB;;AACF;I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AK,QAAL;;AAER;EACI,OAAM,KAAN;EACA,YAAW,QAAX;EACA,SAAQ,IAAR;EACA,eAAc,KAAd;EACA,OAAM,QAAN;EACA,gBAAe,IAAf;EACA,SAAQ,aAAR;EACA,YAAW,OAAX;;AAEJ;EACI,aAAY,KAAZ;EACA,iBAAgB,KAAhB;;AAEJ;EACI,aAAY,KAAZ;EACA,iBAAgB,KAAhB;EACA,YAAW,OAAX;;AAEJ;EACI,aAAY,KAAZ;EACA,iBAAgB,aAAhB;EACA,YAAW,OAAX;;AAER;EACI,OAAM,IAAN;EACA,WAAU,MAAV;EACA,QAAO,OAAP;EACA,eAAc,IAAd;;AACA;EACI,eAAe,IAAf;;ACzFR;EACI,SAAQ,MAAR;EACA,YAAW,KAAX;EACA,SAAQ,MAAR;EACA,YAAsB,QAAtB;;AAEJ;AAAO;EACH,OAAM,QAAN;;AAEJ;AAAgB;AAAe;AAAe;AAAY;EACtD,OAAmB,QAAnB;EACA,YAAW,OAAX;;AAEJ;AAAgB;AAAgB;AAAY;AAAa;AAAc;AAAa;EAChF,OAAiB,QAAjB;;AAEJ;AAAY;AAAc;AAAoB;EAC1C,OAAkB,QAAlB;;AAEJ;AAAoB;AAAc;AAAe;EAC7C,OAAM,QAAN;;AAEJ;AAAY;AAAY;AAAc;AAAmB;EACrD,OAAM,QAAN;;AAEJ;AAAgB;AAAmB;AAAe;AAAqB;AAAsB;AAAc;EACvG,OAAmB,QAAnB;;AAEJ;AAAiB;AAAc;AAAa;AAAgB;AAA8B;AAAoB;AAAuB;EACjI,OAAiB,QAAjB;;AAEJ;EACI,OAAM,QAAN;;AAEJ;AAAkB;AAAe;EAC7B,OAAM,QAAN;;AAEJ;AAAe;EACX,YAAW,OAAX;;AAEJ;AAAe;AAAc;EACzB,aAAY,OAAZ","file":"dash.css"} \ No newline at end of file diff --git a/themes/dash/assets/js/dash.min.js b/themes/dash/assets/js/dash.min.js index 77dff73..aaea7c3 100644 --- a/themes/dash/assets/js/dash.min.js +++ b/themes/dash/assets/js/dash.min.js @@ -197,7 +197,7 @@ exports.default = _default; Object.defineProperty(exports, "__esModule", { value: true }); -exports.default = exports.POST_IMAGE_ADDED = exports.PROJECTS_SORTED = exports.PROJECT_ADDED = exports.PROJECT_UPDATED = exports.ARCHIVES_ENTRY_LOADED = exports.ARCHIVES_PAGE_LOADED = exports.ARCHIVES_JSON_LOADED = exports.HTML_LOADED = exports.SETTINGS_LOADED = exports.IMG_REQUEST_LAME = exports.IMG_REQUEST_GOOD = exports.REQUEST_LAME = exports.REQUEST_GOOD = void 0; +exports.default = exports.POST_DELETED = exports.POST_UPDATED = exports.POST_ADDED = exports.POST_ERROR = exports.POST_IMAGE_ADDED = exports.PROJECTS_SORTED = exports.PROJECT_ADDED = exports.PROJECT_UPDATED = exports.ARCHIVES_ENTRY_LOADED = exports.ARCHIVES_PAGE_LOADED = exports.ARCHIVES_JSON_LOADED = exports.HTML_LOADED = exports.SETTINGS_LOADED = exports.IMG_REQUEST_LAME = exports.IMG_REQUEST_GOOD = exports.REQUEST_LAME = exports.REQUEST_GOOD = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -227,6 +227,14 @@ var PROJECTS_SORTED = 'projectsSorted'; exports.PROJECTS_SORTED = PROJECTS_SORTED; var POST_IMAGE_ADDED = 'postImageAdded'; exports.POST_IMAGE_ADDED = POST_IMAGE_ADDED; +var POST_ERROR = 'postError'; +exports.POST_ERROR = POST_ERROR; +var POST_ADDED = 'postAdded'; +exports.POST_ADDED = POST_ADDED; +var POST_UPDATED = 'postUpdated'; +exports.POST_UPDATED = POST_UPDATED; +var POST_DELETED = 'postImageAdded'; +exports.POST_DELETED = POST_DELETED; var DataEvent = function DataEvent() { _classCallCheck(this, DataEvent); @@ -702,14 +710,13 @@ function () { postData.append("title", document.getElementById('entry_title').value); postData.append('slug', new _StringUtils.default().cleanString(document.getElementById('entry_title').value)); postData.append("entry_plaintext", txt.value); - postData.append("created_date", document.getElementById('option-date').value); + postData.append("origin_date", document.getElementById('entry-date').value); postData.append("tags", document.getElementById('entry_tags').value); var postURL; var postEventType; if (edit) { var postID = document.getElementById('post-sumbit-btn').getAttribute('data-id'); - console.log("POST ID: " + postID); postURL = "/api/blog/update/" + postID; postEventType = DataEvent.POST_UPDATED; } else { @@ -836,7 +843,708 @@ function () { var _default = DateUtils; exports.default = _default; -},{}],"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js":[function(require,module,exports) { +},{}],"../../../../node_modules/caret-pos/lib/esm2015/main.js":[function(require,module,exports) { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getOffset = exports.offset = exports.position = void 0; +var attributes = ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle', 'borderTopWidth', 'boxSizing', 'fontFamily', 'fontSize', 'fontWeight', 'height', 'letterSpacing', 'lineHeight', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'outlineWidth', 'overflow', 'overflowX', 'overflowY', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'textAlign', 'textOverflow', 'textTransform', 'whiteSpace', 'wordBreak', 'wordWrap']; +/** + * Create a mirror + * + * @param {Element} element The element + * @param {string} html The html + * + * @return {object} The mirror object + */ + +var createMirror = function createMirror(element, html) { + /** + * The mirror element + */ + var mirror = document.createElement('div'); + /** + * Create the CSS for the mirror object + * + * @return {object} The style object + */ + + var mirrorCss = function mirrorCss() { + var css = { + position: 'absolute', + left: -9999, + top: 0, + zIndex: -2000 + }; + + if (element.tagName === 'TEXTAREA') { + attributes.push('width'); + } + + attributes.forEach(function (attr) { + css[attr] = getComputedStyle(element)[attr]; + }); + return css; + }; + /** + * Initialize the mirror + * + * @param {string} html The html + * + * @return {void} + */ + + + var initialize = function initialize(html) { + var styles = mirrorCss(); + Object.keys(styles).forEach(function (key) { + mirror.style[key] = styles[key]; + }); + mirror.innerHTML = html; + element.parentNode.insertBefore(mirror, element.nextSibling); + }; + /** + * Get the rect + * + * @return {Rect} The bounding rect + */ + + + var rect = function rect() { + var marker = mirror.ownerDocument.getElementById('caret-position-marker'); + var boundingRect = { + left: marker.offsetLeft, + top: marker.offsetTop, + height: marker.offsetHeight + }; + mirror.parentNode.removeChild(mirror); + return boundingRect; + }; + + initialize(html); + return { + rect: rect + }; +}; + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; +} : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; +}; +/** + * Check if a DOM Element is content editable + * + * @param {Element} element The DOM element + * + * @return {bool} If it is content editable + */ + + +var isContentEditable = function isContentEditable(element) { + return !!(element.contentEditable && element.contentEditable === 'true'); +}; +/** + * Get the context from settings passed in + * + * @param {object} settings The settings object + * + * @return {object} window and document + */ + + +var getContext = function getContext() { + var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var customPos = settings.customPos, + iframe = settings.iframe, + noShadowCaret = settings.noShadowCaret; + + if (iframe) { + return { + iframe: iframe, + window: iframe.contentWindow, + document: iframe.contentDocument || iframe.contentWindow.document, + noShadowCaret: noShadowCaret, + customPos: customPos + }; + } + + return { + window: window, + document: document, + noShadowCaret: noShadowCaret, + customPos: customPos + }; +}; +/** + * Get the offset of an element + * + * @param {Element} element The DOM element + * @param {object} ctx The context + * + * @return {object} top and left + */ + + +var getOffset = function getOffset(element, ctx) { + var win = ctx && ctx.window || window; + var doc = ctx && ctx.document || document; + var rect = element.getBoundingClientRect(); + var docEl = doc.documentElement; + var scrollLeft = win.pageXOffset || docEl.scrollLeft; + var scrollTop = win.pageYOffset || docEl.scrollTop; + return { + top: rect.top + scrollTop, + left: rect.left + scrollLeft + }; +}; +/** + * Check if a value is an object + * + * @param {any} value The value to check + * + * @return {bool} If it is an object + */ + + +exports.getOffset = getOffset; + +var isObject = function isObject(value) { + return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null; +}; +/** + * Create a Input caret object. + * + * @param {Element} element The element + * @param {Object} ctx The context + */ + + +var createInputCaret = function createInputCaret(element, ctx) { + /** + * Get the current position + * + * @returns {int} The caret position + */ + var getPos = function getPos() { + return element.selectionStart; + }; + /** + * Set the position + * + * @param {int} pos The position + * + * @return {Element} The element + */ + + + var setPos = function setPos(pos) { + element.setSelectionRange(pos, pos); + return element; + }; + /** + * The offset + * + * @param {int} pos The position + * + * @return {object} The offset + */ + + + var getOffset$$1 = function getOffset$$1(pos) { + var rect = getOffset(element); + var position = getPosition(pos); + return { + top: rect.top + position.top + ctx.document.body.scrollTop, + left: rect.left + position.left + ctx.document.body.scrollLeft, + height: position.height + }; + }; + /** + * Get the current position + * + * @param {int} pos The position + * + * @return {object} The position + */ + + + var getPosition = function getPosition(pos) { + var format = function format(val) { + var value = val.replace(/<|>|`|"|&/g, '?').replace(/\r\n|\r|\n/g, '
'); + return value; + }; + + if (ctx.customPos || ctx.customPos === 0) { + pos = ctx.customPos; + } + + var position = pos === undefined ? getPos() : pos; + var startRange = element.value.slice(0, position); + var endRange = element.value.slice(position); + var html = '' + format(startRange) + ''; + html += '|'; + html += '' + format(endRange) + ''; + var mirror = createMirror(element, html); + var rect = mirror.rect(); + rect.pos = getPos(); + return rect; + }; + + return { + getPos: getPos, + setPos: setPos, + getOffset: getOffset$$1, + getPosition: getPosition + }; +}; +/** + * Create an Editable Caret + * @param {Element} element The editable element + * @param {object|null} ctx The context + * + * @return {EditableCaret} + */ + + +var createEditableCaret = function createEditableCaret(element, ctx) { + /** + * Set the caret position + * + * @param {int} pos The position to se + * + * @return {Element} The element + */ + var setPos = function setPos(pos) { + var sel = ctx.window.getSelection(); + + if (sel) { + var offset = 0; + var found = false; + + var find = function find(position, parent) { + for (var i = 0; i < parent.childNodes.length; i++) { + var node = parent.childNodes[i]; + + if (found) { + break; + } + + if (node.nodeType === 3) { + if (offset + node.length >= position) { + found = true; + var range = ctx.document.createRange(); + range.setStart(node, position - offset); + sel.removeAllRanges(); + sel.addRange(range); + break; + } else { + offset += node.length; + } + } else { + find(pos, node); + } + } + }; + + find(pos, element); + } + + return element; + }; + /** + * Get the offset + * + * @return {object} The offset + */ + + + var getOffset = function getOffset() { + var range = getRange(); + var offset = { + height: 0, + left: 0, + right: 0 + }; + + if (!range) { + return offset; + } + + var hasCustomPos = ctx.customPos || ctx.customPos === 0; // endContainer in Firefox would be the element at the start of + // the line + + if (range.endOffset - 1 > 0 && range.endContainer !== element || hasCustomPos) { + var clonedRange = range.cloneRange(); + var fixedPosition = hasCustomPos ? ctx.customPos : range.endOffset; + clonedRange.setStart(range.endContainer, fixedPosition - 1 < 0 ? 0 : fixedPosition - 1); + clonedRange.setEnd(range.endContainer, fixedPosition); + var rect = clonedRange.getBoundingClientRect(); + offset = { + height: rect.height, + left: rect.left + rect.width, + top: rect.top + }; + clonedRange.detach(); + } + + if ((!offset || offset && offset.height === 0) && !ctx.noShadowCaret) { + var _clonedRange = range.cloneRange(); + + var shadowCaret = ctx.document.createTextNode('|'); + + _clonedRange.insertNode(shadowCaret); + + _clonedRange.selectNode(shadowCaret); + + var _rect = _clonedRange.getBoundingClientRect(); + + offset = { + height: _rect.height, + left: _rect.left, + top: _rect.top + }; + shadowCaret.parentNode.removeChild(shadowCaret); + + _clonedRange.detach(); + } + + if (offset) { + var doc = ctx.document.documentElement; + offset.top += ctx.window.pageYOffset - (doc.clientTop || 0); + offset.left += ctx.window.pageXOffset - (doc.clientLeft || 0); + } + + return offset; + }; + /** + * Get the position + * + * @return {object} The position + */ + + + var getPosition = function getPosition() { + var offset = getOffset(); + var pos = getPos(); + var rect = element.getBoundingClientRect(); + var inputOffset = { + top: rect.top + ctx.document.body.scrollTop, + left: rect.left + ctx.document.body.scrollLeft + }; + offset.left -= inputOffset.left; + offset.top -= inputOffset.top; + offset.pos = pos; + return offset; + }; + /** + * Get the range + * + * @return {Range|null} + */ + + + var getRange = function getRange() { + if (!ctx.window.getSelection) { + return; + } + + var sel = ctx.window.getSelection(); + return sel.rangeCount > 0 ? sel.getRangeAt(0) : null; + }; + /** + * Get the caret position + * + * @return {int} The position + */ + + + var getPos = function getPos() { + var range = getRange(); + var clonedRange = range.cloneRange(); + clonedRange.selectNodeContents(element); + clonedRange.setEnd(range.endContainer, range.endOffset); + var pos = clonedRange.toString().length; + clonedRange.detach(); + return pos; + }; + + return { + getPos: getPos, + setPos: setPos, + getPosition: getPosition, + getOffset: getOffset, + getRange: getRange + }; +}; + +var createCaret = function createCaret(element, ctx) { + if (isContentEditable(element)) { + return createEditableCaret(element, ctx); + } + + return createInputCaret(element, ctx); +}; + +var position = function position(element, value) { + var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var options = settings; + + if (isObject(value)) { + options = value; + value = null; + } + + var ctx = getContext(options); + var caret = createCaret(element, ctx); + + if (value || value === 0) { + return caret.setPos(value); + } + + return caret.getPosition(); +}; +/** + * + * @param {Element} element The DOM element + * @param {number|undefined} value The value to set + * @param {object} settings Any settings for context + */ + + +exports.position = position; + +var offset = function offset(element, value) { + var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var options = settings; + + if (isObject(value)) { + options = value; + value = null; + } + + var ctx = getContext(options); + var caret = createCaret(element, ctx); + return caret.getOffset(value); +}; + +exports.offset = offset; +},{}],"tools/utilities/TextEditor.jsx":[function(require,module,exports) { +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _DataUtils = _interopRequireWildcard(require("./DataUtils")); + +var DataEvent = _interopRequireWildcard(require("../events/DataEvent")); + +var _DateUtils = _interopRequireDefault(require("./DateUtils")); + +var _caretPos = require("caret-pos"); + +var _Animate = _interopRequireDefault(require("../effects/Animate")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var TextEditor = +/*#__PURE__*/ +function () { + //-------------------------- + // constructor + //-------------------------- + function TextEditor() { + _classCallCheck(this, TextEditor); + + this.setInputs(); + hljs.initHighlightingOnLoad(); + this.dataUtils = new _DataUtils.default(); + this.dateUtils = new _DateUtils.default(); + this.url = ''; + var self = this; + window.addEventListener("scroll", function (f) { + var fixLimit = document.getElementById('header').offsetHeight + document.getElementById('entry-header').offsetHeight + document.getElementById('entry-feature').offsetHeight; + + if (window.pageYOffset >= fixLimit) { + document.getElementById('edit-control').style.position = "fixed"; + } else { + document.getElementById('edit-control').style.position = "relative"; + } + }); + this.refresh(); + } //-------------------------- + // methods + //-------------------------- + + + _createClass(TextEditor, [{ + key: "setInputs", + value: function setInputs() { + var _this = this; + + var self = this; + var editorButtons = document.querySelectorAll('.editor-button'); + + for (var i = 0, length = editorButtons.length; i < length; i++) { + editorButtons[i].addEventListener('click', function (e) { + return _this.handleEditorOption(e); + }, false); + } + + document.getElementById('edit-text-code').addEventListener('input', function (f) { + self.refresh(); + }); + document.getElementById('post-image').addEventListener('change', function (e) { + return _this.handlePostImageAdd(e); + }, false); + document.getElementById('option-image').addEventListener('click', function (e) { + document.getElementById('post-image').click(); + }); + } + }, { + key: "refresh", + value: function refresh() { + var caret = (0, _caretPos.position)(document.getElementById('edit-text-code')).pos; + var spiffed = hljs.highlight('markdown', document.getElementById('edit-text-code').innerText).value; + var temp = document.createElement("div"); + temp.innerText = spiffed; + document.getElementById('edit-text-code').innerHTML = temp.innerText; + (0, _caretPos.position)(document.getElementById('edit-text-code'), caret); + } + }, { + key: "notify", + value: function notify(type) { + switch (type) { + case DataEvent.POST_UPDATED: + document.getElementById('submit-save').classList.add('icon-hide'); + document.getElementById('submit-good').classList.remove('icon-hide'); + document.getElementById('post-sumbit-btn').classList.remove('submit-start'); + document.getElementById('post-sumbit-btn').classList.add('submit-cool'); + setTimeout(function (f) { + document.getElementById('submit-save').classList.remove('icon-hide'); + document.getElementById('submit-good').classList.add('icon-hide'); + document.getElementById('post-sumbit-btn').classList.add('submit-start'); + document.getElementById('post-sumbit-btn').classList.remove('submit-cool'); + }, 2000); + break; + } + } //-------------------------- + // event handlers + //-------------------------- + + }, { + key: "handleEditorOption", + value: function handleEditorOption(e) { + e.preventDefault(); + var self = this; + var sel, range, pulled; + sel = window.getSelection(); //console.log(sel) + + if (sel.rangeCount) { + range = sel.getRangeAt(0); + pulled = sel.getRangeAt(0).toString(); + range.deleteContents(); + + switch (e.target.id) { + case "option-bold": + range.insertNode(document.createTextNode("**" + pulled + "**")); + break; + + case "option-italic": + range.insertNode(document.createTextNode("*" + pulled + "*")); + break; + + case "option-strikethrough": + range.insertNode(document.createTextNode("" + pulled + "")); + break; + + case "option-header1": + range.insertNode(document.createTextNode("# " + pulled)); + break; + + case "option-header2": + range.insertNode(document.createTextNode("## " + pulled)); + break; + + case "option-header3": + range.insertNode(document.createTextNode("### " + pulled)); + break; + + case "option-link": + range.insertNode(document.createTextNode("[" + pulled + "](PASTE URL HERE)")); + break; + + case "option-date": + console.log("DATE UPDATE"); + break; + + default: + //range.insertNode(document.createTextNode("[" + self.url + "](PASTE URL HERE)")); + break; + } + } + + this.refresh(); + } + }, { + key: "handlePostImageAdd", + value: function handlePostImageAdd(e) { + e.stopPropagation(); + e.preventDefault(); + var self = this; + var postData = new FormData(); + var files = e.target.files; + + for (var i = 0; i < files.length; i++) { + var file = files[i]; // Check the file type. + + if (!file.type.match('image.*')) { + continue; + } + + postData.append('post_image', file, file.name); + } + + var caret = (0, _caretPos.position)(document.getElementById('edit-text-code')).pos; + self.dataUtils.request("/api/blog/add-post-image", DataEvent.POST_IMAGE_ADDED, _DataUtils.REQUEST_TYPE_POST, _DataUtils.CONTENT_TYPE_FORM, postData).then(function (response) { + //console.log("01 "+response.request['response']); + (0, _caretPos.position)(document.getElementById('edit-text-code'), caret); + var sel, range, pulled; + sel = window.getSelection(); //console.log(sel) + //console.log(note.message) + + if (sel.rangeCount) { + range = sel.getRangeAt(0); + pulled = sel.getRangeAt(0).toString(); + range.deleteContents(); + range.insertNode(document.createTextNode("![image alt text](" + JSON.parse(response.request['response']).url + " 'image title')")); + } + + self.refresh(); + }).catch(function (err) { + console.log(err); + }); + } + }]); + + return TextEditor; +}(); + +var _default = TextEditor; +exports.default = _default; +},{"./DataUtils":"tools/utilities/DataUtils.jsx","../events/DataEvent":"tools/events/DataEvent.jsx","./DateUtils":"tools/utilities/DateUtils.jsx","caret-pos":"../../../../node_modules/caret-pos/lib/esm2015/main.js","../effects/Animate":"tools/effects/Animate.jsx"}],"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js":[function(require,module,exports) { var define; var global = arguments[3]; (function (global, factory) { @@ -2041,698 +2749,7 @@ var global = arguments[3]; }))); -},{}],"../../../../node_modules/caret-pos/lib/esm2015/main.js":[function(require,module,exports) { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getOffset = exports.offset = exports.position = void 0; -var attributes = ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle', 'borderTopWidth', 'boxSizing', 'fontFamily', 'fontSize', 'fontWeight', 'height', 'letterSpacing', 'lineHeight', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'outlineWidth', 'overflow', 'overflowX', 'overflowY', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'textAlign', 'textOverflow', 'textTransform', 'whiteSpace', 'wordBreak', 'wordWrap']; -/** - * Create a mirror - * - * @param {Element} element The element - * @param {string} html The html - * - * @return {object} The mirror object - */ - -var createMirror = function createMirror(element, html) { - /** - * The mirror element - */ - var mirror = document.createElement('div'); - /** - * Create the CSS for the mirror object - * - * @return {object} The style object - */ - - var mirrorCss = function mirrorCss() { - var css = { - position: 'absolute', - left: -9999, - top: 0, - zIndex: -2000 - }; - - if (element.tagName === 'TEXTAREA') { - attributes.push('width'); - } - - attributes.forEach(function (attr) { - css[attr] = getComputedStyle(element)[attr]; - }); - return css; - }; - /** - * Initialize the mirror - * - * @param {string} html The html - * - * @return {void} - */ - - - var initialize = function initialize(html) { - var styles = mirrorCss(); - Object.keys(styles).forEach(function (key) { - mirror.style[key] = styles[key]; - }); - mirror.innerHTML = html; - element.parentNode.insertBefore(mirror, element.nextSibling); - }; - /** - * Get the rect - * - * @return {Rect} The bounding rect - */ - - - var rect = function rect() { - var marker = mirror.ownerDocument.getElementById('caret-position-marker'); - var boundingRect = { - left: marker.offsetLeft, - top: marker.offsetTop, - height: marker.offsetHeight - }; - mirror.parentNode.removeChild(mirror); - return boundingRect; - }; - - initialize(html); - return { - rect: rect - }; -}; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; -} : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; -}; -/** - * Check if a DOM Element is content editable - * - * @param {Element} element The DOM element - * - * @return {bool} If it is content editable - */ - - -var isContentEditable = function isContentEditable(element) { - return !!(element.contentEditable && element.contentEditable === 'true'); -}; -/** - * Get the context from settings passed in - * - * @param {object} settings The settings object - * - * @return {object} window and document - */ - - -var getContext = function getContext() { - var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var customPos = settings.customPos, - iframe = settings.iframe, - noShadowCaret = settings.noShadowCaret; - - if (iframe) { - return { - iframe: iframe, - window: iframe.contentWindow, - document: iframe.contentDocument || iframe.contentWindow.document, - noShadowCaret: noShadowCaret, - customPos: customPos - }; - } - - return { - window: window, - document: document, - noShadowCaret: noShadowCaret, - customPos: customPos - }; -}; -/** - * Get the offset of an element - * - * @param {Element} element The DOM element - * @param {object} ctx The context - * - * @return {object} top and left - */ - - -var getOffset = function getOffset(element, ctx) { - var win = ctx && ctx.window || window; - var doc = ctx && ctx.document || document; - var rect = element.getBoundingClientRect(); - var docEl = doc.documentElement; - var scrollLeft = win.pageXOffset || docEl.scrollLeft; - var scrollTop = win.pageYOffset || docEl.scrollTop; - return { - top: rect.top + scrollTop, - left: rect.left + scrollLeft - }; -}; -/** - * Check if a value is an object - * - * @param {any} value The value to check - * - * @return {bool} If it is an object - */ - - -exports.getOffset = getOffset; - -var isObject = function isObject(value) { - return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value !== null; -}; -/** - * Create a Input caret object. - * - * @param {Element} element The element - * @param {Object} ctx The context - */ - - -var createInputCaret = function createInputCaret(element, ctx) { - /** - * Get the current position - * - * @returns {int} The caret position - */ - var getPos = function getPos() { - return element.selectionStart; - }; - /** - * Set the position - * - * @param {int} pos The position - * - * @return {Element} The element - */ - - - var setPos = function setPos(pos) { - element.setSelectionRange(pos, pos); - return element; - }; - /** - * The offset - * - * @param {int} pos The position - * - * @return {object} The offset - */ - - - var getOffset$$1 = function getOffset$$1(pos) { - var rect = getOffset(element); - var position = getPosition(pos); - return { - top: rect.top + position.top + ctx.document.body.scrollTop, - left: rect.left + position.left + ctx.document.body.scrollLeft, - height: position.height - }; - }; - /** - * Get the current position - * - * @param {int} pos The position - * - * @return {object} The position - */ - - - var getPosition = function getPosition(pos) { - var format = function format(val) { - var value = val.replace(/<|>|`|"|&/g, '?').replace(/\r\n|\r|\n/g, '
'); - return value; - }; - - if (ctx.customPos || ctx.customPos === 0) { - pos = ctx.customPos; - } - - var position = pos === undefined ? getPos() : pos; - var startRange = element.value.slice(0, position); - var endRange = element.value.slice(position); - var html = '' + format(startRange) + ''; - html += '|'; - html += '' + format(endRange) + ''; - var mirror = createMirror(element, html); - var rect = mirror.rect(); - rect.pos = getPos(); - return rect; - }; - - return { - getPos: getPos, - setPos: setPos, - getOffset: getOffset$$1, - getPosition: getPosition - }; -}; -/** - * Create an Editable Caret - * @param {Element} element The editable element - * @param {object|null} ctx The context - * - * @return {EditableCaret} - */ - - -var createEditableCaret = function createEditableCaret(element, ctx) { - /** - * Set the caret position - * - * @param {int} pos The position to se - * - * @return {Element} The element - */ - var setPos = function setPos(pos) { - var sel = ctx.window.getSelection(); - - if (sel) { - var offset = 0; - var found = false; - - var find = function find(position, parent) { - for (var i = 0; i < parent.childNodes.length; i++) { - var node = parent.childNodes[i]; - - if (found) { - break; - } - - if (node.nodeType === 3) { - if (offset + node.length >= position) { - found = true; - var range = ctx.document.createRange(); - range.setStart(node, position - offset); - sel.removeAllRanges(); - sel.addRange(range); - break; - } else { - offset += node.length; - } - } else { - find(pos, node); - } - } - }; - - find(pos, element); - } - - return element; - }; - /** - * Get the offset - * - * @return {object} The offset - */ - - - var getOffset = function getOffset() { - var range = getRange(); - var offset = { - height: 0, - left: 0, - right: 0 - }; - - if (!range) { - return offset; - } - - var hasCustomPos = ctx.customPos || ctx.customPos === 0; // endContainer in Firefox would be the element at the start of - // the line - - if (range.endOffset - 1 > 0 && range.endContainer !== element || hasCustomPos) { - var clonedRange = range.cloneRange(); - var fixedPosition = hasCustomPos ? ctx.customPos : range.endOffset; - clonedRange.setStart(range.endContainer, fixedPosition - 1 < 0 ? 0 : fixedPosition - 1); - clonedRange.setEnd(range.endContainer, fixedPosition); - var rect = clonedRange.getBoundingClientRect(); - offset = { - height: rect.height, - left: rect.left + rect.width, - top: rect.top - }; - clonedRange.detach(); - } - - if ((!offset || offset && offset.height === 0) && !ctx.noShadowCaret) { - var _clonedRange = range.cloneRange(); - - var shadowCaret = ctx.document.createTextNode('|'); - - _clonedRange.insertNode(shadowCaret); - - _clonedRange.selectNode(shadowCaret); - - var _rect = _clonedRange.getBoundingClientRect(); - - offset = { - height: _rect.height, - left: _rect.left, - top: _rect.top - }; - shadowCaret.parentNode.removeChild(shadowCaret); - - _clonedRange.detach(); - } - - if (offset) { - var doc = ctx.document.documentElement; - offset.top += ctx.window.pageYOffset - (doc.clientTop || 0); - offset.left += ctx.window.pageXOffset - (doc.clientLeft || 0); - } - - return offset; - }; - /** - * Get the position - * - * @return {object} The position - */ - - - var getPosition = function getPosition() { - var offset = getOffset(); - var pos = getPos(); - var rect = element.getBoundingClientRect(); - var inputOffset = { - top: rect.top + ctx.document.body.scrollTop, - left: rect.left + ctx.document.body.scrollLeft - }; - offset.left -= inputOffset.left; - offset.top -= inputOffset.top; - offset.pos = pos; - return offset; - }; - /** - * Get the range - * - * @return {Range|null} - */ - - - var getRange = function getRange() { - if (!ctx.window.getSelection) { - return; - } - - var sel = ctx.window.getSelection(); - return sel.rangeCount > 0 ? sel.getRangeAt(0) : null; - }; - /** - * Get the caret position - * - * @return {int} The position - */ - - - var getPos = function getPos() { - var range = getRange(); - var clonedRange = range.cloneRange(); - clonedRange.selectNodeContents(element); - clonedRange.setEnd(range.endContainer, range.endOffset); - var pos = clonedRange.toString().length; - clonedRange.detach(); - return pos; - }; - - return { - getPos: getPos, - setPos: setPos, - getPosition: getPosition, - getOffset: getOffset, - getRange: getRange - }; -}; - -var createCaret = function createCaret(element, ctx) { - if (isContentEditable(element)) { - return createEditableCaret(element, ctx); - } - - return createInputCaret(element, ctx); -}; - -var position = function position(element, value) { - var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var options = settings; - - if (isObject(value)) { - options = value; - value = null; - } - - var ctx = getContext(options); - var caret = createCaret(element, ctx); - - if (value || value === 0) { - return caret.setPos(value); - } - - return caret.getPosition(); -}; -/** - * - * @param {Element} element The DOM element - * @param {number|undefined} value The value to set - * @param {object} settings Any settings for context - */ - - -exports.position = position; - -var offset = function offset(element, value) { - var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var options = settings; - - if (isObject(value)) { - options = value; - value = null; - } - - var ctx = getContext(options); - var caret = createCaret(element, ctx); - return caret.getOffset(value); -}; - -exports.offset = offset; -},{}],"tools/utilities/TextEditor.jsx":[function(require,module,exports) { -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _DataUtils = _interopRequireWildcard(require("./DataUtils")); - -var DataEvent = _interopRequireWildcard(require("../events/DataEvent")); - -var _DateUtils = _interopRequireDefault(require("./DateUtils")); - -var _tinyDatePicker = _interopRequireDefault(require("tiny-date-picker")); - -var _caretPos = require("caret-pos"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } - -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } - -var TextEditor = -/*#__PURE__*/ -function () { - //-------------------------- - // constructor - //-------------------------- - function TextEditor() { - _classCallCheck(this, TextEditor); - - this.setInputs(); - hljs.initHighlightingOnLoad(); - this.dataUtils = new _DataUtils.default(); - this.dateUtils = new _DateUtils.default(); - this.url = ''; - var self = this; - this.dp = (0, _tinyDatePicker.default)('input'); - (0, _tinyDatePicker.default)(document.getElementById('option-date'), { - mode: 'dp-below', - format: function format(date) { - //return date; - return self.dateUtils.getDate('origin', date); - } - }); - window.addEventListener("scroll", function (f) { - var fixLimit = document.getElementById('header').offsetHeight + document.getElementById('entry-header').offsetHeight + document.getElementById('entry-feature').offsetHeight; - - if (window.pageYOffset >= fixLimit) { - document.getElementById('edit-control').style.position = "fixed"; - } else { - document.getElementById('edit-control').style.position = "relative"; - } - }); - this.refresh(); - } //-------------------------- - // methods - //-------------------------- - - - _createClass(TextEditor, [{ - key: "setInputs", - value: function setInputs() { - var _this = this; - - var self = this; - var editorButtons = document.querySelectorAll('.editor-button'); - - for (var i = 0, length = editorButtons.length; i < length; i++) { - editorButtons[i].addEventListener('click', function (e) { - return _this.handleEditorOption(e); - }, false); - } - - document.getElementById('edit-text-code').addEventListener('input', function (f) { - self.refresh(); - }); - document.getElementById('post-image').addEventListener('change', function (e) { - return _this.handlePostImageAdd(e); - }, false); - document.getElementById('option-image').addEventListener('click', function (e) { - document.getElementById('post-image').click(); - }); - } - }, { - key: "refresh", - value: function refresh() { - var caret = (0, _caretPos.position)(document.getElementById('edit-text-code')).pos; - var spiffed = hljs.highlight('markdown', document.getElementById('edit-text-code').innerText).value; - var temp = document.createElement("div"); - temp.innerText = spiffed; - document.getElementById('edit-text-code').innerHTML = temp.innerText; - (0, _caretPos.position)(document.getElementById('edit-text-code'), caret); - } //-------------------------- - // event handlers - //-------------------------- - - }, { - key: "handleEditorOption", - value: function handleEditorOption(e) { - e.preventDefault(); - var self = this; - var sel, range, pulled; - sel = window.getSelection(); //console.log(sel) - - if (sel.rangeCount) { - range = sel.getRangeAt(0); - pulled = sel.getRangeAt(0).toString(); - range.deleteContents(); - - switch (e.target.id) { - case "option-bold": - range.insertNode(document.createTextNode("**" + pulled + "**")); - break; - - case "option-italic": - range.insertNode(document.createTextNode("*" + pulled + "*")); - break; - - case "option-strikethrough": - range.insertNode(document.createTextNode("" + pulled + "")); - break; - - case "option-header1": - range.insertNode(document.createTextNode("# " + pulled)); - break; - - case "option-header2": - range.insertNode(document.createTextNode("## " + pulled)); - break; - - case "option-header3": - range.insertNode(document.createTextNode("### " + pulled)); - break; - - case "option-link": - range.insertNode(document.createTextNode("[" + pulled + "](PASTE URL HERE)")); - break; - - case "option-date": - console.log("DATE UPDATE"); - break; - - default: - //range.insertNode(document.createTextNode("[" + self.url + "](PASTE URL HERE)")); - break; - } - } - - this.refresh(); - } - }, { - key: "handlePostImageAdd", - value: function handlePostImageAdd(e) { - e.stopPropagation(); - e.preventDefault(); - var self = this; - var postData = new FormData(); - var files = e.target.files; - - for (var i = 0; i < files.length; i++) { - var file = files[i]; // Check the file type. - - if (!file.type.match('image.*')) { - continue; - } - - postData.append('post_image', file, file.name); - } - - var caret = (0, _caretPos.position)(document.getElementById('edit-text-code')).pos; - self.dataUtils.request("/api/blog/add-post-image", DataEvent.POST_IMAGE_ADDED, _DataUtils.REQUEST_TYPE_POST, _DataUtils.CONTENT_TYPE_FORM, postData).then(function (response) { - //console.log("01 "+response.request['response']); - (0, _caretPos.position)(document.getElementById('edit-text-code'), caret); - var sel, range, pulled; - sel = window.getSelection(); //console.log(sel) - //console.log(note.message) - - if (sel.rangeCount) { - range = sel.getRangeAt(0); - pulled = sel.getRangeAt(0).toString(); - range.deleteContents(); - range.insertNode(document.createTextNode("![image alt text](" + JSON.parse(response.request['response']).url + " 'image title')")); - } - - self.refresh(); - }).catch(function (err) { - console.log(err); - }); - } - }]); - - return TextEditor; -}(); - -var _default = TextEditor; -exports.default = _default; -},{"./DataUtils":"tools/utilities/DataUtils.jsx","../events/DataEvent":"tools/events/DataEvent.jsx","./DateUtils":"tools/utilities/DateUtils.jsx","tiny-date-picker":"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js","caret-pos":"../../../../node_modules/caret-pos/lib/esm2015/main.js"}],"controllers/DashEntry.jsx":[function(require,module,exports) { +},{}],"controllers/DashEntry.jsx":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { @@ -2752,6 +2769,8 @@ var _EntryTasks = _interopRequireDefault(require("../tasks/EntryTasks")); var _TextEditor = _interopRequireDefault(require("../tools/utilities/TextEditor")); +var _tinyDatePicker = _interopRequireDefault(require("tiny-date-picker")); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } @@ -2775,6 +2794,13 @@ function () { this.uploadFiles; this.start(); this.editor = new _TextEditor.default(); + (0, _tinyDatePicker.default)(document.getElementById('entry-date'), { + mode: 'dp-below', + format: function format(date) { + //return date; + return self.dateUtils.getDate('origin', date); + } + }); } //-------------------------- // methods //-------------------------- @@ -2783,6 +2809,7 @@ function () { _createClass(Entry, [{ key: "start", value: function start() { + var self = this; new Ease.default().object({ targets: document.getElementById('loader'), duration: 300, @@ -2797,10 +2824,8 @@ function () { opacity: 1, easing: 'easeInOutQuad', complete: function complete() { - new _TextEffects.default().scramble(document.getElementById('the-title'), 50, function () { - if (document.getElementById('the-intro')) document.getElementById('the-intro').style.opacity = 1; - if (document.getElementById('blog-entry')) document.getElementById('blog-entry').style.opacity = 1; //START SEcTION - }); + if (document.getElementById('the-intro')) document.getElementById('the-intro').style.opacity = 1; + if (document.getElementById('blog-entry')) document.getElementById('blog-entry').style.opacity = 1; } }); } @@ -2821,10 +2846,9 @@ function () { f.preventDefault(); var edit = false; if (f.target.getAttribute('data-action') == 'blog-update') edit = true; - console.log('clicked'); new _EntryTasks.default().submitPost(edit, Entry.uploadFiles).then(function (response) { var note = JSON.parse(response['response']['request'].response); - console.log(note.message); + self.editor.notify(note.message); }).catch(function (err) { console.log(err); }); @@ -2909,7 +2933,7 @@ function () { exports.default = Entry; Entry.uploadFiles = []; -},{"../tools/utilities/DataUtils":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent":"tools/events/DataEvent.jsx","../tools/effects/Animate":"tools/effects/Animate.jsx","../tools/effects/TextEffects":"tools/effects/TextEffects.jsx","../tasks/EntryTasks":"tasks/EntryTasks.jsx","../tools/utilities/TextEditor":"tools/utilities/TextEditor.jsx"}],"controllers/DisplayManager.jsx":[function(require,module,exports) { +},{"../tools/utilities/DataUtils":"tools/utilities/DataUtils.jsx","../tools/events/DataEvent":"tools/events/DataEvent.jsx","../tools/effects/Animate":"tools/effects/Animate.jsx","../tools/effects/TextEffects":"tools/effects/TextEffects.jsx","../tasks/EntryTasks":"tasks/EntryTasks.jsx","../tools/utilities/TextEditor":"tools/utilities/TextEditor.jsx","tiny-date-picker":"../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js"}],"controllers/DisplayManager.jsx":[function(require,module,exports) { "use strict"; Object.defineProperty(exports, "__esModule", { diff --git a/themes/dash/assets/js/dash.min.map b/themes/dash/assets/js/dash.min.map index 1468b5e..2d5f7e3 100644 --- a/themes/dash/assets/js/dash.min.map +++ b/themes/dash/assets/js/dash.min.map @@ -1 +1 @@ -{"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","tools/utilities/DateUtils.jsx","../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js","../../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","DateUtils","time","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getTime","seconds","date","rawdate","day","String","getUTCDate","month","getUTCMonth","year","getUTCFullYear","hour","getUTCHours","minute","getUTCMinutes","getUTCSeconds","millisecond","getUTCMilliseconds","getTimezoneOffset","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","dateUtils","dp","mode","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;AACA;;;;;gCACYC,OAAOC,UAAU;AACzB,WAAKH,SAAL,CAAeI,GAAf,CAAmBF,KAAnB,KAA6B,KAAKF,SAAL,CAAeK,GAAf,CAAmBH,KAAnB,EAA0B,EAA1B,CAA7B;AACA,WAAKF,SAAL,CA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,aAAK,OAAL;AACI,iBAAOJ,MAAM,CAACI,IAAI,GAAG,GAAP,GAAaF,KAAb,GAAqB,GAArB,GAA2BH,GAA3B,GAAiC,GAAjC,GAAuCO,IAAvC,GAA8C,GAA9C,GAAoDE,MAApD,GAA6D,GAA7D,GAAmEZ,OAAnE,GAA6E,GAA7E,GAAmFe,WAAnF,GAAiG,GAAjG,GAAwG9E,MAAzG,CAAb;AACA;;AACJ;AACI,iBAAOmE,MAAM,CAACI,IAAI,GAAG,GAAP,GAAaF,KAAb,GAAqB,GAArB,GAA2BH,GAA5B,CAAb;AACA;AAfR;AAiBH,MAED;AACA;AACA;;;;;;;eAGWb;;;;;AC5Df;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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ceRoot":"../../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(/</g, '<').replace(/>/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(/�*39;/g, \"'\"); // PHP doesn't currently escape if more than one 0, but it should\n // string = string.replace(/'|�*27;/g, \"'\"); // This would also be useful here, but not a part of PHP\n }\n if (!noquotes) {\n string = string.replace(/"/g, '\"');\n }\n // Put this in last place to avoid escape being double-decoded\n string = string.replace(/&/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(\"created_date\", document.getElementById('option-date').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","class DateUtils {\n\n //--------------------------\n // constructor\n //--------------------------\n constructor() {}\n\n //--------------------------\n // methods\n //--------------------------\n getMKtime() {\n var time = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), new Date().getMinutes(), new Date().getSeconds(), 0).getTime() / 1000;\n return time;\n }\n\n convertMKtime(seconds) {\n var date = new Date(seconds * 1000);\n return date;\n }\n\n getDate(type, rawdate) {\n var day = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCDate()) : String(new Date().getUTCDate()));\n var month = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCMonth() + 1) : String(new Date().getUTCMonth() + 1));\n var year = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCFullYear()) : String(new Date().getUTCFullYear()));\n var hour = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCHours()) : String(new Date().getUTCHours()));\n var minute = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCMinutes()) : String(new Date().getUTCMinutes()));\n var seconds = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCSeconds()) : String(new Date().getUTCSeconds()));\n var millisecond = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCMilliseconds()) : String(new Date().getUTCMilliseconds()));\n var offset = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getTimezoneOffset()) : String(new Date().getTimezoneOffset()));\n if (day.length == 1)\n day = String(\"0\" + day);\n if (month.length == 1)\n month = String(\"0\" + month);\n offset = String(offset / 60);\n if (offset.length == 1)\n offset = String(\"0\" + offset);\n switch (type) {\n case \"day\":\n return day;\n break;\n case \"month\":\n return month;\n break;\n case \"year\":\n return year;\n break;\n case \"stamp\":\n return String(year + \"-\" + month + \"-\" + day + \" \" + hour + \":\" + minute + \":\" + seconds + \".\" + millisecond + \"-\" + (offset));\n break\n default:\n return String(year + \"-\" + month + \"-\" + day);\n break;\n }\n }\n\n //--------------------------\n // event handlers\n //--------------------------\n}\n\nexport default DateUtils","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.TinyDatePicker = factory());\n}(this, (function () { 'use strict';\n\n /**\n * @file A generic set of mutation-free date functions.\n */\n\n /**\n * now returns the current date without any time values\n *\n * @returns {Date}\n */\n function now() {\n var dt = new Date();\n dt.setHours(0, 0, 0, 0);\n return dt;\n }\n\n /**\n * dateEq compares two dates\n *\n * @param {Date} date1 the first date\n * @param {Date} date2 the second date\n * @returns {boolean}\n */\n function datesEq(date1, date2) {\n return (date1 && date1.toDateString()) === (date2 && date2.toDateString());\n }\n\n /**\n * shiftDay shifts the specified date by n days\n *\n * @param {Date} dt\n * @param {number} n\n * @returns {Date}\n */\n function shiftDay(dt, n) {\n dt = new Date(dt);\n dt.setDate(dt.getDate() + n);\n return dt;\n }\n\n /**\n * shiftMonth shifts the specified date by a specified number of months\n *\n * @param {Date} dt\n * @param {number} n\n * @param {boolean} wrap optional, if true, does not change year\n * value, defaults to false\n * @returns {Date}\n */\n function shiftMonth(dt, n, wrap) {\n dt = new Date(dt);\n\n var dayOfMonth = dt.getDate();\n var month = dt.getMonth() + n;\n\n dt.setDate(1);\n dt.setMonth(wrap ? (12 + month) % 12 : month);\n dt.setDate(dayOfMonth);\n\n // If dayOfMonth = 31, but the target month only has 30 or 29 or whatever...\n // head back to the max of the target month\n if (dt.getDate() < dayOfMonth) {\n dt.setDate(0);\n }\n\n return dt;\n }\n\n /**\n * shiftYear shifts the specified date by n years\n *\n * @param {Date} dt\n * @param {number} n\n * @returns {Date}\n */\n function shiftYear(dt, n) {\n dt = new Date(dt);\n dt.setFullYear(dt.getFullYear() + n);\n return dt;\n }\n\n /**\n * setYear changes the specified date to the specified year\n *\n * @param {Date} dt\n * @param {number} year\n */\n function setYear(dt, year) {\n dt = new Date(dt);\n dt.setFullYear(year);\n return dt;\n }\n\n /**\n * setMonth changes the specified date to the specified month\n *\n * @param {Date} dt\n * @param {number} month\n */\n function setMonth(dt, month) {\n return shiftMonth(dt, month - dt.getMonth());\n }\n\n /**\n * dateOrParse creates a function which, given a date or string, returns a date\n *\n * @param {function} parse the function used to parse strings\n * @returns {function}\n */\n function dateOrParse(parse) {\n return function (dt) {\n return dropTime(typeof dt === 'string' ? parse(dt) : dt);\n };\n }\n\n /**\n * constrainDate returns dt or min/max depending on whether dt is out of bounds (inclusive)\n *\n * @export\n * @param {Date} dt\n * @param {Date} min\n * @param {Date} max\n * @returns {Date}\n */\n function constrainDate(dt, min, max) {\n return (dt < min) ? min :\n (dt > max) ? max :\n dt;\n }\n\n function dropTime(dt) {\n dt = new Date(dt);\n dt.setHours(0, 0, 0, 0);\n return dt;\n }\n\n /**\n * @file Utility functions for function manipulation.\n */\n\n /**\n * bufferFn buffers calls to fn so they only happen every ms milliseconds\n *\n * @param {number} ms number of milliseconds\n * @param {function} fn the function to be buffered\n * @returns {function}\n */\n function bufferFn(ms, fn) {\n var timeout = undefined;\n return function () {\n clearTimeout(timeout);\n timeout = setTimeout(fn, ms);\n };\n }\n\n /**\n * noop is a function which does nothing at all.\n */\n function noop() { }\n\n /**\n * copy properties from object o2 to object o1.\n *\n * @params {Object} o1\n * @params {Object} o2\n * @returns {Object}\n */\n function cp() {\n var args = arguments;\n var o1 = args[0];\n for (var i = 1; i < args.length; ++i) {\n var o2 = args[i] || {};\n for (var key in o2) {\n o1[key] = o2[key];\n }\n }\n return o1;\n }\n\n /**\n * @file Responsible for sanitizing and creating date picker options.\n */\n\n var english = {\n days: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n today: 'Today',\n clear: 'Clear',\n close: 'Close',\n };\n\n /**\n * DatePickerOptions constructs a new date picker options object, overriding\n * default values with any values specified in opts.\n *\n * @param {DatePickerOptions} opts\n * @returns {DatePickerOptions}\n */\n function DatePickerOptions(opts) {\n opts = opts || {};\n opts = cp(defaults(), opts);\n var parse = dateOrParse(opts.parse);\n opts.lang = cp(english, opts.lang);\n opts.parse = parse;\n opts.inRange = makeInRangeFn(opts);\n opts.min = parse(opts.min || shiftYear(now(), -100));\n opts.max = parse(opts.max || shiftYear(now(), 100));\n opts.hilightedDate = opts.parse(opts.hilightedDate);\n\n return opts;\n }\n\n function defaults() {\n return {\n lang: english,\n\n // Possible values: dp-modal, dp-below, dp-permanent\n mode: 'dp-modal',\n\n // The date to hilight initially if the date picker has no\n // initial value.\n hilightedDate: now(),\n\n format: function (dt) {\n return (dt.getMonth() + 1) + '/' + dt.getDate() + '/' + dt.getFullYear();\n },\n\n parse: function (str) {\n var date = new Date(str);\n return isNaN(date) ? now() : date;\n },\n\n dateClass: function () { },\n\n inRange: function () {\n return true;\n }\n };\n }\n\n function makeInRangeFn(opts) {\n var inRange = opts.inRange; // Cache this version, and return a variant\n\n return function (dt, dp) {\n return inRange(dt, dp) && opts.min <= dt && opts.max >= dt;\n };\n }\n\n /**\n * @file Helper functions for dealing with dom elements.\n */\n\n var Key = {\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n enter: 13,\n esc: 27,\n };\n\n /**\n * on attaches an event handler to the specified element, and returns an\n * off function which can be used to remove the handler.\n *\n * @param {string} evt the name of the event to handle\n * @param {HTMLElement} el the element to attach to\n * @param {function} handler the event handler\n * @returns {function} the off function\n */\n function on(evt, el, handler) {\n el.addEventListener(evt, handler, true);\n\n return function () {\n el.removeEventListener(evt, handler, true);\n };\n }\n\n var CustomEvent = shimCustomEvent();\n\n function shimCustomEvent() {\n var CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function (event, params) {\n params = params || {bubbles: false, cancelable: false, detail: undefined};\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n }\n\n return CustomEvent;\n }\n\n /**\n * @file Manages the calendar / day-picker view.\n */\n\n var dayPicker = {\n onKeyDown: keyDown,\n onClick: {\n 'dp-day': selectDay,\n 'dp-next': gotoNextMonth,\n 'dp-prev': gotoPrevMonth,\n 'dp-today': selectToday,\n 'dp-clear': clear,\n 'dp-close': close,\n 'dp-cal-month': showMonthPicker,\n 'dp-cal-year': showYearPicker,\n },\n render: render\n };\n\n /**\n * view renders the calendar (day picker) as an HTML string.\n *\n * @param {DatePickerContext} context the date picker being rendered\n * @returns {string}\n */\n function render(dp) {\n var opts = dp.opts;\n var lang = opts.lang;\n var state = dp.state;\n var dayNames = lang.days;\n var dayOffset = opts.dayOffset || 0;\n var selectedDate = state.selectedDate;\n var hilightedDate = state.hilightedDate;\n var hilightedMonth = hilightedDate.getMonth();\n var today = now().getTime();\n\n return (\n '
' +\n '
' +\n '' +\n '' +\n '' +\n '' +\n '
' +\n '
' +\n dayNames.map(function (name, i) {\n return (\n '' + dayNames[(i + dayOffset) % dayNames.length] + ''\n );\n }).join('') +\n mapDays(hilightedDate, dayOffset, function (date) {\n var isNotInMonth = date.getMonth() !== hilightedMonth;\n var isDisabled = !opts.inRange(date);\n var isToday = date.getTime() === today;\n var className = 'dp-day';\n className += (isNotInMonth ? ' dp-edge-day' : '');\n className += (datesEq(date, hilightedDate) ? ' dp-current' : '');\n className += (datesEq(date, selectedDate) ? ' dp-selected' : '');\n className += (isDisabled ? ' dp-day-disabled' : '');\n className += (isToday ? ' dp-day-today' : '');\n className += ' ' + opts.dateClass(date, dp);\n\n return (\n ''\n );\n }) +\n '
' +\n '
' +\n '' +\n '' +\n '' +\n '
' +\n '
'\n );\n }\n\n /**\n * keyDown handles the key down event for the day-picker\n *\n * @param {Event} e\n * @param {DatePickerContext} dp\n */\n function keyDown(e, dp) {\n var key = e.keyCode;\n var shiftBy =\n (key === Key.left) ? -1 :\n (key === Key.right) ? 1 :\n (key === Key.up) ? -7 :\n (key === Key.down) ? 7 :\n 0;\n\n if (key === Key.esc) {\n dp.close();\n } else if (shiftBy) {\n e.preventDefault();\n dp.setState({\n hilightedDate: shiftDay(dp.state.hilightedDate, shiftBy)\n });\n }\n }\n\n function selectToday(e, dp) {\n dp.setState({\n selectedDate: now(),\n });\n }\n\n function clear(e, dp) {\n dp.setState({\n selectedDate: null,\n });\n }\n\n function close(e, dp) {\n dp.close();\n }\n\n function showMonthPicker(e, dp) {\n dp.setState({\n view: 'month'\n });\n }\n\n function showYearPicker(e, dp) {\n dp.setState({\n view: 'year'\n });\n }\n\n function gotoNextMonth(e, dp) {\n var hilightedDate = dp.state.hilightedDate;\n dp.setState({\n hilightedDate: shiftMonth(hilightedDate, 1)\n });\n }\n\n function gotoPrevMonth(e, dp) {\n var hilightedDate = dp.state.hilightedDate;\n dp.setState({\n hilightedDate: shiftMonth(hilightedDate, -1)\n });\n }\n\n function selectDay(e, dp) {\n dp.setState({\n selectedDate: new Date(parseInt(e.target.getAttribute('data-date'))),\n });\n }\n\n function mapDays(currentDate, dayOffset, fn) {\n var result = '';\n var iter = new Date(currentDate);\n iter.setDate(1);\n iter.setDate(1 - iter.getDay() + dayOffset);\n\n // If we are showing monday as the 1st of the week,\n // and the monday is the 2nd of the month, the sunday won't\n // show, so we need to shift backwards\n if (dayOffset && iter.getDate() === dayOffset + 1) {\n iter.setDate(dayOffset - 6);\n }\n\n // We are going to have 6 weeks always displayed to keep a consistent\n // calendar size\n for (var day = 0; day < (6 * 7); ++day) {\n result += fn(iter);\n iter.setDate(iter.getDate() + 1);\n }\n\n return result;\n }\n\n /**\n * @file Manages the month-picker view.\n */\n\n var monthPicker = {\n onKeyDown: keyDown$1,\n onClick: {\n 'dp-month': onChooseMonth\n },\n render: render$1\n };\n\n function onChooseMonth(e, dp) {\n dp.setState({\n hilightedDate: setMonth(dp.state.hilightedDate, parseInt(e.target.getAttribute('data-month'))),\n view: 'day',\n });\n }\n\n /**\n * render renders the month picker as an HTML string\n *\n * @param {DatePickerContext} dp the date picker context\n * @returns {string}\n */\n function render$1(dp) {\n var opts = dp.opts;\n var lang = opts.lang;\n var months = lang.months;\n var currentDate = dp.state.hilightedDate;\n var currentMonth = currentDate.getMonth();\n\n return (\n '
' +\n months.map(function (month, i) {\n var className = 'dp-month';\n className += (currentMonth === i ? ' dp-current' : '');\n\n return (\n ''\n );\n }).join('') +\n '
'\n );\n }\n\n /**\n * keyDown handles keydown events that occur in the month picker\n *\n * @param {Event} e\n * @param {DatePickerContext} dp\n */\n function keyDown$1(e, dp) {\n var key = e.keyCode;\n var shiftBy =\n (key === Key.left) ? -1 :\n (key === Key.right) ? 1 :\n (key === Key.up) ? -3 :\n (key === Key.down) ? 3 :\n 0;\n\n if (key === Key.esc) {\n dp.setState({\n view: 'day',\n });\n } else if (shiftBy) {\n e.preventDefault();\n dp.setState({\n hilightedDate: shiftMonth(dp.state.hilightedDate, shiftBy, true)\n });\n }\n }\n\n /**\n * @file Manages the year-picker view.\n */\n\n var yearPicker = {\n render: render$2,\n onKeyDown: keyDown$2,\n onClick: {\n 'dp-year': onChooseYear\n },\n };\n\n /**\n * view renders the year picker as an HTML string.\n *\n * @param {DatePickerContext} dp the date picker context\n * @returns {string}\n */\n function render$2(dp) {\n var state = dp.state;\n var currentYear = state.hilightedDate.getFullYear();\n var selectedYear = state.selectedDate.getFullYear();\n\n return (\n '
' +\n mapYears(dp, function (year) {\n var className = 'dp-year';\n className += (year === currentYear ? ' dp-current' : '');\n className += (year === selectedYear ? ' dp-selected' : '');\n\n return (\n ''\n );\n }) +\n '
'\n );\n }\n\n function onChooseYear(e, dp) {\n dp.setState({\n hilightedDate: setYear(dp.state.hilightedDate, parseInt(e.target.getAttribute('data-year'))),\n view: 'day',\n });\n }\n\n function keyDown$2(e, dp) {\n var key = e.keyCode;\n var opts = dp.opts;\n var shiftBy =\n (key === Key.left || key === Key.up) ? 1 :\n (key === Key.right || key === Key.down) ? -1 :\n 0;\n\n if (key === Key.esc) {\n dp.setState({\n view: 'day',\n });\n } else if (shiftBy) {\n e.preventDefault();\n var shiftedYear = shiftYear(dp.state.hilightedDate, shiftBy);\n\n dp.setState({\n hilightedDate: constrainDate(shiftedYear, opts.min, opts.max),\n });\n }\n }\n\n function mapYears(dp, fn) {\n var result = '';\n var max = dp.opts.max.getFullYear();\n\n for (var i = max; i >= dp.opts.min.getFullYear(); --i) {\n result += fn(i);\n }\n\n return result;\n }\n\n /**\n * @file Defines the base date picker behavior, overridden by various modes.\n */\n\n var views = {\n day: dayPicker,\n year: yearPicker,\n month: monthPicker\n };\n\n function BaseMode(input, emit, opts) {\n var detatchInputEvents; // A function that detaches all events from the input\n var closing = false; // A hack to prevent calendar from re-opening when closing.\n var selectedDate; // The currently selected date\n var dp = {\n // The root DOM element for the date picker, initialized on first open.\n el: undefined,\n opts: opts,\n shouldFocusOnBlur: true,\n shouldFocusOnRender: true,\n state: initialState(),\n adjustPosition: noop,\n containerHTML: '
',\n\n attachToDom: function () {\n document.body.appendChild(dp.el);\n },\n\n updateInput: function (selectedDate) {\n var e = new CustomEvent('change', {bubbles: true});\n e.simulated = true;\n input.value = selectedDate ? opts.format(selectedDate) : '';\n input.dispatchEvent(e);\n },\n\n computeSelectedDate: function () {\n return opts.parse(input.value);\n },\n\n currentView: function() {\n return views[dp.state.view];\n },\n\n open: function () {\n if (closing) {\n return;\n }\n\n if (!dp.el) {\n dp.el = createContainerElement(opts, dp.containerHTML);\n attachContainerEvents(dp);\n }\n\n selectedDate = constrainDate(dp.computeSelectedDate(), opts.min, opts.max);\n dp.state.hilightedDate = selectedDate || opts.hilightedDate;\n dp.state.view = 'day';\n\n dp.attachToDom();\n dp.render();\n\n emit('open');\n },\n\n isVisible: function () {\n return !!dp.el && !!dp.el.parentNode;\n },\n\n hasFocus: function () {\n var focused = document.activeElement;\n return dp.el &&\n dp.el.contains(focused) &&\n focused.className.indexOf('dp-focuser') < 0;\n },\n\n shouldHide: function () {\n return dp.isVisible();\n },\n\n close: function (becauseOfBlur) {\n var el = dp.el;\n\n if (!dp.isVisible()) {\n return;\n }\n\n if (el) {\n var parent = el.parentNode;\n parent && parent.removeChild(el);\n }\n\n closing = true;\n\n if (becauseOfBlur && dp.shouldFocusOnBlur) {\n focusInput(input);\n }\n\n // When we close, the input often gains refocus, which\n // can then launch the date picker again, so we buffer\n // a bit and don't show the date picker within N ms of closing\n setTimeout(function() {\n closing = false;\n }, 100);\n\n emit('close');\n },\n\n destroy: function () {\n dp.close();\n detatchInputEvents();\n },\n\n render: function () {\n if (!dp.el) {\n return;\n }\n\n var hadFocus = dp.hasFocus();\n var html = dp.currentView().render(dp);\n html && (dp.el.firstChild.innerHTML = html);\n\n dp.adjustPosition();\n\n if (hadFocus || dp.shouldFocusOnRender) {\n focusCurrent(dp);\n }\n },\n\n // Conceptually similar to setState in React, updates\n // the view state and re-renders.\n setState: function (state) {\n for (var key in state) {\n dp.state[key] = state[key];\n }\n\n emit('statechange');\n dp.render();\n },\n };\n\n detatchInputEvents = attachInputEvents(input, dp);\n\n // Builds the initial view state\n // selectedDate is a special case and causes changes to hilightedDate\n // hilightedDate is set on open, so remains undefined initially\n // view is the current view (day, month, year)\n function initialState() {\n return {\n get selectedDate() {\n return selectedDate;\n },\n set selectedDate(dt) {\n if (dt && !opts.inRange(dt)) {\n return;\n }\n\n if (dt) {\n selectedDate = new Date(dt);\n dp.state.hilightedDate = selectedDate;\n } else {\n selectedDate = dt;\n }\n\n dp.updateInput(selectedDate);\n emit('select');\n dp.close();\n },\n view: 'day',\n };\n }\n\n return dp;\n }\n\n function createContainerElement(opts, containerHTML) {\n var el = document.createElement('div');\n\n el.className = opts.mode;\n el.innerHTML = containerHTML;\n\n return el;\n }\n\n function attachInputEvents(input, dp) {\n var bufferShow = bufferFn(5, function () {\n if (dp.shouldHide()) {\n dp.close();\n } else {\n dp.open();\n }\n });\n\n var off = [\n on('blur', input, bufferFn(150, function () {\n if (!dp.hasFocus()) {\n dp.close(true);\n }\n })),\n\n on('mousedown', input, function () {\n if (input === document.activeElement) {\n bufferShow();\n }\n }),\n\n on('focus', input, bufferShow),\n\n on('input', input, function (e) {\n var date = dp.opts.parse(e.target.value);\n isNaN(date) || dp.setState({\n hilightedDate: date\n });\n }),\n ];\n\n // Unregister all events that were registered above.\n return function() {\n off.forEach(function (f) {\n f();\n });\n };\n }\n\n function focusCurrent(dp) {\n var current = dp.el.querySelector('.dp-current');\n return current && current.focus();\n }\n\n function attachContainerEvents(dp) {\n var el = dp.el;\n var calEl = el.querySelector('.dp');\n\n // Hack to get iOS to show active CSS states\n el.ontouchstart = noop;\n\n function onClick(e) {\n e.target.className.split(' ').forEach(function(evt) {\n var handler = dp.currentView().onClick[evt];\n handler && handler(e, dp);\n });\n }\n\n // The calender fires a blur event *every* time we redraw\n // this means we need to buffer the blur event to see if\n // it still has no focus after redrawing, and only then\n // do we return focus to the input. A possible other approach\n // would be to set context.redrawing = true on redraw and\n // set it to false in the blur event.\n on('blur', calEl, bufferFn(150, function () {\n if (!dp.hasFocus()) {\n dp.close(true);\n }\n }));\n\n on('keydown', el, function (e) {\n if (e.keyCode === Key.enter) {\n onClick(e);\n } else {\n dp.currentView().onKeyDown(e, dp);\n }\n });\n\n // If the user clicks in non-focusable space, but\n // still within the date picker, we don't want to\n // hide, so we need to hack some things...\n on('mousedown', calEl, function (e) {\n e.target.focus && e.target.focus(); // IE hack\n if (document.activeElement !== e.target) {\n e.preventDefault();\n focusCurrent(dp);\n }\n });\n\n on('click', el, onClick);\n }\n\n function focusInput(input) {\n // When the modal closes, we need to focus the original input so the\n // user can continue tabbing from where they left off.\n input.focus();\n\n // iOS zonks out if we don't blur the input, so...\n if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {\n input.blur();\n }\n }\n\n /**\n * @file Defines the modal date picker behavior.\n */\n\n function ModalMode(input, emit, opts) {\n var dp = BaseMode(input, emit, opts);\n\n // In modal mode, users really shouldn't be able to type in\n // the input, as all input is done via the calendar.\n input.readonly = true;\n\n // In modal mode, we need to know when the user has tabbed\n // off the end of the calendar, and set focus to the original\n // input. To do this, we add a special element to the DOM.\n // When the user tabs off the bottom of the calendar, they\n // will tab onto this element.\n dp.containerHTML += '.';\n\n return dp;\n }\n\n /**\n * @file Defines the dropdown date picker behavior.\n */\n\n function DropdownMode(input, emit, opts) {\n var dp = BaseMode(input, emit, opts);\n\n dp.shouldFocusOnBlur = false;\n\n Object.defineProperty(dp, 'shouldFocusOnRender', {\n get: function() {\n return input !== document.activeElement;\n }\n });\n\n dp.adjustPosition = function () {\n autoPosition(input, dp);\n };\n\n return dp;\n }\n\n function autoPosition(input, dp) {\n var inputPos = input.getBoundingClientRect();\n var win = window;\n\n adjustCalY(dp, inputPos, win);\n adjustCalX(dp, inputPos, win);\n\n dp.el.style.visibility = '';\n }\n\n function adjustCalX(dp, inputPos, win) {\n var cal = dp.el;\n var scrollLeft = win.pageXOffset;\n var inputLeft = inputPos.left + scrollLeft;\n var maxRight = win.innerWidth + scrollLeft;\n var offsetWidth = cal.offsetWidth;\n var calRight = inputLeft + offsetWidth;\n var shiftedLeft = maxRight - offsetWidth;\n var left = calRight > maxRight && shiftedLeft > 0 ? shiftedLeft : inputLeft;\n\n cal.style.left = left + 'px';\n }\n\n function adjustCalY(dp, inputPos, win) {\n var cal = dp.el;\n var scrollTop = win.pageYOffset;\n var inputTop = scrollTop + inputPos.top;\n var calHeight = cal.offsetHeight;\n var belowTop = inputTop + inputPos.height + 8;\n var aboveTop = inputTop - calHeight - 8;\n var isAbove = (aboveTop > 0 && belowTop + calHeight > scrollTop + win.innerHeight);\n var top = isAbove ? aboveTop : belowTop;\n\n if (cal.classList) {\n cal.classList.toggle('dp-is-above', isAbove);\n cal.classList.toggle('dp-is-below', !isAbove);\n }\n cal.style.top = top + 'px';\n }\n\n /**\n * @file Defines the permanent date picker behavior.\n */\n\n function PermanentMode(root, emit, opts) {\n var dp = BaseMode(root, emit, opts);\n\n dp.close = noop;\n dp.destroy = noop;\n dp.updateInput = noop;\n dp.shouldFocusOnRender = opts.shouldFocusOnRender;\n\n dp.computeSelectedDate = function () {\n return opts.hilightedDate;\n };\n\n dp.attachToDom = function () {\n root.appendChild(dp.el);\n };\n\n dp.open();\n\n return dp;\n }\n\n /**\n * @file Defines the various date picker modes (modal, dropdown, permanent)\n */\n\n function Mode(input, emit, opts) {\n input = input && input.tagName ? input : document.querySelector(input);\n\n if (opts.mode === 'dp-modal') {\n return ModalMode(input, emit, opts);\n }\n\n if (opts.mode === 'dp-below') {\n return DropdownMode(input, emit, opts);\n }\n\n if (opts.mode === 'dp-permanent') {\n return PermanentMode(input, emit, opts);\n }\n }\n\n /**\n * @file Defines simple event emitter behavior.\n */\n\n /**\n * Emitter constructs a new emitter object which has on/off methods.\n *\n * @returns {EventEmitter}\n */\n function Emitter() {\n var handlers = {};\n\n function onOne(name, handler) {\n (handlers[name] = (handlers[name] || [])).push(handler);\n }\n\n function onMany(fns) {\n for (var name in fns) {\n onOne(name, fns[name]);\n }\n }\n\n return {\n on: function (name, handler) {\n if (handler) {\n onOne(name, handler);\n } else {\n onMany(name);\n }\n\n return this;\n },\n\n emit: function (name, arg) {\n (handlers[name] || []).forEach(function (handler) {\n handler(name, arg);\n });\n },\n\n off: function (name, handler) {\n if (!name) {\n handlers = {};\n } else if (!handler) {\n handlers[name] = [];\n } else {\n handlers[name] = (handlers[name] || []).filter(function (h) {\n return h !== handler;\n });\n }\n\n return this;\n }\n };\n }\n\n /**\n * @file The root date picker file, defines public exports for the library.\n */\n\n /**\n * The date picker language configuration\n * @typedef {Object} LangOptions\n * @property {Array.} [days] - Days of the week\n * @property {Array.} [months] - Months of the year\n * @property {string} today - The label for the 'today' button\n * @property {string} close - The label for the 'close' button\n * @property {string} clear - The label for the 'clear' button\n */\n\n /**\n * The configuration options for a date picker.\n *\n * @typedef {Object} DatePickerOptions\n * @property {LangOptions} [lang] - Configures the label text, defaults to English\n * @property {('dp-modal'|'dp-below'|'dp-permanent')} [mode] - The date picker mode, defaults to 'dp-modal'\n * @property {(string|Date)} [hilightedDate] - The date to hilight if no date is selected\n * @property {function(string|Date):Date} [parse] - Parses a date, the complement of the \"format\" function\n * @property {function(Date):string} [format] - Formats a date for displaying to user\n * @property {function(Date):string} [dateClass] - Associates a custom CSS class with a date\n * @property {function(Date):boolean} [inRange] - Indicates whether or not a date is selectable\n * @property {(string|Date)} [min] - The minimum selectable date (inclusive, default 100 years ago)\n * @property {(string|Date)} [max] - The maximum selectable date (inclusive, default 100 years from now)\n */\n\n /**\n * The state values for the date picker\n *\n * @typedef {Object} DatePickerState\n * @property {string} view - The current view 'day' | 'month' | 'year'\n * @property {Date} selectedDate - The date which has been selected by the user\n * @property {Date} hilightedDate - The date which is currently hilighted / active\n */\n\n /**\n * An instance of TinyDatePicker\n *\n * @typedef {Object} DatePicker\n * @property {DatePickerState} state - The values currently displayed.\n * @property {function} on - Adds an event handler\n * @property {function} off - Removes an event handler\n * @property {function} setState - Changes the current state of the date picker\n * @property {function} open - Opens the date picker\n * @property {function} close - Closes the date picker\n * @property {function} destroy - Destroys the date picker (removing all handlers from the input, too)\n */\n\n /**\n * TinyDatePicker constructs a new date picker for the specified input\n *\n * @param {HTMLElement | string} input The input or CSS selector associated with the datepicker\n * @param {DatePickerOptions} opts The options for initializing the date picker\n * @returns {DatePicker}\n */\n function TinyDatePicker(input, opts) {\n var emitter = Emitter();\n var options = DatePickerOptions(opts);\n var mode = Mode(input, emit, options);\n var me = {\n get state() {\n return mode.state;\n },\n on: emitter.on,\n off: emitter.off,\n setState: mode.setState,\n open: mode.open,\n close: mode.close,\n destroy: mode.destroy,\n };\n\n function emit(evt) {\n emitter.emit(evt, me);\n }\n\n return me;\n }\n\n return TinyDatePicker;\n\n})));\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,'
');\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 = `${format(startRange)}`;\n html += '|';\n html += `${format(endRange)}`;\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 DateUtils from './DateUtils';\nimport TinyDatePicker from 'tiny-date-picker';\nimport {\n\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.dateUtils = new DateUtils();\n this.url = '';\n let self = this;\n\n this.dp = TinyDatePicker('input');\n TinyDatePicker(document.getElementById('option-date'), {\n mode: 'dp-below',\n format(date) {\n //return date;\n return self.dateUtils.getDate('origin', date);\n }\n });\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(\"\" + pulled + \"\"));\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 ''\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 ''\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"]} \ No newline at end of file +{"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","tools/utilities/DateUtils.jsx","../../src/mirror.js","../../src/utils.js","../../src/input.js","../../src/editable.js","../../src/main.js","tools/utilities/TextEditor.jsx","../../../../node_modules/tiny-date-picker/dist/tiny-date-picker.js","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","POST_ERROR","POST_ADDED","POST_UPDATED","POST_DELETED","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","catch","err","valid","entry_form","title","price","description","DateUtils","time","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","getTime","seconds","date","rawdate","day","String","getUTCDate","month","getUTCMonth","year","getUTCFullYear","hour","getUTCHours","minute","getUTCMinutes","getUTCSeconds","millisecond","getUTCMilliseconds","getTimezoneOffset","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","dateUtils","addEventListener","f","fixLimit","refresh","editorButtons","querySelectorAll","handleEditorOption","handlePostImageAdd","click","spiffed","highlight","innerText","temp","classList","add","remove","setTimeout","preventDefault","pulled","deleteContents","target","id","console","log","stopPropagation","parse","Entry","reframe","editor","mode","object","targets","duration","opacity","easing","display","visibility","handleDragOver","handleDrop","handleClicked","submitPost","note","notify","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;AACA;;;;;gCACYC,OAAOC,UAAU;AACzB,WAAKH,SAAL,CAAeI,GAAf,CAAmBF,KAAnB,KAA6B,KAAKF,SAAL,CAAeK,GAAf,CAAmBH,KAAnB,EAA0B,EAA1B,CAA7B;AACA,WAAKF,SAAL,CAAeM,GAAf,CAAmBJ,KAAnB,EAA0BK,IAA1B,CAA+BJ,QAA/B;AACH;;;mCAEcD,OAAOC,UAAU;AAC5B,UAAIK,UAAU,GAAG,SAAbA,UAAa,CAASC,GAAT,EAAc;AAC3B,eAAO,OAAOA,GAAP,IAAc,UAAd,IAA4B,KAAnC;AACH,OAFD;;AAIA,UAAIT,SAAS,GAAG,KAAKA,SAAL,CAAeM,GAAf,CAAmBJ,KAAnB,CAAhB;AAAA,UACIQ,KADJ;;AAG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EAeOjJ,KAfP,CAea,UAACC,GAAD,EAAS;AACdmK,QAAAA,OAAO,CAACC,GAAR,CAAYpK,GAAZ;AACH,OAjBL;AAmBH;;;;;;eAEUwI;;;;;ACzKf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChrCA;;AAQA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;;;IAGM+B;;;AACF;AACA;AACA;AACA,mBAAc;AAAA;;AACVC,IAAAA,OAAO,CAAC,QAAD,CAAP;AACA,SAAK5L,WAAL;AACA,SAAKjB,KAAL;AACA,SAAK8M,MAAL,GAAc,IAAIjC,mBAAJ,EAAd;AAEA,iCAA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,WAAKwE,SAAL,CAAe/D,OAAf,CAAuB,iCAAvB,EAA0DjB,SAAS,CAACb,eAApE,EACKyD,IADL,CACU,UAACZ,QAAD,EAAc;AAChB,QAAA,KAAI,CAACqI,QAAL,GAAgBzI,IAAI,CAACgP,KAAL,CAAW5O,QAAQ,CAAC,SAAD,CAAR,CAAoBA,QAA/B,CAAhB;;AACA,QAAA,KAAI,CAACiC,KAAL,GAFgB,CAGhB;;AAEH,OANL,EAOKoC,KAPL,CAOW,UAACC,GAAD,EAAS,CACZ;AACH,OATL;AAUH,MAED;AACA;AACA;;;;;;;;;;;ACzCJ;;;;AAEAhE,QAAQ,CAAC6M,gBAAT,CAA0B,kBAA1B,EAA8C,YAAW;AAErD,MAAIiE,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';\nexport const POST_ERROR = 'postError';\nexport const POST_ADDED = 'postAdded';\nexport const POST_UPDATED = 'postUpdated';\nexport const POST_DELETED = '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(/</g, '<').replace(/>/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(/�*39;/g, \"'\"); // PHP doesn't currently escape if more than one 0, but it should\n // string = string.replace(/'|�*27;/g, \"'\"); // This would also be useful here, but not a part of PHP\n }\n if (!noquotes) {\n string = string.replace(/"/g, '\"');\n }\n // Put this in last place to avoid escape being double-decoded\n string = string.replace(/&/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(\"origin_date\", document.getElementById('entry-date').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 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","class DateUtils {\n\n //--------------------------\n // constructor\n //--------------------------\n constructor() {}\n\n //--------------------------\n // methods\n //--------------------------\n getMKtime() {\n var time = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), new Date().getHours(), new Date().getMinutes(), new Date().getSeconds(), 0).getTime() / 1000;\n return time;\n }\n\n convertMKtime(seconds) {\n var date = new Date(seconds * 1000);\n return date;\n }\n\n getDate(type, rawdate) {\n var day = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCDate()) : String(new Date().getUTCDate()));\n var month = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCMonth() + 1) : String(new Date().getUTCMonth() + 1));\n var year = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCFullYear()) : String(new Date().getUTCFullYear()));\n var hour = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCHours()) : String(new Date().getUTCHours()));\n var minute = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCMinutes()) : String(new Date().getUTCMinutes()));\n var seconds = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCSeconds()) : String(new Date().getUTCSeconds()));\n var millisecond = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getUTCMilliseconds()) : String(new Date().getUTCMilliseconds()));\n var offset = ((rawdate != null || rawdate != '') ? String(new Date(rawdate).getTimezoneOffset()) : String(new Date().getTimezoneOffset()));\n if (day.length == 1)\n day = String(\"0\" + day);\n if (month.length == 1)\n month = String(\"0\" + month);\n offset = String(offset / 60);\n if (offset.length == 1)\n offset = String(\"0\" + offset);\n switch (type) {\n case \"day\":\n return day;\n break;\n case \"month\":\n return month;\n break;\n case \"year\":\n return year;\n break;\n case \"stamp\":\n return String(year + \"-\" + month + \"-\" + day + \" \" + hour + \":\" + minute + \":\" + seconds + \".\" + millisecond + \"-\" + (offset));\n break\n default:\n return String(year + \"-\" + month + \"-\" + day);\n break;\n }\n }\n\n //--------------------------\n // event handlers\n //--------------------------\n}\n\nexport default DateUtils","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,'
');\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 = `${format(startRange)}`;\n html += '|';\n html += `${format(endRange)}`;\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 DateUtils from './DateUtils';\nimport {\n\n position,\n offset\n} from 'caret-pos';\n\nimport Animate from '../effects/Animate';\n\nclass TextEditor {\n\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n this.setInputs();\n hljs.initHighlightingOnLoad();\n this.dataUtils = new DataUtils();\n this.dateUtils = new DateUtils();\n this.url = '';\n let self = this;\n\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 notify(type) {\n switch (type) {\n case DataEvent.POST_UPDATED:\n document.getElementById('submit-save').classList.add('icon-hide');\n document.getElementById('submit-good').classList.remove('icon-hide');\n document.getElementById('post-sumbit-btn').classList.remove('submit-start');\n document.getElementById('post-sumbit-btn').classList.add('submit-cool');\n setTimeout(f => {\n document.getElementById('submit-save').classList.remove('icon-hide');\n document.getElementById('submit-good').classList.add('icon-hide');\n document.getElementById('post-sumbit-btn').classList.add('submit-start');\n document.getElementById('post-sumbit-btn').classList.remove('submit-cool');\n }, 2000);\n\n break;\n }\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(\"\" + pulled + \"\"));\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","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global.TinyDatePicker = factory());\n}(this, (function () { 'use strict';\n\n /**\n * @file A generic set of mutation-free date functions.\n */\n\n /**\n * now returns the current date without any time values\n *\n * @returns {Date}\n */\n function now() {\n var dt = new Date();\n dt.setHours(0, 0, 0, 0);\n return dt;\n }\n\n /**\n * dateEq compares two dates\n *\n * @param {Date} date1 the first date\n * @param {Date} date2 the second date\n * @returns {boolean}\n */\n function datesEq(date1, date2) {\n return (date1 && date1.toDateString()) === (date2 && date2.toDateString());\n }\n\n /**\n * shiftDay shifts the specified date by n days\n *\n * @param {Date} dt\n * @param {number} n\n * @returns {Date}\n */\n function shiftDay(dt, n) {\n dt = new Date(dt);\n dt.setDate(dt.getDate() + n);\n return dt;\n }\n\n /**\n * shiftMonth shifts the specified date by a specified number of months\n *\n * @param {Date} dt\n * @param {number} n\n * @param {boolean} wrap optional, if true, does not change year\n * value, defaults to false\n * @returns {Date}\n */\n function shiftMonth(dt, n, wrap) {\n dt = new Date(dt);\n\n var dayOfMonth = dt.getDate();\n var month = dt.getMonth() + n;\n\n dt.setDate(1);\n dt.setMonth(wrap ? (12 + month) % 12 : month);\n dt.setDate(dayOfMonth);\n\n // If dayOfMonth = 31, but the target month only has 30 or 29 or whatever...\n // head back to the max of the target month\n if (dt.getDate() < dayOfMonth) {\n dt.setDate(0);\n }\n\n return dt;\n }\n\n /**\n * shiftYear shifts the specified date by n years\n *\n * @param {Date} dt\n * @param {number} n\n * @returns {Date}\n */\n function shiftYear(dt, n) {\n dt = new Date(dt);\n dt.setFullYear(dt.getFullYear() + n);\n return dt;\n }\n\n /**\n * setYear changes the specified date to the specified year\n *\n * @param {Date} dt\n * @param {number} year\n */\n function setYear(dt, year) {\n dt = new Date(dt);\n dt.setFullYear(year);\n return dt;\n }\n\n /**\n * setMonth changes the specified date to the specified month\n *\n * @param {Date} dt\n * @param {number} month\n */\n function setMonth(dt, month) {\n return shiftMonth(dt, month - dt.getMonth());\n }\n\n /**\n * dateOrParse creates a function which, given a date or string, returns a date\n *\n * @param {function} parse the function used to parse strings\n * @returns {function}\n */\n function dateOrParse(parse) {\n return function (dt) {\n return dropTime(typeof dt === 'string' ? parse(dt) : dt);\n };\n }\n\n /**\n * constrainDate returns dt or min/max depending on whether dt is out of bounds (inclusive)\n *\n * @export\n * @param {Date} dt\n * @param {Date} min\n * @param {Date} max\n * @returns {Date}\n */\n function constrainDate(dt, min, max) {\n return (dt < min) ? min :\n (dt > max) ? max :\n dt;\n }\n\n function dropTime(dt) {\n dt = new Date(dt);\n dt.setHours(0, 0, 0, 0);\n return dt;\n }\n\n /**\n * @file Utility functions for function manipulation.\n */\n\n /**\n * bufferFn buffers calls to fn so they only happen every ms milliseconds\n *\n * @param {number} ms number of milliseconds\n * @param {function} fn the function to be buffered\n * @returns {function}\n */\n function bufferFn(ms, fn) {\n var timeout = undefined;\n return function () {\n clearTimeout(timeout);\n timeout = setTimeout(fn, ms);\n };\n }\n\n /**\n * noop is a function which does nothing at all.\n */\n function noop() { }\n\n /**\n * copy properties from object o2 to object o1.\n *\n * @params {Object} o1\n * @params {Object} o2\n * @returns {Object}\n */\n function cp() {\n var args = arguments;\n var o1 = args[0];\n for (var i = 1; i < args.length; ++i) {\n var o2 = args[i] || {};\n for (var key in o2) {\n o1[key] = o2[key];\n }\n }\n return o1;\n }\n\n /**\n * @file Responsible for sanitizing and creating date picker options.\n */\n\n var english = {\n days: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n today: 'Today',\n clear: 'Clear',\n close: 'Close',\n };\n\n /**\n * DatePickerOptions constructs a new date picker options object, overriding\n * default values with any values specified in opts.\n *\n * @param {DatePickerOptions} opts\n * @returns {DatePickerOptions}\n */\n function DatePickerOptions(opts) {\n opts = opts || {};\n opts = cp(defaults(), opts);\n var parse = dateOrParse(opts.parse);\n opts.lang = cp(english, opts.lang);\n opts.parse = parse;\n opts.inRange = makeInRangeFn(opts);\n opts.min = parse(opts.min || shiftYear(now(), -100));\n opts.max = parse(opts.max || shiftYear(now(), 100));\n opts.hilightedDate = opts.parse(opts.hilightedDate);\n\n return opts;\n }\n\n function defaults() {\n return {\n lang: english,\n\n // Possible values: dp-modal, dp-below, dp-permanent\n mode: 'dp-modal',\n\n // The date to hilight initially if the date picker has no\n // initial value.\n hilightedDate: now(),\n\n format: function (dt) {\n return (dt.getMonth() + 1) + '/' + dt.getDate() + '/' + dt.getFullYear();\n },\n\n parse: function (str) {\n var date = new Date(str);\n return isNaN(date) ? now() : date;\n },\n\n dateClass: function () { },\n\n inRange: function () {\n return true;\n }\n };\n }\n\n function makeInRangeFn(opts) {\n var inRange = opts.inRange; // Cache this version, and return a variant\n\n return function (dt, dp) {\n return inRange(dt, dp) && opts.min <= dt && opts.max >= dt;\n };\n }\n\n /**\n * @file Helper functions for dealing with dom elements.\n */\n\n var Key = {\n left: 37,\n up: 38,\n right: 39,\n down: 40,\n enter: 13,\n esc: 27,\n };\n\n /**\n * on attaches an event handler to the specified element, and returns an\n * off function which can be used to remove the handler.\n *\n * @param {string} evt the name of the event to handle\n * @param {HTMLElement} el the element to attach to\n * @param {function} handler the event handler\n * @returns {function} the off function\n */\n function on(evt, el, handler) {\n el.addEventListener(evt, handler, true);\n\n return function () {\n el.removeEventListener(evt, handler, true);\n };\n }\n\n var CustomEvent = shimCustomEvent();\n\n function shimCustomEvent() {\n var CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function (event, params) {\n params = params || {bubbles: false, cancelable: false, detail: undefined};\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = window.Event.prototype;\n }\n\n return CustomEvent;\n }\n\n /**\n * @file Manages the calendar / day-picker view.\n */\n\n var dayPicker = {\n onKeyDown: keyDown,\n onClick: {\n 'dp-day': selectDay,\n 'dp-next': gotoNextMonth,\n 'dp-prev': gotoPrevMonth,\n 'dp-today': selectToday,\n 'dp-clear': clear,\n 'dp-close': close,\n 'dp-cal-month': showMonthPicker,\n 'dp-cal-year': showYearPicker,\n },\n render: render\n };\n\n /**\n * view renders the calendar (day picker) as an HTML string.\n *\n * @param {DatePickerContext} context the date picker being rendered\n * @returns {string}\n */\n function render(dp) {\n var opts = dp.opts;\n var lang = opts.lang;\n var state = dp.state;\n var dayNames = lang.days;\n var dayOffset = opts.dayOffset || 0;\n var selectedDate = state.selectedDate;\n var hilightedDate = state.hilightedDate;\n var hilightedMonth = hilightedDate.getMonth();\n var today = now().getTime();\n\n return (\n '
' +\n '
' +\n '' +\n '' +\n '' +\n '' +\n '
' +\n '
' +\n dayNames.map(function (name, i) {\n return (\n '' + dayNames[(i + dayOffset) % dayNames.length] + ''\n );\n }).join('') +\n mapDays(hilightedDate, dayOffset, function (date) {\n var isNotInMonth = date.getMonth() !== hilightedMonth;\n var isDisabled = !opts.inRange(date);\n var isToday = date.getTime() === today;\n var className = 'dp-day';\n className += (isNotInMonth ? ' dp-edge-day' : '');\n className += (datesEq(date, hilightedDate) ? ' dp-current' : '');\n className += (datesEq(date, selectedDate) ? ' dp-selected' : '');\n className += (isDisabled ? ' dp-day-disabled' : '');\n className += (isToday ? ' dp-day-today' : '');\n className += ' ' + opts.dateClass(date, dp);\n\n return (\n ''\n );\n }) +\n '
' +\n '
' +\n '' +\n '' +\n '' +\n '
' +\n '
'\n );\n }\n\n /**\n * keyDown handles the key down event for the day-picker\n *\n * @param {Event} e\n * @param {DatePickerContext} dp\n */\n function keyDown(e, dp) {\n var key = e.keyCode;\n var shiftBy =\n (key === Key.left) ? -1 :\n (key === Key.right) ? 1 :\n (key === Key.up) ? -7 :\n (key === Key.down) ? 7 :\n 0;\n\n if (key === Key.esc) {\n dp.close();\n } else if (shiftBy) {\n e.preventDefault();\n dp.setState({\n hilightedDate: shiftDay(dp.state.hilightedDate, shiftBy)\n });\n }\n }\n\n function selectToday(e, dp) {\n dp.setState({\n selectedDate: now(),\n });\n }\n\n function clear(e, dp) {\n dp.setState({\n selectedDate: null,\n });\n }\n\n function close(e, dp) {\n dp.close();\n }\n\n function showMonthPicker(e, dp) {\n dp.setState({\n view: 'month'\n });\n }\n\n function showYearPicker(e, dp) {\n dp.setState({\n view: 'year'\n });\n }\n\n function gotoNextMonth(e, dp) {\n var hilightedDate = dp.state.hilightedDate;\n dp.setState({\n hilightedDate: shiftMonth(hilightedDate, 1)\n });\n }\n\n function gotoPrevMonth(e, dp) {\n var hilightedDate = dp.state.hilightedDate;\n dp.setState({\n hilightedDate: shiftMonth(hilightedDate, -1)\n });\n }\n\n function selectDay(e, dp) {\n dp.setState({\n selectedDate: new Date(parseInt(e.target.getAttribute('data-date'))),\n });\n }\n\n function mapDays(currentDate, dayOffset, fn) {\n var result = '';\n var iter = new Date(currentDate);\n iter.setDate(1);\n iter.setDate(1 - iter.getDay() + dayOffset);\n\n // If we are showing monday as the 1st of the week,\n // and the monday is the 2nd of the month, the sunday won't\n // show, so we need to shift backwards\n if (dayOffset && iter.getDate() === dayOffset + 1) {\n iter.setDate(dayOffset - 6);\n }\n\n // We are going to have 6 weeks always displayed to keep a consistent\n // calendar size\n for (var day = 0; day < (6 * 7); ++day) {\n result += fn(iter);\n iter.setDate(iter.getDate() + 1);\n }\n\n return result;\n }\n\n /**\n * @file Manages the month-picker view.\n */\n\n var monthPicker = {\n onKeyDown: keyDown$1,\n onClick: {\n 'dp-month': onChooseMonth\n },\n render: render$1\n };\n\n function onChooseMonth(e, dp) {\n dp.setState({\n hilightedDate: setMonth(dp.state.hilightedDate, parseInt(e.target.getAttribute('data-month'))),\n view: 'day',\n });\n }\n\n /**\n * render renders the month picker as an HTML string\n *\n * @param {DatePickerContext} dp the date picker context\n * @returns {string}\n */\n function render$1(dp) {\n var opts = dp.opts;\n var lang = opts.lang;\n var months = lang.months;\n var currentDate = dp.state.hilightedDate;\n var currentMonth = currentDate.getMonth();\n\n return (\n '
' +\n months.map(function (month, i) {\n var className = 'dp-month';\n className += (currentMonth === i ? ' dp-current' : '');\n\n return (\n ''\n );\n }).join('') +\n '
'\n );\n }\n\n /**\n * keyDown handles keydown events that occur in the month picker\n *\n * @param {Event} e\n * @param {DatePickerContext} dp\n */\n function keyDown$1(e, dp) {\n var key = e.keyCode;\n var shiftBy =\n (key === Key.left) ? -1 :\n (key === Key.right) ? 1 :\n (key === Key.up) ? -3 :\n (key === Key.down) ? 3 :\n 0;\n\n if (key === Key.esc) {\n dp.setState({\n view: 'day',\n });\n } else if (shiftBy) {\n e.preventDefault();\n dp.setState({\n hilightedDate: shiftMonth(dp.state.hilightedDate, shiftBy, true)\n });\n }\n }\n\n /**\n * @file Manages the year-picker view.\n */\n\n var yearPicker = {\n render: render$2,\n onKeyDown: keyDown$2,\n onClick: {\n 'dp-year': onChooseYear\n },\n };\n\n /**\n * view renders the year picker as an HTML string.\n *\n * @param {DatePickerContext} dp the date picker context\n * @returns {string}\n */\n function render$2(dp) {\n var state = dp.state;\n var currentYear = state.hilightedDate.getFullYear();\n var selectedYear = state.selectedDate.getFullYear();\n\n return (\n '
' +\n mapYears(dp, function (year) {\n var className = 'dp-year';\n className += (year === currentYear ? ' dp-current' : '');\n className += (year === selectedYear ? ' dp-selected' : '');\n\n return (\n ''\n );\n }) +\n '
'\n );\n }\n\n function onChooseYear(e, dp) {\n dp.setState({\n hilightedDate: setYear(dp.state.hilightedDate, parseInt(e.target.getAttribute('data-year'))),\n view: 'day',\n });\n }\n\n function keyDown$2(e, dp) {\n var key = e.keyCode;\n var opts = dp.opts;\n var shiftBy =\n (key === Key.left || key === Key.up) ? 1 :\n (key === Key.right || key === Key.down) ? -1 :\n 0;\n\n if (key === Key.esc) {\n dp.setState({\n view: 'day',\n });\n } else if (shiftBy) {\n e.preventDefault();\n var shiftedYear = shiftYear(dp.state.hilightedDate, shiftBy);\n\n dp.setState({\n hilightedDate: constrainDate(shiftedYear, opts.min, opts.max),\n });\n }\n }\n\n function mapYears(dp, fn) {\n var result = '';\n var max = dp.opts.max.getFullYear();\n\n for (var i = max; i >= dp.opts.min.getFullYear(); --i) {\n result += fn(i);\n }\n\n return result;\n }\n\n /**\n * @file Defines the base date picker behavior, overridden by various modes.\n */\n\n var views = {\n day: dayPicker,\n year: yearPicker,\n month: monthPicker\n };\n\n function BaseMode(input, emit, opts) {\n var detatchInputEvents; // A function that detaches all events from the input\n var closing = false; // A hack to prevent calendar from re-opening when closing.\n var selectedDate; // The currently selected date\n var dp = {\n // The root DOM element for the date picker, initialized on first open.\n el: undefined,\n opts: opts,\n shouldFocusOnBlur: true,\n shouldFocusOnRender: true,\n state: initialState(),\n adjustPosition: noop,\n containerHTML: '
',\n\n attachToDom: function () {\n document.body.appendChild(dp.el);\n },\n\n updateInput: function (selectedDate) {\n var e = new CustomEvent('change', {bubbles: true});\n e.simulated = true;\n input.value = selectedDate ? opts.format(selectedDate) : '';\n input.dispatchEvent(e);\n },\n\n computeSelectedDate: function () {\n return opts.parse(input.value);\n },\n\n currentView: function() {\n return views[dp.state.view];\n },\n\n open: function () {\n if (closing) {\n return;\n }\n\n if (!dp.el) {\n dp.el = createContainerElement(opts, dp.containerHTML);\n attachContainerEvents(dp);\n }\n\n selectedDate = constrainDate(dp.computeSelectedDate(), opts.min, opts.max);\n dp.state.hilightedDate = selectedDate || opts.hilightedDate;\n dp.state.view = 'day';\n\n dp.attachToDom();\n dp.render();\n\n emit('open');\n },\n\n isVisible: function () {\n return !!dp.el && !!dp.el.parentNode;\n },\n\n hasFocus: function () {\n var focused = document.activeElement;\n return dp.el &&\n dp.el.contains(focused) &&\n focused.className.indexOf('dp-focuser') < 0;\n },\n\n shouldHide: function () {\n return dp.isVisible();\n },\n\n close: function (becauseOfBlur) {\n var el = dp.el;\n\n if (!dp.isVisible()) {\n return;\n }\n\n if (el) {\n var parent = el.parentNode;\n parent && parent.removeChild(el);\n }\n\n closing = true;\n\n if (becauseOfBlur && dp.shouldFocusOnBlur) {\n focusInput(input);\n }\n\n // When we close, the input often gains refocus, which\n // can then launch the date picker again, so we buffer\n // a bit and don't show the date picker within N ms of closing\n setTimeout(function() {\n closing = false;\n }, 100);\n\n emit('close');\n },\n\n destroy: function () {\n dp.close();\n detatchInputEvents();\n },\n\n render: function () {\n if (!dp.el) {\n return;\n }\n\n var hadFocus = dp.hasFocus();\n var html = dp.currentView().render(dp);\n html && (dp.el.firstChild.innerHTML = html);\n\n dp.adjustPosition();\n\n if (hadFocus || dp.shouldFocusOnRender) {\n focusCurrent(dp);\n }\n },\n\n // Conceptually similar to setState in React, updates\n // the view state and re-renders.\n setState: function (state) {\n for (var key in state) {\n dp.state[key] = state[key];\n }\n\n emit('statechange');\n dp.render();\n },\n };\n\n detatchInputEvents = attachInputEvents(input, dp);\n\n // Builds the initial view state\n // selectedDate is a special case and causes changes to hilightedDate\n // hilightedDate is set on open, so remains undefined initially\n // view is the current view (day, month, year)\n function initialState() {\n return {\n get selectedDate() {\n return selectedDate;\n },\n set selectedDate(dt) {\n if (dt && !opts.inRange(dt)) {\n return;\n }\n\n if (dt) {\n selectedDate = new Date(dt);\n dp.state.hilightedDate = selectedDate;\n } else {\n selectedDate = dt;\n }\n\n dp.updateInput(selectedDate);\n emit('select');\n dp.close();\n },\n view: 'day',\n };\n }\n\n return dp;\n }\n\n function createContainerElement(opts, containerHTML) {\n var el = document.createElement('div');\n\n el.className = opts.mode;\n el.innerHTML = containerHTML;\n\n return el;\n }\n\n function attachInputEvents(input, dp) {\n var bufferShow = bufferFn(5, function () {\n if (dp.shouldHide()) {\n dp.close();\n } else {\n dp.open();\n }\n });\n\n var off = [\n on('blur', input, bufferFn(150, function () {\n if (!dp.hasFocus()) {\n dp.close(true);\n }\n })),\n\n on('mousedown', input, function () {\n if (input === document.activeElement) {\n bufferShow();\n }\n }),\n\n on('focus', input, bufferShow),\n\n on('input', input, function (e) {\n var date = dp.opts.parse(e.target.value);\n isNaN(date) || dp.setState({\n hilightedDate: date\n });\n }),\n ];\n\n // Unregister all events that were registered above.\n return function() {\n off.forEach(function (f) {\n f();\n });\n };\n }\n\n function focusCurrent(dp) {\n var current = dp.el.querySelector('.dp-current');\n return current && current.focus();\n }\n\n function attachContainerEvents(dp) {\n var el = dp.el;\n var calEl = el.querySelector('.dp');\n\n // Hack to get iOS to show active CSS states\n el.ontouchstart = noop;\n\n function onClick(e) {\n e.target.className.split(' ').forEach(function(evt) {\n var handler = dp.currentView().onClick[evt];\n handler && handler(e, dp);\n });\n }\n\n // The calender fires a blur event *every* time we redraw\n // this means we need to buffer the blur event to see if\n // it still has no focus after redrawing, and only then\n // do we return focus to the input. A possible other approach\n // would be to set context.redrawing = true on redraw and\n // set it to false in the blur event.\n on('blur', calEl, bufferFn(150, function () {\n if (!dp.hasFocus()) {\n dp.close(true);\n }\n }));\n\n on('keydown', el, function (e) {\n if (e.keyCode === Key.enter) {\n onClick(e);\n } else {\n dp.currentView().onKeyDown(e, dp);\n }\n });\n\n // If the user clicks in non-focusable space, but\n // still within the date picker, we don't want to\n // hide, so we need to hack some things...\n on('mousedown', calEl, function (e) {\n e.target.focus && e.target.focus(); // IE hack\n if (document.activeElement !== e.target) {\n e.preventDefault();\n focusCurrent(dp);\n }\n });\n\n on('click', el, onClick);\n }\n\n function focusInput(input) {\n // When the modal closes, we need to focus the original input so the\n // user can continue tabbing from where they left off.\n input.focus();\n\n // iOS zonks out if we don't blur the input, so...\n if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {\n input.blur();\n }\n }\n\n /**\n * @file Defines the modal date picker behavior.\n */\n\n function ModalMode(input, emit, opts) {\n var dp = BaseMode(input, emit, opts);\n\n // In modal mode, users really shouldn't be able to type in\n // the input, as all input is done via the calendar.\n input.readonly = true;\n\n // In modal mode, we need to know when the user has tabbed\n // off the end of the calendar, and set focus to the original\n // input. To do this, we add a special element to the DOM.\n // When the user tabs off the bottom of the calendar, they\n // will tab onto this element.\n dp.containerHTML += '.';\n\n return dp;\n }\n\n /**\n * @file Defines the dropdown date picker behavior.\n */\n\n function DropdownMode(input, emit, opts) {\n var dp = BaseMode(input, emit, opts);\n\n dp.shouldFocusOnBlur = false;\n\n Object.defineProperty(dp, 'shouldFocusOnRender', {\n get: function() {\n return input !== document.activeElement;\n }\n });\n\n dp.adjustPosition = function () {\n autoPosition(input, dp);\n };\n\n return dp;\n }\n\n function autoPosition(input, dp) {\n var inputPos = input.getBoundingClientRect();\n var win = window;\n\n adjustCalY(dp, inputPos, win);\n adjustCalX(dp, inputPos, win);\n\n dp.el.style.visibility = '';\n }\n\n function adjustCalX(dp, inputPos, win) {\n var cal = dp.el;\n var scrollLeft = win.pageXOffset;\n var inputLeft = inputPos.left + scrollLeft;\n var maxRight = win.innerWidth + scrollLeft;\n var offsetWidth = cal.offsetWidth;\n var calRight = inputLeft + offsetWidth;\n var shiftedLeft = maxRight - offsetWidth;\n var left = calRight > maxRight && shiftedLeft > 0 ? shiftedLeft : inputLeft;\n\n cal.style.left = left + 'px';\n }\n\n function adjustCalY(dp, inputPos, win) {\n var cal = dp.el;\n var scrollTop = win.pageYOffset;\n var inputTop = scrollTop + inputPos.top;\n var calHeight = cal.offsetHeight;\n var belowTop = inputTop + inputPos.height + 8;\n var aboveTop = inputTop - calHeight - 8;\n var isAbove = (aboveTop > 0 && belowTop + calHeight > scrollTop + win.innerHeight);\n var top = isAbove ? aboveTop : belowTop;\n\n if (cal.classList) {\n cal.classList.toggle('dp-is-above', isAbove);\n cal.classList.toggle('dp-is-below', !isAbove);\n }\n cal.style.top = top + 'px';\n }\n\n /**\n * @file Defines the permanent date picker behavior.\n */\n\n function PermanentMode(root, emit, opts) {\n var dp = BaseMode(root, emit, opts);\n\n dp.close = noop;\n dp.destroy = noop;\n dp.updateInput = noop;\n dp.shouldFocusOnRender = opts.shouldFocusOnRender;\n\n dp.computeSelectedDate = function () {\n return opts.hilightedDate;\n };\n\n dp.attachToDom = function () {\n root.appendChild(dp.el);\n };\n\n dp.open();\n\n return dp;\n }\n\n /**\n * @file Defines the various date picker modes (modal, dropdown, permanent)\n */\n\n function Mode(input, emit, opts) {\n input = input && input.tagName ? input : document.querySelector(input);\n\n if (opts.mode === 'dp-modal') {\n return ModalMode(input, emit, opts);\n }\n\n if (opts.mode === 'dp-below') {\n return DropdownMode(input, emit, opts);\n }\n\n if (opts.mode === 'dp-permanent') {\n return PermanentMode(input, emit, opts);\n }\n }\n\n /**\n * @file Defines simple event emitter behavior.\n */\n\n /**\n * Emitter constructs a new emitter object which has on/off methods.\n *\n * @returns {EventEmitter}\n */\n function Emitter() {\n var handlers = {};\n\n function onOne(name, handler) {\n (handlers[name] = (handlers[name] || [])).push(handler);\n }\n\n function onMany(fns) {\n for (var name in fns) {\n onOne(name, fns[name]);\n }\n }\n\n return {\n on: function (name, handler) {\n if (handler) {\n onOne(name, handler);\n } else {\n onMany(name);\n }\n\n return this;\n },\n\n emit: function (name, arg) {\n (handlers[name] || []).forEach(function (handler) {\n handler(name, arg);\n });\n },\n\n off: function (name, handler) {\n if (!name) {\n handlers = {};\n } else if (!handler) {\n handlers[name] = [];\n } else {\n handlers[name] = (handlers[name] || []).filter(function (h) {\n return h !== handler;\n });\n }\n\n return this;\n }\n };\n }\n\n /**\n * @file The root date picker file, defines public exports for the library.\n */\n\n /**\n * The date picker language configuration\n * @typedef {Object} LangOptions\n * @property {Array.} [days] - Days of the week\n * @property {Array.} [months] - Months of the year\n * @property {string} today - The label for the 'today' button\n * @property {string} close - The label for the 'close' button\n * @property {string} clear - The label for the 'clear' button\n */\n\n /**\n * The configuration options for a date picker.\n *\n * @typedef {Object} DatePickerOptions\n * @property {LangOptions} [lang] - Configures the label text, defaults to English\n * @property {('dp-modal'|'dp-below'|'dp-permanent')} [mode] - The date picker mode, defaults to 'dp-modal'\n * @property {(string|Date)} [hilightedDate] - The date to hilight if no date is selected\n * @property {function(string|Date):Date} [parse] - Parses a date, the complement of the \"format\" function\n * @property {function(Date):string} [format] - Formats a date for displaying to user\n * @property {function(Date):string} [dateClass] - Associates a custom CSS class with a date\n * @property {function(Date):boolean} [inRange] - Indicates whether or not a date is selectable\n * @property {(string|Date)} [min] - The minimum selectable date (inclusive, default 100 years ago)\n * @property {(string|Date)} [max] - The maximum selectable date (inclusive, default 100 years from now)\n */\n\n /**\n * The state values for the date picker\n *\n * @typedef {Object} DatePickerState\n * @property {string} view - The current view 'day' | 'month' | 'year'\n * @property {Date} selectedDate - The date which has been selected by the user\n * @property {Date} hilightedDate - The date which is currently hilighted / active\n */\n\n /**\n * An instance of TinyDatePicker\n *\n * @typedef {Object} DatePicker\n * @property {DatePickerState} state - The values currently displayed.\n * @property {function} on - Adds an event handler\n * @property {function} off - Removes an event handler\n * @property {function} setState - Changes the current state of the date picker\n * @property {function} open - Opens the date picker\n * @property {function} close - Closes the date picker\n * @property {function} destroy - Destroys the date picker (removing all handlers from the input, too)\n */\n\n /**\n * TinyDatePicker constructs a new date picker for the specified input\n *\n * @param {HTMLElement | string} input The input or CSS selector associated with the datepicker\n * @param {DatePickerOptions} opts The options for initializing the date picker\n * @returns {DatePicker}\n */\n function TinyDatePicker(input, opts) {\n var emitter = Emitter();\n var options = DatePickerOptions(opts);\n var mode = Mode(input, emit, options);\n var me = {\n get state() {\n return mode.state;\n },\n on: emitter.on,\n off: emitter.off,\n setState: mode.setState,\n open: mode.open,\n close: mode.close,\n destroy: mode.destroy,\n };\n\n function emit(evt) {\n emitter.emit(evt, me);\n }\n\n return me;\n }\n\n return TinyDatePicker;\n\n})));\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';\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';\nimport TinyDatePicker from 'tiny-date-picker';\n\n\nclass Entry {\n //--------------------------\n // constructor\n //--------------------------\n constructor() {\n reframe('iframe');\n this.uploadFiles;\n this.start();\n this.editor = new TextEditor();\n\n TinyDatePicker(document.getElementById('entry-date'), {\n mode: 'dp-below',\n format(date) {\n //return date;\n return self.dateUtils.getDate('origin', date);\n }\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 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 }\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 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 new EntryTasks().submitPost(edit, Entry.uploadFiles).then((response) => {\n let note = JSON.parse(response['response']['request'].response);\n self.editor.notify(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 ''\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 ''\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"]} \ No newline at end of file diff --git a/themes/dash/entry-edit.pug b/themes/dash/entry-edit.pug index 1341d45..c74b5cc 100644 --- a/themes/dash/entry-edit.pug +++ b/themes/dash/entry-edit.pug @@ -26,9 +26,12 @@ block main-content #entry-meta.column textarea(id='entry_tags' type='text', name='entry_tags' class='form-control', placeholder='tags [comma seperated]', autofocus) =post_tags + label Date Posted + input(id="entry-date" type="text" value=post_date) br input(id="featured-click" type="file" name="featured-click") input(id="post-image" type="file" name="post-image") + #entry-feature //label FEATURE IMAGE if(post_feature == 'null') @@ -45,31 +48,33 @@ block main-content img(src=post_feature) #edit-content #edit-control - button#option-bold.content-editor-btn-text.editor-button(href="") + button#option-bold.content-editor-btn-text.editor-button(title="bold") | B - button#option-italic.content-editor-btn-text.editor-button(href="") + button#option-italic.content-editor-btn-text.editor-button(title="italics") | I - button#option-strikethrough.content-editor-btn-text.editor-button(href="") + button#option-strikethrough.content-editor-btn-text.editor-button(title="strikethrough") | S - button#option-link.content-editor-btn-icon.editor-button(href="") + button#option-link.content-editor-btn-icon.editor-button(title="insert link") svg#option-link(viewBox="0 0 20 20" class="icons") use(xlink:href='/dash/assets/images/sprite.svg#entypo-link') - button#option-header1.content-editor-btn-text.editor-button(href="") + button#option-header1.content-editor-btn-text.editor-button(title="header 1") | H1 - button#option-header2.content-editor-btn-text.editor-button(href="") + button#option-header2.content-editor-btn-text.editor-button(title="header 2") | H2 - button#option-header3.content-editor-btn-text.editor-button(href="") + button#option-header3.content-editor-btn-text.editor-button(title="header 3") | H3 - button#option-image.content-editor-btn-icon(for="post-image") + button#option-image.content-editor-btn-icon(for="post-image" title='insert image') svg#option-link(viewBox="0 0 20 20" class="icons") use(xlink:href='/dash/assets/images/sprite.svg#entypo-image') - input(id="option-date" type="text" value=post_date) - //button#option-date.editor-button - svg#option-date(viewBox="0 0 20 20" class="icons") - use(xlink:href='/dash/assets/images/sprite.svg#entypo-calendar') - =post_date + if(edit) - button#post-sumbit-btn.post-sumbit-btn(data-action='blog-update' data-id=post.id type='submit') UPDATE + button#post-sumbit-btn.post-sumbit-btn.submit-start(data-action='blog-update' data-id=post.id type='submit') + svg#submit-save(viewBox="0 0 20 20" class="icons") + use(xlink:href='/dash/assets/images/sprite.svg#entypo-save' data-action='blog-update' data-id=post.id) + svg#submit-good.icon-hide(viewBox="0 0 20 20" class="icons") + use(xlink:href='/dash/assets/images/sprite.svg#entypo-thumbs-up') + svg#submit-error.icon-hide(viewBox="0 0 20 20" class="icons") + use(xlink:href='/dash/assets/images/sprite.svg#entypo-thumbs-down') else button#post-sumbit-btn.post-sumbit-btn(data-action='blog-add' type='submit') ADD POST diff --git a/themes/dash/src/com/controllers/DashEntry.jsx b/themes/dash/src/com/controllers/DashEntry.jsx index f49163b..c45486b 100644 --- a/themes/dash/src/com/controllers/DashEntry.jsx +++ b/themes/dash/src/com/controllers/DashEntry.jsx @@ -13,6 +13,9 @@ import * as Ease from '../tools/effects/Animate'; import TextEffects from '../tools/effects/TextEffects'; import EntryTasks from '../tasks/EntryTasks'; import TextEditor from '../tools/utilities/TextEditor'; +import TinyDatePicker from 'tiny-date-picker'; + + class Entry { //-------------------------- // constructor @@ -22,17 +25,26 @@ class Entry { this.uploadFiles; this.start(); this.editor = new TextEditor(); + + TinyDatePicker(document.getElementById('entry-date'), { + mode: 'dp-below', + format(date) { + //return date; + return self.dateUtils.getDate('origin', date); + } + }); } //-------------------------- // methods //-------------------------- start() { + let self = this; new Animate().object({ targets: document.getElementById('loader'), duration: 300, opacity: 0, easing: 'easeInOutQuad', - complete: function() { + complete: function () { document.getElementById('loader').style.display = 'none'; document.getElementById('loader').style.visibility = 'hidden'; new Animate().object({ @@ -40,15 +52,11 @@ class Entry { duration: 10, opacity: 1, easing: 'easeInOutQuad', - complete: function() { - new TextEffects().scramble(document.getElementById('the-title'), 50, function() { - - if (document.getElementById('the-intro')) - document.getElementById('the-intro').style.opacity = 1; - if (document.getElementById('blog-entry')) - document.getElementById('blog-entry').style.opacity = 1; - //START SEcTION - }); + complete: function () { + if (document.getElementById('the-intro')) + document.getElementById('the-intro').style.opacity = 1; + if (document.getElementById('blog-entry')) + document.getElementById('blog-entry').style.opacity = 1; } }); } @@ -58,10 +66,9 @@ class Entry { document.getElementById('featured-image-drop').addEventListener('dragover', this.handleDragOver, false); document.getElementById('featured-image-drop').addEventListener('drop', this.handleDrop, false); document.getElementById('featured-click').addEventListener('change', this.handleClicked, false); - - if(document.getElementById('new-upload-link')) - { - document.getElementById('new-upload-link').addEventListener('click', e=>{ + + if (document.getElementById('new-upload-link')) { + document.getElementById('new-upload-link').addEventListener('click', e => { document.getElementById('featured-click').click(); }) } @@ -70,10 +77,9 @@ class Entry { let edit = false; if (f.target.getAttribute('data-action') == 'blog-update') edit = true; - console.log('clicked') new EntryTasks().submitPost(edit, Entry.uploadFiles).then((response) => { let note = JSON.parse(response['response']['request'].response); - console.log(note.message); + self.editor.notify(note.message); }).catch((err) => { console.log(err) }); @@ -101,8 +107,8 @@ class Entry { } var reader = new FileReader(); // Closure to capture the file information. - reader.onload = (function(theFile) { - return function(f) { + reader.onload = (function (theFile) { + return function (f) { // Render thumbnail. var span = document.createElement('span'); span.innerHTML = [ @@ -135,8 +141,8 @@ class Entry { } var reader = new FileReader(); // Closure to capture the file information. - reader.onload = (function(theFile) { - return function(f) { + reader.onload = (function (theFile) { + return function (f) { // Render thumbnail. var span = document.createElement('span'); span.innerHTML = [ diff --git a/themes/dash/src/com/tasks/EntryTasks.jsx b/themes/dash/src/com/tasks/EntryTasks.jsx index 5676840..00151eb 100644 --- a/themes/dash/src/com/tasks/EntryTasks.jsx +++ b/themes/dash/src/com/tasks/EntryTasks.jsx @@ -39,13 +39,12 @@ class EntryTasks { postData.append("title", document.getElementById('entry_title').value); postData.append('slug', new StringUtils().cleanString(document.getElementById('entry_title').value)); postData.append("entry_plaintext", txt.value); - postData.append("created_date", document.getElementById('option-date').value); + postData.append("origin_date", document.getElementById('entry-date').value); postData.append("tags", document.getElementById('entry_tags').value); let postURL; let postEventType; if (edit) { let postID = document.getElementById('post-sumbit-btn').getAttribute('data-id'); - console.log("POST ID: "+postID); postURL = "/api/blog/update/" + postID; postEventType = DataEvent.POST_UPDATED; diff --git a/themes/dash/src/com/tools/events/DataEvent.jsx b/themes/dash/src/com/tools/events/DataEvent.jsx index cfc7f53..27014f5 100644 --- a/themes/dash/src/com/tools/events/DataEvent.jsx +++ b/themes/dash/src/com/tools/events/DataEvent.jsx @@ -11,6 +11,10 @@ export const PROJECT_UPDATED = 'projectUpdated'; export const PROJECT_ADDED = 'projectAdded'; export const PROJECTS_SORTED = 'projectsSorted'; export const POST_IMAGE_ADDED = 'postImageAdded'; +export const POST_ERROR = 'postError'; +export const POST_ADDED = 'postAdded'; +export const POST_UPDATED = 'postUpdated'; +export const POST_DELETED = 'postImageAdded'; class DataEvent { diff --git a/themes/dash/src/com/tools/utilities/TextEditor.jsx b/themes/dash/src/com/tools/utilities/TextEditor.jsx index 3e7bb43..590d922 100644 --- a/themes/dash/src/com/tools/utilities/TextEditor.jsx +++ b/themes/dash/src/com/tools/utilities/TextEditor.jsx @@ -8,13 +8,14 @@ import DataUtils, { } from './DataUtils'; import * as DataEvent from '../events/DataEvent'; import DateUtils from './DateUtils'; -import TinyDatePicker from 'tiny-date-picker'; import { position, offset } from 'caret-pos'; +import Animate from '../effects/Animate'; + class TextEditor { //-------------------------- @@ -28,14 +29,6 @@ class TextEditor { this.url = ''; let self = this; - this.dp = TinyDatePicker('input'); - TinyDatePicker(document.getElementById('option-date'), { - mode: 'dp-below', - format(date) { - //return date; - return self.dateUtils.getDate('origin', date); - } - }); window.addEventListener("scroll", f => { var fixLimit = document.getElementById('header').offsetHeight + document.getElementById('entry-header').offsetHeight + document.getElementById('entry-feature').offsetHeight if (window.pageYOffset >= fixLimit) { @@ -74,6 +67,24 @@ class TextEditor { position(document.getElementById('edit-text-code'), caret) } + notify(type) { + switch (type) { + case DataEvent.POST_UPDATED: + document.getElementById('submit-save').classList.add('icon-hide'); + document.getElementById('submit-good').classList.remove('icon-hide'); + document.getElementById('post-sumbit-btn').classList.remove('submit-start'); + document.getElementById('post-sumbit-btn').classList.add('submit-cool'); + setTimeout(f => { + document.getElementById('submit-save').classList.remove('icon-hide'); + document.getElementById('submit-good').classList.add('icon-hide'); + document.getElementById('post-sumbit-btn').classList.add('submit-start'); + document.getElementById('post-sumbit-btn').classList.remove('submit-cool'); + }, 2000); + + break; + } + } + //-------------------------- // event handlers //-------------------------- diff --git a/themes/dash/src/styles/main/_colors.styl b/themes/dash/src/styles/main/_colors.styl index ded0cfe..1eca569 100644 --- a/themes/dash/src/styles/main/_colors.styl +++ b/themes/dash/src/styles/main/_colors.styl @@ -5,4 +5,8 @@ $highlight = #cd898d; $white = #eee; $black = #32302f; +//editor colors +$eventCool = #65b16c +$eventLame = #ce483b + //Bulma overrides diff --git a/themes/dash/src/styles/main/_editor-highlight.styl b/themes/dash/src/styles/main/_editor-highlight.styl index 372fbd6..e2983f1 100644 --- a/themes/dash/src/styles/main/_editor-highlight.styl +++ b/themes/dash/src/styles/main/_editor-highlight.styl @@ -3,7 +3,7 @@ display block overflow-x auto padding 0.5em - background none + background $primary - 10% .hljs, .hljs-subst color #ebdbb2 diff --git a/themes/dash/src/styles/main/_editor.styl b/themes/dash/src/styles/main/_editor.styl index 1ee6f83..7d940e3 100644 --- a/themes/dash/src/styles/main/_editor.styl +++ b/themes/dash/src/styles/main/_editor.styl @@ -1,5 +1,5 @@ #edit-control - margin 10px 0 0 0 + margin 10px top 1px padding 5px border-radius 5px @@ -10,9 +10,28 @@ margin 5px #post-sumbit-btn + object-transitions(0.3s) height 30px - background #65b16c - color #65b16c - 30% + width 30px + padding 5px 5px 1px 5px + border-radius 20px + display inline-block + vertical-align top + text-align center + + .icon-hide + display none + visibility hidden + + .submit-start + background $white + svg + fill $highlight + + .submit-cool + background: $eventCool + svg + fill: $white // float right #option-date @@ -63,245 +82,11 @@ text-decoration line-through font-style italic -// TINY DATE - -.dp-modal - position fixed - top 0 - left 0 - right 0 - bottom 0 - //background rgba(255, 255, 255, 0.75) - background-opacity($primary - 70%, .75); - z-index 2000 - -.dp - position relative - background $primary //#FFF - box-shadow 2px 2px 16px rgba(0, 0, 0, 0.25) - line-height 1.4 - border-radius 4px - max-height 400px - z-index 5000 - padding-top 6px - overflow hidden - -webkit-tap-highlight-color transparent - -.dp:before - content ' ' - height 6px - position absolute - top 0 - left 0 - right 0 - background $highlight - //background linear-gradient(-90deg, #3B99FC 0%, #8AEFC8 100%) - -.dp-permanent .dp - padding-top 0 - border 1px solid #EEE - box-shadow none - -.dp-permanent .dp:before - display none - -.dp-cal - min-height 300px - -.dp-below - position absolute - font-size 0.8em - width 400px - max-width 100vw - -.dp-permanent - position relative - font-size 0.8em - width 400px - max-width 100vw - -.dp-permanent .dp - z-index 0 - -.dp-modal .dp - position absolute - top 50% - left 50% - max-width 600px - width calc(100% - 4em) - transform translate(-50%, -50%) - animation slide-up 0.3s forwards - -.dp-months - padding 24px - -.dp-years - box-sizing border-box - max-height 400px - padding 8px 0 - overflow auto !important /* HACK for Chrome on Android */ - -.dp-cal-month, .dp-cal-year, .dp-day, .dp-month, .dp-year - box-sizing border-box - text-align center - text-decoration none - position relative - color $white - border-radius 2px - border 0 - background transparent - -.dp-cal-header - position relative - text-align center - padding-bottom 16px - background $primary - 10% - -.dp-next, .dp-prev - position absolute - width 30px - height 30px - overflow hidden - top 14px - color $primary - 50% - border-radius 2px - border 0 - background transparent - -.dp-next:focus, .dp-prev:focus, .dp-next:hover, .dp-prev:hover - outline none - color inherit - -.dp-prev - left 24px - -.dp-next - right 24px - -.dp-prev:before, .dp-next:before - content '' - border 2px solid - width 10px - height 10px - display inline-block - transform rotate(-45deg) - transition border-color 0.2s - margin 9px 0 40px 4px - -.dp-prev:before - border-right 0 - border-bottom 0 - -.dp-next:before - border-left 0 - border-top 0 - margin-left 0 - margin-right 4px - -.dp-cal-month, .dp-cal-year - display inline-block - font-size 1.4em - padding 16px 8px 8px - outline none - -.dp-cal-footer - text-align center - background $primary - 10% - -.dp-day-today:after - content '' - height 0 - width 0 - border 7px solid $highlight - border-bottom-color transparent - border-left-color transparent - position absolute - top 0 - right 0 - -.dp-close, .dp-clear, .dp-today - box-sizing border-box - display inline-block - width 33% - padding 8px - text-decoration none - color $primary - 50% - border 0 - background transparent - -.dp-permanent .dp-close, .dp-permanent .dp-clear - display none - -.dp-close:active, .dp-clear:active, .dp-today:active, .dp-next:active, .dp-prev:active, .dp-cal-month:active, .dp-cal-year:active - background $highlight - color $white - -@media screen and (min-device-width: 1200px) - .dp-close:hover, .dp-close:focus, .dp-clear:hover, .dp-clear:focus, .dp-today:hover, .dp-today:focus, .dp-next:hover, .dp-next:focus, .dp-prev:hover, .dp-prev:focus, .dp-cal-month:focus, .dp-cal-month:hover, .dp-cal-year:hover, .dp-cal-year:focus - background $highlight - color $white - -.dp-col-header, .dp-day - width 14.28571429% - display inline-block - padding 8px - text-align center - -.dp-col-header - color #AAA - text-transform uppercase - font-weight 300 - font-size 0.8em - padding 8px 0 - -.dp-month - width 33% - display inline-block - padding 8px - -.dp-year - display block - padding 8px 40px - width 100% - -.dp-edge-day - color #AAA - -.dp-day:hover, .dp-month:hover, .dp-year:hover, .dp-current:focus, .dp-current, .dp-day:focus, .dp-month:focus, .dp-year:focus - outline none - background $secondary + 10% - color $white - -.dp-selected:hover, .dp-selected:focus, .dp-selected - background $secondary - color $white - -.dp-day-disabled - background transparent - color #DDD - -.dp-day-disabled:focus, .dp-day-disabled:hover - background #DDD - -.dp-focuser - position absolute - z-index 0 - top 50% - left 50% - -/* Responsive overrides */ -@media (max-width: 480px), (max-height: 480px) - .dp-modal .dp - font-size 0.9em - width auto - width 100% - - .dp-day-of-week, .dp-day - padding 8px - -@keyframes slide-up - 0% - transform translate(-50%, 100%) - - 100% - transform translate(-50%, -50%) \ No newline at end of file +#edit-content-wrapper + width 98% + max-width 900px + margin 0 auto + border-radius 5px + code + border-radius: 5px + \ No newline at end of file diff --git a/themes/dash/src/styles/main/_entries.styl b/themes/dash/src/styles/main/_entries.styl index 8245d2e..e45c57c 100644 --- a/themes/dash/src/styles/main/_entries.styl +++ b/themes/dash/src/styles/main/_entries.styl @@ -49,7 +49,7 @@ width 100% #entry-header - width 100% + //width 100% max-width 900px margin 0 auto padding 0.75rem @@ -68,8 +68,20 @@ background $primary - 4% font-family 'Apercu' width 100% - height 150px + height 115px color $primary - 50% + #entry-date + background $primary - 10% + border-radius 0 3px 3px 0 + width: 105px + font-family: 'Apercu' + color: $highlight + label + background: $primary - 15% + border-radius: 3px 0 0 3px + display inline-block + padding: 5px + color $primary + 15% #featured-click, #post-image display none @@ -120,3 +132,245 @@ word-wrap normal white-space pre-wrap line-break normal + +// TINY DATE +.dp-modal + position fixed + top 0 + left 0 + right 0 + bottom 0 + // background rgba(255, 255, 255, 0.75) + background-opacity($primary - 70%, 0.75) + z-index 2000 + +.dp + position relative + background $primary // #FFF + box-shadow 2px 2px 16px rgba(0, 0, 0, 0.25) + line-height 1.4 + border-radius 4px + max-height 400px + z-index 5000 + padding-top 6px + overflow hidden + -webkit-tap-highlight-color transparent + +.dp:before + content ' ' + height 6px + position absolute + top 0 + left 0 + right 0 + background $highlight + // background linear-gradient(-90deg, #3B99FC 0%, #8AEFC8 100%) + +.dp-permanent .dp + padding-top 0 + border 1px solid #EEE + box-shadow none + +.dp-permanent .dp:before + display none + +.dp-cal + min-height 300px + +.dp-below + position absolute + font-size 0.8em + width 400px + max-width 100vw + +.dp-permanent + position relative + font-size 0.8em + width 400px + max-width 100vw + +.dp-permanent .dp + z-index 0 + +.dp-modal .dp + position absolute + top 50% + left 50% + max-width 600px + width calc(100% - 4em) + transform translate(-50%, -50%) + animation slide-up 0.3s forwards + +.dp-months + padding 24px + +.dp-years + box-sizing border-box + max-height 400px + padding 8px 0 + overflow auto !important /* HACK for Chrome on Android */ + +.dp-cal-month, .dp-cal-year, .dp-day, .dp-month, .dp-year + box-sizing border-box + text-align center + text-decoration none + position relative + color $white + border-radius 2px + border 0 + background transparent + +.dp-cal-header + position relative + text-align center + padding-bottom 16px + background $primary - 10% + +.dp-next, .dp-prev + position absolute + width 30px + height 30px + overflow hidden + top 14px + color $primary - 50% + border-radius 2px + border 0 + background transparent + +.dp-next:focus, .dp-prev:focus, .dp-next:hover, .dp-prev:hover + outline none + color inherit + +.dp-prev + left 24px + +.dp-next + right 24px + +.dp-prev:before, .dp-next:before + content '' + border 2px solid + width 10px + height 10px + display inline-block + transform rotate(-45deg) + transition border-color 0.2s + margin 9px 0 40px 4px + +.dp-prev:before + border-right 0 + border-bottom 0 + +.dp-next:before + border-left 0 + border-top 0 + margin-left 0 + margin-right 4px + +.dp-cal-month, .dp-cal-year + display inline-block + font-size 1.4em + padding 16px 8px 8px + outline none + +.dp-cal-footer + text-align center + background $primary - 10% + +.dp-day-today:after + content '' + height 0 + width 0 + border 7px solid $highlight + border-bottom-color transparent + border-left-color transparent + position absolute + top 0 + right 0 + +.dp-close, .dp-clear, .dp-today + box-sizing border-box + display inline-block + width 33% + padding 8px + text-decoration none + color $primary - 50% + border 0 + background transparent + +.dp-permanent .dp-close, .dp-permanent .dp-clear + display none + +.dp-close:active, .dp-clear:active, .dp-today:active, .dp-next:active, .dp-prev:active, .dp-cal-month:active, .dp-cal-year:active + background $highlight + color $white + +@media screen and (min-device-width: 1200px) + .dp-close:hover, .dp-close:focus, .dp-clear:hover, .dp-clear:focus, .dp-today:hover, .dp-today:focus, .dp-next:hover, .dp-next:focus, .dp-prev:hover, .dp-prev:focus, .dp-cal-month:focus, .dp-cal-month:hover, .dp-cal-year:hover, .dp-cal-year:focus + background $highlight + color $white + +.dp-col-header, .dp-day + width 14.28571429% + display inline-block + padding 8px + text-align center + +.dp-col-header + color #AAA + text-transform uppercase + font-weight 300 + font-size 0.8em + padding 8px 0 + +.dp-month + width 33% + display inline-block + padding 8px + +.dp-year + display block + padding 8px 40px + width 100% + +.dp-edge-day + color #AAA + +.dp-day:hover, .dp-month:hover, .dp-year:hover, .dp-current:focus, .dp-current, .dp-day:focus, .dp-month:focus, .dp-year:focus + outline none + background $secondary + 10% + color $white + +.dp-selected:hover, .dp-selected:focus, .dp-selected + background $secondary + color $white + +.dp-day-disabled + background transparent + color #DDD + +.dp-day-disabled:focus, .dp-day-disabled:hover + background #DDD + +.dp-focuser + position absolute + z-index 0 + top 50% + left 50% + +/* Responsive overrides */ +@media (max-width: 480px), (max-height: 480px) + .dp-modal .dp + font-size 0.9em + width auto + width 100% + + .dp-day-of-week, .dp-day + padding 8px + +@keyframes slide-up + 0% + transform translate(-50%, 100%) + + 100% + transform translate(-50%, -50%)