From be487897aba7b1f8e205038008be08afbd347c1c Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Tue, 17 May 2016 15:58:16 +0100 Subject: [PATCH] Changes for Azure --- app.js | 31 +- app/css/app.css | 11 + app/css/mui.css | 2063 ++---- app/css/mui.custom.css | 1912 ++++++ app/index.html | 96 +- app/js/appv2.js | 57 +- app/js/sowebsocket.js | 105 +- bower_components/knockout/.bower.json | 36 - bower_components/knockout/Gruntfile.js | 174 - bower_components/knockout/LICENSE | 22 - bower_components/knockout/README.md | 50 - bower_components/knockout/bower.json | 25 - .../knockout/build/fragments/amd-post.js | 1 - .../knockout/build/fragments/amd-pre.js | 13 - .../knockout/build/fragments/extern-post.js | 1 - .../knockout/build/fragments/extern-pre.js | 8 - .../build/fragments/source-references.js | 57 - .../knockout/build/knockout-raw.js | 34 - .../knockout/dist/knockout.debug.js | 5871 ----------------- bower_components/knockout/dist/knockout.js | 123 - bower_components/knockout/package.json | 39 - .../src/binding/bindingAttributeSyntax.js | 467 -- .../knockout/src/binding/bindingProvider.js | 73 - .../src/binding/defaultBindings/attr.js | 38 - .../src/binding/defaultBindings/checked.js | 115 - .../src/binding/defaultBindings/click.js | 2 - .../src/binding/defaultBindings/css.js | 17 - .../binding/defaultBindings/enableDisable.js | 15 - .../src/binding/defaultBindings/event.js | 52 - .../src/binding/defaultBindings/foreach.js | 38 - .../src/binding/defaultBindings/hasfocus.js | 60 - .../src/binding/defaultBindings/html.js | 10 - .../binding/defaultBindings/ifIfnotWith.js | 45 - .../src/binding/defaultBindings/options.js | 166 - .../defaultBindings/selectedOptions.js | 32 - .../src/binding/defaultBindings/style.js | 15 - .../src/binding/defaultBindings/submit.js | 19 - .../src/binding/defaultBindings/text.js | 11 - .../src/binding/defaultBindings/textInput.js | 182 - .../src/binding/defaultBindings/uniqueName.js | 9 - .../src/binding/defaultBindings/value.js | 106 - .../src/binding/defaultBindings/visible.js | 10 - .../editDetection/arrayToDomNodeChildren.js | 180 - .../binding/editDetection/compareArrays.js | 102 - .../src/binding/expressionRewriting.js | 200 - .../knockout/src/binding/selectExtensions.js | 72 - .../src/components/componentBinding.js | 85 - .../knockout/src/components/customElements.js | 115 - .../knockout/src/components/defaultLoader.js | 226 - .../knockout/src/components/loaderRegistry.js | 142 - .../src/google-closure-compiler-utils.js | 15 - bower_components/knockout/src/memoization.js | 70 - bower_components/knockout/src/namespace.js | 3 - bower_components/knockout/src/options.js | 7 - .../src/subscribables/dependencyDetection.js | 64 - .../src/subscribables/dependentObservable.js | 467 -- .../knockout/src/subscribables/extenders.js | 106 - .../src/subscribables/mappingHelpers.js | 96 - .../knockout/src/subscribables/observable.js | 86 - .../observableArray.changeTracking.js | 145 - .../src/subscribables/observableArray.js | 123 - .../src/subscribables/subscribable.js | 171 - bower_components/knockout/src/tasks.js | 108 - .../jquery.tmpl/jqueryTmplTemplateEngine.js | 84 - .../templating/native/nativeTemplateEngine.js | 23 - .../knockout/src/templating/templateEngine.js | 72 - .../src/templating/templateRewriting.js | 66 - .../src/templating/templateSources.js | 123 - .../knockout/src/templating/templating.js | 304 - .../knockout/src/utils.domData.js | 50 - .../knockout/src/utils.domManipulation.js | 129 - .../knockout/src/utils.domNodeDisposal.js | 103 - bower_components/knockout/src/utils.js | 625 -- bower_components/knockout/src/version.js | 3 - .../knockout/src/virtualElements.js | 195 - custom.css | 1912 ++++++ custom.scss | 10 + gulpfile.js | 2 +- lib/mqtt/mqttClient.js | 9 +- lib/mqtt/mqttConnect.js | 79 +- routes/projector_v1.js | 24 + 81 files changed, 4833 insertions(+), 13774 deletions(-) create mode 100644 app/css/mui.custom.css delete mode 100644 bower_components/knockout/.bower.json delete mode 100644 bower_components/knockout/Gruntfile.js delete mode 100644 bower_components/knockout/LICENSE delete mode 100644 bower_components/knockout/README.md delete mode 100644 bower_components/knockout/bower.json delete mode 100644 bower_components/knockout/build/fragments/amd-post.js delete mode 100644 bower_components/knockout/build/fragments/amd-pre.js delete mode 100644 bower_components/knockout/build/fragments/extern-post.js delete mode 100644 bower_components/knockout/build/fragments/extern-pre.js delete mode 100644 bower_components/knockout/build/fragments/source-references.js delete mode 100644 bower_components/knockout/build/knockout-raw.js delete mode 100644 bower_components/knockout/dist/knockout.debug.js delete mode 100644 bower_components/knockout/dist/knockout.js delete mode 100644 bower_components/knockout/package.json delete mode 100644 bower_components/knockout/src/binding/bindingAttributeSyntax.js delete mode 100644 bower_components/knockout/src/binding/bindingProvider.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/attr.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/checked.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/click.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/css.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/enableDisable.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/event.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/foreach.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/hasfocus.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/html.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/ifIfnotWith.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/options.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/selectedOptions.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/style.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/submit.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/text.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/textInput.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/uniqueName.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/value.js delete mode 100644 bower_components/knockout/src/binding/defaultBindings/visible.js delete mode 100644 bower_components/knockout/src/binding/editDetection/arrayToDomNodeChildren.js delete mode 100644 bower_components/knockout/src/binding/editDetection/compareArrays.js delete mode 100644 bower_components/knockout/src/binding/expressionRewriting.js delete mode 100644 bower_components/knockout/src/binding/selectExtensions.js delete mode 100644 bower_components/knockout/src/components/componentBinding.js delete mode 100644 bower_components/knockout/src/components/customElements.js delete mode 100644 bower_components/knockout/src/components/defaultLoader.js delete mode 100644 bower_components/knockout/src/components/loaderRegistry.js delete mode 100644 bower_components/knockout/src/google-closure-compiler-utils.js delete mode 100644 bower_components/knockout/src/memoization.js delete mode 100644 bower_components/knockout/src/namespace.js delete mode 100644 bower_components/knockout/src/options.js delete mode 100644 bower_components/knockout/src/subscribables/dependencyDetection.js delete mode 100644 bower_components/knockout/src/subscribables/dependentObservable.js delete mode 100644 bower_components/knockout/src/subscribables/extenders.js delete mode 100644 bower_components/knockout/src/subscribables/mappingHelpers.js delete mode 100644 bower_components/knockout/src/subscribables/observable.js delete mode 100644 bower_components/knockout/src/subscribables/observableArray.changeTracking.js delete mode 100644 bower_components/knockout/src/subscribables/observableArray.js delete mode 100644 bower_components/knockout/src/subscribables/subscribable.js delete mode 100644 bower_components/knockout/src/tasks.js delete mode 100644 bower_components/knockout/src/templating/jquery.tmpl/jqueryTmplTemplateEngine.js delete mode 100644 bower_components/knockout/src/templating/native/nativeTemplateEngine.js delete mode 100644 bower_components/knockout/src/templating/templateEngine.js delete mode 100644 bower_components/knockout/src/templating/templateRewriting.js delete mode 100644 bower_components/knockout/src/templating/templateSources.js delete mode 100644 bower_components/knockout/src/templating/templating.js delete mode 100644 bower_components/knockout/src/utils.domData.js delete mode 100644 bower_components/knockout/src/utils.domManipulation.js delete mode 100644 bower_components/knockout/src/utils.domNodeDisposal.js delete mode 100644 bower_components/knockout/src/utils.js delete mode 100644 bower_components/knockout/src/version.js delete mode 100644 bower_components/knockout/src/virtualElements.js create mode 100644 custom.css create mode 100644 custom.scss diff --git a/app.js b/app.js index 61df6f7..306a620 100644 --- a/app.js +++ b/app.js @@ -81,7 +81,6 @@ projector_v1.use(mqttConnect); busEmitter.on('lightingOn', lighting_v1.doLightsOn); busEmitter.on('lightingOff', lighting_v1.doLightsOff); -// busEmitter.on('lightingCmd', lighting_v1.doLightsCmd); busEmitter.on('heatingOn', mqttConnect.heatingOn); busEmitter.on('heatingOff', mqttConnect.heatingOff); @@ -89,6 +88,8 @@ busEmitter.on('projectorOn', mqttConnect.projectorOn); busEmitter.on('projectorOff', mqttConnect.projectorOff); +busEmitter.on('connectWS', mqttConnect.connectWS); + mqttConnect.setupPing(); cal.startController(busEmitter); @@ -119,6 +120,7 @@ app.post('/api/calendar/extend', function(req, res) { // Events and sockets busEmitter.on('clientConnected', (socketSet) => { + logger.info('-=-=-=-=-'); logger.info(socketSet.getClientStatus()); heating_v1.setsocket(socketSet).subscribe(); lighting_v1.setsocket(socketSet).subscribe(); @@ -168,17 +170,13 @@ wsServer.on('request', function(request) { logger.info((new Date()) + ' Connection accepted.'); var sendSocketHandler = (obj) => { - // Logger.info('sendSocket: ' , JSON.stringify(obj)); try { connection.sendUTF(JSON.stringify(obj)); } catch (err) { logger.error(err); logger.warn('Offending object: ', obj); - // logger.warn(util.inspect(obj)); - } - }; busEmitter.on('sendSocket', sendSocketHandler); @@ -212,6 +210,7 @@ app.post('/api/v1/heating/on', heating_v1.turnon); app.post('/api/v1/projector/off', projector_v1.turnoff); app.post('/api/v1/projector/on', projector_v1.turnon); +app.post('/api/v1/projector/cmd', projector_v1.command); app.post('/api/v1/register/ios', function(req, res) { @@ -225,28 +224,6 @@ app.post('/api/v1/register/ios', function(req, res) { cal.registeriOSToken(registrationId); - /* If (iosTokens.indexOf(registrationId) === -1) { - iosTokens.push(registrationId); - logger.info('IOS Device registered.'); - - apnTimer = setInterval(function() { - - logger.info('Sending the same notification each of the devices with one call to pushNotification.'); - var note = new apn.notification(); - var now = new Date(); - note.setAlertText('Hello, from node-apn!' + now.toISOString() ); - note.setAlertTitle('Smart Office'); - note.setBadge(1); - note.setSound('dong.aiff'); - - - note.badge = 1; - - apnService.pushNotification(note, iosTokens); - - }, 30000); - } - */ } }); diff --git a/app/css/app.css b/app/css/app.css index 2c20577..2537b69 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -256,3 +256,14 @@ projector: cast */ + +.md-display { + opacity: 1; + transition: opacity 0.3s, visibility 0.3s; + + } + +.lostConnection { + opacity: 0.5; + transition: opacity 0.3s, visibility 0.3s; +} diff --git a/app/css/mui.css b/app/css/mui.css index 29651f0..cfe1de1 100644 --- a/app/css/mui.css +++ b/app/css/mui.css @@ -1,3 +1,6 @@ +/** + * MUI Colors module + */ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ /** * 1. Set default font family to sans-serif. @@ -10,15 +13,13 @@ html { -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; - /* 2 */ -} + /* 2 */ } /** * Remove default margin. */ body { - margin: 0; -} + margin: 0; } /* HTML5 display definitions ========================================================================== */ @@ -41,8 +42,7 @@ menu, nav, section, summary { - display: block; -} + display: block; } /** * 1. Correct `inline-block` display not defined in IE 8/9. @@ -55,8 +55,7 @@ video { display: inline-block; /* 1 */ vertical-align: baseline; - /* 2 */ -} + /* 2 */ } /** * Prevent modern browsers from displaying `audio` without controls. @@ -64,8 +63,7 @@ video { */ audio:not([controls]) { display: none; - height: 0; -} + height: 0; } /** * Address `[hidden]` styling not present in IE 8/9/10. @@ -73,8 +71,7 @@ audio:not([controls]) { */ [hidden], template { - display: none; -} + display: none; } /* Links ========================================================================== */ @@ -82,8 +79,7 @@ template { * Remove the gray background color from active links in IE 10. */ a { - background-color: transparent; -} + background-color: transparent; } /** * Improve readability of focused elements when they are also in an @@ -91,8 +87,7 @@ a { */ a:active, a:hover { - outline: 0; -} + outline: 0; } /* Text-level semantics ========================================================================== */ @@ -100,23 +95,20 @@ a:hover { * Address styling not present in IE 8/9/10/11, Safari, and Chrome. */ abbr[title] { - border-bottom: 1px dotted; -} + border-bottom: 1px dotted; } /** * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. */ b, strong { - font-weight: bold; -} + font-weight: bold; } /** * Address styling not present in Safari and Chrome. */ dfn { - font-style: italic; -} + font-style: italic; } /** * Address variable `h1` font-size and margin within `section` and `article` @@ -124,23 +116,20 @@ dfn { */ h1 { font-size: 2em; - margin: 0.67em 0; -} + margin: 0.67em 0; } /** * Address styling not present in IE 8/9. */ mark { background: #ff0; - color: #000; -} + color: #000; } /** * Address inconsistent and variable font size in all browsers. */ small { - font-size: 80%; -} + font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. @@ -150,16 +139,13 @@ sup { font-size: 75%; line-height: 0; position: relative; - vertical-align: baseline; -} + vertical-align: baseline; } sup { - top: -0.5em; -} + top: -0.5em; } sub { - bottom: -0.25em; -} + bottom: -0.25em; } /* Embedded content ========================================================================== */ @@ -167,15 +153,13 @@ sub { * Remove border when inside `a` element in IE 8/9/10. */ img { - border: 0; -} + border: 0; } /** * Correct overflow not hidden in IE 9/10/11. */ svg:not(:root) { - overflow: hidden; -} + overflow: hidden; } /* Grouping content ========================================================================== */ @@ -183,23 +167,20 @@ svg:not(:root) { * Address margin not present in IE 8/9 and Safari. */ figure { - margin: 1em 40px; -} + margin: 1em 40px; } /** * Address differences between Firefox and other browsers. */ hr { box-sizing: content-box; - height: 0; -} + height: 0; } /** * Contain overflow in all browsers. */ pre { - overflow: auto; -} + overflow: auto; } /** * Address odd `em`-unit font size rendering in all browsers. @@ -209,8 +190,7 @@ kbd, pre, samp { font-family: monospace, monospace; - font-size: 1em; -} + font-size: 1em; } /* Forms ========================================================================== */ @@ -234,15 +214,13 @@ textarea { font: inherit; /* 2 */ margin: 0; - /* 3 */ -} + /* 3 */ } /** * Address `overflow` set to `hidden` in IE 8/9/10/11. */ button { - overflow: visible; -} + overflow: visible; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. @@ -252,8 +230,7 @@ button { */ button, select { - text-transform: none; -} + text-transform: none; } /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` @@ -269,16 +246,14 @@ input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; - /* 3 */ -} + /* 3 */ } /** * Re-set default cursor for disabled elements. */ button[disabled], html input[disabled] { - cursor: default; -} + cursor: default; } /** * Remove inner padding and border in Firefox 4+. @@ -286,16 +261,14 @@ html input[disabled] { button::-moz-focus-inner, input::-moz-focus-inner { border: 0; - padding: 0; -} + padding: 0; } /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ input { - line-height: normal; -} + line-height: normal; } /** * It's recommended that you don't attempt to style these elements. @@ -309,8 +282,7 @@ input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; - /* 2 */ -} + /* 2 */ } /** * Fix the cursor style for Chrome's increment/decrement buttons. For certain @@ -319,8 +291,7 @@ input[type="radio"] { */ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { - height: auto; -} + height: auto; } /** * 1. Address `appearance` set to `searchfield` in Safari and Chrome. @@ -330,8 +301,7 @@ input[type="search"] { -webkit-appearance: textfield; /* 1 */ box-sizing: content-box; - /* 2 */ -} + /* 2 */ } /** * Remove inner padding and search cancel button in Safari and Chrome on OS X. @@ -340,8 +310,7 @@ input[type="search"] { */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} + -webkit-appearance: none; } /** * Define consistent border, margin, and padding. @@ -349,8 +318,7 @@ input[type="search"]::-webkit-search-decoration { fieldset { border: 1px solid #c0c0c0; margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} + padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9/10/11. @@ -360,23 +328,20 @@ legend { border: 0; /* 1 */ padding: 0; - /* 2 */ -} + /* 2 */ } /** * Remove default vertical scrollbar in IE 8/9/10/11. */ textarea { - overflow: auto; -} + overflow: auto; } /** * Don't inherit the `font-weight` (applied by a rule above). * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ optgroup { - font-weight: bold; -} + font-weight: bold; } /* Tables ========================================================================== */ @@ -385,13 +350,11 @@ optgroup { */ table { border-collapse: collapse; - border-spacing: 0; -} + border-spacing: 0; } td, th { - padding: 0; -} + padding: 0; } /** * MUI Colors module @@ -400,18 +363,15 @@ th { * MUI Reboot */ * { - box-sizing: border-box; -} + box-sizing: border-box; } *:before, *:after { - box-sizing: border-box; -} + box-sizing: border-box; } html { font-size: 10px; - -webkit-tap-highlight-color: transparent; -} + -webkit-tap-highlight-color: transparent; } body { font-family: Arial, Verdana, Tahoma; @@ -419,8 +379,7 @@ body { font-weight: 400; line-height: 1.429; color: rgba(0, 0, 0, 0.87); - background-color: #FFF; -} + background-color: #FFF; } input, button, @@ -428,50 +387,39 @@ select, textarea { font-family: inherit; font-size: inherit; - line-height: inherit; -} + line-height: inherit; } a { color: #2196F3; - text-decoration: none; -} - -a:hover, a:focus { - color: #1976D2; - text-decoration: underline; -} - -a:focus { - outline: thin dotted; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} + text-decoration: none; } + a:hover, a:focus { + color: #1976D2; + text-decoration: underline; } + a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } p { - margin: 0 0 10px; -} + margin: 0 0 10px; } ul, ol { margin-top: 0; - margin-bottom: 10px; -} + margin-bottom: 10px; } figure { - margin: 0; -} + margin: 0; } img { - vertical-align: middle; -} + vertical-align: middle; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; height: 1px; - background-color: rgba(0, 0, 0, 0.12); -} + background-color: rgba(0, 0, 0, 0.12); } legend { display: block; @@ -481,107 +429,82 @@ legend { font-size: 21px; color: rgba(0, 0, 0, 0.87); line-height: inherit; - border: 0; -} + border: 0; } input[type="search"] { box-sizing: border-box; - -webkit-appearance: none; -} + -webkit-appearance: none; } input[type="file"]:focus, input[type="radio"]:focus, input[type="checkbox"]:focus { outline: thin dotted; outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} + outline-offset: -2px; } input[type="radio"]:disabled, input[type="checkbox"]:disabled { - cursor: not-allowed; -} + cursor: not-allowed; } strong { - font-weight: 700; -} + font-weight: 700; } abbr[title] { cursor: help; - border-bottom: 1px dotted #2196F3; -} + border-bottom: 1px dotted #2196F3; } h1, h2, h3 { margin-top: 20px; - margin-bottom: 10px; -} + margin-bottom: 10px; } h4, h5, h6 { margin-top: 10px; - margin-bottom: 10px; -} + margin-bottom: 10px; } /** * MUI Appbar */ .mui--appbar-height { - height: 56px; -} + height: 56px; } .mui--appbar-min-height, .mui-appbar { - min-height: 56px; -} + min-height: 56px; } .mui--appbar-line-height { - line-height: 56px; -} + line-height: 56px; } .mui--appbar-top { - top: 56px; -} + top: 56px; } @media (orientation: landscape) and (max-height: 480px) { .mui--appbar-height { - height: 48px; - } + height: 48px; } .mui--appbar-min-height, .mui-appbar { - min-height: 48px; - } + min-height: 48px; } .mui--appbar-line-height { - line-height: 48px; - } + line-height: 48px; } .mui--appbar-top { - top: 48px; - } -} + top: 48px; } } @media (min-width: 480px) { .mui--appbar-height { - height: 64px; - } + height: 64px; } .mui--appbar-min-height, .mui-appbar { - min-height: 64px; - } + min-height: 64px; } .mui--appbar-line-height { - line-height: 64px; - } + line-height: 64px; } .mui--appbar-top { - top: 64px; - } -} + top: 64px; } } .mui-appbar { background-color: #2196F3; - color: #FFF; -} + color: #FFF; } /** * MUI Buttons */ .mui-btn { - -webkit-animation-duration: 0.0001s; animation-duration: 0.0001s; - -webkit-animation-name: mui-node-inserted; animation-name: mui-node-inserted; font-weight: 500; font-size: 14px; @@ -598,113 +521,71 @@ h4, h5, h6 { border: none; border-radius: 2px; cursor: pointer; - -ms-touch-action: manipulation; touch-action: manipulation; background-image: none; text-align: center; line-height: 36px; vertical-align: middle; white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; user-select: none; font-size: 14px; letter-spacing: 0.03em; position: relative; - overflow: hidden; -} - -.mui-btn:hover, .mui-btn:focus, .mui-btn:active { - color: rgba(0, 0, 0, 0.87); - background-color: white; -} - -.mui-btn[disabled]:hover, .mui-btn[disabled]:focus, .mui-btn[disabled]:active { - color: rgba(0, 0, 0, 0.87); - background-color: #FFF; -} - -.mui-btn.mui-btn--flat { - color: rgba(0, 0, 0, 0.87); - background-color: transparent; -} - -.mui-btn.mui-btn--flat:hover, .mui-btn.mui-btn--flat:focus, .mui-btn.mui-btn--flat:active { - color: rgba(0, 0, 0, 0.87); - background-color: #f2f2f2; -} - -.mui-btn.mui-btn--flat[disabled]:hover, .mui-btn.mui-btn--flat[disabled]:focus, .mui-btn.mui-btn--flat[disabled]:active { - color: rgba(0, 0, 0, 0.87); - background-color: transparent; -} - -.mui-btn:hover, .mui-btn:focus, .mui-btn:active { - outline: 0; - text-decoration: none; - color: rgba(0, 0, 0, 0.87); -} - -.mui-btn:hover, .mui-btn:focus { - box-shadow: 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); -} - -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + overflow: hidden; } + .mui-btn:hover, .mui-btn:focus, .mui-btn:active { + color: rgba(0, 0, 0, 0.87); + background-color: white; } + .mui-btn[disabled]:hover, .mui-btn[disabled]:focus, .mui-btn[disabled]:active { + color: rgba(0, 0, 0, 0.87); + background-color: #FFF; } + .mui-btn.mui-btn--flat { + color: rgba(0, 0, 0, 0.87); + background-color: transparent; } + .mui-btn.mui-btn--flat:hover, .mui-btn.mui-btn--flat:focus, .mui-btn.mui-btn--flat:active { + color: rgba(0, 0, 0, 0.87); + background-color: #f2f2f2; } + .mui-btn.mui-btn--flat[disabled]:hover, .mui-btn.mui-btn--flat[disabled]:focus, .mui-btn.mui-btn--flat[disabled]:active { + color: rgba(0, 0, 0, 0.87); + background-color: transparent; } + .mui-btn:hover, .mui-btn:focus, .mui-btn:active { + outline: 0; + text-decoration: none; + color: rgba(0, 0, 0, 0.87); } .mui-btn:hover, .mui-btn:focus { - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); - } -} - -.mui-btn:active { - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} - -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + box-shadow: 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn:hover, .mui-btn:focus { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } } .mui-btn:active { - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - } -} - -.mui-btn:disabled, .mui-btn.mui--is-disabled { - cursor: not-allowed; - pointer-events: none; - opacity: 0.60; - box-shadow: none; -} + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn:active { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } } + .mui-btn:disabled, .mui-btn.mui--is-disabled { + cursor: not-allowed; + pointer-events: none; + opacity: 0.60; + box-shadow: none; } .mui-btn + .mui-btn { - margin-left: 8px; -} + margin-left: 8px; } .mui-btn--flat { - background-color: transparent; -} - -.mui-btn--flat:hover, .mui-btn--flat:focus, .mui-btn--flat:active { - box-shadow: none; - background-color: #f2f2f2; -} + background-color: transparent; } + .mui-btn--flat:hover, .mui-btn--flat:focus, .mui-btn--flat:active { + box-shadow: none; + background-color: #f2f2f2; } .mui-btn--raised, .mui-btn--fab { - box-shadow: 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); -} - -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - .mui-btn--raised, .mui-btn--fab { - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); - } -} - -.mui-btn--raised:active, .mui-btn--fab:active { - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} - -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + box-shadow: 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn--raised, .mui-btn--fab { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } } .mui-btn--raised:active, .mui-btn--fab:active { - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); - } -} + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn--raised:active, .mui-btn--fab:active { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } } .mui-btn--fab { position: relative; @@ -713,154 +594,105 @@ h4, h5, h6 { height: 55px; line-height: 55px; border-radius: 50%; - z-index: 1; -} + z-index: 1; } .mui-btn--primary { color: #FFF; - background-color: #2196F3; -} - -.mui-btn--primary:hover, .mui-btn--primary:focus, .mui-btn--primary:active { - color: #FFF; - background-color: #39a1f4; -} - -.mui-btn--primary[disabled]:hover, .mui-btn--primary[disabled]:focus, .mui-btn--primary[disabled]:active { - color: #FFF; - background-color: #2196F3; -} - -.mui-btn--primary.mui-btn--flat { - color: #2196F3; - background-color: transparent; -} - -.mui-btn--primary.mui-btn--flat:hover, .mui-btn--primary.mui-btn--flat:focus, .mui-btn--primary.mui-btn--flat:active { - color: #2196F3; - background-color: #f2f2f2; -} - -.mui-btn--primary.mui-btn--flat[disabled]:hover, .mui-btn--primary.mui-btn--flat[disabled]:focus, .mui-btn--primary.mui-btn--flat[disabled]:active { - color: #2196F3; - background-color: transparent; -} + background-color: #2196F3; } + .mui-btn--primary:hover, .mui-btn--primary:focus, .mui-btn--primary:active { + color: #FFF; + background-color: #39a1f4; } + .mui-btn--primary[disabled]:hover, .mui-btn--primary[disabled]:focus, .mui-btn--primary[disabled]:active { + color: #FFF; + background-color: #2196F3; } + .mui-btn--primary.mui-btn--flat { + color: #2196F3; + background-color: transparent; } + .mui-btn--primary.mui-btn--flat:hover, .mui-btn--primary.mui-btn--flat:focus, .mui-btn--primary.mui-btn--flat:active { + color: #2196F3; + background-color: #f2f2f2; } + .mui-btn--primary.mui-btn--flat[disabled]:hover, .mui-btn--primary.mui-btn--flat[disabled]:focus, .mui-btn--primary.mui-btn--flat[disabled]:active { + color: #2196F3; + background-color: transparent; } .mui-btn--dark { color: #FFF; - background-color: #424242; -} - -.mui-btn--dark:hover, .mui-btn--dark:focus, .mui-btn--dark:active { - color: #FFF; - background-color: #4f4f4f; -} - -.mui-btn--dark[disabled]:hover, .mui-btn--dark[disabled]:focus, .mui-btn--dark[disabled]:active { - color: #FFF; - background-color: #424242; -} - -.mui-btn--dark.mui-btn--flat { - color: #424242; - background-color: transparent; -} - -.mui-btn--dark.mui-btn--flat:hover, .mui-btn--dark.mui-btn--flat:focus, .mui-btn--dark.mui-btn--flat:active { - color: #424242; - background-color: #f2f2f2; -} - -.mui-btn--dark.mui-btn--flat[disabled]:hover, .mui-btn--dark.mui-btn--flat[disabled]:focus, .mui-btn--dark.mui-btn--flat[disabled]:active { - color: #424242; - background-color: transparent; -} + background-color: #424242; } + .mui-btn--dark:hover, .mui-btn--dark:focus, .mui-btn--dark:active { + color: #FFF; + background-color: #4f4f4f; } + .mui-btn--dark[disabled]:hover, .mui-btn--dark[disabled]:focus, .mui-btn--dark[disabled]:active { + color: #FFF; + background-color: #424242; } + .mui-btn--dark.mui-btn--flat { + color: #424242; + background-color: transparent; } + .mui-btn--dark.mui-btn--flat:hover, .mui-btn--dark.mui-btn--flat:focus, .mui-btn--dark.mui-btn--flat:active { + color: #424242; + background-color: #f2f2f2; } + .mui-btn--dark.mui-btn--flat[disabled]:hover, .mui-btn--dark.mui-btn--flat[disabled]:focus, .mui-btn--dark.mui-btn--flat[disabled]:active { + color: #424242; + background-color: transparent; } .mui-btn--danger { color: #FFF; - background-color: #F44336; -} - -.mui-btn--danger:hover, .mui-btn--danger:focus, .mui-btn--danger:active { - color: #FFF; - background-color: #f55a4e; -} - -.mui-btn--danger[disabled]:hover, .mui-btn--danger[disabled]:focus, .mui-btn--danger[disabled]:active { - color: #FFF; - background-color: #F44336; -} - -.mui-btn--danger.mui-btn--flat { - color: #F44336; - background-color: transparent; -} - -.mui-btn--danger.mui-btn--flat:hover, .mui-btn--danger.mui-btn--flat:focus, .mui-btn--danger.mui-btn--flat:active { - color: #F44336; - background-color: #f2f2f2; -} - -.mui-btn--danger.mui-btn--flat[disabled]:hover, .mui-btn--danger.mui-btn--flat[disabled]:focus, .mui-btn--danger.mui-btn--flat[disabled]:active { - color: #F44336; - background-color: transparent; -} + background-color: #F44336; } + .mui-btn--danger:hover, .mui-btn--danger:focus, .mui-btn--danger:active { + color: #FFF; + background-color: #f55a4e; } + .mui-btn--danger[disabled]:hover, .mui-btn--danger[disabled]:focus, .mui-btn--danger[disabled]:active { + color: #FFF; + background-color: #F44336; } + .mui-btn--danger.mui-btn--flat { + color: #F44336; + background-color: transparent; } + .mui-btn--danger.mui-btn--flat:hover, .mui-btn--danger.mui-btn--flat:focus, .mui-btn--danger.mui-btn--flat:active { + color: #F44336; + background-color: #f2f2f2; } + .mui-btn--danger.mui-btn--flat[disabled]:hover, .mui-btn--danger.mui-btn--flat[disabled]:focus, .mui-btn--danger.mui-btn--flat[disabled]:active { + color: #F44336; + background-color: transparent; } .mui-btn--accent { - color: #FFF; - background-color: #FF4081; -} - -.mui-btn--accent:hover, .mui-btn--accent:focus, .mui-btn--accent:active { - color: #FFF; - background-color: #ff5a92; -} - -.mui-btn--accent[disabled]:hover, .mui-btn--accent[disabled]:focus, .mui-btn--accent[disabled]:active { - color: #FFF; - background-color: #FF4081; -} - -.mui-btn--accent.mui-btn--flat { - color: #FF4081; - background-color: transparent; -} - -.mui-btn--accent.mui-btn--flat:hover, .mui-btn--accent.mui-btn--flat:focus, .mui-btn--accent.mui-btn--flat:active { - color: #FF4081; - background-color: #f2f2f2; -} - -.mui-btn--accent.mui-btn--flat[disabled]:hover, .mui-btn--accent.mui-btn--flat[disabled]:focus, .mui-btn--accent.mui-btn--flat[disabled]:active { - color: #FF4081; - background-color: transparent; -} + color: #004c6d; + background-color: #bad649; } + .mui-btn--accent:hover, .mui-btn--accent:focus, .mui-btn--accent:active { + color: #004c6d; + background-color: #c2db5e; } + .mui-btn--accent[disabled]:hover, .mui-btn--accent[disabled]:focus, .mui-btn--accent[disabled]:active { + color: #004c6d; + background-color: #bad649; } + .mui-btn--accent.mui-btn--flat { + color: #bad649; + background-color: transparent; } + .mui-btn--accent.mui-btn--flat:hover, .mui-btn--accent.mui-btn--flat:focus, .mui-btn--accent.mui-btn--flat:active { + color: #bad649; + background-color: #f2f2f2; } + .mui-btn--accent.mui-btn--flat[disabled]:hover, .mui-btn--accent.mui-btn--flat[disabled]:focus, .mui-btn--accent.mui-btn--flat[disabled]:active { + color: #bad649; + background-color: transparent; } .mui-btn--small { height: 30.6px; line-height: 30.6px; padding: 0 16px; - font-size: 13px; -} + font-size: 13px; } .mui-btn--large { height: 54px; line-height: 54px; padding: 0 26px; - font-size: 14px; -} + font-size: 14px; } .mui-btn--fab.mui-btn--small { width: 44px; height: 44px; - line-height: 44px; -} + line-height: 44px; } .mui-btn--fab.mui-btn--large { width: 75px; height: 75px; - line-height: 75px; -} + line-height: 75px; } /** * MUI Checkboxe and Radio Components @@ -870,17 +702,14 @@ h4, h5, h6 { position: relative; display: block; margin-top: 10px; - margin-bottom: 10px; -} - -.mui-radio > label, -.mui-checkbox > label { - min-height: 20px; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} + margin-bottom: 10px; } + .mui-radio > label, + .mui-checkbox > label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; } .mui-radio > label > input[type="radio"], .mui-radio--inline > label > input[type="radio"], @@ -888,13 +717,11 @@ h4, h5, h6 { .mui-checkbox--inline > label > input[type="checkbox"] { position: absolute; margin-left: -20px; - margin-top: 4px; -} + margin-top: 4px; } .mui-radio + .mui-radio, .mui-checkbox + .mui-checkbox { - margin-top: -5px; -} + margin-top: -5px; } .mui-radio--inline, .mui-checkbox--inline { @@ -903,26 +730,22 @@ h4, h5, h6 { margin-bottom: 0; vertical-align: middle; font-weight: normal; - cursor: pointer; -} - -.mui-radio--inline > input[type="radio"], -.mui-radio--inline > input[type="checkbox"], -.mui-radio--inline > label > input[type="radio"], -.mui-radio--inline > label > input[type="checkbox"], -.mui-checkbox--inline > input[type="radio"], -.mui-checkbox--inline > input[type="checkbox"], -.mui-checkbox--inline > label > input[type="radio"], -.mui-checkbox--inline > label > input[type="checkbox"] { - margin: 4px 0 0; - line-height: normal; -} + cursor: pointer; } + .mui-radio--inline > input[type="radio"], + .mui-radio--inline > input[type="checkbox"], + .mui-radio--inline > label > input[type="radio"], + .mui-radio--inline > label > input[type="checkbox"], + .mui-checkbox--inline > input[type="radio"], + .mui-checkbox--inline > input[type="checkbox"], + .mui-checkbox--inline > label > input[type="radio"], + .mui-checkbox--inline > label > input[type="checkbox"] { + margin: 4px 0 0; + line-height: normal; } .mui-radio--inline + .mui-radio--inline, .mui-checkbox--inline + .mui-checkbox--inline { margin-top: 0; - margin-left: 10px; -} + margin-left: 10px; } /** * MUI Container module @@ -931,57 +754,35 @@ h4, h5, h6 { margin-right: auto; margin-left: auto; padding-left: 15px; - padding-right: 15px; -} - -.mui-container:before, .mui-container:after { - content: " "; - display: table; -} - -.mui-container:after { - clear: both; -} - -@media (min-width: 544px) { - .mui-container { - max-width: 570px; - } -} - -@media (min-width: 768px) { - .mui-container { - max-width: 740px; - } -} - -@media (min-width: 992px) { - .mui-container { - max-width: 960px; - } -} - -@media (min-width: 1200px) { - .mui-container { - max-width: 1170px; - } -} + padding-right: 15px; } + .mui-container:before, .mui-container:after { + content: " "; + display: table; } + .mui-container:after { + clear: both; } + @media (min-width: 544px) { + .mui-container { + max-width: 570px; } } + @media (min-width: 768px) { + .mui-container { + max-width: 740px; } } + @media (min-width: 992px) { + .mui-container { + max-width: 960px; } } + @media (min-width: 1200px) { + .mui-container { + max-width: 1170px; } } .mui-container-fluid { margin-right: auto; margin-left: auto; padding-left: 15px; - padding-right: 15px; -} - -.mui-container-fluid:before, .mui-container-fluid:after { - content: " "; - display: table; -} - -.mui-container-fluid:after { - clear: both; -} + padding-right: 15px; } + .mui-container-fluid:before, .mui-container-fluid:after { + content: " "; + display: table; } + .mui-container-fluid:after { + clear: both; } /** * MUI Divider Component and CSS Helpers @@ -989,40 +790,31 @@ h4, h5, h6 { .mui-divider { display: block; height: 1px; - background-color: rgba(0, 0, 0, 0.12); -} + background-color: rgba(0, 0, 0, 0.12); } .mui--divider-top { - border-top: 1px solid rgba(0, 0, 0, 0.12); -} + border-top: 1px solid rgba(0, 0, 0, 0.12); } .mui--divider-bottom { - border-bottom: 1px solid rgba(0, 0, 0, 0.12); -} + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } .mui--divider-left { - border-left: 1px solid rgba(0, 0, 0, 0.12); -} + border-left: 1px solid rgba(0, 0, 0, 0.12); } .mui--divider-right { - border-right: 1px solid rgba(0, 0, 0, 0.12); -} + border-right: 1px solid rgba(0, 0, 0, 0.12); } /** * MUI Dropdown module */ .mui-dropdown { display: inline-block; - position: relative; -} + position: relative; } [data-mui-toggle="dropdown"] { - -webkit-animation-duration: 0.0001s; animation-duration: 0.0001s; - -webkit-animation-name: mui-node-inserted; animation-name: mui-node-inserted; - outline: 0; -} + outline: 0; } .mui-dropdown__menu { position: absolute; @@ -1038,44 +830,32 @@ h4, h5, h6 { background-color: #FFF; border-radius: 2px; z-index: 1; - background-clip: padding-box; -} - -.mui-dropdown__menu.mui--is-open { - display: block; -} - -.mui-dropdown__menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.429; - color: rgba(0, 0, 0, 0.87); - white-space: nowrap; -} - -.mui-dropdown__menu > li > a:hover, .mui-dropdown__menu > li > a:focus { - text-decoration: none; - color: rgba(0, 0, 0, 0.87); - background-color: #EEEEEE; -} - -.mui-dropdown__menu > .mui--is-disabled > a, .mui-dropdown__menu > .mui--is-disabled > a:hover, .mui-dropdown__menu > .mui--is-disabled > a:focus { - color: #EEEEEE; -} - -.mui-dropdown__menu > .mui--is-disabled > a:hover, .mui-dropdown__menu > .mui--is-disabled > a:focus { - text-decoration: none; - background-color: transparent; - background-image: none; - cursor: not-allowed; -} + background-clip: padding-box; } + .mui-dropdown__menu.mui--is-open { + display: block; } + .mui-dropdown__menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.429; + color: rgba(0, 0, 0, 0.87); + white-space: nowrap; } + .mui-dropdown__menu > li > a:hover, .mui-dropdown__menu > li > a:focus { + text-decoration: none; + color: rgba(0, 0, 0, 0.87); + background-color: #EEEEEE; } + .mui-dropdown__menu > .mui--is-disabled > a, .mui-dropdown__menu > .mui--is-disabled > a:hover, .mui-dropdown__menu > .mui--is-disabled > a:focus { + color: #EEEEEE; } + .mui-dropdown__menu > .mui--is-disabled > a:hover, .mui-dropdown__menu > .mui--is-disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + cursor: not-allowed; } .mui-dropdown__menu--right { left: auto; - right: 0; -} + right: 0; } /** * MUI Form Component @@ -1083,484 +863,337 @@ h4, h5, h6 { @media (min-width: 544px) { .mui-form--inline > .mui-textfield { display: inline-block; - margin-bottom: 0; - } + margin-bottom: 0; } .mui-form--inline > .mui-radio, .mui-form--inline > .mui-checkbox { display: inline-block; margin-top: 0; margin-bottom: 0; - vertical-align: middle; - } - .mui-form--inline > .mui-radio > label, - .mui-form--inline > .mui-checkbox > label { - padding-left: 0; - } + vertical-align: middle; } + .mui-form--inline > .mui-radio > label, + .mui-form--inline > .mui-checkbox > label { + padding-left: 0; } .mui-form--inline > .mui-radio > label > input[type="radio"], .mui-form--inline > .mui-checkbox > label > input[type="checkbox"] { position: relative; - margin-left: 0; - } + margin-left: 0; } .mui-form--inline > .mui-select { - display: inline-block; - } + display: inline-block; } .mui-form--inline > .mui-btn { margin-bottom: 0; margin-top: 0; - vertical-align: bottom; - } -} + vertical-align: bottom; } } /** * MUI Grid module */ .mui-row { margin-left: -15px; - margin-right: -15px; -} - -.mui-row:before, .mui-row:after { - content: " "; - display: table; -} - -.mui-row:after { - clear: both; -} + margin-right: -15px; } + .mui-row:before, .mui-row:after { + content: " "; + display: table; } + .mui-row:after { + clear: both; } .mui-col-xs-1, .mui-col-sm-1, .mui-col-md-1, .mui-col-lg-1, .mui-col-xs-2, .mui-col-sm-2, .mui-col-md-2, .mui-col-lg-2, .mui-col-xs-3, .mui-col-sm-3, .mui-col-md-3, .mui-col-lg-3, .mui-col-xs-4, .mui-col-sm-4, .mui-col-md-4, .mui-col-lg-4, .mui-col-xs-5, .mui-col-sm-5, .mui-col-md-5, .mui-col-lg-5, .mui-col-xs-6, .mui-col-sm-6, .mui-col-md-6, .mui-col-lg-6, .mui-col-xs-7, .mui-col-sm-7, .mui-col-md-7, .mui-col-lg-7, .mui-col-xs-8, .mui-col-sm-8, .mui-col-md-8, .mui-col-lg-8, .mui-col-xs-9, .mui-col-sm-9, .mui-col-md-9, .mui-col-lg-9, .mui-col-xs-10, .mui-col-sm-10, .mui-col-md-10, .mui-col-lg-10, .mui-col-xs-11, .mui-col-sm-11, .mui-col-md-11, .mui-col-lg-11, .mui-col-xs-12, .mui-col-sm-12, .mui-col-md-12, .mui-col-lg-12 { min-height: 1px; padding-left: 15px; - padding-right: 15px; -} + padding-right: 15px; } .mui-col-xs-1, .mui-col-xs-2, .mui-col-xs-3, .mui-col-xs-4, .mui-col-xs-5, .mui-col-xs-6, .mui-col-xs-7, .mui-col-xs-8, .mui-col-xs-9, .mui-col-xs-10, .mui-col-xs-11, .mui-col-xs-12 { - float: left; -} + float: left; } .mui-col-xs-1 { - width: 8.33333%; -} + width: 8.33333%; } .mui-col-xs-2 { - width: 16.66667%; -} + width: 16.66667%; } .mui-col-xs-3 { - width: 25%; -} + width: 25%; } .mui-col-xs-4 { - width: 33.33333%; -} + width: 33.33333%; } .mui-col-xs-5 { - width: 41.66667%; -} + width: 41.66667%; } .mui-col-xs-6 { - width: 50%; -} + width: 50%; } .mui-col-xs-7 { - width: 58.33333%; -} + width: 58.33333%; } .mui-col-xs-8 { - width: 66.66667%; -} + width: 66.66667%; } .mui-col-xs-9 { - width: 75%; -} + width: 75%; } .mui-col-xs-10 { - width: 83.33333%; -} + width: 83.33333%; } .mui-col-xs-11 { - width: 91.66667%; -} + width: 91.66667%; } .mui-col-xs-12 { - width: 100%; -} + width: 100%; } .mui-col-xs-offset-0 { - margin-left: 0%; -} + margin-left: 0%; } .mui-col-xs-offset-1 { - margin-left: 8.33333%; -} + margin-left: 8.33333%; } .mui-col-xs-offset-2 { - margin-left: 16.66667%; -} + margin-left: 16.66667%; } .mui-col-xs-offset-3 { - margin-left: 25%; -} + margin-left: 25%; } .mui-col-xs-offset-4 { - margin-left: 33.33333%; -} + margin-left: 33.33333%; } .mui-col-xs-offset-5 { - margin-left: 41.66667%; -} + margin-left: 41.66667%; } .mui-col-xs-offset-6 { - margin-left: 50%; -} + margin-left: 50%; } .mui-col-xs-offset-7 { - margin-left: 58.33333%; -} + margin-left: 58.33333%; } .mui-col-xs-offset-8 { - margin-left: 66.66667%; -} + margin-left: 66.66667%; } .mui-col-xs-offset-9 { - margin-left: 75%; -} + margin-left: 75%; } .mui-col-xs-offset-10 { - margin-left: 83.33333%; -} + margin-left: 83.33333%; } .mui-col-xs-offset-11 { - margin-left: 91.66667%; -} + margin-left: 91.66667%; } .mui-col-xs-offset-12 { - margin-left: 100%; -} + margin-left: 100%; } @media (min-width: 544px) { .mui-col-sm-1, .mui-col-sm-2, .mui-col-sm-3, .mui-col-sm-4, .mui-col-sm-5, .mui-col-sm-6, .mui-col-sm-7, .mui-col-sm-8, .mui-col-sm-9, .mui-col-sm-10, .mui-col-sm-11, .mui-col-sm-12 { - float: left; - } + float: left; } .mui-col-sm-1 { - width: 8.33333%; - } + width: 8.33333%; } .mui-col-sm-2 { - width: 16.66667%; - } + width: 16.66667%; } .mui-col-sm-3 { - width: 25%; - } + width: 25%; } .mui-col-sm-4 { - width: 33.33333%; - } + width: 33.33333%; } .mui-col-sm-5 { - width: 41.66667%; - } + width: 41.66667%; } .mui-col-sm-6 { - width: 50%; - } + width: 50%; } .mui-col-sm-7 { - width: 58.33333%; - } + width: 58.33333%; } .mui-col-sm-8 { - width: 66.66667%; - } + width: 66.66667%; } .mui-col-sm-9 { - width: 75%; - } + width: 75%; } .mui-col-sm-10 { - width: 83.33333%; - } + width: 83.33333%; } .mui-col-sm-11 { - width: 91.66667%; - } + width: 91.66667%; } .mui-col-sm-12 { - width: 100%; - } + width: 100%; } .mui-col-sm-offset-0 { - margin-left: 0%; - } + margin-left: 0%; } .mui-col-sm-offset-1 { - margin-left: 8.33333%; - } + margin-left: 8.33333%; } .mui-col-sm-offset-2 { - margin-left: 16.66667%; - } + margin-left: 16.66667%; } .mui-col-sm-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .mui-col-sm-offset-4 { - margin-left: 33.33333%; - } + margin-left: 33.33333%; } .mui-col-sm-offset-5 { - margin-left: 41.66667%; - } + margin-left: 41.66667%; } .mui-col-sm-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .mui-col-sm-offset-7 { - margin-left: 58.33333%; - } + margin-left: 58.33333%; } .mui-col-sm-offset-8 { - margin-left: 66.66667%; - } + margin-left: 66.66667%; } .mui-col-sm-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .mui-col-sm-offset-10 { - margin-left: 83.33333%; - } + margin-left: 83.33333%; } .mui-col-sm-offset-11 { - margin-left: 91.66667%; - } + margin-left: 91.66667%; } .mui-col-sm-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } @media (min-width: 768px) { .mui-col-md-1, .mui-col-md-2, .mui-col-md-3, .mui-col-md-4, .mui-col-md-5, .mui-col-md-6, .mui-col-md-7, .mui-col-md-8, .mui-col-md-9, .mui-col-md-10, .mui-col-md-11, .mui-col-md-12 { - float: left; - } + float: left; } .mui-col-md-1 { - width: 8.33333%; - } + width: 8.33333%; } .mui-col-md-2 { - width: 16.66667%; - } + width: 16.66667%; } .mui-col-md-3 { - width: 25%; - } + width: 25%; } .mui-col-md-4 { - width: 33.33333%; - } + width: 33.33333%; } .mui-col-md-5 { - width: 41.66667%; - } + width: 41.66667%; } .mui-col-md-6 { - width: 50%; - } + width: 50%; } .mui-col-md-7 { - width: 58.33333%; - } + width: 58.33333%; } .mui-col-md-8 { - width: 66.66667%; - } + width: 66.66667%; } .mui-col-md-9 { - width: 75%; - } + width: 75%; } .mui-col-md-10 { - width: 83.33333%; - } + width: 83.33333%; } .mui-col-md-11 { - width: 91.66667%; - } + width: 91.66667%; } .mui-col-md-12 { - width: 100%; - } + width: 100%; } .mui-col-md-offset-0 { - margin-left: 0%; - } + margin-left: 0%; } .mui-col-md-offset-1 { - margin-left: 8.33333%; - } + margin-left: 8.33333%; } .mui-col-md-offset-2 { - margin-left: 16.66667%; - } + margin-left: 16.66667%; } .mui-col-md-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .mui-col-md-offset-4 { - margin-left: 33.33333%; - } + margin-left: 33.33333%; } .mui-col-md-offset-5 { - margin-left: 41.66667%; - } + margin-left: 41.66667%; } .mui-col-md-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .mui-col-md-offset-7 { - margin-left: 58.33333%; - } + margin-left: 58.33333%; } .mui-col-md-offset-8 { - margin-left: 66.66667%; - } + margin-left: 66.66667%; } .mui-col-md-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .mui-col-md-offset-10 { - margin-left: 83.33333%; - } + margin-left: 83.33333%; } .mui-col-md-offset-11 { - margin-left: 91.66667%; - } + margin-left: 91.66667%; } .mui-col-md-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } @media (min-width: 992px) { .mui-col-lg-1, .mui-col-lg-2, .mui-col-lg-3, .mui-col-lg-4, .mui-col-lg-5, .mui-col-lg-6, .mui-col-lg-7, .mui-col-lg-8, .mui-col-lg-9, .mui-col-lg-10, .mui-col-lg-11, .mui-col-lg-12 { - float: left; - } + float: left; } .mui-col-lg-1 { - width: 8.33333%; - } + width: 8.33333%; } .mui-col-lg-2 { - width: 16.66667%; - } + width: 16.66667%; } .mui-col-lg-3 { - width: 25%; - } + width: 25%; } .mui-col-lg-4 { - width: 33.33333%; - } + width: 33.33333%; } .mui-col-lg-5 { - width: 41.66667%; - } + width: 41.66667%; } .mui-col-lg-6 { - width: 50%; - } + width: 50%; } .mui-col-lg-7 { - width: 58.33333%; - } + width: 58.33333%; } .mui-col-lg-8 { - width: 66.66667%; - } + width: 66.66667%; } .mui-col-lg-9 { - width: 75%; - } + width: 75%; } .mui-col-lg-10 { - width: 83.33333%; - } + width: 83.33333%; } .mui-col-lg-11 { - width: 91.66667%; - } + width: 91.66667%; } .mui-col-lg-12 { - width: 100%; - } + width: 100%; } .mui-col-lg-offset-0 { - margin-left: 0%; - } + margin-left: 0%; } .mui-col-lg-offset-1 { - margin-left: 8.33333%; - } + margin-left: 8.33333%; } .mui-col-lg-offset-2 { - margin-left: 16.66667%; - } + margin-left: 16.66667%; } .mui-col-lg-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .mui-col-lg-offset-4 { - margin-left: 33.33333%; - } + margin-left: 33.33333%; } .mui-col-lg-offset-5 { - margin-left: 41.66667%; - } + margin-left: 41.66667%; } .mui-col-lg-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .mui-col-lg-offset-7 { - margin-left: 58.33333%; - } + margin-left: 58.33333%; } .mui-col-lg-offset-8 { - margin-left: 66.66667%; - } + margin-left: 66.66667%; } .mui-col-lg-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .mui-col-lg-offset-10 { - margin-left: 83.33333%; - } + margin-left: 83.33333%; } .mui-col-lg-offset-11 { - margin-left: 91.66667%; - } + margin-left: 91.66667%; } .mui-col-lg-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } @media (min-width: 1200px) { .mui-col-xl-1, .mui-col-xl-2, .mui-col-xl-3, .mui-col-xl-4, .mui-col-xl-5, .mui-col-xl-6, .mui-col-xl-7, .mui-col-xl-8, .mui-col-xl-9, .mui-col-xl-10, .mui-col-xl-11, .mui-col-xl-12 { - float: left; - } + float: left; } .mui-col-xl-1 { - width: 8.33333%; - } + width: 8.33333%; } .mui-col-xl-2 { - width: 16.66667%; - } + width: 16.66667%; } .mui-col-xl-3 { - width: 25%; - } + width: 25%; } .mui-col-xl-4 { - width: 33.33333%; - } + width: 33.33333%; } .mui-col-xl-5 { - width: 41.66667%; - } + width: 41.66667%; } .mui-col-xl-6 { - width: 50%; - } + width: 50%; } .mui-col-xl-7 { - width: 58.33333%; - } + width: 58.33333%; } .mui-col-xl-8 { - width: 66.66667%; - } + width: 66.66667%; } .mui-col-xl-9 { - width: 75%; - } + width: 75%; } .mui-col-xl-10 { - width: 83.33333%; - } + width: 83.33333%; } .mui-col-xl-11 { - width: 91.66667%; - } + width: 91.66667%; } .mui-col-xl-12 { - width: 100%; - } + width: 100%; } .mui-col-xl-offset-0 { - margin-left: 0%; - } + margin-left: 0%; } .mui-col-xl-offset-1 { - margin-left: 8.33333%; - } + margin-left: 8.33333%; } .mui-col-xl-offset-2 { - margin-left: 16.66667%; - } + margin-left: 16.66667%; } .mui-col-xl-offset-3 { - margin-left: 25%; - } + margin-left: 25%; } .mui-col-xl-offset-4 { - margin-left: 33.33333%; - } + margin-left: 33.33333%; } .mui-col-xl-offset-5 { - margin-left: 41.66667%; - } + margin-left: 41.66667%; } .mui-col-xl-offset-6 { - margin-left: 50%; - } + margin-left: 50%; } .mui-col-xl-offset-7 { - margin-left: 58.33333%; - } + margin-left: 58.33333%; } .mui-col-xl-offset-8 { - margin-left: 66.66667%; - } + margin-left: 66.66667%; } .mui-col-xl-offset-9 { - margin-left: 75%; - } + margin-left: 75%; } .mui-col-xl-offset-10 { - margin-left: 83.33333%; - } + margin-left: 83.33333%; } .mui-col-xl-offset-11 { - margin-left: 91.66667%; - } + margin-left: 91.66667%; } .mui-col-xl-offset-12 { - margin-left: 100%; - } -} + margin-left: 100%; } } /** * MUI Panel module @@ -1570,23 +1203,15 @@ h4, h5, h6 { margin-bottom: 20px; border-radius: 0; background-color: #FFF; - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0px 2px 0 rgba(0, 0, 0, 0.12); -} - -.mui-panel:before, .mui-panel:after { - content: " "; - display: table; -} - -.mui-panel:after { - clear: both; -} - -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - .mui-panel { - box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.12), -1px 0px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0px 2px 0 rgba(0, 0, 0, 0.12); - } -} + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0px 2px 0 rgba(0, 0, 0, 0.12); } + .mui-panel:before, .mui-panel:after { + content: " "; + display: table; } + .mui-panel:after { + clear: both; } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-panel { + box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.12), -1px 0px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0px 2px 0 rgba(0, 0, 0, 0.12); } } /** * MUI Select Component @@ -1595,64 +1220,49 @@ h4, h5, h6 { display: block; padding-top: 15px; margin-bottom: 20px; - position: relative; -} - -.mui-select:focus { - outline: 0; -} - -.mui-select:focus > select { - height: 33px; - margin-bottom: -1px; - border-color: #2196F3; - border-width: 2px; -} - -.mui-select > select { - -webkit-animation-duration: 0.0001s; - animation-duration: 0.0001s; - -webkit-animation-name: mui-node-inserted; - animation-name: mui-node-inserted; - display: block; - height: 32px; - width: 100%; - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - outline: none; - border: none; - border-bottom: 1px solid rgba(0, 0, 0, 0.26); - border-radius: 0px; - box-shadow: none; - background-color: transparent; - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg=="); - background-repeat: no-repeat; - background-position: right center; - cursor: pointer; - color: rgba(0, 0, 0, 0.87); - font-size: 16px; - padding: 0 25px 0 0; -} - -.mui-select > select::-ms-expand { - display: none; -} - -.mui-select > select:focus { - outline: 0; - height: 33px; - margin-bottom: -1px; - border-color: #2196F3; - border-width: 2px; -} - -.mui-select > select:disabled { - color: rgba(0, 0, 0, 0.38); - cursor: not-allowed; - background-color: transparent; - opacity: 1; -} + position: relative; } + .mui-select:focus { + outline: 0; } + .mui-select:focus > select { + height: 33px; + margin-bottom: -1px; + border-color: #2196F3; + border-width: 2px; } + .mui-select > select { + animation-duration: 0.0001s; + animation-name: mui-node-inserted; + display: block; + height: 32px; + width: 100%; + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + outline: none; + border: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.26); + border-radius: 0px; + box-shadow: none; + background-color: transparent; + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg=="); + background-repeat: no-repeat; + background-position: right center; + cursor: pointer; + color: rgba(0, 0, 0, 0.87); + font-size: 16px; + padding: 0 25px 0 0; } + .mui-select > select::-ms-expand { + display: none; } + .mui-select > select:focus { + outline: 0; + height: 33px; + margin-bottom: -1px; + border-color: #2196F3; + border-width: 2px; } + .mui-select > select:disabled { + color: rgba(0, 0, 0, 0.38); + cursor: not-allowed; + background-color: transparent; + opacity: 1; } .mui-select__menu { position: absolute; @@ -1661,67 +1271,47 @@ h4, h5, h6 { overflow-y: auto; padding: 8px 0; background-color: #FFF; - font-size: 16px; -} - -@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { - .mui-select__menu { - border-left: 1px solid rgba(0, 0, 0, 0.12); - border-top: 1px solid rgba(0, 0, 0, 0.12); - } -} - -.mui-select__menu > div { - padding: 0 22px; - height: 42px; - line-height: 42px; - cursor: pointer; - white-space: nowrap; -} - -.mui-select__menu > div:hover { - background-color: #E0E0E0; -} - -.mui-select__menu > div.mui--is-selected { - background-color: #EEEEEE; -} + font-size: 16px; } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-select__menu { + border-left: 1px solid rgba(0, 0, 0, 0.12); + border-top: 1px solid rgba(0, 0, 0, 0.12); } } + .mui-select__menu > div { + padding: 0 22px; + height: 42px; + line-height: 42px; + cursor: pointer; + white-space: nowrap; } + .mui-select__menu > div:hover { + background-color: #E0E0E0; } + .mui-select__menu > div.mui--is-selected { + background-color: #EEEEEE; } /** * MUI Table Component */ th { - text-align: left; -} + text-align: left; } .mui-table { width: 100%; max-width: 100%; - margin-bottom: 20px; -} - -.mui-table > thead > tr > th, -.mui-table > thead > tr > td, -.mui-table > tbody > tr > th, -.mui-table > tbody > tr > td, -.mui-table > tfoot > tr > th, -.mui-table > tfoot > tr > td { - padding: 10px; - line-height: 1.429; -} - -.mui-table > thead > tr > th { - border-bottom: 2px solid rgba(0, 0, 0, 0.12); - font-weight: 700; -} - -.mui-table > tbody + tbody { - border-top: 2px solid rgba(0, 0, 0, 0.12); -} - -.mui-table.mui-table--bordered > tbody > tr > td { - border-bottom: 1px solid rgba(0, 0, 0, 0.12); -} + margin-bottom: 20px; } + .mui-table > thead > tr > th, + .mui-table > thead > tr > td, + .mui-table > tbody > tr > th, + .mui-table > tbody > tr > td, + .mui-table > tfoot > tr > th, + .mui-table > tfoot > tr > td { + padding: 10px; + line-height: 1.429; } + .mui-table > thead > tr > th { + border-bottom: 2px solid rgba(0, 0, 0, 0.12); + font-weight: 700; } + .mui-table > tbody + tbody { + border-top: 2px solid rgba(0, 0, 0, 0.12); } + .mui-table.mui-table--bordered > tbody > tr > td { + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } /** * MUI Tabs module @@ -1732,73 +1322,47 @@ th { margin-bottom: 0; background-color: transparent; white-space: nowrap; - overflow-x: auto; -} - -.mui-tabs__bar > li { - display: inline-block; -} - -.mui-tabs__bar > li > a { - display: block; - white-space: nowrap; - text-transform: uppercase; - font-weight: 500; - font-size: 14px; - color: rgba(0, 0, 0, 0.87); - cursor: default; - height: 48px; - line-height: 48px; - padding-left: 24px; - padding-right: 24px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.mui-tabs__bar > li > a:hover { - text-decoration: none; -} - -.mui-tabs__bar > li.mui--is-active { - border-bottom: 2px solid #2196F3; -} - -.mui-tabs__bar > li.mui--is-active > a { - color: #2196F3; -} - -.mui-tabs__bar.mui-tabs__bar--justified { - display: table; - width: 100%; - table-layout: fixed; -} - -.mui-tabs__bar.mui-tabs__bar--justified > li { - display: table-cell; -} - -.mui-tabs__bar.mui-tabs__bar--justified > li > a { - text-align: center; - padding-left: 0px; - padding-right: 0px; -} + overflow-x: auto; } + .mui-tabs__bar > li { + display: inline-block; } + .mui-tabs__bar > li > a { + display: block; + white-space: nowrap; + text-transform: uppercase; + font-weight: 500; + font-size: 14px; + color: rgba(0, 0, 0, 0.87); + cursor: default; + height: 48px; + line-height: 48px; + padding-left: 24px; + padding-right: 24px; + user-select: none; } + .mui-tabs__bar > li > a:hover { + text-decoration: none; } + .mui-tabs__bar > li.mui--is-active { + border-bottom: 2px solid #2196F3; } + .mui-tabs__bar > li.mui--is-active > a { + color: #2196F3; } + .mui-tabs__bar.mui-tabs__bar--justified { + display: table; + width: 100%; + table-layout: fixed; } + .mui-tabs__bar.mui-tabs__bar--justified > li { + display: table-cell; } + .mui-tabs__bar.mui-tabs__bar--justified > li > a { + text-align: center; + padding-left: 0px; + padding-right: 0px; } .mui-tabs__pane { - display: none; -} - -.mui-tabs__pane.mui--is-active { - display: block; -} + display: none; } + .mui-tabs__pane.mui--is-active { + display: block; } [data-mui-toggle="tab"] { - -webkit-animation-duration: 0.0001s; animation-duration: 0.0001s; - -webkit-animation-name: mui-node-inserted; - animation-name: mui-node-inserted; -} + animation-name: mui-node-inserted; } /** * MUI Textfield Component @@ -1807,57 +1371,44 @@ th { display: block; padding-top: 15px; margin-bottom: 20px; - position: relative; -} - -.mui-textfield > label { - position: absolute; - top: 0; - display: block; - width: 100%; - color: rgba(0, 0, 0, 0.54); - font-size: 12px; - font-weight: 400; - line-height: 15px; - overflow-x: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.mui-textfield > textarea { - padding-top: 5px; -} - -.mui-textfield > input, -.mui-textfield > textarea { - display: block; -} - -.mui-textfield > input:focus ~ label, -.mui-textfield > textarea:focus ~ label { - color: #2196F3; -} + position: relative; } + .mui-textfield > label { + position: absolute; + top: 0; + display: block; + width: 100%; + color: rgba(0, 0, 0, 0.54); + font-size: 12px; + font-weight: 400; + line-height: 15px; + overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + .mui-textfield > textarea { + padding-top: 5px; } + .mui-textfield > input, + .mui-textfield > textarea { + display: block; } + .mui-textfield > input:focus ~ label, + .mui-textfield > textarea:focus ~ label { + color: #2196F3; } .mui-textfield--float-label > label { position: absolute; - -webkit-transform: translate(0px, 15px); transform: translate(0px, 15px); font-size: 16px; line-height: 32px; color: rgba(0, 0, 0, 0.26); text-overflow: clip; cursor: text; - pointer-events: none; -} + pointer-events: none; } .mui-textfield--float-label > input:focus ~ label, .mui-textfield--float-label > textarea:focus ~ label { - -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); font-size: 12px; line-height: 15px; - text-overflow: ellipsis; -} + text-overflow: ellipsis; } .mui-textfield--float-label > input:not(:focus).mui--is-not-empty ~ label, .mui-textfield--float-label > input:not(:focus)[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield--float-label > input:not(:focus):not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield--float-label > textarea:not(:focus).mui--is-not-empty ~ label, @@ -1866,29 +1417,22 @@ th { color: rgba(0, 0, 0, 0.54); font-size: 12px; line-height: 15px; - -webkit-transform: translate(0px, 0px); transform: translate(0px, 0px); - text-overflow: ellipsis; -} + text-overflow: ellipsis; } .mui-textfield--wrap-label { display: table; width: 100%; - padding-top: 0px; -} - -.mui-textfield--wrap-label:not(.mui-textfield--float-label) > label { - display: table-header-group; - position: static; - white-space: normal; - overflow-x: visible; -} + padding-top: 0px; } + .mui-textfield--wrap-label:not(.mui-textfield--float-label) > label { + display: table-header-group; + position: static; + white-space: normal; + overflow-x: visible; } .mui-textfield > input, .mui-textfield > textarea { - -webkit-animation-duration: 0.0001s; animation-duration: 0.0001s; - -webkit-animation-name: mui-node-inserted; animation-name: mui-node-inserted; display: block; background-color: transparent; @@ -1901,76 +1445,36 @@ th { padding: 0; box-shadow: none; border-radius: 0px; - background-image: none; -} - -.mui-textfield > input:focus, -.mui-textfield > textarea:focus { - border-color: #2196F3; - border-width: 2px; -} - -.mui-textfield > input:disabled, .mui-textfield > input:-moz-read-only, -.mui-textfield > textarea:disabled, -.mui-textfield > textarea:-moz-read-only { - cursor: not-allowed; - background-color: transparent; - opacity: 1; -} - -.mui-textfield > input:disabled, .mui-textfield > input:read-only, -.mui-textfield > textarea:disabled, -.mui-textfield > textarea:read-only { - cursor: not-allowed; - background-color: transparent; - opacity: 1; -} - -.mui-textfield > input::-webkit-input-placeholder, -.mui-textfield > textarea::-webkit-input-placeholder { - color: rgba(0, 0, 0, 0.26); - opacity: 1; -} - -.mui-textfield > input::-moz-placeholder, -.mui-textfield > textarea::-moz-placeholder { - color: rgba(0, 0, 0, 0.26); - opacity: 1; -} - -.mui-textfield > input:-ms-input-placeholder, -.mui-textfield > textarea:-ms-input-placeholder { - color: rgba(0, 0, 0, 0.26); - opacity: 1; -} - -.mui-textfield > input::placeholder, -.mui-textfield > textarea::placeholder { - color: rgba(0, 0, 0, 0.26); - opacity: 1; -} + background-image: none; } + .mui-textfield > input:focus, + .mui-textfield > textarea:focus { + border-color: #2196F3; + border-width: 2px; } + .mui-textfield > input:disabled, .mui-textfield > input:read-only, + .mui-textfield > textarea:disabled, + .mui-textfield > textarea:read-only { + cursor: not-allowed; + background-color: transparent; + opacity: 1; } + .mui-textfield > input::placeholder, + .mui-textfield > textarea::placeholder { + color: rgba(0, 0, 0, 0.26); + opacity: 1; } .mui-textfield > input { - height: 32px; -} - -.mui-textfield > input:focus { - height: 33px; - margin-bottom: -1px; -} + height: 32px; } + .mui-textfield > input:focus { + height: 33px; + margin-bottom: -1px; } .mui-textfield > textarea { - min-height: 64px; -} - -.mui-textfield > textarea[rows]:not([rows="2"]):focus { - margin-bottom: -1px; -} + min-height: 64px; } + .mui-textfield > textarea[rows]:not([rows="2"]):focus { + margin-bottom: -1px; } .mui-textfield > input:focus { height: 33px; - margin-bottom: -1px; -} + margin-bottom: -1px; } .mui-textfield > input:invalid:not(:focus):not(:required), .mui-textfield > input:invalid:not(:focus):required.mui--is-not-empty, .mui-textfield > input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty, .mui-textfield > input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > textarea:invalid:not(:focus):not(:required), @@ -1989,8 +1493,7 @@ th { .mui-textfield > textarea:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > textarea:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) { border-color: #F44336; - border-width: 2px; -} + border-width: 2px; } .mui-textfield > input:invalid:not(:focus):not(:required), .mui-textfield > input:invalid:not(:focus):required.mui--is-not-empty, .mui-textfield > input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty, .mui-textfield > input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > input:not(:focus).mui--is-invalid:not(:required), @@ -1999,8 +1502,7 @@ th { .mui-textfield > input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) { height: 33px; - margin-bottom: -1px; -} + margin-bottom: -1px; } .mui-textfield > input:invalid:not(:focus):not(:required) ~ label, .mui-textfield > input:invalid:not(:focus):required.mui--is-not-empty ~ label, .mui-textfield > input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield > input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield > textarea:invalid:not(:focus):not(:required) ~ label, @@ -2015,46 +1517,28 @@ th { .mui-textfield > textarea:not(:focus).mui--is-invalid:required.mui--is-not-empty ~ label, .mui-textfield > textarea:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield > textarea:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label { - color: #F44336; -} + color: #F44336; } .mui-textfield:not(.mui-textfield--float-label) > input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty ~ label, .mui-textfield:not(.mui-textfield--float-label) > textarea:invalid:not(:focus):required.mui--is-empty.mui--is-dirty ~ label, .mui-textfield:not(.mui-textfield--float-label) > input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty ~ label, .mui-textfield:not(.mui-textfield--float-label) > textarea:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty ~ label { - color: #F44336; -} + color: #F44336; } /** * MUI Helpers module */ -@-webkit-keyframes mui-node-inserted { - from { - opacity: 0.99; - } - to { - opacity: 1; - } -} @keyframes mui-node-inserted { from { - opacity: 0.99; - } + opacity: 0.99; } to { - opacity: 1; - } -} + opacity: 1; } } .mui--no-transition { - transition: none !important; -} + transition: none !important; } .mui--no-user-select { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} + user-select: none; } .mui-caret { display: inline-block; @@ -2064,170 +1548,129 @@ th { vertical-align: middle; border-top: 4px solid; border-right: 4px solid transparent; - border-left: 4px solid transparent; -} + border-left: 4px solid transparent; } .mui--text-left { - text-align: left !important; -} + text-align: left !important; } .mui--text-right { - text-align: right !important; -} + text-align: right !important; } .mui--text-center { - text-align: center !important; -} + text-align: center !important; } .mui--text-justify { - text-align: justify !important; -} + text-align: justify !important; } .mui--text-nowrap { - white-space: nowrap !important; -} + white-space: nowrap !important; } .mui--align-baseline { - vertical-align: baseline !important; -} + vertical-align: baseline !important; } .mui--align-top { - vertical-align: top !important; -} + vertical-align: top !important; } .mui--align-middle { - vertical-align: middle !important; -} + vertical-align: middle !important; } .mui--align-bottom { - vertical-align: bottom !important; -} + vertical-align: bottom !important; } .mui--text-dark { - color: rgba(0, 0, 0, 0.87); -} + color: rgba(0, 0, 0, 0.87); } .mui--text-dark-secondary { - color: rgba(0, 0, 0, 0.54); -} + color: rgba(0, 0, 0, 0.54); } .mui--text-dark-hint { - color: rgba(0, 0, 0, 0.38); -} + color: rgba(0, 0, 0, 0.38); } .mui--text-light { - color: #FFF; -} + color: #FFF; } .mui--text-light-secondary { - color: rgba(255, 255, 255, 0.7); -} + color: rgba(255, 255, 255, 0.7); } .mui--text-light-hint { - color: rgba(255, 255, 255, 0.3); -} + color: rgba(255, 255, 255, 0.3); } .mui--text-accent { - color: rgba(255, 64, 129, 0.87); -} + color: rgba(186, 214, 73, 0.87); } .mui--text-accent-secondary { - color: rgba(255, 64, 129, 0.54); -} + color: rgba(186, 214, 73, 0.54); } .mui--text-accent-hint { - color: rgba(255, 64, 129, 0.38); -} + color: rgba(186, 214, 73, 0.38); } .mui--text-black { - color: #000; -} + color: #000; } .mui--text-white { - color: #FFF; -} + color: #FFF; } .mui--text-danger { - color: #F44336; -} + color: #F44336; } .mui-list--unstyled { padding-left: 0; - list-style: none; -} + list-style: none; } .mui-list--inline { padding-left: 0; list-style: none; - margin-left: -5px; -} - -.mui-list--inline > li { - display: inline-block; - padding-left: 5px; - padding-right: 5px; -} + margin-left: -5px; } + .mui-list--inline > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; } .mui--z1, .mui-dropdown__menu, .mui-select__menu { - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); -} + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); } .mui--z2 { - box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); -} + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); } .mui--z3 { - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); -} + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } .mui--z4 { - box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); -} + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); } .mui--z5 { - box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); -} + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); } .mui--clearfix:before, .mui--clearfix:after { content: " "; - display: table; -} + display: table; } .mui--clearfix:after { - clear: both; -} + clear: both; } .mui--pull-right { - float: right !important; -} + float: right !important; } .mui--pull-left { - float: left !important; -} + float: left !important; } .mui--hide { - display: none !important; -} + display: none !important; } .mui--show { - display: block !important; -} + display: block !important; } .mui--invisible { - visibility: hidden; -} + visibility: hidden; } .mui--overflow-hidden { - overflow: hidden !important; -} + overflow: hidden !important; } .mui--overflow-hidden-x { - overflow-x: hidden !important; -} + overflow-x: hidden !important; } .mui--overflow-hidden-y { - overflow-y: hidden !important; -} + overflow-y: hidden !important; } .mui--visible-xs-block, .mui--visible-xs-inline, @@ -2244,167 +1687,115 @@ th { .mui--visible-xl-block, .mui--visible-xl-inline, .mui--visible-xl-inline-block { - display: none !important; -} + display: none !important; } @media (max-width: 543px) { .mui-visible-xs { - display: block !important; - } + display: block !important; } table.mui-visible-xs { - display: table; - } + display: table; } tr.mui-visible-xs { - display: table-row !important; - } + display: table-row !important; } th.mui-visible-xs, td.mui-visible-xs { - display: table-cell !important; - } + display: table-cell !important; } .mui--visible-xs-block { - display: block !important; - } + display: block !important; } .mui--visible-xs-inline { - display: inline !important; - } + display: inline !important; } .mui--visible-xs-inline-block { - display: inline-block !important; - } -} + display: inline-block !important; } } @media (min-width: 544px) and (max-width: 767px) { .mui-visible-sm { - display: block !important; - } + display: block !important; } table.mui-visible-sm { - display: table; - } + display: table; } tr.mui-visible-sm { - display: table-row !important; - } + display: table-row !important; } th.mui-visible-sm, td.mui-visible-sm { - display: table-cell !important; - } + display: table-cell !important; } .mui--visible-sm-block { - display: block !important; - } + display: block !important; } .mui--visible-sm-inline { - display: inline !important; - } + display: inline !important; } .mui--visible-sm-inline-block { - display: inline-block !important; - } -} + display: inline-block !important; } } @media (min-width: 768px) and (max-width: 991px) { .mui-visible-md { - display: block !important; - } + display: block !important; } table.mui-visible-md { - display: table; - } + display: table; } tr.mui-visible-md { - display: table-row !important; - } + display: table-row !important; } th.mui-visible-md, td.mui-visible-md { - display: table-cell !important; - } + display: table-cell !important; } .mui--visible-md-block { - display: block !important; - } + display: block !important; } .mui--visible-md-inline { - display: inline !important; - } + display: inline !important; } .mui--visible-md-inline-block { - display: inline-block !important; - } -} + display: inline-block !important; } } @media (min-width: 992px) and (max-width: 1199px) { .mui-visible-lg { - display: block !important; - } + display: block !important; } table.mui-visible-lg { - display: table; - } + display: table; } tr.mui-visible-lg { - display: table-row !important; - } + display: table-row !important; } th.mui-visible-lg, td.mui-visible-lg { - display: table-cell !important; - } + display: table-cell !important; } .mui--visible-lg-block { - display: block !important; - } + display: block !important; } .mui--visible-lg-inline { - display: inline !important; - } + display: inline !important; } .mui--visible-lg-inline-block { - display: inline-block !important; - } -} + display: inline-block !important; } } @media (min-width: 1200px) { .mui-visible-xl { - display: block !important; - } + display: block !important; } table.mui-visible-xl { - display: table; - } + display: table; } tr.mui-visible-xl { - display: table-row !important; - } + display: table-row !important; } th.mui-visible-xl, td.mui-visible-xl { - display: table-cell !important; - } + display: table-cell !important; } .mui--visible-xl-block { - display: block !important; - } + display: block !important; } .mui--visible-xl-inline { - display: inline !important; - } + display: inline !important; } .mui--visible-xl-inline-block { - display: inline-block !important; - } -} + display: inline-block !important; } } @media (max-width: 543px) { .mui--hidden-xs { - display: none !important; - } -} + display: none !important; } } @media (min-width: 544px) and (max-width: 767px) { .mui--hidden-sm { - display: none !important; - } -} + display: none !important; } } @media (min-width: 768px) and (max-width: 991px) { .mui--hidden-md { - display: none !important; - } -} + display: none !important; } } @media (min-width: 992px) and (max-width: 1199px) { .mui--hidden-lg { - display: none !important; - } -} + display: none !important; } } @media (min-width: 1200px) { .mui--hidden-xl { - display: none !important; - } -} + display: none !important; } } body.mui-body--scroll-lock { - overflow: hidden !important; -} + overflow: hidden !important; } /** * MUI Overlay module @@ -2417,8 +1808,7 @@ body.mui-body--scroll-lock { left: 0; z-index: 99999999; background-color: rgba(0, 0, 0, 0.2); - overflow: auto; -} + overflow: auto; } /** * MUI Ripple module @@ -2428,59 +1818,33 @@ body.mui-body--scroll-lock { border-radius: 50%; pointer-events: none; opacity: 0; - -webkit-animation: mui-ripple-animation 2s; - animation: mui-ripple-animation 2s; -} - -@-webkit-keyframes mui-ripple-animation { - from { - -webkit-transform: scale(1); - transform: scale(1); - opacity: 0.4; - } - to { - -webkit-transform: scale(100); - transform: scale(100); - opacity: 0; - } -} + animation: mui-ripple-animation 2s; } @keyframes mui-ripple-animation { from { - -webkit-transform: scale(1); transform: scale(1); - opacity: 0.4; - } + opacity: 0.4; } to { - -webkit-transform: scale(100); transform: scale(100); - opacity: 0; - } -} + opacity: 0; } } .mui-btn > .mui-ripple-effect { - background-color: #a6a6a6; -} + background-color: #a6a6a6; } .mui-btn--primary > .mui-ripple-effect { - background-color: #FFF; -} + background-color: #FFF; } .mui-btn--dark > .mui-ripple-effect { - background-color: #FFF; -} + background-color: #FFF; } .mui-btn--danger > .mui-ripple-effect { - background-color: #FFF; -} + background-color: #FFF; } .mui-btn--accent > .mui-ripple-effect { - background-color: #FFF; -} + background-color: #FFF; } .mui-btn--flat > .mui-ripple-effect { - background-color: #a6a6a6; -} + background-color: #a6a6a6; } /** * MUI Typography module @@ -2488,72 +1852,61 @@ body.mui-body--scroll-lock { .mui--text-display4 { font-weight: 300; font-size: 112px; - line-height: 112px; -} + line-height: 112px; } .mui--text-display3 { font-weight: 400; font-size: 56px; - line-height: 56px; -} + line-height: 56px; } .mui--text-display2 { font-weight: 400; font-size: 45px; - line-height: 48px; -} + line-height: 48px; } .mui--text-display1, h1 { font-weight: 400; font-size: 34px; - line-height: 40px; -} + line-height: 40px; } .mui--text-headline, h2 { font-weight: 400; font-size: 24px; - line-height: 32px; -} + line-height: 32px; } .mui--text-title, h3 { font-weight: 400; font-size: 20px; - line-height: 28px; -} + line-height: 28px; } .mui--text-subhead, h4 { font-weight: 400; font-size: 16px; - line-height: 24px; -} + line-height: 24px; } .mui--text-body2, h5 { font-weight: 500; font-size: 14px; - line-height: 24px; -} + line-height: 24px; } .mui--text-body1 { font-weight: 400; font-size: 14px; - line-height: 20px; -} + line-height: 20px; } .mui--text-caption { font-weight: 400; font-size: 12px; - line-height: 16px; -} + line-height: 16px; } .mui--text-menu { font-weight: 500; font-size: 13px; - line-height: 17px; -} + line-height: 17px; } .mui--text-button { font-weight: 500; font-size: 14px; line-height: 18px; - text-transform: uppercase; -} + text-transform: uppercase; } + diff --git a/app/css/mui.custom.css b/app/css/mui.custom.css new file mode 100644 index 0000000..cfe1de1 --- /dev/null +++ b/app/css/mui.custom.css @@ -0,0 +1,1912 @@ +/** + * MUI Colors module + */ +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS and IE text size adjust after device orientation change, + * without disabling user zoom. + */ +html { + font-family: sans-serif; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ } + +/** + * Remove default margin. + */ +body { + margin: 0; } + +/* HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; } + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ +audio, +canvas, +progress, +video { + display: inline-block; + /* 1 */ + vertical-align: baseline; + /* 2 */ } + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +audio:not([controls]) { + display: none; + height: 0; } + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22. + */ +[hidden], +template { + display: none; } + +/* Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +a { + background-color: transparent; } + +/** + * Improve readability of focused elements when they are also in an + * active/hover state. + */ +a:active, +a:hover { + outline: 0; } + +/* Text-level semantics + ========================================================================== */ +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ +abbr[title] { + border-bottom: 1px dotted; } + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ +b, +strong { + font-weight: bold; } + +/** + * Address styling not present in Safari and Chrome. + */ +dfn { + font-style: italic; } + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ +h1 { + font-size: 2em; + margin: 0.67em 0; } + +/** + * Address styling not present in IE 8/9. + */ +mark { + background: #ff0; + color: #000; } + +/** + * Address inconsistent and variable font size in all browsers. + */ +small { + font-size: 80%; } + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +/* Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9/10. + */ +img { + border: 0; } + +/** + * Correct overflow not hidden in IE 9/10/11. + */ +svg:not(:root) { + overflow: hidden; } + +/* Grouping content + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari. + */ +figure { + margin: 1em 40px; } + +/** + * Address differences between Firefox and other browsers. + */ +hr { + box-sizing: content-box; + height: 0; } + +/** + * Contain overflow in all browsers. + */ +pre { + overflow: auto; } + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; } + +/* Forms + ========================================================================== */ +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ +button, +input, +optgroup, +select, +textarea { + color: inherit; + /* 1 */ + font: inherit; + /* 2 */ + margin: 0; + /* 3 */ } + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ +button { + overflow: visible; } + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ +button, +select { + text-transform: none; } + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ } + +/** + * Re-set default cursor for disabled elements. + */ +button[disabled], +html input[disabled] { + cursor: default; } + +/** + * Remove inner padding and border in Firefox 4+. + */ +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; } + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +input { + line-height: normal; } + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome. + */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + box-sizing: content-box; + /* 2 */ } + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +/** + * Define consistent border, margin, and padding. + */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ +textarea { + overflow: auto; } + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ +optgroup { + font-weight: bold; } + +/* Tables + ========================================================================== */ +/** + * Remove most spacing between table cells. + */ +table { + border-collapse: collapse; + border-spacing: 0; } + +td, +th { + padding: 0; } + +/** + * MUI Colors module + */ +/** + * MUI Reboot + */ +* { + box-sizing: border-box; } + +*:before, +*:after { + box-sizing: border-box; } + +html { + font-size: 10px; + -webkit-tap-highlight-color: transparent; } + +body { + font-family: Arial, Verdana, Tahoma; + font-size: 14px; + font-weight: 400; + line-height: 1.429; + color: rgba(0, 0, 0, 0.87); + background-color: #FFF; } + +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; } + +a { + color: #2196F3; + text-decoration: none; } + a:hover, a:focus { + color: #1976D2; + text-decoration: underline; } + a:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } + +p { + margin: 0 0 10px; } + +ul, +ol { + margin-top: 0; + margin-bottom: 10px; } + +figure { + margin: 0; } + +img { + vertical-align: middle; } + +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + height: 1px; + background-color: rgba(0, 0, 0, 0.12); } + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 10px; + font-size: 21px; + color: rgba(0, 0, 0, 0.87); + line-height: inherit; + border: 0; } + +input[type="search"] { + box-sizing: border-box; + -webkit-appearance: none; } + +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } + +input[type="radio"]:disabled, +input[type="checkbox"]:disabled { + cursor: not-allowed; } + +strong { + font-weight: 700; } + +abbr[title] { + cursor: help; + border-bottom: 1px dotted #2196F3; } + +h1, h2, h3 { + margin-top: 20px; + margin-bottom: 10px; } + +h4, h5, h6 { + margin-top: 10px; + margin-bottom: 10px; } + +/** + * MUI Appbar + */ +.mui--appbar-height { + height: 56px; } + +.mui--appbar-min-height, .mui-appbar { + min-height: 56px; } + +.mui--appbar-line-height { + line-height: 56px; } + +.mui--appbar-top { + top: 56px; } + +@media (orientation: landscape) and (max-height: 480px) { + .mui--appbar-height { + height: 48px; } + .mui--appbar-min-height, .mui-appbar { + min-height: 48px; } + .mui--appbar-line-height { + line-height: 48px; } + .mui--appbar-top { + top: 48px; } } + +@media (min-width: 480px) { + .mui--appbar-height { + height: 64px; } + .mui--appbar-min-height, .mui-appbar { + min-height: 64px; } + .mui--appbar-line-height { + line-height: 64px; } + .mui--appbar-top { + top: 64px; } } + +.mui-appbar { + background-color: #2196F3; + color: #FFF; } + +/** + * MUI Buttons + */ +.mui-btn { + animation-duration: 0.0001s; + animation-name: mui-node-inserted; + font-weight: 500; + font-size: 14px; + line-height: 18px; + text-transform: uppercase; + color: rgba(0, 0, 0, 0.87); + background-color: #FFF; + transition: all 0.2s ease-in-out; + display: inline-block; + height: 36px; + padding: 0 26px; + margin-top: 6px; + margin-bottom: 6px; + border: none; + border-radius: 2px; + cursor: pointer; + touch-action: manipulation; + background-image: none; + text-align: center; + line-height: 36px; + vertical-align: middle; + white-space: nowrap; + user-select: none; + font-size: 14px; + letter-spacing: 0.03em; + position: relative; + overflow: hidden; } + .mui-btn:hover, .mui-btn:focus, .mui-btn:active { + color: rgba(0, 0, 0, 0.87); + background-color: white; } + .mui-btn[disabled]:hover, .mui-btn[disabled]:focus, .mui-btn[disabled]:active { + color: rgba(0, 0, 0, 0.87); + background-color: #FFF; } + .mui-btn.mui-btn--flat { + color: rgba(0, 0, 0, 0.87); + background-color: transparent; } + .mui-btn.mui-btn--flat:hover, .mui-btn.mui-btn--flat:focus, .mui-btn.mui-btn--flat:active { + color: rgba(0, 0, 0, 0.87); + background-color: #f2f2f2; } + .mui-btn.mui-btn--flat[disabled]:hover, .mui-btn.mui-btn--flat[disabled]:focus, .mui-btn.mui-btn--flat[disabled]:active { + color: rgba(0, 0, 0, 0.87); + background-color: transparent; } + .mui-btn:hover, .mui-btn:focus, .mui-btn:active { + outline: 0; + text-decoration: none; + color: rgba(0, 0, 0, 0.87); } + .mui-btn:hover, .mui-btn:focus { + box-shadow: 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn:hover, .mui-btn:focus { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } } + .mui-btn:active { + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn:active { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } } + .mui-btn:disabled, .mui-btn.mui--is-disabled { + cursor: not-allowed; + pointer-events: none; + opacity: 0.60; + box-shadow: none; } + +.mui-btn + .mui-btn { + margin-left: 8px; } + +.mui-btn--flat { + background-color: transparent; } + .mui-btn--flat:hover, .mui-btn--flat:focus, .mui-btn--flat:active { + box-shadow: none; + background-color: #f2f2f2; } + +.mui-btn--raised, .mui-btn--fab { + box-shadow: 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn--raised, .mui-btn--fab { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 0px 2px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.2); } } + .mui-btn--raised:active, .mui-btn--fab:active { + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-btn--raised:active, .mui-btn--fab:active { + box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.12), -1px 0px 2px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } } + +.mui-btn--fab { + position: relative; + padding: 0; + width: 55px; + height: 55px; + line-height: 55px; + border-radius: 50%; + z-index: 1; } + +.mui-btn--primary { + color: #FFF; + background-color: #2196F3; } + .mui-btn--primary:hover, .mui-btn--primary:focus, .mui-btn--primary:active { + color: #FFF; + background-color: #39a1f4; } + .mui-btn--primary[disabled]:hover, .mui-btn--primary[disabled]:focus, .mui-btn--primary[disabled]:active { + color: #FFF; + background-color: #2196F3; } + .mui-btn--primary.mui-btn--flat { + color: #2196F3; + background-color: transparent; } + .mui-btn--primary.mui-btn--flat:hover, .mui-btn--primary.mui-btn--flat:focus, .mui-btn--primary.mui-btn--flat:active { + color: #2196F3; + background-color: #f2f2f2; } + .mui-btn--primary.mui-btn--flat[disabled]:hover, .mui-btn--primary.mui-btn--flat[disabled]:focus, .mui-btn--primary.mui-btn--flat[disabled]:active { + color: #2196F3; + background-color: transparent; } + +.mui-btn--dark { + color: #FFF; + background-color: #424242; } + .mui-btn--dark:hover, .mui-btn--dark:focus, .mui-btn--dark:active { + color: #FFF; + background-color: #4f4f4f; } + .mui-btn--dark[disabled]:hover, .mui-btn--dark[disabled]:focus, .mui-btn--dark[disabled]:active { + color: #FFF; + background-color: #424242; } + .mui-btn--dark.mui-btn--flat { + color: #424242; + background-color: transparent; } + .mui-btn--dark.mui-btn--flat:hover, .mui-btn--dark.mui-btn--flat:focus, .mui-btn--dark.mui-btn--flat:active { + color: #424242; + background-color: #f2f2f2; } + .mui-btn--dark.mui-btn--flat[disabled]:hover, .mui-btn--dark.mui-btn--flat[disabled]:focus, .mui-btn--dark.mui-btn--flat[disabled]:active { + color: #424242; + background-color: transparent; } + +.mui-btn--danger { + color: #FFF; + background-color: #F44336; } + .mui-btn--danger:hover, .mui-btn--danger:focus, .mui-btn--danger:active { + color: #FFF; + background-color: #f55a4e; } + .mui-btn--danger[disabled]:hover, .mui-btn--danger[disabled]:focus, .mui-btn--danger[disabled]:active { + color: #FFF; + background-color: #F44336; } + .mui-btn--danger.mui-btn--flat { + color: #F44336; + background-color: transparent; } + .mui-btn--danger.mui-btn--flat:hover, .mui-btn--danger.mui-btn--flat:focus, .mui-btn--danger.mui-btn--flat:active { + color: #F44336; + background-color: #f2f2f2; } + .mui-btn--danger.mui-btn--flat[disabled]:hover, .mui-btn--danger.mui-btn--flat[disabled]:focus, .mui-btn--danger.mui-btn--flat[disabled]:active { + color: #F44336; + background-color: transparent; } + +.mui-btn--accent { + color: #004c6d; + background-color: #bad649; } + .mui-btn--accent:hover, .mui-btn--accent:focus, .mui-btn--accent:active { + color: #004c6d; + background-color: #c2db5e; } + .mui-btn--accent[disabled]:hover, .mui-btn--accent[disabled]:focus, .mui-btn--accent[disabled]:active { + color: #004c6d; + background-color: #bad649; } + .mui-btn--accent.mui-btn--flat { + color: #bad649; + background-color: transparent; } + .mui-btn--accent.mui-btn--flat:hover, .mui-btn--accent.mui-btn--flat:focus, .mui-btn--accent.mui-btn--flat:active { + color: #bad649; + background-color: #f2f2f2; } + .mui-btn--accent.mui-btn--flat[disabled]:hover, .mui-btn--accent.mui-btn--flat[disabled]:focus, .mui-btn--accent.mui-btn--flat[disabled]:active { + color: #bad649; + background-color: transparent; } + +.mui-btn--small { + height: 30.6px; + line-height: 30.6px; + padding: 0 16px; + font-size: 13px; } + +.mui-btn--large { + height: 54px; + line-height: 54px; + padding: 0 26px; + font-size: 14px; } + +.mui-btn--fab.mui-btn--small { + width: 44px; + height: 44px; + line-height: 44px; } + +.mui-btn--fab.mui-btn--large { + width: 75px; + height: 75px; + line-height: 75px; } + +/** + * MUI Checkboxe and Radio Components + */ +.mui-radio, +.mui-checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; } + .mui-radio > label, + .mui-checkbox > label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; } + +.mui-radio > label > input[type="radio"], +.mui-radio--inline > label > input[type="radio"], +.mui-checkbox > label > input[type="checkbox"], +.mui-checkbox--inline > label > input[type="checkbox"] { + position: absolute; + margin-left: -20px; + margin-top: 4px; } + +.mui-radio + .mui-radio, +.mui-checkbox + .mui-checkbox { + margin-top: -5px; } + +.mui-radio--inline, +.mui-checkbox--inline { + display: inline-block; + padding-left: 20px; + margin-bottom: 0; + vertical-align: middle; + font-weight: normal; + cursor: pointer; } + .mui-radio--inline > input[type="radio"], + .mui-radio--inline > input[type="checkbox"], + .mui-radio--inline > label > input[type="radio"], + .mui-radio--inline > label > input[type="checkbox"], + .mui-checkbox--inline > input[type="radio"], + .mui-checkbox--inline > input[type="checkbox"], + .mui-checkbox--inline > label > input[type="radio"], + .mui-checkbox--inline > label > input[type="checkbox"] { + margin: 4px 0 0; + line-height: normal; } + +.mui-radio--inline + .mui-radio--inline, +.mui-checkbox--inline + .mui-checkbox--inline { + margin-top: 0; + margin-left: 10px; } + +/** + * MUI Container module + */ +.mui-container { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; } + .mui-container:before, .mui-container:after { + content: " "; + display: table; } + .mui-container:after { + clear: both; } + @media (min-width: 544px) { + .mui-container { + max-width: 570px; } } + @media (min-width: 768px) { + .mui-container { + max-width: 740px; } } + @media (min-width: 992px) { + .mui-container { + max-width: 960px; } } + @media (min-width: 1200px) { + .mui-container { + max-width: 1170px; } } + +.mui-container-fluid { + margin-right: auto; + margin-left: auto; + padding-left: 15px; + padding-right: 15px; } + .mui-container-fluid:before, .mui-container-fluid:after { + content: " "; + display: table; } + .mui-container-fluid:after { + clear: both; } + +/** + * MUI Divider Component and CSS Helpers + */ +.mui-divider { + display: block; + height: 1px; + background-color: rgba(0, 0, 0, 0.12); } + +.mui--divider-top { + border-top: 1px solid rgba(0, 0, 0, 0.12); } + +.mui--divider-bottom { + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } + +.mui--divider-left { + border-left: 1px solid rgba(0, 0, 0, 0.12); } + +.mui--divider-right { + border-right: 1px solid rgba(0, 0, 0, 0.12); } + +/** + * MUI Dropdown module + */ +.mui-dropdown { + display: inline-block; + position: relative; } + +[data-mui-toggle="dropdown"] { + animation-duration: 0.0001s; + animation-name: mui-node-inserted; + outline: 0; } + +.mui-dropdown__menu { + position: absolute; + top: 100%; + left: 0; + display: none; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + font-size: 14px; + text-align: left; + background-color: #FFF; + border-radius: 2px; + z-index: 1; + background-clip: padding-box; } + .mui-dropdown__menu.mui--is-open { + display: block; } + .mui-dropdown__menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 1.429; + color: rgba(0, 0, 0, 0.87); + white-space: nowrap; } + .mui-dropdown__menu > li > a:hover, .mui-dropdown__menu > li > a:focus { + text-decoration: none; + color: rgba(0, 0, 0, 0.87); + background-color: #EEEEEE; } + .mui-dropdown__menu > .mui--is-disabled > a, .mui-dropdown__menu > .mui--is-disabled > a:hover, .mui-dropdown__menu > .mui--is-disabled > a:focus { + color: #EEEEEE; } + .mui-dropdown__menu > .mui--is-disabled > a:hover, .mui-dropdown__menu > .mui--is-disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + cursor: not-allowed; } + +.mui-dropdown__menu--right { + left: auto; + right: 0; } + +/** + * MUI Form Component + */ +@media (min-width: 544px) { + .mui-form--inline > .mui-textfield { + display: inline-block; + margin-bottom: 0; } + .mui-form--inline > .mui-radio, + .mui-form--inline > .mui-checkbox { + display: inline-block; + margin-top: 0; + margin-bottom: 0; + vertical-align: middle; } + .mui-form--inline > .mui-radio > label, + .mui-form--inline > .mui-checkbox > label { + padding-left: 0; } + .mui-form--inline > .mui-radio > label > input[type="radio"], + .mui-form--inline > .mui-checkbox > label > input[type="checkbox"] { + position: relative; + margin-left: 0; } + .mui-form--inline > .mui-select { + display: inline-block; } + .mui-form--inline > .mui-btn { + margin-bottom: 0; + margin-top: 0; + vertical-align: bottom; } } + +/** + * MUI Grid module + */ +.mui-row { + margin-left: -15px; + margin-right: -15px; } + .mui-row:before, .mui-row:after { + content: " "; + display: table; } + .mui-row:after { + clear: both; } + +.mui-col-xs-1, .mui-col-sm-1, .mui-col-md-1, .mui-col-lg-1, .mui-col-xs-2, .mui-col-sm-2, .mui-col-md-2, .mui-col-lg-2, .mui-col-xs-3, .mui-col-sm-3, .mui-col-md-3, .mui-col-lg-3, .mui-col-xs-4, .mui-col-sm-4, .mui-col-md-4, .mui-col-lg-4, .mui-col-xs-5, .mui-col-sm-5, .mui-col-md-5, .mui-col-lg-5, .mui-col-xs-6, .mui-col-sm-6, .mui-col-md-6, .mui-col-lg-6, .mui-col-xs-7, .mui-col-sm-7, .mui-col-md-7, .mui-col-lg-7, .mui-col-xs-8, .mui-col-sm-8, .mui-col-md-8, .mui-col-lg-8, .mui-col-xs-9, .mui-col-sm-9, .mui-col-md-9, .mui-col-lg-9, .mui-col-xs-10, .mui-col-sm-10, .mui-col-md-10, .mui-col-lg-10, .mui-col-xs-11, .mui-col-sm-11, .mui-col-md-11, .mui-col-lg-11, .mui-col-xs-12, .mui-col-sm-12, .mui-col-md-12, .mui-col-lg-12 { + min-height: 1px; + padding-left: 15px; + padding-right: 15px; } + +.mui-col-xs-1, .mui-col-xs-2, .mui-col-xs-3, .mui-col-xs-4, .mui-col-xs-5, .mui-col-xs-6, .mui-col-xs-7, .mui-col-xs-8, .mui-col-xs-9, .mui-col-xs-10, .mui-col-xs-11, .mui-col-xs-12 { + float: left; } + +.mui-col-xs-1 { + width: 8.33333%; } + +.mui-col-xs-2 { + width: 16.66667%; } + +.mui-col-xs-3 { + width: 25%; } + +.mui-col-xs-4 { + width: 33.33333%; } + +.mui-col-xs-5 { + width: 41.66667%; } + +.mui-col-xs-6 { + width: 50%; } + +.mui-col-xs-7 { + width: 58.33333%; } + +.mui-col-xs-8 { + width: 66.66667%; } + +.mui-col-xs-9 { + width: 75%; } + +.mui-col-xs-10 { + width: 83.33333%; } + +.mui-col-xs-11 { + width: 91.66667%; } + +.mui-col-xs-12 { + width: 100%; } + +.mui-col-xs-offset-0 { + margin-left: 0%; } + +.mui-col-xs-offset-1 { + margin-left: 8.33333%; } + +.mui-col-xs-offset-2 { + margin-left: 16.66667%; } + +.mui-col-xs-offset-3 { + margin-left: 25%; } + +.mui-col-xs-offset-4 { + margin-left: 33.33333%; } + +.mui-col-xs-offset-5 { + margin-left: 41.66667%; } + +.mui-col-xs-offset-6 { + margin-left: 50%; } + +.mui-col-xs-offset-7 { + margin-left: 58.33333%; } + +.mui-col-xs-offset-8 { + margin-left: 66.66667%; } + +.mui-col-xs-offset-9 { + margin-left: 75%; } + +.mui-col-xs-offset-10 { + margin-left: 83.33333%; } + +.mui-col-xs-offset-11 { + margin-left: 91.66667%; } + +.mui-col-xs-offset-12 { + margin-left: 100%; } + +@media (min-width: 544px) { + .mui-col-sm-1, .mui-col-sm-2, .mui-col-sm-3, .mui-col-sm-4, .mui-col-sm-5, .mui-col-sm-6, .mui-col-sm-7, .mui-col-sm-8, .mui-col-sm-9, .mui-col-sm-10, .mui-col-sm-11, .mui-col-sm-12 { + float: left; } + .mui-col-sm-1 { + width: 8.33333%; } + .mui-col-sm-2 { + width: 16.66667%; } + .mui-col-sm-3 { + width: 25%; } + .mui-col-sm-4 { + width: 33.33333%; } + .mui-col-sm-5 { + width: 41.66667%; } + .mui-col-sm-6 { + width: 50%; } + .mui-col-sm-7 { + width: 58.33333%; } + .mui-col-sm-8 { + width: 66.66667%; } + .mui-col-sm-9 { + width: 75%; } + .mui-col-sm-10 { + width: 83.33333%; } + .mui-col-sm-11 { + width: 91.66667%; } + .mui-col-sm-12 { + width: 100%; } + .mui-col-sm-offset-0 { + margin-left: 0%; } + .mui-col-sm-offset-1 { + margin-left: 8.33333%; } + .mui-col-sm-offset-2 { + margin-left: 16.66667%; } + .mui-col-sm-offset-3 { + margin-left: 25%; } + .mui-col-sm-offset-4 { + margin-left: 33.33333%; } + .mui-col-sm-offset-5 { + margin-left: 41.66667%; } + .mui-col-sm-offset-6 { + margin-left: 50%; } + .mui-col-sm-offset-7 { + margin-left: 58.33333%; } + .mui-col-sm-offset-8 { + margin-left: 66.66667%; } + .mui-col-sm-offset-9 { + margin-left: 75%; } + .mui-col-sm-offset-10 { + margin-left: 83.33333%; } + .mui-col-sm-offset-11 { + margin-left: 91.66667%; } + .mui-col-sm-offset-12 { + margin-left: 100%; } } + +@media (min-width: 768px) { + .mui-col-md-1, .mui-col-md-2, .mui-col-md-3, .mui-col-md-4, .mui-col-md-5, .mui-col-md-6, .mui-col-md-7, .mui-col-md-8, .mui-col-md-9, .mui-col-md-10, .mui-col-md-11, .mui-col-md-12 { + float: left; } + .mui-col-md-1 { + width: 8.33333%; } + .mui-col-md-2 { + width: 16.66667%; } + .mui-col-md-3 { + width: 25%; } + .mui-col-md-4 { + width: 33.33333%; } + .mui-col-md-5 { + width: 41.66667%; } + .mui-col-md-6 { + width: 50%; } + .mui-col-md-7 { + width: 58.33333%; } + .mui-col-md-8 { + width: 66.66667%; } + .mui-col-md-9 { + width: 75%; } + .mui-col-md-10 { + width: 83.33333%; } + .mui-col-md-11 { + width: 91.66667%; } + .mui-col-md-12 { + width: 100%; } + .mui-col-md-offset-0 { + margin-left: 0%; } + .mui-col-md-offset-1 { + margin-left: 8.33333%; } + .mui-col-md-offset-2 { + margin-left: 16.66667%; } + .mui-col-md-offset-3 { + margin-left: 25%; } + .mui-col-md-offset-4 { + margin-left: 33.33333%; } + .mui-col-md-offset-5 { + margin-left: 41.66667%; } + .mui-col-md-offset-6 { + margin-left: 50%; } + .mui-col-md-offset-7 { + margin-left: 58.33333%; } + .mui-col-md-offset-8 { + margin-left: 66.66667%; } + .mui-col-md-offset-9 { + margin-left: 75%; } + .mui-col-md-offset-10 { + margin-left: 83.33333%; } + .mui-col-md-offset-11 { + margin-left: 91.66667%; } + .mui-col-md-offset-12 { + margin-left: 100%; } } + +@media (min-width: 992px) { + .mui-col-lg-1, .mui-col-lg-2, .mui-col-lg-3, .mui-col-lg-4, .mui-col-lg-5, .mui-col-lg-6, .mui-col-lg-7, .mui-col-lg-8, .mui-col-lg-9, .mui-col-lg-10, .mui-col-lg-11, .mui-col-lg-12 { + float: left; } + .mui-col-lg-1 { + width: 8.33333%; } + .mui-col-lg-2 { + width: 16.66667%; } + .mui-col-lg-3 { + width: 25%; } + .mui-col-lg-4 { + width: 33.33333%; } + .mui-col-lg-5 { + width: 41.66667%; } + .mui-col-lg-6 { + width: 50%; } + .mui-col-lg-7 { + width: 58.33333%; } + .mui-col-lg-8 { + width: 66.66667%; } + .mui-col-lg-9 { + width: 75%; } + .mui-col-lg-10 { + width: 83.33333%; } + .mui-col-lg-11 { + width: 91.66667%; } + .mui-col-lg-12 { + width: 100%; } + .mui-col-lg-offset-0 { + margin-left: 0%; } + .mui-col-lg-offset-1 { + margin-left: 8.33333%; } + .mui-col-lg-offset-2 { + margin-left: 16.66667%; } + .mui-col-lg-offset-3 { + margin-left: 25%; } + .mui-col-lg-offset-4 { + margin-left: 33.33333%; } + .mui-col-lg-offset-5 { + margin-left: 41.66667%; } + .mui-col-lg-offset-6 { + margin-left: 50%; } + .mui-col-lg-offset-7 { + margin-left: 58.33333%; } + .mui-col-lg-offset-8 { + margin-left: 66.66667%; } + .mui-col-lg-offset-9 { + margin-left: 75%; } + .mui-col-lg-offset-10 { + margin-left: 83.33333%; } + .mui-col-lg-offset-11 { + margin-left: 91.66667%; } + .mui-col-lg-offset-12 { + margin-left: 100%; } } + +@media (min-width: 1200px) { + .mui-col-xl-1, .mui-col-xl-2, .mui-col-xl-3, .mui-col-xl-4, .mui-col-xl-5, .mui-col-xl-6, .mui-col-xl-7, .mui-col-xl-8, .mui-col-xl-9, .mui-col-xl-10, .mui-col-xl-11, .mui-col-xl-12 { + float: left; } + .mui-col-xl-1 { + width: 8.33333%; } + .mui-col-xl-2 { + width: 16.66667%; } + .mui-col-xl-3 { + width: 25%; } + .mui-col-xl-4 { + width: 33.33333%; } + .mui-col-xl-5 { + width: 41.66667%; } + .mui-col-xl-6 { + width: 50%; } + .mui-col-xl-7 { + width: 58.33333%; } + .mui-col-xl-8 { + width: 66.66667%; } + .mui-col-xl-9 { + width: 75%; } + .mui-col-xl-10 { + width: 83.33333%; } + .mui-col-xl-11 { + width: 91.66667%; } + .mui-col-xl-12 { + width: 100%; } + .mui-col-xl-offset-0 { + margin-left: 0%; } + .mui-col-xl-offset-1 { + margin-left: 8.33333%; } + .mui-col-xl-offset-2 { + margin-left: 16.66667%; } + .mui-col-xl-offset-3 { + margin-left: 25%; } + .mui-col-xl-offset-4 { + margin-left: 33.33333%; } + .mui-col-xl-offset-5 { + margin-left: 41.66667%; } + .mui-col-xl-offset-6 { + margin-left: 50%; } + .mui-col-xl-offset-7 { + margin-left: 58.33333%; } + .mui-col-xl-offset-8 { + margin-left: 66.66667%; } + .mui-col-xl-offset-9 { + margin-left: 75%; } + .mui-col-xl-offset-10 { + margin-left: 83.33333%; } + .mui-col-xl-offset-11 { + margin-left: 91.66667%; } + .mui-col-xl-offset-12 { + margin-left: 100%; } } + +/** + * MUI Panel module + */ +.mui-panel { + padding: 15px; + margin-bottom: 20px; + border-radius: 0; + background-color: #FFF; + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0px 2px 0 rgba(0, 0, 0, 0.12); } + .mui-panel:before, .mui-panel:after { + content: " "; + display: table; } + .mui-panel:after { + clear: both; } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-panel { + box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, 0.12), -1px 0px 2px 0 rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0px 2px 0 rgba(0, 0, 0, 0.12); } } + +/** + * MUI Select Component + */ +.mui-select { + display: block; + padding-top: 15px; + margin-bottom: 20px; + position: relative; } + .mui-select:focus { + outline: 0; } + .mui-select:focus > select { + height: 33px; + margin-bottom: -1px; + border-color: #2196F3; + border-width: 2px; } + .mui-select > select { + animation-duration: 0.0001s; + animation-name: mui-node-inserted; + display: block; + height: 32px; + width: 100%; + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; + outline: none; + border: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.26); + border-radius: 0px; + box-shadow: none; + background-color: transparent; + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg=="); + background-repeat: no-repeat; + background-position: right center; + cursor: pointer; + color: rgba(0, 0, 0, 0.87); + font-size: 16px; + padding: 0 25px 0 0; } + .mui-select > select::-ms-expand { + display: none; } + .mui-select > select:focus { + outline: 0; + height: 33px; + margin-bottom: -1px; + border-color: #2196F3; + border-width: 2px; } + .mui-select > select:disabled { + color: rgba(0, 0, 0, 0.38); + cursor: not-allowed; + background-color: transparent; + opacity: 1; } + +.mui-select__menu { + position: absolute; + z-index: 1; + min-width: 100%; + overflow-y: auto; + padding: 8px 0; + background-color: #FFF; + font-size: 16px; } + @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { + .mui-select__menu { + border-left: 1px solid rgba(0, 0, 0, 0.12); + border-top: 1px solid rgba(0, 0, 0, 0.12); } } + .mui-select__menu > div { + padding: 0 22px; + height: 42px; + line-height: 42px; + cursor: pointer; + white-space: nowrap; } + .mui-select__menu > div:hover { + background-color: #E0E0E0; } + .mui-select__menu > div.mui--is-selected { + background-color: #EEEEEE; } + +/** + * MUI Table Component + */ +th { + text-align: left; } + +.mui-table { + width: 100%; + max-width: 100%; + margin-bottom: 20px; } + .mui-table > thead > tr > th, + .mui-table > thead > tr > td, + .mui-table > tbody > tr > th, + .mui-table > tbody > tr > td, + .mui-table > tfoot > tr > th, + .mui-table > tfoot > tr > td { + padding: 10px; + line-height: 1.429; } + .mui-table > thead > tr > th { + border-bottom: 2px solid rgba(0, 0, 0, 0.12); + font-weight: 700; } + .mui-table > tbody + tbody { + border-top: 2px solid rgba(0, 0, 0, 0.12); } + .mui-table.mui-table--bordered > tbody > tr > td { + border-bottom: 1px solid rgba(0, 0, 0, 0.12); } + +/** + * MUI Tabs module + */ +.mui-tabs__bar { + list-style: none; + padding-left: 0; + margin-bottom: 0; + background-color: transparent; + white-space: nowrap; + overflow-x: auto; } + .mui-tabs__bar > li { + display: inline-block; } + .mui-tabs__bar > li > a { + display: block; + white-space: nowrap; + text-transform: uppercase; + font-weight: 500; + font-size: 14px; + color: rgba(0, 0, 0, 0.87); + cursor: default; + height: 48px; + line-height: 48px; + padding-left: 24px; + padding-right: 24px; + user-select: none; } + .mui-tabs__bar > li > a:hover { + text-decoration: none; } + .mui-tabs__bar > li.mui--is-active { + border-bottom: 2px solid #2196F3; } + .mui-tabs__bar > li.mui--is-active > a { + color: #2196F3; } + .mui-tabs__bar.mui-tabs__bar--justified { + display: table; + width: 100%; + table-layout: fixed; } + .mui-tabs__bar.mui-tabs__bar--justified > li { + display: table-cell; } + .mui-tabs__bar.mui-tabs__bar--justified > li > a { + text-align: center; + padding-left: 0px; + padding-right: 0px; } + +.mui-tabs__pane { + display: none; } + .mui-tabs__pane.mui--is-active { + display: block; } + +[data-mui-toggle="tab"] { + animation-duration: 0.0001s; + animation-name: mui-node-inserted; } + +/** + * MUI Textfield Component + */ +.mui-textfield { + display: block; + padding-top: 15px; + margin-bottom: 20px; + position: relative; } + .mui-textfield > label { + position: absolute; + top: 0; + display: block; + width: 100%; + color: rgba(0, 0, 0, 0.54); + font-size: 12px; + font-weight: 400; + line-height: 15px; + overflow-x: hidden; + text-overflow: ellipsis; + white-space: nowrap; } + .mui-textfield > textarea { + padding-top: 5px; } + .mui-textfield > input, + .mui-textfield > textarea { + display: block; } + .mui-textfield > input:focus ~ label, + .mui-textfield > textarea:focus ~ label { + color: #2196F3; } + +.mui-textfield--float-label > label { + position: absolute; + transform: translate(0px, 15px); + font-size: 16px; + line-height: 32px; + color: rgba(0, 0, 0, 0.26); + text-overflow: clip; + cursor: text; + pointer-events: none; } + +.mui-textfield--float-label > input:focus ~ label, +.mui-textfield--float-label > textarea:focus ~ label { + transform: translate(0px, 0px); + font-size: 12px; + line-height: 15px; + text-overflow: ellipsis; } + +.mui-textfield--float-label > input:not(:focus).mui--is-not-empty ~ label, .mui-textfield--float-label > input:not(:focus)[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield--float-label > input:not(:focus):not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield--float-label > textarea:not(:focus).mui--is-not-empty ~ label, +.mui-textfield--float-label > textarea:not(:focus)[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield--float-label > textarea:not(:focus):not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label { + color: rgba(0, 0, 0, 0.54); + font-size: 12px; + line-height: 15px; + transform: translate(0px, 0px); + text-overflow: ellipsis; } + +.mui-textfield--wrap-label { + display: table; + width: 100%; + padding-top: 0px; } + .mui-textfield--wrap-label:not(.mui-textfield--float-label) > label { + display: table-header-group; + position: static; + white-space: normal; + overflow-x: visible; } + +.mui-textfield > input, +.mui-textfield > textarea { + animation-duration: 0.0001s; + animation-name: mui-node-inserted; + display: block; + background-color: transparent; + color: rgba(0, 0, 0, 0.87); + border: none; + border-bottom: 1px solid rgba(0, 0, 0, 0.26); + outline: none; + width: 100%; + font-size: 16px; + padding: 0; + box-shadow: none; + border-radius: 0px; + background-image: none; } + .mui-textfield > input:focus, + .mui-textfield > textarea:focus { + border-color: #2196F3; + border-width: 2px; } + .mui-textfield > input:disabled, .mui-textfield > input:read-only, + .mui-textfield > textarea:disabled, + .mui-textfield > textarea:read-only { + cursor: not-allowed; + background-color: transparent; + opacity: 1; } + .mui-textfield > input::placeholder, + .mui-textfield > textarea::placeholder { + color: rgba(0, 0, 0, 0.26); + opacity: 1; } + +.mui-textfield > input { + height: 32px; } + .mui-textfield > input:focus { + height: 33px; + margin-bottom: -1px; } + +.mui-textfield > textarea { + min-height: 64px; } + .mui-textfield > textarea[rows]:not([rows="2"]):focus { + margin-bottom: -1px; } + +.mui-textfield > input:focus { + height: 33px; + margin-bottom: -1px; } + +.mui-textfield > input:invalid:not(:focus):not(:required), .mui-textfield > input:invalid:not(:focus):required.mui--is-not-empty, .mui-textfield > input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty, .mui-textfield > input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > textarea:invalid:not(:focus):not(:required), +.mui-textfield > textarea:invalid:not(:focus):required.mui--is-not-empty, +.mui-textfield > textarea:invalid:not(:focus):required.mui--is-empty.mui--is-dirty, +.mui-textfield > textarea:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > textarea:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > input:not(:focus).mui--is-invalid:not(:required), +.mui-textfield > input:not(:focus).mui--is-invalid:required.mui--is-not-empty, +.mui-textfield > input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty, +.mui-textfield > input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > textarea:not(:focus).mui--is-invalid:not(:required), +.mui-textfield > textarea:not(:focus).mui--is-invalid:required.mui--is-not-empty, +.mui-textfield > textarea:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty, +.mui-textfield > textarea:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > textarea:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) { + border-color: #F44336; + border-width: 2px; } + +.mui-textfield > input:invalid:not(:focus):not(:required), .mui-textfield > input:invalid:not(:focus):required.mui--is-not-empty, .mui-textfield > input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty, .mui-textfield > input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), .mui-textfield > input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > input:not(:focus).mui--is-invalid:not(:required), +.mui-textfield > input:not(:focus).mui--is-invalid:required.mui--is-not-empty, +.mui-textfield > input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty, +.mui-textfield > input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty), +.mui-textfield > input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) { + height: 33px; + margin-bottom: -1px; } + +.mui-textfield > input:invalid:not(:focus):not(:required) ~ label, .mui-textfield > input:invalid:not(:focus):required.mui--is-not-empty ~ label, .mui-textfield > input:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, .mui-textfield > input:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield > textarea:invalid:not(:focus):not(:required) ~ label, +.mui-textfield > textarea:invalid:not(:focus):required.mui--is-not-empty ~ label, +.mui-textfield > textarea:invalid:not(:focus):required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield > textarea:invalid:not(:focus):required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield > input:not(:focus).mui--is-invalid:not(:required) ~ label, +.mui-textfield > input:not(:focus).mui--is-invalid:required.mui--is-not-empty ~ label, +.mui-textfield > input:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield > input:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield > textarea:not(:focus).mui--is-invalid:not(:required) ~ label, +.mui-textfield > textarea:not(:focus).mui--is-invalid:required.mui--is-not-empty ~ label, +.mui-textfield > textarea:not(:focus).mui--is-invalid:required[value]:not([value=""]):not(.mui--is-empty):not(.mui--is-not-empty) ~ label, +.mui-textfield > textarea:not(:focus).mui--is-invalid:required:not(:empty):not(.mui--is-empty):not(.mui--is-not-empty) ~ label { + color: #F44336; } + +.mui-textfield:not(.mui-textfield--float-label) > input:invalid:not(:focus):required.mui--is-empty.mui--is-dirty ~ label, +.mui-textfield:not(.mui-textfield--float-label) > textarea:invalid:not(:focus):required.mui--is-empty.mui--is-dirty ~ label, +.mui-textfield:not(.mui-textfield--float-label) > input:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty ~ label, +.mui-textfield:not(.mui-textfield--float-label) > textarea:not(:focus).mui--is-invalid:required.mui--is-empty.mui--is-dirty ~ label { + color: #F44336; } + +/** + * MUI Helpers module + */ +@keyframes mui-node-inserted { + from { + opacity: 0.99; } + to { + opacity: 1; } } + +.mui--no-transition { + transition: none !important; } + +.mui--no-user-select { + user-select: none; } + +.mui-caret { + display: inline-block; + width: 0; + height: 0; + margin-left: 2px; + vertical-align: middle; + border-top: 4px solid; + border-right: 4px solid transparent; + border-left: 4px solid transparent; } + +.mui--text-left { + text-align: left !important; } + +.mui--text-right { + text-align: right !important; } + +.mui--text-center { + text-align: center !important; } + +.mui--text-justify { + text-align: justify !important; } + +.mui--text-nowrap { + white-space: nowrap !important; } + +.mui--align-baseline { + vertical-align: baseline !important; } + +.mui--align-top { + vertical-align: top !important; } + +.mui--align-middle { + vertical-align: middle !important; } + +.mui--align-bottom { + vertical-align: bottom !important; } + +.mui--text-dark { + color: rgba(0, 0, 0, 0.87); } + +.mui--text-dark-secondary { + color: rgba(0, 0, 0, 0.54); } + +.mui--text-dark-hint { + color: rgba(0, 0, 0, 0.38); } + +.mui--text-light { + color: #FFF; } + +.mui--text-light-secondary { + color: rgba(255, 255, 255, 0.7); } + +.mui--text-light-hint { + color: rgba(255, 255, 255, 0.3); } + +.mui--text-accent { + color: rgba(186, 214, 73, 0.87); } + +.mui--text-accent-secondary { + color: rgba(186, 214, 73, 0.54); } + +.mui--text-accent-hint { + color: rgba(186, 214, 73, 0.38); } + +.mui--text-black { + color: #000; } + +.mui--text-white { + color: #FFF; } + +.mui--text-danger { + color: #F44336; } + +.mui-list--unstyled { + padding-left: 0; + list-style: none; } + +.mui-list--inline { + padding-left: 0; + list-style: none; + margin-left: -5px; } + .mui-list--inline > li { + display: inline-block; + padding-left: 5px; + padding-right: 5px; } + +.mui--z1, .mui-dropdown__menu, .mui-select__menu { + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); } + +.mui--z2 { + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); } + +.mui--z3 { + box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23); } + +.mui--z4 { + box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22); } + +.mui--z5 { + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22); } + +.mui--clearfix:before, .mui--clearfix:after { + content: " "; + display: table; } + +.mui--clearfix:after { + clear: both; } + +.mui--pull-right { + float: right !important; } + +.mui--pull-left { + float: left !important; } + +.mui--hide { + display: none !important; } + +.mui--show { + display: block !important; } + +.mui--invisible { + visibility: hidden; } + +.mui--overflow-hidden { + overflow: hidden !important; } + +.mui--overflow-hidden-x { + overflow-x: hidden !important; } + +.mui--overflow-hidden-y { + overflow-y: hidden !important; } + +.mui--visible-xs-block, +.mui--visible-xs-inline, +.mui--visible-xs-inline-block, +.mui--visible-sm-block, +.mui--visible-sm-inline, +.mui--visible-sm-inline-block, +.mui--visible-md-block, +.mui--visible-md-inline, +.mui--visible-md-inline-block, +.mui--visible-lg-block, +.mui--visible-lg-inline, +.mui--visible-lg-inline-block, +.mui--visible-xl-block, +.mui--visible-xl-inline, +.mui--visible-xl-inline-block { + display: none !important; } + +@media (max-width: 543px) { + .mui-visible-xs { + display: block !important; } + table.mui-visible-xs { + display: table; } + tr.mui-visible-xs { + display: table-row !important; } + th.mui-visible-xs, + td.mui-visible-xs { + display: table-cell !important; } + .mui--visible-xs-block { + display: block !important; } + .mui--visible-xs-inline { + display: inline !important; } + .mui--visible-xs-inline-block { + display: inline-block !important; } } + +@media (min-width: 544px) and (max-width: 767px) { + .mui-visible-sm { + display: block !important; } + table.mui-visible-sm { + display: table; } + tr.mui-visible-sm { + display: table-row !important; } + th.mui-visible-sm, + td.mui-visible-sm { + display: table-cell !important; } + .mui--visible-sm-block { + display: block !important; } + .mui--visible-sm-inline { + display: inline !important; } + .mui--visible-sm-inline-block { + display: inline-block !important; } } + +@media (min-width: 768px) and (max-width: 991px) { + .mui-visible-md { + display: block !important; } + table.mui-visible-md { + display: table; } + tr.mui-visible-md { + display: table-row !important; } + th.mui-visible-md, + td.mui-visible-md { + display: table-cell !important; } + .mui--visible-md-block { + display: block !important; } + .mui--visible-md-inline { + display: inline !important; } + .mui--visible-md-inline-block { + display: inline-block !important; } } + +@media (min-width: 992px) and (max-width: 1199px) { + .mui-visible-lg { + display: block !important; } + table.mui-visible-lg { + display: table; } + tr.mui-visible-lg { + display: table-row !important; } + th.mui-visible-lg, + td.mui-visible-lg { + display: table-cell !important; } + .mui--visible-lg-block { + display: block !important; } + .mui--visible-lg-inline { + display: inline !important; } + .mui--visible-lg-inline-block { + display: inline-block !important; } } + +@media (min-width: 1200px) { + .mui-visible-xl { + display: block !important; } + table.mui-visible-xl { + display: table; } + tr.mui-visible-xl { + display: table-row !important; } + th.mui-visible-xl, + td.mui-visible-xl { + display: table-cell !important; } + .mui--visible-xl-block { + display: block !important; } + .mui--visible-xl-inline { + display: inline !important; } + .mui--visible-xl-inline-block { + display: inline-block !important; } } + +@media (max-width: 543px) { + .mui--hidden-xs { + display: none !important; } } + +@media (min-width: 544px) and (max-width: 767px) { + .mui--hidden-sm { + display: none !important; } } + +@media (min-width: 768px) and (max-width: 991px) { + .mui--hidden-md { + display: none !important; } } + +@media (min-width: 992px) and (max-width: 1199px) { + .mui--hidden-lg { + display: none !important; } } + +@media (min-width: 1200px) { + .mui--hidden-xl { + display: none !important; } } + +body.mui-body--scroll-lock { + overflow: hidden !important; } + +/** + * MUI Overlay module + */ +#mui-overlay { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 99999999; + background-color: rgba(0, 0, 0, 0.2); + overflow: auto; } + +/** + * MUI Ripple module + */ +.mui-ripple-effect { + position: absolute; + border-radius: 50%; + pointer-events: none; + opacity: 0; + animation: mui-ripple-animation 2s; } + +@keyframes mui-ripple-animation { + from { + transform: scale(1); + opacity: 0.4; } + to { + transform: scale(100); + opacity: 0; } } + +.mui-btn > .mui-ripple-effect { + background-color: #a6a6a6; } + +.mui-btn--primary > .mui-ripple-effect { + background-color: #FFF; } + +.mui-btn--dark > .mui-ripple-effect { + background-color: #FFF; } + +.mui-btn--danger > .mui-ripple-effect { + background-color: #FFF; } + +.mui-btn--accent > .mui-ripple-effect { + background-color: #FFF; } + +.mui-btn--flat > .mui-ripple-effect { + background-color: #a6a6a6; } + +/** + * MUI Typography module + */ +.mui--text-display4 { + font-weight: 300; + font-size: 112px; + line-height: 112px; } + +.mui--text-display3 { + font-weight: 400; + font-size: 56px; + line-height: 56px; } + +.mui--text-display2 { + font-weight: 400; + font-size: 45px; + line-height: 48px; } + +.mui--text-display1, h1 { + font-weight: 400; + font-size: 34px; + line-height: 40px; } + +.mui--text-headline, h2 { + font-weight: 400; + font-size: 24px; + line-height: 32px; } + +.mui--text-title, h3 { + font-weight: 400; + font-size: 20px; + line-height: 28px; } + +.mui--text-subhead, h4 { + font-weight: 400; + font-size: 16px; + line-height: 24px; } + +.mui--text-body2, h5 { + font-weight: 500; + font-size: 14px; + line-height: 24px; } + +.mui--text-body1 { + font-weight: 400; + font-size: 14px; + line-height: 20px; } + +.mui--text-caption { + font-weight: 400; + font-size: 12px; + line-height: 16px; } + +.mui--text-menu { + font-weight: 500; + font-size: 13px; + line-height: 17px; } + +.mui--text-button { + font-weight: 500; + font-size: 14px; + line-height: 18px; + text-transform: uppercase; } + diff --git a/app/index.html b/app/index.html index 01c88e0..49a8a07 100644 --- a/app/index.html +++ b/app/index.html @@ -14,7 +14,7 @@ rel="stylesheet"> - + - +
+
@@ -92,10 +99,10 @@
- - - - + + + +
@@ -115,35 +122,37 @@
-
-
-
-
-
-
Front light +
+
+
+
+
+
+ +
+
+ +
-
- - -
-
- @@ -189,19 +198,19 @@
- ', - iElems[0] - ) {} - return version > 4 ? version : undefined; - }()); - var isIe6 = ieVersion === 6, - isIe7 = ieVersion === 7; - - function isClickOnCheckableElement(element, eventType) { - if ((ko.utils.tagNameLower(element) !== "input") || !element.type) return false; - if (eventType.toLowerCase() != "click") return false; - var inputType = element.type; - return (inputType == "checkbox") || (inputType == "radio"); - } - - // For details on the pattern for changing node classes - // see: https://github.com/knockout/knockout/issues/1597 - var cssClassNameRegex = /\S+/g; - - function toggleDomNodeCssClass(node, classNames, shouldHaveClass) { - var addOrRemoveFn; - if (classNames) { - if (typeof node.classList === 'object') { - addOrRemoveFn = node.classList[shouldHaveClass ? 'add' : 'remove']; - ko.utils.arrayForEach(classNames.match(cssClassNameRegex), function(className) { - addOrRemoveFn.call(node.classList, className); - }); - } else if (typeof node.className['baseVal'] === 'string') { - // SVG tag .classNames is an SVGAnimatedString instance - toggleObjectClassPropertyString(node.className, 'baseVal', classNames, shouldHaveClass); - } else { - // node.className ought to be a string. - toggleObjectClassPropertyString(node, 'className', classNames, shouldHaveClass); - } - } - } - - function toggleObjectClassPropertyString(obj, prop, classNames, shouldHaveClass) { - // obj/prop is either a node/'className' or a SVGAnimatedString/'baseVal'. - var currentClassNames = obj[prop].match(cssClassNameRegex) || []; - ko.utils.arrayForEach(classNames.match(cssClassNameRegex), function(className) { - ko.utils.addOrRemoveItem(currentClassNames, className, shouldHaveClass); - }); - obj[prop] = currentClassNames.join(" "); - } - - return { - fieldsIncludedWithJsonPost: ['authenticity_token', /^__RequestVerificationToken(_.*)?$/], - - arrayForEach: function (array, action) { - for (var i = 0, j = array.length; i < j; i++) - action(array[i], i); - }, - - arrayIndexOf: function (array, item) { - if (typeof Array.prototype.indexOf == "function") - return Array.prototype.indexOf.call(array, item); - for (var i = 0, j = array.length; i < j; i++) - if (array[i] === item) - return i; - return -1; - }, - - arrayFirst: function (array, predicate, predicateOwner) { - for (var i = 0, j = array.length; i < j; i++) - if (predicate.call(predicateOwner, array[i], i)) - return array[i]; - return null; - }, - - arrayRemoveItem: function (array, itemToRemove) { - var index = ko.utils.arrayIndexOf(array, itemToRemove); - if (index > 0) { - array.splice(index, 1); - } - else if (index === 0) { - array.shift(); - } - }, - - arrayGetDistinctValues: function (array) { - array = array || []; - var result = []; - for (var i = 0, j = array.length; i < j; i++) { - if (ko.utils.arrayIndexOf(result, array[i]) < 0) - result.push(array[i]); - } - return result; - }, - - arrayMap: function (array, mapping) { - array = array || []; - var result = []; - for (var i = 0, j = array.length; i < j; i++) - result.push(mapping(array[i], i)); - return result; - }, - - arrayFilter: function (array, predicate) { - array = array || []; - var result = []; - for (var i = 0, j = array.length; i < j; i++) - if (predicate(array[i], i)) - result.push(array[i]); - return result; - }, - - arrayPushAll: function (array, valuesToPush) { - if (valuesToPush instanceof Array) - array.push.apply(array, valuesToPush); - else - for (var i = 0, j = valuesToPush.length; i < j; i++) - array.push(valuesToPush[i]); - return array; - }, - - addOrRemoveItem: function(array, value, included) { - var existingEntryIndex = ko.utils.arrayIndexOf(ko.utils.peekObservable(array), value); - if (existingEntryIndex < 0) { - if (included) - array.push(value); - } else { - if (!included) - array.splice(existingEntryIndex, 1); - } - }, - - canSetPrototype: canSetPrototype, - - extend: extend, - - setPrototypeOf: setPrototypeOf, - - setPrototypeOfOrExtend: canSetPrototype ? setPrototypeOf : extend, - - objectForEach: objectForEach, - - objectMap: function(source, mapping) { - if (!source) - return source; - var target = {}; - for (var prop in source) { - if (source.hasOwnProperty(prop)) { - target[prop] = mapping(source[prop], prop, source); - } - } - return target; - }, - - emptyDomNode: function (domNode) { - while (domNode.firstChild) { - ko.removeNode(domNode.firstChild); - } - }, - - moveCleanedNodesToContainerElement: function(nodes) { - // Ensure it's a real array, as we're about to reparent the nodes and - // we don't want the underlying collection to change while we're doing that. - var nodesArray = ko.utils.makeArray(nodes); - var templateDocument = (nodesArray[0] && nodesArray[0].ownerDocument) || document; - - var container = templateDocument.createElement('div'); - for (var i = 0, j = nodesArray.length; i < j; i++) { - container.appendChild(ko.cleanNode(nodesArray[i])); - } - return container; - }, - - cloneNodes: function (nodesArray, shouldCleanNodes) { - for (var i = 0, j = nodesArray.length, newNodesArray = []; i < j; i++) { - var clonedNode = nodesArray[i].cloneNode(true); - newNodesArray.push(shouldCleanNodes ? ko.cleanNode(clonedNode) : clonedNode); - } - return newNodesArray; - }, - - setDomNodeChildren: function (domNode, childNodes) { - ko.utils.emptyDomNode(domNode); - if (childNodes) { - for (var i = 0, j = childNodes.length; i < j; i++) - domNode.appendChild(childNodes[i]); - } - }, - - replaceDomNodes: function (nodeToReplaceOrNodeArray, newNodesArray) { - var nodesToReplaceArray = nodeToReplaceOrNodeArray.nodeType ? [nodeToReplaceOrNodeArray] : nodeToReplaceOrNodeArray; - if (nodesToReplaceArray.length > 0) { - var insertionPoint = nodesToReplaceArray[0]; - var parent = insertionPoint.parentNode; - for (var i = 0, j = newNodesArray.length; i < j; i++) - parent.insertBefore(newNodesArray[i], insertionPoint); - for (var i = 0, j = nodesToReplaceArray.length; i < j; i++) { - ko.removeNode(nodesToReplaceArray[i]); - } - } - }, - - fixUpContinuousNodeArray: function(continuousNodeArray, parentNode) { - // Before acting on a set of nodes that were previously outputted by a template function, we have to reconcile - // them against what is in the DOM right now. It may be that some of the nodes have already been removed, or that - // new nodes might have been inserted in the middle, for example by a binding. Also, there may previously have been - // leading comment nodes (created by rewritten string-based templates) that have since been removed during binding. - // So, this function translates the old "map" output array into its best guess of the set of current DOM nodes. - // - // Rules: - // [A] Any leading nodes that have been removed should be ignored - // These most likely correspond to memoization nodes that were already removed during binding - // See https://github.com/knockout/knockout/pull/440 - // [B] Any trailing nodes that have been remove should be ignored - // This prevents the code here from adding unrelated nodes to the array while processing rule [C] - // See https://github.com/knockout/knockout/pull/1903 - // [C] We want to output a continuous series of nodes. So, ignore any nodes that have already been removed, - // and include any nodes that have been inserted among the previous collection - - if (continuousNodeArray.length) { - // The parent node can be a virtual element; so get the real parent node - parentNode = (parentNode.nodeType === 8 && parentNode.parentNode) || parentNode; - - // Rule [A] - while (continuousNodeArray.length && continuousNodeArray[0].parentNode !== parentNode) - continuousNodeArray.splice(0, 1); - - // Rule [B] - while (continuousNodeArray.length > 1 && continuousNodeArray[continuousNodeArray.length - 1].parentNode !== parentNode) - continuousNodeArray.length--; - - // Rule [C] - if (continuousNodeArray.length > 1) { - var current = continuousNodeArray[0], last = continuousNodeArray[continuousNodeArray.length - 1]; - // Replace with the actual new continuous node set - continuousNodeArray.length = 0; - while (current !== last) { - continuousNodeArray.push(current); - current = current.nextSibling; - } - continuousNodeArray.push(last); - } - } - return continuousNodeArray; - }, - - setOptionNodeSelectionState: function (optionNode, isSelected) { - // IE6 sometimes throws "unknown error" if you try to write to .selected directly, whereas Firefox struggles with setAttribute. Pick one based on browser. - if (ieVersion < 7) - optionNode.setAttribute("selected", isSelected); - else - optionNode.selected = isSelected; - }, - - stringTrim: function (string) { - return string === null || string === undefined ? '' : - string.trim ? - string.trim() : - string.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g, ''); - }, - - stringStartsWith: function (string, startsWith) { - string = string || ""; - if (startsWith.length > string.length) - return false; - return string.substring(0, startsWith.length) === startsWith; - }, - - domNodeIsContainedBy: function (node, containedByNode) { - if (node === containedByNode) - return true; - if (node.nodeType === 11) - return false; // Fixes issue #1162 - can't use node.contains for document fragments on IE8 - if (containedByNode.contains) - return containedByNode.contains(node.nodeType === 3 ? node.parentNode : node); - if (containedByNode.compareDocumentPosition) - return (containedByNode.compareDocumentPosition(node) & 16) == 16; - while (node && node != containedByNode) { - node = node.parentNode; - } - return !!node; - }, - - domNodeIsAttachedToDocument: function (node) { - return ko.utils.domNodeIsContainedBy(node, node.ownerDocument.documentElement); - }, - - anyDomNodeIsAttachedToDocument: function(nodes) { - return !!ko.utils.arrayFirst(nodes, ko.utils.domNodeIsAttachedToDocument); - }, - - tagNameLower: function(element) { - // For HTML elements, tagName will always be upper case; for XHTML elements, it'll be lower case. - // Possible future optimization: If we know it's an element from an XHTML document (not HTML), - // we don't need to do the .toLowerCase() as it will always be lower case anyway. - return element && element.tagName && element.tagName.toLowerCase(); - }, - - catchFunctionErrors: function (delegate) { - return ko['onError'] ? function () { - try { - return delegate.apply(this, arguments); - } catch (e) { - ko['onError'] && ko['onError'](e); - throw e; - } - } : delegate; - }, - - setTimeout: function (handler, timeout) { - return setTimeout(ko.utils.catchFunctionErrors(handler), timeout); - }, - - deferError: function (error) { - setTimeout(function () { - ko['onError'] && ko['onError'](error); - throw error; - }, 0); - }, - - registerEventHandler: function (element, eventType, handler) { - var wrappedHandler = ko.utils.catchFunctionErrors(handler); - - var mustUseAttachEvent = ieVersion && eventsThatMustBeRegisteredUsingAttachEvent[eventType]; - if (!ko.options['useOnlyNativeEvents'] && !mustUseAttachEvent && jQueryInstance) { - jQueryInstance(element)['bind'](eventType, wrappedHandler); - } else if (!mustUseAttachEvent && typeof element.addEventListener == "function") - element.addEventListener(eventType, wrappedHandler, false); - else if (typeof element.attachEvent != "undefined") { - var attachEventHandler = function (event) { wrappedHandler.call(element, event); }, - attachEventName = "on" + eventType; - element.attachEvent(attachEventName, attachEventHandler); - - // IE does not dispose attachEvent handlers automatically (unlike with addEventListener) - // so to avoid leaks, we have to remove them manually. See bug #856 - ko.utils.domNodeDisposal.addDisposeCallback(element, function() { - element.detachEvent(attachEventName, attachEventHandler); - }); - } else - throw new Error("Browser doesn't support addEventListener or attachEvent"); - }, - - triggerEvent: function (element, eventType) { - if (!(element && element.nodeType)) - throw new Error("element must be a DOM node when calling triggerEvent"); - - // For click events on checkboxes and radio buttons, jQuery toggles the element checked state *after* the - // event handler runs instead of *before*. (This was fixed in 1.9 for checkboxes but not for radio buttons.) - // IE doesn't change the checked state when you trigger the click event using "fireEvent". - // In both cases, we'll use the click method instead. - var useClickWorkaround = isClickOnCheckableElement(element, eventType); - - if (!ko.options['useOnlyNativeEvents'] && jQueryInstance && !useClickWorkaround) { - jQueryInstance(element)['trigger'](eventType); - } else if (typeof document.createEvent == "function") { - if (typeof element.dispatchEvent == "function") { - var eventCategory = knownEventTypesByEventName[eventType] || "HTMLEvents"; - var event = document.createEvent(eventCategory); - event.initEvent(eventType, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, element); - element.dispatchEvent(event); - } - else - throw new Error("The supplied element doesn't support dispatchEvent"); - } else if (useClickWorkaround && element.click) { - element.click(); - } else if (typeof element.fireEvent != "undefined") { - element.fireEvent("on" + eventType); - } else { - throw new Error("Browser doesn't support triggering events"); - } - }, - - unwrapObservable: function (value) { - return ko.isObservable(value) ? value() : value; - }, - - peekObservable: function (value) { - return ko.isObservable(value) ? value.peek() : value; - }, - - toggleDomNodeCssClass: toggleDomNodeCssClass, - - setTextContent: function(element, textContent) { - var value = ko.utils.unwrapObservable(textContent); - if ((value === null) || (value === undefined)) - value = ""; - - // We need there to be exactly one child: a text node. - // If there are no children, more than one, or if it's not a text node, - // we'll clear everything and create a single text node. - var innerTextNode = ko.virtualElements.firstChild(element); - if (!innerTextNode || innerTextNode.nodeType != 3 || ko.virtualElements.nextSibling(innerTextNode)) { - ko.virtualElements.setDomNodeChildren(element, [element.ownerDocument.createTextNode(value)]); - } else { - innerTextNode.data = value; - } - - ko.utils.forceRefresh(element); - }, - - setElementName: function(element, name) { - element.name = name; - - // Workaround IE 6/7 issue - // - https://github.com/SteveSanderson/knockout/issues/197 - // - http://www.matts411.com/post/setting_the_name_attribute_in_ie_dom/ - if (ieVersion <= 7) { - try { - element.mergeAttributes(document.createElement(""), false); - } - catch(e) {} // For IE9 with doc mode "IE9 Standards" and browser mode "IE9 Compatibility View" - } - }, - - forceRefresh: function(node) { - // Workaround for an IE9 rendering bug - https://github.com/SteveSanderson/knockout/issues/209 - if (ieVersion >= 9) { - // For text nodes and comment nodes (most likely virtual elements), we will have to refresh the container - var elem = node.nodeType == 1 ? node : node.parentNode; - if (elem.style) - elem.style.zoom = elem.style.zoom; - } - }, - - ensureSelectElementIsRenderedCorrectly: function(selectElement) { - // Workaround for IE9 rendering bug - it doesn't reliably display all the text in dynamically-added select boxes unless you force it to re-render by updating the width. - // (See https://github.com/SteveSanderson/knockout/issues/312, http://stackoverflow.com/questions/5908494/select-only-shows-first-char-of-selected-option) - // Also fixes IE7 and IE8 bug that causes selects to be zero width if enclosed by 'if' or 'with'. (See issue #839) - if (ieVersion) { - var originalWidth = selectElement.style.width; - selectElement.style.width = 0; - selectElement.style.width = originalWidth; - } - }, - - range: function (min, max) { - min = ko.utils.unwrapObservable(min); - max = ko.utils.unwrapObservable(max); - var result = []; - for (var i = min; i <= max; i++) - result.push(i); - return result; - }, - - makeArray: function(arrayLikeObject) { - var result = []; - for (var i = 0, j = arrayLikeObject.length; i < j; i++) { - result.push(arrayLikeObject[i]); - }; - return result; - }, - - createSymbolOrString: function(identifier) { - return canUseSymbols ? Symbol(identifier) : identifier; - }, - - isIe6 : isIe6, - isIe7 : isIe7, - ieVersion : ieVersion, - - getFormFields: function(form, fieldName) { - var fields = ko.utils.makeArray(form.getElementsByTagName("input")).concat(ko.utils.makeArray(form.getElementsByTagName("textarea"))); - var isMatchingField = (typeof fieldName == 'string') - ? function(field) { return field.name === fieldName } - : function(field) { return fieldName.test(field.name) }; // Treat fieldName as regex or object containing predicate - var matches = []; - for (var i = fields.length - 1; i >= 0; i--) { - if (isMatchingField(fields[i])) - matches.push(fields[i]); - }; - return matches; - }, - - parseJson: function (jsonString) { - if (typeof jsonString == "string") { - jsonString = ko.utils.stringTrim(jsonString); - if (jsonString) { - if (JSON && JSON.parse) // Use native parsing where available - return JSON.parse(jsonString); - return (new Function("return " + jsonString))(); // Fallback on less safe parsing for older browsers - } - } - return null; - }, - - stringifyJson: function (data, replacer, space) { // replacer and space are optional - if (!JSON || !JSON.stringify) - throw new Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"); - return JSON.stringify(ko.utils.unwrapObservable(data), replacer, space); - }, - - postJson: function (urlOrForm, data, options) { - options = options || {}; - var params = options['params'] || {}; - var includeFields = options['includeFields'] || this.fieldsIncludedWithJsonPost; - var url = urlOrForm; - - // If we were given a form, use its 'action' URL and pick out any requested field values - if((typeof urlOrForm == 'object') && (ko.utils.tagNameLower(urlOrForm) === "form")) { - var originalForm = urlOrForm; - url = originalForm.action; - for (var i = includeFields.length - 1; i >= 0; i--) { - var fields = ko.utils.getFormFields(originalForm, includeFields[i]); - for (var j = fields.length - 1; j >= 0; j--) - params[fields[j].name] = fields[j].value; - } - } - - data = ko.utils.unwrapObservable(data); - var form = document.createElement("form"); - form.style.display = "none"; - form.action = url; - form.method = "post"; - for (var key in data) { - // Since 'data' this is a model object, we include all properties including those inherited from its prototype - var input = document.createElement("input"); - input.type = "hidden"; - input.name = key; - input.value = ko.utils.stringifyJson(ko.utils.unwrapObservable(data[key])); - form.appendChild(input); - } - objectForEach(params, function(key, value) { - var input = document.createElement("input"); - input.type = "hidden"; - input.name = key; - input.value = value; - form.appendChild(input); - }); - document.body.appendChild(form); - options['submitter'] ? options['submitter'](form) : form.submit(); - setTimeout(function () { form.parentNode.removeChild(form); }, 0); - } - } -}()); - -ko.exportSymbol('utils', ko.utils); -ko.exportSymbol('utils.arrayForEach', ko.utils.arrayForEach); -ko.exportSymbol('utils.arrayFirst', ko.utils.arrayFirst); -ko.exportSymbol('utils.arrayFilter', ko.utils.arrayFilter); -ko.exportSymbol('utils.arrayGetDistinctValues', ko.utils.arrayGetDistinctValues); -ko.exportSymbol('utils.arrayIndexOf', ko.utils.arrayIndexOf); -ko.exportSymbol('utils.arrayMap', ko.utils.arrayMap); -ko.exportSymbol('utils.arrayPushAll', ko.utils.arrayPushAll); -ko.exportSymbol('utils.arrayRemoveItem', ko.utils.arrayRemoveItem); -ko.exportSymbol('utils.extend', ko.utils.extend); -ko.exportSymbol('utils.fieldsIncludedWithJsonPost', ko.utils.fieldsIncludedWithJsonPost); -ko.exportSymbol('utils.getFormFields', ko.utils.getFormFields); -ko.exportSymbol('utils.peekObservable', ko.utils.peekObservable); -ko.exportSymbol('utils.postJson', ko.utils.postJson); -ko.exportSymbol('utils.parseJson', ko.utils.parseJson); -ko.exportSymbol('utils.registerEventHandler', ko.utils.registerEventHandler); -ko.exportSymbol('utils.stringifyJson', ko.utils.stringifyJson); -ko.exportSymbol('utils.range', ko.utils.range); -ko.exportSymbol('utils.toggleDomNodeCssClass', ko.utils.toggleDomNodeCssClass); -ko.exportSymbol('utils.triggerEvent', ko.utils.triggerEvent); -ko.exportSymbol('utils.unwrapObservable', ko.utils.unwrapObservable); -ko.exportSymbol('utils.objectForEach', ko.utils.objectForEach); -ko.exportSymbol('utils.addOrRemoveItem', ko.utils.addOrRemoveItem); -ko.exportSymbol('utils.setTextContent', ko.utils.setTextContent); -ko.exportSymbol('unwrap', ko.utils.unwrapObservable); // Convenient shorthand, because this is used so commonly - -if (!Function.prototype['bind']) { - // Function.prototype.bind is a standard part of ECMAScript 5th Edition (December 2009, http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf) - // In case the browser doesn't implement it natively, provide a JavaScript implementation. This implementation is based on the one in prototype.js - Function.prototype['bind'] = function (object) { - var originalFunction = this; - if (arguments.length === 1) { - return function () { - return originalFunction.apply(object, arguments); - }; - } else { - var partialArgs = Array.prototype.slice.call(arguments, 1); - return function () { - var args = partialArgs.slice(0); - args.push.apply(args, arguments); - return originalFunction.apply(object, args); - }; - } - }; -} - -ko.utils.domData = new (function () { - var uniqueId = 0; - var dataStoreKeyExpandoPropertyName = "__ko__" + (new Date).getTime(); - var dataStore = {}; - - function getAll(node, createIfNotFound) { - var dataStoreKey = node[dataStoreKeyExpandoPropertyName]; - var hasExistingDataStore = dataStoreKey && (dataStoreKey !== "null") && dataStore[dataStoreKey]; - if (!hasExistingDataStore) { - if (!createIfNotFound) - return undefined; - dataStoreKey = node[dataStoreKeyExpandoPropertyName] = "ko" + uniqueId++; - dataStore[dataStoreKey] = {}; - } - return dataStore[dataStoreKey]; - } - - return { - get: function (node, key) { - var allDataForNode = getAll(node, false); - return allDataForNode === undefined ? undefined : allDataForNode[key]; - }, - set: function (node, key, value) { - if (value === undefined) { - // Make sure we don't actually create a new domData key if we are actually deleting a value - if (getAll(node, false) === undefined) - return; - } - var allDataForNode = getAll(node, true); - allDataForNode[key] = value; - }, - clear: function (node) { - var dataStoreKey = node[dataStoreKeyExpandoPropertyName]; - if (dataStoreKey) { - delete dataStore[dataStoreKey]; - node[dataStoreKeyExpandoPropertyName] = null; - return true; // Exposing "did clean" flag purely so specs can infer whether things have been cleaned up as intended - } - return false; - }, - - nextKey: function () { - return (uniqueId++) + dataStoreKeyExpandoPropertyName; - } - }; -})(); - -ko.exportSymbol('utils.domData', ko.utils.domData); -ko.exportSymbol('utils.domData.clear', ko.utils.domData.clear); // Exporting only so specs can clear up after themselves fully - -ko.utils.domNodeDisposal = new (function () { - var domDataKey = ko.utils.domData.nextKey(); - var cleanableNodeTypes = { 1: true, 8: true, 9: true }; // Element, Comment, Document - var cleanableNodeTypesWithDescendants = { 1: true, 9: true }; // Element, Document - - function getDisposeCallbacksCollection(node, createIfNotFound) { - var allDisposeCallbacks = ko.utils.domData.get(node, domDataKey); - if ((allDisposeCallbacks === undefined) && createIfNotFound) { - allDisposeCallbacks = []; - ko.utils.domData.set(node, domDataKey, allDisposeCallbacks); - } - return allDisposeCallbacks; - } - function destroyCallbacksCollection(node) { - ko.utils.domData.set(node, domDataKey, undefined); - } - - function cleanSingleNode(node) { - // Run all the dispose callbacks - var callbacks = getDisposeCallbacksCollection(node, false); - if (callbacks) { - callbacks = callbacks.slice(0); // Clone, as the array may be modified during iteration (typically, callbacks will remove themselves) - for (var i = 0; i < callbacks.length; i++) - callbacks[i](node); - } - - // Erase the DOM data - ko.utils.domData.clear(node); - - // Perform cleanup needed by external libraries (currently only jQuery, but can be extended) - ko.utils.domNodeDisposal["cleanExternalData"](node); - - // Clear any immediate-child comment nodes, as these wouldn't have been found by - // node.getElementsByTagName("*") in cleanNode() (comment nodes aren't elements) - if (cleanableNodeTypesWithDescendants[node.nodeType]) - cleanImmediateCommentTypeChildren(node); - } - - function cleanImmediateCommentTypeChildren(nodeWithChildren) { - var child, nextChild = nodeWithChildren.firstChild; - while (child = nextChild) { - nextChild = child.nextSibling; - if (child.nodeType === 8) - cleanSingleNode(child); - } - } - - return { - addDisposeCallback : function(node, callback) { - if (typeof callback != "function") - throw new Error("Callback must be a function"); - getDisposeCallbacksCollection(node, true).push(callback); - }, - - removeDisposeCallback : function(node, callback) { - var callbacksCollection = getDisposeCallbacksCollection(node, false); - if (callbacksCollection) { - ko.utils.arrayRemoveItem(callbacksCollection, callback); - if (callbacksCollection.length == 0) - destroyCallbacksCollection(node); - } - }, - - cleanNode : function(node) { - // First clean this node, where applicable - if (cleanableNodeTypes[node.nodeType]) { - cleanSingleNode(node); - - // ... then its descendants, where applicable - if (cleanableNodeTypesWithDescendants[node.nodeType]) { - // Clone the descendants list in case it changes during iteration - var descendants = []; - ko.utils.arrayPushAll(descendants, node.getElementsByTagName("*")); - for (var i = 0, j = descendants.length; i < j; i++) - cleanSingleNode(descendants[i]); - } - } - return node; - }, - - removeNode : function(node) { - ko.cleanNode(node); - if (node.parentNode) - node.parentNode.removeChild(node); - }, - - "cleanExternalData" : function (node) { - // Special support for jQuery here because it's so commonly used. - // Many jQuery plugins (including jquery.tmpl) store data using jQuery's equivalent of domData - // so notify it to tear down any resources associated with the node & descendants here. - if (jQueryInstance && (typeof jQueryInstance['cleanData'] == "function")) - jQueryInstance['cleanData']([node]); - } - }; -})(); -ko.cleanNode = ko.utils.domNodeDisposal.cleanNode; // Shorthand name for convenience -ko.removeNode = ko.utils.domNodeDisposal.removeNode; // Shorthand name for convenience -ko.exportSymbol('cleanNode', ko.cleanNode); -ko.exportSymbol('removeNode', ko.removeNode); -ko.exportSymbol('utils.domNodeDisposal', ko.utils.domNodeDisposal); -ko.exportSymbol('utils.domNodeDisposal.addDisposeCallback', ko.utils.domNodeDisposal.addDisposeCallback); -ko.exportSymbol('utils.domNodeDisposal.removeDisposeCallback', ko.utils.domNodeDisposal.removeDisposeCallback); -(function () { - var none = [0, "", ""], - table = [1, "", "
"], - tbody = [2, "", "
"], - tr = [3, "", "
"], - select = [1, ""], - lookup = { - 'thead': table, - 'tbody': table, - 'tfoot': table, - 'tr': tbody, - 'td': tr, - 'th': tr, - 'option': select, - 'optgroup': select - }, - - // This is needed for old IE if you're *not* using either jQuery or innerShiv. Doesn't affect other cases. - mayRequireCreateElementHack = ko.utils.ieVersion <= 8; - - function getWrap(tags) { - var m = tags.match(/^<([a-z]+)[ >]/); - return (m && lookup[m[1]]) || none; - } - - function simpleHtmlParse(html, documentContext) { - documentContext || (documentContext = document); - var windowContext = documentContext['parentWindow'] || documentContext['defaultView'] || window; - - // Based on jQuery's "clean" function, but only accounting for table-related elements. - // If you have referenced jQuery, this won't be used anyway - KO will use jQuery's "clean" function directly - - // Note that there's still an issue in IE < 9 whereby it will discard comment nodes that are the first child of - // a descendant node. For example: "
abc
" will get parsed as "
abc
" - // This won't affect anyone who has referenced jQuery, and there's always the workaround of inserting a dummy node - // (possibly a text node) in front of the comment. So, KO does not attempt to workaround this IE issue automatically at present. - - // Trim whitespace, otherwise indexOf won't work as expected - var tags = ko.utils.stringTrim(html).toLowerCase(), div = documentContext.createElement("div"), - wrap = getWrap(tags), - depth = wrap[0]; - - // Go to html and back, then peel off extra wrappers - // Note that we always prefix with some dummy text, because otherwise, IE<9 will strip out leading comment nodes in descendants. Total madness. - var markup = "ignored
" + wrap[1] + html + wrap[2] + "
"; - if (typeof windowContext['innerShiv'] == "function") { - // Note that innerShiv is deprecated in favour of html5shiv. We should consider adding - // support for html5shiv (except if no explicit support is needed, e.g., if html5shiv - // somehow shims the native APIs so it just works anyway) - div.appendChild(windowContext['innerShiv'](markup)); - } else { - if (mayRequireCreateElementHack) { - // The document.createElement('my-element') trick to enable custom elements in IE6-8 - // only works if we assign innerHTML on an element associated with that document. - documentContext.appendChild(div); - } - - div.innerHTML = markup; - - if (mayRequireCreateElementHack) { - div.parentNode.removeChild(div); - } - } - - // Move to the right depth - while (depth--) - div = div.lastChild; - - return ko.utils.makeArray(div.lastChild.childNodes); - } - - function jQueryHtmlParse(html, documentContext) { - // jQuery's "parseHTML" function was introduced in jQuery 1.8.0 and is a documented public API. - if (jQueryInstance['parseHTML']) { - return jQueryInstance['parseHTML'](html, documentContext) || []; // Ensure we always return an array and never null - } else { - // For jQuery < 1.8.0, we fall back on the undocumented internal "clean" function. - var elems = jQueryInstance['clean']([html], documentContext); - - // As of jQuery 1.7.1, jQuery parses the HTML by appending it to some dummy parent nodes held in an in-memory document fragment. - // Unfortunately, it never clears the dummy parent nodes from the document fragment, so it leaks memory over time. - // Fix this by finding the top-most dummy parent element, and detaching it from its owner fragment. - if (elems && elems[0]) { - // Find the top-most parent element that's a direct child of a document fragment - var elem = elems[0]; - while (elem.parentNode && elem.parentNode.nodeType !== 11 /* i.e., DocumentFragment */) - elem = elem.parentNode; - // ... then detach it - if (elem.parentNode) - elem.parentNode.removeChild(elem); - } - - return elems; - } - } - - ko.utils.parseHtmlFragment = function(html, documentContext) { - return jQueryInstance ? - jQueryHtmlParse(html, documentContext) : // As below, benefit from jQuery's optimisations where possible - simpleHtmlParse(html, documentContext); // ... otherwise, this simple logic will do in most common cases. - }; - - ko.utils.setHtml = function(node, html) { - ko.utils.emptyDomNode(node); - - // There's no legitimate reason to display a stringified observable without unwrapping it, so we'll unwrap it - html = ko.utils.unwrapObservable(html); - - if ((html !== null) && (html !== undefined)) { - if (typeof html != 'string') - html = html.toString(); - - // jQuery contains a lot of sophisticated code to parse arbitrary HTML fragments, - // for example elements which are not normally allowed to exist on their own. - // If you've referenced jQuery we'll use that rather than duplicating its code. - if (jQueryInstance) { - jQueryInstance(node)['html'](html); - } else { - // ... otherwise, use KO's own parsing logic. - var parsedNodes = ko.utils.parseHtmlFragment(html, node.ownerDocument); - for (var i = 0; i < parsedNodes.length; i++) - node.appendChild(parsedNodes[i]); - } - } - }; -})(); - -ko.exportSymbol('utils.parseHtmlFragment', ko.utils.parseHtmlFragment); -ko.exportSymbol('utils.setHtml', ko.utils.setHtml); - -ko.memoization = (function () { - var memos = {}; - - function randomMax8HexChars() { - return (((1 + Math.random()) * 0x100000000) | 0).toString(16).substring(1); - } - function generateRandomId() { - return randomMax8HexChars() + randomMax8HexChars(); - } - function findMemoNodes(rootNode, appendToArray) { - if (!rootNode) - return; - if (rootNode.nodeType == 8) { - var memoId = ko.memoization.parseMemoText(rootNode.nodeValue); - if (memoId != null) - appendToArray.push({ domNode: rootNode, memoId: memoId }); - } else if (rootNode.nodeType == 1) { - for (var i = 0, childNodes = rootNode.childNodes, j = childNodes.length; i < j; i++) - findMemoNodes(childNodes[i], appendToArray); - } - } - - return { - memoize: function (callback) { - if (typeof callback != "function") - throw new Error("You can only pass a function to ko.memoization.memoize()"); - var memoId = generateRandomId(); - memos[memoId] = callback; - return ""; - }, - - unmemoize: function (memoId, callbackParams) { - var callback = memos[memoId]; - if (callback === undefined) - throw new Error("Couldn't find any memo with ID " + memoId + ". Perhaps it's already been unmemoized."); - try { - callback.apply(null, callbackParams || []); - return true; - } - finally { delete memos[memoId]; } - }, - - unmemoizeDomNodeAndDescendants: function (domNode, extraCallbackParamsArray) { - var memos = []; - findMemoNodes(domNode, memos); - for (var i = 0, j = memos.length; i < j; i++) { - var node = memos[i].domNode; - var combinedParams = [node]; - if (extraCallbackParamsArray) - ko.utils.arrayPushAll(combinedParams, extraCallbackParamsArray); - ko.memoization.unmemoize(memos[i].memoId, combinedParams); - node.nodeValue = ""; // Neuter this node so we don't try to unmemoize it again - if (node.parentNode) - node.parentNode.removeChild(node); // If possible, erase it totally (not always possible - someone else might just hold a reference to it then call unmemoizeDomNodeAndDescendants again) - } - }, - - parseMemoText: function (memoText) { - var match = memoText.match(/^\[ko_memo\:(.*?)\]$/); - return match ? match[1] : null; - } - }; -})(); - -ko.exportSymbol('memoization', ko.memoization); -ko.exportSymbol('memoization.memoize', ko.memoization.memoize); -ko.exportSymbol('memoization.unmemoize', ko.memoization.unmemoize); -ko.exportSymbol('memoization.parseMemoText', ko.memoization.parseMemoText); -ko.exportSymbol('memoization.unmemoizeDomNodeAndDescendants', ko.memoization.unmemoizeDomNodeAndDescendants); -ko.tasks = (function () { - var scheduler, - taskQueue = [], - taskQueueLength = 0, - nextHandle = 1, - nextIndexToProcess = 0; - - if (window['MutationObserver']) { - // Chrome 27+, Firefox 14+, IE 11+, Opera 15+, Safari 6.1+ - // From https://github.com/petkaantonov/bluebird * Copyright (c) 2014 Petka Antonov * License: MIT - scheduler = (function (callback) { - var div = document.createElement("div"); - new MutationObserver(callback).observe(div, {attributes: true}); - return function () { div.classList.toggle("foo"); }; - })(scheduledProcess); - } else if (document && "onreadystatechange" in document.createElement("script")) { - // IE 6-10 - // From https://github.com/YuzuJS/setImmediate * Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola * License: MIT - scheduler = function (callback) { - var script = document.createElement("script"); - script.onreadystatechange = function () { - script.onreadystatechange = null; - document.documentElement.removeChild(script); - script = null; - callback(); - }; - document.documentElement.appendChild(script); - }; - } else { - scheduler = function (callback) { - setTimeout(callback, 0); - }; - } - - function processTasks() { - if (taskQueueLength) { - // Each mark represents the end of a logical group of tasks and the number of these groups is - // limited to prevent unchecked recursion. - var mark = taskQueueLength, countMarks = 0; - - // nextIndexToProcess keeps track of where we are in the queue; processTasks can be called recursively without issue - for (var task; nextIndexToProcess < taskQueueLength; ) { - if (task = taskQueue[nextIndexToProcess++]) { - if (nextIndexToProcess > mark) { - if (++countMarks >= 5000) { - nextIndexToProcess = taskQueueLength; // skip all tasks remaining in the queue since any of them could be causing the recursion - ko.utils.deferError(Error("'Too much recursion' after processing " + countMarks + " task groups.")); - break; - } - mark = taskQueueLength; - } - try { - task(); - } catch (ex) { - ko.utils.deferError(ex); - } - } - } - } - } - - function scheduledProcess() { - processTasks(); - - // Reset the queue - nextIndexToProcess = taskQueueLength = taskQueue.length = 0; - } - - function scheduleTaskProcessing() { - ko.tasks['scheduler'](scheduledProcess); - } - - var tasks = { - 'scheduler': scheduler, // Allow overriding the scheduler - - schedule: function (func) { - if (!taskQueueLength) { - scheduleTaskProcessing(); - } - - taskQueue[taskQueueLength++] = func; - return nextHandle++; - }, - - cancel: function (handle) { - var index = handle - (nextHandle - taskQueueLength); - if (index >= nextIndexToProcess && index < taskQueueLength) { - taskQueue[index] = null; - } - }, - - // For testing only: reset the queue and return the previous queue length - 'resetForTesting': function () { - var length = taskQueueLength - nextIndexToProcess; - nextIndexToProcess = taskQueueLength = taskQueue.length = 0; - return length; - }, - - runEarly: processTasks - }; - - return tasks; -})(); - -ko.exportSymbol('tasks', ko.tasks); -ko.exportSymbol('tasks.schedule', ko.tasks.schedule); -//ko.exportSymbol('tasks.cancel', ko.tasks.cancel); "cancel" isn't minified -ko.exportSymbol('tasks.runEarly', ko.tasks.runEarly); -ko.extenders = { - 'throttle': function(target, timeout) { - // Throttling means two things: - - // (1) For dependent observables, we throttle *evaluations* so that, no matter how fast its dependencies - // notify updates, the target doesn't re-evaluate (and hence doesn't notify) faster than a certain rate - target['throttleEvaluation'] = timeout; - - // (2) For writable targets (observables, or writable dependent observables), we throttle *writes* - // so the target cannot change value synchronously or faster than a certain rate - var writeTimeoutInstance = null; - return ko.dependentObservable({ - 'read': target, - 'write': function(value) { - clearTimeout(writeTimeoutInstance); - writeTimeoutInstance = ko.utils.setTimeout(function() { - target(value); - }, timeout); - } - }); - }, - - 'rateLimit': function(target, options) { - var timeout, method, limitFunction; - - if (typeof options == 'number') { - timeout = options; - } else { - timeout = options['timeout']; - method = options['method']; - } - - // rateLimit supersedes deferred updates - target._deferUpdates = false; - - limitFunction = method == 'notifyWhenChangesStop' ? debounce : throttle; - target.limit(function(callback) { - return limitFunction(callback, timeout); - }); - }, - - 'deferred': function(target, options) { - if (options !== true) { - throw new Error('The \'deferred\' extender only accepts the value \'true\', because it is not supported to turn deferral off once enabled.') - } - - if (!target._deferUpdates) { - target._deferUpdates = true; - target.limit(function (callback) { - var handle; - return function () { - ko.tasks.cancel(handle); - handle = ko.tasks.schedule(callback); - target['notifySubscribers'](undefined, 'dirty'); - }; - }); - } - }, - - 'notify': function(target, notifyWhen) { - target["equalityComparer"] = notifyWhen == "always" ? - null : // null equalityComparer means to always notify - valuesArePrimitiveAndEqual; - } -}; - -var primitiveTypes = { 'undefined':1, 'boolean':1, 'number':1, 'string':1 }; -function valuesArePrimitiveAndEqual(a, b) { - var oldValueIsPrimitive = (a === null) || (typeof(a) in primitiveTypes); - return oldValueIsPrimitive ? (a === b) : false; -} - -function throttle(callback, timeout) { - var timeoutInstance; - return function () { - if (!timeoutInstance) { - timeoutInstance = ko.utils.setTimeout(function () { - timeoutInstance = undefined; - callback(); - }, timeout); - } - }; -} - -function debounce(callback, timeout) { - var timeoutInstance; - return function () { - clearTimeout(timeoutInstance); - timeoutInstance = ko.utils.setTimeout(callback, timeout); - }; -} - -function applyExtenders(requestedExtenders) { - var target = this; - if (requestedExtenders) { - ko.utils.objectForEach(requestedExtenders, function(key, value) { - var extenderHandler = ko.extenders[key]; - if (typeof extenderHandler == 'function') { - target = extenderHandler(target, value) || target; - } - }); - } - return target; -} - -ko.exportSymbol('extenders', ko.extenders); - -ko.subscription = function (target, callback, disposeCallback) { - this._target = target; - this.callback = callback; - this.disposeCallback = disposeCallback; - this.isDisposed = false; - ko.exportProperty(this, 'dispose', this.dispose); -}; -ko.subscription.prototype.dispose = function () { - this.isDisposed = true; - this.disposeCallback(); -}; - -ko.subscribable = function () { - ko.utils.setPrototypeOfOrExtend(this, ko_subscribable_fn); - ko_subscribable_fn.init(this); -} - -var defaultEvent = "change"; - -// Moved out of "limit" to avoid the extra closure -function limitNotifySubscribers(value, event) { - if (!event || event === defaultEvent) { - this._limitChange(value); - } else if (event === 'beforeChange') { - this._limitBeforeChange(value); - } else { - this._origNotifySubscribers(value, event); - } -} - -var ko_subscribable_fn = { - init: function(instance) { - instance._subscriptions = {}; - instance._versionNumber = 1; - }, - - subscribe: function (callback, callbackTarget, event) { - var self = this; - - event = event || defaultEvent; - var boundCallback = callbackTarget ? callback.bind(callbackTarget) : callback; - - var subscription = new ko.subscription(self, boundCallback, function () { - ko.utils.arrayRemoveItem(self._subscriptions[event], subscription); - if (self.afterSubscriptionRemove) - self.afterSubscriptionRemove(event); - }); - - if (self.beforeSubscriptionAdd) - self.beforeSubscriptionAdd(event); - - if (!self._subscriptions[event]) - self._subscriptions[event] = []; - self._subscriptions[event].push(subscription); - - return subscription; - }, - - "notifySubscribers": function (valueToNotify, event) { - event = event || defaultEvent; - if (event === defaultEvent) { - this.updateVersion(); - } - if (this.hasSubscriptionsForEvent(event)) { - try { - ko.dependencyDetection.begin(); // Begin suppressing dependency detection (by setting the top frame to undefined) - for (var a = this._subscriptions[event].slice(0), i = 0, subscription; subscription = a[i]; ++i) { - // In case a subscription was disposed during the arrayForEach cycle, check - // for isDisposed on each subscription before invoking its callback - if (!subscription.isDisposed) - subscription.callback(valueToNotify); - } - } finally { - ko.dependencyDetection.end(); // End suppressing dependency detection - } - } - }, - - getVersion: function () { - return this._versionNumber; - }, - - hasChanged: function (versionToCheck) { - return this.getVersion() !== versionToCheck; - }, - - updateVersion: function () { - ++this._versionNumber; - }, - - limit: function(limitFunction) { - var self = this, selfIsObservable = ko.isObservable(self), - ignoreBeforeChange, previousValue, pendingValue, beforeChange = 'beforeChange'; - - if (!self._origNotifySubscribers) { - self._origNotifySubscribers = self["notifySubscribers"]; - self["notifySubscribers"] = limitNotifySubscribers; - } - - var finish = limitFunction(function() { - self._notificationIsPending = false; - - // If an observable provided a reference to itself, access it to get the latest value. - // This allows computed observables to delay calculating their value until needed. - if (selfIsObservable && pendingValue === self) { - pendingValue = self(); - } - ignoreBeforeChange = false; - if (self.isDifferent(previousValue, pendingValue)) { - self._origNotifySubscribers(previousValue = pendingValue); - } - }); - - self._limitChange = function(value) { - self._notificationIsPending = ignoreBeforeChange = true; - pendingValue = value; - finish(); - }; - self._limitBeforeChange = function(value) { - if (!ignoreBeforeChange) { - previousValue = value; - self._origNotifySubscribers(value, beforeChange); - } - }; - }, - - hasSubscriptionsForEvent: function(event) { - return this._subscriptions[event] && this._subscriptions[event].length; - }, - - getSubscriptionsCount: function (event) { - if (event) { - return this._subscriptions[event] && this._subscriptions[event].length || 0; - } else { - var total = 0; - ko.utils.objectForEach(this._subscriptions, function(eventName, subscriptions) { - if (eventName !== 'dirty') - total += subscriptions.length; - }); - return total; - } - }, - - isDifferent: function(oldValue, newValue) { - return !this['equalityComparer'] || !this['equalityComparer'](oldValue, newValue); - }, - - extend: applyExtenders -}; - -ko.exportProperty(ko_subscribable_fn, 'subscribe', ko_subscribable_fn.subscribe); -ko.exportProperty(ko_subscribable_fn, 'extend', ko_subscribable_fn.extend); -ko.exportProperty(ko_subscribable_fn, 'getSubscriptionsCount', ko_subscribable_fn.getSubscriptionsCount); - -// For browsers that support proto assignment, we overwrite the prototype of each -// observable instance. Since observables are functions, we need Function.prototype -// to still be in the prototype chain. -if (ko.utils.canSetPrototype) { - ko.utils.setPrototypeOf(ko_subscribable_fn, Function.prototype); -} - -ko.subscribable['fn'] = ko_subscribable_fn; - - -ko.isSubscribable = function (instance) { - return instance != null && typeof instance.subscribe == "function" && typeof instance["notifySubscribers"] == "function"; -}; - -ko.exportSymbol('subscribable', ko.subscribable); -ko.exportSymbol('isSubscribable', ko.isSubscribable); - -ko.computedContext = ko.dependencyDetection = (function () { - var outerFrames = [], - currentFrame, - lastId = 0; - - // Return a unique ID that can be assigned to an observable for dependency tracking. - // Theoretically, you could eventually overflow the number storage size, resulting - // in duplicate IDs. But in JavaScript, the largest exact integral value is 2^53 - // or 9,007,199,254,740,992. If you created 1,000,000 IDs per second, it would - // take over 285 years to reach that number. - // Reference http://blog.vjeux.com/2010/javascript/javascript-max_int-number-limits.html - function getId() { - return ++lastId; - } - - function begin(options) { - outerFrames.push(currentFrame); - currentFrame = options; - } - - function end() { - currentFrame = outerFrames.pop(); - } - - return { - begin: begin, - - end: end, - - registerDependency: function (subscribable) { - if (currentFrame) { - if (!ko.isSubscribable(subscribable)) - throw new Error("Only subscribable things can act as dependencies"); - currentFrame.callback.call(currentFrame.callbackTarget, subscribable, subscribable._id || (subscribable._id = getId())); - } - }, - - ignore: function (callback, callbackTarget, callbackArgs) { - try { - begin(); - return callback.apply(callbackTarget, callbackArgs || []); - } finally { - end(); - } - }, - - getDependenciesCount: function () { - if (currentFrame) - return currentFrame.computed.getDependenciesCount(); - }, - - isInitial: function() { - if (currentFrame) - return currentFrame.isInitial; - } - }; -})(); - -ko.exportSymbol('computedContext', ko.computedContext); -ko.exportSymbol('computedContext.getDependenciesCount', ko.computedContext.getDependenciesCount); -ko.exportSymbol('computedContext.isInitial', ko.computedContext.isInitial); - -ko.exportSymbol('ignoreDependencies', ko.ignoreDependencies = ko.dependencyDetection.ignore); -var observableLatestValue = ko.utils.createSymbolOrString('_latestValue'); - -ko.observable = function (initialValue) { - function observable() { - if (arguments.length > 0) { - // Write - - // Ignore writes if the value hasn't changed - if (observable.isDifferent(observable[observableLatestValue], arguments[0])) { - observable.valueWillMutate(); - observable[observableLatestValue] = arguments[0]; - observable.valueHasMutated(); - } - return this; // Permits chained assignments - } - else { - // Read - ko.dependencyDetection.registerDependency(observable); // The caller only needs to be notified of changes if they did a "read" operation - return observable[observableLatestValue]; - } - } - - observable[observableLatestValue] = initialValue; - - // Inherit from 'subscribable' - if (!ko.utils.canSetPrototype) { - // 'subscribable' won't be on the prototype chain unless we put it there directly - ko.utils.extend(observable, ko.subscribable['fn']); - } - ko.subscribable['fn'].init(observable); - - // Inherit from 'observable' - ko.utils.setPrototypeOfOrExtend(observable, observableFn); - - if (ko.options['deferUpdates']) { - ko.extenders['deferred'](observable, true); - } - - return observable; -} - -// Define prototype for observables -var observableFn = { - 'equalityComparer': valuesArePrimitiveAndEqual, - peek: function() { return this[observableLatestValue]; }, - valueHasMutated: function () { this['notifySubscribers'](this[observableLatestValue]); }, - valueWillMutate: function () { this['notifySubscribers'](this[observableLatestValue], 'beforeChange'); } -}; - -// Note that for browsers that don't support proto assignment, the -// inheritance chain is created manually in the ko.observable constructor -if (ko.utils.canSetPrototype) { - ko.utils.setPrototypeOf(observableFn, ko.subscribable['fn']); -} - -var protoProperty = ko.observable.protoProperty = '__ko_proto__'; -observableFn[protoProperty] = ko.observable; - -ko.hasPrototype = function(instance, prototype) { - if ((instance === null) || (instance === undefined) || (instance[protoProperty] === undefined)) return false; - if (instance[protoProperty] === prototype) return true; - return ko.hasPrototype(instance[protoProperty], prototype); // Walk the prototype chain -}; - -ko.isObservable = function (instance) { - return ko.hasPrototype(instance, ko.observable); -} -ko.isWriteableObservable = function (instance) { - // Observable - if ((typeof instance == 'function') && instance[protoProperty] === ko.observable) - return true; - // Writeable dependent observable - if ((typeof instance == 'function') && (instance[protoProperty] === ko.dependentObservable) && (instance.hasWriteFunction)) - return true; - // Anything else - return false; -} - -ko.exportSymbol('observable', ko.observable); -ko.exportSymbol('isObservable', ko.isObservable); -ko.exportSymbol('isWriteableObservable', ko.isWriteableObservable); -ko.exportSymbol('isWritableObservable', ko.isWriteableObservable); -ko.exportSymbol('observable.fn', observableFn); -ko.exportProperty(observableFn, 'peek', observableFn.peek); -ko.exportProperty(observableFn, 'valueHasMutated', observableFn.valueHasMutated); -ko.exportProperty(observableFn, 'valueWillMutate', observableFn.valueWillMutate); -ko.observableArray = function (initialValues) { - initialValues = initialValues || []; - - if (typeof initialValues != 'object' || !('length' in initialValues)) - throw new Error("The argument passed when initializing an observable array must be an array, or null, or undefined."); - - var result = ko.observable(initialValues); - ko.utils.setPrototypeOfOrExtend(result, ko.observableArray['fn']); - return result.extend({'trackArrayChanges':true}); -}; - -ko.observableArray['fn'] = { - 'remove': function (valueOrPredicate) { - var underlyingArray = this.peek(); - var removedValues = []; - var predicate = typeof valueOrPredicate == "function" && !ko.isObservable(valueOrPredicate) ? valueOrPredicate : function (value) { return value === valueOrPredicate; }; - for (var i = 0; i < underlyingArray.length; i++) { - var value = underlyingArray[i]; - if (predicate(value)) { - if (removedValues.length === 0) { - this.valueWillMutate(); - } - removedValues.push(value); - underlyingArray.splice(i, 1); - i--; - } - } - if (removedValues.length) { - this.valueHasMutated(); - } - return removedValues; - }, - - 'removeAll': function (arrayOfValues) { - // If you passed zero args, we remove everything - if (arrayOfValues === undefined) { - var underlyingArray = this.peek(); - var allValues = underlyingArray.slice(0); - this.valueWillMutate(); - underlyingArray.splice(0, underlyingArray.length); - this.valueHasMutated(); - return allValues; - } - // If you passed an arg, we interpret it as an array of entries to remove - if (!arrayOfValues) - return []; - return this['remove'](function (value) { - return ko.utils.arrayIndexOf(arrayOfValues, value) >= 0; - }); - }, - - 'destroy': function (valueOrPredicate) { - var underlyingArray = this.peek(); - var predicate = typeof valueOrPredicate == "function" && !ko.isObservable(valueOrPredicate) ? valueOrPredicate : function (value) { return value === valueOrPredicate; }; - this.valueWillMutate(); - for (var i = underlyingArray.length - 1; i >= 0; i--) { - var value = underlyingArray[i]; - if (predicate(value)) - underlyingArray[i]["_destroy"] = true; - } - this.valueHasMutated(); - }, - - 'destroyAll': function (arrayOfValues) { - // If you passed zero args, we destroy everything - if (arrayOfValues === undefined) - return this['destroy'](function() { return true }); - - // If you passed an arg, we interpret it as an array of entries to destroy - if (!arrayOfValues) - return []; - return this['destroy'](function (value) { - return ko.utils.arrayIndexOf(arrayOfValues, value) >= 0; - }); - }, - - 'indexOf': function (item) { - var underlyingArray = this(); - return ko.utils.arrayIndexOf(underlyingArray, item); - }, - - 'replace': function(oldItem, newItem) { - var index = this['indexOf'](oldItem); - if (index >= 0) { - this.valueWillMutate(); - this.peek()[index] = newItem; - this.valueHasMutated(); - } - } -}; - -// Note that for browsers that don't support proto assignment, the -// inheritance chain is created manually in the ko.observableArray constructor -if (ko.utils.canSetPrototype) { - ko.utils.setPrototypeOf(ko.observableArray['fn'], ko.observable['fn']); -} - -// Populate ko.observableArray.fn with read/write functions from native arrays -// Important: Do not add any additional functions here that may reasonably be used to *read* data from the array -// because we'll eval them without causing subscriptions, so ko.computed output could end up getting stale -ko.utils.arrayForEach(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function (methodName) { - ko.observableArray['fn'][methodName] = function () { - // Use "peek" to avoid creating a subscription in any computed that we're executing in the context of - // (for consistency with mutating regular observables) - var underlyingArray = this.peek(); - this.valueWillMutate(); - this.cacheDiffForKnownOperation(underlyingArray, methodName, arguments); - var methodCallResult = underlyingArray[methodName].apply(underlyingArray, arguments); - this.valueHasMutated(); - // The native sort and reverse methods return a reference to the array, but it makes more sense to return the observable array instead. - return methodCallResult === underlyingArray ? this : methodCallResult; - }; -}); - -// Populate ko.observableArray.fn with read-only functions from native arrays -ko.utils.arrayForEach(["slice"], function (methodName) { - ko.observableArray['fn'][methodName] = function () { - var underlyingArray = this(); - return underlyingArray[methodName].apply(underlyingArray, arguments); - }; -}); - -ko.exportSymbol('observableArray', ko.observableArray); -var arrayChangeEventName = 'arrayChange'; -ko.extenders['trackArrayChanges'] = function(target, options) { - // Use the provided options--each call to trackArrayChanges overwrites the previously set options - target.compareArrayOptions = {}; - if (options && typeof options == "object") { - ko.utils.extend(target.compareArrayOptions, options); - } - target.compareArrayOptions['sparse'] = true; - - // Only modify the target observable once - if (target.cacheDiffForKnownOperation) { - return; - } - var trackingChanges = false, - cachedDiff = null, - arrayChangeSubscription, - pendingNotifications = 0, - underlyingBeforeSubscriptionAddFunction = target.beforeSubscriptionAdd, - underlyingAfterSubscriptionRemoveFunction = target.afterSubscriptionRemove; - - // Watch "subscribe" calls, and for array change events, ensure change tracking is enabled - target.beforeSubscriptionAdd = function (event) { - if (underlyingBeforeSubscriptionAddFunction) - underlyingBeforeSubscriptionAddFunction.call(target, event); - if (event === arrayChangeEventName) { - trackChanges(); - } - }; - // Watch "dispose" calls, and for array change events, ensure change tracking is disabled when all are disposed - target.afterSubscriptionRemove = function (event) { - if (underlyingAfterSubscriptionRemoveFunction) - underlyingAfterSubscriptionRemoveFunction.call(target, event); - if (event === arrayChangeEventName && !target.hasSubscriptionsForEvent(arrayChangeEventName)) { - arrayChangeSubscription.dispose(); - trackingChanges = false; - } - }; - - function trackChanges() { - // Calling 'trackChanges' multiple times is the same as calling it once - if (trackingChanges) { - return; - } - - trackingChanges = true; - - // Intercept "notifySubscribers" to track how many times it was called. - var underlyingNotifySubscribersFunction = target['notifySubscribers']; - target['notifySubscribers'] = function(valueToNotify, event) { - if (!event || event === defaultEvent) { - ++pendingNotifications; - } - return underlyingNotifySubscribersFunction.apply(this, arguments); - }; - - // Each time the array changes value, capture a clone so that on the next - // change it's possible to produce a diff - var previousContents = [].concat(target.peek() || []); - cachedDiff = null; - arrayChangeSubscription = target.subscribe(function(currentContents) { - // Make a copy of the current contents and ensure it's an array - currentContents = [].concat(currentContents || []); - - // Compute the diff and issue notifications, but only if someone is listening - if (target.hasSubscriptionsForEvent(arrayChangeEventName)) { - var changes = getChanges(previousContents, currentContents); - } - - // Eliminate references to the old, removed items, so they can be GCed - previousContents = currentContents; - cachedDiff = null; - pendingNotifications = 0; - - if (changes && changes.length) { - target['notifySubscribers'](changes, arrayChangeEventName); - } - }); - } - - function getChanges(previousContents, currentContents) { - // We try to re-use cached diffs. - // The scenarios where pendingNotifications > 1 are when using rate-limiting or the Deferred Updates - // plugin, which without this check would not be compatible with arrayChange notifications. Normally, - // notifications are issued immediately so we wouldn't be queueing up more than one. - if (!cachedDiff || pendingNotifications > 1) { - cachedDiff = ko.utils.compareArrays(previousContents, currentContents, target.compareArrayOptions); - } - - return cachedDiff; - } - - target.cacheDiffForKnownOperation = function(rawArray, operationName, args) { - // Only run if we're currently tracking changes for this observable array - // and there aren't any pending deferred notifications. - if (!trackingChanges || pendingNotifications) { - return; - } - var diff = [], - arrayLength = rawArray.length, - argsLength = args.length, - offset = 0; - - function pushDiff(status, value, index) { - return diff[diff.length] = { 'status': status, 'value': value, 'index': index }; - } - switch (operationName) { - case 'push': - offset = arrayLength; - case 'unshift': - for (var index = 0; index < argsLength; index++) { - pushDiff('added', args[index], offset + index); - } - break; - - case 'pop': - offset = arrayLength - 1; - case 'shift': - if (arrayLength) { - pushDiff('deleted', rawArray[offset], offset); - } - break; - - case 'splice': - // Negative start index means 'from end of array'. After that we clamp to [0...arrayLength]. - // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice - var startIndex = Math.min(Math.max(0, args[0] < 0 ? arrayLength + args[0] : args[0]), arrayLength), - endDeleteIndex = argsLength === 1 ? arrayLength : Math.min(startIndex + (args[1] || 0), arrayLength), - endAddIndex = startIndex + argsLength - 2, - endIndex = Math.max(endDeleteIndex, endAddIndex), - additions = [], deletions = []; - for (var index = startIndex, argsIndex = 2; index < endIndex; ++index, ++argsIndex) { - if (index < endDeleteIndex) - deletions.push(pushDiff('deleted', rawArray[index], index)); - if (index < endAddIndex) - additions.push(pushDiff('added', args[argsIndex], index)); - } - ko.utils.findMovesInArrayComparison(deletions, additions); - break; - - default: - return; - } - cachedDiff = diff; - }; -}; -var computedState = ko.utils.createSymbolOrString('_state'); - -ko.computed = ko.dependentObservable = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget, options) { - if (typeof evaluatorFunctionOrOptions === "object") { - // Single-parameter syntax - everything is on this "options" param - options = evaluatorFunctionOrOptions; - } else { - // Multi-parameter syntax - construct the options according to the params passed - options = options || {}; - if (evaluatorFunctionOrOptions) { - options["read"] = evaluatorFunctionOrOptions; - } - } - if (typeof options["read"] != "function") - throw Error("Pass a function that returns the value of the ko.computed"); - - var writeFunction = options["write"]; - var state = { - latestValue: undefined, - isStale: true, - isBeingEvaluated: false, - suppressDisposalUntilDisposeWhenReturnsFalse: false, - isDisposed: false, - pure: false, - isSleeping: false, - readFunction: options["read"], - evaluatorFunctionTarget: evaluatorFunctionTarget || options["owner"], - disposeWhenNodeIsRemoved: options["disposeWhenNodeIsRemoved"] || options.disposeWhenNodeIsRemoved || null, - disposeWhen: options["disposeWhen"] || options.disposeWhen, - domNodeDisposalCallback: null, - dependencyTracking: {}, - dependenciesCount: 0, - evaluationTimeoutInstance: null - }; - - function computedObservable() { - if (arguments.length > 0) { - if (typeof writeFunction === "function") { - // Writing a value - writeFunction.apply(state.evaluatorFunctionTarget, arguments); - } else { - throw new Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters."); - } - return this; // Permits chained assignments - } else { - // Reading the value - ko.dependencyDetection.registerDependency(computedObservable); - if (state.isStale || (state.isSleeping && computedObservable.haveDependenciesChanged())) { - computedObservable.evaluateImmediate(); - } - return state.latestValue; - } - } - - computedObservable[computedState] = state; - computedObservable.hasWriteFunction = typeof writeFunction === "function"; - - // Inherit from 'subscribable' - if (!ko.utils.canSetPrototype) { - // 'subscribable' won't be on the prototype chain unless we put it there directly - ko.utils.extend(computedObservable, ko.subscribable['fn']); - } - ko.subscribable['fn'].init(computedObservable); - - // Inherit from 'computed' - ko.utils.setPrototypeOfOrExtend(computedObservable, computedFn); - - if (options['pure']) { - state.pure = true; - state.isSleeping = true; // Starts off sleeping; will awake on the first subscription - ko.utils.extend(computedObservable, pureComputedOverrides); - } else if (options['deferEvaluation']) { - ko.utils.extend(computedObservable, deferEvaluationOverrides); - } - - if (ko.options['deferUpdates']) { - ko.extenders['deferred'](computedObservable, true); - } - - if (DEBUG) { - // #1731 - Aid debugging by exposing the computed's options - computedObservable["_options"] = options; - } - - if (state.disposeWhenNodeIsRemoved) { - // Since this computed is associated with a DOM node, and we don't want to dispose the computed - // until the DOM node is *removed* from the document (as opposed to never having been in the document), - // we'll prevent disposal until "disposeWhen" first returns false. - state.suppressDisposalUntilDisposeWhenReturnsFalse = true; - - // disposeWhenNodeIsRemoved: true can be used to opt into the "only dispose after first false result" - // behaviour even if there's no specific node to watch. In that case, clear the option so we don't try - // to watch for a non-node's disposal. This technique is intended for KO's internal use only and shouldn't - // be documented or used by application code, as it's likely to change in a future version of KO. - if (!state.disposeWhenNodeIsRemoved.nodeType) { - state.disposeWhenNodeIsRemoved = null; - } - } - - // Evaluate, unless sleeping or deferEvaluation is true - if (!state.isSleeping && !options['deferEvaluation']) { - computedObservable.evaluateImmediate(); - } - - // Attach a DOM node disposal callback so that the computed will be proactively disposed as soon as the node is - // removed using ko.removeNode. But skip if isActive is false (there will never be any dependencies to dispose). - if (state.disposeWhenNodeIsRemoved && computedObservable.isActive()) { - ko.utils.domNodeDisposal.addDisposeCallback(state.disposeWhenNodeIsRemoved, state.domNodeDisposalCallback = function () { - computedObservable.dispose(); - }); - } - - return computedObservable; -}; - -// Utility function that disposes a given dependencyTracking entry -function computedDisposeDependencyCallback(id, entryToDispose) { - if (entryToDispose !== null && entryToDispose.dispose) { - entryToDispose.dispose(); - } -} - -// This function gets called each time a dependency is detected while evaluating a computed. -// It's factored out as a shared function to avoid creating unnecessary function instances during evaluation. -function computedBeginDependencyDetectionCallback(subscribable, id) { - var computedObservable = this.computedObservable, - state = computedObservable[computedState]; - if (!state.isDisposed) { - if (this.disposalCount && this.disposalCandidates[id]) { - // Don't want to dispose this subscription, as it's still being used - computedObservable.addDependencyTracking(id, subscribable, this.disposalCandidates[id]); - this.disposalCandidates[id] = null; // No need to actually delete the property - disposalCandidates is a transient object anyway - --this.disposalCount; - } else if (!state.dependencyTracking[id]) { - // Brand new subscription - add it - computedObservable.addDependencyTracking(id, subscribable, state.isSleeping ? { _target: subscribable } : computedObservable.subscribeToDependency(subscribable)); - } - } -} - -var computedFn = { - "equalityComparer": valuesArePrimitiveAndEqual, - getDependenciesCount: function () { - return this[computedState].dependenciesCount; - }, - addDependencyTracking: function (id, target, trackingObj) { - if (this[computedState].pure && target === this) { - throw Error("A 'pure' computed must not be called recursively"); - } - - this[computedState].dependencyTracking[id] = trackingObj; - trackingObj._order = this[computedState].dependenciesCount++; - trackingObj._version = target.getVersion(); - }, - haveDependenciesChanged: function () { - var id, dependency, dependencyTracking = this[computedState].dependencyTracking; - for (id in dependencyTracking) { - if (dependencyTracking.hasOwnProperty(id)) { - dependency = dependencyTracking[id]; - if (dependency._target.hasChanged(dependency._version)) { - return true; - } - } - } - }, - markDirty: function () { - // Process "dirty" events if we can handle delayed notifications - if (this._evalDelayed && !this[computedState].isBeingEvaluated) { - this._evalDelayed(); - } - }, - isActive: function () { - return this[computedState].isStale || this[computedState].dependenciesCount > 0; - }, - respondToChange: function () { - // Ignore "change" events if we've already scheduled a delayed notification - if (!this._notificationIsPending) { - this.evaluatePossiblyAsync(); - } - }, - subscribeToDependency: function (target) { - if (target._deferUpdates && !this[computedState].disposeWhenNodeIsRemoved) { - var dirtySub = target.subscribe(this.markDirty, this, 'dirty'), - changeSub = target.subscribe(this.respondToChange, this); - return { - _target: target, - dispose: function () { - dirtySub.dispose(); - changeSub.dispose(); - } - }; - } else { - return target.subscribe(this.evaluatePossiblyAsync, this); - } - }, - evaluatePossiblyAsync: function () { - var computedObservable = this, - throttleEvaluationTimeout = computedObservable['throttleEvaluation']; - if (throttleEvaluationTimeout && throttleEvaluationTimeout >= 0) { - clearTimeout(this[computedState].evaluationTimeoutInstance); - this[computedState].evaluationTimeoutInstance = ko.utils.setTimeout(function () { - computedObservable.evaluateImmediate(true /*notifyChange*/); - }, throttleEvaluationTimeout); - } else if (computedObservable._evalDelayed) { - computedObservable._evalDelayed(); - } else { - computedObservable.evaluateImmediate(true /*notifyChange*/); - } - }, - evaluateImmediate: function (notifyChange) { - var computedObservable = this, - state = computedObservable[computedState], - disposeWhen = state.disposeWhen; - - if (state.isBeingEvaluated) { - // If the evaluation of a ko.computed causes side effects, it's possible that it will trigger its own re-evaluation. - // This is not desirable (it's hard for a developer to realise a chain of dependencies might cause this, and they almost - // certainly didn't intend infinite re-evaluations). So, for predictability, we simply prevent ko.computeds from causing - // their own re-evaluation. Further discussion at https://github.com/SteveSanderson/knockout/pull/387 - return; - } - - // Do not evaluate (and possibly capture new dependencies) if disposed - if (state.isDisposed) { - return; - } - - if (state.disposeWhenNodeIsRemoved && !ko.utils.domNodeIsAttachedToDocument(state.disposeWhenNodeIsRemoved) || disposeWhen && disposeWhen()) { - // See comment above about suppressDisposalUntilDisposeWhenReturnsFalse - if (!state.suppressDisposalUntilDisposeWhenReturnsFalse) { - computedObservable.dispose(); - return; - } - } else { - // It just did return false, so we can stop suppressing now - state.suppressDisposalUntilDisposeWhenReturnsFalse = false; - } - - state.isBeingEvaluated = true; - try { - this.evaluateImmediate_CallReadWithDependencyDetection(notifyChange); - } finally { - state.isBeingEvaluated = false; - } - - if (!state.dependenciesCount) { - computedObservable.dispose(); - } - }, - evaluateImmediate_CallReadWithDependencyDetection: function (notifyChange) { - // This function is really just part of the evaluateImmediate logic. You would never call it from anywhere else. - // Factoring it out into a separate function means it can be independent of the try/catch block in evaluateImmediate, - // which contributes to saving about 40% off the CPU overhead of computed evaluation (on V8 at least). - - var computedObservable = this, - state = computedObservable[computedState]; - - // Initially, we assume that none of the subscriptions are still being used (i.e., all are candidates for disposal). - // Then, during evaluation, we cross off any that are in fact still being used. - var isInitial = state.pure ? undefined : !state.dependenciesCount, // If we're evaluating when there are no previous dependencies, it must be the first time - dependencyDetectionContext = { - computedObservable: computedObservable, - disposalCandidates: state.dependencyTracking, - disposalCount: state.dependenciesCount - }; - - ko.dependencyDetection.begin({ - callbackTarget: dependencyDetectionContext, - callback: computedBeginDependencyDetectionCallback, - computed: computedObservable, - isInitial: isInitial - }); - - state.dependencyTracking = {}; - state.dependenciesCount = 0; - - var newValue = this.evaluateImmediate_CallReadThenEndDependencyDetection(state, dependencyDetectionContext); - - if (computedObservable.isDifferent(state.latestValue, newValue)) { - if (!state.isSleeping) { - computedObservable["notifySubscribers"](state.latestValue, "beforeChange"); - } - - state.latestValue = newValue; - - if (state.isSleeping) { - computedObservable.updateVersion(); - } else if (notifyChange) { - computedObservable["notifySubscribers"](state.latestValue); - } - } - - if (isInitial) { - computedObservable["notifySubscribers"](state.latestValue, "awake"); - } - }, - evaluateImmediate_CallReadThenEndDependencyDetection: function (state, dependencyDetectionContext) { - // This function is really part of the evaluateImmediate_CallReadWithDependencyDetection logic. - // You'd never call it from anywhere else. Factoring it out means that evaluateImmediate_CallReadWithDependencyDetection - // can be independent of try/finally blocks, which contributes to saving about 40% off the CPU - // overhead of computed evaluation (on V8 at least). - - try { - var readFunction = state.readFunction; - return state.evaluatorFunctionTarget ? readFunction.call(state.evaluatorFunctionTarget) : readFunction(); - } finally { - ko.dependencyDetection.end(); - - // For each subscription no longer being used, remove it from the active subscriptions list and dispose it - if (dependencyDetectionContext.disposalCount && !state.isSleeping) { - ko.utils.objectForEach(dependencyDetectionContext.disposalCandidates, computedDisposeDependencyCallback); - } - - state.isStale = false; - } - }, - peek: function () { - // Peek won't re-evaluate, except while the computed is sleeping or to get the initial value when "deferEvaluation" is set. - var state = this[computedState]; - if ((state.isStale && !state.dependenciesCount) || (state.isSleeping && this.haveDependenciesChanged())) { - this.evaluateImmediate(); - } - return state.latestValue; - }, - limit: function (limitFunction) { - // Override the limit function with one that delays evaluation as well - ko.subscribable['fn'].limit.call(this, limitFunction); - this._evalDelayed = function () { - this._limitBeforeChange(this[computedState].latestValue); - - this[computedState].isStale = true; // Mark as dirty - - // Pass the observable to the "limit" code, which will access it when - // it's time to do the notification. - this._limitChange(this); - } - }, - dispose: function () { - var state = this[computedState]; - if (!state.isSleeping && state.dependencyTracking) { - ko.utils.objectForEach(state.dependencyTracking, function (id, dependency) { - if (dependency.dispose) - dependency.dispose(); - }); - } - if (state.disposeWhenNodeIsRemoved && state.domNodeDisposalCallback) { - ko.utils.domNodeDisposal.removeDisposeCallback(state.disposeWhenNodeIsRemoved, state.domNodeDisposalCallback); - } - state.dependencyTracking = null; - state.dependenciesCount = 0; - state.isDisposed = true; - state.isStale = false; - state.isSleeping = false; - state.disposeWhenNodeIsRemoved = null; - } -}; - -var pureComputedOverrides = { - beforeSubscriptionAdd: function (event) { - // If asleep, wake up the computed by subscribing to any dependencies. - var computedObservable = this, - state = computedObservable[computedState]; - if (!state.isDisposed && state.isSleeping && event == 'change') { - state.isSleeping = false; - if (state.isStale || computedObservable.haveDependenciesChanged()) { - state.dependencyTracking = null; - state.dependenciesCount = 0; - state.isStale = true; - computedObservable.evaluateImmediate(); - } else { - // First put the dependencies in order - var dependeciesOrder = []; - ko.utils.objectForEach(state.dependencyTracking, function (id, dependency) { - dependeciesOrder[dependency._order] = id; - }); - // Next, subscribe to each one - ko.utils.arrayForEach(dependeciesOrder, function (id, order) { - var dependency = state.dependencyTracking[id], - subscription = computedObservable.subscribeToDependency(dependency._target); - subscription._order = order; - subscription._version = dependency._version; - state.dependencyTracking[id] = subscription; - }); - } - if (!state.isDisposed) { // test since evaluating could trigger disposal - computedObservable["notifySubscribers"](state.latestValue, "awake"); - } - } - }, - afterSubscriptionRemove: function (event) { - var state = this[computedState]; - if (!state.isDisposed && event == 'change' && !this.hasSubscriptionsForEvent('change')) { - ko.utils.objectForEach(state.dependencyTracking, function (id, dependency) { - if (dependency.dispose) { - state.dependencyTracking[id] = { - _target: dependency._target, - _order: dependency._order, - _version: dependency._version - }; - dependency.dispose(); - } - }); - state.isSleeping = true; - this["notifySubscribers"](undefined, "asleep"); - } - }, - getVersion: function () { - // Because a pure computed is not automatically updated while it is sleeping, we can't - // simply return the version number. Instead, we check if any of the dependencies have - // changed and conditionally re-evaluate the computed observable. - var state = this[computedState]; - if (state.isSleeping && (state.isStale || this.haveDependenciesChanged())) { - this.evaluateImmediate(); - } - return ko.subscribable['fn'].getVersion.call(this); - } -}; - -var deferEvaluationOverrides = { - beforeSubscriptionAdd: function (event) { - // This will force a computed with deferEvaluation to evaluate when the first subscription is registered. - if (event == 'change' || event == 'beforeChange') { - this.peek(); - } - } -}; - -// Note that for browsers that don't support proto assignment, the -// inheritance chain is created manually in the ko.computed constructor -if (ko.utils.canSetPrototype) { - ko.utils.setPrototypeOf(computedFn, ko.subscribable['fn']); -} - -// Set the proto chain values for ko.hasPrototype -var protoProp = ko.observable.protoProperty; // == "__ko_proto__" -ko.computed[protoProp] = ko.observable; -computedFn[protoProp] = ko.computed; - -ko.isComputed = function (instance) { - return ko.hasPrototype(instance, ko.computed); -}; - -ko.isPureComputed = function (instance) { - return ko.hasPrototype(instance, ko.computed) - && instance[computedState] && instance[computedState].pure; -}; - -ko.exportSymbol('computed', ko.computed); -ko.exportSymbol('dependentObservable', ko.computed); // export ko.dependentObservable for backwards compatibility (1.x) -ko.exportSymbol('isComputed', ko.isComputed); -ko.exportSymbol('isPureComputed', ko.isPureComputed); -ko.exportSymbol('computed.fn', computedFn); -ko.exportProperty(computedFn, 'peek', computedFn.peek); -ko.exportProperty(computedFn, 'dispose', computedFn.dispose); -ko.exportProperty(computedFn, 'isActive', computedFn.isActive); -ko.exportProperty(computedFn, 'getDependenciesCount', computedFn.getDependenciesCount); - -ko.pureComputed = function (evaluatorFunctionOrOptions, evaluatorFunctionTarget) { - if (typeof evaluatorFunctionOrOptions === 'function') { - return ko.computed(evaluatorFunctionOrOptions, evaluatorFunctionTarget, {'pure':true}); - } else { - evaluatorFunctionOrOptions = ko.utils.extend({}, evaluatorFunctionOrOptions); // make a copy of the parameter object - evaluatorFunctionOrOptions['pure'] = true; - return ko.computed(evaluatorFunctionOrOptions, evaluatorFunctionTarget); - } -} -ko.exportSymbol('pureComputed', ko.pureComputed); - -(function() { - var maxNestedObservableDepth = 10; // Escape the (unlikely) pathalogical case where an observable's current value is itself (or similar reference cycle) - - ko.toJS = function(rootObject) { - if (arguments.length == 0) - throw new Error("When calling ko.toJS, pass the object you want to convert."); - - // We just unwrap everything at every level in the object graph - return mapJsObjectGraph(rootObject, function(valueToMap) { - // Loop because an observable's value might in turn be another observable wrapper - for (var i = 0; ko.isObservable(valueToMap) && (i < maxNestedObservableDepth); i++) - valueToMap = valueToMap(); - return valueToMap; - }); - }; - - ko.toJSON = function(rootObject, replacer, space) { // replacer and space are optional - var plainJavaScriptObject = ko.toJS(rootObject); - return ko.utils.stringifyJson(plainJavaScriptObject, replacer, space); - }; - - function mapJsObjectGraph(rootObject, mapInputCallback, visitedObjects) { - visitedObjects = visitedObjects || new objectLookup(); - - rootObject = mapInputCallback(rootObject); - var canHaveProperties = (typeof rootObject == "object") && (rootObject !== null) && (rootObject !== undefined) && (!(rootObject instanceof RegExp)) && (!(rootObject instanceof Date)) && (!(rootObject instanceof String)) && (!(rootObject instanceof Number)) && (!(rootObject instanceof Boolean)); - if (!canHaveProperties) - return rootObject; - - var outputProperties = rootObject instanceof Array ? [] : {}; - visitedObjects.save(rootObject, outputProperties); - - visitPropertiesOrArrayEntries(rootObject, function(indexer) { - var propertyValue = mapInputCallback(rootObject[indexer]); - - switch (typeof propertyValue) { - case "boolean": - case "number": - case "string": - case "function": - outputProperties[indexer] = propertyValue; - break; - case "object": - case "undefined": - var previouslyMappedValue = visitedObjects.get(propertyValue); - outputProperties[indexer] = (previouslyMappedValue !== undefined) - ? previouslyMappedValue - : mapJsObjectGraph(propertyValue, mapInputCallback, visitedObjects); - break; - } - }); - - return outputProperties; - } - - function visitPropertiesOrArrayEntries(rootObject, visitorCallback) { - if (rootObject instanceof Array) { - for (var i = 0; i < rootObject.length; i++) - visitorCallback(i); - - // For arrays, also respect toJSON property for custom mappings (fixes #278) - if (typeof rootObject['toJSON'] == 'function') - visitorCallback('toJSON'); - } else { - for (var propertyName in rootObject) { - visitorCallback(propertyName); - } - } - }; - - function objectLookup() { - this.keys = []; - this.values = []; - }; - - objectLookup.prototype = { - constructor: objectLookup, - save: function(key, value) { - var existingIndex = ko.utils.arrayIndexOf(this.keys, key); - if (existingIndex >= 0) - this.values[existingIndex] = value; - else { - this.keys.push(key); - this.values.push(value); - } - }, - get: function(key) { - var existingIndex = ko.utils.arrayIndexOf(this.keys, key); - return (existingIndex >= 0) ? this.values[existingIndex] : undefined; - } - }; -})(); - -ko.exportSymbol('toJS', ko.toJS); -ko.exportSymbol('toJSON', ko.toJSON); -(function () { - var hasDomDataExpandoProperty = '__ko__hasDomDataOptionValue__'; - - // Normally, SELECT elements and their OPTIONs can only take value of type 'string' (because the values - // are stored on DOM attributes). ko.selectExtensions provides a way for SELECTs/OPTIONs to have values - // that are arbitrary objects. This is very convenient when implementing things like cascading dropdowns. - ko.selectExtensions = { - readValue : function(element) { - switch (ko.utils.tagNameLower(element)) { - case 'option': - if (element[hasDomDataExpandoProperty] === true) - return ko.utils.domData.get(element, ko.bindingHandlers.options.optionValueDomDataKey); - return ko.utils.ieVersion <= 7 - ? (element.getAttributeNode('value') && element.getAttributeNode('value').specified ? element.value : element.text) - : element.value; - case 'select': - return element.selectedIndex >= 0 ? ko.selectExtensions.readValue(element.options[element.selectedIndex]) : undefined; - default: - return element.value; - } - }, - - writeValue: function(element, value, allowUnset) { - switch (ko.utils.tagNameLower(element)) { - case 'option': - switch(typeof value) { - case "string": - ko.utils.domData.set(element, ko.bindingHandlers.options.optionValueDomDataKey, undefined); - if (hasDomDataExpandoProperty in element) { // IE <= 8 throws errors if you delete non-existent properties from a DOM node - delete element[hasDomDataExpandoProperty]; - } - element.value = value; - break; - default: - // Store arbitrary object using DomData - ko.utils.domData.set(element, ko.bindingHandlers.options.optionValueDomDataKey, value); - element[hasDomDataExpandoProperty] = true; - - // Special treatment of numbers is just for backward compatibility. KO 1.2.1 wrote numerical values to element.value. - element.value = typeof value === "number" ? value : ""; - break; - } - break; - case 'select': - if (value === "" || value === null) // A blank string or null value will select the caption - value = undefined; - var selection = -1; - for (var i = 0, n = element.options.length, optionValue; i < n; ++i) { - optionValue = ko.selectExtensions.readValue(element.options[i]); - // Include special check to handle selecting a caption with a blank string value - if (optionValue == value || (optionValue == "" && value === undefined)) { - selection = i; - break; - } - } - if (allowUnset || selection >= 0 || (value === undefined && element.size > 1)) { - element.selectedIndex = selection; - } - break; - default: - if ((value === null) || (value === undefined)) - value = ""; - element.value = value; - break; - } - } - }; -})(); - -ko.exportSymbol('selectExtensions', ko.selectExtensions); -ko.exportSymbol('selectExtensions.readValue', ko.selectExtensions.readValue); -ko.exportSymbol('selectExtensions.writeValue', ko.selectExtensions.writeValue); -ko.expressionRewriting = (function () { - var javaScriptReservedWords = ["true", "false", "null", "undefined"]; - - // Matches something that can be assigned to--either an isolated identifier or something ending with a property accessor - // This is designed to be simple and avoid false negatives, but could produce false positives (e.g., a+b.c). - // This also will not properly handle nested brackets (e.g., obj1[obj2['prop']]; see #911). - var javaScriptAssignmentTarget = /^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i; - - function getWriteableValue(expression) { - if (ko.utils.arrayIndexOf(javaScriptReservedWords, expression) >= 0) - return false; - var match = expression.match(javaScriptAssignmentTarget); - return match === null ? false : match[1] ? ('Object(' + match[1] + ')' + match[2]) : expression; - } - - // The following regular expressions will be used to split an object-literal string into tokens - - // These two match strings, either with double quotes or single quotes - var stringDouble = '"(?:[^"\\\\]|\\\\.)*"', - stringSingle = "'(?:[^'\\\\]|\\\\.)*'", - // Matches a regular expression (text enclosed by slashes), but will also match sets of divisions - // as a regular expression (this is handled by the parsing loop below). - stringRegexp = '/(?:[^/\\\\]|\\\\.)*/\w*', - // These characters have special meaning to the parser and must not appear in the middle of a - // token, except as part of a string. - specials = ',"\'{}()/:[\\]', - // Match text (at least two characters) that does not contain any of the above special characters, - // although some of the special characters are allowed to start it (all but the colon and comma). - // The text can contain spaces, but leading or trailing spaces are skipped. - everyThingElse = '[^\\s:,/][^' + specials + ']*[^\\s' + specials + ']', - // Match any non-space character not matched already. This will match colons and commas, since they're - // not matched by "everyThingElse", but will also match any other single character that wasn't already - // matched (for example: in "a: 1, b: 2", each of the non-space characters will be matched by oneNotSpace). - oneNotSpace = '[^\\s]', - - // Create the actual regular expression by or-ing the above strings. The order is important. - bindingToken = RegExp(stringDouble + '|' + stringSingle + '|' + stringRegexp + '|' + everyThingElse + '|' + oneNotSpace, 'g'), - - // Match end of previous token to determine whether a slash is a division or regex. - divisionLookBehind = /[\])"'A-Za-z0-9_$]+$/, - keywordRegexLookBehind = {'in':1,'return':1,'typeof':1}; - - function parseObjectLiteral(objectLiteralString) { - // Trim leading and trailing spaces from the string - var str = ko.utils.stringTrim(objectLiteralString); - - // Trim braces '{' surrounding the whole object literal - if (str.charCodeAt(0) === 123) str = str.slice(1, -1); - - // Split into tokens - var result = [], toks = str.match(bindingToken), key, values = [], depth = 0; - - if (toks) { - // Append a comma so that we don't need a separate code block to deal with the last item - toks.push(','); - - for (var i = 0, tok; tok = toks[i]; ++i) { - var c = tok.charCodeAt(0); - // A comma signals the end of a key/value pair if depth is zero - if (c === 44) { // "," - if (depth <= 0) { - result.push((key && values.length) ? {key: key, value: values.join('')} : {'unknown': key || values.join('')}); - key = depth = 0; - values = []; - continue; - } - // Simply skip the colon that separates the name and value - } else if (c === 58) { // ":" - if (!depth && !key && values.length === 1) { - key = values.pop(); - continue; - } - // A set of slashes is initially matched as a regular expression, but could be division - } else if (c === 47 && i && tok.length > 1) { // "/" - // Look at the end of the previous token to determine if the slash is actually division - var match = toks[i-1].match(divisionLookBehind); - if (match && !keywordRegexLookBehind[match[0]]) { - // The slash is actually a division punctuator; re-parse the remainder of the string (not including the slash) - str = str.substr(str.indexOf(tok) + 1); - toks = str.match(bindingToken); - toks.push(','); - i = -1; - // Continue with just the slash - tok = '/'; - } - // Increment depth for parentheses, braces, and brackets so that interior commas are ignored - } else if (c === 40 || c === 123 || c === 91) { // '(', '{', '[' - ++depth; - } else if (c === 41 || c === 125 || c === 93) { // ')', '}', ']' - --depth; - // The key will be the first token; if it's a string, trim the quotes - } else if (!key && !values.length && (c === 34 || c === 39)) { // '"', "'" - tok = tok.slice(1, -1); - } - values.push(tok); - } - } - return result; - } - - // Two-way bindings include a write function that allow the handler to update the value even if it's not an observable. - var twoWayBindings = {}; - - function preProcessBindings(bindingsStringOrKeyValueArray, bindingOptions) { - bindingOptions = bindingOptions || {}; - - function processKeyValue(key, val) { - var writableVal; - function callPreprocessHook(obj) { - return (obj && obj['preprocess']) ? (val = obj['preprocess'](val, key, processKeyValue)) : true; - } - if (!bindingParams) { - if (!callPreprocessHook(ko['getBindingHandler'](key))) - return; - - if (twoWayBindings[key] && (writableVal = getWriteableValue(val))) { - // For two-way bindings, provide a write method in case the value - // isn't a writable observable. - propertyAccessorResultStrings.push("'" + key + "':function(_z){" + writableVal + "=_z}"); - } - } - // Values are wrapped in a function so that each value can be accessed independently - if (makeValueAccessors) { - val = 'function(){return ' + val + ' }'; - } - resultStrings.push("'" + key + "':" + val); - } - - var resultStrings = [], - propertyAccessorResultStrings = [], - makeValueAccessors = bindingOptions['valueAccessors'], - bindingParams = bindingOptions['bindingParams'], - keyValueArray = typeof bindingsStringOrKeyValueArray === "string" ? - parseObjectLiteral(bindingsStringOrKeyValueArray) : bindingsStringOrKeyValueArray; - - ko.utils.arrayForEach(keyValueArray, function(keyValue) { - processKeyValue(keyValue.key || keyValue['unknown'], keyValue.value); - }); - - if (propertyAccessorResultStrings.length) - processKeyValue('_ko_property_writers', "{" + propertyAccessorResultStrings.join(",") + " }"); - - return resultStrings.join(","); - } - - return { - bindingRewriteValidators: [], - - twoWayBindings: twoWayBindings, - - parseObjectLiteral: parseObjectLiteral, - - preProcessBindings: preProcessBindings, - - keyValueArrayContainsKey: function(keyValueArray, key) { - for (var i = 0; i < keyValueArray.length; i++) - if (keyValueArray[i]['key'] == key) - return true; - return false; - }, - - // Internal, private KO utility for updating model properties from within bindings - // property: If the property being updated is (or might be) an observable, pass it here - // If it turns out to be a writable observable, it will be written to directly - // allBindings: An object with a get method to retrieve bindings in the current execution context. - // This will be searched for a '_ko_property_writers' property in case you're writing to a non-observable - // key: The key identifying the property to be written. Example: for { hasFocus: myValue }, write to 'myValue' by specifying the key 'hasFocus' - // value: The value to be written - // checkIfDifferent: If true, and if the property being written is a writable observable, the value will only be written if - // it is !== existing value on that writable observable - writeValueToProperty: function(property, allBindings, key, value, checkIfDifferent) { - if (!property || !ko.isObservable(property)) { - var propWriters = allBindings.get('_ko_property_writers'); - if (propWriters && propWriters[key]) - propWriters[key](value); - } else if (ko.isWriteableObservable(property) && (!checkIfDifferent || property.peek() !== value)) { - property(value); - } - } - }; -})(); - -ko.exportSymbol('expressionRewriting', ko.expressionRewriting); -ko.exportSymbol('expressionRewriting.bindingRewriteValidators', ko.expressionRewriting.bindingRewriteValidators); -ko.exportSymbol('expressionRewriting.parseObjectLiteral', ko.expressionRewriting.parseObjectLiteral); -ko.exportSymbol('expressionRewriting.preProcessBindings', ko.expressionRewriting.preProcessBindings); - -// Making bindings explicitly declare themselves as "two way" isn't ideal in the long term (it would be better if -// all bindings could use an official 'property writer' API without needing to declare that they might). However, -// since this is not, and has never been, a public API (_ko_property_writers was never documented), it's acceptable -// as an internal implementation detail in the short term. -// For those developers who rely on _ko_property_writers in their custom bindings, we expose _twoWayBindings as an -// undocumented feature that makes it relatively easy to upgrade to KO 3.0. However, this is still not an official -// public API, and we reserve the right to remove it at any time if we create a real public property writers API. -ko.exportSymbol('expressionRewriting._twoWayBindings', ko.expressionRewriting.twoWayBindings); - -// For backward compatibility, define the following aliases. (Previously, these function names were misleading because -// they referred to JSON specifically, even though they actually work with arbitrary JavaScript object literal expressions.) -ko.exportSymbol('jsonExpressionRewriting', ko.expressionRewriting); -ko.exportSymbol('jsonExpressionRewriting.insertPropertyAccessorsIntoJson', ko.expressionRewriting.preProcessBindings); -(function() { - // "Virtual elements" is an abstraction on top of the usual DOM API which understands the notion that comment nodes - // may be used to represent hierarchy (in addition to the DOM's natural hierarchy). - // If you call the DOM-manipulating functions on ko.virtualElements, you will be able to read and write the state - // of that virtual hierarchy - // - // The point of all this is to support containerless templates (e.g., blah) - // without having to scatter special cases all over the binding and templating code. - - // IE 9 cannot reliably read the "nodeValue" property of a comment node (see https://github.com/SteveSanderson/knockout/issues/186) - // but it does give them a nonstandard alternative property called "text" that it can read reliably. Other browsers don't have that property. - // So, use node.text where available, and node.nodeValue elsewhere - var commentNodesHaveTextProperty = document && document.createComment("test").text === ""; - - var startCommentRegex = commentNodesHaveTextProperty ? /^$/ : /^\s*ko(?:\s+([\s\S]+))?\s*$/; - var endCommentRegex = commentNodesHaveTextProperty ? /^$/ : /^\s*\/ko\s*$/; - var htmlTagsWithOptionallyClosingChildren = { 'ul': true, 'ol': true }; - - function isStartComment(node) { - return (node.nodeType == 8) && startCommentRegex.test(commentNodesHaveTextProperty ? node.text : node.nodeValue); - } - - function isEndComment(node) { - return (node.nodeType == 8) && endCommentRegex.test(commentNodesHaveTextProperty ? node.text : node.nodeValue); - } - - function getVirtualChildren(startComment, allowUnbalanced) { - var currentNode = startComment; - var depth = 1; - var children = []; - while (currentNode = currentNode.nextSibling) { - if (isEndComment(currentNode)) { - depth--; - if (depth === 0) - return children; - } - - children.push(currentNode); - - if (isStartComment(currentNode)) - depth++; - } - if (!allowUnbalanced) - throw new Error("Cannot find closing comment tag to match: " + startComment.nodeValue); - return null; - } - - function getMatchingEndComment(startComment, allowUnbalanced) { - var allVirtualChildren = getVirtualChildren(startComment, allowUnbalanced); - if (allVirtualChildren) { - if (allVirtualChildren.length > 0) - return allVirtualChildren[allVirtualChildren.length - 1].nextSibling; - return startComment.nextSibling; - } else - return null; // Must have no matching end comment, and allowUnbalanced is true - } - - function getUnbalancedChildTags(node) { - // e.g., from
OK
Another, returns: Another - // from
OK
, returns: - var childNode = node.firstChild, captureRemaining = null; - if (childNode) { - do { - if (captureRemaining) // We already hit an unbalanced node and are now just scooping up all subsequent nodes - captureRemaining.push(childNode); - else if (isStartComment(childNode)) { - var matchingEndComment = getMatchingEndComment(childNode, /* allowUnbalanced: */ true); - if (matchingEndComment) // It's a balanced tag, so skip immediately to the end of this virtual set - childNode = matchingEndComment; - else - captureRemaining = [childNode]; // It's unbalanced, so start capturing from this point - } else if (isEndComment(childNode)) { - captureRemaining = [childNode]; // It's unbalanced (if it wasn't, we'd have skipped over it already), so start capturing - } - } while (childNode = childNode.nextSibling); - } - return captureRemaining; - } - - ko.virtualElements = { - allowedBindings: {}, - - childNodes: function(node) { - return isStartComment(node) ? getVirtualChildren(node) : node.childNodes; - }, - - emptyNode: function(node) { - if (!isStartComment(node)) - ko.utils.emptyDomNode(node); - else { - var virtualChildren = ko.virtualElements.childNodes(node); - for (var i = 0, j = virtualChildren.length; i < j; i++) - ko.removeNode(virtualChildren[i]); - } - }, - - setDomNodeChildren: function(node, childNodes) { - if (!isStartComment(node)) - ko.utils.setDomNodeChildren(node, childNodes); - else { - ko.virtualElements.emptyNode(node); - var endCommentNode = node.nextSibling; // Must be the next sibling, as we just emptied the children - for (var i = 0, j = childNodes.length; i < j; i++) - endCommentNode.parentNode.insertBefore(childNodes[i], endCommentNode); - } - }, - - prepend: function(containerNode, nodeToPrepend) { - if (!isStartComment(containerNode)) { - if (containerNode.firstChild) - containerNode.insertBefore(nodeToPrepend, containerNode.firstChild); - else - containerNode.appendChild(nodeToPrepend); - } else { - // Start comments must always have a parent and at least one following sibling (the end comment) - containerNode.parentNode.insertBefore(nodeToPrepend, containerNode.nextSibling); - } - }, - - insertAfter: function(containerNode, nodeToInsert, insertAfterNode) { - if (!insertAfterNode) { - ko.virtualElements.prepend(containerNode, nodeToInsert); - } else if (!isStartComment(containerNode)) { - // Insert after insertion point - if (insertAfterNode.nextSibling) - containerNode.insertBefore(nodeToInsert, insertAfterNode.nextSibling); - else - containerNode.appendChild(nodeToInsert); - } else { - // Children of start comments must always have a parent and at least one following sibling (the end comment) - containerNode.parentNode.insertBefore(nodeToInsert, insertAfterNode.nextSibling); - } - }, - - firstChild: function(node) { - if (!isStartComment(node)) - return node.firstChild; - if (!node.nextSibling || isEndComment(node.nextSibling)) - return null; - return node.nextSibling; - }, - - nextSibling: function(node) { - if (isStartComment(node)) - node = getMatchingEndComment(node); - if (node.nextSibling && isEndComment(node.nextSibling)) - return null; - return node.nextSibling; - }, - - hasBindingValue: isStartComment, - - virtualNodeBindingValue: function(node) { - var regexMatch = (commentNodesHaveTextProperty ? node.text : node.nodeValue).match(startCommentRegex); - return regexMatch ? regexMatch[1] : null; - }, - - normaliseVirtualElementDomStructure: function(elementVerified) { - // Workaround for https://github.com/SteveSanderson/knockout/issues/155 - // (IE <= 8 or IE 9 quirks mode parses your HTML weirdly, treating closing tags as if they don't exist, thereby moving comment nodes - // that are direct descendants of
    into the preceding
  • ) - if (!htmlTagsWithOptionallyClosingChildren[ko.utils.tagNameLower(elementVerified)]) - return; - - // Scan immediate children to see if they contain unbalanced comment tags. If they do, those comment tags - // must be intended to appear *after* that child, so move them there. - var childNode = elementVerified.firstChild; - if (childNode) { - do { - if (childNode.nodeType === 1) { - var unbalancedTags = getUnbalancedChildTags(childNode); - if (unbalancedTags) { - // Fix up the DOM by moving the unbalanced tags to where they most likely were intended to be placed - *after* the child - var nodeToInsertBefore = childNode.nextSibling; - for (var i = 0; i < unbalancedTags.length; i++) { - if (nodeToInsertBefore) - elementVerified.insertBefore(unbalancedTags[i], nodeToInsertBefore); - else - elementVerified.appendChild(unbalancedTags[i]); - } - } - } - } while (childNode = childNode.nextSibling); - } - } - }; -})(); -ko.exportSymbol('virtualElements', ko.virtualElements); -ko.exportSymbol('virtualElements.allowedBindings', ko.virtualElements.allowedBindings); -ko.exportSymbol('virtualElements.emptyNode', ko.virtualElements.emptyNode); -//ko.exportSymbol('virtualElements.firstChild', ko.virtualElements.firstChild); // firstChild is not minified -ko.exportSymbol('virtualElements.insertAfter', ko.virtualElements.insertAfter); -//ko.exportSymbol('virtualElements.nextSibling', ko.virtualElements.nextSibling); // nextSibling is not minified -ko.exportSymbol('virtualElements.prepend', ko.virtualElements.prepend); -ko.exportSymbol('virtualElements.setDomNodeChildren', ko.virtualElements.setDomNodeChildren); -(function() { - var defaultBindingAttributeName = "data-bind"; - - ko.bindingProvider = function() { - this.bindingCache = {}; - }; - - ko.utils.extend(ko.bindingProvider.prototype, { - 'nodeHasBindings': function(node) { - switch (node.nodeType) { - case 1: // Element - return node.getAttribute(defaultBindingAttributeName) != null - || ko.components['getComponentNameForNode'](node); - case 8: // Comment node - return ko.virtualElements.hasBindingValue(node); - default: return false; - } - }, - - 'getBindings': function(node, bindingContext) { - var bindingsString = this['getBindingsString'](node, bindingContext), - parsedBindings = bindingsString ? this['parseBindingsString'](bindingsString, bindingContext, node) : null; - return ko.components.addBindingsForCustomElement(parsedBindings, node, bindingContext, /* valueAccessors */ false); - }, - - 'getBindingAccessors': function(node, bindingContext) { - var bindingsString = this['getBindingsString'](node, bindingContext), - parsedBindings = bindingsString ? this['parseBindingsString'](bindingsString, bindingContext, node, { 'valueAccessors': true }) : null; - return ko.components.addBindingsForCustomElement(parsedBindings, node, bindingContext, /* valueAccessors */ true); - }, - - // The following function is only used internally by this default provider. - // It's not part of the interface definition for a general binding provider. - 'getBindingsString': function(node, bindingContext) { - switch (node.nodeType) { - case 1: return node.getAttribute(defaultBindingAttributeName); // Element - case 8: return ko.virtualElements.virtualNodeBindingValue(node); // Comment node - default: return null; - } - }, - - // The following function is only used internally by this default provider. - // It's not part of the interface definition for a general binding provider. - 'parseBindingsString': function(bindingsString, bindingContext, node, options) { - try { - var bindingFunction = createBindingsStringEvaluatorViaCache(bindingsString, this.bindingCache, options); - return bindingFunction(bindingContext, node); - } catch (ex) { - ex.message = "Unable to parse bindings.\nBindings value: " + bindingsString + "\nMessage: " + ex.message; - throw ex; - } - } - }); - - ko.bindingProvider['instance'] = new ko.bindingProvider(); - - function createBindingsStringEvaluatorViaCache(bindingsString, cache, options) { - var cacheKey = bindingsString + (options && options['valueAccessors'] || ''); - return cache[cacheKey] - || (cache[cacheKey] = createBindingsStringEvaluator(bindingsString, options)); - } - - function createBindingsStringEvaluator(bindingsString, options) { - // Build the source for a function that evaluates "expression" - // For each scope variable, add an extra level of "with" nesting - // Example result: with(sc1) { with(sc0) { return (expression) } } - var rewrittenBindings = ko.expressionRewriting.preProcessBindings(bindingsString, options), - functionBody = "with($context){with($data||{}){return{" + rewrittenBindings + "}}}"; - return new Function("$context", "$element", functionBody); - } -})(); - -ko.exportSymbol('bindingProvider', ko.bindingProvider); -(function () { - ko.bindingHandlers = {}; - - // The following element types will not be recursed into during binding. - var bindingDoesNotRecurseIntoElementTypes = { - // Don't want bindings that operate on text nodes to mutate