diff --git a/app/assets/json/global/app-menu-map.json b/app/assets/json/global/app-menu-map.json index f7a85f5..43c797e 100644 --- a/app/assets/json/global/app-menu-map.json +++ b/app/assets/json/global/app-menu-map.json @@ -1,101 +1,65 @@ [ { - "label": "Bypass", + "label": "Live Arena", "icon": "icon-bolt", - "collapsed": true, + "collapsed": false, + "access": ["*"], "items": [ { - "label": "Monitoring", - "icon": "icon-dashboard", - "route": "/bypass", - "access": [ "BP_PO", "BP_HoU" ] + "label": "Space view", + "icon": "icon-website", + "route": "/live/spaceViewer", + "access": ["*"] }, { - "label": "EIC Fast Track", - "icon": "icon-dashboard", - "route": "/bypass/fast-tracks", - "access": [ "BP_SPOC_FastTrack" ] + "label": "Spacetime explorer", + "icon": "icon-hour-glass", + "route": "/live/stats", + "access": ["*"] }, { - "label": "EIC Plug In", - "icon": "icon-dashboard", - "route": "/bypass/plugins", - "access": [ "BP_SPOC_Plugin" ] + "label": "Agent processes", + "icon": "icon-cogs", + "route": "/live/dashboards/agents", + "access": ["*"] }, { - "label": "Guidelines", - "icon": "icon-help", - "route": "/bypass/guidelines", - "access": [ "BP_PO", "BP_HoU","BP_SPOC_Plugin","BP_SPOC_FastTrack" ] + "label": "System", + "icon": "icon-dashboard", + "route": "/live/dashboards/system", + "access": ["*"] + }, + { + "label": "Statistics", + "icon": "icon-stats", + "route": "/live/stats", + "access": ["*"] } ] }, { - "label": "My EIC", - "icon": "icon-home", + "label": "Arenas recorder", + "icon": "icon-history", "collapsed": true, + "access": ["*"], "items": [ { - "label": "Overview", - "icon": "icon-dashboard", - "route": "/applicant", - "access": [ "Org_Member" ] - } - ] - }, - { - "label": "ICMP", - "icon": "icon-company", - "items": [ - { - "label": "Monitoring", - "icon": "icon-dashboard", - "route": "/icmp", - "access": [ "PROJECT_PO", "PROJECT_FIO" ] + "label": "Space view", + "icon": "icon-website", + "route": "/records/spaceViewer", + "access": ["*"] }, { - "label": "Dashboard", - "icon": "icon-dashboard", - "route": "/icmp", - "access": [ "PROJECT_TechDDExpert" ] - } - ] - }, - { - "label": "SoE", - "icon": "icon-star-full", - "collapsed": true, - "items": [ - { - "label": "Overview", - "icon": "icon-dashboard", - "route": "/soe", - "access": [ "EIC_dev", "EIC_Admin", "SOE_National", "SOE_Admin" ] - } - ] - }, - { - "label": "Coachings", - "icon": "icon-coaching", - "collapsed": true, - "items": [ - { - "label": "Admin dashboard", - "icon": "icon-dashboard", - "route": "/coachings/admin", - "access": [ "EIC_Dev", "EIC_Admin" ] + "label": "Statistics", + "icon": "icon-stats", + "route": "/records/stats", + "access": ["*"] }, { - "label": "Coach dashboard", - "icon": "icon-dashboard", - "route": "/coachings/coach", - "access": [ "EIC_Dev", "EIC_Admin" ] - }, - { - "label": "Applicant coaching", - "icon": "icon-coaching", - "route": "/coachings/coaching/1234", - "access": [ "EIC_Dev", "EIC_Admin" ] + "label": "Keyframe editor", + "icon": "icon-edit", + "route": "/records/editor", + "access": ["*"] } ] }, @@ -103,73 +67,25 @@ "label": "Dev tools", "icon": "icon-cogs", "collapsed": true, + "access": ["admin"], "items": [ { - "label": "System Health Check", + "label": "Client Health Check", "icon": "icon-health", "route": "/system/healthcheck", - "access": [ "EIC_Dev" ] + "access": [ "admin" ] }, { "label": "App Style Guide", "icon": "icon-image", "route": "/system/styleguide", - "access": [ "EIC_Dev" ] + "access": [ "admin" ] }, { "label": "EICUI Components", "icon": "icon-cogs", "route": "/system/eicui", - "access": [ "EIC_Dev" ] - } - ] - }, - { - "label": "Communication", - "icon": "icon-share", - "items": [ - { - "label": "Platform Control", - "icon": "icon-logoff", - "route": "/system/control", - "access": [ "EIC_Dev" ] - }, - { - "label": "Mailings", - "icon": "icon-envelope", - "route": "/mailings", - "access": [ "MAIL_Editor", "MAIL_Reviewer", "MAIL_Sender", "EIC_Dev", "EIC_Admin" ] - }, - { - "label": "Templates", - "icon": "icon-edit", - "route": "/templates", - "access": [ "TEMPLATE_Editor", "TEMPLATE_Reviewer", "EIC_Dev", "EIC_Admin" ] - } - ] - }, - { - "label": "Fun stuffs", - "icon": "icon-face-smile", - "collapsed": true, - "items": [ - { - "label": "CarmeloMatic 3000", - "icon": "icon-coaching", - "route": "/system/sampler", - "access": [ "EIC_Dev" ] - }, - { - "label": "Magic Chalkboard", - "icon": "icon-edit", - "route": "/system/chalkboard", - "access": [ "EIC_Dev" ] - }, - { - "label": "Data explorer", - "icon": "icon-servers", - "route": "/system/explorer", - "access": [ "EIC_Dev" ] + "access": [ "admin" ] } ] }, @@ -177,19 +93,20 @@ "label": "About", "icon": "icon-info", "collapsed": true, + "access": ["*"], "items": [ { - "label": "Legal notice", - "icon": "icon-info", - "route": "/about/legalnotice", + "label": "Help center", + "icon": "icon-help", + "route": "/about/help", "access": [ "*" ] }, { - "label": "Support", - "icon": "icon-help", - "route": "/about/support", + "label": "About", + "icon": "icon-info", + "route": "/about/about", "access": [ "*" ] - } - ] + } + ] } ] diff --git a/app/assets/json/threetobus/eventsMapping.json b/app/assets/json/threetobus/eventsMapping.json index 84a7b37..e5dde74 100644 --- a/app/assets/json/threetobus/eventsMapping.json +++ b/app/assets/json/threetobus/eventsMapping.json @@ -13,7 +13,7 @@ "position.y": "coords.z" }, "tween": true, - "tweenDelay": 1000 + "tweenDelay": 200 } ] } diff --git a/app/assets/styles/app.css b/app/assets/styles/app.css index da3147c..45d85f8 100755 --- a/app/assets/styles/app.css +++ b/app/assets/styles/app.css @@ -238,7 +238,10 @@ body[eicapp] { } [eicapp] .app-content-thesaurus [eicchip] label { cursor: pointer; } - +[eicapp] article[eiccard] { + background-color: #1d261d; + color:#EEE; +} [eicapp] [eicdialog][device="tablet"] > [eiccard] { max-height: 95vh; max-width: 95vw; @@ -309,4 +312,18 @@ div.window > section:first-of-type > article[eiccard]:first-of-type{ } div.window header .controls menu[data-output="settingsMenu"]{ background: var(--app-color-secondary) -} \ No newline at end of file +} + +menu[eicmenu] [menuitem] .nolink label { + color: #CFC; +} +menu[eicmenu] [menuitem] a label { + color: #4E4; +} +menu[eicmenu] [menuitem] i[class^="icon-"] { + color:white; +} +/* +[eicdropdown] > menu{ + +}*/ \ No newline at end of file diff --git a/app/config/baseRoutes.json b/app/config/baseRoutes.json index 0965bfa..598713e 100755 --- a/app/config/baseRoutes.json +++ b/app/config/baseRoutes.json @@ -12,18 +12,18 @@ "method": "_401" }, { - "url": "/dashboard", - "role": [ "admin" ], - "controller" : "/dashboard/DashboardsController" + "url": "/live", + "role": [ "*" ], + "controller" : "/live/DashboardsController" }, - { - "url": "/", - "role": "admin", - "exturl": "/dashboard" + { + "url": "/system", + "role": "*", + "controller" : "/system/systemController" }, { "url": "/", "role": [ "*" ], - "exturl": "/dashboard" + "exturl": "/live" } ] \ No newline at end of file diff --git a/app/controllers/dashboard/DashboardsController.js b/app/controllers/live/DashboardsController.js similarity index 99% rename from app/controllers/dashboard/DashboardsController.js rename to app/controllers/live/DashboardsController.js index 7600957..67506ca 100644 --- a/app/controllers/dashboard/DashboardsController.js +++ b/app/controllers/live/DashboardsController.js @@ -11,7 +11,7 @@ class DashboardsController extends EICController { * * @returns */ - index() { + spaceViewer() { const models = { } diff --git a/app/controllers/dashboard/DashboardsController.json b/app/controllers/live/DashboardsController.json similarity index 77% rename from app/controllers/dashboard/DashboardsController.json rename to app/controllers/live/DashboardsController.json index 9fee6a3..b205a0a 100644 --- a/app/controllers/dashboard/DashboardsController.json +++ b/app/controllers/live/DashboardsController.json @@ -2,9 +2,14 @@ "routes": [ { "url": "/", - "role": [ "admin" ], - "controller" : "/dashboard/DashboardsController", - "method": "index" + "role": [ "*" ], + "exturl": "/live/spaceviewer" + }, + { + "url": "/spaceviewer", + "role": [ "*" ], + "controller" : "/live/DashboardsController", + "method": "spaceViewer" } ], "models": [ diff --git a/app/controllers/system/systemController.js b/app/controllers/system/systemController.js new file mode 100755 index 0000000..009c288 --- /dev/null +++ b/app/controllers/system/systemController.js @@ -0,0 +1,107 @@ +class systemController extends EICController { + + /** + * Platform access control + * + * @param {*} params + */ + control() { + app.meta.add('user-roles', app.Assets.Store.json['user-roles']); + app.meta.add('user-messages', app.Assets.Store.json['user-messages']); + let models = { + platform: new PlatformModel() + } + + this.loadWindow( + 'system/admin/platform-control/AdminAccessControlView', + { title: 'Platform Control', static: true, expanded: true }, + { models: models } + ); + } + + explore() { + + + app.User.getBusinessPermissions([ '/storage/entities' ], 'EIC_Admin') + .then(payload => { + + console.log(payload) + + let models = { + ml: new MarklogicModel(payload['/storage/entities'].permissions) + } + + this.loadWindow( + 'system/admin/explorer/DataExplorerView', + { title: 'Data explorer', static: true, expanded: true }, + { models: models } + ); + }) + } + + /** + * System Health check content + * + * @param {*} params + */ + healthcheck() { + + this.loadWindow('system/tools/statusView', { + title: 'Health Check', + static: true, + expanded: true + } + ); + } + + /** + * + */ + async styleguide() { + + await Loader.loadViews(["system/tools/styleguideView"]); + + this.loadWindow('system/tools/styleguideView', { + title: 'Style guide', + static: true, + expanded: true + }); + } + + /** + * + */ + async eicui() { + + await Loader.loadViews(["system/tools/EICUIView"]); + + this.loadWindow( + 'system/tools/EICUIView', + { title: 'EICUI', static: true, expanded: true} + ); + } + + sampler(params) { + this.loadWindow( + 'system/lab/SamplerView', + { title: 'SAMPLER3000', static: true, expanded: true } + ); + } + + chalkboard(params) { + this.loadWindow( + 'system/lab/ChalkboardView', + { title: 'Chalkboard', static: true, expanded: true } + ); + } + + components(params) { + this.loadWindow('system/lab/ComponentLabView', { + title: 'Component Lab', + static: true, + expanded: true + }); + } +} + +app.registerClass('systemController', systemController); \ No newline at end of file diff --git a/app/controllers/system/systemController.json b/app/controllers/system/systemController.json new file mode 100755 index 0000000..dc1edcf --- /dev/null +++ b/app/controllers/system/systemController.json @@ -0,0 +1,48 @@ +{ + "routes": [ + { + "url": "/healthcheck", + "role": "*", + "controller" : "/system/systemController", + "method": "healthcheck" + }, + { + "url": "/styleguide", + "role": "*", + "controller" : "/system/systemController", + "method": "styleguide" + }, + { + "url": "/eicui", + "role": "*", + "controller" : "/system/systemController", + "method": "eicui" + } + ], + "models": [ + ], + "views": [ + "system/tools/statusView", + "system/tools/dialogs/codeTemplateDialog" + ], + "controllerDependencies": [ + "/thirdparty/eicui/plugins/FileUpload/FileUpload", + "/thirdparty/eicui/plugins/Charts/Charts", + "/thirdparty/beautify/beautify.min", + "/thirdparty/beautify/beautify.html.min", + "/thirdparty/beautify/beautify.css.min", + "/thirdparty/highlight/highlight.min", + "/helpers/basicDialogs" + ], + "assets": { + "styles": [ + { "name":"FileUpload.css", "path":"/app/thirdparty/eicui/plugins/FileUpload/" }, + { "name":"Charts.css", "path":"/app/thirdparty/eicui/plugins/Charts/" }, + { "name":"monokai.min.css", "path":"/app/thirdparty/highlight/styles/" } + ], + "json": [ + { "id": "user-roles", "name": "global/user-roles.json" }, + { "id": "user-messages", "name": "system/user-messages.json" } + ] + } +} \ No newline at end of file diff --git a/app/thirdparty/beautify/beautify.css.min.js b/app/thirdparty/beautify/beautify.css.min.js new file mode 100644 index 0000000..b3667c6 --- /dev/null +++ b/app/thirdparty/beautify/beautify.css.min.js @@ -0,0 +1 @@ +!function(){!function(){"use strict";var n=[,,function(t){function _(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function i(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",0this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},_.prototype._allow_wrap=function(){var t;return!!this._should_wrap()&&(this.__parent.add_new_line(),(t=this.__parent.current_line).set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),--t.__character_count),!0)},_.prototype.is_empty=function(){return 0===this.__items.length},_.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},_.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},_.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},_.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},i.prototype.__add_column=function(){var t,e=this.__cache.length,i="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,i=new Array(t+1).join(this.__indent_string)),e&&(i+=new Array(e+1).join(" ")),this.__cache.push(i)},e.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},e.prototype.get_line_number=function(){return this.__lines.length},e.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},e.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},e.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},e.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},e.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop(),e=(e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline(),this.__lines.join("\n"));return e="\n"!==t?e.replace(/[\n]/g,t):e},e.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},e.prototype.set_indent=function(t,e){return this.next_line.set_indent(t=t||0,e=e||0),1=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=e},,,,,function(t){function e(t,e){t="string"==typeof t?t:t.source,e="string"==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,"g")}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;for(var e={},i=(this.__directive_pattern.lastIndex=0,this.__directive_pattern.exec(t));i;)e[i[1]]=i[2],i=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},,function(t,e,i){var n=i(16).Beautifier,_=i(17).Options;t.exports=function(t,e){return new n(t,e).beautify()},t.exports.defaultOptions=function(){return new _}},function(t,e,i){var n=i(17).Options,w=i(2).Output,y=i(8).InputScanner,v=new(i(13).Directives)(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,b=/\r\n|[\r\n]/g,k=/\s/,x=/(?:\s|\n)+/g,O=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,E=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function _(t,e){this._source_text=t||"",this._options=new n(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}_.prototype.eatString=function(t){var e="";for(this._ch=this._input.next();this._ch;){if(e+=this._ch,"\\"===this._ch)e+=this._input.next();else if(-1!==t.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return e},_.prototype.eatWhitespace=function(t){for(var e=k.test(this._input.peek()),i=0;k.test(this._input.peek());)this._ch=this._input.next(),t&&"\n"===this._ch&&(0===i||i=this._nestedLevel):this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&r&&this._output.previous_line&&"{"!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,"expand"===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):("("===e?this._output.space_before_token=!1:","!==e&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if("}"===this._ch)this.outdent(),this._output.add_new_line(),"{"===e&&this._output.trim(!0),p=a=!1,h&&(this.outdent(),h=!1),this.print_string(this._ch),r=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&"}"!==this._input.peek()&&this._output.add_new_line(!0),")"===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var g=0;g"!==this._ch&&"+"!==this._ch&&"~"!==this._ch||h||0!==s?"]"===this._ch?this.print_string(this._ch):"["===this._ch?(this.preserveSingleSpace(t),this.print_string(this._ch)):"="===this._ch?(this.eatWhitespace(),this.print_string("="),k.test(this._ch)&&(this._ch="")):"!"!==this._ch||this._input.lookBack("\\")?(this.preserveSingleSpace('"'===e||"'"===e||t),this.print_string(this._ch),!this._output.just_added_newline()&&"\n"===this._input.peek()&&l&&this._output.add_new_line()):(this._output.space_before_token=!0,this.print_string(this._ch)):this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&k.test(this._ch)&&(this._ch=""));return this._output.get_code(n)},t.exports.Beautifier=_},function(t,e,i){var n=i(6).Options;function _(t){n.call(this,t,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var t=this._get_boolean("space_around_selector_separator"),e=(this.space_around_combinator=this._get_boolean("space_around_combinator")||t,this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]));this.brace_style="collapse";for(var i=0;ithis.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},_.prototype._allow_wrap=function(){var t;return!!this._should_wrap()&&(this.__parent.add_new_line(),(t=this.__parent.current_line).set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),--t.__character_count),!0)},_.prototype.is_empty=function(){return 0===this.__items.length},_.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},_.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},_.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},_.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t,e=this.__cache.length,n="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)},e.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},e.prototype.get_line_number=function(){return this.__lines.length},e.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},e.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},e.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},e.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},e.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop(),e=(e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline(),this.__lines.join("\n"));return e="\n"!==t?e.replace(/[\n]/g,t):e},e.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},e.prototype.set_indent=function(t,e){return this.next_line.set_indent(t=t||0,e=e||0),1=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=e},function(t,e,n){function i(t,e){this._input=new _(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)}var _=n(8).InputScanner,s=n(3).Token,r=n(10).TokenStream,a=n(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new r,this._reset();for(var t,e=new s(o.START,""),n=null,i=[],_=new r;e.type!==o.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)_.add(t),t=this._get_next_token(e,n);_.isEmpty()||(t.comments_before=_,_=new r),t.parent=n,this._is_opening(t)?(i.push(n),n=t):n&&this._is_closing(t,n)&&((t.opened=n).closed=t,n=i.pop(),t.parent=n),(t.previous=e).next=t,this.__tokens.add(t),e=t}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(o.RAW,n):this._create_token(o.EOF,"")},i.prototype._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return!1},i.prototype._is_closing=function(t,e){return!1},i.prototype._create_token=function(t,e){return new s(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=i,t.exports.TOKEN=o},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position/),erb:e.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:e.starting_with(/{%/).until_after(/%}/),django_value:e.starting_with(/{{/).until_after(/}}/),django_comment:e.starting_with(/{#/).until_after(/#}/),smarty:e.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:e.starting_with(/{\*/).until_after(/\*}/),smarty_literal:e.starting_with(/{literal}/).until_after(/{\/literal}/)}}(s.prototype=new i)._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},s.prototype.read_options=function(t){var e,n=this._create();for(e in _)n._disabled[e]=-1===t.templating.indexOf(e);return n._update(),n},s.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},s.prototype.read=function(){for(var t="",t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern),e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},s.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},s.prototype._read_template=function(){var t,e="",n=this._input.peek();return"<"===n?(t=this._input.peek(1),this._disabled.php||this._excluded.php||"?"!==t||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==t||(e=e||this.__patterns.erb.read())):"{"===n&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read())),e},t.exports.TemplatablePattern=s},,,,function(t,e,n){var _=n(19).Beautifier,i=n(20).Options;t.exports=function(t,e,n,i){return new _(t,e,n,i).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,n){function p(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new i(t,e)}function s(t,e){var n=null,i=null;return e.closed?("script"===t?n="text/javascript":"style"===t&&(n="text/css"),-1<(n=function(t){for(var e=null,n=t.next;n.type!==u.EOF&&t.closed!==n;){if(n.type===u.ATTRIBUTE&&"type"===n.text){n.next&&n.next.type===u.EQUALS&&n.next.next&&n.next.next.type===u.VALUE&&(e=n.next.next.text);break}n=n.next}return e}(e)||n).search("text/css")?i="css":-1|]]>)$/.exec(s);if(!n)return void t.add_raw_token(e);a=r+n[1]+"\n",s=n[4],n[5]&&(o=r+n[5]),s=s.replace(/\n[ \t]*$/,""),(n[2]||-1!==n[3].indexOf("\n"))&&(n=n[3].match(/[ \t]+$/))&&(e.whitespace_before=n[0])}s=s&&(_?((n=function(){this.eol="\n"}).prototype=this._options.raw_options,_(r+s,new n)):r+(s=(_=e.whitespace_before)?s.replace(new RegExp("\n("+_+")?","g"),"\n"):s).replace(/\n/g,"\n"+r)),a&&(s=s?a+s+"\n"+o:a+o),t.print_newline(!1),s&&(e.text=s,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},g.prototype._handle_tag_open=function(t,e,n,i){var _=this._get_tag_open_token(e);return!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||e.type!==u.TAG_OPEN||0!==e.text.indexOf("]*)/),this.tag_check=n?n[1]:""):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&">"===this.tag_check[0]&&(">"===this.tag_check&&null!==e.next?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===u.COMMENT&&(this.tag_complete=!0),this.is_start_tag="/"!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&"/>"===e.closed.text,t=2,"{"===this.tag_start_char&&3<=this.text.length&&"~"===this.text.charAt(2)&&(t=3),this.is_end_tag=this.is_end_tag||"{"===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(t)))):this.tag_complete=!0},o=(g.prototype._get_tag_open_token=function(t){t=new f(this._tag_stack.get_parser_token(),t);return t.alignment_size=this._options.wrap_attributes_indent_size,t.is_end_tag=t.is_end_tag||r(t.tag_check,this._options.void_elements),t.is_empty_element=t.tag_complete||t.is_start_tag&&t.is_end_tag,t.is_unformatted=!t.tag_complete&&r(t.tag_check,this._options.unformatted),t.is_content_unformatted=!t.is_empty_element&&r(t.tag_check,this._options.content_unformatted),t.is_inline_element=r(t.tag_name,this._options.inline)||t.tag_name.includes("-")||"{"===t.tag_start_char,t},g.prototype._set_tag_position=function(t,e,n,i,_){n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&!n.is_inline_element&&t.print_newline(!1),this._tag_stack.record_tag(n),"script"!==n.tag_name&&"style"!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=s(n.tag_check,e)))),r(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element?("{"===n.tag_start_char&&"else"===n.tag_check&&(this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0,t.current_line_has_match(/{{#if/)||t.print_newline(!1)),"!--"===n.tag_name&&_.type===u.TAG_CLOSE&&i.is_end_tag&&-1===n.text.indexOf("\n")||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))):n.is_end_tag?(e=!1,e=(e=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(i.is_inline_element||i.is_unformatted)&&!(_.type===u.TAG_CLOSE&&n.start_tag_token===i)&&"TK_CONTENT"!==_.type,(e=n.is_content_unformatted||n.is_unformatted?!1:e)&&t.print_newline(!1)):(n.indent_content=!n.custom_beautifier_name,"<"===n.tag_start_char&&("html"===n.tag_name?n.indent_content=this._options.indent_inner_html:"head"===n.tag_name?n.indent_content=this._options.indent_head_inner_html:"body"===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||"TK_CONTENT"===_.type&&!n.is_content_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))},g.prototype._calcluate_parent_multiline=function(t,e){!e.parent||!t._output.just_added_newline()||(e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element||(e.parent.multiline_content=!0)},["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"]),m=["a","audio","del","ins","map","noscript","video"];g.prototype._do_optional_end_element=function(t){var e,n=null;if(!t.is_empty_element&&t.is_start_tag&&t.parent)return"body"===t.tag_name?n=n||this._tag_stack.try_pop("head"):"li"===t.tag_name?n=n||this._tag_stack.try_pop("li",["ol","ul"]):"dd"===t.tag_name||"dt"===t.tag_name?n=(n=n||this._tag_stack.try_pop("dt",["dl"]))||this._tag_stack.try_pop("dd",["dl"]):"p"===t.parent.tag_name&&-1!==o.indexOf(t.tag_name)?(e=t.parent.parent)&&-1!==m.indexOf(e.tag_name)||(n=n||this._tag_stack.try_pop("p")):"rp"===t.tag_name||"rt"===t.tag_name?n=(n=n||this._tag_stack.try_pop("rt",["ruby","rtc"]))||this._tag_stack.try_pop("rp",["ruby","rtc"]):"optgroup"===t.tag_name?n=n||this._tag_stack.try_pop("optgroup",["select"]):"option"===t.tag_name?n=n||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):"colgroup"===t.tag_name?n=n||this._tag_stack.try_pop("caption",["table"]):"thead"===t.tag_name?n=(n=n||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]):"tbody"===t.tag_name||"tfoot"===t.tag_name?n=(n=(n=(n=n||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("thead",["table"]))||this._tag_stack.try_pop("tbody",["table"]):"tr"===t.tag_name?n=(n=(n=n||this._tag_stack.try_pop("caption",["table"]))||this._tag_stack.try_pop("colgroup",["table"]))||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"]):"th"!==t.tag_name&&"td"!==t.tag_name||(n=(n=n||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]))||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"])),t.parent=this._tag_stack.get_parser_token(),n},t.exports.Beautifier=g},function(t,e,n){var i=n(6).Options;function _(t){i.call(this,t,"html"),1===this.templating.length&&"auto"===this.templating[0]&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}_.prototype=new i,t.exports.Options=_},function(t,e,n){function i(t,e){_.call(this,t,e),this._current_tag_name="";var t=new a(this._input).read_options(this._options),e=new o(this._input);this.__patterns={word:t.until(/[\n\r\t <]/),single_quote:t.until_after(/'/),double_quote:t.until_after(/"/),attribute:t.until(/[\n\r\t =>]|\/>/),element_name:t.until(/[\n\r\t >\/]/),handlebars_comment:e.starting_with(/{{!--/).until_after(/--}}/),handlebars:e.starting_with(/{{/).until_after(/}}/),handlebars_open:e.until(/[\n\r\t }]/),handlebars_raw_close:e.until(/}}/),comment:e.starting_with(//),cdata:e.starting_with(//),conditional_comment:e.starting_with(//),processing:e.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter&&(t=this._input.get_literal_regexp(this._options.unformatted_content_delimiter),this.__patterns.unformatted_content_delimiter=e.matching(t).until_after(t))}var _=n(9).Tokenizer,s=n(9).TOKEN,r=n(13).Directives,a=n(14).TemplatablePattern,o=n(12).Pattern,p={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},h=new r(/<\!--/,/-->/);(i.prototype=new _)._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return t.type===p.TAG_OPEN},i.prototype._is_closing=function(t,e){return t.type===p.TAG_CLOSE&&e&&((">"===t.text||"/>"===t.text)&&"<"===e.text[0]||"}}"===t.text&&"{"===e.text[0]&&"{"===e.text[1])},i.prototype._reset=function(){this._current_tag_name=""},i.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.peek();return null===n?this._create_token(p.EOF,""):this._read_open_handlebars(n,e)||this._read_attribute(n,t,e)||this._read_close(n,e)||this._read_raw_content(n,t,e)||this._read_content_word(n)||this._read_comment_or_cdata(n)||this._read_processing(n)||this._read_open(n,e)||this._create_token(p.UNKNOWN,this._input.next())},i.prototype._read_comment_or_cdata=function(t){var e=null,n=null,i=null;return"<"===t&&("!"===this._input.peek(1)&&((n=this.__patterns.comment.read())?(i=h.get_directives(n))&&"start"===i.ignore&&(n+=h.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((e=this._create_token(p.COMMENT,n)).directives=i)),e},i.prototype._read_processing=function(t){var e=null,n=null;return"<"===t&&(n="!"!==(t=this._input.peek(1))&&"?"!==t?n:(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read())&&((e=this._create_token(p.COMMENT,n)).directives=null),e},i.prototype._read_open=function(t,e){var n=null,i=null;return e||"<"===t&&(n=this._input.next(),"/"===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),i=this._create_token(p.TAG_OPEN,n)),i},i.prototype._read_open_handlebars=function(t,e){var n=null,i=null;return e||this._options.indent_handlebars&&"{"===t&&"{"===this._input.peek(1)&&(i="!"===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),this._create_token(p.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),this._create_token(p.TAG_OPEN,n))),i},i.prototype._read_close=function(t,e){var n=null,i=null;return e&&("<"===e.text[0]&&(">"===t||"/"===t&&">"===this._input.peek(1))?(n=this._input.next(),"/"===t&&(n+=this._input.next()),i=this._create_token(p.TAG_CLOSE,n)):"{"===e.text[0]&&"}"===t&&"}"===this._input.peek(1)&&(this._input.next(),this._input.next(),i=this._create_token(p.TAG_CLOSE,"}}"))),i},i.prototype._read_attribute=function(t,e,n){var i=null;return n&&"<"===n.text[0]&&("="===t?i=this._create_token(p.EQUALS,this._input.next()):'"'===t||"'"===t?(n=this._input.next(),n+=('"'===t?this.__patterns.double_quote:this.__patterns.single_quote).read(),i=this._create_token(p.VALUE,n)):(t=this.__patterns.attribute.read())&&(i=e.type===p.EQUALS?this._create_token(p.VALUE,t):this._create_token(p.ATTRIBUTE,t))),i},i.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},i.prototype._read_raw_content=function(t,e,n){var i="";if(n&&"{"===n.text[0])i=this.__patterns.handlebars_raw_close.read();else if(e.type===p.TAG_CLOSE&&"<"===e.opened.text[0]&&"/"!==e.text[0]){n=e.opened.text.substr(1).toLowerCase();if("script"===n||"style"===n){e=this._read_comment_or_cdata(t);if(e)return e.type=p.TEXT,e;i=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(n)&&(i=this._input.readUntil(new RegExp("","ig")))}return i?this._create_token(p.TEXT,i):null},i.prototype._read_content_word=function(t){var e="";if(e=(e=this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]?this.__patterns.unformatted_content_delimiter.read():e)||this.__patterns.word.read())return this._create_token(p.TEXT,e)},t.exports.Tokenizer=i,t.exports.TOKEN=p}],_={};var t=function t(e){var n=_[e];if(void 0!==n)return n.exports;n=_[e]={exports:{}};return i[e](n,n.exports,t),n.exports}(18);e=t}();var e,n,i,_=e;"function"==typeof define&&define.amd?define(["require","./beautify","./beautify-css"],function(t){var n=t("./beautify"),i=t("./beautify-css");return{html_beautify:function(t,e){return _(t,e,n.js_beautify,i.css_beautify)}}}):"undefined"!=typeof exports?(n=require("./beautify.js"),i=require("./beautify-css.js"),exports.html_beautify=function(t,e){return _(t,e,n.js_beautify,i.css_beautify)}):"undefined"!=typeof window?window.html_beautify=function(t,e){return _(t,e,window.js_beautify,window.css_beautify)}:"undefined"!=typeof global&&(global.html_beautify=function(t,e){return _(t,e,global.js_beautify,global.css_beautify)})}(); \ No newline at end of file diff --git a/app/thirdparty/beautify/beautify.min.js b/app/thirdparty/beautify/beautify.min.js new file mode 100644 index 0000000..e015784 --- /dev/null +++ b/app/thirdparty/beautify/beautify.min.js @@ -0,0 +1 @@ +!function(){!function(){"use strict";var i=[function(t,e,u){var i=u(1).Beautifier,n=u(5).Options;t.exports=function(t,e){return new i(t,e).beautify()},t.exports.defaultOptions=function(){return new n}},function(t,e,u){var i=u(2).Output,n=u(3).Token,o=u(4),_=u(5).Options,s=u(7).Tokenizer,r=u(7).line_starters,h=u(7).positionable_operators,p=u(7).TOKEN;function l(t,e){return-1!==e.indexOf(t)}function a(t,e){return t&&t.type===p.RESERVED&&t.text===e}function f(t,e){return t&&t.type===p.RESERVED&&l(t.text,e)}var c=["case","return","do","if","throw","else","await","break","continue","async"],d=function(t){for(var e={},u=0;uu&&(u=t.line_indent_level)),{mode:e,parent:t,last_token:t?t.last_token:new n(p.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:u,alignment:0,line_indent_level:t?t.line_indent_level:u,start_line_index:this._output.get_line_number(),ternary_depth:0}},T.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0],e=(this._last_last_text="",this._output=new i(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(g),new s(t,this._options));return this._tokens=e.tokenize(),t},T.prototype.beautify=function(){if(this._options.disabled)return this._source_text;for(var t=this._reset(this._source_text),e=this._options.eol,u=("auto"===this._options.eol&&(e="\n",t&&o.lineBreak.test(t||"")&&(e=t.match(o.lineBreak)[0])),this._tokens.next());u;)this.handle_token(u),this._last_last_text=this._flags.last_token.text,this._flags.last_token=u,u=this._tokens.next();return this._output.get_code(e)},T.prototype.handle_token=function(t,e){t.type===p.START_EXPR?this.handle_start_expr(t):t.type===p.END_EXPR?this.handle_end_expr(t):t.type===p.START_BLOCK?this.handle_start_block(t):t.type===p.END_BLOCK?this.handle_end_block(t):t.type===p.WORD||t.type===p.RESERVED?this.handle_word(t):t.type===p.SEMICOLON?this.handle_semicolon(t):t.type===p.STRING?this.handle_string(t):t.type===p.EQUALS?this.handle_equals(t):t.type===p.OPERATOR?this.handle_operator(t):t.type===p.COMMA?this.handle_comma(t):t.type===p.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===p.COMMENT?this.handle_comment(t,e):t.type===p.DOT?this.handle_dot(t):t.type===p.EOF?this.handle_eof(t):(t.type,p.UNKNOWN,this.handle_unknown(t,e))},T.prototype.handle_whitespace_and_comments=function(t,e){var u=t.newlines,i=this._options.keep_array_indentation&&R(this._flags.mode);if(t.comments_before)for(var n=t.comments_before.next();n;)this.handle_whitespace_and_comments(n,e),this.handle_token(n,e),n=t.comments_before.next();if(i)for(var _=0;_this._options.max_preserve_newlines&&(u=this._options.max_preserve_newlines),this._options.preserve_newlines&&1this._flags.parent.indentation_level)&&(--this._flags.indentation_level,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},T.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},T.prototype.restore_mode=function(){0"!==this._flags.last_token.text)&&(l(this._flags.last_token.type,[p.EQUALS,p.START_EXPR,p.COMMA,p.OPERATOR])||f(this._flags.last_token,["return","throw","import","default"]))?this.set_mode(m):this.set_mode(g),this._flags.last_token&&f(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0),!e.comments_before&&"}"===e.text),e=u&&"function"===this._flags.last_word&&this._flags.last_token.type===p.END_EXPR;if(this._options.brace_preserve_inline){var i=0,n=null;this._flags.inline_frame=!0;do{if((n=this._tokens.peek((i+=1)-1)).newlines){this._flags.inline_frame=!1;break}}while(n.type!==p.EOF&&(n.type!==p.END_BLOCK||n.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==p.OPERATOR&&(e||this._flags.last_token.type===p.EQUALS||f(this._flags.last_token,c)&&"else"!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!R(this._previous_flags.mode)||this._flags.last_token.type!==p.START_EXPR&&this._flags.last_token.type!==p.COMMA||(this._flags.last_token.type!==p.COMMA&&!this._options.space_in_paren||(this._output.space_before_token=!0),(this._flags.last_token.type===p.COMMA||this._flags.last_token.type===p.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==p.OPERATOR&&this._flags.last_token.type!==p.START_EXPR&&(this._flags.last_token.type!==p.START_BLOCK||this._flags.inline_frame?this._output.space_before_token=!0:this.print_newline())),this.print_token(t),this.indent(),u||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},T.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===k;)this.restore_mode();var e=this._flags.last_token.type===p.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(R(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)},T.prototype.handle_word=function(t){if(t.type===p.RESERVED&&(l(t.text,["set","get"])&&this._flags.mode!==m||"import"===t.text&&l(this._tokens.peek().text,["(","."])||l(t.text,["as","from"])&&!this._flags.import_block||this._flags.mode===m&&":"===this._tokens.peek().text)&&(t.type=p.WORD),this.start_of_statement(t)?f(this._flags.last_token,["var","let","const"])&&t.type===p.WORD&&(this._flags.declaration_statement=!0):!t.newlines||O(this._flags.mode)||this._flags.last_token.type===p.OPERATOR&&"--"!==this._flags.last_token.text&&"++"!==this._flags.last_token.text||this._flags.last_token.type===p.EQUALS||!this._options.preserve_newlines&&f(this._flags.last_token,["var","let","const","set","get"])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(a(t,"while"))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&a(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===k;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&f(t,["case","default"]))return this.print_newline(),this._flags.case_block||!this._flags.case_body&&!this._options.jslint_happy||this.deindent(),this._flags.case_body=!1,this.print_token(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==p.COMMA&&this._flags.last_token.type!==p.START_EXPR&&this._flags.last_token.type!==p.EQUALS&&this._flags.last_token.type!==p.OPERATOR||this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t),a(t,"function"))return!(l(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!l(this._flags.last_token.text,["(","[","{",":","=",","])&&this._flags.last_token.type!==p.OPERATOR)||this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===p.RESERVED||this._flags.last_token.type===p.WORD?f(this._flags.last_token,["get","set","new","export"])||f(this._flags.last_token,A)||a(this._flags.last_token,"default")&&"export"===this._last_last_text||"declare"===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===p.OPERATOR||"="===this._flags.last_token.text?this._output.space_before_token=!0:!this._flags.multiline_frame&&(O(this._flags.mode)||R(this._flags.mode))||this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var e="NONE";this._flags.last_token.type===p.END_BLOCK?this._previous_flags.inline_frame?e="SPACE":!f(t,["else","catch","finally","from"])||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?e="NEWLINE":(e="SPACE",this._output.space_before_token=!0):this._flags.last_token.type===p.SEMICOLON&&this._flags.mode===g?e="NEWLINE":this._flags.last_token.type===p.SEMICOLON&&O(this._flags.mode)?e="SPACE":this._flags.last_token.type===p.STRING?e="NEWLINE":this._flags.last_token.type===p.RESERVED||this._flags.last_token.type===p.WORD||"*"===this._flags.last_token.text&&(l(this._last_last_text,["function","yield"])||this._flags.mode===m&&l(this._last_last_text,["{",","]))?e="SPACE":this._flags.last_token.type===p.START_BLOCK?e=this._flags.inline_frame?"SPACE":"NEWLINE":this._flags.last_token.type===p.END_EXPR&&(this._output.space_before_token=!0,e="NEWLINE"),f(t,r)&&")"!==this._flags.last_token.text&&(e=this._flags.inline_frame||"else"===this._flags.last_token.text||"export"===this._flags.last_token.text?"SPACE":"NEWLINE"),f(t,["else","catch","finally"])?(this._flags.last_token.type!==p.END_BLOCK||this._previous_flags.mode!==g||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),"}"!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):"NEWLINE"===e?f(this._flags.last_token,c)||"declare"===this._flags.last_token.text&&f(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==p.END_EXPR?this._flags.last_token.type===p.START_EXPR&&f(t,["var","let","const"])||":"===this._flags.last_token.text||(a(t,"if")&&a(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):f(t,r)&&")"!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&R(this._flags.mode)&&","===this._flags.last_token.text&&"}"===this._last_last_text?this.print_newline():"SPACE"===e&&(this._output.space_before_token=!0),!t.previous||t.previous.type!==p.WORD&&t.previous.type!==p.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===p.RESERVED&&("do"===t.text?this._flags.do_block=!0:"if"===t.text?this._flags.if_block=!0:"import"===t.text?this._flags.import_block=!0:this._flags.import_block&&a(t,"from")&&(this._flags.import_block=!1))},T.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();!(this._flags.mode!==k||this._flags.if_block&&a(e,"else")||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},T.prototype.handle_string=function(t){t.text.startsWith("`")&&0===t.newlines&&""===t.whitespace_before&&(")"===t.previous.text||this._flags.last_token.type===p.WORD)||(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===p.RESERVED||this._flags.last_token.type===p.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===p.COMMA||this._flags.last_token.type===p.START_EXPR||this._flags.last_token.type===p.EQUALS||this._flags.last_token.type===p.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):!t.text.startsWith("`")||this._flags.last_token.type!==p.END_EXPR||"]"!==t.previous.text&&")"!==t.previous.text||0!==t.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(t)},T.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},T.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(O(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===m||this._flags.mode===k&&this._flags.parent.mode===m?(this._flags.mode===k&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},T.prototype.handle_operator=function(t){var e="*"===t.text&&(f(this._flags.last_token,["function","yield"])||l(this._flags.last_token.type,[p.START_BLOCK,p.COMMA,p.END_BLOCK,p.SEMICOLON])),u=l(t.text,["-","+"])&&(l(this._flags.last_token.type,[p.START_BLOCK,p.START_EXPR,p.EQUALS,p.OPERATOR])||l(this._flags.last_token.text,r)||","===this._flags.last_token.text);if(this.start_of_statement(t)||this.handle_whitespace_and_comments(t,!e),"*"===t.text&&this._flags.last_token.type===p.DOT)this.print_token(t);else if("::"===t.text)this.print_token(t);else{if(this._flags.last_token.type===p.OPERATOR&&l(this._options.operator_position,b)&&this.allow_wrap_or_preserved_newline(t),":"===t.text&&this._flags.in_case)return this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==p.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,n=!0,_=!1;if(":"===t.text?0===this._flags.ternary_depth?i=!1:(--this._flags.ternary_depth,_=!0):"?"===t.text&&(this._flags.ternary_depth+=1),!u&&!e&&this._options.preserve_newlines&&l(t.text,h)){var s=":"===t.text,a=s&&_,o=s&&!_;switch(this._options.operator_position){case d.before_newline:return this._output.space_before_token=!o,this.print_token(t),s&&!a||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case d.after_newline:return this._output.space_before_token=!0,!s||a?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case d.preserve_newline:return o||this.allow_wrap_or_preserved_newline(t),i=!(this._output.just_added_newline()||o),this._output.space_before_token=i,this.print_token(t),void(this._output.space_before_token=!0)}}e?(this.allow_wrap_or_preserved_newline(t),i=!1,n=(_=this._tokens.peek())&&l(_.type,[p.WORD,p.RESERVED])):"..."===t.text?(this.allow_wrap_or_preserved_newline(t),i=this._flags.last_token.type===p.START_BLOCK,n=!1):(l(t.text,["--","++","!","~"])||u)&&(this._flags.last_token.type!==p.COMMA&&this._flags.last_token.type!==p.START_EXPR||this.allow_wrap_or_preserved_newline(t),n=i=!1,!t.newlines||"--"!==t.text&&"++"!==t.text&&"~"!==t.text||((e=f(this._flags.last_token,c)&&t.newlines)&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(e,!0)),";"===this._flags.last_token.text&&O(this._flags.mode)&&(i=!0),this._flags.last_token.type===p.RESERVED?i=!0:this._flags.last_token.type===p.END_EXPR?i=!("]"===this._flags.last_token.text&&("--"===t.text||"++"===t.text)):this._flags.last_token.type===p.OPERATOR&&(i=l(t.text,["--","-","++","+"])&&l(this._flags.last_token.text,["--","-","++","+"]),l(t.text,["+","-"])&&l(this._flags.last_token.text,["--","++"])&&(n=!0)),(this._flags.mode!==g||this._flags.inline_frame)&&this._flags.mode!==k||"{"!==this._flags.last_token.text&&";"!==this._flags.last_token.text||this.print_newline()),this._output.space_before_token=this._output.space_before_token||i,this.print_token(t),this._output.space_before_token=n}},T.prototype.handle_block_comment=function(t,e){return this._output.raw?(this._output.add_raw_token(t),void(t.directives&&"end"===t.directives.preserve&&(this._output.raw=this._options.test_output_raw))):t.directives?(this.print_newline(!1,e),this.print_token(t),"start"===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):void(o.newline.test(t.text)||t.newlines?this.print_block_commment(t,e):(this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0))},T.prototype.print_block_commment=function(t,e){var u,i,n,_=function(t){for(var e=[],u=(t=t.replace(o.allLineBreaks,"\n")).indexOf("\n");-1!==u;)e.push(t.substring(0,u)),u=(t=t.substring(u+1)).indexOf("\n");return t.length&&e.push(t),e}(t.text),s=t.whitespace_before,a=s.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(_[0]),this.print_newline(!1,e),1<_.length){for(i=function(t,e){for(var u=0;uthis.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){var t;return!!this._should_wrap()&&(this.__parent.add_new_line(),(t=this.__parent.current_line).set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),--t.__character_count),!0)},n.prototype.is_empty=function(){return 0===this.__items.length},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf("\n");-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},n.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},n.prototype._remove_indent=function(){0=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var t,e=this.__cache.length,u="";this.__indent_size&&e>=this.__indent_size&&(e-=(t=Math.floor(e/this.__indent_size))*this.__indent_size,u=new Array(t+1).join(this.__indent_string)),e&&(u+=new Array(e+1).join(" ")),this.__cache.push(u)},e.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},e.prototype.get_line_number=function(){return this.__lines.length},e.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},e.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},e.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},e.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},e.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop(),e=(e&&("\n"===e[e.length-1]&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline(),this.__lines.join("\n"));return e="\n"!==t?e.replace(/[\n]/g,t):e},e.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},e.prototype.set_indent=function(t,e){return this.next_line.set_indent(t=t||0,e=e||0),1/),include:t.starting_with(/#include/).until_after(r.lineBreak),shebang:t.starting_with(/#!/).until_after(r.lineBreak),xml:t.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:e.until(/['\\\n\r\u2028\u2029]/),double_quote:e.until(/["\\\n\r\u2028\u2029]/),template_text:e.until(/[`\\$]/),template_expression:e.until(/[`}\\]/)}}var l,f={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:n.START,RAW:n.RAW,EOF:n.EOF},c=new s(/\/\*/,/\*\//),d=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,b=/[0-9]/,g=/[^\d\.]/,u=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),n=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |",k=(n=(n="\\?\\.(?!\\d) "+(n=n.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,"|"),new RegExp(n)),s="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),n=s.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),m=new RegExp("^(?:"+n.join("|")+")$");(p.prototype=new i)._is_comment=function(t){return t.type===f.COMMENT||t.type===f.BLOCK_COMMENT||t.type===f.UNKNOWN},p.prototype._is_opening=function(t){return t.type===f.START_BLOCK||t.type===f.START_EXPR},p.prototype._is_closing=function(t,e){return(t.type===f.END_BLOCK||t.type===f.END_EXPR)&&e&&("]"===t.text&&"["===e.text||")"===t.text&&"("===e.text||"}"===t.text&&"{"===e.text)},p.prototype._reset=function(){l=!1},p.prototype._get_next_token=function(t,e){this._readWhitespace();var u=this._input.peek();return null===u?this._create_token(f.EOF,""):this._read_non_javascript(u)||this._read_string(u)||this._read_word(t)||this._read_singles(u)||this._read_comment(u)||this._read_regexp(u,t)||this._read_xml(u,t)||this._read_punctuation()||this._create_token(f.UNKNOWN,this._input.next())},p.prototype._read_word=function(t){var e=this.__patterns.identifier.read();return""!==e?(e=e.replace(r.allLineBreaks,"\n"),t.type!==f.DOT&&(t.type!==f.RESERVED||"set"!==t.text&&"get"!==t.text)&&m.test(e)?"in"!==e&&"of"!==e||t.type!==f.WORD&&t.type!==f.STRING?this._create_token(f.RESERVED,e):this._create_token(f.OPERATOR,e):this._create_token(f.WORD,e)):""!==(e=this.__patterns.number.read())?this._create_token(f.WORD,e):void 0},p.prototype._read_singles=function(t){var e=null;return"("===t||"["===t?e=this._create_token(f.START_EXPR,t):")"===t||"]"===t?e=this._create_token(f.END_EXPR,t):"{"===t?e=this._create_token(f.START_BLOCK,t):"}"===t?e=this._create_token(f.END_BLOCK,t):";"===t?e=this._create_token(f.SEMICOLON,t):"."===t&&g.test(this._input.peek(1))?e=this._create_token(f.DOT,t):","===t&&(e=this._create_token(f.COMMA,t)),e&&this._input.next(),e},p.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(""!==t)return"="===t?this._create_token(f.EQUALS,t):"?."===t?this._create_token(f.DOT,t):this._create_token(f.OPERATOR,t)},p.prototype._read_non_javascript=function(t){var e="";if("#"===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read()))return this._create_token(f.UNKNOWN,e.trim()+"\n");if(e=this.__patterns.include.read())return this._create_token(f.UNKNOWN,e.trim()+"\n");t=this._input.next();var u="#";if(this._input.hasNext()&&this._input.testChar(b)){for(;u+=t=this._input.next(),this._input.hasNext()&&"#"!==t&&"="!==t;);return"#"!==t&&("["===this._input.peek()&&"]"===this._input.peek(1)?(u+="[]",this._input.next(),this._input.next()):"{"===this._input.peek()&&"}"===this._input.peek(1)&&(u+="{}",this._input.next(),this._input.next())),this._create_token(f.WORD,u)}this._input.back()}else if("<"===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(r.newline);)e+=this._input.next();return l=!0,this._create_token(f.COMMENT,e)}}else if(l&&"-"===t&&(e=this.__patterns.html_comment_end.read()))return l=!1,this._create_token(f.COMMENT,e);return null},p.prototype._read_comment=function(t){var e,u=null;return"/"===t&&(t="","*"===this._input.peek(1)?(t=this.__patterns.block_comment.read(),(e=c.get_directives(t))&&"start"===e.ignore&&(t+=c.readIgnored(this._input)),t=t.replace(r.allLineBreaks,"\n"),(u=this._create_token(f.BLOCK_COMMENT,t)).directives=e):"/"===this._input.peek(1)&&(t=this.__patterns.comment.read(),u=this._create_token(f.COMMENT,t))),u},p.prototype._read_string=function(t){var e;return"`"===t||"'"===t||'"'===t?(e=this._input.next(),this.has_char_escapes=!1,e+="`"===t?this._read_string_recursive("`",!0,"${"):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=function(t){var e="",u=0,i=new _(t),n=null;for(;i.hasNext();)if((n=i.match(/([\s]|[^\\]|\\\\)+/g))&&(e+=n[0]),"\\"===i.peek()){if(i.next(),"x"===i.peek())n=i.match(/x([0-9A-Fa-f]{2})/g);else{if("u"!==i.peek()){e+="\\",i.hasNext()&&(e+=i.next());continue}n=i.match(/u([0-9A-Fa-f]{4})/g)}if(!n)return t;if(126<(u=parseInt(n[1],16))&&u<=255&&0===n[0].indexOf("x"))return t;e+=0<=u&&u<32?"\\"+n[0]:34===u||39===u||92===u?"\\"+String.fromCharCode(u):String.fromCharCode(u)}return e}(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(r.allLineBreaks,"\n"),this._create_token(f.STRING,e)):null},p.prototype._allow_regexp_or_xml=function(t){return t.type===f.RESERVED&&h(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===f.END_EXPR&&")"===t.text&&t.opened.previous.type===f.RESERVED&&h(t.opened.previous.text,["if","while","for"])||h(t.type,[f.COMMENT,f.START_EXPR,f.START_BLOCK,f.START,f.END_BLOCK,f.OPERATOR,f.EQUALS,f.EOF,f.SEMICOLON,f.COMMA])},p.prototype._read_regexp=function(t,e){if("/"===t&&this._allow_regexp_or_xml(e)){for(var u=this._input.next(),i=!1,n=!1;this._input.hasNext()&&(i||n||this._input.peek()!==t)&&!this._input.testChar(r.newline);)u+=this._input.peek(),i?i=!1:(i="\\"===this._input.peek(),"["===this._input.peek()?n=!0:"]"===this._input.peek()&&(n=!1)),this._input.next();return this._input.peek()===t&&(u=(u+=this._input.next())+this._input.read(r.identifier)),this._create_token(f.STRING,u)}return null},p.prototype._read_xml=function(t,e){if(this._options.e4x&&"<"===t&&this._allow_regexp_or_xml(e)){var u="",i=this.__patterns.xml.read_match();if(i){for(var n=i[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),_=0===n.indexOf("{"),s=0;i;){var a=!!i[1],o=i[2];if(!(!!i[i.length-1]||"![CDATA["===o.slice(0,8))&&(o===n||_&&o.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(a?--s:++s),u+=i[0],s<=0)break;i=this.__patterns.xml.read_match()}return i||(u+=this._input.match(/[\s\S]*/g)[0]),u=u.replace(r.allLineBreaks,"\n"),this._create_token(f.STRING,u)}}return null},p.prototype._read_string_recursive=function(t,e,u){"'"===t?n=this.__patterns.single_quote:'"'===t?n=this.__patterns.double_quote:"`"===t?n=this.__patterns.template_text:"}"===t&&(n=this.__patterns.template_expression);for(var i,n,_=n.read(),s="";this._input.hasNext();){if((s=this._input.next())===t||!e&&r.newline.test(s)){this._input.back();break}"\\"===s&&this._input.hasNext()?("x"===(i=this._input.peek())||"u"===i?this.has_char_escapes=!0:"\r"===i&&"\n"===this._input.peek(1)&&this._input.next(),s+=this._input.next()):u&&("${"===u&&"$"===s&&"{"===this._input.peek()&&(s+=this._input.next()),u===s&&(s+="`"===t?this._read_string_recursive("}",e,"`"):this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(s+=this._input.next()))),_+=s+=n.read()}return _},t.exports.Tokenizer=p,t.exports.TOKEN=f,t.exports.positionable_operators=u.slice(),t.exports.line_starters=s.slice()},function(t){var i=RegExp.prototype.hasOwnProperty("sticky");function e(t){this.__input=t||"",this.__input_length=this.__input.length,this.__position=0}e.prototype.restart=function(){this.__position=0},e.prototype.back=function(){0=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=e},function(t,e,u){function i(t,e){this._input=new n(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new a(this._input)}var n=u(8).InputScanner,_=u(3).Token,s=u(10).TokenStream,a=u(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var t,e=new _(o.START,""),u=null,i=[],n=new s;e.type!==o.EOF;){for(t=this._get_next_token(e,u);this._is_comment(t);)n.add(t),t=this._get_next_token(e,u);n.isEmpty()||(t.comments_before=n,n=new s),t.parent=u,this._is_opening(t)?(i.push(u),u=t):u&&this._is_closing(t,u)&&((t.opened=u).closed=t,u=i.pop(),t.parent=u),(t.previous=e).next=t,this.__tokens.add(t),e=t}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(t,e){this._readWhitespace();var u=this._input.read(/.+/g);return u?this._create_token(o.RAW,u):this._create_token(o.EOF,"")},i.prototype._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return!1},i.prototype._is_closing=function(t,e){return!1},i.prototype._create_token=function(t,e){return new _(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=i,t.exports.TOKEN=o},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position/),erb:e.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:e.starting_with(/{%/).until_after(/%}/),django_value:e.starting_with(/{{/).until_after(/}}/),django_comment:e.starting_with(/{#/).until_after(/#}/),smarty:e.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:e.starting_with(/{\*/).until_after(/\*}/),smarty_literal:e.starting_with(/{literal}/).until_after(/{\/literal}/)}}(_.prototype=new i)._create=function(){return new _(this._input,this)},_.prototype._update=function(){this.__set_templated_pattern()},_.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},_.prototype.read_options=function(t){var e,u=this._create();for(e in n)u._disabled[e]=-1===t.templating.indexOf(e);return u._update(),u},_.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},_.prototype.read=function(){for(var t="",t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern),e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},_.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")},_.prototype._read_template=function(){var t,e="",u=this._input.peek();return"<"===u?(t=this._input.peek(1),this._disabled.php||this._excluded.php||"?"!==t||(e=e||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||"%"!==t||(e=e||this.__patterns.erb.read())):"{"===u&&(this._disabled.handlebars||this._excluded.handlebars||(e=(e=(e=e||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=(e=e||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=(e=(e=e||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read())),e},t.exports.TemplatablePattern=_}],n={};var t=function t(e){var u=n[e];if(void 0!==u)return u.exports;u=n[e]={exports:{}};return i[e](u,u.exports,t),u.exports}(0);e=t}();var e,t=e;"function"==typeof define&&define.amd?define([],function(){return{js_beautify:t}}):"undefined"!=typeof exports?exports.js_beautify=t:"undefined"!=typeof window?window.js_beautify=t:"undefined"!=typeof global&&(global.js_beautify=t)}(); \ No newline at end of file diff --git a/app/thirdparty/eicui/eicui-2.0.css b/app/thirdparty/eicui/eicui-2.0.css index 5056fc2..cad17b2 100755 --- a/app/thirdparty/eicui/eicui-2.0.css +++ b/app/thirdparty/eicui/eicui-2.0.css @@ -842,12 +842,12 @@ label[secondary],p[secondary],b[secondary],span[secondary] { color: var(--eicui- display: table-row; } -[eicapp] table tbody tr:nth-of-type(odd) { background-color: var(--eicui-base-color-white); } +[eicapp] table tbody tr:nth-of-type(odd) { background-color: var(--eicui-base-color-grey-75); } [eicapp] table tr > td { padding: var(--eicui-base-spacing-2xs) var(--eicui-base-spacing-s); } [eicapp] table tbody tr:nth-of-type(2n), [eicapp] table tbody tr:nth-of-type(odd):hover { - background-color: var(--eicui-base-color-grey-5); + background-color: var(--eicui-base-color-grey-100); } [eicapp] blockquote { @@ -2649,11 +2649,11 @@ menu[eicmenu][collapsed]:not(:hover) [menuitem] > a > label { } [eicdatagrid] .dataset .row { cursor:pointer; - background-color: var(--eicui-base-color-white); + background-color: var(--eicui-base-color-grey-75); box-sizing: border-box; } [eicdatagrid] .dataset .row:nth-child(odd) { - background-color: var(--eicui-base-color-grey-10); + background-color: var(--eicui-base-color-grey-100); } [eicdatagrid] .dataset .row[accent] { border-left: 3px solid var(--app-color-accent); @@ -2726,7 +2726,7 @@ menu[eicmenu][collapsed]:not(:hover) [menuitem] > a > label { } [eicdatagrid] footer { border: 1px solid var(--eicui-base-color-grey-10); - background: var(--eicui-base-color-grey-5); + background: var(--eicui-base-color-grey-90); position: relative !important; min-height: 30px; border-top: 1px solid var(--eicui-base-color-grey-35) !important; diff --git a/app/thirdparty/eicui/plugins/Charts/Charts.css b/app/thirdparty/eicui/plugins/Charts/Charts.css index d44f299..cd13904 100644 --- a/app/thirdparty/eicui/plugins/Charts/Charts.css +++ b/app/thirdparty/eicui/plugins/Charts/Charts.css @@ -1,8 +1,8 @@ [eicbarchart] { position: relative; } -[eicbarchart] svg .title text { - stroke: var(--card-font-color); +[eicbarchart] svg text { + stroke: var(--eicui-base-color-grey-25); } [eicbarchart] svg .plot rect { fill: var(--eicui-base-color-grey-10); @@ -32,6 +32,9 @@ transition: all 0.5s; stroke-width: 2px; } +[eiclinechart] svg text { + stroke: var(--eicui-base-color-grey-25); +} [eiclinechart] svg .plot[primary] path { stroke: var(--eicui-base-color-primary-100); } diff --git a/app/thirdparty/highlight/highlight.min.js b/app/thirdparty/highlight/highlight.min.js new file mode 100644 index 0000000..de32e49 --- /dev/null +++ b/app/thirdparty/highlight/highlight.min.js @@ -0,0 +1,446 @@ +/*! + Highlight.js v11.7.0 (git: 82688fad18) + (c) 2006-2022 undefined and other contributors + License: BSD-3-Clause + */ +var hljs=function(){"use strict";var e={exports:{}};function t(e){ +return e instanceof Map?e.clear=e.delete=e.set=()=>{ +throw Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=()=>{ +throw Error("set is read-only") +}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((n=>{var i=e[n] +;"object"!=typeof i||Object.isFrozen(i)||t(i)})),e} +e.exports=t,e.exports.default=t;class n{constructor(e){ +void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1} +ignoreMatch(){this.isMatchIgnored=!0}}function i(e){ +return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") +}function r(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] +;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n} +const s=e=>!!e.scope||e.sublanguage&&e.language;class o{constructor(e,t){ +this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ +this.buffer+=i(e)}openNode(e){if(!s(e))return;let t="" +;t=e.sublanguage?"language-"+e.language:((e,{prefix:t})=>{if(e.includes(".")){ +const n=e.split(".") +;return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ") +}return`${t}${e}`})(e.scope,{prefix:this.classPrefix}),this.span(t)} +closeNode(e){s(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ +this.buffer+=``}}const a=(e={})=>{const t={children:[]} +;return Object.assign(t,e),t};class c{constructor(){ +this.rootNode=a(),this.stack=[this.rootNode]}get top(){ +return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ +this.top.children.push(e)}openNode(e){const t=a({scope:e}) +;this.add(t),this.stack.push(t)}closeNode(){ +if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ +for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} +walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ +return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), +t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ +"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ +c._collapse(e)})))}}class l extends c{constructor(e){super(),this.options=e} +addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} +addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root +;n.sublanguage=!0,n.language=t,this.add(n)}toHTML(){ +return new o(this,this.options).value()}finalize(){return!0}}function g(e){ +return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")} +function u(e){return p("(?:",e,")*")}function h(e){return p("(?:",e,")?")} +function p(...e){return e.map((e=>g(e))).join("")}function f(...e){const t=(e=>{ +const t=e[e.length-1] +;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} +})(e);return"("+(t.capture?"":"?:")+e.map((e=>g(e))).join("|")+")"} +function b(e){return RegExp(e.toString()+"|").exec("").length-1} +const m=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ +;function E(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n +;let i=g(e),r="";for(;i.length>0;){const e=m.exec(i);if(!e){r+=i;break} +r+=i.substring(0,e.index), +i=i.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+t):(r+=e[0], +"("===e[0]&&n++)}return r})).map((e=>`(${e})`)).join(t)} +const x="[a-zA-Z]\\w*",w="[a-zA-Z_]\\w*",y="\\b\\d+(\\.\\d+)?",_="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",O="\\b(0b[01]+)",v={ +begin:"\\\\[\\s\\S]",relevance:0},N={scope:"string",begin:"'",end:"'", +illegal:"\\n",contains:[v]},k={scope:"string",begin:'"',end:'"',illegal:"\\n", +contains:[v]},M=(e,t,n={})=>{const i=r({scope:"comment",begin:e,end:t, +contains:[]},n);i.contains.push({scope:"doctag", +begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)", +end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0}) +;const s=f("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/) +;return i.contains.push({begin:p(/[ ]+/,"(",s,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i +},S=M("//","$"),R=M("/\\*","\\*/"),j=M("#","$");var A=Object.freeze({ +__proto__:null,MATCH_NOTHING_RE:/\b\B/,IDENT_RE:x,UNDERSCORE_IDENT_RE:w, +NUMBER_RE:y,C_NUMBER_RE:_,BINARY_NUMBER_RE:O, +RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", +SHEBANG:(e={})=>{const t=/^#![ ]*\// +;return e.binary&&(e.begin=p(t,/.*\b/,e.binary,/\b.*/)),r({scope:"meta",begin:t, +end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)}, +BACKSLASH_ESCAPE:v,APOS_STRING_MODE:N,QUOTE_STRING_MODE:k,PHRASAL_WORDS_MODE:{ +begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ +},COMMENT:M,C_LINE_COMMENT_MODE:S,C_BLOCK_COMMENT_MODE:R,HASH_COMMENT_MODE:j, +NUMBER_MODE:{scope:"number",begin:y,relevance:0},C_NUMBER_MODE:{scope:"number", +begin:_,relevance:0},BINARY_NUMBER_MODE:{scope:"number",begin:O,relevance:0}, +REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//, +end:/\/[gimuy]*/,illegal:/\n/,contains:[v,{begin:/\[/,end:/\]/,relevance:0, +contains:[v]}]}]},TITLE_MODE:{scope:"title",begin:x,relevance:0}, +UNDERSCORE_TITLE_MODE:{scope:"title",begin:w,relevance:0},METHOD_GUARD:{ +begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ +"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ +t.data._beginMatch!==e[1]&&t.ignoreMatch()}})});function I(e,t){ +"."===e.input[e.index-1]&&t.ignoreMatch()}function T(e,t){ +void 0!==e.className&&(e.scope=e.className,delete e.className)}function L(e,t){ +t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", +e.__beforeBegin=I,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords, +void 0===e.relevance&&(e.relevance=0))}function B(e,t){ +Array.isArray(e.illegal)&&(e.illegal=f(...e.illegal))}function D(e,t){ +if(e.match){ +if(e.begin||e.end)throw Error("begin & end are not supported with match") +;e.begin=e.match,delete e.match}}function H(e,t){ +void 0===e.relevance&&(e.relevance=1)}const P=(e,t)=>{if(!e.beforeMatch)return +;if(e.starts)throw Error("beforeMatch cannot be used with starts") +;const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t] +})),e.keywords=n.keywords,e.begin=p(n.beforeMatch,d(n.begin)),e.starts={ +relevance:0,contains:[Object.assign(n,{endsParent:!0})] +},e.relevance=0,delete n.beforeMatch +},C=["of","and","for","in","not","or","if","then","parent","list","value"] +;function $(e,t,n="keyword"){const i=Object.create(null) +;return"string"==typeof e?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach((n=>{ +Object.assign(i,$(e[n],t,n))})),i;function r(e,n){ +t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((t=>{const n=t.split("|") +;i[n[0]]=[e,U(n[0],n[1])]}))}}function U(e,t){ +return t?Number(t):(e=>C.includes(e.toLowerCase()))(e)?0:1}const z={},K=e=>{ +console.error(e)},W=(e,...t)=>{console.log("WARN: "+e,...t)},X=(e,t)=>{ +z[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),z[`${e}/${t}`]=!0) +},G=Error();function Z(e,t,{key:n}){let i=0;const r=e[n],s={},o={} +;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=b(t[e-1]) +;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function F(e){(e=>{ +e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, +delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ +_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope +}),(e=>{if(Array.isArray(e.begin)){ +if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), +G +;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), +G;Z(e,e.begin,{key:"beginScope"}),e.begin=E(e.begin,{joinWith:""})}})(e),(e=>{ +if(Array.isArray(e.end)){ +if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), +G +;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), +G;Z(e,e.end,{key:"endScope"}),e.end=E(e.end,{joinWith:""})}})(e)}function V(e){ +function t(t,n){ +return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":"")) +}class n{constructor(){ +this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} +addRule(e,t){ +t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), +this.matchAt+=b(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null) +;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(E(e,{joinWith:"|" +}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex +;const t=this.matcherRe.exec(e);if(!t)return null +;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),i=this.matchIndexes[n] +;return t.splice(0,n),Object.assign(t,i)}}class i{constructor(){ +this.rules=[],this.multiRegexes=[], +this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ +if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n +;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), +t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ +return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ +this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ +const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex +;let n=t.exec(e) +;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ +const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} +return n&&(this.regexIndex+=n.position+1, +this.regexIndex===this.count&&this.considerAll()),n}} +if(e.compilerExtensions||(e.compilerExtensions=[]), +e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") +;return e.classNameAliases=r(e.classNameAliases||{}),function n(s,o){const a=s +;if(s.isCompiled)return a +;[T,D,F,P].forEach((e=>e(s,o))),e.compilerExtensions.forEach((e=>e(s,o))), +s.__beforeBegin=null,[L,B,H].forEach((e=>e(s,o))),s.isCompiled=!0;let c=null +;return"object"==typeof s.keywords&&s.keywords.$pattern&&(s.keywords=Object.assign({},s.keywords), +c=s.keywords.$pattern, +delete s.keywords.$pattern),c=c||/\w+/,s.keywords&&(s.keywords=$(s.keywords,e.case_insensitive)), +a.keywordPatternRe=t(c,!0), +o&&(s.begin||(s.begin=/\B|\b/),a.beginRe=t(a.begin),s.end||s.endsWithParent||(s.end=/\B|\b/), +s.end&&(a.endRe=t(a.end)), +a.terminatorEnd=g(a.end)||"",s.endsWithParent&&o.terminatorEnd&&(a.terminatorEnd+=(s.end?"|":"")+o.terminatorEnd)), +s.illegal&&(a.illegalRe=t(s.illegal)), +s.contains||(s.contains=[]),s.contains=[].concat(...s.contains.map((e=>(e=>(e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((t=>r(e,{ +variants:null},t)))),e.cachedVariants?e.cachedVariants:q(e)?r(e,{ +starts:e.starts?r(e.starts):null +}):Object.isFrozen(e)?r(e):e))("self"===e?s:e)))),s.contains.forEach((e=>{n(e,a) +})),s.starts&&n(s.starts,o),a.matcher=(e=>{const t=new i +;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" +}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end" +}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(a),a}(e)}function q(e){ +return!!e&&(e.endsWithParent||q(e.starts))}class J extends Error{ +constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}} +const Y=i,Q=r,ee=Symbol("nomatch");var te=(t=>{ +const i=Object.create(null),r=Object.create(null),s=[];let o=!0 +;const a="Could not find the language '{}', did you forget to load/include a language module?",c={ +disableAutodetect:!0,name:"Plain text",contains:[]};let g={ +ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i, +languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", +cssSelector:"pre code",languages:null,__emitter:l};function b(e){ +return g.noHighlightRe.test(e)}function m(e,t,n){let i="",r="" +;"object"==typeof t?(i=e, +n=t.ignoreIllegals,r=t.language):(X("10.7.0","highlight(lang, code, ...args) has been deprecated."), +X("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), +r=e,i=t),void 0===n&&(n=!0);const s={code:i,language:r};k("before:highlight",s) +;const o=s.result?s.result:E(s.language,s.code,n) +;return o.code=s.code,k("after:highlight",o),o}function E(e,t,r,s){ +const c=Object.create(null);function l(){if(!N.keywords)return void M.addText(S) +;let e=0;N.keywordPatternRe.lastIndex=0;let t=N.keywordPatternRe.exec(S),n="" +;for(;t;){n+=S.substring(e,t.index) +;const r=y.case_insensitive?t[0].toLowerCase():t[0],s=(i=r,N.keywords[i]);if(s){ +const[e,i]=s +;if(M.addText(n),n="",c[r]=(c[r]||0)+1,c[r]<=7&&(R+=i),e.startsWith("_"))n+=t[0];else{ +const n=y.classNameAliases[e]||e;M.addKeyword(t[0],n)}}else n+=t[0] +;e=N.keywordPatternRe.lastIndex,t=N.keywordPatternRe.exec(S)}var i +;n+=S.substring(e),M.addText(n)}function d(){null!=N.subLanguage?(()=>{ +if(""===S)return;let e=null;if("string"==typeof N.subLanguage){ +if(!i[N.subLanguage])return void M.addText(S) +;e=E(N.subLanguage,S,!0,k[N.subLanguage]),k[N.subLanguage]=e._top +}else e=x(S,N.subLanguage.length?N.subLanguage:null) +;N.relevance>0&&(R+=e.relevance),M.addSublanguage(e._emitter,e.language) +})():l(),S=""}function u(e,t){let n=1;const i=t.length-1;for(;n<=i;){ +if(!e._emit[n]){n++;continue}const i=y.classNameAliases[e[n]]||e[n],r=t[n] +;i?M.addKeyword(r,i):(S=r,l(),S=""),n++}}function h(e,t){ +return e.scope&&"string"==typeof e.scope&&M.openNode(y.classNameAliases[e.scope]||e.scope), +e.beginScope&&(e.beginScope._wrap?(M.addKeyword(S,y.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap), +S=""):e.beginScope._multi&&(u(e.beginScope,t),S="")),N=Object.create(e,{parent:{ +value:N}}),N}function p(e,t,i){let r=((e,t)=>{const n=e&&e.exec(t) +;return n&&0===n.index})(e.endRe,i);if(r){if(e["on:end"]){const i=new n(e) +;e["on:end"](t,i),i.isMatchIgnored&&(r=!1)}if(r){ +for(;e.endsParent&&e.parent;)e=e.parent;return e}} +if(e.endsWithParent)return p(e.parent,t,i)}function f(e){ +return 0===N.matcher.regexIndex?(S+=e[0],1):(I=!0,0)}function b(e){ +const n=e[0],i=t.substring(e.index),r=p(N,e,i);if(!r)return ee;const s=N +;N.endScope&&N.endScope._wrap?(d(), +M.addKeyword(n,N.endScope._wrap)):N.endScope&&N.endScope._multi?(d(), +u(N.endScope,e)):s.skip?S+=n:(s.returnEnd||s.excludeEnd||(S+=n), +d(),s.excludeEnd&&(S=n));do{ +N.scope&&M.closeNode(),N.skip||N.subLanguage||(R+=N.relevance),N=N.parent +}while(N!==r.parent);return r.starts&&h(r.starts,e),s.returnEnd?0:n.length} +let m={};function w(i,s){const a=s&&s[0];if(S+=i,null==a)return d(),0 +;if("begin"===m.type&&"end"===s.type&&m.index===s.index&&""===a){ +if(S+=t.slice(s.index,s.index+1),!o){const t=Error(`0 width match regex (${e})`) +;throw t.languageName=e,t.badRule=m.rule,t}return 1} +if(m=s,"begin"===s.type)return(e=>{ +const t=e[0],i=e.rule,r=new n(i),s=[i.__beforeBegin,i["on:begin"]] +;for(const n of s)if(n&&(n(e,r),r.isMatchIgnored))return f(t) +;return i.skip?S+=t:(i.excludeBegin&&(S+=t), +d(),i.returnBegin||i.excludeBegin||(S=t)),h(i,e),i.returnBegin?0:t.length})(s) +;if("illegal"===s.type&&!r){ +const e=Error('Illegal lexeme "'+a+'" for mode "'+(N.scope||"")+'"') +;throw e.mode=N,e}if("end"===s.type){const e=b(s);if(e!==ee)return e} +if("illegal"===s.type&&""===a)return 1 +;if(A>1e5&&A>3*s.index)throw Error("potential infinite loop, way more iterations than matches") +;return S+=a,a.length}const y=O(e) +;if(!y)throw K(a.replace("{}",e)),Error('Unknown language: "'+e+'"') +;const _=V(y);let v="",N=s||_;const k={},M=new g.__emitter(g);(()=>{const e=[] +;for(let t=N;t!==y;t=t.parent)t.scope&&e.unshift(t.scope) +;e.forEach((e=>M.openNode(e)))})();let S="",R=0,j=0,A=0,I=!1;try{ +for(N.matcher.considerAll();;){ +A++,I?I=!1:N.matcher.considerAll(),N.matcher.lastIndex=j +;const e=N.matcher.exec(t);if(!e)break;const n=w(t.substring(j,e.index),e) +;j=e.index+n} +return w(t.substring(j)),M.closeAllNodes(),M.finalize(),v=M.toHTML(),{ +language:e,value:v,relevance:R,illegal:!1,_emitter:M,_top:N}}catch(n){ +if(n.message&&n.message.includes("Illegal"))return{language:e,value:Y(t), +illegal:!0,relevance:0,_illegalBy:{message:n.message,index:j, +context:t.slice(j-100,j+100),mode:n.mode,resultSoFar:v},_emitter:M};if(o)return{ +language:e,value:Y(t),illegal:!1,relevance:0,errorRaised:n,_emitter:M,_top:N} +;throw n}}function x(e,t){t=t||g.languages||Object.keys(i);const n=(e=>{ +const t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new g.__emitter(g)} +;return t._emitter.addText(e),t})(e),r=t.filter(O).filter(N).map((t=>E(t,e,!1))) +;r.unshift(n);const s=r.sort(((e,t)=>{ +if(e.relevance!==t.relevance)return t.relevance-e.relevance +;if(e.language&&t.language){if(O(e.language).supersetOf===t.language)return 1 +;if(O(t.language).supersetOf===e.language)return-1}return 0})),[o,a]=s,l=o +;return l.secondBest=a,l}function w(e){let t=null;const n=(e=>{ +let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"" +;const n=g.languageDetectRe.exec(t);if(n){const t=O(n[1]) +;return t||(W(a.replace("{}",n[1])), +W("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"} +return t.split(/\s+/).find((e=>b(e)||O(e)))})(e);if(b(n))return +;if(k("before:highlightElement",{el:e,language:n +}),e.children.length>0&&(g.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), +console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), +console.warn("The element with unescaped HTML:"), +console.warn(e)),g.throwUnescapedHTML))throw new J("One of your code blocks includes unescaped HTML.",e.innerHTML) +;t=e;const i=t.textContent,s=n?m(i,{language:n,ignoreIllegals:!0}):x(i) +;e.innerHTML=s.value,((e,t,n)=>{const i=t&&r[t]||n +;e.classList.add("hljs"),e.classList.add("language-"+i) +})(e,n,s.language),e.result={language:s.language,re:s.relevance, +relevance:s.relevance},s.secondBest&&(e.secondBest={ +language:s.secondBest.language,relevance:s.secondBest.relevance +}),k("after:highlightElement",{el:e,result:s,text:i})}let y=!1;function _(){ +"loading"!==document.readyState?document.querySelectorAll(g.cssSelector).forEach(w):y=!0 +}function O(e){return e=(e||"").toLowerCase(),i[e]||i[r[e]]} +function v(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{ +r[e.toLowerCase()]=t}))}function N(e){const t=O(e) +;return t&&!t.disableAutodetect}function k(e,t){const n=e;s.forEach((e=>{ +e[n]&&e[n](t)}))} +"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(()=>{ +y&&_()}),!1),Object.assign(t,{highlight:m,highlightAuto:x,highlightAll:_, +highlightElement:w, +highlightBlock:e=>(X("10.7.0","highlightBlock will be removed entirely in v12.0"), +X("10.7.0","Please use highlightElement now."),w(e)),configure:e=>{g=Q(g,e)}, +initHighlighting:()=>{ +_(),X("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")}, +initHighlightingOnLoad:()=>{ +_(),X("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.") +},registerLanguage:(e,n)=>{let r=null;try{r=n(t)}catch(t){ +if(K("Language definition for '{}' could not be registered.".replace("{}",e)), +!o)throw t;K(t),r=c} +r.name||(r.name=e),i[e]=r,r.rawDefinition=n.bind(null,t),r.aliases&&v(r.aliases,{ +languageName:e})},unregisterLanguage:e=>{delete i[e] +;for(const t of Object.keys(r))r[t]===e&&delete r[t]}, +listLanguages:()=>Object.keys(i),getLanguage:O,registerAliases:v, +autoDetection:N,inherit:Q,addPlugin:e=>{(e=>{ +e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{ +e["before:highlightBlock"](Object.assign({block:t.el},t)) +}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{ +e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} +}),t.debugMode=()=>{o=!1},t.safeMode=()=>{o=!0 +},t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h, +anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t]) +;return Object.assign(t,A),t})({});return te}() +;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `json` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=["true","false","null"],n={ +scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",keywords:{ +literal:a},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/, +relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0 +},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], +illegal:"\\S"}}})();hljs.registerLanguage("json",e)})();/*! `javascript` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s) +;return o=>{const l=o.regex,b=e,d={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const a=e[0].length+e.index,t=e.input[a] +;if("<"===t||","===t)return void n.ignoreMatch();let s +;">"===t&&(((e,{after:n})=>{const a="",M={ +match:[/const|var|let/,/\s+/,b,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(C)], +keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]} +;return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{ +PARAMS_CONTAINS:p,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/, +contains:[o.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ +label:"use_strict",className:"meta",relevance:10, +begin:/^\s*['"]use (strict|asm)['"]/ +},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,y,N,_,h,{match:/\$\d+/},E,R,{ +className:"attr",begin:b+l.lookahead(":"),relevance:0},M,{ +begin:"("+o.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", +keywords:"return throw case",relevance:0,contains:[h,o.REGEXP_MODE,{ +className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ +className:"params",variants:[{begin:o.UNDERSCORE_IDENT_RE,relevance:0},{ +className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, +excludeEnd:!0,keywords:g,contains:p}]}]},{begin:/,/,relevance:0},{match:/\s+/, +relevance:0},{variants:[{begin:"<>",end:""},{ +match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin, +"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ +begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},O,{ +beginKeywords:"while if switch catch for"},{ +begin:"\\b(?!function)"+o.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,label:"func.def",contains:[S,o.inherit(o.TITLE_MODE,{begin:b, +className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+b, +relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, +contains:[S]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},w,T,{match:/\$[(.]/}]}}})() +;hljs.registerLanguage("javascript",e)})();/*! `xml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const a=e.regex,n=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s={ +className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},t={begin:/\s/, +contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] +},i=e.inherit(t,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{ +className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),r={ +endsWithParent:!0,illegal:/`]+/}]}]}]};return{ +name:"HTML, XML", +aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], +case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin://,relevance:10,contains:[t,l,c,i,{begin:/\[/,end:/\]/,contains:[{ +className:"meta",begin://,contains:[t,i,l,c]}]}] +},e.COMMENT(//,{relevance:10}),{begin://, +relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/, +relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"style"},contains:[r],starts:{ +end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag", +begin:/)/,end:/>/,keywords:{name:"script"},contains:[r],starts:{ +end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{ +className:"tag",begin:/<>|<\/>/},{className:"tag", +begin:a.concat(//,/>/,/\s/)))), +end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:r}]},{ +className:"tag",begin:a.concat(/<\//,a.lookahead(a.concat(n,/>/))),contains:[{ +className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}} +})();hljs.registerLanguage("xml",e)})();/*! `css` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict" +;const e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],i=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],r=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],t=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],o=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse() +;return n=>{const a=n.regex,l=(e=>({IMPORTANT:{scope:"meta",begin:"!important"}, +BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number", +begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{ +className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{ +scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", +contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{ +scope:"number", +begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", +relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/} +}))(n),s=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE];return{name:"CSS", +case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"}, +classNameAliases:{keyframePosition:"selector-tag"},contains:[l.BLOCK_COMMENT,{ +begin:/-(webkit|moz|ms|o)-(?=[a-z])/},l.CSS_NUMBER_MODE,{ +className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{ +className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0 +},l.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{ +begin:":("+r.join("|")+")"},{begin:":(:)?("+t.join("|")+")"}]},l.CSS_VARIABLE,{ +className:"attribute",begin:"\\b("+o.join("|")+")\\b"},{begin:/:/,end:/[;}{]/, +contains:[l.BLOCK_COMMENT,l.HEXCOLOR,l.IMPORTANT,l.CSS_NUMBER_MODE,...s,{ +begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri" +},contains:[...s,{className:"string",begin:/[^)]/,endsWithParent:!0, +excludeEnd:!0}]},l.FUNCTION_DISPATCH]},{begin:a.lookahead(/@/),end:"[{;]", +relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/ +},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{ +$pattern:/[a-z-]+/,keyword:"and or not only",attribute:i.join(" ")},contains:[{ +begin:/[a-z-]+(?=:)/,className:"attribute"},...s,l.CSS_NUMBER_MODE]}]},{ +className:"selector-tag",begin:"\\b("+e.join("|")+")\\b"}]}}})() +;hljs.registerLanguage("css",e)})(); \ No newline at end of file diff --git a/app/thirdparty/highlight/styles/default.min.css b/app/thirdparty/highlight/styles/default.min.css new file mode 100644 index 0000000..a75ea91 --- /dev/null +++ b/app/thirdparty/highlight/styles/default.min.css @@ -0,0 +1,9 @@ +/*! + Theme: Default + Description: Original highlight.js style + Author: (c) Ivan Sagalaev + Maintainer: @highlightjs/core-team + Website: https://highlightjs.org/ + License: see project LICENSE + Touched: 2021 +*/pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} \ No newline at end of file diff --git a/app/thirdparty/highlight/styles/monokai.min.css b/app/thirdparty/highlight/styles/monokai.min.css new file mode 100644 index 0000000..448d85d --- /dev/null +++ b/app/thirdparty/highlight/styles/monokai.min.css @@ -0,0 +1 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#272822;color:#ddd}.hljs-keyword,.hljs-literal,.hljs-name,.hljs-selector-tag,.hljs-strong,.hljs-tag{color:#f92672}.hljs-code{color:#66d9ef}.hljs-attribute,.hljs-link,.hljs-regexp,.hljs-symbol{color:#bf79db}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-emphasis,.hljs-section,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-string,.hljs-subst,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#a6e22e}.hljs-class .hljs-title,.hljs-title.class_{color:#fff}.hljs-comment,.hljs-deletion,.hljs-meta,.hljs-quote{color:#75715e}.hljs-doctag,.hljs-keyword,.hljs-literal,.hljs-section,.hljs-selector-id,.hljs-selector-tag,.hljs-title,.hljs-type{font-weight:700} \ No newline at end of file diff --git a/app/views/system/tools/EICUIView.html b/app/views/system/tools/EICUIView.html new file mode 100644 index 0000000..b504cc0 --- /dev/null +++ b/app/views/system/tools/EICUIView.html @@ -0,0 +1,658 @@ + +
+
+

EICUI Components

+

+
+
+

+ The EICUI component library is a complete portage of the EUI component library. + Despite the fact that it sticks to the design and behaviour of the original components, there are some major technical differences: +

+
    +
  • The library is written in vanilla JS. So, it can virtually be embedded in any environment or framework, not limited only to AngularJS
  • +
  • The library code is much lighter than the original EUI (about 15 times lighter)
  • +
  • Components can be declared either through tags (for basic components) or by code (class instanciation)
  • +
  • Some misleading or useless components options have been discarded.
  • +
  • The icon library has been reduced and aligned to the EIC interface needs.
  • +
+

Main principles

+
+
+

Basic components

+
+
+

Alert messages

+

+
+
+ +
+
Default
+
Sample text
+
Closable
+
Sample text
+
Severities
+
"info" message (default)
+
"success" message
+
"secondary" message
+
"warning" message
+
"danger" message
+
Muted
+
"info" message (default)
+
"success" message
+
"secondary" message
+
"warning" message
+
"danger" message
+
+
+
+
+

Badges

+

+ + +

+
+
+
Default usage
+

Use one of the available icon-* class to display the desired icon :

+ 9 + hello +
Color variants
+

Using one of the attribute option : primary | secondary | info | success | warning | danger | accent

+
    <span eicbadge>value</span>  
+ 9 + 9 + 9 + 9 + 9 + 9 + 9 +
Sizing
+ 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 + 9 +
+
+
+
+

Buttons

+

+ + + +

+
+
+ + +
Default button
+ +
Color semantics
+

Using one of the attribute option : primary | secondary | info | success | warning | danger | accent

+ + + + + + + + +
Rounded buttons
+

Using the attribute option : rounded

+ + + + + + +
Disabled buttons
+

Disable a button by adding a disabled attribute

+ + + +
Sizes
+

Adapt specific sizes by using the attribute option : small | large

+ + + + +
With badge
+

Add abadge using attribute : badge="value"

+ + +
Loader state
+

Set button under a loading state using attribute : loading="true"

+

Please note that buttons under loading state are also automaticaly disabled

+ + +
+
+
+
+

CHiPs (tadataladaaaa)

+

+ + +

+
+
+ +
Default
+
+ + +
+
Color semantics
+

Using one of the attribute option : primary | secondary | info | success | warning | danger | accent

+
+ + + + + + + +
+
Destroyable
+

Using the attribute option : destroyable

+
+ + +
+
With icon
+

Using the attribute option : icon="...". See available icons in the styleguide

+
+ + +
+
Sizes
+
+ + + + + + + +
+
Sizes with icons
+
+ + + + + + + +
+
Outline variant
+

Using the attribute option : outline

+
+ + + + + + + +
+
+
+
+
+

Drop-down Menus

+

+
+
+

to be described

+
+
+
+
+

Growler

+

+
+
+ +
+ + + +
+
+
+
+

Icons

+

+ + +

+
+
+ +
Default usage
+

Use one of the available icon-* class to display the desired icon :

+
Color variants
+

Using one of the attribute option : primary | secondary | info | success | warning | danger | accent

+
    <span class="icon-coaching"></span>  
+ + + + + + + +
Sizing
+ + + + + + + + + + +
+
+
+
+

Menus

+

+
+
+

to be described

+
+
+
+
+

Container components

+
+
+

Cards

+

+ + +

+
+
+ +

The card component is used to group various pieces of content into a container which can be used throughout your website.

+
Default
+

Basically a card component is a DOM structure using this blueprint:

+
Some content
+
Severities
+

cards support standard severity attributes : primary | secondary | info | success | warning | danger | accent

+
Some primary content
+
Some secondary content
+
Some dangerous content
+
Some warning content
+
Some info content
+
Some success content
+
Some accent content
+
Header and footer
+
+
+

This is title

+

This is subtitle

+
+
Some primary content
+
this is footer
+
+

Each part of this structure is optional, meaning you only keep from the strucure what is actually use. Just remove the unnecessary parts.

+
Collapsable content
+

You may choose to allow your card content to be collapsed (hidden) at user will. Simply add a collapsable attribute to your card (the main article tag).

+
+
+

I'm expanded

+

...but not for long

+
+
Some dangerous content
+
+

To control the initial state of the card, by deault the card will appear expand. If you want it to appear collapsed, add a collapsed attribute to the card too.

+
+
+

Uncollapse me

+
+
Some dangerous content withoutt subtitle
+
+
+
+
+
+

Dialogs

+

+
+
+

to be described

+
Basic usage
+ + +
Using view content
+

to be described

+
Custom actions
+

to be described

+
+
+
+
+

Tabs

+

+
+
+

to be described

+ +
Default
+
+ +
  • Tab 1
  • +
  • Tab 2
  • +
  • Tab 3
  • +
    +
    +
    +

    Tab 1 insight

    +

    This is the 1st tab

    +
    +
    Tab 1 content
    +
    +
    +
    Tab 2 content
    +
    +
    +
    Tab 3 content
    +
    +
    + +
    Vertical
    +
    +
    + +
  • Tab 1
  • +
  • Tab 2
  • +
  • Tab 3
  • +
    +
    +
    +

    Tab 1 insight

    +

    This is the 1st tab

    +
    +
    Tab 1 content
    +
    +
    +
    Tab 2 content
    +
    +
    +
    Tab 3 content
    +
    +
    +
    +
    +
    +
    +
    +

    Form components

    +
    +
    +

    Inputs

    +

    + + + +

    +
    +
    + +
    Default
    + + + + + + + + + + + + + + + +
    Search input
    + +
    Number input
    + +
    Date input
    + +
    Date and time input
    + +
    Accent
    + +
    Multiple
    +

    (DEPRECATED)

    +

    see Select[editable] for a replacer

    +
    Toggler
    +
    + + + + +
    +
    +
    +
    +
    +

    Textareas

    +

    + + + +

    +
    +
    + +
    Default
    + +
    Hint
    +

    Using the attribute option : hint="..."

    + +
    With badge
    +

    You may check for size limitation, either by character length, word amount or byte length (according to the current text encoding)

    +

    Characters limit: add attribute maxlen="..."

    + +

    Words limit: add attribute maxwords="..."

    + +

    Bytes limit: add attribute maxbytes="..."

    + +
    +
    + +
    +
    +

    Selects

    +

    +
    +
    +

    to be described

    + +
    Default
    + +
    Multi-selection
    + +
    With lookup
    + + +
    Multi-level selection
    + +
    + KNOWN BUG: + When selection popup is opened and user interacts with anoter element of the page wich leads to the removal of the select component from the DOM (i.e. closing a dialog containing the Select component), + the selection popup will stay opened. any interaction (click) outside the selection popup will hide it.
    +
    +
    +
    +
    +

    Checkboxes

    +

    +
    +
    +

    to be described

    +
    +
    +
    +
    +

    Forms

    +

    + +

    +
    +
    +

    + The Form component, only availbale as an instanciable class is not a visual component. Associated with a DOM element, the Form will identify all inputs, textareas and selects defined in this DOM element and provide helper methods to manage this set of fields. + Each field detected will be analyzed to identify: +

    +
      +
    • validation rules
    • +
    • name and path described in the field. allowing exports to JSON format
    • +
    + +
    Simple form
    +
    + +
    +
    Form validation
    +

    to be descibed

    +
    JSON export
    +

    to be descibed

    +
    +
    + +
    +
    +

    Advanced components

    +
    +
    +

    DataGrid

    +

    +
    +
    + +
    +
    +
    +
    +
    +

    WorkflowMap

    +

    +
    +
    +
    +
    +
    +
    +
    +

    BarChart

    +

    +
    +
    + +
    +
    +
    +
    +
    +

    LineChart

    +

    +
    +
    +
    + +
    +
    + Sidney + New York + Notre-Dame-de-Livoye +
    +
    +

    Note: Due to the fact that this component uses paths and path coordinates cannot be declared as relative (using percentage for instance), if you need a fluid resizing of the component, you need to call the redraw() method when resizing your container (typically using the DOMContentResized() method of your view).
    + example:

    + +class myview extends DOMContent { + +... + +DOMContentResized() { + super.DOMContentResized(); + this.mylinechart.redraw(); +} +} + +
    +
    +
    +
    +
    +
    +

    FileUpload

    +

    +
    +
    + +

    Normal server:

    +
    +

    AWS infra (getting signed URL):

    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/system/tools/EICUIView.js b/app/views/system/tools/EICUIView.js new file mode 100644 index 0000000..38d028c --- /dev/null +++ b/app/views/system/tools/EICUIView.js @@ -0,0 +1,174 @@ +class EICUIView extends EICDomContent { + + DOMContentLoaded() { + + /* tabdefault : show_code_start */ + let tab = new Tab(); + tab.addTabs(this.findAll('MENU[eictab].sample1 li'), this.findAll('.tab-content.sample1')); + tab.disableByIndex(1); + /* tabdefault : show_code_end */ + + /* tabvertical : show_code_start */ + tab = new Tab(); + tab.addTabs(this.findAll('MENU[eictab].sample2 li'), this.findAll('.tab-content.sample2')); + tab.disableByIndex(2); + /* tabvertical : show_code_end */ + + /* growlerexample : show_code_start */ + let growlButtons = this.findAll('button.growl-test'); + for(let i = 0; i < growlButtons.length; i++) { + let button = growlButtons[i]; + + button.addEventListener('click', function(event) { + event.stopPropagation(); + event.preventDefault(); + + let button = event.currentTarget; + ui.growl.append(button.dataset.message, button.dataset.severity); + }); + } + /* growlerexample : show_code_end */ + + /* dialogexample : show_code_start */ + let dialogButton = this.find('button.dialog-test'); + + dialogButton.addEventListener('click', function(event) { + event.stopPropagation(); + event.preventDefault(); + + this.openDialog(('Do you see this dialog?')) + .then(function(result) { + if(result) + ui.growl.append('You approved the dialog', 'success'); + else + ui.growl.append('You dismissed the dialog', 'warning'); + }) + + .catch(function() { + ui.growl.append('You canceled the dialog', 'warning'); + }) + /**/ + }.bind(this)); + /* dialogexample : show_code_end */ + + let components = ui.eicfy(this.el); + let togglers = components.filter(el => el.el.getAttribute('type')=='toggler') + for(let toggy of togglers) toggy.onToggle = (val, obj) => console.log('toggler:',val, obj) + + let grid = new DataGrid(this.find('[eicdatagrid]'), { + headers: [ + {label: 'name', filter: 'text', sortable:true}, + {label: 'ingredients', filter: 'list', sortable:true}, + {label: 'price', type: 'currency', sortable:true}, + ], + height: '150px' + }); + grid.addRow('1', [ 'Margarita', new Array('tomato', 'mozza'), 8.50 ]); + grid.addRow('2', [ 'Chorizo', new Array('tomato', 'mozza', 'chorizo'), 10.50 ]); + grid.addRow('3', [ 'Regina', new Array('tomato', 'mozza', 'ham', 'schrooms'), 10.50 ]); + grid.addRow('4', [ 'Hawaï', new Array('tomato', 'mozza', 'ham', 'Pineapple'), 11.50 ]); + grid.addRow('5', [ 'Garlic', new Array('tomato', 'mozza', 'garlic'), 10.00 ]); + grid.addRow('6', [ 'Napoli', new Array('tomato', 'mozza', 'ham', 'Olive'), 13.00 ]); + /* gridexample : show_code_end */ + + /* barchart : show_code_start */ + + new BarChart(this.find('[eicbarchart]'), { + title: 'Bars sample', + height: 200, + data: [ + {value: 10, label:'', severity: 'danger'}, + {value: 20, label:'', severity: 'warning'}, + {value: 30, label:'', severity: 'primary'}, + {value: 50, label:'', severity: 'success'}, + ] + }); + /* barchart : show_code_end */ + + /* linechart : show_code_start */ + this.linechart = new LineChart(this.find('[eiclinechart]'), { + title: 'Weather Forecast', + height: 180, + data: [ + { + severity: 'primary', + unit: '°C', + data: [ 0, 5, 12, 24, 17] + }, + { + severity: 'danger', + unit: '°C', + data: [ 2, 3, 14, 22, 13] + }, + { + severity: 'success', + unit: '°C', + data: [ 19, 11, 9, 10, 12] + } + ], + labels: [ + '27 jun', '28 jun', '29 jun', '30 jun', '1 jul' + ] + }); + /* linechart : show_code_end */ + + + /* fileuploadexample : show_code_start */ + + // Normal server : + this.fileUpload = new FileUpload(this.find('.filupld'), { + uploadUrl: 'https://myserver.com/upload?file=', + uploadMethod: 'POST', + allowedExtensions: ['pdf'], + allowDrop: true, + maxFiles: 3, + minFiles: 1, + dndLabel : 'Drop your pitch PDFs here !' + }); + /* fileuploadexample : show_code_end */ + + + // To AWS S3 bucket (pre-requesting a signed URL) + /* Nike: Dependency async issue in this page, + * but this AWS thing is meant to be deprecated anyway (cooloff period end: 31/11/2024) */ + // this.awsfileUpload = new AwsFileUpload(this.find('.filupld2'), { + // getSignedUrlUrl : 'https://api.dev.eismea.eu/vod/source?file=', + // getSignedUrlMethod : 'PUT', + // apiKey: 'xxxyyyyzzzz', + // uploadUrl: '', + // uploadMethod: 'PUT', + // allowedExtensions: ['mp4'], + // allowedMimes: ['video/mp4'], + // allowDrop: true, + // maxFiles: 1, + // minFiles: 1, + // dndLabel : 'Drop your presentation video (mp4) here !' + // }); + + let codeButtons = components.filter(el => el.el.classList.contains('show-code')) + for(let codeButton of codeButtons) { + codeButton.click = this.showCode.bind(this, codeButton) + } + } + + async showCode(buttonObj, event) { + event.preventDefault(); event.stopPropagation(); + let styleguideTemplate = app.Assets.Store.html[`/app/views/${this._className}.html`]; + let styleguideCode = this.DOMContentLoaded.toString(); + let result = await this.openDialog(await this.loadContent('system/tools/dialogs/codeTemplateDialog', + { title: `Code explorer` }, + { styleguideView : this, + styleguideTemplate : styleguideTemplate, + styleguideCode: styleguideCode, + codeclass: buttonObj.el.dataset.codeclass, + }) + ); + } + + DOMContentResized() { + super.DOMContentResized(); + this.linechart.redraw(); + } +} + +app.registerClass('EICUIView', EICUIView) \ No newline at end of file diff --git a/app/views/system/tools/styleguideView.html b/app/views/system/tools/styleguideView.html new file mode 100755 index 0000000..b6dcece --- /dev/null +++ b/app/views/system/tools/styleguideView.html @@ -0,0 +1,309 @@ + +
    +
    +

    Style guide

    +
    +
    +
    +
    +

    Typography

    +

    Utility classes available for text formatting

    + +
    +
    +

    Font definition

    + test1 + test2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    previewNameValueUtility classCSS variable
    +

    Sample text

    +
    2xs0.625remeui-u-font-2xs--eicui-base-font-2xs
    +

    Sample text

    +
    xs0.75remeui-u-font-xs--eicui-base-font-xs
    +

    Sample text

    +
    s0.875remeui-u-font-s--eicui-base-font-s
    +

    Sample text

    +
    m1remeui-u-font-m--eicui-base-font-m
    +

    Sample text

    +
    l1.125remeui-u-font-l--eicui-base-font-l
    +

    Sample text

    +
    xl1.25remeui-u-font-xl--eicui-base-font-xl
    +

    Sample text

    +
    2xl1.5remeui-u-font-2xl--eicui-base-font-2xl
    +

    Sample text

    +
    3xl1.75remeui-u-font-3xl--eicui-base-font-3xl
    +

    Sample text

    +
    4xl2remeui-u-font-4xl--eicui-base-font-4xl
    +

    Sample text

    +
    5xl2.25remeui-u-font-5xl--eicui-base-font-5xl
    +

    Sample text

    +
    6xl2.675remeui-u-font-6xl--eicui-base-font-6xl
    +
    +
    +
    +
    +

    Grid system

    +

    +
    +
    +

    You can organize your contents in columns. The amount of columns to be used is defined through a class entry in the contents container.

    +

    Note that when using this grid system, the app will track interface resizing an adapt the column in order to keep a fluid display.

    +
    +
    2 columns (class="cols-2")
    +
    + + +
    +
    3 columns (class="cols-3")
    +
    + + + +
    +
    4 columns (class="cols-4")
    +
    + + + + +
    +
    5 columns (class="cols-5")
    +
    + + + + + +
    +
    6 columns (class="cols-6")
    +
    + + + + + + +
    +
    8 columns (class="cols-8")
    +
    + + + + + + + + +
    +
    +
    +
    +
    +
    +

    Color system

    +

    Normalized color coding

    +
    +
    +
    Severity
    +

    EUI provides a reduced set of colors providing a semantic information to the user.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    MeaningColorAttribute*css variable name
    Primaryprimary--eicui-base-color-primary-100
    Secondary(used as default)--eicui-base-color-secondary-100
    Successsuccess--eicui-base-color-success-100
    Warningwarning--eicui-base-color-warning-100
    Danger/failuredanger--eicui-base-color-danger-100
    Infoinfo--eicui-base-color-info-100
    Accentaccent--eicui-base-color-accent-100
    +

    * See components tagged with severity, indicating they support severity color system

    +
    +
    +
    +
    +

    Headings

    +

    Styles available for title formatting

    +
    +
    +

    This is heading 1

    +

    This is heading 2

    +

    This is heading 3

    +

    This is heading 4

    +
    This is heading 5
    +
    This is heading 6
    +
    +
    +
    +
    +

    Icons

    +

    Set of UI icons

    +
    +
    +
      +
      +
      +
      +
      diff --git a/app/views/system/tools/styleguideView.js b/app/views/system/tools/styleguideView.js new file mode 100755 index 0000000..83d0a4f --- /dev/null +++ b/app/views/system/tools/styleguideView.js @@ -0,0 +1,46 @@ +class styleguideView extends EICDomContent { + + DOMContentLoaded() { + + // building icon list + let iconList = this.find('ul.icon-list'); + let sheet = null; + + for(let i = 0; document.styleSheets.length; i++) { + let rule = document.styleSheets[i]; + if(rule) { + let rules + try { rules = rule.cssRules } + catch(err) { rules = [] } + for(let r = 0; r < rules.length; r++) { + let islocal = rule.href && ( (new URL(rule.href)).host == document.location.host); + if( (rules.item(r).styleSheet) && islocal) { + sheet = rules.item(r).styleSheet; + } + } + } else { + break; + } + } + + if(sheet) { + let classes = []; + for(let i = 0; i < sheet.rules.length; i++) { + let rule = sheet.rules.item(i); + if(rule.selectorText && rule.selectorText.indexOf('.icon-') == 0) { + classes.push(rule.selectorText.replace('.', '').replace('::before', '')) + } + } + + classes.sort(); + for(let i = 0; i < classes.length; i++) { + let cls = classes[i]; + iconList.appendChild(ui.create(`
    • `)) + } + } + + ui.eicfy(this.el); + } +} + +app.registerClass('styleguideView', styleguideView) \ No newline at end of file