diff --git a/action.php b/action.php
index d1ea966..754b131 100644
--- a/action.php
+++ b/action.php
@@ -31,6 +31,9 @@ function returnToSender($msg, $arg = "") {
}
switch ($VARS['action']) {
+ case "saveedits":
+ $page = $VARS['page'];
+ $content = $VARS['content'];
case "signout":
session_destroy();
header('Location: index.php');
diff --git a/database.mwb b/database.mwb
index 250ae6b..ce850ba 100644
Binary files a/database.mwb and b/database.mwb differ
diff --git a/lib/requiredpublic.php b/lib/requiredpublic.php
new file mode 100644
index 0000000..765be8b
--- /dev/null
+++ b/lib/requiredpublic.php
@@ -0,0 +1,111 @@
+"
+ . ""
+ . ""
+ . "
Error"
+ . ""
+ . "A fatal application error has occurred.
"
+ . "(This isn't your fault.)"
+ . "Details:
"
+ . "" . htmlspecialchars($error) . "
");
+}
+
+date_default_timezone_set(TIMEZONE);
+
+// Database settings
+// Also inits database and stuff
+use Medoo\Medoo;
+
+$database;
+try {
+ $database = new Medoo([
+ 'database_type' => DB_TYPE,
+ 'database_name' => DB_NAME,
+ 'server' => DB_SERVER,
+ 'username' => DB_USER,
+ 'password' => DB_PASS,
+ 'charset' => DB_CHARSET
+ ]);
+} catch (Exception $ex) {
+ //header('HTTP/1.1 500 Internal Server Error');
+ sendError("Database error. Try again later. $ex");
+}
+
+function getdatabase() {
+ global $database;
+ return $database;
+}
+
+function getsiteid() {
+ global $database;
+ return $database->get("sites", "siteid");
+}
+
+function getpageslug() {
+ global $database;
+ if (isset($_GET['id'])) {
+ $id = $_GET['id'];
+ } else {
+ $id = "index";
+ }
+ if ($database->has("pages", ["AND" => ["slug" => $id, "siteid" => getsiteid()]])) {
+ return $id;
+ }
+ return null;
+}
+
+function getpagetemplate() {
+ global $database;
+ $slug = getpageslug();
+ if (!is_null($slug)) {
+ return $database->get("pages", "template", ["AND" => ["slug" => $slug, "siteid" => getsiteid()]]);
+ }
+ return "404";
+}
diff --git a/lib/themefunctions.php b/lib/themefunctions.php
new file mode 100644
index 0000000..6a15ce1
--- /dev/null
+++ b/lib/themefunctions.php
@@ -0,0 +1,149 @@
+get('sites', "sitename", ["siteid" => getsiteid()]);
+ if ($echo) {
+ echo $title;
+ } else {
+ return $title;
+ }
+}
+
+function get_site_url($echo = true) {
+ $db = getdatabase();
+ $url = $db->get('sites', "url", ["siteid" => getsiteid()]);
+ if ($echo) {
+ echo $url;
+ } else {
+ return $url;
+ }
+}
+
+function get_page_title($echo = true) {
+ $db = getdatabase();
+ $title = $db->get("pages", "title", ["AND" => ["slug" => getpageslug(), "siteid" => getsiteid()]]);
+ if ($echo) {
+ echo $title;
+ } else {
+ return $title;
+ }
+}
+
+function get_page_clean_title($echo = true) {
+ $title = strip_tags(get_page_title(false));
+ if ($echo) {
+ echo $title;
+ } else {
+ return $title;
+ }
+}
+
+function get_page_slug($echo = true) {
+ if ($echo) {
+ echo getpageslug();
+ } else {
+ return getpageslug();
+ }
+}
+
+function get_page_url($echo = true, $slug = null) {
+ if ($slug == null) {
+ $slug = get_page_slug(false);
+ }
+ $url = get_site_url(false) . "index.php?id=$slug";
+ if ($echo) {
+ echo $url;
+ } else {
+ return $url;
+ }
+}
+
+function get_component($name, $context = null, $echo = true) {
+ $db = getdatabase();
+ if ($context == null) {
+ $context = get_page_slug(false);
+ }
+ $pageid = $db->get("pages", "pageid", ["AND" => ["slug" => $context, "siteid" => getsiteid()]]);
+ $content = "";
+ if ($db->has("components", ["AND" => ["pageid" => $pageid, "name" => $name]])) {
+ $content = $db->get("components", "content", ["AND" => ["pageid" => $pageid, "name" => $name]]);
+ }
+ if ($echo) {
+ echo $content;
+ } else {
+ return $content;
+ }
+}
+
+function get_page_content($slug = null) {
+ get_component("content", $slug);
+}
+
+function get_header() {
+
+}
+
+function get_theme_url($echo = true) {
+ $db = getdatabase();
+ $site = $db->get('sites', ["sitename", "url", "theme"], ["siteid" => getsiteid()]);
+ $url = $site["url"] . "themes/" . $site["theme"];
+ if ($echo) {
+ echo $url;
+ } else {
+ return $url;
+ }
+}
+
+function get_theme_color_url($echo = true) {
+ $db = getdatabase();
+ $site = $db->get('sites', ["sitename", "url", "theme", "color"], ["siteid" => getsiteid()]);
+ if ($site["color"] == null) {
+ $site["color"] = "default";
+ }
+ if (!file_exists(__DIR__ . "/../public/themes/" . $site["theme"] . "/colors/" . $site['color'])) {
+ $site['color'] = "default";
+ }
+ $url = $site["url"] . "themes/" . $site["theme"] . "/colors/" . $site["color"];
+ if ($echo) {
+ echo $url;
+ } else {
+ return $url;
+ }
+}
+
+function get_navigation($currentpage = null, $classPrefix = "", $liclass = "", $currentclass = "current", $linkclass = "", $currentlinkclass = "active") {
+ $db = getdatabase();
+ $pages = $db->select('pages', ['pageid', 'parentid', 'slug', 'nav'], ["AND" => ["siteid" => getsiteid(), "nav[!]" => null], "ORDER" => ["navorder" => "ASC"]]);
+ if (is_null($currentpage)) {
+ $current = getpageslug();
+ } else {
+ $current = $currentpage;
+ }
+ foreach ($pages as $p) {
+ $class = $classPrefix . $p['slug'] . " $liclass";
+ $aclass = $linkclass;
+ if ($p['slug'] == $current) {
+ $class .= " $currentclass";
+ $aclass .= " $currentlinkclass";
+ }
+ echo ''
+ . ''
+ . $p['nav']
+ . ''
+ . '' . "\n";
+ }
+}
+
+function return_site_ver() {
+ // Stub for GetSimple
+ return "SiteWriter";
+}
diff --git a/public/file.php b/public/file.php
new file mode 100644
index 0000000..fd257eb
--- /dev/null
+++ b/public/file.php
@@ -0,0 +1,9 @@
+get("sites", "theme", ["siteid" => getsiteid()]);
+
+$template = getpagetemplate();
+include __DIR__ . "/themes/$theme/$template.php";
+
+if (isset($_GET['edit'])) {
+ ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/public/themes/bootstrap/404.php b/public/themes/bootstrap/404.php
new file mode 100644
index 0000000..aac2890
--- /dev/null
+++ b/public/themes/bootstrap/404.php
@@ -0,0 +1,27 @@
+
+
+
+
+
+
404 Page Not Found
+
+ The requested page could not be found.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/themes/bootstrap/assets/bootstrap.min.js b/public/themes/bootstrap/assets/bootstrap.min.js
new file mode 100644
index 0000000..eac9842
--- /dev/null
+++ b/public/themes/bootstrap/assets/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v4.1.0 (https://getbootstrap.com/)
+ * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,c){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)P(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right',trigger:"hover focus",title:"",delay:0,html:!(_e={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(de={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},pe="out",ve={HIDE:"hide"+he,HIDDEN:"hidden"+he,SHOW:(me="show")+he,SHOWN:"shown"+he,INSERTED:"inserted"+he,CLICK:"click"+he,FOCUSIN:"focusin"+he,FOCUSOUT:"focusout"+he,MOUSEENTER:"mouseenter"+he,MOUSELEAVE:"mouseleave"+he},Ee="fade",ye="show",Te=".tooltip-inner",Ce=".arrow",Ie="hover",Ae="focus",De="click",be="manual",Se=function(){function i(t,e){if("undefined"==typeof c)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=oe(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),oe(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(oe(this.getTipElement()).hasClass(ye))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),oe.removeData(this.element,this.constructor.DATA_KEY),oe(this.element).off(this.constructor.EVENT_KEY),oe(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&oe(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===oe(this.element).css("display"))throw new Error("Please use show on visible elements");var t=oe.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){oe(this.element).trigger(t);var n=oe.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=Cn.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&oe(i).addClass(Ee);var s="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,o=this._getAttachment(s);this.addAttachmentClass(o);var a=!1===this.config.container?document.body:oe(this.config.container);oe(i).data(this.constructor.DATA_KEY,this),oe.contains(this.element.ownerDocument.documentElement,this.tip)||oe(i).appendTo(a),oe(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new c(this.element,i,{placement:o,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:Ce},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),oe(i).addClass(ye),"ontouchstart"in document.documentElement&&oe(document.body).children().on("mouseover",null,oe.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,oe(e.element).trigger(e.constructor.Event.SHOWN),t===pe&&e._leave(null,e)};if(oe(this.tip).hasClass(Ee)){var h=Cn.getTransitionDurationFromElement(this.tip);oe(this.tip).one(Cn.TRANSITION_END,l).emulateTransitionEnd(h)}else l()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=oe.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==me&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),oe(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(oe(this.element).trigger(i),!i.isDefaultPrevented()){if(oe(n).removeClass(ye),"ontouchstart"in document.documentElement&&oe(document.body).children().off("mouseover",null,oe.noop),this._activeTrigger[De]=!1,this._activeTrigger[Ae]=!1,this._activeTrigger[Ie]=!1,oe(this.tip).hasClass(Ee)){var s=Cn.getTransitionDurationFromElement(n);oe(n).one(Cn.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){oe(this.getTipElement()).addClass(ue+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||oe(this.config.template)[0],this.tip},t.setContent=function(){var t=oe(this.getTipElement());this.setElementContent(t.find(Te),this.getTitle()),t.removeClass(Ee+" "+ye)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?oe(e).parent().is(t)||t.empty().append(e):t.text(oe(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getAttachment=function(t){return _e[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)oe(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==be){var e=t===Ie?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Ie?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;oe(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}oe(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=h({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||oe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),oe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Ae:Ie]=!0),oe(e.getTipElement()).hasClass(ye)||e._hoverState===me?e._hoverState=me:(clearTimeout(e._timeout),e._hoverState=me,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===me&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||oe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),oe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Ae:Ie]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=pe,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===pe&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=h({},this.constructor.Default,oe(this.element).data(),t)).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Cn.typeCheckConfig(ae,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=oe(this.getTipElement()),e=t.attr("class").match(fe);null!==e&&0'}),He=h({},Nn.DefaultType,{content:"(string|element|function)"}),We="fade",xe=".popover-header",Ue=".popover-body",Ke={HIDE:"hide"+ke,HIDDEN:"hidden"+ke,SHOW:(Me="show")+ke,SHOWN:"shown"+ke,INSERTED:"inserted"+ke,CLICK:"click"+ke,FOCUSIN:"focusin"+ke,FOCUSOUT:"focusout"+ke,MOUSEENTER:"mouseenter"+ke,MOUSELEAVE:"mouseleave"+ke},Fe=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){we(this.getTipElement()).addClass(Le+"-"+t)},r.getTipElement=function(){return this.tip=this.tip||we(this.config.template)[0],this.tip},r.setContent=function(){var t=we(this.getTipElement());this.setElementContent(t.find(xe),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Ue),e),t.removeClass(We+" "+Me)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=we(this.getTipElement()),e=t.attr("class").match(je);null!==e&&0=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t li > .active",vn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',En=".dropdown-toggle",yn="> .dropdown-menu .active",Tn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&rn(this._element).hasClass(cn)||rn(this._element).hasClass(un))){var t,i,e=rn(this._element).closest(gn)[0],r=Cn.getSelectorFromElement(this._element);if(e){var s="UL"===e.nodeName?pn:mn;i=(i=rn.makeArray(rn(e).find(s)))[i.length-1]}var o=rn.Event(ln.HIDE,{relatedTarget:this._element}),a=rn.Event(ln.SHOW,{relatedTarget:i});if(i&&rn(i).trigger(o),rn(this._element).trigger(a),!a.isDefaultPrevented()&&!o.isDefaultPrevented()){r&&(t=rn(r)[0]),this._activate(this._element,e);var l=function(){var t=rn.Event(ln.HIDDEN,{relatedTarget:n._element}),e=rn.Event(ln.SHOWN,{relatedTarget:i});rn(i).trigger(t),rn(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){rn.removeData(this._element,sn),this._element=null},t._activate=function(t,e,n){var i=this,r=("UL"===e.nodeName?rn(e).find(pn):rn(e).children(mn))[0],s=n&&r&&rn(r).hasClass(fn),o=function(){return i._transitionComplete(t,r,n)};if(r&&s){var a=Cn.getTransitionDurationFromElement(r);rn(r).one(Cn.TRANSITION_END,o).emulateTransitionEnd(a)}else o()},t._transitionComplete=function(t,e,n){if(e){rn(e).removeClass(dn+" "+cn);var i=rn(e.parentNode).find(yn)[0];i&&rn(i).removeClass(cn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(rn(t).addClass(cn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),Cn.reflow(t),rn(t).addClass(dn),t.parentNode&&rn(t.parentNode).hasClass(hn)){var r=rn(t).closest(_n)[0];r&&rn(r).find(En).addClass(cn),t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=rn(this),e=t.data(sn);if(e||(e=new i(this),t.data(sn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},o(i,null,[{key:"VERSION",get:function(){return"4.1.0"}}]),i}(),rn(document).on(ln.CLICK_DATA_API,vn,function(t){t.preventDefault(),Tn._jQueryInterface.call(rn(this),"show")}),rn.fn.tab=Tn._jQueryInterface,rn.fn.tab.Constructor=Tn,rn.fn.tab.noConflict=function(){return rn.fn.tab=an,Tn._jQueryInterface},Tn);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=Cn,t.Alert=In,t.Button=An,t.Carousel=Dn,t.Collapse=bn,t.Dropdown=Sn,t.Modal=wn,t.Popover=On,t.Scrollspy=kn,t.Tab=Pn,t.Tooltip=Nn,Object.defineProperty(t,"__esModule",{value:!0})});
+//# sourceMappingURL=bootstrap.min.js.map
\ No newline at end of file
diff --git a/public/themes/bootstrap/assets/jquery-3.3.1.slim.min.js b/public/themes/bootstrap/assets/jquery-3.3.1.slim.min.js
new file mode 100644
index 0000000..f4ca9b2
--- /dev/null
+++ b/public/themes/bootstrap/assets/jquery-3.3.1.slim.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */
+!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,u=n.push,s=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,d=f.toString,p=d.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},v=function e(t){return null!=t&&t===t.window},y={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in y)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function b(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var x="3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector",w=function(e,t){return new w.fn.init(e,t)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,u,s,l,c,f,d,p,h,g,v,y,m,b,x="sizzle"+1*new Date,w=e.document,C=0,T=0,E=ae(),N=ae(),k=ae(),A=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,S=[],L=S.pop,j=S.push,q=S.push,O=S.slice,P=function(e,t){for(var n=0,r=e.length;n+~]|"+I+")"+I+"*"),_=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),U=new RegExp(M),V=new RegExp("^"+R+"$"),X={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){d()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{q.apply(S=O.call(w.childNodes),w.childNodes),S[w.childNodes.length].nodeType}catch(e){q={apply:S.length?function(e,t){j.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,u,l,c,f,h,y,m=t&&t.ownerDocument,C=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return r;if(!i&&((t?t.ownerDocument||t:w)!==p&&d(t),t=t||p,g)){if(11!==C&&(f=K.exec(e)))if(o=f[1]){if(9===C){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return q.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return q.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!v||!v.test(e))){if(1!==C)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=x),u=(h=a(e)).length;while(u--)h[u]="#"+c+" "+ye(h[u]);y=h.join(","),m=J.test(e)&&ge(t.parentNode)||t}if(y)try{return q.apply(r,m.querySelectorAll(y)),r}catch(e){}finally{c===x&&t.removeAttribute("id")}}}return s(e.replace($,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ue(e){return e[x]=!0,e}function se(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return ue(function(t){return t=+t,ue(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(p=a,h=p.documentElement,g=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=se(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=se(function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=G.test(p.querySelectorAll))&&(se(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+H+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]")}),se(function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=G.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",M)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=G.test(h.compareDocumentPosition),b=t||G.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)u.unshift(n);while(a[r]===u[r])r++;return r?ce(a[r],u[r]):a[r]===w?-1:u[r]===w?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&d(e),t=t.replace(_,"='$1']"),n.matchesSelector&&g&&!k[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==p&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:ue,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=u&&t.nodeName.toLowerCase(),m=!s&&!u,b=!1;if(v){if(o){while(g){d=t;while(d=d[g])if(u?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){b=(p=(l=(c=(f=(d=v)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===C&&l[1])&&l[2],d=p&&v.childNodes[p];while(d=++p&&d&&d[g]||(b=p=0)||h.pop())if(1===d.nodeType&&++b&&d===t){c[e]=[C,p,b];break}}else if(m&&(b=p=(l=(c=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===C&&l[1]),!1===b)while(d=++p&&d&&d[g]||(b=p=0)||h.pop())if((u?d.nodeName.toLowerCase()===y:1===d.nodeType)&&++b&&(m&&((c=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[C,b]),d===t))break;return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=P(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ue(function(e){var t=[],n=[],r=u(e.replace($,"$1"));return r[x]?ue(function(e,t,n,i){var o,a=r(e,null,i,[]),u=e.length;while(u--)(o=a[u])&&(e[u]=!(t[u]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ue(function(e){return function(t){return oe(e,t).length>0}}),contains:ue(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ue(function(e){return V.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else y=we(y===a?y.splice(h,y.length):y),i?i(null,a,y,s):q.apply(a,y)})}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],u=a||r.relative[" "],s=a?1:0,c=me(function(e){return e===t},u,!0),f=me(function(e){return P(t,e)>-1},u,!0),d=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];s1&&be(d),s>1&&ye(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),n,s0,i=e.length>0,o=function(o,a,u,s,c){var f,h,v,y=0,m="0",b=o&&[],x=[],w=l,T=o||i&&r.find.TAG("*",c),E=C+=null==w?1:Math.random()||.1,N=T.length;for(c&&(l=a===p||a||c);m!==N&&null!=(f=T[m]);m++){if(i&&f){h=0,a||f.ownerDocument===p||(d(f),u=!g);while(v=e[h++])if(v(f,a||p,u)){s.push(f);break}c&&(C=E)}n&&((f=!v&&f)&&y--,o&&b.push(f))}if(y+=m,n&&m!==y){h=0;while(v=t[h++])v(b,x,a,u);if(o){if(y>0)while(m--)b[m]||x[m]||(x[m]=L.call(s));x=we(x)}q.apply(s,x),c&&!o&&x.length>0&&y+t.length>1&&oe.uniqueSort(s)}return c&&(C=E,l=w),b};return n?ue(o):o}return u=oe.compile=function(e,t){var n,r=[],i=[],o=k[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Te(t[n]))[x]?r.push(o):i.push(o);(o=k(e,Ee(i,r))).selector=e}return o},s=oe.select=function(e,t,n,i){var o,s,l,c,f,d="function"==typeof e&&e,p=!i&&a(e=d.selector||e);if(n=n||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(l=s[0]).type&&9===t.nodeType&&g&&r.relative[s[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(s.shift().value.length)}o=X.needsContext.test(e)?0:s.length;while(o--){if(l=s[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),J.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&ye(s)))return q.apply(n,i),n;break}}}return(d||u(e,p))(i,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=se(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),se(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&se(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||le(H,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var N=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=w.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return s.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&A.test(e)?w(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),S.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,j=w(r);var O=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function H(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return D(e,"iframe")?e.contentDocument:(D(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(P[e]||w.uniqueSort(i),O.test(e)&&i.reverse()),this.pushStack(i)}});var I=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(I)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=i||e.once,r=t=!0;a.length;u=-1){n=a.shift();while(++u-1)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function B(e){return e}function M(e){throw e}function W(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var u=this,s=arguments,l=function(){var e,l;if(!(t=o&&(r!==M&&(u=void 0,s=[e]),n.rejectWith(u,s))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:B,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:B)),n[2][3].add(a(0,e,g(r)?r:M))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],u=t[5];i[t[1]]=a.add,u&&a.add(function(){r=u},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),u=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(W(e,a.done(u(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)W(i[n],u(n),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&$.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function z(){r.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var _=function(e,t,n,r,i,o,a){var u=0,s=e.length,l=null==n;if("object"===b(n)){i=!0;for(u in n)_(e,t,u,n[u],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:w.Callbacks("once memory").add(function(){K.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?w.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var xe=r.documentElement,we=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ne(){return!1}function ke(){try{return r.activeElement}catch(e){}}function Ae(e,t,n,r,i,o){var a,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)Ae(e,u,n,r,t[u],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,l,c,f,d,p,h,g,v=K.get(e);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(xe,i),n.guid||(n.guid=w.guid++),(s=v.events)||(s=v.events={}),(a=v.handle)||(a=v.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;while(l--)p=g=(u=Te.exec(t[l])||[])[1],h=(u[2]||"").split(".").sort(),p&&(f=w.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=w.event.special[p]||{},c=w.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=s[p])||((d=s[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),w.event.global[p]=!0)}},remove:function(e,t,n,r,i){var o,a,u,s,l,c,f,d,p,h,g,v=K.hasData(e)&&K.get(e);if(v&&(s=v.events)){l=(t=(t||"").match(I)||[""]).length;while(l--)if(u=Te.exec(t[l])||[],p=g=u[1],h=(u[2]||"").split(".").sort(),p){f=w.event.special[p]||{},d=s[p=(r?f.delegateType:f.bindType)||p]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;while(o--)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||w.removeEvent(e,p,v.handle),delete s[p])}else for(p in s)w.event.remove(e,p+t[l],n,r,!0);w.isEmptyObject(s)&&K.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,u,s=new Array(arguments.length),l=(K.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(s[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&u.push({elem:l,handlers:o})}return l=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Se=/
+
+
\ No newline at end of file
diff --git a/public/themes/bootstrap/inc/header.inc.php b/public/themes/bootstrap/inc/header.inc.php
new file mode 100644
index 0000000..bf4321a
--- /dev/null
+++ b/public/themes/bootstrap/inc/header.inc.php
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/themes/bootstrap/theme.json b/public/themes/bootstrap/theme.json
new file mode 100644
index 0000000..c1018d6
--- /dev/null
+++ b/public/themes/bootstrap/theme.json
@@ -0,0 +1,107 @@
+{
+ "name": "Bootstrap",
+ "templates": {
+ "default": {
+ "title": "Default",
+ "description": "A regular page."
+ },
+ "home": {
+ "title": "Home",
+ "description": "A homepage."
+ },
+ "contact": {
+ "title": "Contact",
+ "description": "A page with a contact form."
+ }
+ },
+ "colors": {
+ "default": {
+ "title": "Default",
+ "description": "Standard Bootstrap theme"
+ },
+ "cerulean": {
+ "title": "Cerulean",
+ "description": "A calm blue sky"
+ },
+ "cosmo": {
+ "title": "Cosmo",
+ "description": "An ode to Metro"
+ },
+ "cyborg": {
+ "title": "Cyborg",
+ "description": "Jet black and electric blue"
+ },
+ "darkly": {
+ "title": "Darkly",
+ "description": "Flatly in night mode"
+ },
+ "flatly": {
+ "title": "Flatly",
+ "description": "Flat and modern"
+ },
+ "journal": {
+ "title": "Journal",
+ "description": "Crisp like a new sheet of paper"
+ },
+ "litera": {
+ "title": "Litera",
+ "description": "The medium is the message"
+ },
+ "lumen": {
+ "title": "Lumen",
+ "description": "Light and shadow"
+ },
+ "lux": {
+ "title": "Lux",
+ "description": "A touch of class"
+ },
+ "materia": {
+ "title": "Materia",
+ "description": "Material is the metaphor"
+ },
+ "minty": {
+ "title": "Minty",
+ "description": "A fresh feel"
+ },
+ "pulse": {
+ "title": "Pulse",
+ "description": "A trace of purple"
+ },
+ "sandstone": {
+ "title": "Sandstone",
+ "description": "A touch of warmth"
+ },
+ "simplex": {
+ "title": "Simplex",
+ "description": "Mini and minimalist"
+ },
+ "sketchy": {
+ "title": "Sketchy",
+ "description": "A hand-drawn look for mockups and mirth"
+ },
+ "slate": {
+ "title": "Slate",
+ "description": "Shades of gunmetal gray"
+ },
+ "solar": {
+ "title": "Solar",
+ "description": "A spin on Solarized"
+ },
+ "spacelab": {
+ "title": "Spacelab",
+ "description": "Silvery and sleek"
+ },
+ "superhero": {
+ "title": "Superhero",
+ "description": "The brave and the blue"
+ },
+ "united": {
+ "title": "United",
+ "description": "Ubuntu orange and unique font"
+ },
+ "yeti": {
+ "title": "Yeti",
+ "description": "A friendly foundation"
+ }
+ }
+}
diff --git a/settings.template.php b/settings.template.php
index 3285e7d..8bf762d 100644
--- a/settings.template.php
+++ b/settings.template.php
@@ -32,7 +32,10 @@ define("PORTAL_KEY", "123");
define("TIMEZONE", "America/Denver");
// Base URL for site links.
-define('URL', '.');
+define('URL', '/sitewriter');
+
+// Folder for public files
+define('FILE_UPLOAD_PATH', __DIR__ . '/public/files');
// Use Captcheck on login screen
// https://captcheck.netsyms.com
diff --git a/static/css/font/summernote.eot b/static/css/font/summernote.eot
new file mode 100644
index 0000000..4f5d02c
Binary files /dev/null and b/static/css/font/summernote.eot differ
diff --git a/static/css/font/summernote.ttf b/static/css/font/summernote.ttf
new file mode 100644
index 0000000..a5976db
Binary files /dev/null and b/static/css/font/summernote.ttf differ
diff --git a/static/css/font/summernote.woff b/static/css/font/summernote.woff
new file mode 100644
index 0000000..6c6dfaa
Binary files /dev/null and b/static/css/font/summernote.woff differ
diff --git a/static/css/summernote-lite.css b/static/css/summernote-lite.css
new file mode 100644
index 0000000..ad21730
--- /dev/null
+++ b/static/css/summernote-lite.css
@@ -0,0 +1 @@
+@font-face{font-family:"summernote";font-style:normal;font-weight:normal;src:url("./font/summernote.eot?dbafe969167589eda84514394d126413");src:url("./font/summernote.eot?#iefix") format("embedded-opentype"),url("./font/summernote.woff?dbafe969167589eda84514394d126413") format("woff"),url("./font/summernote.ttf?dbafe969167589eda84514394d126413") format("truetype")}[class^="note-icon-"]:before,[class*=" note-icon-"]:before{display:inline-block;font:normal normal normal 14px summernote;font-size:inherit;-webkit-font-smoothing:antialiased;text-decoration:inherit;text-rendering:auto;text-transform:none;vertical-align:middle;speak:none;-moz-osx-font-smoothing:grayscale}.note-icon-align-center:before,.note-icon-align-indent:before,.note-icon-align-justify:before,.note-icon-align-left:before,.note-icon-align-outdent:before,.note-icon-align-right:before,.note-icon-align:before,.note-icon-arrow-circle-down:before,.note-icon-arrow-circle-left:before,.note-icon-arrow-circle-right:before,.note-icon-arrow-circle-up:before,.note-icon-arrows-alt:before,.note-icon-arrows-h:before,.note-icon-arrows-v:before,.note-icon-bold:before,.note-icon-caret:before,.note-icon-chain-broken:before,.note-icon-circle:before,.note-icon-close:before,.note-icon-code:before,.note-icon-col-after:before,.note-icon-col-before:before,.note-icon-col-remove:before,.note-icon-eraser:before,.note-icon-font:before,.note-icon-frame:before,.note-icon-italic:before,.note-icon-link:before,.note-icon-magic:before,.note-icon-menu-check:before,.note-icon-minus:before,.note-icon-orderedlist:before,.note-icon-pencil:before,.note-icon-picture:before,.note-icon-question:before,.note-icon-redo:before,.note-icon-row-above:before,.note-icon-row-below:before,.note-icon-row-remove:before,.note-icon-special-character:before,.note-icon-square:before,.note-icon-strikethrough:before,.note-icon-subscript:before,.note-icon-summernote:before,.note-icon-superscript:before,.note-icon-table:before,.note-icon-text-height:before,.note-icon-trash:before,.note-icon-underline:before,.note-icon-undo:before,.note-icon-unorderedlist:before,.note-icon-video:before{display:inline-block;font-family:"summernote";font-style:normal;font-weight:normal;text-decoration:inherit}.note-icon-align-center:before{content:"\f101"}.note-icon-align-indent:before{content:"\f102"}.note-icon-align-justify:before{content:"\f103"}.note-icon-align-left:before{content:"\f104"}.note-icon-align-outdent:before{content:"\f105"}.note-icon-align-right:before{content:"\f106"}.note-icon-align:before{content:"\f107"}.note-icon-arrow-circle-down:before{content:"\f108"}.note-icon-arrow-circle-left:before{content:"\f109"}.note-icon-arrow-circle-right:before{content:"\f10a"}.note-icon-arrow-circle-up:before{content:"\f10b"}.note-icon-arrows-alt:before{content:"\f10c"}.note-icon-arrows-h:before{content:"\f10d"}.note-icon-arrows-v:before{content:"\f10e"}.note-icon-bold:before{content:"\f10f"}.note-icon-caret:before{content:"\f110"}.note-icon-chain-broken:before{content:"\f111"}.note-icon-circle:before{content:"\f112"}.note-icon-close:before{content:"\f113"}.note-icon-code:before{content:"\f114"}.note-icon-col-after:before{content:"\f115"}.note-icon-col-before:before{content:"\f116"}.note-icon-col-remove:before{content:"\f117"}.note-icon-eraser:before{content:"\f118"}.note-icon-font:before{content:"\f119"}.note-icon-frame:before{content:"\f11a"}.note-icon-italic:before{content:"\f11b"}.note-icon-link:before{content:"\f11c"}.note-icon-magic:before{content:"\f11d"}.note-icon-menu-check:before{content:"\f11e"}.note-icon-minus:before{content:"\f11f"}.note-icon-orderedlist:before{content:"\f120"}.note-icon-pencil:before{content:"\f121"}.note-icon-picture:before{content:"\f122"}.note-icon-question:before{content:"\f123"}.note-icon-redo:before{content:"\f124"}.note-icon-row-above:before{content:"\f125"}.note-icon-row-below:before{content:"\f126"}.note-icon-row-remove:before{content:"\f127"}.note-icon-special-character:before{content:"\f128"}.note-icon-square:before{content:"\f129"}.note-icon-strikethrough:before{content:"\f12a"}.note-icon-subscript:before{content:"\f12b"}.note-icon-summernote:before{content:"\f12c"}.note-icon-superscript:before{content:"\f12d"}.note-icon-table:before{content:"\f12e"}.note-icon-text-height:before{content:"\f12f"}.note-icon-trash:before{content:"\f130"}.note-icon-underline:before{content:"\f131"}.note-icon-undo:before{content:"\f132"}.note-icon-unorderedlist:before{content:"\f133"}.note-icon-video:before{content:"\f134"}.note-frame *{color:#000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}p{margin:0 0 10px}kbd{padding:3px 5px;font-weight:700;color:#fff;background-color:#000;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.note-toolbar{padding:10px 5px;border-bottom:1px solid #e2e2e2}.note-btn-group{position:relative;display:inline-block;margin-right:8px}.note-btn-group>.note-btn-group{margin-right:0}.note-btn-group>.note-btn,.note-btn-group>.note-btn-group{margin-left:-4px;border-radius:0}.note-btn-group>.note-btn.focus,.note-btn-group>.note-btn-group.focus,.note-btn-group>.note-btn.active,.note-btn-group>.note-btn-group.active{border-radius:0}.note-btn-group>.note-btn:first-child,.note-btn-group>.note-btn-group:first-child{margin-left:0;border-bottom-left-radius:1px;border-top-left-radius:1px}.note-btn-group>.note-btn:first-child.focus,.note-btn-group>.note-btn-group:first-child.focus,.note-btn-group>.note-btn:first-child.active,.note-btn-group>.note-btn-group:first-child.active{border-bottom-left-radius:1px;border-top-left-radius:1px}.note-btn-group>.note-btn:last-child:not(.note-dropdown),.note-btn-group>.note-btn-group:last-child:not(.note-dropdown){border-top-right-radius:1px;border-bottom-right-radius:1px}.note-btn-group>.note-btn:last-child:not(.note-dropdown).focus,.note-btn-group>.note-btn-group:last-child:not(.note-dropdown).focus,.note-btn-group>.note-btn:last-child:not(.note-dropdown).active,.note-btn-group>.note-btn-group:last-child:not(.note-dropdown).active{border-top-right-radius:1px;border-bottom-right-radius:1px}.note-btn-group.open>.note-dropdown{display:block}.note-btn{display:inline-block;padding:5px 10px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.4;color:#333;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;background-color:#fff;background-image:none;border:1px solid #fff;border-color:#fff;border-radius:1px;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:manipulation}.note-btn:focus,.note-btn.focus{color:#333;background-color:#ebebeb;border-color:#fff}.note-btn:hover{color:#333;background-color:#ebebeb;border-color:#fff}.note-btn.disabled:focus,.note-btn[disabled]:focus,fieldset[disabled] .note-btn:focus,.note-btn.disabled.focus,.note-btn[disabled].focus,fieldset[disabled] .note-btn.focus{background-color:#fff;border-color:#fff}.note-btn:hover,.note-btn:focus,.note-btn.focus{color:#333;text-decoration:none;background-color:#ebebeb;border:1px solid #fff;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;outline:0}.note-btn:active,.note-btn.active{background-image:none;outline:0}.note-btn.disabled,.note-btn[disabled],fieldset[disabled] .note-btn{cursor:not-allowed;-webkit-opacity:.65;-khtml-opacity:.65;-moz-opacity:.65;opacity:.65;-ms-filter:alpha(opacity=65);filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.note-btn-primary{color:#fff;background:#fa6362}.note-btn-primary:hover,.note-btn-primary:focus,.note-btn-primary.focus{color:#fff;text-decoration:none;background-color:#fa6362;border:1px solid #fff;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px}.note-btn-block{display:block;width:100%}.note-btn-block+.note-btn-block{margin-top:5px}input[type="submit"].note-btn-block,input[type="reset"].note-btn-block,input[type="button"].note-btn-block{width:100%}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.close{float:right;font-size:21px;line-height:1;color:#000;opacity:.2}.close:hover{-webkit-opacity:1;-khtml-opacity:1;-moz-opacity:1;opacity:1;-ms-filter:alpha(opacity=100);filter:alpha(opacity=100)}.note-dropdown{position:relative}.note-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:100px;padding:5px;text-align:left;background:#fff;border:1px solid #e2e2e2;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.06);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.06);box-shadow:0 1px 1px rgba(0,0,0,0.06);background-clip:padding-box}.note-btn-group.open .note-dropdown-menu{display:block}.note-dropdown-item{display:block}.note-dropdown-item:hover{background-color:#ebebeb}a.note-dropdown-item,a.note-dropdown-item:hover{margin:2px 0;color:#000;text-decoration:none}.note-modal{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-opacity:1;-khtml-opacity:1;-moz-opacity:1;opacity:1;-ms-filter:alpha(opacity=100);filter:alpha(opacity=100)}.note-modal.open{display:block}.note-modal-content{position:relative;width:auto;margin:30px 20px;background:#fff;border:1px solid rgba(0,0,0,0.2);outline:0;background-clip:border-box}.note-modal-header{padding:30px 20px 20px 20px;border:1px solid #ededef}.note-modal-header .close{margin-top:-10px}.note-modal-body{position:relative;padding:20px 30px}.note-modal-footer{height:40px;padding:10px;text-align:center}.note-modal-footer a{color:#337ab7;text-decoration:none}.note-modal-footer a:hover,.note-modal-footer a:focus{color:#23527c;text-decoration:underline}.note-modal-footer .note-btn{float:right}.note-modal-title{margin:0;font-size:26px;line-height:1.4;color:#42515f}.note-modal-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;background:#000;-webkit-opacity:.5;-khtml-opacity:.5;-moz-opacity:.5;opacity:.5;-ms-filter:alpha(opacity=50);filter:alpha(opacity=50)}.note-modal-backdrop.open{display:block}@media(min-width:768px){.note-modal-content{width:600px;margin:30px auto}}@media(min-width:992px){.note-modal-content-large{width:900px}}.note-form-group{padding-bottom:20px}.note-form-group:last-child{padding-bottom:0}.note-form-label{display:block;margin-bottom:10px;font-size:16px;font-weight:700;color:#42515f}.note-input{display:block;width:100%;padding:6px 4px;font-size:14px;background:#fff;border:1px solid #ededef;outline:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.note-input::-webkit-input-placeholder{color:#eee}.note-input:-moz-placeholder{color:#eee}.note-input::-moz-placeholder{color:#eee}.note-input:-ms-input-placeholder{color:#eee}.note-tooltip{position:absolute;z-index:1070;display:block;font-size:13px;-webkit-opacity:0;-khtml-opacity:0;-moz-opacity:0;opacity:0;-ms-filter:alpha(opacity=0);filter:alpha(opacity=0)}.note-tooltip.in{-webkit-opacity:.9;-khtml-opacity:.9;-moz-opacity:.9;opacity:.9;-ms-filter:alpha(opacity=90);filter:alpha(opacity=90)}.note-tooltip.top{padding:5px 0;margin-top:-3px}.note-tooltip.right{padding:0 5px;margin-left:3px}.note-tooltip.bottom{padding:5px 0;margin-top:3px}.note-tooltip.left{padding:0 5px;margin-left:-3px}.note-tooltip.bottom .note-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.note-tooltip.top .note-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.note-tooltip.right .note-tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.note-tooltip.left .note-tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.note-tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.note-tooltip-content{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000}.note-popover{position:absolute;z-index:1060;display:block;display:none;font-size:13px;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid #ccc}.note-popover.in{display:block}.note-popover.top{padding:5 0;margin-top:-3px}.note-popover.right{padding:0 5;margin-left:3px}.note-popover.bottom{padding:5 0;margin-top:3px}.note-popover.left{padding:0 5;margin-left:-3px}.note-popover.bottom .note-popover-arrow{top:-11px;left:50%;margin-left:-10px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.note-popover.bottom .note-popover-arrow::after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.note-popover.top .note-popover-arrow{bottom:-11px;left:50%;margin-left:-10px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.note-popover.top .note-popover-arrow::after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.note-popover.right .note-popover-arrow{top:50%;left:-11px;margin-top:-10px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.note-popover.right .note-popover-arrow::after{left:1px;margin-top:-10px;border-right-color:#fff;border-left-width:0;content:" "}.note-popover.left .note-popover-arrow{top:50%;right:-11px;margin-top:-10px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.note-popover.left .note-popover-arrow::after{right:1px;margin-top:-10px;border-left-color:#fff;border-right-width:0;content:" "}.note-popover-arrow{position:absolute;width:0;height:0;border:11px solid transparent}.note-popover-arrow::after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:10px;content:" "}.note-popover-content{min-width:100px;min-height:30px;padding:3px 8px;color:#000;text-align:center;background-color:#fff}.note-editor{position:relative}.note-editor .note-dropzone{position:absolute;z-index:100;display:none;color:#87cefa;background-color:#fff;opacity:.95;pointer-event:none}.note-editor .note-dropzone .note-dropzone-message{display:table-cell;font-size:28px;font-weight:700;text-align:center;vertical-align:middle}.note-editor .note-dropzone.hover{color:#098ddf}.note-editor.dragover .note-dropzone{display:table}.note-editor .note-editing-area{position:relative}.note-editor .note-editing-area p{margin:0 0 10px}.note-editor .note-editing-area .note-editable{outline:0}.note-editor .note-editing-area .note-editable table{width:100%;border-collapse:collapse}.note-editor .note-editing-area .note-editable table td,.note-editor .note-editing-area .note-editable table th{padding:5px 3px;border:1px solid #ececec}.note-editor .note-editing-area .note-editable sup{vertical-align:super}.note-editor .note-editing-area .note-editable sub{vertical-align:sub}.note-editor .note-editing-area .note-editable a{font-family:inherit;font-weight:inherit;color:#337ab7;text-decoration:inherit;background-color:inherit}.note-editor .note-editing-area .note-editable a:hover,.note-editor .note-editing-area .note-editable a:focus{color:#23527c;text-decoration:underline;outline:0}.note-editor .note-editing-area .note-editable figure{margin:0}.note-editor.note-frame{border:1px solid #a9a9a9}.note-editor.note-frame.codeview .note-editing-area .note-editable{display:none}.note-editor.note-frame.codeview .note-editing-area .note-codable{display:block}.note-editor.note-frame .note-editing-area{overflow:hidden}.note-editor.note-frame .note-editing-area .note-editable{padding:10px;overflow:auto;color:#000;word-wrap:break-word;background-color:#fff}.note-editor.note-frame .note-editing-area .note-editable[contenteditable="false"]{background-color:#e5e5e5}.note-editor.note-frame .note-editing-area .note-codable{display:none;width:100%;padding:10px;margin-bottom:0;font-family:Menlo,Monaco,monospace,sans-serif;font-size:14px;color:#ccc;background-color:#222;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;box-shadow:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;resize:none}.note-editor.note-frame.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100%!important}.note-editor.note-frame.fullscreen .note-editable{background-color:#fff}.note-editor.note-frame.fullscreen .note-resizebar{display:none}.note-editor.note-frame .note-status-output{display:block;width:100%;height:20px;margin-bottom:0;font-size:14px;line-height:1.42857143;color:#000;border:0;border-top:1px solid #e2e2e2}.note-editor.note-frame .note-status-output:empty{height:0;border-top:0 solid transparent}.note-editor.note-frame .note-status-output .pull-right{float:right!important}.note-editor.note-frame .note-status-output .text-muted{color:#777}.note-editor.note-frame .note-status-output .text-primary{color:#286090}.note-editor.note-frame .note-status-output .text-success{color:#3c763d}.note-editor.note-frame .note-status-output .text-info{color:#31708f}.note-editor.note-frame .note-status-output .text-warning{color:#8a6d3b}.note-editor.note-frame .note-status-output .text-danger{color:#a94442}.note-editor.note-frame .note-status-output .alert{padding:7px 10px 2px 10px;margin:-7px 0 0 0;color:#000;background-color:#f5f5f5;border-radius:0}.note-editor.note-frame .note-status-output .alert .note-icon{margin-right:5px}.note-editor.note-frame .note-status-output .alert-success{color:#3c763d!important;background-color:#dff0d8!important}.note-editor.note-frame .note-status-output .alert-info{color:#31708f!important;background-color:#d9edf7!important}.note-editor.note-frame .note-status-output .alert-warning{color:#8a6d3b!important;background-color:#fcf8e3!important}.note-editor.note-frame .note-status-output .alert-danger{color:#a94442!important;background-color:#f2dede!important}.note-editor.note-frame .note-statusbar{background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.note-editor.note-frame .note-statusbar .note-resizebar{width:100%;height:9px;padding-top:1px;cursor:ns-resize}.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar{width:20px;margin:1px auto;border-top:1px solid #a9a9a9}.note-editor.note-frame .note-statusbar.locked .note-resizebar{cursor:default}.note-editor.note-frame .note-statusbar.locked .note-resizebar .note-icon-bar{display:none}.note-editor.note-frame .note-placeholder{padding:10px}.note-popover{max-width:none}.note-popover .note-popover-content a{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.note-popover .note-popover-arrow{left:20px!important}.note-popover .note-popover-content,.note-toolbar{padding:0 0 5px 5px;margin:0;background-color:#fff}.note-popover .note-popover-content>.note-btn-group,.note-toolbar>.note-btn-group{margin-top:5px;margin-right:5px;margin-left:0}.note-popover .note-popover-content .note-btn-group .note-table,.note-toolbar .note-btn-group .note-table{min-width:0;padding:5px}.note-popover .note-popover-content .note-btn-group .note-table .note-dimension-picker,.note-toolbar .note-btn-group .note-table .note-dimension-picker{font-size:18px}.note-popover .note-popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher,.note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher{position:absolute!important;z-index:3;width:10em;height:10em;cursor:pointer}.note-popover .note-popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted,.note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted{position:relative!important;z-index:1;width:5em;height:5em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-popover .note-popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted,.note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted{position:absolute!important;z-index:2;width:1em;height:1em;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC') repeat}.note-popover .note-popover-content .note-style h1,.note-toolbar .note-style h1,.note-popover .note-popover-content .note-style h2,.note-toolbar .note-style h2,.note-popover .note-popover-content .note-style h3,.note-toolbar .note-style h3,.note-popover .note-popover-content .note-style h4,.note-toolbar .note-style h4,.note-popover .note-popover-content .note-style h5,.note-toolbar .note-style h5,.note-popover .note-popover-content .note-style h6,.note-toolbar .note-style h6,.note-popover .note-popover-content .note-style blockquote,.note-toolbar .note-style blockquote{margin:0}.note-popover .note-popover-content .note-color .dropdown-toggle,.note-toolbar .note-color .dropdown-toggle{width:20px;padding-left:5px}.note-popover .note-popover-content .note-color .note-dropdown-menu,.note-toolbar .note-color .note-dropdown-menu{min-width:346px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.note-popover .note-popover-content .note-color .note-dropdown-menu .note-palette,.note-toolbar .note-color .note-dropdown-menu .note-palette{display:inline-block;width:160px;margin:0}.note-popover .note-popover-content .note-color .note-dropdown-menu .note-palette:first-child,.note-toolbar .note-color .note-dropdown-menu .note-palette:first-child{margin:0 5px;margin-right:15px}.note-popover .note-popover-content .note-color .note-dropdown-menu .note-palette .note-palette-title,.note-toolbar .note-color .note-dropdown-menu .note-palette .note-palette-title{margin:2px 7px;font-size:12px;text-align:center;border-bottom:1px solid #eee}.note-popover .note-popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset,.note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset{width:100%;padding:2px 3px;margin:3px;cursor:pointer;background-color:#fff;border:0;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.note-popover .note-popover-content .note-color .note-dropdown-menu .note-palette .note-color-row,.note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-row{height:20px}.note-popover .note-popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset:hover,.note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset:hover{background:#eee}.note-popover .note-popover-content .note-para .note-dropdown-menu,.note-toolbar .note-para .note-dropdown-menu{min-width:216px;padding:5px}.note-popover .note-popover-content .note-para .note-dropdown-menu>div:first-child,.note-toolbar .note-para .note-dropdown-menu>div:first-child{margin-right:5px}.note-popover .note-popover-content .note-btn-fontname .note-dropdown-menu,.note-toolbar .note-btn-fontname .note-dropdown-menu{min-width:200px}.note-popover .note-popover-content .note-dropdown-menu,.note-toolbar .note-dropdown-menu{min-width:160px}.note-popover .note-popover-content .note-dropdown-menu.right,.note-toolbar .note-dropdown-menu.right{right:0;left:auto}.note-popover .note-popover-content .note-dropdown-menu.right::before,.note-toolbar .note-dropdown-menu.right::before{right:9px;left:auto!important}.note-popover .note-popover-content .note-dropdown-menu.right::after,.note-toolbar .note-dropdown-menu.right::after{right:10px;left:auto!important}.note-popover .note-popover-content .note-dropdown-menu.note-check .note-dropdown-item i,.note-toolbar .note-dropdown-menu.note-check .note-dropdown-item i{color:deepskyblue;visibility:hidden}.note-popover .note-popover-content .note-dropdown-menu.note-check .note-dropdown-item.checked i,.note-toolbar .note-dropdown-menu.note-check .note-dropdown-item.checked i{visibility:visible}.note-popover .note-popover-content .note-dropdown-menu .note-dropdown-item>*,.note-toolbar .note-dropdown-menu .note-dropdown-item>*{margin:0}.note-popover .note-popover-content .note-fontsize-10,.note-toolbar .note-fontsize-10{font-size:10px}.note-popover .note-popover-content .note-color-palette,.note-toolbar .note-color-palette{line-height:1}.note-popover .note-popover-content .note-color-palette div .note-color-btn,.note-toolbar .note-color-palette div .note-color-btn{width:20px;height:20px;padding:0;margin:0;border:1px solid #fff}.note-popover .note-popover-content .note-color-palette div .note-color-btn:hover,.note-toolbar .note-color-palette div .note-color-btn:hover{border:1px solid #000}.note-modal .note-modal-body label{display:inline-block;padding:2px 5px;margin-bottom:2px}.note-modal .note-modal-body .help-list-item:hover{background-color:#e0e0e0}@-moz-document url-prefix(){.note-image-input{height:auto}}.note-placeholder{position:absolute;display:none;color:gray}.note-handle .note-control-selection{position:absolute;display:none;border:1px solid black}.note-handle .note-control-selection>div{position:absolute}.note-handle .note-control-selection .note-control-selection-bg{width:100%;height:100%;background-color:#000;-webkit-opacity:.3;-khtml-opacity:.3;-moz-opacity:.3;opacity:.3;-ms-filter:alpha(opacity=30);filter:alpha(opacity=30)}.note-handle .note-control-selection .note-control-handle{width:7px;height:7px;border:1px solid #000}.note-handle .note-control-selection .note-control-holder{width:7px;height:7px;border:1px solid #000}.note-handle .note-control-selection .note-control-sizing{width:7px;height:7px;background-color:#fff;border:1px solid #000}.note-handle .note-control-selection .note-control-nw{top:-5px;left:-5px;border-right:0;border-bottom:0}.note-handle .note-control-selection .note-control-ne{top:-5px;right:-5px;border-bottom:0;border-left:none}.note-handle .note-control-selection .note-control-sw{bottom:-5px;left:-5px;border-top:0;border-right:0}.note-handle .note-control-selection .note-control-se{right:-5px;bottom:-5px;cursor:se-resize}.note-handle .note-control-selection .note-control-se.note-control-holder{cursor:default;border-top:0;border-left:none}.note-handle .note-control-selection .note-control-selection-info{right:0;bottom:0;padding:5px;margin:5px;font-size:12px;color:#fff;background-color:#000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-opacity:.7;-khtml-opacity:.7;-moz-opacity:.7;opacity:.7;-ms-filter:alpha(opacity=70);filter:alpha(opacity=70)}.note-hint-popover{min-width:100px;padding:2px}.note-hint-popover .note-popover-content{max-height:150px;padding:3px;overflow:auto}.note-hint-popover .note-popover-content .note-hint-group .note-hint-item{display:block!important;padding:3px}.note-hint-popover .note-popover-content .note-hint-group .note-hint-item.active,.note-hint-popover .note-popover-content .note-hint-group .note-hint-item:hover{display:block;clear:both;font-weight:400;line-height:1.4;color:#fff;text-decoration:none;white-space:nowrap;cursor:pointer;background-color:#428bca;outline:0}.help-list-item label{display:inline-block;margin-bottom:5px}
\ No newline at end of file
diff --git a/static/js/editor.js b/static/js/editor.js
new file mode 100644
index 0000000..f1efed3
--- /dev/null
+++ b/static/js/editor.js
@@ -0,0 +1,31 @@
+/*
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+$(".sw-editable").summernote({
+ airMode: false,
+ toolbar: [
+ ['style', ['bold', 'italic', 'underline', 'clear']],
+ ['font', ['strikethrough', 'superscript', 'subscript']],
+ ['fontsize', ['fontsize']],
+ ['para', ['ul', 'ol']],
+ ['insert', ['link', 'picture']],
+ ['misc', ['undo', 'redo', 'fullscreen', 'codeview']]
+ ],
+ placeholder: 'Click to edit'
+});
+
+function saveEdits() {
+ var components = [];
+ $(".sw-editable").each(function (e) {
+ components[$(this).data("component")] = $(this).html();
+ });
+ var content = JSON.stringify(components);
+ $.post(save_url, {
+ action: "saveedits",
+ page: "",
+ content: content
+ });
+}
\ No newline at end of file
diff --git a/static/js/summernote-lite.js b/static/js/summernote-lite.js
new file mode 100644
index 0000000..d7f87c6
--- /dev/null
+++ b/static/js/summernote-lite.js
@@ -0,0 +1,7837 @@
+/**
+ * Super simple wysiwyg editor v0.8.10
+ * https://summernote.org
+ *
+ * Copyright 2013- Alan Hong. and other contributors
+ * summernote may be freely distributed under the MIT license.
+ *
+ * Date: 2018-02-20T00:34Z
+ */
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
+ typeof define === 'function' && define.amd ? define(['jquery'], factory) :
+ (factory(global.jQuery));
+}(this, (function ($$1) { 'use strict';
+
+$$1 = $$1 && $$1.hasOwnProperty('default') ? $$1['default'] : $$1;
+
+var Renderer = /** @class */ (function () {
+ function Renderer(markup, children, options, callback) {
+ this.markup = markup;
+ this.children = children;
+ this.options = options;
+ this.callback = callback;
+ }
+ Renderer.prototype.render = function ($parent) {
+ var $node = $$1(this.markup);
+ if (this.options && this.options.contents) {
+ $node.html(this.options.contents);
+ }
+ if (this.options && this.options.className) {
+ $node.addClass(this.options.className);
+ }
+ if (this.options && this.options.data) {
+ $$1.each(this.options.data, function (k, v) {
+ $node.attr('data-' + k, v);
+ });
+ }
+ if (this.options && this.options.click) {
+ $node.on('click', this.options.click);
+ }
+ if (this.children) {
+ var $container_1 = $node.find('.note-children-container');
+ this.children.forEach(function (child) {
+ child.render($container_1.length ? $container_1 : $node);
+ });
+ }
+ if (this.callback) {
+ this.callback($node, this.options);
+ }
+ if (this.options && this.options.callback) {
+ this.options.callback($node);
+ }
+ if ($parent) {
+ $parent.append($node);
+ }
+ return $node;
+ };
+ return Renderer;
+}());
+var renderer = {
+ create: function (markup, callback) {
+ return function () {
+ var options = typeof arguments[1] === 'object' ? arguments[1] : arguments[0];
+ var children = $$1.isArray(arguments[0]) ? arguments[0] : [];
+ if (options && options.children) {
+ children = options.children;
+ }
+ return new Renderer(markup, children, options, callback);
+ };
+ }
+};
+
+var TooltipUI = /** @class */ (function () {
+ function TooltipUI($node, options) {
+ this.$node = $node;
+ this.options = $.extend({}, {
+ title: '',
+ target: options.container,
+ trigger: 'hover focus',
+ placement: 'bottom'
+ }, options);
+ // create tooltip node
+ this.$tooltip = $([
+ ''
+ ].join(''));
+ // define event
+ if (this.options.trigger !== 'manual') {
+ var showCallback_1 = this.show.bind(this);
+ var hideCallback_1 = this.hide.bind(this);
+ var toggleCallback_1 = this.toggle.bind(this);
+ this.options.trigger.split(' ').forEach(function (eventName) {
+ if (eventName === 'hover') {
+ $node.off('mouseenter mouseleave');
+ $node.on('mouseenter', showCallback_1).on('mouseleave', hideCallback_1);
+ }
+ else if (eventName === 'click') {
+ $node.on('click', toggleCallback_1);
+ }
+ else if (eventName === 'focus') {
+ $node.on('focus', showCallback_1).on('blur', hideCallback_1);
+ }
+ });
+ }
+ }
+ TooltipUI.prototype.show = function () {
+ var $node = this.$node;
+ var offset = $node.offset();
+ var $tooltip = this.$tooltip;
+ var title = this.options.title || $node.attr('title') || $node.data('title');
+ var placement = this.options.placement || $node.data('placement');
+ $tooltip.addClass(placement);
+ $tooltip.addClass('in');
+ $tooltip.find('.note-tooltip-content').text(title);
+ $tooltip.appendTo(this.options.target);
+ var nodeWidth = $node.outerWidth();
+ var nodeHeight = $node.outerHeight();
+ var tooltipWidth = $tooltip.outerWidth();
+ var tooltipHeight = $tooltip.outerHeight();
+ if (placement === 'bottom') {
+ $tooltip.css({
+ top: offset.top + nodeHeight,
+ left: offset.left + (nodeWidth / 2 - tooltipWidth / 2)
+ });
+ }
+ else if (placement === 'top') {
+ $tooltip.css({
+ top: offset.top - tooltipHeight,
+ left: offset.left + (nodeWidth / 2 - tooltipWidth / 2)
+ });
+ }
+ else if (placement === 'left') {
+ $tooltip.css({
+ top: offset.top + (nodeHeight / 2 - tooltipHeight / 2),
+ left: offset.left - tooltipWidth
+ });
+ }
+ else if (placement === 'right') {
+ $tooltip.css({
+ top: offset.top + (nodeHeight / 2 - tooltipHeight / 2),
+ left: offset.left + nodeWidth
+ });
+ }
+ };
+ TooltipUI.prototype.hide = function () {
+ this.$tooltip.removeClass('in');
+ this.$tooltip.remove();
+ };
+ TooltipUI.prototype.toggle = function () {
+ if (this.$tooltip.hasClass('in')) {
+ this.hide();
+ }
+ else {
+ this.show();
+ }
+ };
+ return TooltipUI;
+}());
+
+var DropdownUI = /** @class */ (function () {
+ function DropdownUI($node, options) {
+ this.$button = $node;
+ this.options = $.extend({}, {
+ target: options.container
+ }, options);
+ this.setEvent();
+ }
+ DropdownUI.prototype.setEvent = function () {
+ this.$button.on('click', this.toggle.bind(this));
+ };
+ DropdownUI.prototype.clear = function () {
+ var $parent = $('.note-btn-group.open');
+ $parent.find('.note-btn.active').removeClass('active');
+ $parent.removeClass('open');
+ };
+ DropdownUI.prototype.show = function () {
+ this.$button.addClass('active');
+ this.$button.parent().addClass('open');
+ var $dropdown = this.$button.next();
+ var offset = $dropdown.offset();
+ var width = $dropdown.outerWidth();
+ var windowWidth = $(window).width();
+ var targetMarginRight = parseFloat($(this.options.target).css('margin-right'));
+ if (offset.left + width > windowWidth - targetMarginRight) {
+ $dropdown.css('margin-left', windowWidth - targetMarginRight - (offset.left + width));
+ }
+ else {
+ $dropdown.css('margin-left', '');
+ }
+ };
+ DropdownUI.prototype.hide = function () {
+ this.$button.removeClass('active');
+ this.$button.parent().removeClass('open');
+ };
+ DropdownUI.prototype.toggle = function () {
+ var isOpened = this.$button.parent().hasClass('open');
+ this.clear();
+ if (isOpened) {
+ this.hide();
+ }
+ else {
+ this.show();
+ }
+ };
+ return DropdownUI;
+}());
+$(document).on('click', function (e) {
+ if (!$(e.target).closest('.note-btn-group').length) {
+ $('.note-btn-group.open').removeClass('open');
+ }
+});
+$(document).on('click.note-dropdown-menu', function (e) {
+ $(e.target).closest('.note-dropdown-menu').parent().removeClass('open');
+});
+
+var ModalUI = /** @class */ (function () {
+ function ModalUI($node, options) {
+ this.options = $.extend({}, {
+ target: options.container || 'body'
+ }, options);
+ this.$modal = $node;
+ this.$backdrop = $('');
+ }
+ ModalUI.prototype.show = function () {
+ if (this.options.target === 'body') {
+ this.$backdrop.css('position', 'fixed');
+ this.$modal.css('position', 'fixed');
+ }
+ else {
+ this.$backdrop.css('position', 'absolute');
+ this.$modal.css('position', 'absolute');
+ }
+ this.$backdrop.appendTo(this.options.target).show();
+ this.$modal.appendTo(this.options.target).addClass('open').show();
+ this.$modal.trigger('note.modal.show');
+ this.$modal.off('click', '.close').on('click', '.close', this.hide.bind(this));
+ };
+ ModalUI.prototype.hide = function () {
+ this.$modal.removeClass('open').hide();
+ this.$backdrop.hide();
+ this.$modal.trigger('note.modal.hide');
+ };
+ return ModalUI;
+}());
+
+var editor = renderer.create('');
+var toolbar = renderer.create('');
+var editingArea = renderer.create('');
+var codable = renderer.create('');
+var editable = renderer.create('');
+var statusbar = renderer.create([
+ '',
+ '',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
'
+].join(''));
+var airEditor = renderer.create('');
+var airEditable = renderer.create([
+ '',
+ ''
+].join(''));
+var buttonGroup = renderer.create('');
+var button = renderer.create('